Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not support RAW IP Packet Format #12

Open
carfieldca opened this issue Aug 13, 2015 · 0 comments
Open

Not support RAW IP Packet Format #12

carfieldca opened this issue Aug 13, 2015 · 0 comments

Comments

@carfieldca
Copy link

--- CapTipper-master/pcapparser/constant.py 2015-08-06 16:42:26.000000000 -0700
+++ CapTipper-fix/pcapparser/constant.py 2015-08-13 15:28:32.170656700 -0700
@@ -14,6 +14,7 @@ class LinkLayerType(object):
"""LinkType"""
ETHERNET = 1
LINUX_SLL = 113

  • RAWIP = 101

--- CapTipper-master/pcapparser/packet_parser.py 2015-08-06 16:42:26.000000000 -0700
+++ CapTipper-fix/pcapparser/packet_parser.py 2015-08-13 15:31:03.883334100 -0700
@@ -78,6 +78,10 @@ def dl_parse_ethernet(link_packet):
pass
return n_protocol, link_packet[eth_header_len:]

+def dl_parse_rawip(link_packet):

  • """parse raw ip packet"""
  • raw_ip_header_len=0
  • return NetworkProtocol.IP,link_packet

def dl_parse_linux_sll(link_packet):
@@ -178,6 +182,8 @@ def get_link_layer_parser(link_type):
return dl_parse_ethernet
elif link_type == LinkLayerType.LINUX_SLL:
return dl_parse_linux_sll

  • elif link_type == LinkLayerType.RAWIP:
  •    return dl_parse_rawip
    
    else:
    return None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant