? obj Index: interface.h =================================================================== RCS file: /cvs/src/usr.sbin/tcpdump/interface.h,v retrieving revision 1.80 diff -u -p -r1.80 interface.h --- interface.h 5 Apr 2019 00:57:59 -0000 1.80 +++ interface.h 21 May 2019 03:46:35 -0000 @@ -64,6 +64,7 @@ extern char *device; /* as specified by #define PT_MPLS 10 /* MPLS (over UDP) */ #define PT_TFTP 11 /* Trivial File Transfer Protocol */ #define PT_VXLAN 12 /* Virtual eXtensible Local Area Network */ +#define PT_ERSPAN 13 /* GRE ERSPAN Type I or II */ #ifndef min #define min(a,b) ((a)>(b)?(b):(a)) Index: print-gre.c =================================================================== RCS file: /cvs/src/usr.sbin/tcpdump/print-gre.c,v retrieving revision 1.26 diff -u -p -r1.26 print-gre.c --- print-gre.c 17 May 2019 06:47:10 -0000 1.26 +++ print-gre.c 21 May 2019 03:46:35 -0000 @@ -223,6 +223,14 @@ gre_print_0(const u_char *p, u_int lengt printf(" "); + switch (packettype) { + case PT_ERSPAN: + gre_print_erspan(flags, p, length); + return; + default: + break; + } + switch (proto) { case 0: printf("keep-alive"); Index: tcpdump.8 =================================================================== RCS file: /cvs/src/usr.sbin/tcpdump/tcpdump.8,v retrieving revision 1.101 diff -u -p -r1.101 tcpdump.8 --- tcpdump.8 18 Mar 2019 06:41:52 -0000 1.101 +++ tcpdump.8 21 May 2019 03:46:35 -0000 @@ -230,9 +230,11 @@ to be interpreted as the specified .Ar type . Currently known types are: .Pp -.Bl -tag -width "vxlan" -offset indent -compact +.Bl -tag -width "erspan" -offset indent -compact .It Cm cnfp Cisco NetFlow protocol +.It Cm erspan +Cisco Encapsulated Remote Switch Port Analyzer (ERSPAN) over GRE .It Cm gre Generic Routing Encapsulation over UDP .It Cm mpls Index: tcpdump.c =================================================================== RCS file: /cvs/src/usr.sbin/tcpdump/tcpdump.c,v retrieving revision 1.89 diff -u -p -r1.89 tcpdump.c --- tcpdump.c 18 Mar 2019 00:09:22 -0000 1.89 +++ tcpdump.c 21 May 2019 03:46:35 -0000 @@ -365,6 +365,8 @@ main(int argc, char **argv) packettype = PT_GRE; else if (strcasecmp(optarg, "vxlan") == 0) packettype = PT_VXLAN; + else if (strcasecmp(optarg, "erspan") == 0) + packettype = PT_ERSPAN; else if (strcasecmp(optarg, "mpls") == 0) packettype = PT_MPLS; else if (strcasecmp(optarg, "tftp") == 0)