1 /* vi: set sw=4 ts=4: */
5 #include <netinet/udp.h>
6 #include <netinet/ip.h>
24 uint8_t options[308]; /* 312 - cookie */
27 struct udp_dhcp_packet {
30 struct dhcpMessage data;
33 void udhcp_init_header(struct dhcpMessage *packet, char type);
34 int udhcp_get_packet(struct dhcpMessage *packet, int fd);
35 uint16_t udhcp_checksum(void *addr, int count);
36 int udhcp_raw_packet(struct dhcpMessage *payload, uint32_t source_ip, int source_port,
37 uint32_t dest_ip, int dest_port, uint8_t *dest_arp, int ifindex);
38 int udhcp_kernel_packet(struct dhcpMessage *payload, uint32_t source_ip, int source_port,
39 uint32_t dest_ip, int dest_port);