Skip to content

Commit bf8bfc7

Browse files
authored
Merge pull request #1213 from martin-kaiser/dlt_mdb
Add DLT and linktype for MDB
2 parents 76a02d8 + 623f59d commit bf8bfc7

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

pcap-common.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,19 @@
12691269
*/
12701270
#define LINKTYPE_FIRA_UCI 299
12711271

1272-
#define LINKTYPE_HIGH_MATCHING_MAX 299 /* highest value in the "matching" range */
1272+
/*
1273+
* MDB (Multi-Drop Bus) protocol between a vending machine controller and
1274+
* peripherals inside the vending machine. See
1275+
*
1276+
* https://www.kaiser.cx/pcap-mdb.html
1277+
*
1278+
* for the specification.
1279+
*
1280+
* Requested by Martin Kaiser <martin@kaiser.cx>.
1281+
*/
1282+
#define LINKTYPE_MDB 300
1283+
1284+
#define LINKTYPE_HIGH_MATCHING_MAX 300 /* highest value in the "matching" range */
12731285

12741286
/*
12751287
* The DLT_ and LINKTYPE_ values in the "matching" range should be the

pcap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3374,6 +3374,7 @@ static struct dlt_choice dlt_choices[] = {
33743374
DLT_CHOICE(ZWAVE_TAP, "Z-Wave packets with a TAP meta-data header"),
33753375
DLT_CHOICE(SILABS_DEBUG_CHANNEL, "Silicon Labs debug channel protocol"),
33763376
DLT_CHOICE(FIRA_UCI, "Ultra-wideband controller interface protocol"),
3377+
DLT_CHOICE(MDB, "Multi-Drop Bus"),
33773378
DLT_CHOICE_SENTINEL
33783379
};
33793380

pcap/dlt.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1638,6 +1638,18 @@
16381638
*/
16391639
#define DLT_FIRA_UCI 299
16401640

1641+
/*
1642+
* MDB (Multi-Drop Bus) protocol between a vending machine controller and
1643+
* peripherals inside the vending machine. See
1644+
*
1645+
* https://www.kaiser.cx/pcap-mdb.html
1646+
*
1647+
* for the specification.
1648+
*
1649+
* Requested by Martin Kaiser <martin@kaiser.cx>.
1650+
*/
1651+
#define DLT_MDB 300
1652+
16411653
/*
16421654
* In case the code that includes this file (directly or indirectly)
16431655
* has also included OS files that happen to define DLT_HIGH_MATCHING_MAX,
@@ -1649,6 +1661,6 @@
16491661
#undef DLT_HIGH_MATCHING_MAX
16501662
#endif
16511663

1652-
#define DLT_HIGH_MATCHING_MAX 299 /* highest value in the "matching" range */
1664+
#define DLT_HIGH_MATCHING_MAX 300 /* highest value in the "matching" range */
16531665

16541666
#endif /* !defined(lib_pcap_dlt_h) */

0 commit comments

Comments
 (0)