nmsg 1.1.2
|
Message filtering API. More...
Go to the source code of this file.
Typedefs | |
typedef nmsg_res(* | nmsg_filter_message_fp) (nmsg_message_t *msg, void *user, nmsg_filter_message_verdict *vres) |
Function pointer type for a function that performs message filtering. | |
Enumerations | |
enum | nmsg_filter_message_verdict { nmsg_filter_message_verdict_DECLINED , nmsg_filter_message_verdict_ACCEPT , nmsg_filter_message_verdict_DROP } |
Message filtering API.
Definition in file filter.h.
typedef nmsg_res(* nmsg_filter_message_fp) (nmsg_message_t *msg, void *user, nmsg_filter_message_verdict *vres) |
Function pointer type for a function that performs message filtering.
The filter function should read the message in 'msg' and return a filter verdict in the 'vres' parameter-return variable.
The filter function may alter the message object, or it may replace the message object with an entirely new message. If the filter function replaces the message object, it is responsible for disposing of the old message, for instance by calling nmsg_message_destroy().
[in,out] | msg | Pointer to message object. |
[in] | user | NULL or a filter-specific user pointer. |
[out] | vres | The filter verdict. |