Packet Location Aliasing. More...
|int||rtnl_pktloc_lookup (const char *name, struct rtnl_pktloc **result)|
|Lookup packet location alias. More...|
|struct rtnl_pktloc *||rtnl_pktloc_alloc (void)|
|Allocate packet location object. |
|void||rtnl_pktloc_put (struct rtnl_pktloc *loc)|
|Return reference of a packet location. More...|
|int||rtnl_pktloc_add (struct rtnl_pktloc *loc)|
|Add a packet location to the hash table. More...|
|void||rtnl_pktloc_foreach (void(*cb)(struct rtnl_pktloc *, void *), void *arg)|
Packet Location Aliasing.
The packet location aliasing interface eases the use of offset definitions inside packets by allowing them to be referenced by name. Known positions of protocol fields are stored in a configuration file and associated with a name for later reference. The configuration file is distributed with the library and provides a well defined set of definitions for most common protocol fields.
|int rtnl_pktloc_lookup||(||const char *||name,|
|struct rtnl_pktloc **||result|
Lookup packet location alias.
|name||Name of packet location.|
Tries to find a matching packet location alias for the supplied packet location name.
The file containing the packet location definitions is automatically re-read if its modification time has changed since the last call.
The returned packet location has to be returned after use by calling rtnl_pktloc_put() in order to allow freeing its memory after the last user has abandoned it.
|NLE_PKTLOC_FILE||Unable to open packet location file.|
|NLE_OBJ_NOTFOUND||No matching packet location alias found.|
|void rtnl_pktloc_put||(||struct rtnl_pktloc *||loc||)|