dect
/
libnl
Archived
13
0
Fork 0
Commit Graph

676 Commits

Author SHA1 Message Date
Thomas Graf a948e082ea Adapt syntax of nl-route-add to nl-route-delete 2008-04-30 18:51:24 +02:00
Thomas Graf 182608e236 Fix segfault nexthop parsing when no option is given 2008-04-30 18:50:52 +02:00
Thomas Graf 6d9d3d5475 Adapt syntax of nl-route-list to nl-route-delete 2008-04-30 18:49:56 +02:00
Thomas Graf 2a09497fa4 Improved nl-route-delete featuring an interactive deletion mode 2008-04-30 18:48:49 +02:00
Thomas Graf 66330d37f5 Provide libnl version in <netlink/version.h> 2008-04-30 15:43:42 +02:00
Inaky Perez-Gonzalez 32000e8e9c libnl: recvmsgs doesn't necessarily free the message data
I stepped over libnl always freeing the messages and it
kind of made it awkward to reuse the message data without
reallocating.

The basic idea is: if a callback return value has a bit set,
don't free that message. The calling application owns it.
By default, things stay as before (messages are freed).

Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
2008-04-29 23:46:47 +02:00
Thomas Graf 535e831622 Big routing code rework (API/ABI BREAK!)
Adds all missing routing attributes and brings the routing
related code to a working state. In the process the API
was broken several times with the justification that nobody
is using this code yet.

The changes include new example code which is also a prototype
for how plain CLI tools could look like to control routes.
2008-04-29 23:31:30 +02:00
Thomas Graf 8ac78f1552 Fix compile warning in nl-list-caches 2008-04-29 23:11:09 +02:00
Thomas Graf 662887c052 Export nl_dump_line() and automatically count lines while dumping 2008-04-29 23:08:12 +02:00
Thomas Graf 1240cd6635 Move to version 1.2 and remove some dead code in configure.in 2008-04-29 23:02:42 +02:00
Thomas Graf 5ab64d5173 Define datarootdir to silent autoconf 2008-04-29 23:01:39 +02:00
Thomas Graf 477e351fd4 Don't wipe cscope database on make clean 2008-04-29 22:59:30 +02:00
Thomas Graf f4f7704b0d Ignore NULL pointers passed to nl_cache_free() 2008-04-29 22:58:07 +02:00
Thomas Graf 22f0ece5ac Remove dead code in nl-list-sockets 2008-04-29 10:50:23 +02:00
Thomas Graf 25ccbf1dab Prepare nl-list-sockets for 64bit addresses 2008-04-29 10:48:34 +02:00
Thomas Graf 0ca291d9e4 Fix 64bit alignment issue on x86_64. 2008-03-31 22:43:04 +02:00
Patrick McHardy 38c37dda2e [LIBNL]: Install netlink/route/link headers
Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-03-29 13:20:25 +01:00
Thomas Graf 0c2cb97924 libnl: fix policy check for NFQA_HWADDR
Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
2008-03-10 14:59:32 +01:00
Thomas Graf a9183a9c9f Fix from Benoit Boissinot <benoit.boissinot@ens-lyon.org> required to
install libnl in non-standard locations.
2008-03-10 14:57:01 +01:00
Thomas Graf 358e44efa4 Optimize nl_cache_ops_associate by checking protocol early 2008-03-05 14:11:05 +01:00
Thomas Graf 6a7606fa29 Initialize message type list to avoid overrun 2008-03-05 14:10:09 +01:00
Rui Tiago Cação Matos cca3921f15 [PATCH] Remove usage of C++ keyword 'class' on htb.h header.
Signed-off-by: Rui Tiago Cação Matos <rmatos@av.it.pt>
2008-03-05 13:39:12 +01:00
Thomas Graf 639b66b1f6 Update local copy of linux/rtnetlink.h 2008-03-05 11:31:41 +01:00
Thomas Graf 4be02ace48 Be liberal when receiving an empty nested attribute
No longer enforce at least one attribute in a container of nested
attributes. The application may do so itself by setting minlen
to NLA_HDRLEN.
2008-02-22 15:20:58 +01:00
Patrick McHardy ca0988a2a7 Fix nfnl_queue_msg_get_packetid() return type
[LIBNL]: Fix nfnl_queue_msg_get_packetid() return type

