|
@@ -1,6 +1,7 @@
|
1
|
1
|
#ifndef _IN_H
|
2
|
2
|
#define _IN_H
|
3
|
3
|
|
|
4
|
+#include "stdint.h"
|
4
|
5
|
#include <if_ether.h>
|
5
|
6
|
#define IP ETH_P_IP
|
6
|
7
|
#define ARP ETH_P_ARP
|
|
@@ -14,8 +15,19 @@
|
14
|
15
|
/* Same after going through htonl */
|
15
|
16
|
#define IP_BROADCAST 0xFFFFFFFF
|
16
|
17
|
|
17
|
|
-typedef struct {
|
|
18
|
+struct in_addr {
|
18
|
19
|
uint32_t s_addr;
|
19
|
|
-} in_addr;
|
|
20
|
+};
|
|
21
|
+
|
|
22
|
+typedef struct in_addr in_addr;
|
|
23
|
+
|
|
24
|
+typedef uint16_t in_port_t;
|
|
25
|
+
|
|
26
|
+struct sockaddr_in {
|
|
27
|
+ struct in_addr sin_addr;
|
|
28
|
+ in_port_t sin_port;
|
|
29
|
+};
|
|
30
|
+
|
|
31
|
+extern int inet_aton ( const char *cp, struct in_addr *inp );
|
20
|
32
|
|
21
|
33
|
#endif /* _IN_H */
|