netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
object.c File Reference
#include <netlink-local.h>
#include <netlink/netlink.h>
#include <netlink/cache.h>
#include <netlink/object.h>
#include <netlink/utils.h>
Include dependency graph for object.c:

Data Structures

struct  nl_derived_object
 

Functions

Object Creation/Deletion
struct nl_objectnl_object_alloc (struct nl_object_ops *ops)
 Allocate a new object of kind specified by the operations handle. More...
 
int nl_object_alloc_name (const char *kind, struct nl_object **result)
 Allocate a new object of kind specified by the name. More...
 
struct nl_objectnl_object_clone (struct nl_object *obj)
 Allocate a new object and copy all data from an existing object. More...
 
void nl_object_free (struct nl_object *obj)
 Free a cacheable object. More...
 
Reference Management
void nl_object_get (struct nl_object *obj)
 Acquire a reference on a object. More...
 
void nl_object_put (struct nl_object *obj)
 Release a reference from an object. More...
 
int nl_object_shared (struct nl_object *obj)
 Check whether this object is used by multiple users. More...
 
Marks
void nl_object_mark (struct nl_object *obj)
 Add mark to object. More...
 
void nl_object_unmark (struct nl_object *obj)
 Remove mark from object. More...
 
int nl_object_is_marked (struct nl_object *obj)
 Return true if object is marked. More...
 
Utillities
void nl_object_dump (struct nl_object *obj, struct nl_dump_params *params)
 Dump this object according to the specified parameters. More...
 
int nl_object_identical (struct nl_object *a, struct nl_object *b)
 Check if the identifiers of two objects are identical. More...
 
uint32_t nl_object_diff (struct nl_object *a, struct nl_object *b)
 Compute bitmask representing difference in attribute values. More...
 
int nl_object_match_filter (struct nl_object *obj, struct nl_object *filter)
 Match a filter against an object. More...
 
char * nl_object_attrs2str (struct nl_object *obj, uint32_t attrs, char *buf, size_t len)
 Convert bitmask of attributes to a character string. More...
 
char * nl_object_attr_list (struct nl_object *obj, char *buf, size_t len)
 Return list of attributes present in an object. More...
 
Attributes
int nl_object_get_refcnt (struct nl_object *obj)
 
struct nl_cachenl_object_get_cache (struct nl_object *obj)