]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/libsystemd-network/dhcp-identifier.h
c06a46cd7fb1308bf8fea7a279801d70095f9998
1 /* SPDX-License-Identifier: LGPL-2.1+ */
5 Copyright (C) 2015 Tom Gundersen <teg@jklmen>
11 #include "sparse-endian.h"
12 #include "unaligned.h"
14 typedef enum DUIDType
{
20 _DUID_TYPE_INVALID
= -1,
23 /* RFC 3315 section 9.1:
24 * A DUID can be no more than 128 octets long (not including the type code).
26 #define MAX_DUID_LEN 128
28 /* https://tools.ietf.org/html/rfc3315#section-9.1 */
53 uint8_t data
[MAX_DUID_LEN
];
58 int dhcp_validate_duid_len(uint16_t duid_type
, size_t duid_len
);
59 int dhcp_identifier_set_duid_en(struct duid
*duid
, size_t *len
);
60 int dhcp_identifier_set_iaid(int ifindex
, uint8_t *mac
, size_t mac_len
, void *_id
);