Changeset View
Changeset View
Standalone View
Standalone View
head/contrib/tcpdump/print-icmp6.c
Show First 20 Lines • Show All 654 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
char *d = dagid_str; | char *d = dagid_str; | ||||
int i; | int i; | ||||
for(i=0;i<16;i++) { | for(i=0;i<16;i++) { | ||||
if(isprint(dagid[i])) { | if(isprint(dagid[i])) { | ||||
*d++ = dagid[i]; | *d++ = dagid[i]; | ||||
} else { | } else { | ||||
snprintf(d,4,"0x%02x", dagid[i]); | snprintf(d,5,"0x%02x", dagid[i]); /* 4 + null char */ | ||||
d += 4; | d += 4; | ||||
} | } | ||||
} | } | ||||
*d++ = '\0'; | *d++ = '\0'; | ||||
} | } | ||||
static void | static void | ||||
rpl_dio_printopt(netdissect_options *ndo, | rpl_dio_printopt(netdissect_options *ndo, | ||||
▲ Show 20 Lines • Show All 1,303 Lines • Show Last 20 Lines |