Skip to content
Snippets Groups Projects
Commit f69f5616 authored by Pierre Lalet's avatar Pierre Lalet Committed by GitHub
Browse files

Merge pull request #411 from gpotter2/fix-sll

[Layers] Added fields desc on CookedLinux + L3pcapsocket
parents 44e8b8ac 7fb6f8bc
No related branches found
No related tags found
No related merge requests found
......@@ -304,6 +304,7 @@ if conf.use_winpcapy:
self.outs.close()
class L3pcapSocket(L2pcapSocket):
desc = "read/write packets at layer 3 using only libpcap"
#def __init__(self, iface = None, type = ETH_P_ALL, filter=None, nofilter=0):
# L2pcapSocket.__init__(self, iface, type, filter, nofilter)
def recv(self, x = MTU):
......
......@@ -203,9 +203,14 @@ conf.neighbor.register_l3(Dot3, LLC, l2_register_l3)
class CookedLinux(Packet):
# Documentation: http://www.tcpdump.org/linktypes/LINKTYPE_LINUX_SLL.html
name = "cooked linux"
# from wireshark's database
fields_desc = [ ShortEnumField("pkttype",0, {0: "unicast",
4:"sent-by-us"}), #XXX incomplete
1: "broadcast",
2: "multicast",
3: "unicast-to-another-host",
4:"sent-by-us"}),
XShortField("lladdrtype",512),
ShortField("lladdrlen",0),
StrFixedLenField("src","",8),
......
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