const u_char *bp, u_int length)
{
struct nd_rpl_dao *dao = (struct nd_rpl_dao *)bp;
+ u_char *dao_end = (u_char *)&dao[1];
char dagid_str[65];
ND_TCHECK(*dao);
if(RPL_DAO_D(dao->rpl_flags)) {
ND_TTEST2(dao->rpl_dagid, 16);
rpl_format_dagid(dagid_str, dao->rpl_dagid);
+ dao_end += DAGID_LEN;
}
ND_PRINT((ndo, " [dagid:%s,seq:%u,instance:%u]",
dao->rpl_daoseq,
dao->rpl_instanceid));
- /* need to print the DAO TARGET options */
+ if(ndo->ndo_vflag > 1) {
+ struct rpl_dio_genoption *opt = (struct rpl_dio_genoption *)dao_end;
+ rpl_dio_printopt(ndo, opt, length);
+ }
return;
trunc:
const u_char *bp, u_int length)
{
struct nd_rpl_daoack *daoack = (struct nd_rpl_daoack *)bp;
+ u_char *daoack_end = (u_char *)&daoack[1];
char dagid_str[65];
ND_TCHECK(*daoack);
if(RPL_DAOACK_D(daoack->rpl_flags)) {
ND_TTEST2(daoack->rpl_dagid, 16);
rpl_format_dagid(dagid_str, daoack->rpl_dagid);
+ daoack_end += DAGID_LEN;
}
ND_PRINT((ndo, " [dagid:%s,seq:%u,instance:%u,status:%u]",
daoack->rpl_daoseq,
daoack->rpl_instanceid,
daoack->rpl_status));
+
+ /* no officially defined options for DAOACK, but print anyway, we find*/
+ if(ndo->ndo_vflag > 1) {
+ struct rpl_dio_genoption *opt = (struct rpl_dio_genoption *)daoack_end;
+ rpl_dio_printopt(ndo, opt, length);
+ }
return;
trunc:
IP6 (hlim 64, next-header ICMPv6 (58) payload length: 48) fe80::216:3eff:fe11:3424 > ff02::1: [icmp6 sum ok] ICMP6, RPL, (CLR)DODAG Information Object [dagid:T10x0,seq:10,instance:42,rank:768,grounded,mop:storing,prf:0] opt:destprefix len:15 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:T10x0,seq:10,instance:42]
+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:T10x0,seq:10,instance:42] 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: 48) fe80::216:3eff:fe11:3424 > ff02::1: [icmp6 sum ok] ICMP6, RPL, (CLR)DODAG Information Object [dagid:T10x0,seq:10,instance:42,rank:768,grounded,mop:storing,prf:0] opt:destprefix len:15 0x0000: 3000 0000 0000 2001 0db8 0001 00 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:T10x0,seq:10,instance:42]
+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:T10x0,seq:10,instance:42] 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