libnl 2.0
|
Packet Location Aliasing. More...
Functions | |
int | rtnl_pktloc_lookup (const char *name, struct rtnl_pktloc **result) |
Lookup packet location alias. |
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.
struct rtnl_pktloc *loc; rtnl_pktloc_lookup("ip.src", &loc);
int rtnl_pktloc_lookup | ( | const char * | name, |
struct rtnl_pktloc ** | result | ||
) |
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.
NLE_PKTLOC_FILE | Unable to open packet location file. |
NLE_OBJ_NOTFOUND | No matching packet location alias found. |