firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
libipq.h File Reference
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/uio.h>
#include <asm/types.h>
#include <linux/netlink.h>
#include <linux/netfilter_ipv4/ip_queue.h>
Include dependency graph for libipq.h:
This graph shows which files directly or indirectly include this file:

Data Structures

struct  ipq_handle


#define LDEBUG(x...)
#define MSG_TRUNC   0x20


typedef unsigned long ipq_id_t


struct ipq_handleipq_create_handle (u_int32_t flags, u_int32_t protocol)
int ipq_destroy_handle (struct ipq_handle *h)
ssize_t ipq_read (const struct ipq_handle *h, unsigned char *buf, size_t len, int timeout)
int ipq_set_mode (const struct ipq_handle *h, u_int8_t mode, size_t len)
ipq_packet_msg_tipq_get_packet (const unsigned char *buf)
int ipq_message_type (const unsigned char *buf)
int ipq_get_msgerr (const unsigned char *buf)
int ipq_set_verdict (const struct ipq_handle *h, ipq_id_t id, unsigned int verdict, size_t data_len, unsigned char *buf)
int ipq_ctl (const struct ipq_handle *h, int request,...)
char * ipq_errstr (void)
void ipq_perror (const char *s)

Macro Definition Documentation

#define LDEBUG (   x...)
#define MSG_TRUNC   0x20

Typedef Documentation

typedef unsigned long ipq_id_t

Function Documentation

struct ipq_handle* ipq_create_handle ( u_int32_t  flags,
u_int32_t  protocol 
int ipq_ctl ( const struct ipq_handle h,
int  request,
int ipq_destroy_handle ( struct ipq_handle h)

References ipq_handle::fd.

char* ipq_errstr ( void  )

Referenced by ipq_perror().

Here is the caller graph for this function:

int ipq_get_msgerr ( const unsigned char *  buf)

References nlmsgerr::error, and NLMSG_DATA.

ipq_packet_msg_t* ipq_get_packet ( const unsigned char *  buf)

References NLMSG_DATA.

int ipq_message_type ( const unsigned char *  buf)
void ipq_perror ( const char *  s)

References ipq_errstr().

Here is the call graph for this function:

ssize_t ipq_read ( const struct ipq_handle h,
unsigned char *  buf,
size_t  len,
int  timeout 
int ipq_set_mode ( const struct ipq_handle h,
u_int8_t  mode,
size_t  len