Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions traceflow/socket_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ def __init__(self, daddr):
self.ip_daddr = daddr
os_release = platform.system()
if os_release == "Darwin":
# Boned. TODO: Work on fixing this.
print("Detected Mac OS - Cannot support writing of raw IP packets, exiting")
exit(1)
# Use pypcap on osx to send raw packets
import pcap
self.raw_socket = pcap.pcap()
logging.debug("Detected Linux")
if os_release.endswith("BSD"):
# BSD - Need to explicit set IP_HDRINCL.
# BSD - Need to explicitly calculate IP total length
Expand Down