]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-pim.c
Add a nd_print_trunc() call
[tcpdump] / print-pim.c
index d30cf8f45e8b27849ae5415ff1c72dac3faa75ab..a8e0be019ad1fb6c99080752b26ebde5fcf8ad86 100644 (file)
@@ -244,7 +244,7 @@ pimv1_join_prune_print(netdissect_options *ndo,
        }
        return;
 trunc:
-       ND_PRINT("[|pim]");
+       nd_print_trunc(ndo);
        return;
 }
 
@@ -254,6 +254,7 @@ pimv1_print(netdissect_options *ndo,
 {
        u_char type;
 
+       ndo->ndo_protocol = "pimv1";
        ND_TCHECK_1(bp + 1);
        type = EXTRACT_U_1(bp + 1);
 
@@ -332,7 +333,7 @@ pimv1_print(netdissect_options *ndo,
        return;
 
 trunc:
-       ND_PRINT("[|pim]");
+       nd_print_trunc(ndo);
        return;
 }
 
@@ -350,6 +351,7 @@ cisco_autorp_print(netdissect_options *ndo,
        u_int numrps;
        u_int hold;
 
+       ndo->ndo_protocol = "cisco_autorp";
        if (len < 8)
                goto trunc;
        ND_TCHECK_1(bp);
@@ -450,7 +452,7 @@ cisco_autorp_print(netdissect_options *ndo,
        return;
 
 trunc:
-       ND_PRINT("[|autorp]");
+       nd_print_trunc(ndo);
        return;
 }
 
@@ -461,6 +463,7 @@ pim_print(netdissect_options *ndo,
        const struct pim *pim = (const struct pim *)bp;
        uint8_t pim_typever;
 
+       ndo->ndo_protocol = "pim";
 #ifdef notyet                  /* currently we see only version and type */
        ND_TCHECK_1(pim->pim_rsv);
 #endif
@@ -492,7 +495,7 @@ pim_print(netdissect_options *ndo,
        return;
 
 trunc:
-       ND_PRINT("[|pim]");
+       nd_print_trunc(ndo);
        return;
 }
 
@@ -705,6 +708,7 @@ pimv2_print(netdissect_options *ndo,
        u_int pim_typever;
        u_int pimv2_addr_len;
 
+       ndo->ndo_protocol = "pimv2";
        if (len < 2)
                goto trunc;
        ND_TCHECK_1(pim->pim_rsv);
@@ -898,8 +902,8 @@ pimv2_print(netdissect_options *ndo,
                 case 0: /* Null header */
                        ND_TCHECK_4(ip->ip_dst);
                        ND_PRINT("IP-Null-header %s > %s",
-                                 ipaddr_string(ndo, &ip->ip_src),
-                                 ipaddr_string(ndo, &ip->ip_dst));
+                                 ipaddr_string(ndo, ip->ip_src),
+                                 ipaddr_string(ndo, ip->ip_dst));
                        break;
 
                case 4: /* IPv4 */
@@ -1195,12 +1199,5 @@ pimv2_print(netdissect_options *ndo,
        return;
 
 trunc:
-       ND_PRINT("[|pim]");
+       nd_print_trunc(ndo);
 }
-
-/*
- * Local Variables:
- * c-style: whitesmith
- * c-basic-offset: 8
- * End:
- */