summaryrefslogtreecommitdiffstats
path: root/src/systemd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* meson: Build header tests with -pedanticJan Janssen2022-05-2916-40/+43
| | | | | | | | | | | | By using __extension__, we can silence pedantic errors we cannot or do not want to fix. This in particular silences: - enum values being outside of int range - variadic macros - long long being C99 - type of bit-field ‘type’ is a GCC extension - use of C99 bool in public header functions
* sd-hwdb: add sd_hwdb_new_from_pathNick Rosbrook2022-05-271-0/+1
| | | | | | | | | | The existing sd_hwdb_new function always initializes the hwdb from the first successful hwdb.bin it finds from hwdb_bin_paths. This means there is currently no way to initialize a hwdb from an explicit path, which would be useful for systemd-hwdb query. Add sd_hwdb_new_from_path to allow a sd_hwdb to be initialized from a custom path outside of hwdb_bin_paths.
* meson: Add -Wall and -Wextra to header checksJan Janssen2022-05-041-0/+2
| | | | This should ensure public headers are free from any warnings.
* meson: Use meson test suite featureJan Janssen2022-05-041-0/+1
| | | | | | This makes it easier to only test a subset of tests without having to specify them all on the command line: meson test -C build --suite headers
* meson: Remove check-compilation.shJan Janssen2022-05-041-6/+9
| | | | | | | | | No need to involve a trivial shell script for this. We could call the compiler directly, but test() expects arguments to be passed separately and cc.cmd_array() can contain arguments itself. Using env is easier than manually slicing the array because meson has no builtins for that.
* meson: Exit early with subdir_done()Jan Janssen2022-05-041-7/+9
|
* sd-ndisc: drop unused functionYu Watanabe2022-05-041-1/+0
|
* sd-device-enumerator: introduce sd_device_enumerator_add_nomatch_sysname()Yu Watanabe2022-04-271-0/+1
|
* dhcp: make option names singularYu Watanabe2022-04-032-7/+7
|
* sd-device: introduce sd_device_open()Yu Watanabe2022-04-011-0/+1
| | | | | | | | | | | | We usually open() device node obtained by sd_device_get_devname(). However, the device node corresponds to the sd-device object may be already removed, and another device node with the same path may be created, hence an unexpected device may be opened. The sd_device_open() opens device node, and checks the devnum and diskseq of opened devnum, to avoid the above possibility. Prompted by https://github.com/systemd/systemd/issues/22906#issuecomment-1082736443.
* sd-device: introduce sd_device_new_from_devname()Yu Watanabe2022-04-011-0/+2
| | | | and sd_device_new_from_path() which takes devname or syspath.
* timesyncd: generate a structure log message the first time we set the clock ↵Lennart Poettering2022-03-181-0/+3
| | | | | | | | | | correctly Usecase: later on we can use this to retroactively adjust log output in journalctl or similar on systems lacking an RTC: we just have to search for this sructured log message that indicates the first sync point and can then retroactively adjust the incorrect timestamps collected before that.
* sd-radv: voidify sd_radv_remove_prefix()Yu Watanabe2022-03-171-2/+1
| | | | | | | If the prefix is only referenced by sd_radv, then the returned pointer is already freed. networkd does not uses the returned value. Let's voidify the function.
* network: dhcp: rename NextServer= and Filename= settingsYu Watanabe2022-03-111-2/+3
| | | | | | | And make the settings configures DHCP option 66 and 67. Follow-ups for #22615. Fixes #22661.
* sd-dhcp6-client: rename timezone optionsYu Watanabe2022-03-101-2/+2
| | | | To make them follow corresponding DHCPv4 options.
* dhcp: list all known DHCP optionsYu Watanabe2022-03-101-62/+166
|
* meson: move files' closing brace to separate lineZbigniew Jędrzejewski-Szmek2022-03-031-2/+4
|
* meson: do not use split() in file listsZbigniew Jędrzejewski-Szmek2022-03-021-34/+32
| | | | | | | | | | | The approach to use '''…'''.split() instead of a list of strings was initially used when converting from automake because it allowed identical blocks of lines to be used for both, making the conversion easier. But over the years we have been using normal lists more and more, especially when there were just a few filenames listed. This converts the rest. No functional change.
* sd-dhcp-server: add support to send next server and filename option for PXE ↵Yu Watanabe2022-02-242-0/+6
| | | | boot systems
* Merge pull request #22412 from yuwata/sd-dhcp6-client-cleanupsLennart Poettering2022-02-151-3/+1
|\ | | | | sd-dhcp6-client: several fixes and cleanups
| * sd-dhcp6-client: do not expose set_transaction_id()Yu Watanabe2022-02-141-2/+0
| | | | | | | | | | | | | | This is mostly for tests or fuzzers. Hence, this makes the function requires that the client is running in the test mode. Also, now the function mask the value for message type.
| * sd-dhcp6-client: store PD prefix hint in ia_pdYu Watanabe2022-02-141-1/+1
| | | | | | | | And allows to specify multiple hints.
* | sd128: export sd_id128_to_uuid_string()Lennart Poettering2022-02-141-0/+3
|/ | | | | | | | | We expose various other forms of UUID helpers already, i.e. SD_ID128_UUID_FORMAT_STR and SD_ID128_MAKE_UUID_STR(), and we parse UUIDs, hence add a high-level helper for formatting UUIDs too. This doesn't add any new code, it just moves some helpers id128-util.[ch] → sd-id128.[ch], to make them public.
* sd-netlink: introduce ↵Yu Watanabe2022-02-091-0/+3
| | | | sd_rtnl_message_traffic_control_get_{ifindex,parent,handle}()
* sd-netlink: unify sd_rtnl_message_new_qdisc() and sd_rtnl_message_new_tclass()Yu Watanabe2022-02-091-7/+2
| | | | | As the netlink message header types for both qdisc and tclass are equivalent.
* sd-dhcp-lease: store static routes and classless static routes in different ↵Yu Watanabe2022-02-021-2/+2
| | | | | | | | | | | arrays When classless static routes option is provided, then static routes option should not be used. Hence, let's not mix and store them in one storage. This introduce sd_dhcp_lease_get_static_routes() and sd_dhcp_lease_get_classless_routes().
* sd-network: introduce sd_network_link_get_stat()Yu Watanabe2021-12-081-0/+3
|
* sd-dhcp-client: support 6rd optionYu Watanabe2021-12-072-0/+8
|
* dhcp: fix indentation and alignmentYu Watanabe2021-12-061-58/+58
|
* sd-netlink: introduce sd_rtnl_message_nexthop_get_flags()Yu Watanabe2021-11-131-0/+1
|
* sd-event: introduce callback invoked when event source ratelimit expiresMichal Sekletar2021-11-111-0/+1
|
* sd-event: add sd_event_add_inotify_fd() callLennart Poettering2021-11-091-0/+1
| | | | | sd_event_add_inotify_fd() is like sd_event_add_inotify(), but takes an fd to an inode instead of a path, and is hence a ton nicer.
* network: dhcp-server: introduce Router= setting to specify router addressYu Watanabe2021-11-021-1/+1
| | | | Closes #21202.
* Merge pull request #21200 from yuwata/sd-dhcp6-client-server-addressYu Watanabe2021-11-011-0/+1
|\ | | | | sd-dhcp6-client: introduce sd_dhcp6_lease_get_server_address()
| * sd-dhcp6-client: introduce sd_dhcp6_lease_get_server_address()Yu Watanabe2021-11-011-0/+1
| |
* | sd-lldp-tx: drop unused and useless functionYu Watanabe2021-11-011-1/+0
|/ | | | | sd-lldp-tx does not call any callback function. So, the function is mostly useless.
* sd-ndisc: drop unused functionsYu Watanabe2021-10-291-3/+0
| | | | | All received information is stored in sd_ndisc_router, and we have sd_ndisc_router_get_mtu() and sd_ndisc_router_get_hop_limit().
* sd-radv: make prefix/route prefix lifetime can be specified with ↵Yu Watanabe2021-10-271-7/+5
| | | | | | | | | independently with valid_until Previously, valid_until (or preferred_until for preferred lifetime) was calculated from lifetime. So, when an upstream interface acquire a dynamic prefix (e.g. through DHCPv6-PD) with long lifetime, then sd-radv advertise the same lifetime. It may not be desired for some situations.
* sd-radv: make several constants not exposedYu Watanabe2021-10-271-5/+0
|
* sd-radv: make sd_radv_set_router_lifetime() take usec_t (uint64_t)Yu Watanabe2021-10-271-1/+1
|
* Merge pull request #21055 from yuwata/network-dhcp6-pd-route-lifetime-metricLuca Boccassi2021-10-201-0/+3
|\ | | | | network: dhcp6pd: set lifetime and route metric
| * sd-dhcp6-client: introduce sd_dhcp6_lease_get_timestamp()Yu Watanabe2021-10-191-0/+3
| |
* | sd-netlink: introduce sd_netlink_attach_filter()Yu Watanabe2021-10-191-0/+2
|/
* sd-dhcp6-client: add missing optionsYu Watanabe2021-10-121-31/+138
|
* sd-radv: rename sd_radv_prefix_set_route_prefix() -> ↵Yu Watanabe2021-10-111-1/+1
| | | | sd_radv_route_prefix_set_prefix()
* Merge pull request #20824 from yuwata/sd-dhcp6-client-cleanupsYu Watanabe2021-09-291-5/+5
|\ | | | | sd-dhcp6-client: several cleanups for parsing options
| * sd-dhcp6-client: drop domains_count and ntp_fqdn_countYu Watanabe2021-09-291-5/+5
| |
* | sd-netlink: introduce sd_netlink_message_read_data_suffix0()Yu Watanabe2021-09-291-0/+1
|/
* libsystemd-network: make sd_dhcp_client_get_ifname() or friends return ↵Yu Watanabe2021-09-289-9/+9
| | | | negative errno on error
* sd-lldp-rx: introduce sd_lldp_rx_is_running()Yu Watanabe2021-09-281-0/+1
|