pax_global_header 0000666 0000000 0000000 00000000064 14377602470 0014524 g ustar 00root root 0000000 0000000 52 comment=e38557217daa66d350dc009a74629d06d25c665d
python-netfilterqueue-1.1.0/ 0000775 0000000 0000000 00000000000 14377602470 0016103 5 ustar 00root root 0000000 0000000 python-netfilterqueue-1.1.0/.github/ 0000775 0000000 0000000 00000000000 14377602470 0017443 5 ustar 00root root 0000000 0000000 python-netfilterqueue-1.1.0/.github/workflows/ 0000775 0000000 0000000 00000000000 14377602470 0021500 5 ustar 00root root 0000000 0000000 python-netfilterqueue-1.1.0/.github/workflows/ci.yml 0000664 0000000 0000000 00000002150 14377602470 0022614 0 ustar 00root root 0000000 0000000 name: CI
on:
push:
branches:
- master
pull_request:
jobs:
Ubuntu:
name: 'Ubuntu (${{ matrix.python }}${{ matrix.extra_name }})'
timeout-minutes: 10
runs-on: 'ubuntu-latest'
strategy:
fail-fast: false
matrix:
python:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- 'pypy-3.7'
- 'pypy-3.8'
- 'pypy-3.9'
check_lint: ['0']
extra_name: ['']
include:
- python: '3.9'
check_lint: '1'
extra_name: ', check lint'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ fromJSON(format('["{0}", "{1}"]', format('{0}.0-alpha - {0}.X', matrix.python), matrix.python))[startsWith(matrix.python, 'pypy')] }}
- name: Run tests
run: ./ci.sh
env:
CHECK_LINT: '${{ matrix.check_lint }}'
# Should match 'name:' up above
JOB_NAME: 'Ubuntu (${{ matrix.python }}${{ matrix.extra_name }})'
python-netfilterqueue-1.1.0/.gitignore 0000664 0000000 0000000 00000000033 14377602470 0020067 0 ustar 00root root 0000000 0000000 *.so
build/
dist/
MANIFEST
python-netfilterqueue-1.1.0/CHANGES.txt 0000664 0000000 0000000 00000003563 14377602470 0017723 0 ustar 00root root 0000000 0000000 v1.1.0, 1 Mar 2023
Add Packet accessors for {indev, outdev, physindev, physoutdev} interface indices
v1.0.0, 14 Jan 2022
Propagate exceptions raised by the user's packet callback
Avoid calls to the packet callback during queue unbinding
Raise an error if a packet verdict is set after its parent queue is closed
set_payload() now affects the result of later get_payload()
Handle signals received when run() is blocked in recv()
Accept packets in COPY_META mode, only failing on an attempt to access the payload
Add a parameter NetfilterQueue(sockfd=N) that uses an already-opened Netlink socket
Add type hints
Remove the Packet.payload attribute; it was never safe (treated as a char* but not NUL-terminated) nor documented, but was exposed in the API (perhaps inadvertently).
v0.9.0, 12 Jan 2022
Improve usability when Packet objects are retained past the callback
Add Packet.retain() to save the packet contents in such cases
Eliminate warnings during build on py3
Add CI and basic test suite
Raise a warning, not an error, if we don't get the bufsize we want
Don't allow bind() more than once on the same NetfilterQueue, since that would leak the old queue handle
** This will be the last version with support for Python 2.7. **
v0.8.1, 30 Jan 2017
Fix bug #25- crashing when used in OUTPUT or POSTROUTING chains
v0.8, 15 Dec 2016
Add get_hw()
Fix byte order bug in set_mark
v0.7, 28 June 2016
Add Python 3 compatibility.
Add sock_len argument to bind()
Add block argument to run()
Add run_socket()
Fix COPY* constants
Don't crash on double unlink()
v0.6, 15 Apr 2013
Add get_mark.
v0.5, 3 Apr 2013
Add repeat.
v0.4, 24 Dec 2012
Add set_payload.
v0.2, 13 May 2011
Rename NetfilterQueue to QueueHandler.
Add API section to README.rst.
v0.1, 12 May 2011
Initial release.
python-netfilterqueue-1.1.0/LICENSE.txt 0000664 0000000 0000000 00000002057 14377602470 0017732 0 ustar 00root root 0000000 0000000 Copyright (c) 2011, Kerkhoff Technologies Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
python-netfilterqueue-1.1.0/MANIFEST.in 0000664 0000000 0000000 00000000215 14377602470 0017637 0 ustar 00root root 0000000 0000000 include LICENSE.txt README.rst CHANGES.txt
recursive-include netfilterqueue *.py *.pyx *.pxd *.c *.pyi py.typed
recursive-include tests *.py
python-netfilterqueue-1.1.0/README.rst 0000664 0000000 0000000 00000033136 14377602470 0017600 0 ustar 00root root 0000000 0000000 .. image:: https://img.shields.io/pypi/v/netfilterqueue.svg
:target: https://pypi.org/project/netfilterqueue
:alt: Latest PyPI version
.. image:: https://github.com/oremanj/python-netfilterqueue/actions/workflows/ci.yml/badge.svg?branch=master
:target: https://github.com/oremanj/python-netfilterqueue/actions?query=branch%3Amaster
:alt: Automated test status
==============
NetfilterQueue
==============
NetfilterQueue provides access to packets matched by an iptables rule in
Linux. Packets so matched can be accepted, dropped, altered, reordered,
or given a mark.
libnetfilter_queue (the netfilter library, not this module) is part of the
`Netfilter project