Commit graph

8 commits

Author SHA1 Message Date
Tom Gundersen 81d98a39eb sd-dhcp-lease/sd-network: modernization and fix leak 2014-05-19 18:14:56 +02:00
Tom Gundersen 7dbf94a9c4 sd-network: expose DNS information 2014-05-19 18:14:56 +02:00
Tom Gundersen bbf7c04821 sd-network: expose global operational state 2014-05-08 17:21:37 +02:00
Tom Gundersen deb2e5230b sd-network: expose both admin and operational state directly
Also add a call to check if a link is loopback, as this should commonly be ignored.
2014-05-07 16:54:02 +02:00
Tom Gundersen 7e141e498c sd-network: add support for only listening to some types of changes 2014-04-30 00:05:28 +02:00
Lennart Poettering 03e334a1c7 util: replace close_nointr_nofail() by a more useful safe_close()
safe_close() automatically becomes a NOP when a negative fd is passed,
and returns -1 unconditionally. This makes it easy to write lines like
this:

        fd = safe_close(fd);

Which will close an fd if it is open, and reset the fd variable
correctly.

By making use of this new scheme we can drop a > 200 lines of code that
was required to test for non-negative fds or to reset the closed fd
variable afterwards.
2014-03-18 19:31:34 +01:00
Tom Gundersen cb6fa44cb5 sd-network: turn states 'unknown' and 'unmanaged' into errnos 2014-02-28 02:08:08 +01:00
Tom Gundersen fe8db0c5ee sd-network: add new library
This is similar to sd-login, but exposes the state of networkd rather than logind.

Include it in libsystemd-dhcp and rename it to libsystemd-network.
2014-02-28 01:01:13 +01:00