| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
| |
This function is named nfnl_nl_del in lib/netfilter/ct.c, while it was
declared nfnl_ct_delete in the header.
|
|
|
|
| |
for convenience
|
| |
|
| |
|
| |
|
|
|
|
| |
everyone should use nl_addr_put()
|
|
|
|
| |
Old name is kept for compatibility.
|
|
|
|
|
| |
Also put remaining variable on local stack instead of requiring the user
to supply it. Old interface is kept for compatibility.
|
|
|
|
| |
The old symbols are left around for compatibility.
|
|
|
|
|
|
| |
nl_complete_msg()
Old symbols left to maintain backwards compatibility
|
| |
|
| |
|
|
|
|
| |
value
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
rtnl_link_info_ops_lookup() now returns a pointer with refcnt increment,
you must return it using rtnl_link_info_ops_put()
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
- parses attribute if available
- provides API to access value
rtnl_link_get_num_vf(link, num_vf)
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
no users yet though.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Syntax:
meta(pktlen > 768)
|
| |
|
|
|
|
|
|
| |
- Use FRA_ definitions
- Removed obsoleted fields
- Added fwmask and goto support
|
|
|
|
| |
This reverts commit ee88c71d16a6b777c916275401a971eea78871d6.
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
| |
- 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)
|
|
|
|
|
| |
The alignment column/field now also takes a number, specifying
the length in bytes of the field described by the location
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
cli based tools to add/update/list/delete classifiers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Adapts ratespec code taking into account that the kernel now takes
care of overhead calculations.
|
|
|
|
| |
Tool based on nl-qdisc-delete to delete traffic classes.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Seems it got lost during some cleanups.
Signed-off-by: Patrick McHardy <kaber@trash.net>
|