summaryrefslogtreecommitdiff
path: root/src/network/sd-network.c
AgeCommit message (Collapse)Author
2014-07-17sd-network: fixup apiTom Gundersen
Do not expose link_is_loopback, people should just get this from rtnl directly. Do not expose NTP servers as IP addresses, these must be strings. Expose ifindex as int, not unsigned. This is what the kernel (mostly) and glibc uses.
2014-07-17sd-network: expose 'unmanaged' as a regular stateTom Gundersen
This is useful to save in the consumer of the lib, unlike ENODATA/EBUSY which means that the user should wait until a useful state is available.
2014-07-17sd-network: if a boolean is mising, we should just take it as falseLennart Poettering
That way, we can deprecate fields later on without problems
2014-07-17sd-network: remove redundant array size parameter from functions that return ↵Lennart Poettering
arrays As long as the number of array entries is relatively small it's nicer to simply return the number of entries directly, instead of using a size_t* return parameter for it.
2014-07-17sd-network: fix parameter order for sd_network_monitor_new()Lennart Poettering
Constructors should return the object they created as first parameter, except when they are generated as a child/member object of some other object in which case that should be first.
2014-06-03networkd: split runtime config dir from state dirTom Gundersen
Configuration will be in root:root /run/systemd/network and state will be in systemd-network:systemd-network /run/systemd/netif This matches what we do for logind's seat/session state.
2014-05-24sd-network: avoid false positive compiler warning caused by LTOTom Gundersen
Djalal Harouni <tixxdz@opendz.org>: There is also this one genrated by LTO, IMO it's a false positive since we do *check* for "lease" but the code is not consistent since in that code path, "lease" is initialized to NULL in other places, except for this one: src/resolve/resolved-manager.c: In function 'manager_update_resolv_conf': src/libsystemd-network/sd-dhcp-lease.c:67:18: warning: 'lease' may be used uninitialized in this function [-Wmaybe-uninitialized] if (lease->dns_size) { ^ src/network/sd-network.c:146:24: note: 'lease' was declared here sd_dhcp_lease *lease; ^
2014-05-19networkd/sd-network: expose statically configured NTP serversTom Gundersen
2014-05-19sd-dhcp-lease/sd-network: modernization and fix leakTom Gundersen
2014-05-19sd-network: expose DNS informationTom Gundersen
2014-05-08sd-network: expose global operational stateTom Gundersen
2014-05-07sd-network: expose both admin and operational state directlyTom Gundersen
Also add a call to check if a link is loopback, as this should commonly be ignored.
2014-04-30sd-network: add support for only listening to some types of changesTom Gundersen
2014-03-18util: replace close_nointr_nofail() by a more useful safe_close()Lennart Poettering
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-02-28sd-network: turn states 'unknown' and 'unmanaged' into errnosTom Gundersen
2014-02-28sd-network: add new libraryTom Gundersen
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.