4 #include <netinet/udp.h>
5 #include <netinet/ip.h>
23 u_int8_t options[308]; /* 312 - cookie */
26 struct udp_dhcp_packet {
29 struct dhcpMessage data;
32 void init_header(struct dhcpMessage *packet, char type);
33 int get_packet(struct dhcpMessage *packet, int fd);
34 u_int16_t checksum(void *addr, int count);
35 int raw_packet(struct dhcpMessage *payload, u_int32_t source_ip, int source_port,
36 u_int32_t dest_ip, int dest_port, unsigned char *dest_arp, int ifindex);
37 int kernel_packet(struct dhcpMessage *payload, u_int32_t source_ip, int source_port,
38 u_int32_t dest_ip, int dest_port);