Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added basic support for BACnet MS/TP

Added DLT_CHOICE, dummy offsets & basic matching
  • Loading branch information...
commit c1f2dbee6d03a85beddf7afa9f0fa7ee6156421a 1 parent c36c37e
@NikoDelarich NikoDelarich authored committed
Showing with 11 additions and 0 deletions.
  1. +10 −0 gencode.c
  2. +1 −0  pcap.c
View
10 gencode.c
@@ -1343,6 +1343,13 @@ init_linktype(p)
off_nl_nosnap = -1; /* no 802.2 LLC */
return;
+ case DLT_BACNET_MS_TP:
+ off_linktype = -1;
+ off_macpl = -1;
+ off_nl = -1;
+ off_nl_nosnap = -1;
+ return;
+
case DLT_JUNIPER_SERVICES:
off_linktype = 12;
off_macpl = -1; /* L3 proto location dep. on cookie type */
@@ -3354,6 +3361,9 @@ gen_linktype(proto)
*/
return gen_mcmp(OR_LINK, 0, BPF_W, 0x4d474300, 0xffffff00); /* compare the magic number */
+ case DLT_BACNET_MS_TP:
+ return gen_mcmp(OR_LINK, 0, BPF_W, 0x55FF0000, 0xffff0000);
+
case DLT_IPNET:
return gen_ipnet_linktype(proto);
View
1  pcap.c
@@ -1010,6 +1010,7 @@ static struct dlt_choice dlt_choices[] = {
DLT_CHOICE(DLT_LINUX_IRDA, "Linux IrDA"),
DLT_CHOICE(DLT_IEEE802_11_RADIO_AVS, "802.11 plus AVS radio information header"),
DLT_CHOICE(DLT_JUNIPER_MONITOR, "Juniper Passive Monitor PIC"),
+ DLT_CHOICE(DLT_BACNET_MS_TP, "BACnet MS/TP"),
DLT_CHOICE(DLT_PPP_PPPD, "PPP for pppd, with direction flag"),
DLT_CHOICE(DLT_JUNIPER_PPPOE, "Juniper PPPoE"),
DLT_CHOICE(DLT_JUNIPER_PPPOE_ATM, "Juniper PPPoE/ATM"),
Please sign in to comment.
Something went wrong with that request. Please try again.