diff --git a/gencode.c b/gencode.c index 2fcb9bcb76..6912a869b7 100644 --- a/gencode.c +++ b/gencode.c @@ -3692,6 +3692,8 @@ gen_linktype(compiler_state_t *cstate, bpf_u_int32 ll_proto) case DLT_EN10MB: case DLT_NETANALYZER: case DLT_NETANALYZER_TRANSPARENT: + case DLT_DSA_TAG_GSW1XX: + /* Geneve has an EtherType regardless of whether there is an * L2 header. VXLAN always has an EtherType. */ if (!cstate->is_encap) diff --git a/pcap-common.c b/pcap-common.c index 7cff6bfeb8..186c3327ff 100644 --- a/pcap-common.c +++ b/pcap-common.c @@ -1300,7 +1300,8 @@ */ #define LINKTYPE_DECT_NR 301 -#define LINKTYPE_HIGH_MATCHING_MAX 301 /* highest value in the "matching" range */ +#define LINKTYPE_DSA_TAG_GSW1XX 302 +#define LINKTYPE_HIGH_MATCHING_MAX 302 /* highest value in the "matching" range */ /* * The DLT_ and LINKTYPE_ values in the "matching" range should be the diff --git a/pcap-linux.c b/pcap-linux.c index 21a670ba50..9d8c7edd01 100644 --- a/pcap-linux.c +++ b/pcap-linux.c @@ -5699,6 +5699,11 @@ static struct dsa_proto { * https://elixir.bootlin.com/linux/v6.13.2/source/net/dsa/tag_xrs700x.c */ { "xrs700x", DLT_EN10MB }, + /* + * Type 2, with EtherType 0x88c3, unassigned. + * + */ + { "gsw1xx", DLT_DSA_TAG_GSW1XX }, }; static int diff --git a/pcap/dlt.h b/pcap/dlt.h index affe7d1fc4..8916e97cf9 100644 --- a/pcap/dlt.h +++ b/pcap/dlt.h @@ -1664,6 +1664,12 @@ */ #define DLT_DECT_NR 301 +/* + * MaxLinear DSA ethernet switch protocol. + * Requested by Peter Enderborg . + */ +#define DLT_DSA_TAG_GSW1XX 302 + /* * In case the code that includes this file (directly or indirectly) * has also included OS files that happen to define DLT_HIGH_MATCHING_MAX, @@ -1675,6 +1681,6 @@ #undef DLT_HIGH_MATCHING_MAX #endif -#define DLT_HIGH_MATCHING_MAX 301 /* highest value in the "matching" range */ +#define DLT_HIGH_MATCHING_MAX 302 /* highest value in the "matching" range */ #endif /* !defined(lib_pcap_dlt_h) */