summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-rtnl/rtnl-util.c
Commit message (Collapse)AuthorAgeFilesLines
* sd-netlink: rename from sd-rtnlTom Gundersen2015-06-131-173/+0
|
* sd-rtnl: make joining broadcast groups implicitTom Gundersen2015-06-111-2/+2
|
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-231-1/+0
| | | | | | This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
* sd-rtnl: fix creation of synthetic error repliesTom Gundersen2015-02-061-3/+1
|
* sd-rtnl: add sd_rtnl_message_{new_neigh,neigh_get_{family,ifindex}}Tom Gundersen2014-12-021-0/+11
|
* treewide: a few more log_*_errno + return simplificationsMichal Schmidt2014-11-281-4/+2
| | | | The one in tmpfiles.c:create_item() even looks like it fixes a bug.
* treewide: no need to negate errno for log_*_errno()Michal Schmidt2014-11-281-2/+2
| | | | It corrrectly handles both positive and negative errno values.
* treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt2014-11-281-2/+2
| | | | | | | | | | | | | As a followup to 086891e5c1 "log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers", use sed to convert the simple cases to use the new macros: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/' Multi-line log_*() invocations are not covered. And we also should add log_unit_*_errno().
* udev: net_setup_link - open ethtool and rtnl connections lazilyTom Gundersen2014-09-091-15/+11
|
* udev: event - keep one rtnl per worker, rather than per eventTom Gundersen2014-09-091-3/+9
| | | | | | | | Creating the rtnl context is cheap, but freeing it may not be, due to synchronous close(). Also drop some excessive logging. We now log about the changing ifname exactly once.
* networkd: add minimal client tool "networkd" to query network statusLennart Poettering2014-08-121-0/+10
| | | | | | | In the long run this should become a full fledged client to networkd (but not before networkd learns bus support). For now, just pull interesting data out of networkd, udev, and rtnl and present it to the user, in a simple but useful output.
* sd-rtnl/networkd: use new rtnl_message_read() API and drop helperTom Gundersen2014-03-061-16/+0
| | | | | With the new sd_rtnl_message_read_string(), there is no longer a need for rtnl_message_get_ifname().
* api: in constructor function calls, always put the returned object pointer ↵Lennart Poettering2014-02-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | first (or second) Previously the returned object of constructor functions where sometimes returned as last, sometimes as first and sometimes as second parameter. Let's clean this up a bit. Here are the new rules: 1. The object the new object is derived from is put first, if there is any 2. The object we are creating will be returned in the next arguments 3. This is followed by any additional arguments Rationale: For functions that operate on an object we always put that object first. Constructors should probably not be too different in this regard. Also, if the additional parameters might want to use varargs which suggests to put them last. Note that this new scheme only applies to constructor functions, not to all other functions. We do give a lot of freedom for those. Note that this commit only changes the order of the new functions we added, for old ones we accept the wrong order and leave it like that.
* sd-rtnl-message: store reference to the bus in the messageTom Gundersen2014-02-181-3/+3
| | | | This mimics the sd-bus api, as we may need it in the future.
* sd-rtnl: always include linux/rtnetlink.hTom Gundersen2014-02-151-1/+0
|
* rtnl: rename constructors from the form sd_rtnl_xxx_yyy_new() to ↵Lennart Poettering2014-02-131-2/+2
| | | | | | | | sd_rtnl_xxx_new_yyy() So far we followed the rule to always indicate the "flavour" of constructors after the "_new_" or "_open_" in the function name, so let's keep things in sync here for rtnl and do the same.
* rtnl: drop "sd_" prefix from cleanup macrosLennart Poettering2014-02-131-2/+2
| | | | | | | | | The "sd_" prefix is supposed to be used on exported symbols only, and not in the middle of names. Let's drop it from the cleanup macros hence, to make things simpler. The bus cleanup macros don't carry the "sd_" either, so this brings the APIs a bit nearer.
* sd-rtnl: beef up rtnl-util a bitTom Gundersen2014-01-301-0/+72
|
* libsystemd: split up into subdirsTom Gundersen2014-01-211-0/+100
We still only produce on .so, but let's keep the sources separate to make things a bit less messy.