Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions gencode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion pcap-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions pcap-linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion pcap/dlt.h
Original file line number Diff line number Diff line change
Expand Up @@ -1664,6 +1664,12 @@
*/
#define DLT_DECT_NR 301

/*
* MaxLinear DSA ethernet switch protocol.
* Requested by Peter Enderborg <[email protected]>.
*/
#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,
Expand All @@ -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) */