netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
nlmsg.c File Reference
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include <string.h>
#include <libmnl/libmnl.h>
#include "internal.h"
Include dependency graph for nlmsg.c:

Data Structures

struct  mnl_nlmsg_batch
 

Functions

size_t mnl_nlmsg_size (size_t len)
 mnl_nlmsg_size - calculate the size of Netlink message (without alignment) More...
 
 EXPORT_SYMBOL (mnl_nlmsg_size)
 
size_t mnl_nlmsg_get_payload_len (const struct nlmsghdr *nlh)
 mnl_nlmsg_get_payload_len - get the length of the Netlink payload More...
 
 EXPORT_SYMBOL (mnl_nlmsg_get_payload_len)
 
struct nlmsghdrmnl_nlmsg_put_header (void *buf)
 mnl_nlmsg_put_header - reserve and prepare room for Netlink header More...
 
 EXPORT_SYMBOL (mnl_nlmsg_put_header)
 
void * mnl_nlmsg_put_extra_header (struct nlmsghdr *nlh, size_t size)
 mnl_nlmsg_put_extra_header - reserve and prepare room for an extra header More...
 
 EXPORT_SYMBOL (mnl_nlmsg_put_extra_header)
 
void * mnl_nlmsg_get_payload (const struct nlmsghdr *nlh)
 mnl_nlmsg_get_payload - get a pointer to the payload of the netlink message More...
 
 EXPORT_SYMBOL (mnl_nlmsg_get_payload)
 
void * mnl_nlmsg_get_payload_offset (const struct nlmsghdr *nlh, size_t offset)
 mnl_nlmsg_get_payload_offset - get a pointer to the payload of the message More...
 
 EXPORT_SYMBOL (mnl_nlmsg_get_payload_offset)
 
bool mnl_nlmsg_ok (const struct nlmsghdr *nlh, int len)
 mnl_nlmsg_ok - check a there is room for netlink message More...
 
 EXPORT_SYMBOL (mnl_nlmsg_ok)
 
struct nlmsghdrmnl_nlmsg_next (const struct nlmsghdr *nlh, int *len)
 mnl_nlmsg_next - get the next netlink message in a multipart message More...
 
 EXPORT_SYMBOL (mnl_nlmsg_next)
 
void * mnl_nlmsg_get_payload_tail (const struct nlmsghdr *nlh)
 mnl_nlmsg_get_payload_tail - get the ending of the netlink message More...
 
 EXPORT_SYMBOL (mnl_nlmsg_get_payload_tail)
 
bool mnl_nlmsg_seq_ok (const struct nlmsghdr *nlh, unsigned int seq)
 mnl_nlmsg_seq_ok - perform sequence tracking More...
 
 EXPORT_SYMBOL (mnl_nlmsg_seq_ok)
 
bool mnl_nlmsg_portid_ok (const struct nlmsghdr *nlh, unsigned int portid)
 mnl_nlmsg_portid_ok - perform portID origin check More...
 
 EXPORT_SYMBOL (mnl_nlmsg_portid_ok)
 
void mnl_nlmsg_fprintf (FILE *fd, const void *data, size_t datalen, size_t extra_header_size)
 mnl_nlmsg_fprintf - print netlink message to file More...
 
 EXPORT_SYMBOL (mnl_nlmsg_fprintf)
 
struct mnl_nlmsg_batchmnl_nlmsg_batch_start (void *buf, size_t limit)
 mnl_nlmsg_batch_start - initialize a batch More...
 
 EXPORT_SYMBOL (mnl_nlmsg_batch_start)
 
void mnl_nlmsg_batch_stop (struct mnl_nlmsg_batch *b)
 mnl_nlmsg_batch_stop - release a batch More...
 
 EXPORT_SYMBOL (mnl_nlmsg_batch_stop)
 
bool mnl_nlmsg_batch_next (struct mnl_nlmsg_batch *b)
 mnl_nlmsg_batch_next - get room for the next message in the batch More...
 
 EXPORT_SYMBOL (mnl_nlmsg_batch_next)
 
void mnl_nlmsg_batch_reset (struct mnl_nlmsg_batch *b)
 mnl_nlmsg_batch_reset - reset the batch More...
 
 EXPORT_SYMBOL (mnl_nlmsg_batch_reset)
 
size_t mnl_nlmsg_batch_size (struct mnl_nlmsg_batch *b)
 mnl_nlmsg_batch_size - get current size of the batch More...
 
 EXPORT_SYMBOL (mnl_nlmsg_batch_size)
 
void * mnl_nlmsg_batch_head (struct mnl_nlmsg_batch *b)
 mnl_nlmsg_batch_head - get head of this batch More...
 
 EXPORT_SYMBOL (mnl_nlmsg_batch_head)
 
void * mnl_nlmsg_batch_current (struct mnl_nlmsg_batch *b)
 mnl_nlmsg_batch_current - returns current position in the batch More...
 
 EXPORT_SYMBOL (mnl_nlmsg_batch_current)
 
bool mnl_nlmsg_batch_is_empty (struct mnl_nlmsg_batch *b)
 mnl_nlmsg_batch_is_empty - check if there is any message in the batch More...
 
 EXPORT_SYMBOL (mnl_nlmsg_batch_is_empty)
 

Variables

struct mnl_nlmsg_batch __attribute__