]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/libsystemd-network/dhcp-identifier.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
7 #include "sparse-endian.h"
10 typedef enum DUIDType
{
16 _DUID_TYPE_INVALID
= -1,
19 /* RFC 3315 section 9.1:
20 * A DUID can be no more than 128 octets long (not including the type code).
22 #define MAX_DUID_LEN 128
24 /* https://tools.ietf.org/html/rfc3315#section-9.1 */
49 uint8_t data
[MAX_DUID_LEN
];
54 int dhcp_validate_duid_len(uint16_t duid_type
, size_t duid_len
);
55 int dhcp_identifier_set_duid_en(struct duid
*duid
, size_t *len
);
56 int dhcp_identifier_set_duid_uuid(struct duid
*duid
, size_t *len
);
57 int dhcp_identifier_set_iaid(int ifindex
, uint8_t *mac
, size_t mac_len
, void *_id
);