The packet-ID is a 32 bit value, but nfnl_queue_msg_get_packetid() returns
an uint16_t. Makes queueing fail after 2^16 packets.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-02-07 13:18:34 +01:00
Patrick McHardy 574d4af2b1 [LIBNL]: Install netfilter headers
libnl currently forgets to install the netfilter headers.
Fix that.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-02-07 13:14:56 +01:00
Patrick McHardy 596d3bc2e9 [LIBNL]: Support conntrack add/delete/query requests
Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-02-07 13:13:03 +01:00
Patrick McHardy 2f4f8a5094 [LIBNL]: Split up nfnetlink_log into log and msg objects
Split the nfnetlink_log code into two seperate objects, "netfilter/log"
to represent logging instances and "netfilter/log_msg" to represent
log messages. Also perform some function name unification for consistency
with other libnl object types, mainly renaming nfnl_log_build_*_msg
to nfnl_log_build_*_request.

This changes the API in an incompatible way, but since this feature is
new and the libnl netfilter headers haven't been installed so far,
there shouldn't be any users affected by this.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-02-07 13:09:17 +01:00
Patrick McHardy 3f48e49102 [LIBNL]: nfnetlink_log: support NUFLA_GID attribute
The NUFLA_GID attribute (currently only in net-2.6.25) contains the
gid of the sending process for locally generated packets.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-02-07 13:02:41 +01:00
Patrick McHardy 5618ea8f5a [LIBNL]: nfnetlink_log: only set hwproto if not zero
The hwproto doesn't have its own attribute and is also present when
not set. Don't set the attribute if its value is zero.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-02-07 13:01:12 +01:00
Patrick McHardy e72cb033f2 [LIBNL]: Add nfnetlink_queue support
Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-02-07 12:57:53 +01:00
Patrick McHardy 665b757809 [LIBNL]: Generic netfilter stuff
Add some generic helper functions for netfilter.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-02-07 12:53:03 +01:00
Patrick McHardy b64f15d6f9 [LIBNL]: Fix minor memleaks on exit
Make valgrind happy ...

Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-02-07 12:51:28 +01:00
Patrick McHardy e91bb2ffb0 [LIBNL]: Add if_vlan.h
vlan support needs VLAN_FLAG_REORDER_HDR, which is not available in
older if_vlan.h versions. Add the current version from the kernel.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2008-02-07 12:49:19 +01:00
Thomas Graf 7f6b7a8eea Improve readability of link statistics output 2008-02-07 12:42:07 +01:00
Thomas Graf 080727d90b Free associated caches when freeing cache manager
Caches allocated by the cache manager must be freed again when the cache
manager itself is freed. However, the netlink socket is allocated
indepdently so it should not be freed.
2008-02-05 12:35:41 +01:00
Thomas Graf dbcdf91a99 Detailed attribute documentation
This patch extends and reorganizes the existing attribute documentation
and includes various verbose examples.
2008-01-30 13:16:48 +01:00
Thomas Graf 0fa6756cca Abstract address allocation based on netlink attribute 2008-01-30 13:14:58 +01:00
Thomas Graf 3607dbfa54 Abstract data allocation based on netlink attribute 2008-01-30 13:14:38 +01:00
Thomas Graf 2e6ded94f4 1.1 release 2008-01-14 16:48:29 +01:00
Thomas Graf 75a26f3fc5 Improve message/attribute construction documentation and add nlmsg_expand() 2008-01-14 16:46:17 +01:00
Thomas Graf dbefb734d3 Fix documentation of cache manager. 2008-01-14 16:38:37 +01:00
Thomas Graf 6de17f3308 Fix stale data pointers when constructing messages
Patrick McHardy reported a problem where pointers to the
payload of a netlink message as returned by f.e. the
nesting helpers become stale when the payload data
chunk is reallocated.

In order to avoid further problems, the payload chunk is
no longer extended on the fly. Instead the allocation is
made during netlink message object allocation time with
a default size of a page which should be fine for the
majority of all users. Additionally the functions
nlmsg_alloc_size() and nlmsg_set_default_size() have been
added to allocate messages of a particular length and to
modify the default message size.
2008-01-14 16:17:56 +01:00
Thomas Graf 13c85b6633 Add missing @{ for doxygen to build genl documentation 2008-01-10 17:03:34 +01:00
Michael Biebl 37d95322da [PATCH] Remove autogenerated files from git and add them to .gitignore. 2008-01-10 14:57:10 +01:00
Michael Biebl 147628455c [PATCH] Process Doxyfile.in to set correct PACKAGE_VERSION number 2008-01-10 14:55:20 +01:00
Thomas Graf 141c2ccfd2 release 1.0 2008-01-10 12:46:37 +01:00
Thomas Graf aa00f82a7b Remove lib/defs.h from repository 2008-01-10 12:45:02 +01:00
Patrick McHardy c6609efc0f [PATCH] libnl cache management leak 2008-01-10 12:44:22 +01:00
Thomas Graf c8a0a5cdfb Added additional parsing and validation functions for generic netlink
Also adds better example documentation for generic netlink
2008-01-10 12:35:38 +01:00