Feature #415
closedAPI call: per packet acquisition module packet release function
Description
When discarding a packet because Suricata is done with it, AF_PACKET with mmap needs to tell the kernel to release it. Tilera needs the same.
Allow each pkt acq module to register a packet release function.
Make sure this function is called in TmqhOutputPacketpool.
Document!
(side thought: can this be used to set verdicts in nfq as well?)
Files
Updated by Eric Leblond over 12 years ago
- File 0001-capture-add-data-release-mechanism.patch 0001-capture-add-data-release-mechanism.patch added
- % Done changed from 0 to 60
The attached patch implement a similar idea. It adds a data release mechanism. If the capture module has a call to indicate that userland has finished with the data,
it is possible to use this system. The data will then be released when the treatment of the packet is finished.
To do so the Packet structure has been modified:
+ TmEcode (*ReleaseData)(struct Packet_ *); + void *relptr;
If ReleaseData and relptr are not null, the function is called
when the treatment of the Packet is finished.
Thus it is sufficient for the capture module to code a function
wrapping the data release mechanism and to assign it to ReleaseData
field.
All locking have to be handled by the ReleaseData function.
Updated by Eric Leblond over 12 years ago
- Target version changed from 1.4 to 1.4beta1
Updated by Victor Julien over 12 years ago
- Status changed from New to Closed
- % Done changed from 60 to 100