dect
/
libnl
Archived
13
0
Fork 0
Commit Graph

650 Commits

Author SHA1 Message Date
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
Thomas Graf 373bc78545 Tell git to ignore temporary files and push to pre9 2008-01-09 12:28:17 +01:00
Thomas Graf ddbe8f6c41 Make vlan_put_attrs() available 2008-01-08 15:18:23 +01:00
Thomas Graf a7469ce758 Link info interface and vlan support
Adds an external interface to implement link info types and
implements the type vlan.
2008-01-08 15:00:46 +01:00
Thomas Graf 1952414737 Add support for the IFF_ECHO flag 2007-12-19 22:06:47 +01:00
Thomas Graf 3ad4665be2 Support link operstate and linkmode 2007-12-19 22:03:44 +01:00
Thomas Graf 4649886288 Represent default route with destination address length zero
So far the destination address for default routes was NULL
which complicated the handling of routes in general. By
assigning a address of length zero they can be compared
to each other.

This allows the cache manager to properly handle default
routes.
2007-12-19 19:41:01 +01:00
Thomas Graf 680c54fd46 Support defining the default callback handler with an environment variable 2007-12-18 13:06:48 +01:00
Thomas Graf 3c56ed5787 Read debugging environment variable when initializing the library 2007-12-18 12:42:06 +01:00
Thomas Graf 865bbb464a Include linux/ip_mg_alg.h internally for compatibility only 2007-12-18 12:30:09 +01:00
Thomas Graf 3f0f32bf79 Fix nl_msg_parse() to not give back a reference it does not own 2007-12-17 23:07:22 +01:00
Thomas Graf 12ed4a03d3 Fix cache manager to not give back a reference it does not own 2007-12-17 23:01:06 +01:00
Thomas Graf 155ad439a4 Fix memory leak when parsing netlink messages into caches
The reference created by the parsers was never given back.
2007-12-17 16:52:41 +01:00
Thomas Graf 91c330aae5 Fix creation and destruction of sockets
Fixes an off-by-one when releasing local ports. Fixes nl_connect()
to properly close the socket upon failure. Return EBADFD if
operations are performed on unconnected sockets where appropriate.
Makes nl_handle_alloc() return an error if all local ports are
used up.
2007-12-17 16:26:49 +01:00
Patrick McHardy 5780c640fc [LIBNL]: Fix pointer conversion warnings on 64 bit
nl-tctree-dump.c: In function 'print_class':
nl-tctree-dump.c:31: warning: cast from pointer to integer of different size
nl-tctree-dump.c:44: warning: cast from pointer to integer of different size
nl-tctree-dump.c: In function 'print_qdisc':
nl-tctree-dump.c:55: warning: cast from pointer to integer of different size
nl-tctree-dump.c:64: warning: cast from pointer to integer of different size

Signed-off-by: Patrick McHardy <kaber@trash.net
2007-12-13 14:33:37 +01:00
Patrick McHardy 6a0d290a70 [LIBNL]: Fix pointer conversion warnings on 64 bit
nl-tctree-dump.c: In function 'print_class':
nl-tctree-dump.c:31: warning: cast from pointer to integer of different size
nl-tctree-dump.c:44: warning: cast from pointer to integer of different size
nl-tctree-dump.c: In function 'print_qdisc':
nl-tctree-dump.c:55: warning: cast from pointer to integer of different size
nl-tctree-dump.c:64: warning: cast from pointer to integer of different size

Signed-off-by: Patrick McHardy <kaber@trash.net>
2007-12-13 14:33:35 +01:00
Patrick McHardy 936c9844b0 [LIBNL]: Fix format strings
Use %td for ptrdiff_t and %zu for size_t.

Signed-off-by: Patrick McHardy <kaber@trash.net>
2007-12-13 12:09:45 +01:00
Thomas Graf e166565121 Pushed to pre8 due to wrong version string in pre7 2007-11-21 18:24:11 +01:00
Thomas Graf d36d396fd0 Cache message type association interface cleanups 2007-10-11 23:09:49 +02:00
Philip Craig 1a125f88d8 Use linux/types.h to fix amd64 build
10-amd64-linux-types.patch from Ubuntu:

   - In order to make libnl compilable on amd64 include linux/types.h
     rather than defining the types ourselves; necessary as other headers
     include that and get different definitions.

 -- Scott James Remnant <scott@ubuntu.com>  Wed, 22 Mar 2006 02:12:08 +0000
2007-09-18 12:37:50 +02:00
Philip Craig cbe8902265 Allow filtering by name for conntrack status flags 2007-09-18 12:37:49 +02:00
Philip Craig 104e158bd5 Fix typo in conntrack object compare 2007-09-18 12:37:49 +02:00
Thomas Graf 3040a1d625 Export interface to define caches
This interface was internal so far which required all code defining
caches to be compiled with the sources available.

In order to simplify the interface, the co_msg_parser prototype was
changed to take the struct nl_parser_param directly instead of a
void *. It used to be void * because the co_msg_parser was directly
passed as the NL_CB_VALID callback function.
2007-09-17 13:36:16 +02:00
Thomas Graf 3d8efba917 Check for availability of request_update()
The implementation of this function is optional if a cache wishes to
be updated by notifications only.
2007-09-17 12:35:19 +02:00
Thomas Graf 508685c269 Export interface to define objects
This interface was internal so far which required all code defining
objects to be compiled with the sources available.

This change exposes struct nl_object_ops which seems safe as it
is not supposed to be embedded in other structures.

Patch contains extensive documentation to help with the creation
of own object implementations.
2007-09-15 19:55:38 +02:00
Thomas Graf 9eb34dc6ca Add missing declarations for genlmsg_data() and genlmsg_len() 2007-09-15 12:14:56 +02:00
Thomas Graf 44d362409d Initial import 2007-09-15 01:28:01 +02:00