]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: add short comment for RA message
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 2 Feb 2024 01:59:17 +0000 (10:59 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 7 Feb 2024 20:39:21 +0000 (05:39 +0900)
src/libsystemd-network/test-ndisc-rs.c

index d0648b95fabf165b7ac8f8357ea0042d2f430bbf..0f356fe67260efa0b4139d9c081e4317b9a7151f 100644 (file)
@@ -167,18 +167,23 @@ static void router_dump(sd_ndisc_router *rt) {
 
 static int send_ra(uint8_t flags) {
         uint8_t advertisement[] = {
+                /* struct nd_router_advert */
                 0x86, 0x00, 0xde, 0x83, 0x40, 0xc0, 0x00, 0xb4,
                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                /* type = 0x03 (SD_NDISC_OPTION_PREFIX_INFORMATION), length = 32 */
                 0x03, 0x04, 0x40, 0xc0, 0x00, 0x00, 0x01, 0xf4,
                 0x00, 0x00, 0x01, 0xb8, 0x00, 0x00, 0x00, 0x00,
                 0x20, 0x01, 0x0d, 0xb8, 0xde, 0xad, 0xbe, 0xef,
                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                /* type = 0x19 (SD_NDISC_OPTION_RDNSS), length = 24 */
                 0x19, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c,
                 0x20, 0x01, 0x0d, 0xb8, 0xde, 0xad, 0xbe, 0xef,
                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+                /* type = 0x1f (SD_NDISC_OPTION_DNSSL), legnth = 24 */
                 0x1f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c,
                 0x03, 0x6c, 0x61, 0x62, 0x05, 0x69, 0x6e, 0x74,
                 0x72, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                /* type = 0x01 (SD_NDISC_OPTION_SOURCE_LL_ADDRESS), legth = 8 */
                 0x01, 0x01, 0x78, 0x2b, 0xcb, 0xb3, 0x6d, 0x53,
         };