tcpdump mailing list archives
dlt_choice table in pcap.c
From: Michael Richardson <mcr () sandelman ca>
Date: Thu, 04 Dec 2025 14:22:06 -0500
Guy, we have this lovely table in pcap.c:
static struct dlt_choice dlt_choices[] = {
DLT_CHOICE(NULL, "BSD loopback"),
DLT_CHOICE(EN10MB, "Ethernet"),
DLT_CHOICE(EN3MB, "experimental Ethernet (3Mb/s)"),
DLT_CHOICE(AX25, "AX.25 layer 2"),
DLT_CHOICE(PRONET, "Proteon ProNET Token Ring"),
...
I feel like it ought to be indexed by LINKTYPE instead.
(This came up as I poked someone about better references for the many JUNIPER entries)
Was there a table that did DLT<->LINKTYPE? (I realize it's not always 1:1).
I didn't find that, maybe my memory is bad.
Maybe dlt_choice should have both values in the table.
I think we name them consistently enough that we could just change the macro?
(as an aside, I wonder if pcapint_strcasecmp() is still needed in 2025, given
UTF-8, etc. I guess that the upper-128 of that chatmap table is Latin-1? yet it
seems to map the upper-control codes to... I'm not sure what. Did we need to
map å -> a?. If not, wonder why charmap is 256 entries)
--
] Never tell me the odds! | ipv6 mesh networks [
] Michael Richardson, Sandelman Software Works | IoT architect [
] mcr () sandelman ca http://www.sandelman.ca/ | ruby on rails [
_______________________________________________ tcpdump-workers mailing list -- tcpdump-workers () lists tcpdump org To unsubscribe send an email to tcpdump-workers-leave () lists tcpdump org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
Current thread:
- dlt_choice table in pcap.c Michael Richardson (Dec 04)
- Re: dlt_choice table in pcap.c Guy Harris (Dec 04)
- Re: dlt_choice table in pcap.c Guy Harris (Dec 04)
- Re: dlt_choice table in pcap.c Guy Harris (Dec 04)
