Index: head/net/scapy/Makefile =================================================================== --- head/net/scapy/Makefile (revision 516909) +++ head/net/scapy/Makefile (revision 516910) @@ -1,82 +1,82 @@ # Created by: vanhu # $FreeBSD$ PORTNAME= scapy PORTVERSION= 2.4.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= bofh@FreeBSD.org COMMENT= Powerful interactive packet manipulation program in python LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}libdnet>0:net/py-libdnet@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pypcap>0:net/py-pypcap@${PY_FLAVOR} USE_PYTHON= autoplist concurrent distutils NO_ARCH= yes OPTIONS_DEFINE= GRAPH IPYTHON P0F_BASE MANUF MATPLOT NMAP PYCRYPTO PYGNUPLOT PYX QUESO_BASE SOX GRAPH_DESC= graph generation and visualization IPYTHON_DESC= Use IPython (enhanced interactive shell) MANUF_DESC= wireshark's MANUF MAC database MATPLOT_DESC= Install python matplotlibs NMAP_DESC= nmap OS signatures database P0F_BASE_DESC= p0f OS signatures database PYCRYPTO_DESC= Use py-crypto for WEP decoding PYGNUPLOT_DESC= Use py-gnuplot wrapper to plot graphs PYX_DESC= PostScript and PDF graphs drawing QUESO_BASE_DESC=queso OS signatures database SOX_DESC= Support for VoIP GRAPH_RUN_DEPENDS= ${LOCALBASE}/bin/MagickCore-config:graphics/ImageMagick6 \ ${LOCALBASE}/bin/dot:graphics/graphviz NMAP_RUN_DEPENDS= ${LOCALBASE}/share/nmap/nmap-os-db:security/nmap MANUF_RUN_DEPENDS= ${LOCALBASE}/share/wireshark/manuf:net/wireshark MATPLOT_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}matplotlib>0:math/py-matplotlib@${PY_FLAVOR} P0F_BASE_RUN_DEPENDS= ${LOCALBASE}/etc/p0f.fp:net-mgmt/p0f PYCRYPTO_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pycrypto>0:security/py-pycrypto@${PY_FLAVOR} PYGNUPLOT_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gnuplot>0:math/py-gnuplot@${PY_FLAVOR} PYX_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}PyX>0:graphics/py-PyX@${PY_FLAVOR} QUESO_BASE_RUN_DEPENDS= ${LOCALBASE}/etc/queso.conf.sample:net/queso SOX_RUN_DEPENDS= ${LOCALBASE}/bin/sox:audio/sox PYX_PREVENTS= PYGNUPLOT PYX_PREVENTS_MSG= PyX requires Python 3.4+ and py-gnuplot requires 2.7. .include .if ${PORT_OPTIONS:MPYGNUPLOT} USES+= python:2.7 .elif ${PORT_OPTIONS:MPYX} USES+= python:3.4+ .else USES+= python .endif .include .if ${PORT_OPTIONS:MIPYTHON} .if ${FLAVOR:Mpy27} RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}ipython5>0:devel/ipython5@${PY_FLAVOR} .else RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}ipython>0:devel/ipython@${PY_FLAVOR} .endif .endif post-patch: @${REINPLACE_CMD} "s,share/man/man1,man/man1," ${WRKSRC}/setup.py @${REINPLACE_CMD} "s,pdflatex,pdftex," ${WRKSRC}/scapy/extlib.py @${REINPLACE_CMD} "s,/usr/share/,${LOCALBASE}/share/," \ ${WRKSRC}/scapy/data.py \ ${WRKSRC}/scapy/modules/nmap.py \ ${WRKSRC}/scapy/utils6.py @${REINPLACE_CMD} "s,/etc/,${LOCALBASE}/etc/," \ ${WRKSRC}/scapy/modules/p0f.py .include Index: head/net/scapy/files/patch-i386 =================================================================== --- head/net/scapy/files/patch-i386 (nonexistent) +++ head/net/scapy/files/patch-i386 (revision 516910) @@ -0,0 +1,50 @@ +--- scapy/arch/bpf/supersocket.py.orig 2019-07-29 18:49:37 UTC ++++ scapy/arch/bpf/supersocket.py +@@ -4,9 +4,11 @@ + Scapy *BSD native support - BPF sockets + """ + ++from ctypes import c_long, sizeof + import errno + import fcntl + import os ++import platform + from select import select + import struct + import time +@@ -23,7 +25,10 @@ from scapy.supersocket import SuperSocket + from scapy.compat import raw + + +-if FREEBSD or NETBSD: ++if FREEBSD: ++ # On 32bit architectures long might be 32bit. ++ BPF_ALIGNMENT = sizeof(c_long) ++elif NETBSD: + BPF_ALIGNMENT = 8 # sizeof(long) + else: + BPF_ALIGNMENT = 4 # sizeof(int32_t) +@@ -260,8 +265,21 @@ class L2bpfListenSocket(_L2bpfSocket): + return + + # Extract useful information from the BPF header +- if FREEBSD or NETBSD: +- # struct bpf_xhdr or struct bpf_hdr32 ++ if FREEBSD: ++ # Unless we set BIOCSTSTAMP to something different than BPF_T_MICROTIME ++ # we will get bpf_hdr on FreeBSD, which means that we'll get a ++ # struct timeval, which is time_t, suseconds_t. ++ # On i386 time_t still is 32bit so the bh_tstamp will only be 8 bytes. ++ # We really want to set BIOCSTSTAMP to BPF_T_NANOTIME and be done with this ++ # and it always be 16? ++ if platform.machine() == "i386": ++ # struct bpf_hdr ++ bh_tstamp_offset = 8 ++ else: ++ # struct bpf_hdr (64bit time_t) or struct bpf_xhdr ++ bh_tstamp_offset = 16 ++ elif NETBSD: ++ # struct bpf_hdr or struct bpf_hdr32 + bh_tstamp_offset = 16 + else: + # struct bpf_hdr Property changes on: head/net/scapy/files/patch-i386 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property