]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/systemd/sd-dhcp-client-id.h
Merge pull request #31000 from flatcar-hub/krnowak/mutable-overlays
[thirdparty/systemd.git] / src / systemd / sd-dhcp-client-id.h
CommitLineData
6efa51f8
YW
1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2#ifndef foosddhcpclientidhfoo
3#define foosddhcpclientidhfoo
4
5/***
6efa51f8
YW
6 systemd is free software; you can redistribute it and/or modify it
7 under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation; either version 2.1 of the License, or
9 (at your option) any later version.
10
11 systemd is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public License
17 along with systemd; If not, see <https://www.gnu.org/licenses/>.
18***/
19
20#include <inttypes.h>
21#include <sys/types.h>
22
23#include "sd-dhcp-duid.h"
24
25#include "_sd-common.h"
26
27_SD_BEGIN_DECLARATIONS;
28
29typedef struct sd_dhcp_client_id sd_dhcp_client_id;
30
31int sd_dhcp_client_id_new(sd_dhcp_client_id **ret);
32sd_dhcp_client_id* sd_dhcp_client_id_free(sd_dhcp_client_id *client_id);
33_SD_DEFINE_POINTER_CLEANUP_FUNC(sd_dhcp_client_id, sd_dhcp_client_id_free);
34
35int sd_dhcp_client_id_clear(sd_dhcp_client_id *client_id);
36
37int sd_dhcp_client_id_is_set(const sd_dhcp_client_id *client_id);
38
39int sd_dhcp_client_id_get(const sd_dhcp_client_id *client_id, uint8_t *ret_type, const void **ret_data, size_t *ret_size);
40int sd_dhcp_client_id_get_raw(const sd_dhcp_client_id *client_id, const void **ret_data, size_t *ret_size);
41
42int sd_dhcp_client_id_set(
43 sd_dhcp_client_id *client_id,
44 uint8_t type,
45 const void *data,
46 size_t data_size);
47int sd_dhcp_client_id_set_raw(
48 sd_dhcp_client_id *client_id,
49 const void *data,
50 size_t data_size);
51int sd_dhcp_client_id_set_iaid_duid(
52 sd_dhcp_client_id *client_id,
53 uint32_t iaid,
54 sd_dhcp_duid *duid);
55
18091320
YW
56int sd_dhcp_client_id_to_string(const sd_dhcp_client_id *client_id, char **ret);
57int sd_dhcp_client_id_to_string_from_raw(const void *data, size_t data_size, char **ret);
58
6efa51f8
YW
59_SD_END_DECLARATIONS;
60
61#endif