| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| | |
Minimize the padding inthe struct.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| |
| | |
https://github.com/thom311/libnl/pull/274
|
| |
| |
| |
| |
| |
| | |
The argument of the setters does not get modified. Make it const.
This change does not break API/ABI.
|
| |
| |
| |
| |
| | |
In can_put_attrs(), we also put ci_data_bittiming_const. It is thus
necessary to be able to set it.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
rtnl_link_can_get_data_bittiming_const()
It seems more consistent with the other names.
|
| | |
|
| | |
|
|/
|
|
|
|
|
| |
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]
|
|\
| |
| |
| | |
https://github.com/thom311/libnl/pull/234
|
| |
| |
| |
| |
| |
| |
| | |
The default implementation of oo_clone() already clones the object
using memcpy(). So simple fields (like ifindex) are correct. What
is not correct (and for what we need the oo_clone() implementation)
are pointer values which require a deep clone.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- a `struct rtnl_mdb` has a list of `struct rtnl_mdb_entry`.
An attribute like MDB_ATTR_PORT is not really an attribute
of the MDB struct, but rather of one entry. It makes no sense
to mangle these. Having MDB_ATTR_PORT set in the change flags
would mean that at least one entry has the port set.
Instead, add MDB_ATTR_ENTRIES which is about the list of entries.
- drop unused `ce_mask` in `struct rtnl_mdb_entry`.
- rework mdb_compare(). When we compare the two lists of entries,
it's not right to have two nested loops. You can either
iterate both lists in step, and compare each element to do
a comparison that honors the order of the elements. Or, you
can compare the two lists accepting any order. The latter
is more complicated, and does not seem right. So do the former.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
"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.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
mdb_free_data()
I think this was wrong before. We cannot use mdb_free_data() and
free the current element.
Use nl_list_for_each_entry_safe() and properly unlink the element.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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".
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| |
| | |
https://github.com/thom311/libnl/pull/243
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
| |
API:
rtnl_cls_get()
rtnl_cls_get_by_prio()
These functions search for classifiers in classifier cache.
|
|\
| |
| |
| | |
https://github.com/thom311/libnl/pull/194
|
| | |
|
| |
| |
| |
| |
| |
| | |
This is a new option that was added in Linux v4.12.
Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>
|
| |
| |
| |
| |
| |
| | |
This is a new option that was added in Linux v4.12.
Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>
|
| |
| |
| |
| |
| |
| | |
This is a new option that was added in Linux v4.12.
Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>
|
| |
| |
| |
| |
| |
| | |
This is a new option that was added in Linux v4.12.
Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>
|
| |
| |
| |
| |
| |
| | |
This is a new option that was added in Linux v4.12.
Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>
|
| |
| |
| |
| |
| |
| | |
This is a new option that was added in Linux v4.12.
Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>
|
| |
| |
| |
| |
| |
| | |
This is a new option that was added in Linux v4.12.
Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>
|
|/
|
|
|
|
|
| |
This patch adds support for IPv6 VTI tunneling
that uses the vti6 kernel module.
Signed-off-by: Thomas Winter <Thomas.Winter@alliedtelesis.co.nz>
|
| |
|
|\
| |
| |
| | |
https://github.com/thom311/libnl/pull/242
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- when we received a route and set `*result`, we should not return
an error. That means, ignore the result of wait_for_ack().
- use _nl_auto* cleanup macros.
- move new symbols to linker version for the upcoming release.
|
|/
|
|
|
|
|
| |
Using the flnl_* family of functions to perform FIB lookups is rather
limited. In particular, there seems to be no way of resolving the
nexthop. By hooking into RTM_GETROUTE, a regular rtnl route object is
returned instead.
|
| |
|
|\
| |
| |
| | |
https://github.com/thom311/libnl/pull/239
|
| | |
|
|/
|
|
| |
Signed-off-by: Jonas Johansson <jonas.johansson@westermo.se>
|
|
|
|
|
|
|
|
| |
It should be set right where link name is set.
Signed-off-by: Greger Wrang <greger.wrang@westermo.se>
https://github.com/thom311/libnl/pull/237
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following functions have been implemented but not
exported:
rtnl_netconf_alloc_cache()
rtnl_netconf_get_proxy_neigh()
rtnl_netconf_get_ignore_routes_linkdown()
Signed-off-by: Volodymyr Bendiuga <volodymyr.bendiuga@westermo.se>
[thaller@redhat.com: modified original patch. A symbol version
that is already released must not be modified on another release.
New symbols must always get the version of the next upcoming release.
That is also in this case where we forgot to export the symbols in an
older version. The old version just has a bug, and it's fixed in the
next release. We cannot fix it for what is already released.]
https://github.com/thom311/libnl/pull/236
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to support static linking, the libnl pkg-config file should
indicate in its Libs.private field the libraries that libnl-3.0.a
requires. The LIBS variable contains the appropriate list of
libraries: -lm in all cases, and -lpthread when pthread support is
enabled. This allows to statically link applications against libnl
properly.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Retrieved from:
https://git.buildroot.net/buildroot/tree/package/libnl/0001-build-add-Libs.private-field-in-libnl-pkg-config-fil.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[thaller@redhat.com: btw, "-lm" is not used anymore]
https://github.com/thom311/libnl/pull/229
|
|
|
|
|
|
|
|
|
|
|
|
| |
API:
rtnl_qdisc_get_by_kind()
This function allows getting qdisc based on
its kind, i.e. tbf, htb, cbq, etc.
Signed-off-by: Volodymyr Bendiuga <volodymyr.bendiuga@westermo.se>
https://github.com/thom311/libnl/pull/244
|
|\
| |
| |
| | |
https://github.com/thom311/libnl/pull/251
|
| |
| |
| |
| |
| |
| |
| | |
This API was just added in the patches before. Expose the symbols of the
library.
Based-on-patch-by: Michael Braun <michael-dev@fami-braun.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This API was added a long time ago, but it didn't work
because the symbols were hidden. Fix that.
Note that despite the API was added in the headers of older
versions of the library, the linker symbol version is about the
upcoming 3.6 release.
Based-on-patch-by: Michael Braun <michael-dev@fami-braun.de>
|
| |
| |
| |
| | |
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
|
| |
| |
| |
| | |
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
|