tcpdump mailing list archives
Patch to add DLT_AX25 handling to libpcap
From: Richard Stearn <richard () rns-stearn demon co uk>
Date: Wed, 28 Mar 2007 22:50:02 +0100
Greetings The definition of DLT_AX25 already exists (protocol 3). The attached patch adds recognition for the Amateur Radio AX.25 protocol to libpcap. This is an updated patch to my previous request. -- Regards Richard
*** reference/libpcap-0.9.5/gencode.c 2006-09-13 08:36:19.000000000 +0100 --- modified/libpcap-0.9.5/gencode.c 2007-03-19 22:25:17.000000000 +0000 *************** *** 1236,1241 **** --- 1236,1251 ---- off_nl = -1; off_nl_nosnap = -1; return; + + case DLT_AX25: + /* + * Currently, only raw "link[N:M]" filtering is supported. + */ + off_linktype = -1; /* variable, min 15, max 71 steps of 7 */ + off_nl = -1; /* variable, min 16, max 71 steps of 7 */ + off_nl_nosnap = -1; /* no 802.2 LLC */ + off_mac = 1; /* step over the kiss length byte */ + return; } bpf_error("unknown data link type %d", linktype); /* NOTREACHED */ *************** *** 2354,2359 **** --- 2364,2372 ---- case DLT_LINUX_LAPD: bpf_error("LAPD link-layer type filtering not implemented"); + + case DLT_AX25: + bpf_error("AX.25 link-layer type filtering not implemented"); } /* *** reference/libpcap-0.9.5/pcap.c 2006-07-27 22:06:17.000000000 +0100 --- modified/libpcap-0.9.5/pcap.c 2007-03-18 14:01:03.000000000 +0000 *************** *** 384,389 **** --- 384,390 ---- DLT_CHOICE(DLT_A429, "Arinc 429"), DLT_CHOICE(DLT_CAN20B, "Controller Area Network (CAN) v. 2.0B"), DLT_CHOICE(DLT_A653_ICM, "Arinc 653 Interpartition Communication"), + DLT_CHOICE(DLT_AX25, "AX.25"), DLT_CHOICE_SENTINEL };
- This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- Patch to add DLT_AX25 handling to libpcap Richard Stearn (Mar 28)