summaryrefslogtreecommitdiff
path: root/src/systemd
Commit message (Collapse)AuthorAge
* sd-event: reorder header slightlyLennart Poettering2014-05-15
|
* bus: add userdata API for bus name tracker objectsLennart Poettering2014-05-14
|
* rtnl: change from bitmask to enum for rtnl groupsTom Gundersen2014-05-10
| | | | | The bitmask is deprecated in the kernel, so move to the new interface. At the moment this does not make a difference for us, but it avoids having to change the API in the future.
* sd-rtnl: message - add support for getting prefixlen from address messagesTom Gundersen2014-05-10
|
* sd-network: expose global operational stateTom Gundersen2014-05-08
|
* sd-network: expose both admin and operational state directlyTom Gundersen2014-05-07
| | | | Also add a call to check if a link is loopback, as this should commonly be ignored.
* man: document sd_event_add_time(3)Lennart Poettering2014-05-06
|
* sd-network: add support for only listening to some types of changesTom Gundersen2014-04-30
|
* sd-resolve: rework sd-resolve to be callback based, similar in style to ↵Lennart Poettering2014-04-29
| | | | sd-bus and sd-event
* sd-dhcp-lease: add NTP supportTom Gundersen2014-04-29
| | | | Export the NTP servers so timesyncd can use them.
* sd-rtnl: message - expose DUMP flag in the apiTom Gundersen2014-04-19
|
* sd-rtnl: multi-part message - store as linked-list rather than independent ↵Tom Gundersen2014-04-14
| | | | | | | messages This means the API can stay the same as for single-part messages by simply passing the head message around. Unrefing the head of the linked list unrefs the whole list.
* sd-rtnl: message_addr - expose a few more gettersTom Gundersen2014-04-14
|
* sd-ipv4ll: Add reference counting for IPv4LLPatrik Flykt2014-04-11
| | | | | | | | | | Similar to DHCP, the IPv4LL library user can decide to free the LL client any time the callback is called. Guard against freeing the LL client in the callback by introducing proper reference counting. Also update code using the IPv4LL library to properly handle a returned NULL from the notify and stop functions if the IPv4LL client was freed.
* sd-dhcp-client: Add reference counting for DHCPPatrik Flykt2014-04-11
| | | | | | | | | | | The DHCP library user can decide to free the DHCP client any time the callback is called. After the callback has been called, other computations may still be needed - the best example being a full restart of the DHCP procedure in case of lease expiry. Fix this by introducing proper reference counting. Properly handle a returned NULL from the notify and stop functions if the DHCP client was freed.
* login: add 'mir' to the list of session typesDavid Herrmann2014-04-09
| | | | | | | | | Add Mir to the list of session types. This is implemented for LightDM in lp:~robert-ancell/lightdm/xdg-session-desktop [1]. [1] https://code.launchpad.net/~robert-ancell/lightdm/xdg-session-desktop/+merge/214108 (david: adjusted commit-header and fixed whitespace issues)
* networkd: smooth transition from ipv4ll to dhcp addressUmut Tezduyar Lindskog2014-04-03
| | | | | | | | | | | | | | | | | | Currently when both ipv4ll and dhcp are enabled, ipv4ll address (if one has been claimed) is removed when dhcp address is aquired. This is not the best thing to do since there might be clients unaware of the removal trying to communicate. This patch provides a smooth transition between ipv4ll and dhcp. If ipv4ll address was claimed [1] before dhcp, address is marked as deprecated. Deprecated address is still a valid address and packets can be received on it but address cannot be selected as a source address. If dhcp lease cannot be extended, then ipv4ll address is marked as valid again. [1] If there is no collision, claiming IPv4LL takes between 4 to 7 seconds.
* sd-rtnl: rework rtnl type systemTom Gundersen2014-03-28
| | | | | | | | | | | | Use a static table with all the typing information, rather than repeated switch statements. This should make it a lot simpler to add new types. We need to keep all the type info to be able to create containers without exposing their implementation details to the users of the library. As a freebee we verify the types of appended/read attributes. The API is extended to nicely deal with unions of container types.
* src/systemd: fix grammar and spelling errors in commentsJason St. John2014-03-25
|
* libsystemd: Don't use "class" in public headersMarc-Antoine Perennou2014-03-24
| | | | For compatibility with C++
* sd-rtnl: add sd_rtnl_message_enter_container()Tom Gundersen2014-03-24
| | | | | | | | | | | | Extend rta_offset_tb into a stack of offset tables, one for each parent of the current container, and make sd_rtnl_message_{enter,exit}_container() pop/push to this stack. Also make sd_rtnl_message_rewind() parse the top-level container, and use this when reading a message from the socket. This changes the API by dropping the now redundant sd_rtnl_message_read() method.
* sd-event: rework API to support CLOCK_REALTIME_ALARM and ↵Lennart Poettering2014-03-24
| | | | CLOCK_BOOTTIME_ALARM, too
* sd-ipv4ll/networkd: generate predictable addressesUmut Tezduyar Lindskog2014-03-21
| | | | | | | | | | | | | | | | | | | | Increase the chance of using the same link local address between reboots. The pseudo random sequence of addresses we attempt is now seeded with data that is very likely to stay the same between reboots, but at the same time be unique to the specific machine/nic. First we try to use the ID_NET_NAME_* data from the udev db combined with the machin-id, which is guaranteed to be unique and persistent, if available. If that is not possible (e.g., in containers where we don't have access to the udev db) we fallback to using the MAC address of the interface, which is guaranteed to be unique, and likely to be persistent. [tomegun: three minor changes: - don't expose HASH_KEY in the siphash24 header - get rid of some compile-warnings (and some casts at the same time), by using uint8_t[8] rather than uint64_t in the api - added commit message]
* sd-bus: add proper monitoring APILennart Poettering2014-03-19
|
* sd-login: add calls that retrieve credentials of peers connected to AF_UNIX ↵Lennart Poettering2014-03-17
| | | | | | | peers This is supposed to be an extension of SO_PEERCRED and SO_PEERSEC, except for cgroup information.
* core, libsystemd, systemd, timedate, udev: spelling fixesMiklos Vajna2014-03-17
|
* sd-rtnl: never treat broadcasts as repliesTom Gundersen2014-03-16
| | | | | Otherwise the sequence number of a broadcast may match the sequence number of a pending unicast message and cause confusion.
* sd-login: add sd_machine_get_class() callLennart Poettering2014-03-12
|
* bus: replace sd_bus_label_{escape,unescape}() by new ↵Lennart Poettering2014-03-11
| | | | | | | | | | | sd_bus_path_{encode,decode}() The new calls work similarly, but enforce a that a common, fixed bus path prefix is used. This follows discussions with Simon McVittie on IRC that it should be a good idea to make sure that people don't use the escaping applied here too wildly as anything other than the last label of a bus path.
* sd-rtnl: introduce read ether and ip address functionsSusant Sahani2014-03-07
| | | | | | | This patch introduces reading ethernet address and IPV4/IPv6 as well which is based on table based look up. [tomegun: rename read_ether() to read_ether_addr() to match the append function.]
* sd-rtnl:introduce table-based lookup and typesafe read() functionsSusant Sahani2014-03-06
| | | | | | | | | This patch introduces new netlink attribute parsing logic which is table based lookup and sd_rtnl_message_read_* methods for reading attributes. By doing this user does not have to loop for the attribute values . Only providing the attribute type it gets the attribute values which is optimized and sd_rtnl_message_read_* methods are simplified.
* sd-network: IPv4 link-local support [v2]Umut Tezduyar Lindskog2014-03-03
| | | | | | | | | | | | | | | Implements IPv4LL with respect to RFC 3927 (http://tools.ietf.org/rfc/rfc3927.txt) and integrates it with networkd. Majority of the IPv4LL state machine is taken from avahi (http://avahi.org/) project's autoip. IPv4LL can be enabled by IPv4LL=yes under [Network] section of .network file. IPv4LL works independent of DHCP but if DHCP lease is aquired, then LL address will be dropped. [tomegun: removed a trailing newline and a compiler warning]
* sd-dhcp-lease: add sd_dhcp_lease_get_next_server()Tom Gundersen2014-03-03
|
* sd-dhcp-lease: add sd_dhcp_lease_get_server_identifier()Tom Gundersen2014-03-03
|
* sd-dhcp-lease: add Root Path supportTom Gundersen2014-03-03
| | | | This is necessary when mounting /dev/nfs based on a DHCP lease.
* bus: add sd_bus_track object for tracking peers, and port core over to itLennart Poettering2014-03-03
| | | | | | | | | | | | | | | | | | | This is primarily useful for services that need to track clients which reference certain objects they maintain, or which explicitly want to subscribe to certain events. Something like this is done in a large number of services, and not trivial to do. Hence, let's unify this at one place. This also ports over PID 1 to use this to ensure that subscriptions to job and manager events are correctly tracked. As a side-effect this makes sure we properly serialize and restore the track list across daemon reexec/reload, which didn't work correctly before. This also simplifies how we distribute messages to broadcast to the direct busses: we only track subscriptions for the API bus and implicitly assume that all direct busses are subscribed. This should be a pretty OK simplification since clients connected via direct bus connections are shortlived anyway.
* sd-network: fix headerTom Gundersen2014-02-28
|
* sd-network: add new libraryTom Gundersen2014-02-28
| | | | | | 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.
* logind: detect whether the system is docked, and if it is inhibit lid switch ↵Lennart Poettering2014-02-24
| | | | | | | processing This should make operation nicer with docking stations, but will not cover anything that does not implement SW_DOCK.
* event: add new kind of event source called "post"Lennart Poettering2014-02-21
| | | | | | | | | | | | | This new event source is triggered by the dispatching of any non-post event source. It can thus be used to do clean-up or recheck work, triggered by any other event source having been executed. This is different from "defer" event source which are unconditionally triggered as long as they are enabled. A "defer" event source that does nothing will result in the event loop busy looping unless it is turned off eventually. This is different for "post" event sources that will be only triggered when some other non-post ran, and will thus not keep the event loop busy on its own.
* api: in constructor function calls, always put the returned object pointer ↵Lennart Poettering2014-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-bus: the bus returned should be the first argJason A. Donenfeld2014-02-20
| | | | This matches the API of previous headers, such as sd-journal.h.
* sd-damon is LGPL nowKay Sievers2014-02-19
|
* build-sys: merge libsystemd-daemon into libsystemdKay Sievers2014-02-19
|
* sd-rtnl-message: store reference to the bus in the messageTom Gundersen2014-02-18
| | | | This mimics the sd-bus api, as we may need it in the future.
* sd-rtnl: always include linux/rtnetlink.hTom Gundersen2014-02-15
|
* sd-rtnl: message_open_container - don't take a 'size' argumentTom Gundersen2014-02-15
| | | | We can always know the size based on the type, so let's do this inside the library.
* rtnl: support adding VETH_INFO_PEER containers into rtnl messagesLennart Poettering2014-02-13
|
* rtnl: rename constructors from the form sd_rtnl_xxx_yyy_new() to ↵Lennart Poettering2014-02-13
| | | | | | | | 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.
* sd-dhcp-client: split sd_dhcp_lease from sd_dhcp_clientTom Gundersen2014-02-07
| | | | | | | | This allows us users of the library to keep copies of old leases. This is used by networkd to know what addresses to drop (if any) when the lease expires. In the future this may be used by DNAv4 and sd-dhcp-server.