From f4f0828066ba2a5823dd32ff3c199524817e71ea Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 13 May 2011 10:02:54 -0700 Subject: [PATCH] Minor README format changes --- README.rst | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/README.rst b/README.rst index 5e959ab..da0833b 100644 --- a/README.rst +++ b/README.rst @@ -5,12 +5,14 @@ NetfilterQueue NetfilterQueue provides access to packets matched by an iptables rule in Linux. Packets so matched can be accepted, dropped, altered, or given a mark. -Libnetfilter_queue (the netfilter library, not this module) is part of the `Netfilter project `_. +Libnetfilter_queue (the netfilter library, not this module) is part of the +`Netfilter project `_. Example ======= -The following script prints a short description of each packet before accepting it. :: +The following script prints a short description of each packet before accepting +it. :: from netfilterqueue import QueueHandler @@ -33,7 +35,8 @@ To send packets destined for your LAN to the script, type something like:: Installation ============ -NetfilterQueue is a C extention module that links against libnetfilter_queue. Before installing, ensure you have: +NetfilterQueue is a C extention module that links against libnetfilter_queue. +Before installing, ensure you have: 1. A C compiler @@ -62,7 +65,8 @@ To install from source:: cd NetfilterQueue-0.2 python setup.py install -Setup will use Cython if it is installed, regenerating the .c source from the .pyx before compiling the .so. +Setup will use Cython if it is installed, regenerating the .c source from the +.pyx before compiling the .so. API === @@ -72,7 +76,8 @@ API ``NetfilterQueue.COPY_META`` ``NetfilterQueue.COPY_PACKET`` - These constants specify how much of the packet should be given to the script- nothing, metadata, or the whole packet. + These constants specify how much of the packet should be given to the + script- nothing, metadata, or the whole packet. QueueHandler objects -------------------- @@ -97,7 +102,8 @@ handle() method. Handle() is called for each packet that appears in the queue. ``QueueHandler.handle(packet)`` Handle a single packet from the queue. You must call either - ``packet.accept()`` or ``packet.drop()``. + ``packet.accept()`` or ``packet.drop()``. If you don't override this + method, all packets will be accepted. Packet objects -------------- @@ -177,8 +183,8 @@ More details coming soon... * Probably other stuff is omitted too * When a packet has been marked, we use nfq_set_verdict_mark rather than - nfq_set_verdict2. Apparently nfq_set_verdict_mark - `is broken `_, + nfq_set_verdict2. Apparently nfq_set_verdict_mark is + `broken `_, although it works for me. Source @@ -191,4 +197,5 @@ License Copyright (c) 2011, Kerkhoff Technologies, Inc. All rights reserved. -`BSD `_ licensed. +`BSD `_ +licensed.