summaryrefslogtreecommitdiffstats
path: root/include/netlink
Commit message (Collapse)AuthorAgeFilesLines
* Make struct nl_object public, NLHDR_COMMON has been public anywayThomas Graf2011-03-171-0/+6
|
* Provide numeric version definesThomas Graf2011-03-161-1/+6
|
* Fix function nfnl_ct_del nameLaurent Defert2011-03-161-1/+1
| | | | | This function is named nfnl_nl_del in lib/netfilter/ct.c, while it was declared nfnl_ct_delete in the header.
* Include <linux/pkt_cls.h> and <linux/pkt_sched.h> in <netlink/route/tc.h> ↵Thomas Graf2011-03-161-0/+2
| | | | for convenience
* prefix ipv6 link statistics identifiers with IP6Thomas Graf2011-03-161-30/+30
|
* use linux/netlink.h instead of netlink/netlink-kernel.hThomas Graf2011-03-161-0/+9
|
* Tons of documentationThomas Graf2010-11-271-24/+112
|
* addr: hide nl_addr_destroy()Thomas Graf2010-11-261-4/+1
| | | | everyone should use nl_addr_put()
* rename NL_AUTO_PID to NL_AUTO_PORTThomas Graf2010-11-231-5/+8
| | | | Old name is kept for compatibility.
* Rename nlmsg_for_each_msg() to nlmsg_for_each()Thomas Graf2010-11-231-4/+6
| | | | | Also put remaining variable on local stack instead of requiring the user to supply it. Old interface is kept for compatibility.
* nl: rename nlmsg_msg_size() to nlmsg_size(), nlmsg_len() -> nlmsg_datalen()Thomas Graf2010-11-221-9/+7
| | | | The old symbols are left around for compatibility.
* rename nl_send_auto_complete() -> nl_send_auto(), nl_auto_complete -> ↵Thomas Graf2010-11-181-1/+4
| | | | | | nl_complete_msg() Old symbols left to maintain backwards compatibility
* socket: constify interfaceThomas Graf2010-11-181-6/+6
|
* New function nl_size2str()Thomas Graf2010-11-171-0/+1
|
* Rename nl_get_hz() to nl_get_user_hz() to indicate it's not the in-kernel HZ ↵Thomas Graf2010-11-171-1/+1
| | | | value
* link: AF_INET link moduleThomas Graf2010-11-162-0/+38
| | | | | | | | Note: The code for this is not upstream yet. Extends the link api to allow address family modules to fill a link message and implements a AF_INET address family link module which uses the new interface.
* link: Support for IFLA_AF_SPECThomas Graf2010-11-131-0/+5
| | | | | | | | This feature isn't upstream yet. It's required to test a patch in my local tree. Makes the link parser understand IFLA_AF_SPEC and call the address family specific parser.
* Add support for per interface ICMPv6 statisticsThomas Graf2010-11-111-0/+4
|
* Extend rtnl_link_alloc_cache() to support address familiesThomas Graf2010-11-112-4/+35
| | | | | | | Adds a family argument which allows to request link dumps for a certain address family. This allows to f.e. dump ipv6 specific statistics and data. nl-link-list --family inet6
* link/api: Improve API documentation.Thomas Graf2010-11-111-4/+9
|
* link/api: Convert link info ops to use nl_list_headThomas Graf2010-11-111-2/+2
| | | | | rtnl_link_info_ops_lookup() now returns a pointer with refcnt increment, you must return it using rtnl_link_info_ops_put()
* link: API for address family specific link dataThomas Graf2010-11-112-55/+119
| | | | | | Introduces a new API to handle address familiy specific link data such as IFLA_PROTINFO. It provides entry hooks for parsing IFLA_PROTINFO attributes and allows to include the parsed data when a link object is dumped.
* link: Support IFLA_NUM_VF attributeThomas Graf2010-11-111-0/+2
| | | | | | - parses attribute if available - provides API to access value rtnl_link_get_num_vf(link, num_vf)
* link: Support IFLA_IFALIAS attributeThomas Graf2010-11-112-2/+6
| | | | | | | | - parse IFLA_IFALIAS if available - provides API to access/change ifalias rtnl_link_get_ifalias(link) rtnl_link_set_ifalias(link, alias) - extends nl-link-set to test functionality
* pktloc: support to specify a shift operator for packet locationsThomas GraF2010-11-041-0/+1
| | | | no users yet though.
* classid auto generation if provided tc name does not existThomas Graf2010-11-012-1/+3
| | | | | | | | | | | | | | | | Manually editing etc/libnl/classid before adding tc objects is a pain. This patch adds code to attempt auto generating a unique tc id which will then be assigned to the provided name and added to the classid file. This will make the following commands work with prior definitions of the names "top" and "test" sudo sbin/nl-qdisc-add --dev eth0 --parent root --id top htb sudo sbin/nl-class-add --dev eth0 --parent top --id test htb --rate 100mbit It will generate the following ids automatically: 4001: top 4001:1 test
* Support for meta matchThomas Graf2010-10-312-0/+42
| | | | | Syntax: meta(pktlen > 768)
* text ematch supportThomas Graf2010-10-292-0/+45
|
* routing rules: adapt to unified routing rulesThomas Graf2010-10-291-21/+18
| | | | | | - Use FRA_ definitions - Removed obsoleted fields - Added fwmask and goto support
* Revert "routing rules: mark support"Thomas Graf2010-10-291-2/+2
| | | | This reverts commit ee88c71d16a6b777c916275401a971eea78871d6.
* Support for 64bit link counters IFLA_STATS64Thomas Graf2010-10-281-1/+1
|
* routing rules: mark supportThomas Graf2010-10-281-2/+2
| | | | | | | | | Obsolete RTA_PROTOINFO code and parse RTA_MARK rtnl_rule_set_mark(rule, mark) rtnl_rule_get_mark(rule) now access the mark as in firewall mark
* cgroup classifier improvementsThomas Graf2010-10-281-5/+4
| | | | | | | | | | | - enabled again - ematch support - cli tools module Example: nl-qdisc-add --dev eth0 --parent root --id 1: htb nl-cls-add --dev eth0 --parent 1: --id dead: cgroup nl-class-add --dev eth0 --parent 1: --id 1:<CGROUP> htb --rate 77mbit
* Tons of ematch workThomas Graf2010-10-285-48/+102
| | | | | | | | | | - Fixes a bunch of bugs related to ematches - Adds support for the nbyte ematch - Adds a bison/flex parser for ematch expressions, expressions may look like this: ip.length > 256 && pattern(ip6.src = 3ffe::/16) documenation on syntax follows - adds ematch support to the basic classifier (--ematch EXPR)
* Extended pktloc to support nbyte locations for ipv6, etc.Thomas Graf2010-10-281-1/+2
| | | | | The alignment column/field now also takes a number, specifying the length in bytes of the field described by the location
* Packet location updatesThomas Graf2010-10-262-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch includes various bugfixes in the packet location parser. Namely it removes two memory leaks if parsing fails. The parser is correctly quit if an allocation error occurs and it is no longer possible to add duplicates. It removes the possibility to differ between net and host byteorder. This is better done in the actual classifiers as it makes more sense to specify this together with the value to compare against. The patch also extends the API to add new packet locations via rtnl_pktloc_add(). It introduces reference counting, therefore you now have to give back packet locations with rtnl_pktloc_put() after looking them up with rtnl_pktloc_lookup(). But you are allowed to keep using them if the packet location file has been reread. The packet location file now also understands "eth", "ip", and "tcp" for "link", "net", and "transport". A --list option has been added to nl-pktloc-lookup to list all packet location definitions A --u32=VALUE option has been added to let nl-pktloc-lookup print the definition in iproute2's u32 selector style. A manual page has been written for nl-pktloc-lookup. Finally, nl-pktloc-lookup has been made installable.
* nl-cls-* toolsThomas Graf2010-10-261-0/+38
| | | | cli based tools to add/update/list/delete classifiers
* Unified TC attributes interfaceThomas Graf2010-10-269-58/+60
| | | | | | | | | | | | | | | | | | | | | | | | So far all common tc atttributes were accessed via specific functions, i.e. rtnl_class_set_parent(), rtnl_qdisc_set_parent(), rtnl_cls_set_parent() which implied a lot of code duplication. Since all tc objects are derived from struct rtnl_tc and these common attributes are already stored in there this patch removes all type specific functions and makes rtnl_tc_* attribute functions public. rtnl_qdisc_set_parent(qdisc, 10); becomes: rtnl_tc_set_parent((struct rtnl_tc *) qdisc, 10); This patch also adds the following new attributes to tc objects therefore removing them as tc specific attributes: - mtu - mpu - overhead This allows for the rate table calculations to be unified as well taking into account the new kernel behavior to take care of overhead automatically.
* Update include/linux header copiesThomas Graf2010-10-211-1/+1
| | | | | Adapts ratespec code taking into account that the kernel now takes care of overhead calculations.
* nl-class-delete toolThomas Graf2010-10-201-4/+1
| | | | Tool based on nl-qdisc-delete to delete traffic classes.
* Remove NL_DUMP_ENV codeThomas Graf2010-10-201-1/+0
| | | | | | | Dumping objects as environment variables has never been implemented completely and only increases the size of the library for no real purpose. Integration into scripts is better achieved by implementing a python module anyway.
* nl-class-add toolThomas Graf2010-10-202-2/+34
| | | | | | | | | | Adds a cli based tool to add/update traffic classes. This tool requires each class to be supported via the respetive qdisc module in pkglibdir/cli/qdisc/$name.so. Syntax: nl-class-add --dev eth2 --parent 1: --id 1:1 htb --rate 100mbit nl-class-add --update --dev eth2 --id 1:1 htb --rate 200mbit
* classid databaseThomas Graf2010-10-191-0/+1
| | | | | | | | | A database to resolve qdisc/class names to classid values and vice versa. The function rtnl_tc_handle2str() and rtnl_tc_str2handle() will resolve names automatically. A CLI based tool nl-classid-lookup is provided to integrate the database into existing iproute2 scripts.
* nl-qdisc-add toolThomas Graf2010-10-192-0/+15
| | | | | | | | | | | | Adds a cli based tool to add/update/replace qdiscs. This tool requires each qdisc to be supported via a dynamic loadable module in pkglibdir/cli/qdisc/$name.so. So far HTB and blackhole have been implemented. Syntax: nl-qdisc-add --dev eth2 --parent root --id 1: htb --r2q=5 nl-qdisc-add --update-only --dev eth2 --id 1: htb --r2q=10
* Generic Netlink multicast groups supportdima2010-10-144-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | I have a patch against commit d378220c96c3c8b6f27dca33e7d8ba03318f9c2d extending libnl with a facility to receive generic netlink messages sent to multicast groups. Essentially it add one new function genl_ctrl_resolve_grp which prototype looks like this int genl_ctrl_resolve_grp(struct nl_sock *sk, const char *family_name, const char *grp_name) It resolves the family name and the group name to group id. Then the returned id can be used in nl_socket_add_membership to subscribe to multicast messages. Besides that it adds two more functions uint32_t nl_socket_get_peer_groups(struct nl_sock *sk) void nl_socket_set_peer_groups(struct nl_sock *sk, uint32_t groups) allowing to modify the socket peer groups field. So it's possible to multicast messages from the user space using the legacy interface. Looks like there is no way (or I was not able to find one?) to modify the netlink socket destination group from the user space, when the group id is greater then 32.
* add user data to change_func_t for cachesAndreas Fett2010-10-131-3/+6
| | | | | | | | | | | the patch below adds the possibility to pass user data to callbacks of type change_func_t when using the nl_cache_mngr_* family of functions. If there is any better way to do this, without duplicating the code in cache_mngr.c please let me know.
* Fix compile warning in nl.cThomas Graf2010-07-031-1/+1
|
* 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>