1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
6 This file is part of systemd.
8 Copyright (C) 2015 Tom Gundersen <teg@jklmen>
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 #include <net/ethernet.h>
27 #include "sparse-endian.h"
30 /* RFC 3315 section 9.1:
31 * A DUID can be no more than 128 octets long (not including the type code).
33 #define MAX_DUID_LEN 128
59 uint8_t data[MAX_DUID_LEN];
64 int dhcp_identifier_set_duid_en(struct duid *duid, size_t *len);
65 int dhcp_identifier_set_iaid(int ifindex, uint8_t *mac, size_t mac_len, uint32_t *_id);