summaryrefslogtreecommitdiffstats
path: root/include/netlink
Commit message (Collapse)AuthorAgeFilesLines
* nf: nfnl_*_str2copy_mode() should return intThomas Graf2014-08-262-2/+2
| | | | | | | | | | | | | ... to be able to return a negative error code for unknown modes. [thaller@redhat.com: This is potentially an ABI break, but since the size of the enum is implementation defined, it seems anyway unstable to have them as function arguments/return values.] http://lists.infradead.org/pipermail/libnl/2014-August/001616.html Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* qdisc: add hfsc qdisc supportCong Wang2014-07-301-0/+37
| | | | | | | | Cc: Thomas Graf <tgraf@suug.ch> Cc: Thomas Haller <thaller@redhat.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* link/inet6: add link IPv6 address generation mode supportDan Williams2014-07-301-0/+37
| | | | | Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
* cache: Declare nl_cache_ops_set_flags()Thomas Graf2014-07-271-0/+2
| | | | | Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* act: Declare rtnl_act_change()Thomas Graf2014-07-271-0/+1
| | | | | Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* neightbl: Declare rtnl_neightbl_set_gc_interval()Thomas Graf2014-07-271-0/+1
| | | | | Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* link/ip6tnl: Declare rtnl_link_is_ip6_tnl()Thomas Graf2014-07-271-0/+2
| | | | | Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* htb: Declare rtnl_htb_set_level()Thomas Graf2014-07-271-0/+1
| | | | | Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* xfrm: style-fixesThomas Haller2014-07-201-1/+1
| | | | Signed-off-by: Thomas Haller <thaller@redhat.com>
* xfrm: add xfrm supportSruthi Yellamraju2014-07-206-0/+719
| | | | | Signed-off-by: Sruthi Yellamraju <ysruthi@gmail.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
* cache: add missing declaration of nl_cache_move() in include/netlink/cache.hSruthi Yellamraju2014-06-251-0/+2
| | | | | | Signed-off-by: Sruthi Yellamraju <ysruthi@gmail.com> [thaller@redhat.com: modified tab vs. whitespace] Signed-off-by: Thomas Haller <thaller@redhat.com>
* attr: fix compile warning in headersPeter Wu2014-06-251-1/+1
| | | | | | | | | strlen() returns a size_t type, but nla_put accepts an int only. This breaks a -Werror build of applications using libnl, so avoid this warning by explicitly casting the length to an int. Signed-off-by: Peter Wu <peter@lekensteyn.nl> Signed-off-by: Thomas Haller <thaller@redhat.com>
* ip6tnl: introduce ip6 tunnel supportSusant Sahani2014-06-161-0/+56
| | | | | | | | This patch adds support for ip6 tunnel that works with the ip6_tunnel kernel module. Signed-off-by: Susant Sahani <susant@redhat.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
* vlan: add support for IFLA_VLAN_PROTOCOLSusant Sahani2014-05-121-0/+3
| | | | | | | | | This patch adds support for IFLA_VLAN_PROTOCOL Signed-off-by: Susant Sahani <susant@redhat.com> Acked-by: Thomas Graf <tgraf@suug.ch> [thaller@redhat.com: minor fixes (whitespace, documentation, and a typo)] Signed-off-by: Thomas Haller <thaller@redhat.com>
* lib/socket: retry generate local port in nl_connect on ADDRINUSEThomas Haller2014-05-061-0/+9
| | | | | | | | | | | | | | | | | | | | | It can easily happen that the generated local netlink port is alrady in use. In that case bind will fail with ADDRINUSE. Users of libnl3 could workaround this, by managing the local ports themselves, but sometimes these users are libraries too and they also don't know which ports might be used by other components. This patch changes that nl_socket_alloc() no longer initilizes the local port id immediately. Instead it will be initialized when the user calls nl_socket_get_local_port() the first time and thereby shows interest in the value. If bind() fails with ADDRINUSE, check if the user ever cared about the local port, i.e. whether the local port is still unset. If it is still unset, assume that libnl should choose a suitable port and retry until an unused port can be found. Signed-off-by: Thomas Haller <thaller@redhat.com>
* ipvti: introduce vti tunnel supportSusant Sahani2014-05-061-0/+43
| | | | | | Signed-off-by: Susant Sahani <susant@redhat.com> [thaller@redhat.com: some whitespace fixes] Signed-off-by: Thomas Haller <thaller@redhat.com>
* ipgre: rename new public API to avoid confusionSusant Sahani2014-05-061-10/+10
| | | | | Signed-off-by: Susant Sahani <susant@redhat.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
* introduce sit tunnel supportSusant Sahani2014-05-051-0/+53
| | | | | | | | | This patch introduces sit tunnel support Signed-off-by: Susant Sahani <susant@redhat.com> Acked-by: Thomas Graf <tgraf@suug.ch> [thaller@redhat.com: change WS to TAB, fix code doc] Signed-off-by: Thomas Haller <thaller@redhat.com>
* introduce gre tunnel supportSusant Sahani2014-05-051-0/+59
| | | | | | | | | This patch introduces gre tunnel support Signed-off-by: Susant Sahani <susant@redhat.com> Acked-by: Thomas Graf <tgraf@suug.ch> [thaller@redhat.com: change WS to TAB, fix code doc] Signed-off-by: Thomas Haller <thaller@redhat.com>
* introduce ipip tunnel supportSusant Sahani2014-05-051-0/+47
| | | | | | | | | | This patch introduces ipip tunnel support. This works with kernel module ipip. Signed-off-by: Susant Sahani <susant@redhat.com> Acked-by: Thomas Graf <tgraf@suug.ch> [thaller@redhat.com: change WS to TAB, fix code doc] Signed-off-by: Thomas Haller <thaller@redhat.com>
* act: grab a reference when adding an action to a filterCong Wang2014-04-302-0/+8
| | | | | | | | | | When we add an action to a filter, its lifetime becomes same with the filter. So in case user frees it before us, we could just grab a reference here. Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* veth: grab a reference for rtnl_link_veth_get_peer()Cong Wang2014-04-301-0/+7
| | | | | | | | So that users could keep a refcount for the peer. The capability trick is from Thomas Haller. Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
* netfilter/ct: expand CT parameters that can be used in add/delete operationsRich Fought2014-04-142-0/+2
| | | | | | | | | | | | This expands functionality for manipulating conntracks over netlink by adding other attributes to nfnl_ct_build_message(). Added a command link program to add conntracks. https://github.com/thom311/libnl/pull/55 [thaller@redhat.com: cleaned up whitespace from original patch] Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* route: update kernel header snmp.h and fix inet6_parse_protinfo() after ↵Thomas Haller2014-03-211-0/+6
| | | | | | | | | | | | | | | | | | | | kernel API breakage Take 'include/uapi/linux/snmp.h' from current kernel v3.13 (commit d8ec26d7f8287f5788a494f56e8814210f0e64be). The header file added new values for IPSTATS_MIB_* and ICMP6_MIB_*, but more importantly, the kernel broke user space API by reordering enum values in IPSTATS_MIB_*. Add a workaround when parsing IFLA_PROTINFO trying to be compatible with both older and newer kernels. Note that this workaround might fail for some specific kernel versions by assuming the old enum value mapping, although the kernel version already contains the API change. In this case rtnl_link_get_stat() mixes up values. Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* u32: add const to rtnl_u32_add_key_in*_addr()Cong Wang2014-03-211-2/+2
| | | | | | | Cc: Thomas Haller <thaller@redhat.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* utils: indicate capability NL_CAPABILITY_ROUTE_BUILD_MSG_SET_SCOPEThomas Haller2014-03-131-0/+8
| | | | | | | | | This capability indicates that libnl does no longer overwrites the route scope in rtnl_route_build_msg(), as fixed by commit 85ec9c7ad80c60f4f619472f2bb9d9595da93b26. Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* utils: add nl_has_capability() functionThomas Haller2014-03-131-0/+8
| | | | | Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* remove nl_cache_lookup() from cache.hCong Wang2014-01-311-2/+0
| | | | | | | It is never defined. Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
* act: remove rtnl_act_alloc_cache()Cong Wang2014-01-151-4/+0
| | | | | | | | | | | | | | | | It is complicated to cache tc actions, they are different from tc qdisc's and filters by design. So, it is simple if we just don't cache them. This patch only removes the tc action cache allocation API. We still need to bypass the libnl cache layer from scratch, but that would not break ABI any more, therefore we can do it later. Cc: Thomas Graf <tgraf@suug.ch> Cc: Thomas Haller <thaller@redhat.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
* bridge: add rtnl_link_add_bridge() functionHongweiBi2014-01-141-0/+1
| | | | | Signed-off-by: HongweiBi <hwbi2008@gmail.com> Signed-off-by: Thomas Haller <thaller@redhat.com>
* route: add libnl name prefix to global variable link_policyThomas Haller2014-01-021-1/+1
| | | | | | | | | | | | | | Public names should be prefixed with a libnl specific prefix to avoid name collisions. Rename link_policy to rtln_link_policy. Related bugs: https://github.com/thom311/libnl/issues/52 https://bugzilla.gnome.org/show_bug.cgi?id=720902 https://bugs.gentoo.org/show_bug.cgi?id=494986 https://bugs.gentoo.org/show_bug.cgi?id=494890 Signed-off-by: Thomas Haller <thaller@redhat.com>
* u32: add rtnl_u32_get_key()Cong Wang2013-12-171-0/+2
| | | | | | Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Cc: Thomas Graf <tgraf@suug.ch> Signed-off-by: Thomas Haller <thaller@redhat.com>
* cache: Add missing declaration for nl_cache_find()Thomas Graf2013-12-131-0/+2
| | | | | Reported-by: Andrej.Gantvorg@wago.com Signed-off-by: Thomas Graf <tgraf@suug.ch>
* add declaration for rtnl_basic_add_action()Cong Wang2013-12-111-0/+2
| | | | | Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* Revert "basic: Add missing declaration for rtnl_basic_add_action()"Thomas Graf2013-12-111-1/+0
| | | | This reverts commit 4b84836085067722882129b8c6a864364ae4ca42.
* Revert "basic: Declare rtnl_act in basic.h to silence warning"Thomas Graf2013-12-111-3/+1
| | | | This reverts commit a858d996e952af5bf449b87775f74355d492a0ec.
* basic: Declare rtnl_act in basic.h to silence warningThomas Graf2013-12-091-1/+3
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* basic: Add missing declaration for rtnl_basic_add_action()Thomas Graf2013-12-091-0/+1
| | | | Signed-off-by: Thomas Graf <tgraf@suug.ch>
* basic: add action removal APICong Wang2013-12-091-0/+1
| | | | | Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* u32: add action removal APICong Wang2013-12-092-0/+2
| | | | | Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* add rtnl_mirred_get* functionsCong Wang2013-12-091-0/+3
| | | | | Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* rename rtnl_mirred_set_index() to rtnl_mirred_set_ifindex()Cong Wang2013-12-091-1/+1
| | | | | Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* add declaration for rtnl_cls_change()Cong Wang2013-12-091-0/+1
| | | | | Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* add a parameter to rtnl_link_veth_add()Cong Wang2013-12-091-1/+2
| | | | | | | | Usually the peer of a veth device is moved to a new netns after creation, so add a pid parameter to rtnl_link_veth_add(). Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* add fq_codel qdiscCong Wang2013-11-221-0/+44
| | | | | | Cc: Thomas Graf <tgraf@suug.ch> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* fix linux/pkt_act.h inclusionCong Wang2013-11-112-1/+1
| | | | | | | We should copy and use the kernel header linux/tc_act/tc_mirred.h. Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* add u32 action supportCong Wang2013-11-091-0/+2
| | | | | Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* add mirred tc actionCong Wang2013-11-092-0/+32
| | | | | Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* add initial tc action supportCong Wang2013-11-092-0/+49
| | | | | Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>
* factor out rtnl_link_info_parse()Cong Wang2013-11-061-0/+2
| | | | | Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Thomas Graf <tgraf@suug.ch>