Parsing(3) | Library Functions Manual | Parsing(3) |
nflog_get_msg_packet_hdr, nflog_get_hwtype, nflog_get_msg_packet_hwhdrlen, nflog_get_msg_packet_hwhdr, nflog_get_nfmark, nflog_get_timestamp, nflog_get_indev, nflog_get_physindev, nflog_get_outdev, nflog_get_physoutdev, nflog_get_packet_hw, nflog_get_payload, nflog_get_prefix, nflog_get_uid, nflog_get_gid, nflog_get_seq, nflog_get_seq_global, nflog_get_ctid - Message parsing functions
#include <stddef.h> #include <libnetfilter_log/libnetfilter_log.h>
struct nfulnl_msg_packet_hdr * nflog_get_msg_packet_hdr (struct nflog_data *nfad)
uint16_t nflog_get_hwtype (struct nflog_data *nfad)
uint16_t nflog_get_msg_packet_hwhdrlen (struct nflog_data *nfad)
char * nflog_get_msg_packet_hwhdr (struct nflog_data *nfad)
uint32_t nflog_get_nfmark (struct nflog_data *nfad)
int nflog_get_timestamp (struct nflog_data *nfad, struct timeval *tv)
uint32_t nflog_get_indev (struct nflog_data *nfad)
uint32_t nflog_get_physindev (struct nflog_data *nfad)
uint32_t nflog_get_outdev (struct nflog_data *nfad)
uint32_t nflog_get_physoutdev (struct nflog_data *nfad)
struct nfulnl_msg_packet_hw * nflog_get_packet_hw (struct nflog_data *nfad)
int nflog_get_payload (struct nflog_data *nfad, char **data)
char * nflog_get_prefix (struct nflog_data *nfad)
int nflog_get_uid (struct nflog_data *nfad, uint32_t *uid)
int nflog_get_gid (struct nflog_data *nfad, uint32_t *gid)
int nflog_get_seq (struct nflog_data *nfad, uint32_t *seq)
int nflog_get_seq_global (struct nflog_data *nfad, uint32_t *seq)
int nflog_get_ctid (struct nflog_data *nfad, uint32_t *id)
nflog_get_ct_id - get the conntrack id
Parameters
You must enable this via nflog_set_flags().
Returns
Definition at line 990 of file libnetfilter_log.c.
nflog_get_gid - get the GID of the user that has generated the packet
Parameters
Returns
Definition at line 932 of file libnetfilter_log.c.
nflog_get_hwtype - get the hardware link layer type from logging data
Parameters
Returns
Definition at line 724 of file libnetfilter_log.c.
nflog_get_indev - get the interface that the packet was received through
Parameters
Returns
Warning
Definition at line 799 of file libnetfilter_log.c.
nflog_get_msg_packet_hdr - return the metaheader that wraps the packet
Parameters
Returns
The nfulnl_msg_packet_hdr structure is defined in libnetfilter_log.h as:
struct nfulnl_msg_packet_hdr { uint16_t hw_protocol; // hw protocol (network order) uint8_t hook; // netfilter hook uint8_t _pad; } __attribute__ ((packed));
Definition at line 712 of file libnetfilter_log.c.
nflog_get_msg_packet_hwhdr - get the hardware link layer header
Parameters
Returns
Definition at line 746 of file libnetfilter_log.c.
nflog_get_hwhdrlen - get the length of the hardware link layer header
Parameters
Returns
Definition at line 735 of file libnetfilter_log.c.
nflog_get_nfmark - get the packet mark
Parameters
Returns
Definition at line 757 of file libnetfilter_log.c.
nflog_get_outdev - gets the interface that the packet will be routed to
Parameters
Returns
Definition at line 826 of file libnetfilter_log.c.
nflog_get_packet_hw - get hardware address
Parameters
Retrieves the hardware address associated with the given packet. For ethernet packets, the hardware address returned (if any) will be the MAC address of the packet source host. The destination MAC address is not known until after POSTROUTING and a successful ARP request, so cannot currently be retrieved.
The nfulnl_msg_packet_hw structure is defined in libnetfilter_log.h as:
struct nfulnl_msg_packet_hw { uint16_t hw_addrlen; // Network Byte Order uint16_t _pad; uint8_t hw_addr[8]; } __attribute__ ((packed));
Returns
Definition at line 867 of file libnetfilter_log.c.
nflog_get_payload - get payload of the logged packet
Parameters
Retrieve the payload for a logged packet. The actual amount and type of data retrieved by this function will depend on the mode set with the nflog_set_mode() function.
Returns
Definition at line 884 of file libnetfilter_log.c.
nflog_get_physindev - get the physical interface that the packet was received through
Parameters
Returns
Definition at line 813 of file libnetfilter_log.c.
nflog_get_physoutdev - get the physical interface for packet output
Parameters
Returns
Definition at line 839 of file libnetfilter_log.c.
nflog_get_prefix - get the logging string prefix
Parameters
Returns
Definition at line 900 of file libnetfilter_log.c.
nflog_get_seq - get the local nflog sequence number
Parameters
You must enable this via nflog_set_flags().
Returns
Definition at line 952 of file libnetfilter_log.c.
nflog_get_seq_global - get the global nflog sequence number
Parameters
You must enable this via nflog_set_flags().
Returns
Definition at line 972 of file libnetfilter_log.c.
nflog_get_timestamp - get the packet timestamp
Parameters
Retrieves the received timestamp from the given logged packet.
Returns
Errors
Definition at line 773 of file libnetfilter_log.c.
nflog_get_uid - get the UID of the user that generated the packet
Parameters
Returns
Definition at line 914 of file libnetfilter_log.c.
Generated automatically by Doxygen for libnetfilter_log from the source code.
Version 1.0.2 | libnetfilter_log |