| @@ -11,27 +11,27 @@ | | | @@ -11,27 +11,27 @@ |
11 | * features or use of this software display the following acknowledgement: | | 11 | * features or use of this software display the following acknowledgement: |
12 | * ``This product includes software developed by the University of California, | | 12 | * ``This product includes software developed by the University of California, |
13 | * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of | | 13 | * Lawrence Berkeley Laboratory and its contributors.'' Neither the name of |
14 | * the University nor the names of its contributors may be used to endorse | | 14 | * the University nor the names of its contributors may be used to endorse |
15 | * or promote products derived from this software without specific prior | | 15 | * or promote products derived from this software without specific prior |
16 | * written permission. | | 16 | * written permission. |
17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED | | 17 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED |
18 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF | | 18 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF |
19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | | 19 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
20 | */ | | 20 | */ |
21 | | | 21 | |
22 | #include <sys/cdefs.h> | | 22 | #include <sys/cdefs.h> |
23 | #ifndef lint | | 23 | #ifndef lint |
24 | __RCSID("$NetBSD: print-ip.c,v 1.9 2017/01/24 23:29:14 christos Exp $"); | | 24 | __RCSID("$NetBSD: print-ip.c,v 1.10 2017/01/25 08:20:15 martin Exp $"); |
25 | #endif | | 25 | #endif |
26 | | | 26 | |
27 | #ifdef HAVE_CONFIG_H | | 27 | #ifdef HAVE_CONFIG_H |
28 | #include "config.h" | | 28 | #include "config.h" |
29 | #endif | | 29 | #endif |
30 | | | 30 | |
31 | #include <netdissect-stdinc.h> | | 31 | #include <netdissect-stdinc.h> |
32 | | | 32 | |
33 | #include <string.h> | | 33 | #include <string.h> |
34 | | | 34 | |
35 | #include "netdissect.h" | | 35 | #include "netdissect.h" |
36 | #include "addrtoname.h" | | 36 | #include "addrtoname.h" |
37 | #include "extract.h" | | 37 | #include "extract.h" |
| @@ -473,27 +473,27 @@ again: | | | @@ -473,27 +473,27 @@ again: |
473 | ND_PRINT((ndo, "vrrp %s > %s: ", | | 473 | ND_PRINT((ndo, "vrrp %s > %s: ", |
474 | ipaddr_string(ndo, &ipds->ip->ip_src), | | 474 | ipaddr_string(ndo, &ipds->ip->ip_src), |
475 | ipaddr_string(ndo, &ipds->ip->ip_dst))); | | 475 | ipaddr_string(ndo, &ipds->ip->ip_dst))); |
476 | vrrp_print(ndo, ipds->cp, ipds->len, | | 476 | vrrp_print(ndo, ipds->cp, ipds->len, |
477 | (const u_char *)ipds->ip, ipds->ip->ip_ttl); | | 477 | (const u_char *)ipds->ip, ipds->ip->ip_ttl); |
478 | } | | 478 | } |
479 | break; | | 479 | break; |
480 | | | 480 | |
481 | case IPPROTO_PGM: | | 481 | case IPPROTO_PGM: |
482 | pgm_print(ndo, ipds->cp, ipds->len, (const u_char *)ipds->ip); | | 482 | pgm_print(ndo, ipds->cp, ipds->len, (const u_char *)ipds->ip); |
483 | break; | | 483 | break; |
484 | | | 484 | |
485 | case IPPROTO_PFSYNC: | | 485 | case IPPROTO_PFSYNC: |
486 | pfsync_ip_print(ipds->cp, ipds->len, (const u_char *)ipds->ip); | | 486 | pfsync_ip_print(ndo, ipds->cp, ipds->len, (const u_char *)ipds->ip); |
487 | break; | | 487 | break; |
488 | | | 488 | |
489 | default: | | 489 | default: |
490 | if (ndo->ndo_nflag==0 && (proto = getprotobynumber(ipds->nh)) != NULL) | | 490 | if (ndo->ndo_nflag==0 && (proto = getprotobynumber(ipds->nh)) != NULL) |
491 | ND_PRINT((ndo, " %s", proto->p_name)); | | 491 | ND_PRINT((ndo, " %s", proto->p_name)); |
492 | else | | 492 | else |
493 | ND_PRINT((ndo, " ip-proto-%d", ipds->nh)); | | 493 | ND_PRINT((ndo, " ip-proto-%d", ipds->nh)); |
494 | ND_PRINT((ndo, " %d", ipds->len)); | | 494 | ND_PRINT((ndo, " %d", ipds->len)); |
495 | break; | | 495 | break; |
496 | } | | 496 | } |
497 | } | | 497 | } |
498 | | | 498 | |
499 | void | | 499 | void |