Add a missing header and remove an unused variable.
This commit is contained in:
parent
ea4041983d
commit
0f3d4598ad
@ -222,7 +222,6 @@ int get_raw_packet(struct dhcpMessage *payload, int fd)
|
|||||||
{
|
{
|
||||||
struct ip_udp_dhcp_packet packet;
|
struct ip_udp_dhcp_packet packet;
|
||||||
uint16_t check;
|
uint16_t check;
|
||||||
const int header_size = sizeof(struct iphdr) + sizeof(struct udphdr);
|
|
||||||
const int packet_size = sizeof(struct ip_udp_dhcp_packet);
|
const int packet_size = sizeof(struct ip_udp_dhcp_packet);
|
||||||
|
|
||||||
memset(&packet, 0, packet_size);
|
memset(&packet, 0, packet_size);
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <fcntl.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user