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

Functions

uint16_t mnl_attr_get_type (const struct nlattr *attr)
 mnl_attr_get_type - get type of netlink attribute More...
 
 EXPORT_SYMBOL (mnl_attr_get_type)
 
uint16_t mnl_attr_get_len (const struct nlattr *attr)
 mnl_attr_get_len - get length of netlink attribute More...
 
 EXPORT_SYMBOL (mnl_attr_get_len)
 
uint16_t mnl_attr_get_payload_len (const struct nlattr *attr)
 mnl_attr_get_payload_len - get the attribute payload-value length More...
 
 EXPORT_SYMBOL (mnl_attr_get_payload_len)
 
void * mnl_attr_get_payload (const struct nlattr *attr)
 mnl_attr_get_payload - get pointer to the attribute payload More...
 
 EXPORT_SYMBOL (mnl_attr_get_payload)
 
bool mnl_attr_ok (const struct nlattr *attr, int len)
 mnl_attr_ok - check if there is room for an attribute in a buffer More...
 
 EXPORT_SYMBOL (mnl_attr_ok)
 
struct nlattrmnl_attr_next (const struct nlattr *attr)
 mnl_attr_next - get the next attribute in the payload of a netlink message More...
 
 EXPORT_SYMBOL (mnl_attr_next)
 
int mnl_attr_type_valid (const struct nlattr *attr, uint16_t max)
 mnl_attr_type_valid - check if the attribute type is valid More...
 
 EXPORT_SYMBOL (mnl_attr_type_valid)
 
int mnl_attr_validate (const struct nlattr *attr, enum mnl_attr_data_type type)
 mnl_attr_validate - validate netlink attribute (simplified version) More...
 
 EXPORT_SYMBOL (mnl_attr_validate)
 
int mnl_attr_validate2 (const struct nlattr *attr, enum mnl_attr_data_type type, size_t exp_len)
 mnl_attr_validate2 - validate netlink attribute (extended version) More...
 
 EXPORT_SYMBOL (mnl_attr_validate2)
 
int mnl_attr_parse (const struct nlmsghdr *nlh, unsigned int offset, mnl_attr_cb_t cb, void *data)
 mnl_attr_parse - parse attributes More...
 
 EXPORT_SYMBOL (mnl_attr_parse)
 
int mnl_attr_parse_nested (const struct nlattr *nested, mnl_attr_cb_t cb, void *data)
 mnl_attr_parse_nested - parse attributes inside a nest More...
 
 EXPORT_SYMBOL (mnl_attr_parse_nested)
 
int mnl_attr_parse_payload (const void *payload, size_t payload_len, mnl_attr_cb_t cb, void *data)
 mnl_attr_parse_payload - parse attributes in payload of Netlink message More...
 
 EXPORT_SYMBOL (mnl_attr_parse_payload)
 
uint8_t mnl_attr_get_u8 (const struct nlattr *attr)
 mnl_attr_get_u8 - returns 8-bit unsigned integer attribute payload More...
 
 EXPORT_SYMBOL (mnl_attr_get_u8)
 
uint16_t mnl_attr_get_u16 (const struct nlattr *attr)
 mnl_attr_get_u16 - returns 16-bit unsigned integer attribute payload More...
 
 EXPORT_SYMBOL (mnl_attr_get_u16)
 
uint32_t mnl_attr_get_u32 (const struct nlattr *attr)
 mnl_attr_get_u32 - returns 32-bit unsigned integer attribute payload More...
 
 EXPORT_SYMBOL (mnl_attr_get_u32)
 
uint64_t mnl_attr_get_u64 (const struct nlattr *attr)
 mnl_attr_get_u64 - returns 64-bit unsigned integer attribute. More...
 
 EXPORT_SYMBOL (mnl_attr_get_u64)
 
const char * mnl_attr_get_str (const struct nlattr *attr)
 mnl_attr_get_str - returns pointer to string attribute. More...
 
 EXPORT_SYMBOL (mnl_attr_get_str)
 
void mnl_attr_put (struct nlmsghdr *nlh, uint16_t type, size_t len, const void *data)
 mnl_attr_put - add an attribute to netlink message More...
 
 EXPORT_SYMBOL (mnl_attr_put)
 
void mnl_attr_put_u8 (struct nlmsghdr *nlh, uint16_t type, uint8_t data)
 mnl_attr_put_u8 - add 8-bit unsigned integer attribute to netlink message More...
 
 EXPORT_SYMBOL (mnl_attr_put_u8)
 
