]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ip.c
Add a CARP dissector and a command-line option to dissect proto 112 as CARP.
[tcpdump] / print-ip.c
index d2df0a898c999fb46ed497be53d9b1fadb924e1e..1fa7aab0d6cae8830aa92c9f8ac3cf37dfb9d01a 100644 (file)
@@ -462,7 +462,19 @@ again:
                break;
 
        case IPPROTO_VRRP:
-               vrrp_print(ipds->cp, ipds->len, ipds->ip->ip_ttl);
+               if (packettype == PT_CARP) {
+                       if (vflag)
+                               (void)printf("carp %s > %s: ",
+                                            ipaddr_string(&ipds->ip->ip_src),
+                                            ipaddr_string(&ipds->ip->ip_dst));
+                       carp_print(ipds->cp, ipds->len, ipds->ip->ip_ttl);
+               } else {
+                       if (vflag)
+                               (void)printf("vrrp %s > %s: ",
+                                            ipaddr_string(&ipds->ip->ip_src),
+                                            ipaddr_string(&ipds->ip->ip_dst));
+                       vrrp_print(ipds->cp, ipds->len, ipds->ip->ip_ttl);
+               }
                break;
 
        case IPPROTO_PGM: