]> The Tcpdump Group git mirrors - tcpdump/commitdiff
dagid is always an IPv6 address, not an opaque 128-bit string
authorMichael Richardson <[email protected]>
Sun, 3 Jul 2016 02:14:33 +0000 (22:14 -0400)
committerMichael Richardson <[email protected]>
Sun, 3 Jul 2016 02:14:33 +0000 (22:14 -0400)
print-icmp6.c
tests/rpl-14-daovvv.out
tests/rpl-19-pickdag.out
tests/rpl-19-pickdagvvv.out
tests/rpl-26-senddaovv.out

index ae53187452f6d0263ede548747f1082fcff58648..bc8362eec049c2781571a59d8f1f22ba04db18b6 100644 (file)
@@ -651,18 +651,7 @@ const struct tok rpl_subopt_values[] = {
 static void
 rpl_format_dagid(char dagid_str[65], const u_char *dagid)
 {
 static void
 rpl_format_dagid(char dagid_str[65], const u_char *dagid)
 {
-        char *d = dagid_str;
-        int  i;
-
-        for(i=0;i<16;i++) {
-                if(isprint(dagid[i])) {
-                        *d++ = dagid[i];
-                } else {
-                        snprintf(d,5,"0x%02x", dagid[i]); /* 4 + null char */
-                        d += 4;
-                }
-        }
-        *d++ = '\0';
+        inet_ntop(AF_INET6, dagid, dagid_str, 64);
 }
 
 static void
 }
 
 static void
index 7869e6bf7f4562c8f19bf11023b00b1b5c7ab6b1..7e4b8a5f60054f5bb2e22664d2147a9378d44af7 100644 (file)
@@ -1 +1 @@
-IP6 (hlim 64, next-header ICMPv6 (58) payload length: 24) fe80::216:3eff:fe11:3424 > ff02::1: [icmp6 sum ok] ICMP6, RPL, (CLR)Destination Advertisement Object [dagid:pandora is fun0x0al,seq:1,instance:1,Dagid,40]
+IP6 (hlim 64, next-header ICMPv6 (58) payload length: 24) fe80::216:3eff:fe11:3424 > ff02::1: [icmp6 sum ok] ICMP6, RPL, (CLR)Destination Advertisement Object [dagid:7061:6e64:6f72:6120:6973:2066:756e:a6c,seq:1,instance:1,Dagid,40]
index 2460ada4fa87a8ac7fd613a333320f68134c324a..d3c41eedeccf18970e73e502eaefc1359b71ffa3 100644 (file)
@@ -1 +1 @@
-IP6 (hlim 64, next-header ICMPv6 (58) payload length: 56) fe80::216:3eff:fe11:3424 > fe80::216:3eff:fe11:3424: [icmp6 sum ok] ICMP6, RPL, (CLR)Destination Advertisement Object [dagid:T10x000x000x000x000x000x000x000x000x000x000x000x000x000x00,seq:10,instance:42,Dagid,40] opt:rpltarget len:25  opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0
+IP6 (hlim 64, next-header ICMPv6 (58) payload length: 56) fe80::216:3eff:fe11:3424 > fe80::216:3eff:fe11:3424: [icmp6 sum ok] ICMP6, RPL, (CLR)Destination Advertisement Object [dagid:5431::,seq:10,instance:42,Dagid,40] opt:rpltarget len:25  opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0
index bd934537dc810998a9db95441730dc4324431e90..deee0331519878d7c39b0716edad17e5cc7a26fa 100644 (file)
@@ -1 +1 @@
-IP6 (hlim 64, next-header ICMPv6 (58) payload length: 56) fe80::216:3eff:fe11:3424 > fe80::216:3eff:fe11:3424: [icmp6 sum ok] ICMP6, RPL, (CLR)Destination Advertisement Object [dagid:T10x000x000x000x000x000x000x000x000x000x000x000x000x000x00,seq:10,instance:42,Dagid,40] opt:rpltarget len:25  0x0000:  0080 2001 0db8 0001 0000 0216 3eff fe11 0x0010:  3424 0000 0000 00 opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0
+IP6 (hlim 64, next-header ICMPv6 (58) payload length: 56) fe80::216:3eff:fe11:3424 > fe80::216:3eff:fe11:3424: [icmp6 sum ok] ICMP6, RPL, (CLR)Destination Advertisement Object [dagid:5431::,seq:10,instance:42,Dagid,40] opt:rpltarget len:25  0x0000:  0080 2001 0db8 0001 0000 0216 3eff fe11 0x0010:  3424 0000 0000 00 opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0 opt:pad0
index 6d11c81c9904d8a50771b200ce0c9536f052ece0..1b642bb723d87413f77f0be84f8355c5480dfede 100644 (file)
@@ -1 +1 @@
-IP6 (hlim 64, next-header ICMPv6 (58) payload length: 24) fe80::216:3eff:fe11:3424 > ff02::1: [icmp6 sum ok] ICMP6, RPL, (CLR)Destination Advertisement Object Ack [dagid:thisismydicedag2,seq:11,instance:43,status:0]
+IP6 (hlim 64, next-header ICMPv6 (58) payload length: 24) fe80::216:3eff:fe11:3424 > ff02::1: [icmp6 sum ok] ICMP6, RPL, (CLR)Destination Advertisement Object Ack [dagid:7468:6973:6973:6d79:6469:6365:6461:6732,seq:11,instance:43,status:0]