]> The Tcpdump Group git mirrors - tcpdump/blob - print-aodv.c
9b3523a532b971783522070bff39c14b390336ea
[tcpdump] / print-aodv.c
1 /*
2 * Copyright (c) 2003 Bruce M. Simpson <bms@spc.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by Bruce M. Simpson.
16 * 4. Neither the name of Bruce M. Simpson nor the names of co-
17 * contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY Bruce M. Simpson AND CONTRIBUTORS
21 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Bruce M. Simpson OR CONTRIBUTORS
24 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 * POSSIBILITY OF SUCH DAMAGE.
31 */
32
33 #define NETDISSECT_REWORKED
34 #ifdef HAVE_CONFIG_H
35 #include "config.h"
36 #endif
37
38 #include <tcpdump-stdinc.h>
39
40 #include "interface.h"
41 #include "addrtoname.h"
42 #include "extract.h" /* must come after interface.h */
43
44
45 struct aodv_rreq {
46 uint8_t rreq_type; /* AODV message type (1) */
47 uint8_t rreq_flags; /* various flags */
48 uint8_t rreq_zero0; /* reserved, set to zero */
49 uint8_t rreq_hops; /* number of hops from originator */
50 uint32_t rreq_id; /* request ID */
51 uint32_t rreq_da; /* destination IPv4 address */
52 uint32_t rreq_ds; /* destination sequence number */
53 uint32_t rreq_oa; /* originator IPv4 address */
54 uint32_t rreq_os; /* originator sequence number */
55 };
56 #ifdef INET6
57 struct aodv_rreq6 {
58 uint8_t rreq_type; /* AODV message type (1) */
59 uint8_t rreq_flags; /* various flags */
60 uint8_t rreq_zero0; /* reserved, set to zero */
61 uint8_t rreq_hops; /* number of hops from originator */
62 uint32_t rreq_id; /* request ID */
63 struct in6_addr rreq_da; /* destination IPv6 address */
64 uint32_t rreq_ds; /* destination sequence number */
65 struct in6_addr rreq_oa; /* originator IPv6 address */
66 uint32_t rreq_os; /* originator sequence number */
67 };
68 struct aodv_rreq6_draft_01 {
69 uint8_t rreq_type; /* AODV message type (16) */
70 uint8_t rreq_flags; /* various flags */
71 uint8_t rreq_zero0; /* reserved, set to zero */
72 uint8_t rreq_hops; /* number of hops from originator */
73 uint32_t rreq_id; /* request ID */
74 uint32_t rreq_ds; /* destination sequence number */
75 uint32_t rreq_os; /* originator sequence number */
76 struct in6_addr rreq_da; /* destination IPv6 address */
77 struct in6_addr rreq_oa; /* originator IPv6 address */
78 };
79 #endif
80
81 #define RREQ_JOIN 0x80 /* join (reserved for multicast */
82 #define RREQ_REPAIR 0x40 /* repair (reserved for multicast */
83 #define RREQ_GRAT 0x20 /* gratuitous RREP */
84 #define RREQ_DEST 0x10 /* destination only */
85 #define RREQ_UNKNOWN 0x08 /* unknown destination sequence num */
86 #define RREQ_FLAGS_MASK 0xF8 /* mask for rreq_flags */
87
88 struct aodv_rrep {
89 uint8_t rrep_type; /* AODV message type (2) */
90 uint8_t rrep_flags; /* various flags */
91 uint8_t rrep_ps; /* prefix size */
92 uint8_t rrep_hops; /* number of hops from o to d */
93 uint32_t rrep_da; /* destination IPv4 address */
94 uint32_t rrep_ds; /* destination sequence number */
95 uint32_t rrep_oa; /* originator IPv4 address */
96 uint32_t rrep_life; /* lifetime of this route */
97 };
98 #ifdef INET6
99 struct aodv_rrep6 {
100 uint8_t rrep_type; /* AODV message type (2) */
101 uint8_t rrep_flags; /* various flags */
102 uint8_t rrep_ps; /* prefix size */
103 uint8_t rrep_hops; /* number of hops from o to d */
104 struct in6_addr rrep_da; /* destination IPv6 address */
105 uint32_t rrep_ds; /* destination sequence number */
106 struct in6_addr rrep_oa; /* originator IPv6 address */
107 uint32_t rrep_life; /* lifetime of this route */
108 };
109 struct aodv_rrep6_draft_01 {
110 uint8_t rrep_type; /* AODV message type (17) */
111 uint8_t rrep_flags; /* various flags */
112 uint8_t rrep_ps; /* prefix size */
113 uint8_t rrep_hops; /* number of hops from o to d */
114 uint32_t rrep_ds; /* destination sequence number */
115 struct in6_addr rrep_da; /* destination IPv6 address */
116 struct in6_addr rrep_oa; /* originator IPv6 address */
117 uint32_t rrep_life; /* lifetime of this route */
118 };
119 #endif
120
121 #define RREP_REPAIR 0x80 /* repair (reserved for multicast */
122 #define RREP_ACK 0x40 /* acknowledgement required */
123 #define RREP_FLAGS_MASK 0xC0 /* mask for rrep_flags */
124 #define RREP_PREFIX_MASK 0x1F /* mask for prefix size */
125
126 struct rerr_unreach {
127 uint32_t u_da; /* IPv4 address */
128 uint32_t u_ds; /* sequence number */
129 };
130 #ifdef INET6
131 struct rerr_unreach6 {
132 struct in6_addr u_da; /* IPv6 address */
133 uint32_t u_ds; /* sequence number */
134 };
135 struct rerr_unreach6_draft_01 {
136 struct in6_addr u_da; /* IPv6 address */
137 uint32_t u_ds; /* sequence number */
138 };
139 #endif
140
141 struct aodv_rerr {
142 uint8_t rerr_type; /* AODV message type (3 or 18) */
143 uint8_t rerr_flags; /* various flags */
144 uint8_t rerr_zero0; /* reserved, set to zero */
145 uint8_t rerr_dc; /* destination count */
146 };
147
148 #define RERR_NODELETE 0x80 /* don't delete the link */
149 #define RERR_FLAGS_MASK 0x80 /* mask for rerr_flags */
150
151 struct aodv_rrep_ack {
152 uint8_t ra_type;
153 uint8_t ra_zero0;
154 };
155
156 #define AODV_RREQ 1 /* route request */
157 #define AODV_RREP 2 /* route response */
158 #define AODV_RERR 3 /* error report */
159 #define AODV_RREP_ACK 4 /* route response acknowledgement */
160
161 #define AODV_V6_DRAFT_01_RREQ 16 /* IPv6 route request */
162 #define AODV_V6_DRAFT_01_RREP 17 /* IPv6 route response */
163 #define AODV_V6_DRAFT_01_RERR 18 /* IPv6 error report */
164 #define AODV_V6_DRAFT_01_RREP_ACK 19 /* IPV6 route response acknowledgment */
165
166 struct aodv_ext {
167 uint8_t type; /* extension type */
168 uint8_t length; /* extension length */
169 };
170
171 struct aodv_hello {
172 struct aodv_ext eh; /* extension header */
173 uint8_t interval[4]; /* expect my next hello in
174 * (n) ms
175 * NOTE: this is not aligned */
176 };
177
178 #define AODV_EXT_HELLO 1
179
180 static void
181 aodv_extension(netdissect_options *ndo,
182 const struct aodv_ext *ep, u_int length)
183 {
184 const struct aodv_hello *ah;
185
186 switch (ep->type) {
187 case AODV_EXT_HELLO:
188 ah = (const struct aodv_hello *)(const void *)ep;
189 ND_TCHECK(*ah);
190 if (length < sizeof(struct aodv_hello))
191 goto trunc;
192 ND_PRINT((ndo, "\n\text HELLO %ld ms",
193 (unsigned long)EXTRACT_32BITS(&ah->interval)));
194 break;
195
196 default:
197 ND_PRINT((ndo, "\n\text %u %u", ep->type, ep->length));
198 break;
199 }
200 return;
201
202 trunc:
203 ND_PRINT((ndo, " [|hello]"));
204 }
205
206 static void
207 aodv_rreq(netdissect_options *ndo, const u_char *dat, u_int length)
208 {
209 u_int i;
210 const struct aodv_rreq *ap = (const struct aodv_rreq *)dat;
211
212 ND_TCHECK(*ap);
213 if (length < sizeof(*ap))
214 goto trunc;
215 ND_PRINT((ndo, " rreq %u %s%s%s%s%shops %u id 0x%08lx\n"
216 "\tdst %s seq %lu src %s seq %lu", length,
217 ap->rreq_type & RREQ_JOIN ? "[J]" : "",
218 ap->rreq_type & RREQ_REPAIR ? "[R]" : "",
219 ap->rreq_type & RREQ_GRAT ? "[G]" : "",
220 ap->rreq_type & RREQ_DEST ? "[D]" : "",
221 ap->rreq_type & RREQ_UNKNOWN ? "[U] " : " ",
222 ap->rreq_hops,
223 (unsigned long)EXTRACT_32BITS(&ap->rreq_id),
224 ipaddr_string(ndo, &ap->rreq_da),
225 (unsigned long)EXTRACT_32BITS(&ap->rreq_ds),
226 ipaddr_string(ndo, &ap->rreq_oa),
227 (unsigned long)EXTRACT_32BITS(&ap->rreq_os)));
228 i = length - sizeof(*ap);
229 if (i >= sizeof(struct aodv_ext))
230 aodv_extension(ndo, (const struct aodv_ext *)(dat + sizeof(*ap)), i);
231 return;
232
233 trunc:
234 ND_PRINT((ndo, " [|rreq"));
235 }
236
237 static void
238 aodv_rrep(netdissect_options *ndo, const u_char *dat, u_int length)
239 {
240 u_int i;
241 const struct aodv_rrep *ap = (const struct aodv_rrep *)dat;
242
243 ND_TCHECK(*ap);
244 if (length < sizeof(*ap))
245 goto trunc;
246 ND_PRINT((ndo, " rrep %u %s%sprefix %u hops %u\n"
247 "\tdst %s dseq %lu src %s %lu ms", length,
248 ap->rrep_type & RREP_REPAIR ? "[R]" : "",
249 ap->rrep_type & RREP_ACK ? "[A] " : " ",
250 ap->rrep_ps & RREP_PREFIX_MASK,
251 ap->rrep_hops,
252 ipaddr_string(ndo, &ap->rrep_da),
253 (unsigned long)EXTRACT_32BITS(&ap->rrep_ds),
254 ipaddr_string(ndo, &ap->rrep_oa),
255 (unsigned long)EXTRACT_32BITS(&ap->rrep_life)));
256 i = length - sizeof(*ap);
257 if (i >= sizeof(struct aodv_ext))
258 aodv_extension(ndo, (const struct aodv_ext *)(dat + sizeof(*ap)), i);
259 return;
260
261 trunc:
262 ND_PRINT((ndo, " [|rreq"));
263 }
264
265 static void
266 aodv_rerr(netdissect_options *ndo, const u_char *dat, u_int length)
267 {
268 u_int i, dc;
269 const struct aodv_rerr *ap = (const struct aodv_rerr *)dat;
270 const struct rerr_unreach *dp;
271
272 ND_TCHECK(*ap);
273 if (length < sizeof(*ap))
274 goto trunc;
275 ND_PRINT((ndo, " rerr %s [items %u] [%u]:",
276 ap->rerr_flags & RERR_NODELETE ? "[D]" : "",
277 ap->rerr_dc, length));
278 dp = (struct rerr_unreach *)(dat + sizeof(*ap));
279 i = length - sizeof(*ap);
280 for (dc = ap->rerr_dc; dc != 0 && i >= sizeof(*dp);
281 ++dp, --dc, i -= sizeof(*dp)) {
282 ND_TCHECK(*dp);
283 ND_PRINT((ndo, " {%s}(%ld)", ipaddr_string(ndo, &dp->u_da),
284 (unsigned long)EXTRACT_32BITS(&dp->u_ds)));
285 }
286 if ((i % sizeof(*dp)) != 0)
287 goto trunc;
288 return;
289
290 trunc:
291 ND_PRINT((ndo, "[|rerr]"));
292 }
293
294 static void
295 #ifdef INET6
296 aodv_v6_rreq(netdissect_options *ndo, const u_char *dat, u_int length)
297 #else
298 aodv_v6_rreq(netdissect_options *ndo, const u_char *dat _U_, u_int length)
299 #endif
300 {
301 #ifdef INET6
302 u_int i;
303 const struct aodv_rreq6 *ap = (const struct aodv_rreq6 *)dat;
304
305 ND_TCHECK(*ap);
306 if (length < sizeof(*ap))
307 goto trunc;
308 ND_PRINT((ndo, " v6 rreq %u %s%s%s%s%shops %u id 0x%08lx\n"
309 "\tdst %s seq %lu src %s seq %lu", length,
310 ap->rreq_type & RREQ_JOIN ? "[J]" : "",
311 ap->rreq_type & RREQ_REPAIR ? "[R]" : "",
312 ap->rreq_type & RREQ_GRAT ? "[G]" : "",
313 ap->rreq_type & RREQ_DEST ? "[D]" : "",
314 ap->rreq_type & RREQ_UNKNOWN ? "[U] " : " ",
315 ap->rreq_hops,
316 (unsigned long)EXTRACT_32BITS(&ap->rreq_id),
317 ip6addr_string(ndo, &ap->rreq_da),
318 (unsigned long)EXTRACT_32BITS(&ap->rreq_ds),
319 ip6addr_string(ndo, &ap->rreq_oa),
320 (unsigned long)EXTRACT_32BITS(&ap->rreq_os)));
321 i = length - sizeof(*ap);
322 if (i >= sizeof(struct aodv_ext))
323 aodv_extension(ndo, (const struct aodv_ext *)(dat + sizeof(*ap)), i);
324 return;
325
326 trunc:
327 ND_PRINT((ndo, " [|rreq"));
328 #else
329 ND_PRINT((ndo, " v6 rreq %u", length));
330 #endif
331 }
332
333 static void
334 #ifdef INET6
335 aodv_v6_rrep(netdissect_options *ndo, const u_char *dat, u_int length)
336 #else
337 aodv_v6_rrep(netdissect_options *ndo, const u_char *dat _U_, u_int length)
338 #endif
339 {
340 #ifdef INET6
341 u_int i;
342 const struct aodv_rrep6 *ap = (const struct aodv_rrep6 *)dat;
343
344 ND_TCHECK(*ap);
345 if (length < sizeof(*ap))
346 goto trunc;
347 ND_PRINT((ndo, " rrep %u %s%sprefix %u hops %u\n"
348 "\tdst %s dseq %lu src %s %lu ms", length,
349 ap->rrep_type & RREP_REPAIR ? "[R]" : "",
350 ap->rrep_type & RREP_ACK ? "[A] " : " ",
351 ap->rrep_ps & RREP_PREFIX_MASK,
352 ap->rrep_hops,
353 ip6addr_string(ndo, &ap->rrep_da),
354 (unsigned long)EXTRACT_32BITS(&ap->rrep_ds),
355 ip6addr_string(ndo, &ap->rrep_oa),
356 (unsigned long)EXTRACT_32BITS(&ap->rrep_life)));
357 i = length - sizeof(*ap);
358 if (i >= sizeof(struct aodv_ext))
359 aodv_extension(ndo, (const struct aodv_ext *)(dat + sizeof(*ap)), i);
360 return;
361
362 trunc:
363 ND_PRINT((ndo, " [|rreq"));
364 #else
365 ND_PRINT((ndo, " rrep %u", length));
366 #endif
367 }
368
369 static void
370 #ifdef INET6
371 aodv_v6_rerr(netdissect_options *ndo, const u_char *dat, u_int length)
372 #else
373 aodv_v6_rerr(netdissect_options *ndo, const u_char *dat _U_, u_int length)
374 #endif
375 {
376 #ifdef INET6
377 u_int i, dc;
378 const struct aodv_rerr *ap = (const struct aodv_rerr *)dat;
379 const struct rerr_unreach6 *dp6;
380
381 ND_TCHECK(*ap);
382 if (length < sizeof(*ap))
383 goto trunc;
384 ND_PRINT((ndo, " rerr %s [items %u] [%u]:",
385 ap->rerr_flags & RERR_NODELETE ? "[D]" : "",
386 ap->rerr_dc, length));
387 dp6 = (struct rerr_unreach6 *)(void *)(ap + 1);
388 i = length - sizeof(*ap);
389 for (dc = ap->rerr_dc; dc != 0 && i >= sizeof(*dp6);
390 ++dp6, --dc, i -= sizeof(*dp6)) {
391 ND_TCHECK(*dp6);
392 ND_PRINT((ndo, " {%s}(%ld)", ip6addr_string(ndo, &dp6->u_da),
393 (unsigned long)EXTRACT_32BITS(&dp6->u_ds)));
394 }
395 if ((i % sizeof(*dp6)) != 0)
396 goto trunc;
397 return;
398
399 trunc:
400 ND_PRINT((ndo, "[|rerr]"));
401 #else
402 ND_PRINT((ndo, " rerr %u", length));
403 #endif
404 }
405
406 static void
407 #ifdef INET6
408 aodv_v6_draft_01_rreq(netdissect_options *ndo, const u_char *dat, u_int length)
409 #else
410 aodv_v6_draft_01_rreq(netdissect_options *ndo, const u_char *dat _U_, u_int length)
411 #endif
412 {
413 #ifdef INET6
414 u_int i;
415 const struct aodv_rreq6_draft_01 *ap = (const struct aodv_rreq6_draft_01 *)dat;
416
417 ND_TCHECK(*ap);
418 if (length < sizeof(*ap))
419 goto trunc;
420 ND_PRINT((ndo, " rreq %u %s%s%s%s%shops %u id 0x%08lx\n"
421 "\tdst %s seq %lu src %s seq %lu", length,
422 ap->rreq_type & RREQ_JOIN ? "[J]" : "",
423 ap->rreq_type & RREQ_REPAIR ? "[R]" : "",
424 ap->rreq_type & RREQ_GRAT ? "[G]" : "",
425 ap->rreq_type & RREQ_DEST ? "[D]" : "",
426 ap->rreq_type & RREQ_UNKNOWN ? "[U] " : " ",
427 ap->rreq_hops,
428 (unsigned long)EXTRACT_32BITS(&ap->rreq_id),
429 ip6addr_string(ndo, &ap->rreq_da),
430 (unsigned long)EXTRACT_32BITS(&ap->rreq_ds),
431 ip6addr_string(ndo, &ap->rreq_oa),
432 (unsigned long)EXTRACT_32BITS(&ap->rreq_os)));
433 i = length - sizeof(*ap);
434 if (i >= sizeof(struct aodv_ext))
435 aodv_extension(ndo, (const struct aodv_ext *)(dat + sizeof(*ap)), i);
436 return;
437
438 trunc:
439 ND_PRINT((ndo, " [|rreq"));
440 #else
441 ND_PRINT((ndo, " rreq %u", length));
442 #endif
443 }
444
445 static void
446 #ifdef INET6
447 aodv_v6_draft_01_rrep(netdissect_options *ndo, const u_char *dat, u_int length)
448 #else
449 aodv_v6_draft_01_rrep(netdissect_options *ndo, const u_char *dat _U_, u_int length)
450 #endif
451 {
452 #ifdef INET6
453 u_int i;
454 const struct aodv_rrep6_draft_01 *ap = (const struct aodv_rrep6_draft_01 *)dat;
455
456 ND_TCHECK(*ap);
457 if (length < sizeof(*ap))
458 goto trunc;
459 ND_PRINT((ndo, " rrep %u %s%sprefix %u hops %u\n"
460 "\tdst %s dseq %lu src %s %lu ms", length,
461 ap->rrep_type & RREP_REPAIR ? "[R]" : "",
462 ap->rrep_type & RREP_ACK ? "[A] " : " ",
463 ap->rrep_ps & RREP_PREFIX_MASK,
464 ap->rrep_hops,
465 ip6addr_string(ndo, &ap->rrep_da),
466 (unsigned long)EXTRACT_32BITS(&ap->rrep_ds),
467 ip6addr_string(ndo, &ap->rrep_oa),
468 (unsigned long)EXTRACT_32BITS(&ap->rrep_life)));
469 i = length - sizeof(*ap);
470 if (i >= sizeof(struct aodv_ext))
471 aodv_extension(ndo, (const struct aodv_ext *)(dat + sizeof(*ap)), i);
472 return;
473
474 trunc:
475 ND_PRINT((ndo, " [|rreq"));
476 #else
477 ND_PRINT((ndo, " rrep %u", length));
478 #endif
479 }
480
481 static void
482 #ifdef INET6
483 aodv_v6_draft_01_rerr(netdissect_options *ndo, const u_char *dat, u_int length)
484 #else
485 aodv_v6_draft_01_rerr(netdissect_options *ndo, const u_char *dat _U_, u_int length)
486 #endif
487 {
488 #ifdef INET6
489 u_int i, dc;
490 const struct aodv_rerr *ap = (const struct aodv_rerr *)dat;
491 const struct rerr_unreach6_draft_01 *dp6;
492
493 ND_TCHECK(*ap);
494 if (length < sizeof(*ap))
495 goto trunc;
496 ND_PRINT((ndo, " rerr %s [items %u] [%u]:",
497 ap->rerr_flags & RERR_NODELETE ? "[D]" : "",
498 ap->rerr_dc, length));
499 dp6 = (struct rerr_unreach6_draft_01 *)(void *)(ap + 1);
500 i = length - sizeof(*ap);
501 for (dc = ap->rerr_dc; dc != 0 && i >= sizeof(*dp6);
502 ++dp6, --dc, i -= sizeof(*dp6)) {
503 ND_TCHECK(*dp6);
504 ND_PRINT((ndo, " {%s}(%ld)", ip6addr_string(ndo, &dp6->u_da),
505 (unsigned long)EXTRACT_32BITS(&dp6->u_ds)));
506 }
507 if ((i % sizeof(*dp6)) != 0)
508 goto trunc;
509 return;
510
511 trunc:
512 ND_PRINT((ndo, "[|rerr]"));
513 #else
514 ND_PRINT((ndo, " rerr %u", length));
515 #endif
516 }
517
518 void
519 aodv_print(netdissect_options *ndo,
520 const u_char *dat, u_int length, int is_ip6)
521 {
522 uint8_t msg_type;
523
524 /*
525 * The message type is the first byte; make sure we have it
526 * and then fetch it.
527 */
528 ND_TCHECK(*dat);
529 msg_type = *dat;
530 ND_PRINT((ndo, " aodv"));
531
532 switch (msg_type) {
533
534 case AODV_RREQ:
535 if (is_ip6)
536 aodv_v6_rreq(ndo, dat, length);
537 else
538 aodv_rreq(ndo, dat, length);
539 break;
540
541 case AODV_RREP:
542 if (is_ip6)
543 aodv_v6_rrep(ndo, dat, length);
544 else
545 aodv_rrep(ndo, dat, length);
546 break;
547
548 case AODV_RERR:
549 if (is_ip6)
550 aodv_v6_rerr(ndo, dat, length);
551 else
552 aodv_rerr(ndo, dat, length);
553 break;
554
555 case AODV_RREP_ACK:
556 ND_PRINT((ndo, " rrep-ack %u", length));
557 break;
558
559 case AODV_V6_DRAFT_01_RREQ:
560 aodv_v6_draft_01_rreq(ndo, dat, length);
561 break;
562
563 case AODV_V6_DRAFT_01_RREP:
564 aodv_v6_draft_01_rrep(ndo, dat, length);
565 break;
566
567 case AODV_V6_DRAFT_01_RERR:
568 aodv_v6_draft_01_rerr(ndo, dat, length);
569 break;
570
571 case AODV_V6_DRAFT_01_RREP_ACK:
572 ND_PRINT((ndo, " rrep-ack %u", length));
573 break;
574
575 default:
576 ND_PRINT((ndo, " type %u %u", msg_type, length));
577 }
578 return;
579
580 trunc:
581 ND_PRINT((ndo, " [|aodv]"));
582 }