No description
![]() added support functions to access the netlink attributes and use custom callback handlers. Most is wrapped as is, but there are a couple of special cases handled. 1) void *nla_data(struct nlattr *); The return value is changed to a Python byte array so it includes the lenght of the data stream. 2) int nla_parse_nested(...); This returns a tuple (err, dict). 'err' is the error code and 'dict' is a dictionary with attribute identifier as key and value represents a struct nlattr object. 3) macro nla_for_each_nested() Provide nla_get_nested() which returns a Python list of struct nlattr objects that is iterable. 4) allocate struct nla_policy array Provide nla_policy_array() function that allocates consecutive space in memory for struct nla_policy array entries. Each entry is put in a Python list so the entry fields can be modified in Python. This array object can be passed to the nla_parse_nested() function. Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Thomas Graf <tgraf@suug.ch> |
||
---|---|---|
doc | ||
etc | ||
include | ||
lib | ||
m4 | ||
man | ||
python | ||
src | ||
tests | ||
.gitignore | ||
autogen.sh | ||
ChangeLog | ||
configure.ac | ||
COPYING | ||
libnl-3.0.pc.in | ||
libnl-cli-3.0.pc.in | ||
libnl-genl-3.0.pc.in | ||
libnl-nf-3.0.pc.in | ||
libnl-route-3.0.pc.in | ||
Makefile.am |