1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #ifndef foosddhcpclientidhfoo
3 #define foosddhcpclientidhfoo
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.
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.
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/>.
21 #include <sys/types.h>
23 #include "sd-dhcp-duid.h"
25 #include "_sd-common.h"
27 _SD_BEGIN_DECLARATIONS
;
29 typedef struct sd_dhcp_client_id sd_dhcp_client_id
;
31 int sd_dhcp_client_id_new(sd_dhcp_client_id
**ret
);
32 sd_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
);
35 int sd_dhcp_client_id_clear(sd_dhcp_client_id
*client_id
);
37 int sd_dhcp_client_id_is_set(const sd_dhcp_client_id
*client_id
);
39 int sd_dhcp_client_id_get(const sd_dhcp_client_id
*client_id
, uint8_t *ret_type
, const void **ret_data
, size_t *ret_size
);
40 int sd_dhcp_client_id_get_raw(const sd_dhcp_client_id
*client_id
, const void **ret_data
, size_t *ret_size
);
42 int sd_dhcp_client_id_set(
43 sd_dhcp_client_id
*client_id
,
47 int sd_dhcp_client_id_set_raw(
48 sd_dhcp_client_id
*client_id
,
51 int sd_dhcp_client_id_set_iaid_duid(
52 sd_dhcp_client_id
*client_id
,
56 int sd_dhcp_client_id_to_string(const sd_dhcp_client_id
*client_id
, char **ret
);
57 int sd_dhcp_client_id_to_string_from_raw(const void *data
, size_t data_size
, char **ret
);