Project

General

Profile

Actions

Feature #415

closed

API call: per packet acquisition module packet release function

Added by Victor Julien over 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Effort:
Difficulty:
Label:

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

Actions #1

Updated by Eric Leblond over 12 years ago

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.

Actions #2

Updated by Eric Leblond over 12 years ago

  • Target version changed from 1.4 to 1.4beta1
Actions #3

Updated by Victor Julien about 12 years ago

  • Status changed from New to Closed
  • % Done changed from 60 to 100
Actions

Also available in: Atom PDF