]> The Tcpdump Group git mirrors - tcpdump/blob - print-aodv.c
Printers must include 'netdissect.h', not 'interface.h'
[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 #ifdef HAVE_CONFIG_H
34 #include "config.h"
35 #endif
36
37 #include <tcpdump-stdinc.h>
38
39 #include "netdissect.h"
40 #include "addrtoname.h"
41 #include "extract.h" /* must come after interface.h */
42
43
44 struct aodv_rreq {
45 uint8_t rreq_type; /* AODV message type (1) */
46 uint8_t rreq_flags; /* various flags */
47 uint8_t rreq_zero0; /* reserved, set to zero */
48 uint8_t rreq_hops; /* number of hops from originator */
49 uint32_t rreq_id; /* request ID */
50 uint32_t rreq_da; /* destination IPv4 address */
51 uint32_t rreq_ds; /* destination sequence number */
52 uint32_t rreq_oa; /* originator IPv4 address */
53 uint32_t rreq_os; /* originator sequence number */
54 };
55 #ifdef INET6
56 struct aodv_rreq6 {
57 uint8_t rreq_type; /* AODV message type (1) */
58 uint8_t rreq_flags; /* various flags */
59 uint8_t rreq_zero0; /* reserved, set to zero */
60 uint8_t rreq_hops; /* number of hops from originator */
61 uint32_t rreq_id; /* request ID */
62 struct in6_addr rreq_da; /* destination IPv6 address */
63 uint32_t rreq_ds; /* destination sequence number */
64 struct in6_addr rreq_oa; /* originator IPv6 address */
65 uint32_t rreq_os; /* originator sequence number */
66 };
67 struct aodv_rreq6_draft_01 {
68 uint8_t rreq_type; /* AODV message type (16) */
69 uint8_t rreq_flags; /* various flags */
70 uint8_t rreq_zero0; /* reserved, set to zero */
71 uint8_t rreq_hops; /* number of hops from originator */
72 uint32_t rreq_id; /* request ID */
73 uint32_t rreq_ds; /* destination sequence number */
74 uint32_t rreq_os; /* originator sequence number */
75 struct in6_addr rreq_da; /* destination IPv6 address */
76 struct in6_addr rreq_oa; /* originator IPv6 address */
77 };
78 #endif
79
80 #define RREQ_JOIN 0x80 /* join (reserved for multicast */
81 #define RREQ_REPAIR 0x40 /* repair (reserved for multicast */
82 #define RREQ_GRAT 0x20 /* gratuitous RREP */
83 #define RREQ_DEST 0x10 /* destination only */
84 #define RREQ_UNKNOWN 0x08 /* unknown destination sequence num */
85 #define RREQ_FLAGS_MASK 0xF8 /* mask for rreq_flags */
86
87 struct aodv_rrep {
88 uint8_t rrep_type; /* AODV message type (2) */
89 uint8_t rrep_flags; /* various flags */
90 uint8_t rrep_ps; /* prefix size */
91 uint8_t rrep_hops; /* number of hops from o to d */
92 uint32_t rrep_da; /* destination IPv4 address */
93 uint32_t rrep_ds; /* destination sequence number */
94 uint32_t rrep_oa; /* originator IPv4 address */
95 uint32_t rrep_life; /* lifetime of this route */
96 };
97 #ifdef INET6
98 struct aodv_rrep6 {
99 uint8_t rrep_type; /* AODV message type (2) */
100 uint8_t rrep_flags; /* various flags */
101 uint8_t rrep_ps; /* prefix size */
102 uint8_t rrep_hops; /* number of hops from o to d */
103 struct in6_addr rrep_da; /* destination IPv6 address */
104 uint32_t rrep_ds; /* destination sequence number */
105 struct in6_addr rrep_oa; /* originator IPv6 address */
106 uint32_t rrep_life; /* lifetime of this route */
107 };
108 struct aodv_rrep6_draft_01 {
109 uint8_t rrep_type; /* AODV message type (17) */
110 uint8_t rrep_flags; /* various flags */
111 uint8_t rrep_ps; /* prefix size */
112 uint8_t rrep_hops; /* number of hops from o to d */
113 uint32_t rrep_ds; /* destination sequence number */
114 struct in6_addr rrep_da; /* destination IPv6 address */
115 struct in6_addr rrep_oa; /* originator IPv6 address */
116 uint32_t rrep_life; /* lifetime of this route */
117 };
118 #endif
119
120 #define RREP_REPAIR 0x80 /* repair (reserved for multicast */
121 #define RREP_ACK 0x40 /* acknowledgement required */
122 #define RREP_FLAGS_MASK 0xC0 /* mask for rrep_flags */
123 #define RREP_PREFIX_MASK 0x1F /* mask for prefix size */
124
125 struct rerr_unreach {
126 uint32_t u_da; /* IPv4 address */
127 uint32_t u_ds; /* sequence number */
128 };
129 #ifdef INET6
130 struct rerr_unreach6 {
131 struct in6_addr u_da; /* IPv6 address */
132 uint32_t u_ds; /* sequence number */
133 };
134 struct rerr_unreach6_draft_01 {
135 struct in6_addr u_da; /* IPv6 address */
136 uint32_t u_ds; /* sequence number */
137 };
138 #endif
139
140 struct aodv_rerr {
141 uint8_t rerr_type; /* AODV message type (3 or 18) */
142 uint8_t rerr_flags; /* various flags */
143 uint8_t rerr_zero0; /* reserved, set to zero */
144 uint8_t rerr_dc; /* destination count */
145 };
146
147 #define RERR_NODELETE 0x80 /* don't delete the link */
148 #define RERR_FLAGS_MASK 0x80 /* mask for rerr_flags */
149
150 struct aodv_rrep_ack {
151 uint8_t ra_type;
152 uint8_t ra_zero0;
153 };
154
155 #define AODV_RREQ 1 /* route request */
156 #define AODV_RREP 2 /* route response */
157 #define AODV_RERR 3 /* error report */
158 #define AODV_RREP_ACK 4 /* route response acknowledgement */
159
160 #define AODV_V6_DRAFT_01_RREQ 16 /* IPv6 route request */
161 #define AODV_V6_DRAFT_01_RREP 17 /* IPv6 route response */
162 #define AODV_V6_DRAFT_01_RERR 18 /* IPv6 error report */
163 #define AODV_V6_DRAFT_01_RREP_ACK 19 /* IPV6 route response acknowledgment */
164
165 struct aodv_ext {
166 uint8_t type; /* extension type */
167 uint8_t length; /* extension length */
168 };
169
170 struct aodv_hello {
171 struct aodv_ext eh; /* extension header */
172 uint8_t interval[4]; /* expect my next hello in
173 * (n) ms
174 * NOTE: this is not aligned */
175 };
176
177 #define AODV_EXT_HELLO 1
178
179 static void
180 aodv_extension(netdissect_options *ndo,
181 const struct aodv_ext *ep, u_int length)
182 {
183 const struct aodv_hello *ah;
184
185 switch (ep->type) {
186 case AODV_EXT_HELLO:
187 ah = (const struct aodv_hello *)(const void *)ep;
188 ND_TCHECK(*ah);
189 if (length < sizeof(struct aodv_hello))
190 goto trunc;
191 ND_PRINT((ndo, "\n\text HELLO %ld ms",
192 (unsigned long)EXTRACT_32BITS(&ah->interval)));
193 break;
194
195 default:
196 ND_PRINT((ndo, "\n\text %u %u", ep->type, ep->length));
197 break;
198 }
199 return;
200
201 trunc:
202 ND_PRINT((ndo, " [|hello]"));
203 }
204
205 static void
206 aodv_rreq(netdissect_options *ndo, const u_char *dat, u_int length)
207 {
208 u_int i;
209 const struct aodv_rreq *ap = (const struct aodv_rreq *)dat;
210
211 ND_TCHECK(*ap);
212 if (length < sizeof(*ap))
213 goto trunc;
214 ND_PRINT((ndo, " rreq %u %s%s%s%s%shops %u id 0x%08lx\n"
215 "\tdst %s seq %lu src %s seq %lu", length,
216 ap->rreq_type & RREQ_JOIN ? "[J]" : "",
217 ap->rreq_type & RREQ_REPAIR ? "[R]" : "",
218 ap->rreq_type & RREQ_GRAT ? "[G]" : "",
219 ap->rreq_type & RREQ_DEST ? "[D]" : "",
220 ap->rreq_type & RREQ_UNKNOWN ? "[U] " : " ",
221 ap->rreq_hops,
222 (unsigned long)EXTRACT_32BITS(&ap->rreq_id),
223 ipaddr_string(ndo, &ap->rreq_da),
224 (unsigned long)EXTRACT_32BITS(&ap->rreq_ds),
225 ipaddr_string(ndo, &ap->rreq_oa),
226 (unsigned long)EXTRACT_32BITS(&ap->rreq_os)));
227 i = length - sizeof(*ap);
228 if (i >= sizeof(struct aodv_ext))
229 aodv_extension(ndo, (const struct aodv_ext *)(dat + sizeof(*ap)), i);
230 return;
231
232 trunc:
233 ND_PRINT((ndo, " [|rreq"));
234 }
235
236 static void
237 aodv_rrep(netdissect_options *ndo, const u_char *dat, u_int length)
238 {
239 u_int i;
240 const struct aodv_rrep *ap = (const struct aodv_rrep *)dat;
241
242 ND_TCHECK(*ap);
243 if (length < sizeof(*ap))
244 goto trunc;
245 ND_PRINT((ndo, " rrep %u %s%sprefix %u hops %u\n"
246 "\tdst %s dseq %lu src %s %lu ms", length,
247 ap->rrep_type & RREP_REPAIR ? "[R]" : "",
248 ap->rrep_type & RREP_ACK ? "[A] " : " ",
249 ap->rrep_ps & RREP_PREFIX_MASK,
250 ap->rrep_hops,
251 ipaddr_string(ndo, &ap->rrep_da),
252 (unsigned long)EXTRACT_32BITS(&ap->rrep_ds),
253 ipaddr_string(ndo, &ap->rrep_oa),
254 (unsigned long)EXTRACT_32BITS(&ap->rrep_life)));
255 i = length - sizeof(*ap);
256 if (i >= sizeof(struct aodv_ext))
257 aodv_extension(ndo, (const struct aodv_ext *)(dat + sizeof(*ap)), i);
258 return;
259
260 trunc:
261 ND_PRINT((ndo, " [|rreq"));
262 }
263
264 static void
265 aodv_rerr(netdissect_options *ndo, const u_char *dat, u_int length)
266 {
267 u_int i, dc;
268 const struct aodv_rerr *ap = (const struct aodv_rerr *)dat;
269 const struct rerr_unreach *dp;
270
271 ND_TCHECK(*ap);
272 if (length < sizeof(*ap))
273 goto trunc;
274 ND_PRINT((ndo, " rerr %s [items %u] [%u]:",
275 ap->rerr_flags & RERR_NODELETE ? "[D]" : "",
276 ap->rerr_dc, length));
277 dp = (const struct rerr_unreach *)(dat + sizeof(*ap));
278 i = length - sizeof(*ap);
279 for (dc = ap->rerr_dc; dc != 0; dc--) {
280 ND_TCHECK(*dp);
281 if (i < sizeof(*dp))
282 goto trunc;
283 ND_PRINT((ndo, " {%s}(%ld)", ipaddr_string(ndo, &dp->u_da),
284 (unsigned long)EXTRACT_32BITS(&dp->u_ds)));
285 dp++;
286 i -= sizeof(*dp);
287 }
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 = (const struct rerr_unreach6 *)(const void *)(ap + 1);
388 i = length - sizeof(*ap);
389 for (dc = ap->rerr_dc; dc != 0; dc--) {
390 ND_TCHECK(*dp6);
391 if (i < sizeof(*dp6))
392 goto trunc;
393 ND_PRINT((ndo, " {%s}(%ld)", ip6addr_string(ndo, &dp6->u_da),
394 (unsigned long)EXTRACT_32BITS(&dp6->u_ds)));
395 dp6++;
396 i -= sizeof(*dp6);
397 }
398 return;
399
400 trunc:
401 ND_PRINT((ndo, "[|rerr]"));
402 #else
403 ND_PRINT((ndo, " rerr %u", length));
404 #endif
405 }
406
407 static void
408 #ifdef INET6
409 aodv_v6_draft_01_rreq(netdissect_options *ndo, const u_char *dat, u_int length)
410 #else
411 aodv_v6_draft_01_rreq(netdissect_options *ndo, const u_char *dat _U_, u_int length)
412 #endif
413 {
414 #ifdef INET6
415 u_int i;
416 const struct aodv_rreq6_draft_01 *ap = (const struct aodv_rreq6_draft_01 *)dat;
417
418 ND_TCHECK(*ap);
419 if (length < sizeof(*ap))
420 goto trunc;
421 ND_PRINT((ndo, " rreq %u %s%s%s%s%shops %u id 0x%08lx\n"
422 "\tdst %s seq %lu src %s seq %lu", length,
423 ap->rreq_type & RREQ_JOIN ? "[J]" : "",
424 ap->rreq_type & RREQ_REPAIR ? "[R]" : "",
425 ap->rreq_type & RREQ_GRAT ? "[G]" : "",
426 ap->rreq_type & RREQ_DEST ? "[D]" : "",
427 ap->rreq_type & RREQ_UNKNOWN ? "[U] " : " ",
428 ap->rreq_hops,
429 (unsigned long)EXTRACT_32BITS(&ap->rreq_id),
430 ip6addr_string(ndo, &ap->rreq_da),
431 (unsigned long)EXTRACT_32BITS(&ap->rreq_ds),
432 ip6addr_string(ndo, &ap->rreq_oa),
433 (unsigned long)EXTRACT_32BITS(&ap->rreq_os)));
434 i = length - sizeof(*ap);
435 if (i >= sizeof(struct aodv_ext))
436 aodv_extension(ndo, (const struct aodv_ext *)(dat + sizeof(*ap)), i);
437 return;
438
439 trunc:
440 ND_PRINT((ndo, " [|rreq"));
441 #else
442 ND_PRINT((ndo, " rreq %u", length));
443 #endif
444 }
445
446 static void
447 #ifdef INET6
448 aodv_v6_draft_01_rrep(netdissect_options *ndo, const u_char *dat, u_int length)
449 #else
450 aodv_v6_draft_01_rrep(netdissect_options *ndo, const u_char *dat _U_, u_int length)
451 #endif
452 {
453 #ifdef INET6
454 u_int i;
455 const struct aodv_rrep6_draft_01 *ap = (const struct aodv_rrep6_draft_01 *)dat;
456
457 ND_TCHECK(*ap);
458 if (length < sizeof(*ap))
459 goto trunc;
460 ND_PRINT((ndo, " rrep %u %s%sprefix %u hops %u\n"
461 "\tdst %s dseq %lu src %s %lu ms", length,
462 ap->rrep_type & RREP_REPAIR ? "[R]" : "",
463 ap->rrep_type & RREP_ACK ? "[A] " : " ",
464 ap->rrep_ps & RREP_PREFIX_MASK,
465 ap->rrep_hops,
466 ip6addr_string(ndo, &ap->rrep_da),
467 (unsigned long)EXTRACT_32BITS(&ap->rrep_ds),
468 ip6addr_string(ndo, &ap->rrep_oa),
469 (unsigned long)EXTRACT_32BITS(&ap->rrep_life)));
470 i = length - sizeof(*ap);
471 if (i >= sizeof(struct aodv_ext))
472 aodv_extension(ndo, (const struct aodv_ext *)(dat + sizeof(*ap)), i);
473 return;
474
475 trunc:
476 ND_PRINT((ndo, " [|rreq"));
477 #else
478 ND_PRINT((ndo, " rrep %u", length));
479 #endif
480 }
481
482 static void
483 #ifdef INET6
484 aodv_v6_draft_01_rerr(netdissect_options *ndo, const u_char *dat, u_int length)
485 #else
486 aodv_v6_draft_01_rerr(netdissect_options *ndo, const u_char *dat _U_, u_int length)
487 #endif
488 {
489 #ifdef INET6
490 u_int i, dc;
491 const struct aodv_rerr *ap = (const struct aodv_rerr *)dat;
492 const struct rerr_unreach6_draft_01 *dp6;
493
494 ND_TCHECK(*ap);
495 if (length < sizeof(*ap))
496 goto trunc;
497 ND_PRINT((ndo, " rerr %s [items %u] [%u]:",
498 ap->rerr_flags & RERR_NODELETE ? "[D]" : "",
499 ap->rerr_dc, length));
500 dp6 = (const struct rerr_unreach6_draft_01 *)(const void *)(ap + 1);
501 i = length - sizeof(*ap);
502 for (dc = ap->rerr_dc; dc != 0; dc--) {
503 ND_TCHECK(*dp6);
504 if (i < sizeof(*dp6))
505 goto trunc;
506 ND_PRINT((ndo, " {%s}(%ld)", ip6addr_string(ndo, &dp6->u_da),
507 (unsigned long)EXTRACT_32BITS(&dp6->u_ds)));
508 dp6++;
509 i -= sizeof(*dp6);
510 }
511 return;
512
513 trunc:
514 ND_PRINT((ndo, "[|rerr]"));
515 #else
516 ND_PRINT((ndo, " rerr %u", length));
517 #endif
518 }
519
520 void
521 aodv_print(netdissect_options *ndo,
522 const u_char *dat, u_int length, int is_ip6)
523 {
524 uint8_t msg_type;
525
526 /*
527 * The message type is the first byte; make sure we have it
528 * and then fetch it.
529 */
530 ND_TCHECK(*dat);
531 msg_type = *dat;
532 ND_PRINT((ndo, " aodv"));
533
534 switch (msg_type) {
535
536 case AODV_RREQ:
537 if (is_ip6)
538 aodv_v6_rreq(ndo, dat, length);
539 else
540 aodv_rreq(ndo, dat, length);
541 break;
542
543 case AODV_RREP:
544 if (is_ip6)
545 aodv_v6_rrep(ndo, dat, length);
546 else
547 aodv_rrep(ndo, dat, length);
548 break;
549
550 case AODV_RERR:
551 if (is_ip6)
552 aodv_v6_rerr(ndo, dat, length);
553 else
554 aodv_rerr(ndo, dat, length);
555 break;
556
557 case AODV_RREP_ACK:
558 ND_PRINT((ndo, " rrep-ack %u", length));
559 break;
560
561 case AODV_V6_DRAFT_01_RREQ:
562 aodv_v6_draft_01_rreq(ndo, dat, length);
563 break;
564
565 case AODV_V6_DRAFT_01_RREP:
566 aodv_v6_draft_01_rrep(ndo, dat, length);
567 break;
568
569 case AODV_V6_DRAFT_01_RERR:
570 aodv_v6_draft_01_rerr(ndo, dat, length);
571 break;
572
573 case AODV_V6_DRAFT_01_RREP_ACK:
574 ND_PRINT((ndo, " rrep-ack %u", length));
575 break;
576
577 default:
578 ND_PRINT((ndo, " type %u %u", msg_type, length));
579 }
580 return;
581
582 trunc:
583 ND_PRINT((ndo, " [|aodv]"));
584 }