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