summaryrefslogtreecommitdiff
path: root/src/systemd
AgeCommit message (Collapse)Author
2015-11-11sd-ndisc: introduce separate callbacksTom Gundersen
As the data passed is very different, we introduce four different callbacks: - Generic - router discovery timed out or state machine stopped - Router - router and link configuration received - Prefix onlink - configuration for an onlink prefix received - Prefix autonomous - configuration for to configure a SLAAC address for a prefix received
2015-11-11sd-ndisc: notify user on STOPTom Gundersen
Also, stop the state machine when we get into a broken state, rather than just notify the user.
2015-11-11sd-netlink: add sd_rtnl_message_route_{s,g}et_flags()Tom Gundersen
2015-11-11sd-dhcp6-client: add is_running() methodTom Gundersen
2015-11-03sd-pppoe: dropTom Gundersen
It is really unclear if we want to / have the resources to support this fully, so drop it for now. It can easily be brought back if a killer usecase emerges. Note that this code was never hooked up, so this does not remove any features.
2015-10-24sd-*.h: clean up exported (or to-be-exported) header filesLennart Poettering
Exported header files should not include internal headers. Fix that. Exported header files should not use the bool type. So far we opted to stick to C89 for exported headers, and hence use "int" for bools in them. Continue to do so. Exported header files should have #include lines for everything they use including inttypes.h and sys/types.h, so that they may be included in any order. Exported header files should have C++ guards, hence add them. Exported header files should not use gcc extensions like #pragma once, get rid of it.
2015-10-24util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering
string-util.[ch] There are more than enough calls doing string manipulations to deserve its own files, hence do something about it. This patch also sorts the #include blocks of all files that needed to be updated, according to the sorting suggestions from CODING_STYLE. Since pretty much every file needs our string manipulation functions this effectively means that most files have sorted #include blocks now. Also touches a few unrelated include files.
2015-10-22sd-ndisc: drop sd_ndisc_get_prefixlen()Tom Gundersen
This is unused, and in the future we will pass prefixes and prefixlengths directly to the callbacks when needed rather than having to search for them.
2015-10-22sd-ndisc: drop sd_ndisc_prefix_match()Tom Gundersen
This is no longer used.
2015-10-22sd-ndisc: don't inform the caller of expired prefixesTom Gundersen
The caller should push any lifetime information into the kernel and let the kernel handle prefix expiration.
2015-10-22sd-ndisc: rename API from sd-icmp6-ndTom Gundersen
2015-10-22sd-icmp6-nd: rename files to sd-ndiscTom Gundersen
The actual code rename will follow. The reason for the change of name is to make it simpler and more uniform with how we name other libraries (we don't include the underlying protocol). The new name also matches the naming in the kernel (which is particularly relevent here as we expect to let the kernel do some parts of the protocol and we do others).
2015-10-11sd-netlink: rtnl - add route_get_{scope,tos,table,protocol}()Tom Gundersen
2015-10-11sd-ipv4ll: allow initial address to be set explicitlyTom Gundersen
This is useful in case the daemon is restarted and the state of the IPv4LL client should be serialized/deserialized.
2015-10-08lldp: rename publicly visible structureBeniamino Galvani
Rename struct 'tlv_packet' to 'sd_lldp_packet' and struct 'tlv_section' to 'sd_lldp_section' since the former is referenced in public header sd-lldp.h. Signed-off-by: Beniamino Galvani <bgalvani@redhat.com>
2015-10-06core: add support for naming file descriptors passed using socket activationLennart Poettering
This adds support for naming file descriptors passed using socket activation. The names are passed in a new $LISTEN_FDNAMES= environment variable, that matches the existign $LISTEN_FDS= one and contains a colon-separated list of names. This also adds support for naming fds submitted to the per-service fd store using FDNAME= in the sd_notify() message. This also adds a new FileDescriptorName= setting for socket unit files to set the name for fds created by socket units. This also adds a new call sd_listen_fds_with_names(), that is similar to sd_listen_fds(), but also returns the names of the fds. systemd-activate gained the new --fdname= switch to specify a name for testing socket activation. This is based on #1247 by Maciej Wereski. Fixes #1247.
2015-10-05Merge pull request #1448 from bengal/lldp-export-v5Tom Gundersen
LLDP: add API to export neighbors list (v5)
2015-10-05sd-rtnl: introduce new API to set the NL header flagsSusant Sahani
By default we set as NLM_F_CREATE | NLM_F_EXCL in sd_rtnl_message_new_link But incase of bridge we need to set NLM_F_REQUEST | NLM_F_ACK. If NLM_F_EXCL is set then we are unable to set the parameters. As bridge supports setting properties after creation not during creation.
2015-10-02lldp: add support for organizationally specific TLVsBeniamino Galvani
LLDP TLVs of type 127 are used to carry organizationally specific information and include additional fields to specify the OUI and subtype. Add support for parsing such fields and functions to access the most common IEEE 802.1 specific TLVs.
2015-10-02lldp: add sd_lldp_tlv_packet_get_destination_type()Beniamino Galvani
It can be useful to know the destination address of a LLDP frame because it determines the scope of propagation of the frame and thus this information be used to know whether the neighbor is connected to the same physical link. See clause 7.1 of IEEE Std 802.1AB-2009.
2015-10-02lldp: add public function to export LLDP TLV packetsBeniamino Galvani
Add a public function to get a list of current LLDP neighbours' TLV packets. The function populates an array of pointers to the opaque type sd_lldp_packet and returns the number of elements found. Callers must take care of freeing the array and decreasing the refcount of elements when done.
2015-10-02lldp: export opaque TLV type and accessor functionsBeniamino Galvani
Export struct tlv_packet as a public opaque sd_lldp_packet type and make its accessor functions public.
2015-09-26sd-bus: add sd_bus_path_{encode,decode}_many()David Herrmann
This introduces two new helpers alongside sd_bus_path_{encode,decode}(), which work similarly to their counterparts, but accept a format-string as input. This allows encoding and decoding multiple labels of a format string at the same time.
2015-09-22Merge pull request #1334 from poettering/sd-bus-default-flush-closeDavid Herrmann
sd-bus: introduce new sd_bus_default_flush_close() call
2015-09-22sd-bus: introduce new sd_bus_default_flush_close() callLennart Poettering
If code enqueues a message on one of the default busses, but doesn't sync on it, and immediately drops the reference to the bus again, it will stay queued and consume memory. Intrdouce a new call sd_bus_default_flush_close() that can be invoked at the end of programs (or threads) and flushes out all unsent messages on any of the default busses.
2015-09-22sd-lldp: hide internal detailsDavid Herrmann
Currently, sd-lldp.h exports "UPDATE_INFO".. and defines it to a magic constant '10'. This is completely bogus, so fix it to follow our coding standards: - Prefix exported symbols by SD_LLDP_* - Define a separate event-enum for event types - Translate internal state to external event-types
2015-09-22sd-lldp: hide internal informationDavid Herrmann
Don't export constant that are only used internally.
2015-09-22sd-pppoe: fix namespacingDavid Herrmann
Prefix all exported constants by SD_PPPOE_* to avoid namespacing conflicts.
2015-09-22sd-ipv4ll: fix namespacingDavid Herrmann
Prefix all exported constants with SD_IPV4LL_* to avoid namespacing conflicts.
2015-09-22sd-ipv4acd: fix namespacingDavid Herrmann
Prefix all exported constants with SD_IPV4ACD to prevent namespacing conflicts.
2015-09-22sd-icmp6-nd: fix namespacingDavid Herrmann
Prefix all exported constants by SD_ICMP6_ND_* to avoid any namespacing conflicts.
2015-09-22sd-dhcp6: fix namespacingDavid Herrmann
Prefix all exported constants with SD_DHCP6_CLIENT_* to avoid any namespacing conflicts.
2015-09-22sd-dhcp: fix namespacingDavid Herrmann
Prefix all constants with SD_DHCP_CLIENT_* to avoid namespacing conflicts.
2015-09-18sd-ipv4acd: introduce new library split out from sd-ipv4llTom Gundersen
This splits the Address Conflict Detection out of the Link Local library so that we can reuse it for DHCP and static addresses in the future. Implements RFC5227.
2015-09-05sd-login: minor header commenting improvementsLennart Poettering
2015-09-05sd-login: add new sd_pid_get_cgroup() APILennart Poettering
This adds a new sd_pid_get_cgroup() call to sd-login which may be used to query the control path of a process. This is useful for programs when making use of delegation units, in order to figure out which subtree has been delegated. In light of the unified control group hierarchy this is finally safe to do, hence let's add a proper API for it, to make it easier to use this.
2015-08-31sd-dhcp-server: simplify pool creationTom Gundersen
Merge sd_dhcp_server_set_address() and sd_dhcp_server_set_lease_pool() into sd_dhcp_server_configure_pool() as the behavior of the two former depends on the order they are called in. The flexibility is not needed, so let's just do this in one call.
2015-08-27Merge pull request #1057 from poettering/resolve-drop-res-queryTom Gundersen
sd-resolve: drop res_query() API
2015-08-27Merge pull request #1055 from poettering/dhcp-updatesTom Gundersen
Various networkd and dhcp updates
2015-08-27sd-resolve: drop res_query() APILennart Poettering
Querying low-level DNS RRs should be done via resolved now, not via glibc's awful res_query() API anymore. Let's not introduce an async wrapper for it hence.
2015-08-27dhcp,network: support emitting DNS/NTP server information from DHCP serverLennart Poettering
For now, this is very simple and IP addresses have to be configured manually.
2015-08-27networkd: make DHCP lease timeouts configurableLennart Poettering
2015-08-27dhcp: clean up dhcp4 lease objectLennart Poettering
a) drop handling of obsolete or unused DHCP options time_offset, mtu_aging_timeout, policy filter, mdr, ttl, ip forwarding settings. Should this become useful one day we can readd support for this. b) For subnet mask and broadcast it is not always clear whether 0 or 255.255.255.255 might be valid, hence maintain a boolean indicating validity next to it. c) serialize/deserialize broadcast address, lifetime, T1 and T2 together with the rest of the fields in dhcp_lease_save() and dhcp_lease_load(). d) consistently return ENODATA from getter functions for data that is missing in the lease. e) add missing getter calls for broadcast, lifetime, T1, T2. f) when decoding DHCP options, generate debug messages on parse failures, but try to proceed if possible. g) Similar, when deserializing a lease in dhcp_lease_load(), make sure we deal nicely with unparsable fields, to provide upgrade compat. h) fix some memory allocations
2015-08-26dhcp: generic data should be void*, not uint8_t*Lennart Poettering
If we handly arbitrary data we should use "void*" pointers, not "uint8_t*", how go intended C to be used.
2015-08-26dhcp: keep lease save/load functions privateLennart Poettering
When we make sd-dhcp public one day we really should not make sd_dhcp_lease_save() and sd_dhcp_lease_load() public, since it's pretty much only useful as internal utility for networkd itself.
2015-08-26dhcp,network: implement RFC 4833 (DHCP Timezone option)Lennart Poettering
This one is simply to add: encode the tzdata timezone in the DHCP options and optionally make use of it.
2015-08-25sd-bus: introduce new SD_BUS_VTABLE_PROPERTY_EXPLICIT flagLennart Poettering
This allows marking properties as "explicit". Properties marked like this are included in the introspection, but are avoided in GetAll() property queries, PropertiesChanged() signals and in in GetManaged() object manager calls and InterfacesAdded() signals. Expensive properties may be marked that way, and they will be retrievable when explicitly being requested, but never in "blanket" all-property queries and signals. This flag may be combined with the flags for "const" and "emit-validation" properties, but not with "emit-validation", as that is only useful for properties whose value shall be sent in "blanket" all-property signals. The "explicit" flag is also exposed in the introspection data via a new annotation.
2015-08-21sd-dhcp6: Add support for DHCPv6 NTP Server OptionPatrik Flykt
Support NTP server and multicast addresses and NTP server domain names as specified in RFC 5908.
2015-08-21sd-dhcp6: Add support for DHCPv6 DNS Domain Search List optionPatrik Flykt
Support DHCPv6 DNS search list option as specified in RFC 3646. This option contains a list of DNS search domains encoded without compression as specified in Section 8. of RFC 3315.
2015-08-21sd-dhcp6: Add support for DHCPv6 DNS Recursive Name Server optionPatrik Flykt
Support DHCPv6 DNS server option as specified in RFC 3646. This option contains a list of IPv6 DNS server addresses.