From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Jul 20 09:30:10 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A84D416A4E0 for ; Thu, 20 Jul 2006 09:30:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F20043D46 for ; Thu, 20 Jul 2006 09:30:10 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k6K9U9uY076118 for ; Thu, 20 Jul 2006 09:30:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k6K9U9Al076117; Thu, 20 Jul 2006 09:30:09 GMT (envelope-from gnats) Resent-Date: Thu, 20 Jul 2006 09:30:09 GMT Resent-Message-Id: <200607200930.k6K9U9Al076117@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "George V. Neville-Neil" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4222516A4DF for ; Thu, 20 Jul 2006 09:21:01 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0474743D5F for ; Thu, 20 Jul 2006 09:21:00 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k6K9KxNN087406 for ; Thu, 20 Jul 2006 09:20:59 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k6K9KxAS087405; Thu, 20 Jul 2006 09:20:59 GMT (envelope-from nobody) Message-Id: <200607200920.k6K9KxAS087405@www.freebsd.org> Date: Thu, 20 Jul 2006 09:20:59 GMT From: "George V. Neville-Neil" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: ports/100601: New port: py-pypcap A Python Module for PCAP Access X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jul 2006 09:30:10 -0000 >Number: 100601 >Category: ports >Synopsis: New port: py-pypcap A Python Module for PCAP Access >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Jul 20 09:30:09 GMT 2006 >Closed-Date: >Last-Modified: >Originator: George V. Neville-Neil >Release: >Organization: Neville-Neil Consulting >Environment: >Description: There are several of these, but this one is the best that I've found. A fully functional interface to PCAP from within Python. This is used in another new port, PCS, which I also submitted. xccat >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # py-pypcap # py-pypcap/Makefile # py-pypcap/files # py-pypcap/files/patch-pcap.pyx # py-pypcap/pkg-descr # py-pypcap/distinfo # py-pypcap/pkg-plist # echo c - py-pypcap mkdir -p py-pypcap > /dev/null 2>&1 echo x - py-pypcap/Makefile sed 's/^X//' >py-pypcap/Makefile << 'END-of-py-pypcap/Makefile' X# New ports collection makefile for: py-pypcap X# Date created: 15 Jul 2006 X# Whom: George V. Neville-Neil X# X# $FreeBSD$ X# X XPORTNAME= pypcap XPORTVERSION= 1.1 XCATEGORIES= net python XMASTER_SITES= http://monkey.org/~dugsong/pypcap/ XPKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} X XMAINTAINER= gnn@freebsd.org XCOMMENT= Simplified object-oriented Python extension module for libpcap X XBUILD_DEPENDS= pyrexc:${PORTSDIR}/devel/pyrex X XUSE_PYTHON= yes XUSE_PYTHON_PREFIX= yes X Xpost-patch: X ${RM} ${WRKDIR}/${PORTNAME}-${PORTVERSION}/pcap.c X.include END-of-py-pypcap/Makefile echo c - py-pypcap/files mkdir -p py-pypcap/files > /dev/null 2>&1 echo x - py-pypcap/files/patch-pcap.pyx sed 's/^X//' >py-pypcap/files/patch-pcap.pyx << 'END-of-py-pypcap/files/patch-pcap.pyx' X*** pcap.pyx Mon Oct 17 08:00:11 2005 X--- /Users/gnn/src/pypcap-1.1.new/pcap.pyx Fri Jun 23 18:22:03 2006 X*************** X*** 61,66 **** X--- 64,70 ---- X int pcap_stats(pcap_t *p, pcap_stat *ps) X char *pcap_geterr(pcap_t *p) X void pcap_close(pcap_t *p) X+ int pcap_inject(pcap_t *p, char *buf, int size) X int bpf_filter(bpf_insn *insns, char *buf, int len, int caplen) X X cdef extern from "pcap_ex.h": X*************** X*** 313,318 **** X--- 318,338 ---- X elif n == -2: X break X X+ def inject(self, packet, len): X+ """Inject a packet onto an interface. X+ May or may not work depending on platform. X+ X+ Arguments: X+ X+ packet -- a pointer to the packet in memory X+ """ X+ cdef int n X+ n = pcap_inject(self.__pcap, packet, len) X+ if (n < 0): X+ raise OSError, pcap_geterr(self.__pcap) X+ X+ return n X+ X def geterr(self): X """Return the last error message associated with this handle.""" X return pcap_geterr(self.__pcap) END-of-py-pypcap/files/patch-pcap.pyx echo x - py-pypcap/pkg-descr sed 's/^X//' >py-pypcap/pkg-descr << 'END-of-py-pypcap/pkg-descr' XA simplified object-oriented Python extension module for libpcap X XWWW: http://monkey.org/~dugsong/pypcap/ END-of-py-pypcap/pkg-descr echo x - py-pypcap/distinfo sed 's/^X//' >py-pypcap/distinfo << 'END-of-py-pypcap/distinfo' XMD5 (pypcap-1.1.tar.gz) = 034c3cbbfa81aa19e8f685b767c65764 XSHA256 (pypcap-1.1.tar.gz) = 087677295c795f543fad2c286df1807d55876e85d04f7292335cd149f4d8d47f XSIZE (pypcap-1.1.tar.gz) = 22951 END-of-py-pypcap/distinfo echo x - py-pypcap/pkg-plist sed 's/^X//' >py-pypcap/pkg-plist << 'END-of-py-pypcap/pkg-plist' Xlib/python2.4/site-packages/pcap.so END-of-py-pypcap/pkg-plist exit >Release-Note: >Audit-Trail: >Unformatted: