dect
/
libnl
Archived
13
0
Fork 0
Commit Graph

173 Commits

Author SHA1 Message Date
Thomas Graf 1c9b175a47 Provide micro version in <netlink/version.h> 2011-09-19 11:28:20 +02:00
Thomas Graf 076909aa82 Bonding: Fix header guard of <netlink/route/link/bonding.h>
(Would be a good idea to change the header guard name when c&p
 an existing header file to create a new one.)
2011-09-16 13:17:04 +02:00
Thomas Graf 15b13ddbde bonding: Install <netlink/route/link/bonding.h> 2011-09-16 13:07:03 +02:00
Thomas Graf 96f17ce146 bonding: API to create/enslave/release
Although it has been possible to create bonding devices, enslave and
release using the regular link API. The added API simplifies usage
and hides some of the compatibility logic.

F.e. enslave() and release() will both verify that the master assignment
has in fact been changed and return -NLE_OPNOTSUPP if it did not.

Also the API will make sure to use RTM_NEWLINK or RTM_SETLINK depending
on what is availble.

Examples are provided in src/ as nl-link-enslave.c and nl-link-release.c
2011-09-16 12:57:52 +02:00
Thomas Graf b50195c691 addr: Add missing header to <netlink/route/addr.h>
Fixes a gcc warning
2011-09-13 23:13:51 +02:00
Thomas Graf 4c210adcb5 Switch to libtool versioning system
It has been a request that multiple libnl versions should be installabe
in parallel.

In order to achieve this, the basename of the library was changed to
libnl-3 which reflects the 3rd generation of libnl APIs. It also means
that release based library versioning is left behind and libtool
versioning is used instead.

Projects using pkgconfig will automatically link against the new library
basename and will not notice a difference.

The SO versioning is based on the glib model:
  current := 100 * minor + micro - revision
  revision := revision
  age := age (number of backwards compatible versions)
2011-09-13 22:58:08 +02:00
Thomas Graf 226b387557 Install headers in ${includedir}/libnl3
This allows for multiple major versions to be installed in parallel. Pkg-config
files are adapted to provide appropriate cflags to find new header locations.
2011-09-13 11:48:18 +02:00
Jiri Pirko 6faeffe64a socket: introduce nl_socket_modify_err_cb
This function does the same as nl_socket_modify_cb except for error
callback

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
2011-08-31 09:23:58 +02:00
Thomas Graf 70c9371760 Updated link documentation
- API documentation
- developer guide
- enabled doxygen navbar
- fixed css
2011-07-28 16:23:57 +02:00
Thomas Graf f3ee216715 include <linux/if.h> from <netlink/route/link.h> to export IFF_* flags 2011-07-25 10:32:26 +02:00
Thomas Graf 8219cc79f8 VLAN: rtnl_link_is_vlan() function and API documentation 2011-07-21 17:47:00 +02:00
Thomas Graf 16d38a49d1 Use 'link type' instead of 'link info type'
The term 'link type' is much more easier to understand than 'link info type'

rtnl_link_set/get_info_type() left around for backwards compatibility
2011-07-21 16:45:01 +02:00
Thomas Graf 21d52eabba Support for NLM_F_INTR
Check if a dump was interrupted and needs to be redone
2011-07-14 10:51:49 +02:00
Christian Ruppert 4806c5c058 Don't redefine offsetof when already defined by e.g. stddef.h 2011-06-21 11:33:44 +02:00
Thomas Graf 09210d9619 HTB: Add support for level and direct pkt stats, complete access functions
- Adds support for htb class level and direct packet
  statistics
- Complete all get/set access functions
- Complete error handling
- Documentation
2011-06-09 13:32:13 +02:00
Thomas Graf 053c93fa8a Update local copies of include/linux 2011-06-09 12:56:52 +02:00
Thomas Graf 58e0e1eda9 Add nl_rate2str() 2011-06-09 12:29:21 +02:00
Thomas Graf ed69b2a79b Add rtnl_tc_data_check()
Behaves like rtnl_tc_data() but verifies that the traffic control
object is of the expected type.
2011-06-09 12:28:04 +02:00
Thomas Graf 4cb1666fe1 Provide silent variation of nl_cache_require()
Use in addr and tc layer to avoid warnings being printed if no
cache is available.
2011-05-11 09:33:29 +02:00
Thomas Graf d44c31da5f addr: store link object and provide rtnl_addr_get()
stores rtnl_link object in address if cache is availble. Provide access
via rtnl_addr_get_link() and rtnl_addr_set_link().

Add rtnl_addr_get() which searches a address cache for an address
matching ifindex and local address.
2011-05-03 11:48:14 +02:00
Thomas Graf cc33b0940f Add missing declaration of rtnl_tc_get_link() 2011-04-21 14:58:05 +02:00
Thomas Graf 4c6dd3a8bd Expose <netlink/route/link/inet.h> 2011-04-20 11:53:04 +02:00
Thomas Graf 8ffab45698 export rtnl_link_add() and rtnl_link_build_add_request() 2011-04-15 15:31:47 +02:00
Thomas Graf 96bc6d6f66 Improve rtnl_link_change() behaviour
- avoid unncessary name change requests
    The kernel does not check if the specified IFNAME is different
    from the current name. It assumes that if IFNAME and ifindex
    are both specified, a name change is requested. Therefore avoid
    specyfing IFNAME if ifindex is provided and original and new
    name are identical.
- move link building to own function (to allow link add later on)
- error if immutable changes have been made
- better documentation
2011-04-13 16:42:34 +02:00
Thomas Graf 48d543cfdf API to issue direct GET requests to the kernel
Provide nl_pickup() to pick up an answer from a netlink request and parse
it using the supplied parser.

Add rtnl_link_get_kernel() which sends an RTM_GETLINK to the kernel to
fetch a single link directly from the kernel. This can be faster than
dumping the whole table, especially if lots of links are configured.
2011-04-11 12:34:01 +02:00
Thomas Graf 41fb241b7b link: Provide rtnl_link_delete() to delete virtual links
Takes a link object and extracts ifindex and name to build a deletion request
message to delete virtual network links.
2011-04-10 11:02:47 +02:00
Thomas Graf 0893aafcec link: Make return and argument type match 2011-04-10 10:24:12 +02:00
Thomas Graf 23c27b4738 Provide nl_cache_set_arg{1,2}() to specify cache args
Added based on a RFE. This is required if allocation and
(re)filling is to be splitted.
2011-04-10 10:22:27 +02:00
Thomas Graf ef327ffd44 Provide nl_object_dump_buf() to easily dump to buffers 2011-04-10 10:22:01 +02:00
Thomas Graf 475dffa699 Provide TC_HANDLE(maj, min) macro to generate tc handles 2011-04-01 16:25:57 +02:00
Thomas Graf 7c620500bb trafic class/classifer API improvements and documentation
- removed dead functions in header files
- deprecated rtnl_class_foreach_*() functions due to their missing
  handling possibility of OOM situations
- improved API documentation
2011-03-29 12:41:59 +02:00
Thomas Graf 747b892c91 Qdisc API improvements and documentation
Deprecated the functions rtnl_qdisc_change() and
rtnl_qdisc_build_change_request() for their lack of being able to
specify flags. The new functions rtnl_qdisc_update() and
rtnl_qdisc_build_update_request() may be used instead. The old
functions are still available though. However, rtnl_qdisc_update()
no longer implies NLM_F_REPLACE, it has to specified implicitely
to allow updating a qdisc without risking to replace another qdisc.

Included detailed documentation of qdisc addition/update/deletion.

Introduced APPBUG() macro to let application developer know of
API abuse.
2011-03-25 18:13:19 +01:00
Thomas Graf 23845e942c Add nl_send_sync()
Function which sends message using nl_send_auto(), frees the message and
waits for ACK/error message (if auto-ack is not disabled).
2011-03-25 18:11:52 +01:00
Thomas Graf e4b507e290 Deprecate rtnl_qdisc_foreach_child() and rtnl_qdisc_foreach_cls()
Their usage is not completely safe, it is not possible to handle
the out of memory situation of the allocate filter. It is very
unlikely for this to cause any problem though.

The functions are still accessible but gcc will warn about their
deprecation.
2011-03-24 22:50:11 +01:00
Thomas Graf f523f297f7 Allow NLSYSCONFDIR environment variable to overwrite built-in sysconfdir 2011-03-24 21:14:52 +01:00
Thomas Graf 8d5493418a Cleanup <netlink/route/qdisc.h>
- remove dead prototypes
- reformat
2011-03-24 20:57:43 +01:00
Thomas Graf 93b6c114a8 Add NLE_NODEV error 2011-03-24 16:56:10 +01:00
Thierry Reding 9f1abddb1a Fix "make distcheck".
This commit adds some missing files (some header files, the files below
/etc and the bison/flex files) to the distribution tarball to ensure
that libnl can be built from the tarballs created using "make dist".

It also adds some incantations to properly generate the flex and bison
output since the generated output is no longer shipped in the tarball.
2011-03-23 16:00:44 +01:00
Daniel Walter 38db636f78 add missing nl_cache_search in cache.h
fix missing declaration of nl_cache_search
2011-03-22 13:13:07 +01:00
Thomas Graf c1073d6172 Documentation updates
Mostly killing doxygen warnings, some doc updates to caching
2011-03-22 00:40:26 +01:00
Thomas Graf 45941f9d5f rename sch -> qdisc 2011-03-21 16:47:42 +01:00
Thomas Graf 8eb5b5532e Unified TC API
Finally got rid of all the qdisc/class/cls code duplication in
the tc module API. The API takes care of allocation/freeing the
tc object specific data.

I hope I got it right this time.
2011-03-21 15:51:52 +01:00
Thomas Graf 5dc897d5de provide function to retrieve htb rate 2011-03-17 17:31:08 +01:00
Thomas Graf ae5dfb1cc7 Make struct nl_object public, NLHDR_COMMON has been public anyway 2011-03-17 14:44:56 +01:00
Thomas Graf d8d67c0a4c Provide numeric version defines 2011-03-16 13:46:41 +01:00
Laurent Defert 5f3dbf80d1 Fix function nfnl_ct_del name
This function is named nfnl_nl_del in lib/netfilter/ct.c, while it was
declared nfnl_ct_delete in the header.
2011-03-16 13:11:50 +01:00
Thomas Graf 2d1626b320 Include <linux/pkt_cls.h> and <linux/pkt_sched.h> in <netlink/route/tc.h> for convenience 2011-03-16 12:59:31 +01:00
Thomas Graf 4b0126b8e6 prefix ipv6 link statistics identifiers with IP6 2011-03-16 12:55:19 +01:00
Thomas Graf 82fe785820 use linux/netlink.h instead of netlink/netlink-kernel.h 2011-03-16 12:53:14 +01:00
Thomas Graf 5644578190 Tons of documentation 2010-11-27 10:18:07 +01:00