summaryrefslogtreecommitdiffstats
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2008-05-14Replace RTNL_LINK_NOT_FOUND with just 0Thomas Graf1-6/+0
The interface index 0 is reserved and can be safely used to signal that the device does not exist.
2008-05-14Remove obsolete nla_get_addr() and nla_get_data()Thomas Graf3-8/+4
Replaces obsolete calls to nla_get_addr() and nla_get_data() with nl_addr_alloc_attr() respectively nl_data_alloc_attr(). Also fixes missing error handling while parsing routing multipath configuration.
2008-05-14Break API some moreThomas Graf4-12/+0
Since we've broken the API anyway, remove some aliases which only exist for backwards compatibility.
2008-05-14Thread-safe error handlingThomas Graf24-454/+440
In order for the interface to become more thread safe, the error handling was revised to no longer depend on a static errno and error string buffer. This patch converts all error paths to return a libnl specific error code which can be translated to a error message using nl_geterror(int error). The functions nl_error() and nl_get_errno() are therefore obsolete. This change required various sets of function prototypes to be changed in order to return an error code, the most prominent are: struct nl_cache *foo_alloc_cache(...); changed to: int foo_alloc_cache(..., struct nl_cache **); struct nl_msg *foo_build_request(...); changed to: int foo_build_request(..., struct nl_msg **); struct foo *foo_parse(...); changed to: int foo_parse(..., struct foo **); This pretty much only leaves trivial allocation functions to still return a pointer object which can still return NULL to signal out of memory. This change is a serious API and ABI breaker, sorry!
2008-05-08Added two new functions to facilitate processing the nexthop entries for routes.Ben Gamsa1-0/+6
Added rtnl_route_foreach_nexthop() to walk the list of nexthops invoking a caller-provided callback for each nexthop entry, and added rtnl_route_nexthop_n() to retrieve the Nth nexthop entry in the list.
2008-05-05ignore more temporary filesThomas Graf1-0/+1
2008-05-05Route cache supportThomas Graf1-1/+5
This changesets adds the possibility to fill a nl_cache with the contents of the route cache. It also adds the possibility to limit route caches to certain address families.
2008-04-30New netem funtionality and TBF fixTad Kollar3-0/+29
New netem-related functionality: Added ability to save new settings to the kernel. In netem.c, the netem_get_opts() stub has been replaced with netem_build_msg() which manipulates the nl_msg data directly and returns an error code instead of a new nl_msg. Modifications to qdisc_build() in qdisc.c and struct rtnl_qdisc_ops were necessary for this. Added support for getting/setting corruption probability/correlation. Added support for setting a delay distribution. Fixed tbf_msg_parser() to call tbf_alloc() instead of tbf_qdisc() to prevent a seg fault.
2008-04-30version.h.in should be in tree not the generated versionThomas Graf1-2/+2
2008-04-30Provide libnl version in <netlink/version.h>Thomas Graf2-0/+19
2008-04-29libnl: recvmsgs doesn't necessarily free the message dataInaky Perez-Gonzalez1-0/+14
I stepped over libnl always freeing the messages and it kind of made it awkward to reuse the message data without reallocating. The basic idea is: if a callback return value has a bit set, don't free that message. The calling application owns it. By default, things stay as before (messages are freed). Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-04-29Big routing code rework (API/ABI BREAK!)Thomas Graf6-64/+75
Adds all missing routing attributes and brings the routing related code to a working state. In the process the API was broken several times with the justification that nobody is using this code yet. The changes include new example code which is also a prototype for how plain CLI tools could look like to control routes.
2008-04-29Export nl_dump_line() and automatically count lines while dumpingThomas Graf3-18/+21
2008-03-29[LIBNL]: Install netlink/route/link headersPatrick McHardy1-0/+2
Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-03-05[PATCH] Remove usage of C++ keyword 'class' on htb.h header.Rui Tiago Cação Matos1-3/+3
Signed-off-by: Rui Tiago Cação Matos <rmatos@av.it.pt>
2008-03-05Update local copy of linux/rtnetlink.hThomas Graf1-1/+43
2008-02-07Fix nfnl_queue_msg_get_packetid() return typePatrick McHardy1-1/+1
[LIBNL]: Fix nfnl_queue_msg_get_packetid() return type The packet-ID is a 32 bit value, but nfnl_queue_msg_get_packetid() returns an uint16_t. Makes queueing fail after 2^16 packets. Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-02-07[LIBNL]: Install netfilter headersPatrick McHardy1-0/+2
libnl currently forgets to install the netfilter headers. Fix that. Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-02-07[LIBNL]: Support conntrack add/delete/query requestsPatrick McHardy1-0/+9
Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-02-07[LIBNL]: Split up nfnetlink_log into log and msg objectsPatrick McHardy3-75/+186
Split the nfnetlink_log code into two seperate objects, "netfilter/log" to represent logging instances and "netfilter/log_msg" to represent log messages. Also perform some function name unification for consistency with other libnl object types, mainly renaming nfnl_log_build_*_msg to nfnl_log_build_*_request. This changes the API in an incompatible way, but since this feature is new and the libnl netfilter headers haven't been installed so far, there shouldn't be any users affected by this. Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-02-07[LIBNL]: nfnetlink_log: support NUFLA_GID attributePatrick McHardy3-0/+6
The NUFLA_GID attribute (currently only in net-2.6.25) contains the gid of the sending process for locally generated packets. Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-02-07[LIBNL]: Add nfnetlink_queue supportPatrick McHardy4-0/+311
Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-02-07[LIBNL]: Generic netfilter stuffPatrick McHardy2-0/+70
Add some generic helper functions for netfilter. Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-02-07[LIBNL]: Add if_vlan.hPatrick McHardy1-0/+61
vlan support needs VLAN_FLAG_REORDER_HDR, which is not available in older if_vlan.h versions. Add the current version from the kernel. Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-01-30Detailed attribute documentationThomas Graf2-118/+108
This patch extends and reorganizes the existing attribute documentation and includes various verbose examples.
2008-01-30Abstract address allocation based on netlink attributeThomas Graf1-0/+1
2008-01-30Abstract data allocation based on netlink attributeThomas Graf1-0/+1
2008-01-14Improve message/attribute construction documentation and add nlmsg_expand()Thomas Graf1-0/+2
2008-01-14Fix stale data pointers when constructing messagesThomas Graf2-0/+3
Patrick McHardy reported a problem where pointers to the payload of a netlink message as returned by f.e. the nesting helpers become stale when the payload data chunk is reallocated. In order to avoid further problems, the payload chunk is no longer extended on the fly. Instead the allocation is made during netlink message object allocation time with a default size of a page which should be fine for the majority of all users. Additionally the functions nlmsg_alloc_size() and nlmsg_set_default_size() have been added to allocate messages of a particular length and to modify the default message size.
2008-01-10Added additional parsing and validation functions for generic netlinkThomas Graf2-0/+9
Also adds better example documentation for generic netlink
2008-01-08Link info interface and vlan supportThomas Graf5-0/+181
Adds an external interface to implement link info types and implements the type vlan.
2007-12-19Support link operstate and linkmodeThomas Graf4-3/+49
2007-12-18Include linux/ip_mg_alg.h internally for compatibility onlyThomas Graf2-1/+1
2007-10-11Cache message type association interface cleanupsThomas Graf1-3/+4
2007-09-18Use linux/types.h to fix amd64 buildPhilip Craig1-6/+1
10-amd64-linux-types.patch from Ubuntu: - In order to make libnl compilable on amd64 include linux/types.h rather than defining the types ourselves; necessary as other headers include that and get different definitions. -- Scott James Remnant <scott@ubuntu.com> Wed, 22 Mar 2006 02:12:08 +0000
2007-09-18Allow filtering by name for conntrack status flagsPhilip Craig2-1/+2
2007-09-17Export interface to define cachesThomas Graf3-64/+200
This interface was internal so far which required all code defining caches to be compiled with the sources available. In order to simplify the interface, the co_msg_parser prototype was changed to take the struct nl_parser_param directly instead of a void *. It used to be void * because the co_msg_parser was directly passed as the NL_CB_VALID callback function.
2007-09-15Export interface to define objectsThomas Graf4-89/+345
This interface was internal so far which required all code defining objects to be compiled with the sources available. This change exposes struct nl_object_ops which seems safe as it is not supposed to be embedded in other structures. Patch contains extensive documentation to help with the creation of own object implementations.
2007-09-15Add missing declarations for genlmsg_data() and genlmsg_len()Thomas Graf1-0/+2
2007-09-15Initial importaosp-new/nougat-mr1-arcThomas Graf71-0/+7947