diff options
author | Pierre LALET <pierre.lalet@cea.fr> | 2018-01-19 23:14:21 +0100 |
---|---|---|
committer | Pierre LALET <pierre.lalet@cea.fr> | 2018-01-21 21:46:27 +0100 |
commit | 20a9b415a572d48748c3b2e91e07be908546d1ba (patch) | |
tree | bcd9a56c1523afcb27d464564e74d598366a6171 | |
parent | ad4d426b3e56cb02c18497b9b559ee967ecedf18 (diff) | |
download | platform_external_scapy-20a9b415a572d48748c3b2e91e07be908546d1ba.tar.gz platform_external_scapy-20a9b415a572d48748c3b2e91e07be908546d1ba.tar.bz2 platform_external_scapy-20a9b415a572d48748c3b2e91e07be908546d1ba.zip |
Fix bluetooth constant
-rw-r--r-- | scapy/data.py | 1 | ||||
-rw-r--r-- | scapy/layers/bluetooth.py | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/scapy/data.py b/scapy/data.py index 71dda326..1046ac5d 100644 --- a/scapy/data.py +++ b/scapy/data.py @@ -86,6 +86,7 @@ DLT_PRISM_HEADER = 119 DLT_AIRONET_HEADER = 120 DLT_IEEE802_11_RADIO = 127 DLT_LINUX_IRDA = 144 +DLT_BLUETOOTH_HCI_H4 = 187 DLT_PPI = 192 DLT_CAN_SOCKETCAN = 227 DLT_IPV4 = 228 diff --git a/scapy/layers/bluetooth.py b/scapy/layers/bluetooth.py index 577fa6f6..41b3f505 100644 --- a/scapy/layers/bluetooth.py +++ b/scapy/layers/bluetooth.py @@ -13,6 +13,7 @@ from ctypes import * from select import select from scapy.config import conf +from scapy.data import DLT_BLUETOOTH_HCI_H4 from scapy.packet import * from scapy.fields import * from scapy.supersocket import SuperSocket @@ -21,7 +22,6 @@ from scapy.data import MTU from scapy.consts import WINDOWS from scapy.error import warning, log_loading -LINKTYPE_BLUETOOTH_HCI_H4 = 187 ########## # Fields # @@ -709,7 +709,7 @@ bind_layers( HCI_Hdr, HCI_ACL_Hdr, type=2) bind_layers( HCI_Hdr, HCI_Event_Hdr, type=4) bind_layers( HCI_Hdr, conf.raw_layer, ) -conf.l2types.register(LINKTYPE_BLUETOOTH_HCI_H4, HCI_Hdr) +conf.l2types.register(DLT_BLUETOOTH_HCI_H4, HCI_Hdr) bind_layers( HCI_Command_Hdr, HCI_Cmd_Reset, opcode=0x0c03) bind_layers( HCI_Command_Hdr, HCI_Cmd_Set_Event_Mask, opcode=0x0c01) |