Commit Graph

62 Commits

Author SHA1 Message Date
Lennart Poettering 32d2064523 libsystemd-network: sd-event uses 64bit priorities, expose them in the APIs as such 2016-02-20 22:42:29 +01:00
Daniel Mack b26fa1a2fb tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file.
2016-02-10 13:41:57 +01:00
Susant Sahani 17af840b1d sd-netlink introduce API to add any size and type
Now we dont have any public API that will support
any size . sd_netlink_message_append_data will support
this.
2016-01-19 12:17:54 +05:30
Lennart Poettering 4afd3348c7 tree-wide: expose "p"-suffix unref calls in public APIs to make gcc cleanup easy
GLIB has recently started to officially support the gcc cleanup
attribute in its public API, hence let's do the same for our APIs.

With this patch we'll define an xyz_unrefp() call for each public
xyz_unref() call, to make it easy to use inside a
__attribute__((cleanup())) expression. Then, all code is ported over to
make use of this.

The new calls are also documented in the man pages, with examples how to
use them (well, I only added docs where the _unref() call itself already
had docs, and the examples, only cover sd_bus_unrefp() and
sd_event_unrefp()).

This also renames sd_lldp_free() to sd_lldp_unref(), since that's how we
tend to call our destructors these days.

Note that this defines no public macro that wraps gcc's attribute and
makes it easier to use. While I think it's our duty in the library to
make our stuff easy to use, I figure it's not our duty to make gcc's own
features easy to use on its own. Most likely, client code which wants to
make use of this should define its own:

       #define _cleanup_(function) __attribute__((cleanup(function)))

Or similar, to make the gcc feature easier to use.

Making this logic public has the benefit that we can remove three header
files whose only purpose was to define these functions internally.

See #2008.
2015-11-27 19:19:36 +01:00
Thomas Hindoe Paaboel Andersen 71d35b6b55 tree-wide: sort includes in *.h
This is a continuation of the previous include sort patch, which
only sorted for .c files.
2015-11-18 23:09:02 +01:00
Tom Gundersen 6b9e85a7de sd-netlink: add sd_rtnl_message_route_{s,g}et_flags() 2015-11-11 15:42:38 +01:00
Tom Gundersen ad70f78936 sd-netlink: rtnl - add route_get_{scope,tos,table,protocol}() 2015-10-11 15:04:16 +02:00
Susant Sahani c06cb593eb sd-rtnl: introduce new API to set the NL header flags
By default we set as NLM_F_CREATE | NLM_F_EXCL in
sd_rtnl_message_new_link
But incase of bridge we need to set NLM_F_REQUEST | NLM_F_ACK.

If NLM_F_EXCL is set then we are unable to set the parameters. As bridge
supports setting properties after creation not during creation.
2015-10-05 09:43:29 +05:30
Susant Sahani c06aead0c3 sd-netlink: introduce api for new NL type NLA_FLAG 2015-07-29 11:59:16 +05:30
Tom Gundersen 89489ef7d4 sd-netlink: message - split up source file
Split netlink-socket.c and rtnl-message.c from netlink-message.c.
2015-06-13 21:11:01 +02:00
Tom Gundersen bbe181b489 sd-netlink: drop the write-queue
AF_NETLINK is not write-buffered, so this was actually never used.
2015-06-13 20:51:56 +02:00
Tom Gundersen 1c4baffc18 sd-netlink: rename from sd-rtnl 2015-06-13 19:52:54 +02:00