summaryrefslogtreecommitdiff
path: root/src/systemd
Commit message (Collapse)AuthorAge
* sd-event: allow naming event sourcesTom Gundersen2014-08-28
|
* sd-bus: don't include internal header memfd.h in public header sd-bus.hHristo Venev2014-08-26
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=83097
* sd-event: split run into prepare/wait/dispatchTom Gundersen2014-08-25
| | | | | | | | | | | | | | | | | | | | | | | | | | This will allow sd-event to be integrated into an external event loop, which in turn will allow (say) glib-based applications to use our various libraries, without manually integrating each of them (bus, rtnl, dhcp, ...). The external event-loop should integrate sd-event int he following way: Every iteration must start with a call to sd_event_prepare(), which will return 0 if no event sources are ready to be processed, a positive value if they are and a negative value on error. sd_event_prepare() may only be called following sd_event_dispatch(); a call to sd_event_wait() indicating that no sources are ready to be dispatched; or a failed call to sd_event_dispatch() or sd_event_wait(). A successful call to sd_event_prepare() indicating that no event sources are ready to be dispatched must be followed by a call to sd_event_wait(), which will return 0 if it timed out without event sources being ready to be processed, a negative value on error and a positive value otherwise. sd_event_wait() may only be called following a successful call to sd_event_prepare() indicating that no event sources are ready to be dispatched. If sd_event_wait() indicates that some events sources are ready to be dispatched, it must be followed by a call to sd_event_dispatch(). This is the only time sd_event_dispatch() may be called.
* sd-event: add API to access epoll_fdTom Gundersen2014-08-20
| | | | | This is a prerequisite for integrating sd-event into an external event loop.
* Merge remote-tracking branch 'origin/master'Lennart Poettering2014-08-18
|\
| * memfd: internalize functions, drop sd_memfd typeDaniel Mack2014-08-18
| | | | | | | | | | | | Remove the sd_ prefix from internal functions and get rid of the sd_memfd type. As a memfd is now just a native file descriptor, we can get rid of our own wrapper type, and also use close() and dup() on them directly.
| * memfd: move code from public library to src/sharedDaniel Mack2014-08-18
| | | | | | | | | | Don't expose generic kernel API via libsystemd, but keep the code internal for our own usage.
| * kdbus: switch over to generic memfd implementation (ABI+API break)Daniel Mack2014-08-17
| |
* | sd-bus: add API to query which handler/callback is currently being dispatchedLennart Poettering2014-08-18
|/
* sd-bus: add API to check if a client has privilegesLennart Poettering2014-08-15
| | | | | | | | | | | | | This is a generalization of the vtable privilege check we already have, but exported, and hence useful when preparing for a polkit change. This will deal with the complexity that on dbus1 one cannot trust the capability field we retrieve via the bus, since it is read via /proc/$$/stat (and thus might be out-of-date) rather than directly from the message (like on kdbus) or bus connection (as for uid creds on dbus1). Also, port over all code to this new API.
* sd-network: add system-wide sd_network_get_domains() APILennart Poettering2014-08-15
|
* sd-network: add support for wildcard domainsTom Gundersen2014-08-15
|
* sd-network: add sd_network_linkg_get_domains()Tom Gundersen2014-08-14
| | | | | | For now this only exposes the domain name (DHCP Option 15), and not the search string (DHCP Option 119), which will be implemented in a follow-up patch.
* sd-networkd: rename link_get_state to link_get_setup_stateTom Gundersen2014-08-13
| | | | Suggested by Kay and Lennart.
* sd-network: rename operstates 'down' -> 'off' and 'up' -> 'no-carrier'Tom Gundersen2014-08-13
| | | | Suggested by Lennart and Kay.
* sd-network: /_get_link_/_link_get_/Tom Gundersen2014-08-13
| | | | | | The link is the 'object', so make this in line with our usual naming convention. Suggested by Kay and Lennart.
* sd-network: bring comments up-to-dateLennart Poettering2014-08-13
|
* sd-network: rename state INITALIZING to PENDING and expose as any other stateTom Gundersen2014-08-13
| | | | | | | This is the state when we are waiting for udev to initialize the device, and waiting for libudev and rtnl to be in sync. In the future we probably will also be waiting for nl80211. At this point we do not yet have enough information to know whether or not networkd should be handling the device.
* sd-network: split the operstate 'unknown' into 'down' and 'up'Tom Gundersen2014-08-12
|
* sd-network: add API to output all collected system-wide NTP and DNS serversLennart Poettering2014-08-12
| | | | Also, output the collected information in "networkctl".
* sd-network: remove client-side dhcp APILennart Poettering2014-08-12
| | | | | | | | | The networkd should abstract the difference between DHCP supplied and configured data, and hence the DHCP lease concept should not exposed on the client side. Should we want to support arbitrary DHCP fields one day, we can add a new sd_network_get_link_dhcp_field() call or so.
* networkd: add minimal client tool "networkd" to query network statusLennart Poettering2014-08-12
| | | | | | | 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-network: rename the per-ifindex calls to sd_network_get_link_xxx()Lennart Poettering2014-08-11
| | | | | This way we can introduce system-wide versions of these calls that are called the same way, but without the "link" in the name.
* sd-dhcp-server: always send out ROUTER and SUBNET_MASKTom Gundersen2014-08-04
| | | | For now we simply take these values from the server's address.
* networkd: add and expose per-link LLMNR config optionTom Gundersen2014-08-04
|
* sd-dhcp-client: allow the max dhcp message size to be set to the MTU of the linkTom Gundersen2014-08-01
|
* sd-dhcp-server: add forcerenew supportTom Gundersen2014-07-28
|
* sd-dhcp-client: drop event DHCP_EVENT_NO_LEASETom Gundersen2014-07-28
| | | | | Keep this internal to the client and simply restart it when NAK is receieved, as per the RFC.
* sd-network: expose DNS/NTP servers as stringsTom Gundersen2014-07-23
| | | | | | This avoids having to distinguish between IPv4 and IPv6, allowing us to keep their internal orderings. The consumers now has to turn the strings into addresses.
* networkd: set route protocolDan Williams2014-07-23
| | | | | | | | | | | | | | | All routes added by networkd are currently set RTPROT_BOOT, which according to the kernel means "Route installed during boot" (rtnetlink.h). But this is not always the case as networkd changes routing after boot too. Since the kernel gives more detailed protocols, use them. With this patch, user-configured static routes now use RTPROT_STATIC (which they are) and DHCP routes use RTPROT_DHCP. There is no define for IPv4LL yet, so those are installed as RTPROT_STATIC (though perhaps RTPROT_RA is better?). [tomegun: fixup src/network/networkd-link.c:972:33: error: too few arguments to function 'route_new_dynamic']
* sd-network: drop get_ifindicesTom Gundersen2014-07-21
| | | | People should use rtnl for this, and then only query sd-network by the ifindices it finds.
* change type for address family to "int"Lennart Poettering2014-07-18
| | | | | | | | Let's settle on a single type for all address family values, even if UNIX is very inconsitent on the precise type otherwise. Given that socket() is the primary entrypoint for the sockets API, and that uses "int", and "int" is relatively simple and generic, we settle on "int" for this.
* sd-rtnl: make string returned by sd_rtnl_message_read_string() constLennart Poettering2014-07-18
|
* sd-network: fixup apiTom Gundersen2014-07-17
| | | | | | 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.
* sd-network: expose 'unmanaged' as a regular stateTom Gundersen2014-07-17
| | | | | 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.
* sd-login: always use "indices" as plural of "index"Lennart Poettering2014-07-17
| | | | | So far both "indexes" and "indices" was used. Let's clean this up, and stick to indices, since it appears to be used more frequently.
* sd-network: rename "index" parameter to "ifindex"Lennart Poettering2014-07-17
| | | | | makes things a bit clearer and avoids any clashes with libc's index() symbol.
* sd-network: remove redundant array size parameter from functions that return ↵Lennart Poettering2014-07-17
| | | | | | | | 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.
* sd-network: fix parameter order for sd_network_monitor_new()Lennart Poettering2014-07-17
| | | | | | 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.
* resolved: add a DNS client stub resolverLennart Poettering2014-07-16
| | | | | | | Let's turn resolved into a something truly useful: a fully asynchronous DNS stub resolver that subscribes to network changes. (More to come: caching, LLMNR, mDNS/DNS-SD, DNSSEC, IDN, NSS module)
* sd-dhcp-client: make request broadcasts opt-inTom Gundersen2014-07-15
| | | | | | | | | | It appears there is no good way to decide whether or not broadcasts should be enabled, there is hardware that must have broadcast, and there are networks that only allow unicast. So we give up and make this configurable. By default, unicast is used, but if the kernel were to inform us abotu certain interfaces requiring broadcast, we could change this to opt-in by default in those cases.
* networkd: dhcp add vendor class indentifier option 60Susant Sahani2014-07-14
| | | | | | | | | | | | | | | | Vendor Class Identifier be used by DHCP clients to identify their vendor type and configuration. When using this option, vendors can define their own specific identifier values, such as to convey a particular hardware or operating system configuration or other identifying information. Vendor-specified DHCP options—features that let administrators assign separate options to clients with similar configuration requirements. For example, if DHCP-aware clients for example we want to separate different gateway and option for different set of people (dev/test/hr/finance) in a org or devices for example web/database servers or let's say in a embedded device etc and require a different default gateway or DNS server than the rest of clients.
* nss-mymachines: add new NSS module for automatically resolving addresses of ↵Lennart Poettering2014-07-11
| | | | all local containers
* path: add new "systemd-path" utility for querying paths described in ↵Lennart Poettering2014-07-02
| | | | | | | | file-hierarchy(7) This new tool is based on "sd-path", a new (so far unexported) API for libsystemd, that can hopefully grow into a workable API covering /opt and more one day.
* networkd: send hostname to dhcp serverEugene Yakubovich2014-07-01
| | | | | | | | | | | Send hostname (option 12) in DISCOVER and REQUEST messages so the DHCP server could use it to register with dynamic DNS and such. To opt-out of this behaviour set SendHostname to false in [DHCP] section of .network file [tomegun: rebased, made sure a failing set_hostname is a noop and moved config from DHCPv4 to DHCP]
* Add support for DHCP static route optionsEugene Yakubovich2014-06-29
| | | | | | This adds support for DHCP options 33 and 121: Static Route and Classless Static Route. To enable this feature, set UseRoutes=true in .network file. Returned routes are added to the routing table.
* sd-dhcp-client/networkd: set lifetimes for IPv4 addressesPatrik Flykt2014-06-29
| | | | | | Note that /proc/sys/net/ipv4/ip_dynaddr needs to be non-zero. [tomegun: hook up DHCP renew events to increase the lifetime when necessary]
* networkd/sd-dhcp-server: only start dhcp server when necessaryTom Gundersen2014-06-29
|
* sd-dhcp6-client: Add Option Request Option supportPatrik Flykt2014-06-26
| | | | | | | | | Provide a function to request more options from the DHCPv6 server. Provide a sensible default set at startup and add test basic test cases for the intended usage. Define DNS and NTP related option codes and add comments for the unassigned codes.
* sd-icmp6-nd: Add function to stop ongoing ICMPv6 discoveryPatrik Flykt2014-06-26
| | | | | In some use cases stopping an ongoing ICMPv6 discovery is more useful than always unreferencing the whole structure.