void mnl_attr_put_u16 (struct nlmsghdr *nlh, uint16_t type, uint16_t data)
 mnl_attr_put_u16 - add 16-bit unsigned integer attribute to netlink message More...
 
 EXPORT_SYMBOL (mnl_attr_put_u16)
 
void mnl_attr_put_u32 (struct nlmsghdr *nlh, uint16_t type, uint32_t data)
 mnl_attr_put_u32 - add 32-bit unsigned integer attribute to netlink message More...
 
 EXPORT_SYMBOL (mnl_attr_put_u32)
 
void mnl_attr_put_u64 (struct nlmsghdr *nlh, uint16_t type, uint64_t data)
 mnl_attr_put_u64 - add 64-bit unsigned integer attribute to netlink message More...
 
 EXPORT_SYMBOL (mnl_attr_put_u64)
 
void mnl_attr_put_str (struct nlmsghdr *nlh, uint16_t type, const char *data)
 mnl_attr_put_str - add string attribute to netlink message More...
 
 EXPORT_SYMBOL (mnl_attr_put_str)
 
void mnl_attr_put_strz (struct nlmsghdr *nlh, uint16_t type, const char *data)
 mnl_attr_put_strz - add string attribute to netlink message More...
 
 EXPORT_SYMBOL (mnl_attr_put_strz)
 
struct nlattrmnl_attr_nest_start (struct nlmsghdr *nlh, uint16_t type)
 mnl_attr_nest_start - start an attribute nest More...
 
 EXPORT_SYMBOL (mnl_attr_nest_start)
 
bool mnl_attr_put_check (struct nlmsghdr *nlh, size_t buflen, uint16_t type, size_t len, const void *data)
 mnl_attr_put_check - add an attribute to netlink message More...
 
 EXPORT_SYMBOL (mnl_attr_put_check)
 
bool mnl_attr_put_u8_check (struct nlmsghdr *nlh, size_t buflen, uint16_t type, uint8_t data)
 mnl_attr_put_u8_check - add 8-bit unsigned int attribute to netlink message More...
 
 EXPORT_SYMBOL (mnl_attr_put_u8_check)
 
bool mnl_attr_put_u16_check (struct nlmsghdr *nlh, size_t buflen, uint16_t type, uint16_t data)
 mnl_attr_put_u16_check - add 16-bit unsigned int attribute to netlink message More...
 
 EXPORT_SYMBOL (mnl_attr_put_u16_check)
 
bool mnl_attr_put_u32_check (struct nlmsghdr *nlh, size_t buflen, uint16_t type, uint32_t data)
 mnl_attr_put_u32_check - add 32-bit unsigned int attribute to netlink message More...
 
 EXPORT_SYMBOL (mnl_attr_put_u32_check)
 
bool mnl_attr_put_u64_check (struct nlmsghdr *nlh, size_t buflen, uint16_t type, uint64_t data)
 mnl_attr_put_u64_check - add 64-bit unsigned int attribute to netlink message More...
 
 EXPORT_SYMBOL (mnl_attr_put_u64_check)
 
bool mnl_attr_put_str_check (struct nlmsghdr *nlh, size_t buflen, uint16_t type, const char *data)
 mnl_attr_put_str_check - add string attribute to netlink message More...
 
 EXPORT_SYMBOL (mnl_attr_put_str_check)
 
bool mnl_attr_put_strz_check (struct nlmsghdr *nlh, size_t buflen, uint16_t type, const char *data)
 mnl_attr_put_strz_check - add string attribute to netlink message More...
 
 EXPORT_SYMBOL (mnl_attr_put_strz_check)
 
struct nlattrmnl_attr_nest_start_check (struct nlmsghdr *nlh, size_t buflen, uint16_t type)
 mnl_attr_nest_start_check - start an attribute nest More...
 
 EXPORT_SYMBOL (mnl_attr_nest_start_check)
 
void mnl_attr_nest_end (struct nlmsghdr *nlh, struct nlattr *start)
 mnl_attr_nest_end - end an attribute nest More...
 
 EXPORT_SYMBOL (mnl_attr_nest_end)
 
void mnl_attr_nest_cancel (struct nlmsghdr *nlh, struct nlattr *start)
 mnl_attr_nest_cancel - cancel an attribute nest More...
 
 EXPORT_SYMBOL (mnl_attr_nest_cancel)