Home | History | Annotate | Download | only in tcpdump

Lines Matching defs:ap

85 aodv_rreq(const union aodv *ap, const u_char *dat, u_int length)
94 if (i < sizeof(ap->rreq)) {
98 i -= sizeof(ap->rreq);
101 ap->rreq.rreq_type & RREQ_JOIN ? "[J]" : "",
102 ap->rreq.rreq_type & RREQ_REPAIR ? "[R]" : "",
103 ap->rreq.rreq_type & RREQ_GRAT ? "[G]" : "",
104 ap->rreq.rreq_type & RREQ_DEST ? "[D]" : "",
105 ap->rreq.rreq_type & RREQ_UNKNOWN ? "[U] " : " ",
106 ap->rreq.rreq_hops,
107 (unsigned long)EXTRACT_32BITS(&ap->rreq.rreq_id),
108 ipaddr_string(&ap->rreq.rreq_da),
109 (unsigned long)EXTRACT_32BITS(&ap->rreq.rreq_ds),
110 ipaddr_string(&ap->rreq.rreq_oa),
111 (unsigned long)EXTRACT_32BITS(&ap->rreq.rreq_os));
113 aodv_extension((void *)(&ap->rreq + 1), i);
117 aodv_rrep(const union aodv *ap, const u_char *dat, u_int length)
126 if (i < sizeof(ap->rrep)) {
130 i -= sizeof(ap->rrep);
133 ap->rrep.rrep_type & RREP_REPAIR ? "[R]" : "",
134 ap->rrep.rrep_type & RREP_ACK ? "[A] " : " ",
135 ap->rrep.rrep_ps & RREP_PREFIX_MASK,
136 ap->rrep.rrep_hops,
137 ipaddr_string(&ap->rrep.rrep_da),
138 (unsigned long)EXTRACT_32BITS(&ap->rrep.rrep_ds),
139 ipaddr_string(&ap->rrep.rrep_oa),
140 (unsigned long)EXTRACT_32BITS(&ap->rrep.rrep_life));
142 aodv_extension((void *)(&ap->rrep + 1), i);
146 aodv_rerr(const union aodv *ap, const u_char *dat, u_int length)
162 dp = &ap->rerr.r.dest[0];
163 n = ap->rerr.rerr_dc * sizeof(ap->rerr.r.dest[0]);
165 ap->rerr.rerr_flags & RERR_NODELETE ? "[D]" : "",
166 ap->rerr.rerr_dc, length);
167 trunc = n - (i/sizeof(ap->rerr.r.dest[0]));
168 for (; i >= sizeof(ap->rerr.r.dest[0]);
169 ++dp, i -= sizeof(ap->rerr.r.dest[0])) {
179 aodv_v6_rreq(const union aodv *ap, const u_char *dat, u_int length)
181 aodv_v6_rreq(const union aodv *ap _U_, const u_char *dat _U_, u_int length)
192 if (i < sizeof(ap->rreq6)) {
196 i -= sizeof(ap->rreq6);
199 ap->rreq6.rreq_type & RREQ_JOIN ? "[J]" : "",
200 ap->rreq6.rreq_type & RREQ_REPAIR ? "[R]" : "",
201 ap->rreq6.rreq_type & RREQ_GRAT ? "[G]" : "",
202 ap->rreq6.rreq_type & RREQ_DEST ? "[D]" : "",
203 ap->rreq6.rreq_type & RREQ_UNKNOWN ? "[U] " : " ",
204 ap->rreq6.rreq_hops,
205 (unsigned long)EXTRACT_32BITS(&ap->rreq6.rreq_id),
206 ip6addr_string(&ap->rreq6.rreq_da),
207 (unsigned long)EXTRACT_32BITS(&ap->rreq6.rreq_ds),
208 ip6addr_string(&ap->rreq6.rreq_oa),
209 (unsigned long)EXTRACT_32BITS(&ap->rreq6.rreq_os));
211 aodv_extension((void *)(&ap->rreq6 + 1), i);
219 aodv_v6_rrep(const union aodv *ap, const u_char *dat, u_int length)
221 aodv_v6_rrep(const union aodv *ap _U_, const u_char *dat _U_, u_int length)
232 if (i < sizeof(ap->rrep6)) {
236 i -= sizeof(ap->rrep6);
239 ap->rrep6.rrep_type & RREP_REPAIR ? "[R]" : "",
240 ap->rrep6.rrep_type & RREP_ACK ? "[A] " : " ",
241 ap->rrep6.rrep_ps & RREP_PREFIX_MASK,
242 ap->rrep6.rrep_hops,
243 ip6addr_string(&ap->rrep6.rrep_da),
244 (unsigned long)EXTRACT_32BITS(&ap->rrep6.rrep_ds),
245 ip6addr_string(&ap->rrep6.rrep_oa),
246 (unsigned long)EXTRACT_32BITS(&ap->rrep6.rrep_life));
248 aodv_extension((void *)(&ap->rrep6 + 1), i);
256 aodv_v6_rerr(const union aodv *ap, u_int length)
258 aodv_v6_rerr(const union aodv *ap _U_, u_int length)
266 j = sizeof(ap->rerr.r.dest6[0]);
267 dp6 = &ap->rerr.r.dest6[0];
268 n = ap->rerr.rerr_dc * j;
270 ap->rerr.rerr_flags & RERR_NODELETE ? "[D]" : "",
271 ap->rerr.rerr_dc, length);
286 aodv_v6_draft_01_rreq(const union aodv *ap, const u_char *dat, u_int length)
288 aodv_v6_draft_01_rreq(const union aodv *ap _U_, const u_char *dat _U_,
300 if (i < sizeof(ap->rreq6_draft_01)) {
304 i -= sizeof(ap->rreq6_draft_01);
307 ap->rreq6_draft_01.rreq_type & RREQ_JOIN ? "[J]" : "",
308 ap->rreq6_draft_01.rreq_type & RREQ_REPAIR ? "[R]" : "",
309 ap->rreq6_draft_01.rreq_type & RREQ_GRAT ? "[G]" : "",
310 ap->rreq6_draft_01.rreq_type & RREQ_DEST ? "[D]" : "",
311 ap->rreq6_draft_01.rreq_type & RREQ_UNKNOWN ? "[U] " : " ",
312 ap->rreq6_draft_01.rreq_hops,
313 (unsigned long)EXTRACT_32BITS(&ap->rreq6_draft_01.rreq_id),
314 ip6addr_string(&ap->rreq6_draft_01.rreq_da),
315 (unsigned long)EXTRACT_32BITS(&ap->rreq6_draft_01.rreq_ds),
316 ip6addr_string(&ap->rreq6_draft_01.rreq_oa),
317 (unsigned long)EXTRACT_32BITS(&ap->rreq6_draft_01.rreq_os));
319 aodv_extension((void *)(&ap->rreq6_draft_01 + 1), i);
327 aodv_v6_draft_01_rrep(const union aodv *ap, const u_char *dat, u_int length)
329 aodv_v6_draft_01_rrep(const union aodv *ap _U_, const u_char *dat _U_,
341 if (i < sizeof(ap->rrep6_draft_01)) {
345 i -= sizeof(ap->rrep6_draft_01);
348 ap->rrep6_draft_01.rrep_type & RREP_REPAIR ? "[R]" : "",
349 ap->rrep6_draft_01.rrep_type & RREP_ACK ? "[A] " : " ",
350 ap->rrep6_draft_01.rrep_ps & RREP_PREFIX_MASK,
351 ap->rrep6_draft_01.rrep_hops,
352 ip6addr_string(&ap->rrep6_draft_01.rrep_da),
353 (unsigned long)EXTRACT_32BITS(&ap->rrep6_draft_01.rrep_ds),
354 ip6addr_string(&ap->rrep6_draft_01.rrep_oa),
355 (unsigned long)EXTRACT_32BITS(&ap->rrep6_draft_01.rrep_life));
357 aodv_extension((void *)(&ap->rrep6_draft_01 + 1), i);
365 aodv_v6_draft_01_rerr(const union aodv *ap, u_int length)
367 aodv_v6_draft_01_rerr(const union aodv *ap _U_, u_int length)
375 j = sizeof(ap->rerr.r.dest6_draft_01[0]);
376 dp6 = &ap->rerr.r.dest6_draft_01[0];
377 n = ap->rerr.rerr_dc * j;
379 ap->rerr.rerr_flags & RERR_NODELETE ? "[D]" : "",
380 ap->rerr.rerr_dc, length);
396 const union aodv *ap;
398 ap = (union aodv *)dat;
403 if (min(length, (u_int)(snapend - dat)) < sizeof(ap->rrep_ack)) {
409 switch (ap->rerr.rerr_type) {
413 aodv_v6_rreq(ap, dat, length);
415 aodv_rreq(ap, dat, length);
420 aodv_v6_rrep(ap, dat, length);
422 aodv_rrep(ap, dat, length);
427 aodv_v6_rerr(ap, length);
429 aodv_rerr(ap, dat, length);
437 aodv_v6_draft_01_rreq(ap, dat, length);
441 aodv_v6_draft_01_rrep(ap, dat, length);
445 aodv_v6_draft_01_rerr(ap, length);
453 printf(" %u %u", ap->rreq.rreq_type, length);