summaryrefslogtreecommitdiffstats
path: root/include/netlink
Commit message (Collapse)AuthorAgeFilesLines
* Packet Location InterfaceThomas Graf2010-07-022-1/+46
|
* object: fix attribute comparisonPatrick McHardy2010-04-191-2/+14
| | | | | | | | | Currently two attributes are regarded as different if they are absent in both objects to be compared. This is obviously incorrect, change to regard objects as different if an attribute is only present on one of them or if the attribute data differs. Signed-off-by: Patrick McHardy <kaber@trash.net>
* addr: restore anycast functionsPatrick McHardy2010-04-191-0/+3
| | | | | | Seems it got lost during some cleanups. Signed-off-by: Patrick McHardy <kaber@trash.net>
* new function nfnl_queue_msg_send_verdict_payload()Karl Hiramoto2010-03-101-1/+3
| | | | | | | | | nfnl_queue_msg_send_verdict_payload() will to send the verdict, mark, and possibly changed payload through the netlink socket. Add a few docbook comments in other funcs. Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
* new feature nl_send_iovec(), nl_auto_complete() and code refactoring.Karl Hiramoto2010-03-101-0/+4
| | | | | | | | | | | | | Create new function nl_send_iovec() to be used to send multiple 'struct iovec' through the netlink socket. This will be used for NF_QUEUE, to send packet payload of a modified packet. Refactor nl_send() to use nl_send_iovec() sending a single struct iovec. Create new function nl_auto_complete() by refactoring nl_send_auto_complete(), so other functions that call nl_send may also use nl_auto_complete() Signed-off-by: Karl Hiramoto <karl@hiramoto.org>
* CLI - Command Line Interface LibraryThomas Graf2009-12-168-0/+286
| | | | | Moved common code in src/ used by CLI tools to src/lib/ for possible use by other CLI tools. Just link to libnl-cli.{so|la}
* Add support for getting and deleting queueing classes.olc2009-09-021-0/+5
|
* - Reworked the classifier interface.Thomas Graf2009-09-028-4/+197
| | | | | | - Added initial ematch support - Added support for the basic classifier - Added support for the cgroup classifier
* Declare struct ucred in handlers.h and netlink.hPavel Roskin2009-07-202-0/+3
| | | | | | Both files refer to it. The sources including those files are not guaranteed to include sys/socket.h to ensure that struct ucred is defined.
* nl_object_priv() is inline, so define it in the headerPavel Roskin2009-04-161-1/+5
|
* Remove obsoleted struct nl_handle definitionThomas Graf2008-12-101-3/+0
|
* Consistent naming of socket functionsThomas Graf2008-12-101-42/+32
|
* Allow to pass multiple group values to membership functionsHolger Eitzenberger2008-12-031-4/+12
| | | | | | | | | | | | | | | Instead of calling the membership functions several times it is helpfull to extend the API and make the single group functions a special case. The value 0 (NFNLGRP_NONE) terminates this list. Example use: nl_socket_add_memberships(sock, group_1, group_2, 0); nl_socket_drop_memberships(sock, group_1, group_2, 0); Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
* libnl: nfqueue: add nfqueue specific socket allocation functionPatrick McHardy2008-10-231-0/+2
| | | | | | | | | | | | | | | | | commit e92539843a0c7e5116254382626cce226bf2135e Author: Patrick McHardy <kaber@trash.net> Date: Thu Oct 23 13:46:16 2008 +0200 libnl: nfqueue: add nfqueue specific socket allocation function nfqueue users usually send verdict messages from the receive callback. When waiting for ACKs, the receive callback might be called again recursively until the stack blows up. Add a nfqueue specific socket allocation function that automatically disables ACKing for the socket. Signed-off-by: Patrick McHardy <kaber@trash.net>
* Add socket flag NL_NO_AUTO_ACK to allow disabling auto ACKSThomas Graf2008-10-201-0/+2
|
* Error handling for rtnl_cls_set_kind() & addition of rtnl_cls_get_ops()Thomas Graf2008-10-151-1/+2
|
* Use 16bit ints for classifier prio/protocolThomas Graf2008-10-151-4/+4
|
* Replace NL_KEEP code with proper message reference countingThomas Graf2008-10-142-18/+1
| | | | | | Adds reference counting to netlink messages so callbacks can hold on to a message without using the broken keep message flag.
* Remove XML dumpingThomas Graf2008-06-171-1/+0
| | | | Bloats the library, not frequently used
* Fix compile errors when linking against libnl-genlThomas Graf2008-06-171-0/+9
|
* Improvements to address utilitiesThomas Graf2008-06-171-0/+7
| | | | | | - Moved env var dumping to nl-addr-list.c - support for ipv6 lifetimes - correct and complete help texts
* <netlink/addr.h> requires <netdb.h>Thomas Graf2008-06-171-0/+1
|
* Need <linux/in_route.h>Thomas Graf2008-06-161-0/+1
|
* Extend nl_time2int() and rename it to nl_str2msec()Thomas Graf2008-06-161-0/+1
| | | | Support parsing of more complex time duration input.
* Introduce nla_strdup() to help parse strings attributesThomas Graf2008-06-131-0/+1
|
* Remove old line counting while dumpingThomas Graf2008-05-236-20/+12
|
* Present port and icmp values in host byte order and beautify printingThomas Graf2008-05-221-0/+2
| | | | | | | | This changes make nfnl_ct_get_src_port() and others return the value in host byte order rather than in network byte order. Also splits printing into details and statistical section and improves readability.
* Remove change routine, works flawlessly via add() with NLM_F_REPLACEThomas Graf2008-05-221-4/+0
| | | | This breaks the API but is the right thing to do.
* Remove references to unused attribute anycastThomas Graf2008-05-151-3/+0
|
* Rename struct nl_handle to struct nl_sockThomas Graf2008-05-1524-102/+104
| | | | | | | | The idea of a common handle is long revised and only misleading, nl_handle really represents a socket with some additional action handlers assigned to it. Alias for nl_handle is kept for backwards compatibility.
* Check length of provided address labelThomas Graf2008-05-141-1/+1
|
* Replace RTNL_LINK_NOT_FOUND with just 0Thomas Graf2008-05-141-6/+0
| | | | | The interface index 0 is reserved and can be safely used to signal that the device does not exist.
* Remove obsolete nla_get_addr() and nla_get_data()Thomas Graf2008-05-143-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.
* Break API some moreThomas Graf2008-05-144-12/+0
| | | | | Since we've broken the API anyway, remove some aliases which only exist for backwards compatibility.
* Thread-safe error handlingThomas Graf2008-05-1422-417/+437
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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!
* Added two new functions to facilitate processing the nexthop entries for routes.Ben Gamsa2008-05-081-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.
* ignore more temporary filesThomas Graf2008-05-051-0/+1
|
* Route cache supportThomas Graf2008-05-051-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.
* New netem funtionality and TBF fixTad Kollar2008-04-302-0/+15
| | | | | | | | | | | | | | 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.
* version.h.in should be in tree not the generated versionThomas Graf2008-04-301-2/+2
|
* Provide libnl version in <netlink/version.h>Thomas Graf2008-04-302-0/+19
|
* libnl: recvmsgs doesn't necessarily free the message dataInaky Perez-Gonzalez2008-04-291-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>
* Big routing code rework (API/ABI BREAK!)Thomas Graf2008-04-295-49/+67
| | | | | | | | | | 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.
* Export nl_dump_line() and automatically count lines while dumpingThomas Graf2008-04-292-5/+16
|
* [PATCH] Remove usage of C++ keyword 'class' on htb.h header.Rui Tiago Cação Matos2008-03-051-3/+3
| | | | Signed-off-by: Rui Tiago Cação Matos <rmatos@av.it.pt>
* Fix nfnl_queue_msg_get_packetid() return typePatrick McHardy2008-02-071-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>
* [LIBNL]: Support conntrack add/delete/query requestsPatrick McHardy2008-02-071-0/+9
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>
* [LIBNL]: Split up nfnetlink_log into log and msg objectsPatrick McHardy2008-02-072-57/+155
| | | | | | | | | | | | | | 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>
* [LIBNL]: nfnetlink_log: support NUFLA_GID attributePatrick McHardy2008-02-071-0/+4
| | | | | | | 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>
* [LIBNL]: Add nfnetlink_queue supportPatrick McHardy2008-02-072-0/+187
| | | | Signed-off-by: Patrick McHardy <kaber@trash.net>