Emulation and simulation of
Wireless Sensor Networks


   Project Page






 Hosted by
SourceForge.net Logo

/home/brennan/n-sim/Vaike/linux/system-addons/networking/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>

Go to the source code of this file.


struct  ipq_handle


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


typedef unsigned long ipq_id_t


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_t * ipq_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)

Define Documentation

#define LDEBUG x...   ) 

Definition at line 40 of file libipq.h.

#define MSG_TRUNC   0x20

Definition at line 45 of file libipq.h.

Typedef Documentation

typedef unsigned long ipq_id_t

Definition at line 34 of file libipq.h.

Function Documentation

struct ipq_handle* ipq_create_handle u_int32_t  flags,
u_int32_t  protocol

Definition at line 207 of file libipq.c.

References ipq_handle::fd, IPQ_ERR_BIND, IPQ_ERR_HANDLE, IPQ_ERR_PROTOCOL, IPQ_ERR_SOCKET, ipq_handle::local, and ipq_handle::peer.

int ipq_ctl const struct ipq_handle h,
int  request,

Definition at line 357 of file libipq.c.

int ipq_destroy_handle struct ipq_handle h  ) 

Definition at line 258 of file libipq.c.

References ipq_handle::fd.

char* ipq_errstr void   ) 

Definition at line 362 of file libipq.c.

int ipq_get_msgerr const unsigned char *  buf  ) 

Definition at line 300 of file libipq.c.

ipq_packet_msg_t* ipq_get_packet const unsigned char *  buf  ) 

Definition at line 307 of file libipq.c.

int ipq_message_type const unsigned char *  buf  ) 

Definition at line 295 of file libipq.c.

void ipq_perror const char *  s  ) 

Definition at line 367 of file libipq.c.

References ipq_errstr().

ssize_t ipq_read const struct ipq_handle h,
unsigned char *  buf,
size_t  len,
int  timeout

Definition at line 289 of file libipq.c.

int ipq_set_mode const struct ipq_handle h,
u_int8_t  mode,
size_t  len

Definition at line 267 of file libipq.c.

References ipq_handle::local.

int ipq_set_verdict const struct ipq_handle h,
ipq_id_t  id,
unsigned int  verdict,
size_t  data_len,
unsigned char *  buf

Definition at line 312 of file libipq.c.

References ipq_handle::local, and ipq_handle::peer.

© 2007, Los Alamos National Security, LLC.