tcpdump mailing list archives
Patch to add Amateur Radio protocol AX.25 to libpcap
From: Richard Stearn <richard () rns-stearn demon co uk>
Date: Mon, 19 Mar 2007 21:52:22 +0000
Greetings The attached patch adds recognition for the Amateur Radio AX.25 protocol to libpcap. The definition of DLT_AX25 already exists (protocol 3). I would appreciate the inclusion of this patch into libpcap as I am attempting to add the Amateur Radio protocols to tcpdump and wireshark. Longer term I would hope to add address matching but this may be non-trivial so I would like to get basic capture in place. -- Regards Richard
*** reference/libpcap-0.9.5/gencode.c 2006-09-13 08:36:19.000000000 +0100 --- modified/libpcap-0.9.5/gencode.c 2006-12-05 23:35:00.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 */ *** reference/libpcap-0.9.5/pcap.c 2006-07-27 22:06:17.000000000 +0100 --- modified/libpcap-0.9.5/pcap.c 2006-12-05 23:36:05.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 Amateur Radio protocol AX.25 to libpcap Richard Stearn (Mar 19)