Add DHCPv6 support with acceleration

This commit is contained in:
Samuel Thibault 2023-05-08 03:12:45 +02:00
parent a9e18411d3
commit 5dcbd68b75
5 changed files with 164 additions and 5 deletions

View file

@ -7,6 +7,10 @@
#ifndef __DHCP6_H__
#define __DHCP6_H__
#define DHCP6_CLIENT_PORT 546
#define DHCP6_SERVER_PORT 547
#define DHCP6_SERVER_ADDRESS "ff02::1:2"
#define DHCP6_SOLICIT 1
#define DHCP6_ADVERTISE 2
#define DHCP6_REQUEST 3
@ -212,7 +216,10 @@ struct dhcp6_opt_ia_prefix {
} __attribute__((packed));
// dhcp6.c
extern int dhcpv6fd;
void dhcpv6_process_from_ipv6(uint16_t s, uint16_t t, uint8_t *p, uint16_t l);
void dhcpv6_init(void);
void dhcpv6_listen(int ifidx);
void dhcpv6_process_from_kernel(uint8_t *p, size_t size_bufp);
#endif /* __DHCP6_H__ */