From 09053c7616007310f0974b0261f5cba3d887a95f Mon Sep 17 00:00:00 2001 From: Pierre LALET <pierre.lalet@cea.fr> Date: Sat, 16 Sep 2017 21:25:35 +0200 Subject: [PATCH] Add & fix various DLT_* constant values --- scapy/data.py | 53 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/scapy/data.py b/scapy/data.py index f129cb27..4e9fd586 100644 --- a/scapy/data.py +++ b/scapy/data.py @@ -7,11 +7,19 @@ Global variables and functions for handling external data sets. """ -import os, sys, re, time + +import os +import re +import sys +import time + + from scapy.dadict import DADict +from scapy.consts import DARWIN, FREEBSD, NETBSD, OPENBSD from scapy.error import log_loading from scapy.compat import * + ############ ## Consts ## ############ @@ -33,10 +41,51 @@ ARPHDR_TUN = 65534 # From pcap/dlt.h DLT_NULL = 0 +DLT_EN10MB = 1 +DLT_EN3MB = 2 +DLT_AX25 = 3 +DLT_PRONET = 4 +DLT_CHAOS = 5 +DLT_IEEE802 = 6 +DLT_ARCNET = 7 +DLT_SLIP = 8 DLT_PPP = 9 +DLT_FDDI = 10 +if OPENBSD: + DLT_RAW = 14 +else: + DLT_RAW = 12 +DLT_RAW_ALT = 101 # At least in Argus +if FREEBSD or NETBSD: + DLT_SLIP_BSDOS = 13 + DLT_PPP_BSDOS = 14 +else: + DLT_SLIP_BSDOS = 15 + DLT_PPP_BSDOS = 16 +if FREEBSD: + DLT_PFSYNC = 121 +else: + DLT_PFSYNC = 18 + DLT_HHDLC = 121 +DLT_ATM_CLIP = 19 DLT_PPP_SERIAL = 50 DLT_PPP_ETHER = 51 -DLT_RAW = 101 +DLT_SYMANTEC_FIREWALL = 99 +DLT_C_HDLC = 104 +DLT_IEEE802_11 = 105 +if OPENBSD: + DLT_LOOP = 12 + DLT_ENC = 13 +else: + DLT_LOOP = 108 + DLT_ENC = 109 +DLT_LINUX_SLL = 113 +DLT_PFLOG = 117 +DLT_PRISM_HEADER = 119 +DLT_AIRONET_HEADER = 120 +DLT_IEEE802_11_RADIO = 127 +DLT_LINUX_IRDA = 144 +DLT_PPI = 192 DLT_IPV4 = 228 DLT_IPV6 = 229 -- GitLab