summaryrefslogtreecommitdiffstats
path: root/include/netlink/route
Commit message (Collapse)AuthorAgeFilesLines
* lib/route: add support for bridge mstiRonan Dalton2024-10-101-0/+7
| | | | https://github.com/thom311/libnl/pull/409
* lib/route: add support for bridge info booloptsRonan Dalton2024-09-181-0/+5
| | | | Add support for the IFLA_BR_MULTI_BOOLOPT bridge link attribute.
* lib/route: extend bridge info supportRonan Dalton2024-09-161-0/+15
| | | | | | | | Add support for the following attributes for bridge links: IFLA_BR_STP_STATE IFLA_BR_MCAST_ROUTER IFLA_BR_MCAST_SNOOPING
* lib/route: add missing bridge info getter functionsRonan Dalton2024-09-161-0/+9
| | | | | | There are bridge info setter functions for nf_call_iptables, nf_call_ip6tables and nf_call_arptables, but no corresponding getter functions, so add them.
* lib/route: add rtnl_neigh ext flags supportRonan Dalton2024-09-161-0/+10
| | | | | | | | | | The amount of flags that could be stored in the ndm_flags field of ndmsg was limited to 8, so the kernel introduced a new attribute so more flags could be represented in netlink messages. Add support for the extended neighbour flags. https://github.com/thom311/libnl/pull/405
* route: add support for getting permanent mac address of linkAntonio Prcela2024-09-121-0/+2
| | | | https://github.com/thom311/libnl/pull/404
* lib/route: extend bridge flagsRonan Dalton2024-09-121-7/+18
| | | | | | | | | | | | | | | | | | Add support for the following bridge flags: IFLA_BRPORT_PROXYARP IFLA_BRPORT_PROXYARP_WIFI IFLA_BRPORT_MCAST_FLOOD IFLA_BRPORT_MCAST_TO_UCAST IFLA_BRPORT_VLAN_TUNNEL IFLA_BRPORT_BCAST_FLOOD IFLA_BRPORT_NEIGH_SUPPRESS IFLA_BRPORT_ISOLATED IFLA_BRPORT_LOCKED IFLA_BRPORT_MAB IFLA_BRPORT_NEIGH_VLAN_SUPPRESS https://github.com/thom311/libnl/pull/403
* link/bonding: add getters for attributesJonas Gorski2024-08-271-3/+12
| | | | | | | In preparation of parsing bond link attributes, add getters for all supported attributes. Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
* route: expose nexthop id attributeJonas Gorski2024-05-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Routes may reference a nexthop (group) via the new nexthop API by its ID, so add accessors for setting and getting it. Referencing a nexthop is mutually exclusive to specifiying nexthops in the route, so make sure we do not do that when creating netlink messages (which may exist both, since netlink messages from the kernel contain both unless 'nexthop_compat_mode' is disabled). $ ip -6 r 2001:db8:3::/64 nhid 20 metric 1024 pref medium nexthop via 2001:db8:1::2 dev v0 weight 1 nexthop via 2001:db8:2::2 dev v1 weight 1 Before: $ nl-route-list inet6 2001:db8:3::/64 table main type unicast via 2001:db8:1::2 dev v0 via 2001:db8:2::2 dev v1 After: $ nl-route-list inet6 2001:db8:3::/64 table main type unicast nhid 20 via 2001:db8:1::2 dev v0 via 2001:db8:2::2 dev v1 Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de> https://github.com/thom311/libnl/pull/386
* nexthop: add a identical helper functionJonas Gorski2024-05-141-0/+3
| | | | | | | | | | | | | | | Not all attributes of a nexthop are id attributes, e.g. the flags will contain state (LINKDOWN, DEAD) of the attached link about which the kernel will not send route updates. Likewise, the weight may not exist when processing an ECMP IPv6 route update which only contains a single nexthop. Since rtnl_nexthop isn't a first class cache object, we cannot use nl_object_identical(), so add a separate identical helper function which compares only fixed attributes. Signed-off-by: Jonas Gorski <jonas.gorski@bisdn.de>
* include: add _NL_NO_WARN_DEPRECATED_HEADER for suppressing warning about ↵Thomas Haller2024-05-063-0/+6
| | | | | | | | | | | | | | | | deprecated headers Header files are part of a stable API. Warning about using deprecated API is cumbersome, albeit often useful to force the user to migrate away from the API. But it also requires that the unit test disables "-Wcpp". That is problematic on its own, because we don't want to disable any warnings. As we only have 4 such header files, instead guard the warnings with a #ifndef _NL_NO_WARN_DEPRECATED_HEADER
* route: add support for layer 3 filtering on bridgesCordell O'Leary2024-04-031-0/+6
| | | | https://github.com/thom311/libnl/pull/373
* route: add support for vlan filtering on bridge ports.Cordell O'Leary2024-02-292-0/+10
|
* route: Add support to set ageing time for dynamic bridge table entriesCordell O'Leary2024-02-291-0/+5
|
* route/can: implement can_device_statsJob Feikens2023-12-011-0/+3
| | | | | | | Adds the rtnl_link_can_get_device_stats function to get xstats of a CAN-bus link as a can_device_stats struct. https://github.com/thom311/libnl/pull/368
* route/link: add bonding interface options set rtnl apisLokesh Dhoundiyal2023-10-301-0/+3
| | | | | | | [thaller@redhat.com: fixed wrong variable name in code and reworded commit message.] https://github.com/thom311/libnl/pull/363
* route: fix documentation comment for nl_nh_group_infoThomas Haller2023-08-171-2/+2
| | | | | | https://github.com/thom311/libnl/issues/356 Fixes: 780d06ae8bee ('route: add nh type')
* include: add missing "extern "C"" specifier to public headersThomas Haller2023-08-071-0/+8
|
* include: fix headers "include/netlink/route/{netconf.h,route/qdisc/red.h}" ↵Thomas Haller2023-08-072-0/+3
| | | | to be self-contained
* route/nh: drop not implemented "nh" API from headersThomas Haller2023-08-031-5/+0
| | | | Fixes: 780d06ae8bee ('route: add nh type')
* include: make "netlink/route/link/{inet,inet6}.h" self-containedThomas Haller2023-08-022-0/+2
|
* route: add nh typeStanislav Zaikin2023-07-311-0/+57
|
* neigh: add support of NHID attributeStanislav Zaikin2023-07-311-0/+3
|
* route/bond: Add support for link_info for bondMallikarjun Nemagoudar2023-07-271-0/+3
| | | | | | | | | | | | | following API has been added to bonding bond_alloc bond_free rtnl_link_bond_set_activeslave rtnl_link_bond_set_mode bond_put_attrs Signed-off-by: Mallikarjun Nemagoudar <MallikarjunRamappa.Nemagoudar@infineon.com> https://github.com/thom311/libnl/pull/349
* route/link: remove rtnl_link_inet6_set_conf() APIThomas Haller2023-07-241-4/+0
| | | | | | | | | | | | | | It's not clear how this API is useful. I don't think that kernel accepts netlink requests to change the settings. So constructing a libnl3 object in the user application seems not useful. Also, because of the difficulty that DEVCONF_MAX is depending on the current kernel, and changing. We need to improve how to handle the option, and a rtnl_link_inet6_set_conf() only makes that more confusing. The same is the case for rtnl_link_inet6_set_flags(), but that API already exists, while rtnl_link_inet6_set_conf() is still new and unreleased.
* route/link: various fixes for rtnl_link_inet6_get_conf() APIThomas Haller2023-07-241-2/+2
|
* route/link: add accessor API for IPv6 DEVCONFAbdurrahman Hussain2023-03-291-0/+8
| | | | Signed-off-by: Abdurrahman Hussain <abdurrahman@hussain.rocks>
* bridge: use SPDX license identifiers in bridge_info filesThomas Haller2022-08-241-7/+1
|
* bridge: reformat bridge_info file with clang-formatThomas Haller2022-08-241-8/+14
|
* bridge: extend libnl with options needed for VLAN aware forwardingRobert Dabrowski2022-08-241-0/+35
| | | | | | Signed-off-by: Robert Dabrowski <rdabrowski@maxlinear.com> Co-Authored-By: Kacper Ludwinski <kludwinski@maxlinear.com>
* route: format recently added code with clang-formatThomas Haller2022-05-271-1/+1
|
* route/act: add NAT actionMagnus Öberg2022-05-271-0/+35
| | | | | | | Signed-off-by: Magnus Öberg <magnus.oberg@westermo.se> Signed-off-by: Volodymyr Bendiuga <volodymyr.bendiuga@gmail.com> https://github.com/thom311/libnl/pull/317
* route: format recently added code with clang-formatThomas Haller2022-05-271-4/+2
|
* cls: flower: extend flower APIVolodymyr Bendiuga2022-05-271-0/+9
| | | | | | | | | | | | | The following API has been added: rtnl_flower_set_ipv4_src rtnl_flower_get_ipv4_src rtnl_flower_set_ipv4_dst rtnl_flower_get_ipv4_dst Signed-off-by: Volodymyr Bendiuga <volodymyr.bendiuga@westermo.com> https://github.com/thom311/libnl/pull/309
* route/cls: adjust whitspace/indentationThomas Haller2022-03-151-20/+20
|
* route/cls: use SPDX-License-IdentifierThomas Haller2022-03-151-7/+1
|
* route/cls: add flower classifierVolodymyr Bendiuga2022-03-151-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a subset of functions. Implemented api: rtnl_flower_set_proto; rtnl_flower_get_proto; rtnl_flower_set_vlan_id; rtnl_flower_get_vlan_id; rtnl_flower_set_vlan_prio; rtnl_flower_get_vlan_prio; rtnl_flower_set_vlan_ethtype; rtnl_flower_set_dst_mac; rtnl_flower_get_dst_mac; rtnl_flower_set_src_mac; rtnl_flower_get_src_mac; rtnl_flower_set_ip_dscp; rtnl_flower_get_ip_dscp; rtnl_flower_set_flags; rtnl_flower_append_action; rtnl_flower_del_action; rtnl_flower_get_action; [thaller@redhat.com: squashed commit "route:cls:flower: use parentheses in macro definitions"] [thaller@redhat.com: squashed commit "cls:flower: add TCA_FLOWER_FLAGS to flower_policy"] [thaller@redhat.com: squashed commit "cls:flower: vlan priority is uint8_t, not uint16_t"] [thaller@redhat.com: squashed commit "route:cls:flower: substitute nl_data* with uint8_t mac[ETH_ALEN]"] [thaller@redhat.com: drop non-existing TCA_FLOWER_POLICE. That was never merged to upstream kernel. While at it, use decimal numbers for the bitshift.] [thaller@redhat.com: fix build by including <linux/if_ether.h> in "types.h".] Signed-off-by: Volodymyr Bendiuga <volodymyr.bendiuga@westermo.se>
* route: make argument of rtnl_link_can_set_{bittiming,data_bittiming}() constThomas Haller2022-03-151-2/+2
| | | | | | The argument of the setters does not get modified. Make it const. This change does not break API/ABI.
* route: add rtnl_link_can_set_data_bittiming_const()Thomas Haller2022-03-151-0/+2
| | | | | In can_put_attrs(), we also put ci_data_bittiming_const. It is thus necessary to be able to set it.
* route: drop bitrate,sample-point getters/setters from can linkThomas Haller2022-03-151-6/+0
| | | | | | | | | | | | | | These accessor functions just get/set a field of ci_data_bittiming, which can already be get/set as a whole. It seems redundant, so drop it. It's really important that things are principle at all (like, setting ci_data_bittiming). It's not clear that we need such convenience functions, if you can achieve the same result otherwise. Yes, we have similar accessors already. I think that is not a good approach though. If they turn out very useful, we can still revert this patch.
* route: rename rtnl_link_can_get_data_bt_const() to ↵Thomas Haller2022-03-151-2/+2
| | | | | | rtnl_link_can_get_data_bittiming_const() It seems more consistent with the other names.
* route: fix indentationThomas Haller2022-03-151-6/+6
|
* route/link: add CAN FD supportAnders Piniesjö2022-03-151-0/+13
| | | | | | | Add CAN FD support analog to the normal CAN support. [thaller@redhat.com: second part of original commit. The first part was merged as commit 5d925168a459]
* route/mdb: hide rtnl_mdb_entry_alloc() from public APIThomas Haller2022-03-141-2/+0
| | | | | | | | | | | "struct rtnl_mdb_entry" is a relatively simple object that keeps a few data fields. But there are no public setters in the API, so it's not useful to be able to allocate such an entry. Hide from public API. Also, it was already not listed in libnl-route-3.sym, and thus the symbol was hidden anyway.
* route/mdb: cleanup mdb.h headerThomas Haller2022-03-141-26/+27
| | | | | | | | | | - drop leading tabs. Yes, it's inside an extern C block, but so is all our code in public headers. That should not by default increase the indentation level. - drop unused rtnl_mdb_add(). - forward declare "struct rtnl_mdb".
* mdb: support bridge multicast database notificationRubens Figueiredo2022-03-141-0/+43
| | | | | | | | | | | The Linux kernel has a notification system via Netlink that reports the changes in the multicast database over the RTNLGRP_MDB multicast socket. As such notifications such as RTM_NEWMDB, RTM_GETMDB can be processed in userspace. libnl must support the capability of processing these messages, e.g. RTM_GETMDB. This commit adds a new rtnl_mdb object as well as a route/mdb cache, in order to expose the contents of the multicast database.
* route/cls: rename rtnl_cls_get{,_by_prio}() API to ↵Thomas Haller2022-03-141-4/+4
| | | | | | | rtnl_cls_find_by{handle,prio}() The functions return the first matching object (of potentially several). Rename them to "find", so that this is a bit clearer.
* route/cls: allow fetching of classifiers from cacheVolodymyr Bendiuga2022-03-141-0/+4
| | | | | | | | API: rtnl_cls_get() rtnl_cls_get_by_prio() These functions search for classifiers in classifier cache.
* license: use SPDX license identifiers and drop license commentsThomas Haller2022-03-111-8/+1
|
* ip6vti: Add fwmark APIThomas Winter2022-03-111-0/+3
| | | | | | This is a new option that was added in Linux v4.12. Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>