summaryrefslogtreecommitdiffstats
path: root/lib/socket.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Consistent naming of socket functionsThomas Graf2008-12-101-3/+14
|
* Documentation updateThomas Graf2008-12-031-71/+0
|
* Allow to pass multiple group values to membership functionsHolger Eitzenberger2008-12-031-16/+42
| | | | | | | | | | | | | | | Instead of calling the membership functions several times it is helpfull to extend the API and make the single group functions a special case. The value 0 (NFNLGRP_NONE) terminates this list. Example use: nl_socket_add_memberships(sock, group_1, group_2, 0); nl_socket_drop_memberships(sock, group_1, group_2, 0); Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
* Add socket flag NL_NO_AUTO_ACK to allow disabling auto ACKSThomas Graf2008-10-201-0/+27
|
* Rename struct nl_handle to struct nl_sockThomas Graf2008-05-151-118/+115
| | | | | | | | The idea of a common handle is long revised and only misleading, nl_handle really represents a socket with some additional action handlers assigned to it. Alias for nl_handle is kept for backwards compatibility.
* Thread-safe error handlingThomas Graf2008-05-141-23/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order for the interface to become more thread safe, the error handling was revised to no longer depend on a static errno and error string buffer. This patch converts all error paths to return a libnl specific error code which can be translated to a error message using nl_geterror(int error). The functions nl_error() and nl_get_errno() are therefore obsolete. This change required various sets of function prototypes to be changed in order to return an error code, the most prominent are: struct nl_cache *foo_alloc_cache(...); changed to: int foo_alloc_cache(..., struct nl_cache **); struct nl_msg *foo_build_request(...); changed to: int foo_build_request(..., struct nl_msg **); struct foo *foo_parse(...); changed to: int foo_parse(..., struct foo **); This pretty much only leaves trivial allocation functions to still return a pointer object which can still return NULL to signal out of memory. This change is a serious API and ABI breaker, sorry!
* Support defining the default callback handler with an environment variableThomas Graf2007-12-181-1/+21
|
* Fix memory leak when parsing netlink messages into cachesThomas Graf2007-12-171-1/+1
| | | | The reference created by the parsers was never given back.
* Fix creation and destruction of socketsThomas Graf2007-12-171-3/+34
| | | | | | | | 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.
* Initial importThomas Graf2007-09-141-0/+548