Skip to content

Commit 8094888

Browse files
committed
Allocate DLT_DEBUG_ONLY.
1 parent 7442d42 commit 8094888

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

pcap-common.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,10 @@
13091309
*/
13101310
#define LINKTYPE_EDK2_MM 302
13111311

1312-
#define LINKTYPE_HIGH_MATCHING_MAX 302 /* highest value in the "matching" range */
1312+
// See DLT_DEBUG_ONLY
1313+
#define LINKTYPE_DEBUG_ONLY 303
1314+
1315+
#define LINKTYPE_HIGH_MATCHING_MAX 303 /* highest value in the "matching" range */
13131316

13141317
/*
13151318
* 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
@@ -3346,6 +3346,7 @@ static struct dlt_choice dlt_choices[] = {
33463346
DLT_CHOICE(USER14, "Private use 14"),
33473347
DLT_CHOICE(USER15, "Private use 15"),
33483348
DLT_CHOICE(EDK2_MM, "edk2 mm request serialization protocol"),
3349+
DLT_CHOICE(DEBUG_ONLY, "unstructured data for manual debugging only"),
33493350
DLT_CHOICE_SENTINEL
33503351
};
33513352

pcap/dlt.h

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1673,6 +1673,21 @@
16731673
*/
16741674
#define DLT_EDK2_MM 302
16751675

1676+
/*
1677+
* Unstructured data for manual debugging only. In other words, this DLT is
1678+
* suitable for expert interpretation of hex dumps, and that's it. Do not use
1679+
* this DLT for any other purpose. For any automated (identification, saving,
1680+
* loading, filtering, decoding) processing please either use another existing
1681+
* DLT that fits the use case or document, assign and implement a new, properly
1682+
* structured DLT.
1683+
*
1684+
* In this DLT do not assume any specification, any structure, any format, any
1685+
* version, any header, any payload, any byte order, any implementation, any
1686+
* software/firmware/hardware particulars, any source, any destination, any
1687+
* direction, any protocol or any data integrity/consistency whatsoever.
1688+
*/
1689+
#define DLT_DEBUG_ONLY 303
1690+
16761691
/*
16771692
* In case the code that includes this file (directly or indirectly)
16781693
* has also included OS files that happen to define DLT_HIGH_MATCHING_MAX,
@@ -1684,6 +1699,6 @@
16841699
#undef DLT_HIGH_MATCHING_MAX
16851700
#endif
16861701

1687-
#define DLT_HIGH_MATCHING_MAX 302 /* highest value in the "matching" range */
1702+
#define DLT_HIGH_MATCHING_MAX 303 /* highest value in the "matching" range */
16881703

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

0 commit comments

Comments
 (0)