Start DHCPv6.
1018 dhcpv6 =
zalloc (
sizeof ( *dhcpv6 ) );
1032 memset ( &addresses, 0,
sizeof ( addresses ) );
1033 addresses.client.sin6.sin6_family =
AF_INET6;
1035 addresses.server.sin6.sin6_family =
AF_INET6;
1045 DBGC ( dhcpv6,
"DHCPv6 %s could not create DUID-UUID: %s\n",
1047 goto err_client_duid;
1052 DBGC ( dhcpv6,
"DHCPv6 %s has XID %02x%02x%02x\n", dhcpv6->
netdev->
name,
1053 dhcpv6->
xid[0], dhcpv6->
xid[1], dhcpv6->
xid[2] );
1061 &addresses.server.sa,
1062 &addresses.client.sa ) ) != 0 ) {
1063 DBGC ( dhcpv6,
"DHCPv6 %s could not open socket: %s\n",
1065 goto err_open_socket;
static struct dhcpv6_session_state dhcpv6_solicit
DHCPv6 solicitation state.
struct arbelprm_rc_send_wqe rc
#define AF_INET6
IPv6 Internet addresses.
uint8_t ll_addr_len
Link-layer address length.
static struct interface_descriptor dhcpv6_xfer_desc
DHCPv6 data transfer interface descriptor.
struct interface xfer
Data transfer interface.
struct interface job
Job control interface.
static void dhcpv6_set_state(struct dhcpv6_session *dhcpv6, struct dhcpv6_session_state *state)
Transition to new DHCPv6 session state.
#define ref_init(refcnt, free)
Initialise a reference counter.
int xfer_open_socket(struct interface *intf, int semantics, struct sockaddr *peer, struct sockaddr *local)
Open socket.
uint32_t iaid
Identity association ID.
void intf_plug_plug(struct interface *a, struct interface *b)
Plug two object interfaces together.
struct net_device * netdev
Network device being configured.
static void dhcpv6_finished(struct dhcpv6_session *dhcpv6, int rc)
Terminate DHCPv6 session.
unsigned int scope_id
Scope ID.
u32 crc32_le(u32 seed, const void *data, size_t len)
Calculate 32-bit little-endian CRC checksum.
#define ENOMEM
Not enough space.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
static struct net_device * netdev
struct in6_addr router
Router address.
struct refcnt refcnt
Reference counter.
static void dhcpv6_free(struct refcnt *refcnt)
Free DHCPv6 session.
static void dhcpv6_timer_expired(struct retry_timer *timer, int fail)
Handle timer expiry.
Generalized socket address structure.
static struct dhcpv6_session_state dhcpv6_information_request
DHCPv6 information request state.
char * strerror(int errno)
Retrieve string representation of error number.
void * zalloc(size_t size)
Allocate cleared memory.
long int random(void)
Generate a pseudo-random number between 0 and 2147483647L or 2147483562?
static struct net_device * netdev_get(struct net_device *netdev)
Get reference to network device.
struct retry_timer timer
Retransmission timer.
char name[NETDEV_NAME_LEN]
Name of this network device.
unsigned long start
Start time (in ticks)
struct dhcpv6_duid_uuid client_duid
Client DUID.
static void ipv6_all_dhcp_relay_and_servers(struct in6_addr *addr)
Construct all-DHCP-relay-agents-and-servers multicast address.
uint8_t xid[3]
Transaction ID.
#define DHCPV6_CLIENT_PORT
DHCPv6 client port.
static struct interface_descriptor dhcpv6_job_desc
DHCPv6 job control interface descriptor.
#define DHCPV6_DUID_UUID
DHCP unique identifier based on UUID (DUID-UUID)
int fetch_uuid_setting(struct settings *settings, const struct setting *setting, union uuid *uuid)
Fetch value of UUID setting.
#define DHCPV6_SERVER_PORT
DHCPv6 server port.
uint8_t ll_addr[MAX_LL_ADDR_LEN]
Link-layer address.
unsigned long currticks(void)
Get current system time in ticks.
static void intf_init(struct interface *intf, struct interface_descriptor *desc, struct refcnt *refcnt)
Initialise an object interface.
#define NULL
NULL pointer (VOID *)
struct ll_protocol * ll_protocol
Link-layer protocol.
#define ref_put(refcnt)
Drop reference to object.
void * memset(void *dest, int character, size_t len) __nonnull