From: Stephen Hemminger <stephen@networkplumber.org>
To: Schneide <schneide@qti.qualcomm.com>
Cc: dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>,
Reshma Pattan <reshma.pattan@intel.com>,
Jerin Jacob <jerinj@marvell.com>,
Kiran Kumar K <kirankumark@marvell.com>,
Nithin Dabilpuram <ndabilpuram@marvell.com>,
Zhirun Yan <yanzhirun_163@163.com>
Subject: Re: [PATCH v2] pcapng: allow any protocol link type for the interface block
Date: Thu, 25 Sep 2025 17:04:47 -0700 [thread overview]
Message-ID: <20250925170447.2ae8d5bf@hermes.local> (raw)
In-Reply-To: <20250827223216.1337749-1-schneide@qti.qualcomm.com>
On Wed, 27 Aug 2025 16:32:15 -0600
Schneide <schneide@qti.qualcomm.com> wrote:
>
> +* pcapng: Changed the API for adding interfaces to include a link type argument.
> + The link type was previously hardcoded to the ethernet link type in the API.
> + This argument is added to ``rte_pcapng_add_interface``.
> + These functions are versioned to retain binary compatibility until the next LTS release.
Since link connector is now merged, and that wording might overlap and
be confusing. Would be could to add reference to pcap-linktype.7 man
page.
Also, google search showed a related draft RFC.
https://datatracker.ietf.org/doc/draft-ietf-opsawg-pcaplinktype/
In that RFC, the defines are LINKTYPE_XXX maybe that would be better
and break the dependency on libpcap for values. That means values will
come from IANA in future.
The enum (thanks to ChatGPT) for RFC draft would be:
typedef enum pcap_linktype {
LINKTYPE_NULL = 0, /* BSD loopback encapsulation */
LINKTYPE_ETHERNET = 1, /* IEEE 802.3 Ethernet */
LINKTYPE_EXP_ETHERNET = 2, /* Xerox experimental 3Mb Ethernet */
LINKTYPE_AX25 = 3, /* AX.25 layer 2 packets */
LINKTYPE_PRONET = 4, /* Proteon PRONet Token Ring (reserved) */
LINKTYPE_CHAOS = 5, /* MIT Chaosnet (reserved) */
LINKTYPE_IEEE802_5 = 6, /* IEEE 802.5 Token Ring */
LINKTYPE_ARCNET_BSD = 7, /* ARCNET with BSD encapsulation */
LINKTYPE_SLIP = 8, /* SLIP, with a direction header */
LINKTYPE_PPP = 9, /* PPP */
LINKTYPE_FDDI = 10, /* FDDI (ANSI INCITS 239-1994) */
/* 11–49: not available for assignment (reserved) */
LINKTYPE_PPP_HDLC = 50, /* PPP in HDLC-like framing */
LINKTYPE_PPP_ETHER = 51, /* PPPoE session packets */
/* 52–98: not available for assignment */
LINKTYPE_SYMANTEC_FIREWALL = 99, /* Reserved for Symantec Enterprise Firewall */
LINKTYPE_ATM_RFC1483 = 100, /* LLC/SNAP-encapsulated ATM */
LINKTYPE_RAW = 101, /* Raw IP (starts with IP header) */
LINKTYPE_SLIP_BSDOS = 102, /* BSD/OS SLIP BPF header (reserved) */
LINKTYPE_PPP_BSDOS = 103, /* BSD/OS PPP BPF header (reserved) */
LINKTYPE_C_HDLC = 104, /* Cisco PPP with HDLC framing */
LINKTYPE_IEEE802_11 = 105, /* IEEE 802.11 wireless LAN */
LINKTYPE_ATM_CLIP = 106, /* Classical IP, no header before IP */
LINKTYPE_FRELAY = 107, /* Frame Relay LAPF */
LINKTYPE_LOOP = 108, /* OpenBSD loopback encapsulation */
LINKTYPE_ENC = 109, /* OpenBSD IPsec encapsulation (reserved) */
LINKTYPE_LANE8023 = 110, /* ATM LANE + 802.3 (reserved) */
LINKTYPE_HIPPI = 111, /* NetBSD HIPPI (reserved) */
LINKTYPE_HDLC = 112, /* NetBSD HDLC framing (reserved) */
LINKTYPE_LINUX_SLL = 113, /* Linux “cooked” capture encapsulation */
LINKTYPE_LTALK = 114, /* Apple LocalTalk */
LINKTYPE_ECONET = 115, /* Acorn Econet (reserved) */
LINKTYPE_IPFILTER = 116, /* OpenBSD ipfilter (reserved) */
LINKTYPE_PFLOG = 117, /* PF logging (reserved) */
LINKTYPE_CISCO_IOS = 118, /* Cisco internal use (reserved) */
LINKTYPE_IEEE802_11_PRISM = 119, /* 802.11 + Prism monitor header */
LINKTYPE_IEEE802_11_AIRONET = 120, /* 802.11 + Aironet metadata (reserved) */
LINKTYPE_HHDLC = 121, /* Siemens HiPath HDLC (reserved) */
LINKTYPE_IP_OVER_FC = 122, /* IP and ATM over Fibre Channel */
LINKTYPE_SUNATM = 123, /* ATM from SunATM */
LINKTYPE_RIO = 124, /* RapidIO (reserved) */
LINKTYPE_PCI_EXP = 125, /* PCI Express (reserved) */
LINKTYPE_AURORA = 126, /* Xilinx Aurora link (reserved) */
LINKTYPE_IEEE802_11_RADIOTAP = 127, /* 802.11 + Radiotap header */
LINKTYPE_TZSP = 128, /* Tazmen Sniffer Protocol (reserved) */
LINKTYPE_ARCNET_LINUX = 129, /* ARCNET, Linux encapsulation */
LINKTYPE_JUNIPER_MLPPP = 130,
LINKTYPE_JUNIPER_MLFR = 131,
LINKTYPE_JUNIPER_ES = 132,
LINKTYPE_JUNIPER_GGSN = 133,
LINKTYPE_JUNIPER_MFR = 134,
LINKTYPE_JUNIPER_ATM2 = 135,
/* … and so on, up to LINKTYPE_DECT_NR = 301 in the initial set … */
LINKTYPE_DOCSIS = 143, /* DOCSIS MAC frames */
LINKTYPE_LINUX_IRDA = 144,
LINKTYPE_IBM_SP = 145,
LINKTYPE_IBM_SN = 146,
LINKTYPE_RESERVED_01 = 147, /* deprecated private use */
LINKTYPE_RESERVED_02 = 148,
LINKTYPE_RESERVED_03 = 149,
/* ... through LINKTYPE_RESERVED_15 (i.e. up to 162) ... */
LINKTYPE_ZWAVE_TAP = 297,
LINKTYPE_SILABS_DEBUG_CHANNEL = 298,
LINKTYPE_FIRA_UCI = 299,
LINKTYPE_MDB = 300,
LINKTYPE_DECT_NR = 301,
/* Experimental / Private-Use range begins at 65001..65535 */
} LinkType;
next prev parent reply other threads:[~2025-09-26 0:04 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 15:38 [PATCH v1] " Schneide
2025-08-27 16:06 ` Stephen Hemminger
2025-08-27 17:21 ` Stephen Hemminger
2025-08-27 22:32 ` [PATCH v2] " Schneide
2025-09-25 23:54 ` Stephen Hemminger
2025-09-26 0:04 ` Stephen Hemminger [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-05-29 17:16 [PATCH] " Schneide
2025-06-05 23:02 ` [PATCH v2] " Schneide
2025-06-06 15:13 ` Stephen Hemminger
2025-06-06 21:52 ` Schneide
2025-06-08 22:16 ` Stephen Hemminger
2025-06-08 22:19 ` Stephen Hemminger
2025-06-08 22:23 ` Stephen Hemminger
2025-06-08 22:30 ` Stephen Hemminger
2025-06-08 22:34 ` Stephen Hemminger
2025-06-09 15:51 ` Dylan Schneider
2025-06-09 16:24 ` Stephen Hemminger
2025-06-16 14:29 ` Dylan Schneider
2025-06-24 15:15 ` Dylan Schneider
2025-06-09 21:19 ` Schneide
2025-06-16 18:05 ` Stephen Hemminger
2025-06-26 13:57 ` Stephen Hemminger
2025-06-27 16:05 ` Thomas Monjalon
2025-06-27 17:39 ` Thomas Monjalon
2025-06-27 17:46 ` Dylan Schneider
2025-06-27 18:27 ` Thomas Monjalon
2025-06-30 13:50 ` Dylan Schneider
2025-06-30 14:28 ` Thomas Monjalon
2025-07-02 19:30 ` Dylan Schneider
2025-07-03 13:27 ` Thomas Monjalon
2025-07-03 16:29 ` Dylan Schneider
2025-07-03 16:41 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250925170447.2ae8d5bf@hermes.local \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=kirankumark@marvell.com \
--cc=ndabilpuram@marvell.com \
--cc=reshma.pattan@intel.com \
--cc=schneide@qti.qualcomm.com \
--cc=thomas@monjalon.net \
--cc=yanzhirun_163@163.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).