Skip to content
Snippets Groups Projects
Commit 09053c76 authored by Pierre LALET's avatar Pierre LALET
Browse files

Add & fix various DLT_* constant values

parent 3e99428d
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment