aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/packet.h
diff options
context:
space:
mode:
Diffstat (limited to 'networking/udhcp/packet.h')
-rw-r--r--networking/udhcp/packet.h42
1 files changed, 21 insertions, 21 deletions
diff --git a/networking/udhcp/packet.h b/networking/udhcp/packet.h
index 1a263ef8b..22c4d09c3 100644
--- a/networking/udhcp/packet.h
+++ b/networking/udhcp/packet.h
@@ -5,22 +5,22 @@
5#include <netinet/ip.h> 5#include <netinet/ip.h>
6 6
7struct dhcpMessage { 7struct dhcpMessage {
8 u_int8_t op; 8 uint8_t op;
9 u_int8_t htype; 9 uint8_t htype;
10 u_int8_t hlen; 10 uint8_t hlen;
11 u_int8_t hops; 11 uint8_t hops;
12 u_int32_t xid; 12 uint32_t xid;
13 u_int16_t secs; 13 uint16_t secs;
14 u_int16_t flags; 14 uint16_t flags;
15 u_int32_t ciaddr; 15 uint32_t ciaddr;
16 u_int32_t yiaddr; 16 uint32_t yiaddr;
17 u_int32_t siaddr; 17 uint32_t siaddr;
18 u_int32_t giaddr; 18 uint32_t giaddr;
19 u_int8_t chaddr[16]; 19 uint8_t chaddr[16];
20 u_int8_t sname[64]; 20 uint8_t sname[64];
21 u_int8_t file[128]; 21 uint8_t file[128];
22 u_int32_t cookie; 22 uint32_t cookie;
23 u_int8_t options[308]; /* 312 - cookie */ 23 uint8_t options[308]; /* 312 - cookie */
24}; 24};
25 25
26struct udp_dhcp_packet { 26struct udp_dhcp_packet {
@@ -31,11 +31,11 @@ struct udp_dhcp_packet {
31 31
32void init_header(struct dhcpMessage *packet, char type); 32void init_header(struct dhcpMessage *packet, char type);
33int get_packet(struct dhcpMessage *packet, int fd); 33int get_packet(struct dhcpMessage *packet, int fd);
34u_int16_t checksum(void *addr, int count); 34uint16_t checksum(void *addr, int count);
35int raw_packet(struct dhcpMessage *payload, u_int32_t source_ip, int source_port, 35int raw_packet(struct dhcpMessage *payload, uint32_t source_ip, int source_port,
36 u_int32_t dest_ip, int dest_port, unsigned char *dest_arp, int ifindex); 36 uint32_t dest_ip, int dest_port, uint8_t *dest_arp, int ifindex);
37int kernel_packet(struct dhcpMessage *payload, u_int32_t source_ip, int source_port, 37int kernel_packet(struct dhcpMessage *payload, uint32_t source_ip, int source_port,
38 u_int32_t dest_ip, int dest_port); 38 uint32_t dest_ip, int dest_port);
39 39
40 40
41#endif 41#endif