diff options
author | Michael Brown | 2005-04-30 15:49:28 +0200 |
---|---|---|
committer | Michael Brown | 2005-04-30 15:49:28 +0200 |
commit | 00b78f73a420c917479e13ae3515b971f184b9b1 (patch) | |
tree | faac8afb0738b64afd7e9990a94e079d5944f568 /src/include/in.h | |
parent | Moved strtoul prototype into stdlib.h for consistency (diff) | |
download | ipxe-00b78f73a420c917479e13ae3515b971f184b9b1.tar.gz ipxe-00b78f73a420c917479e13ae3515b971f184b9b1.tar.xz ipxe-00b78f73a420c917479e13ae3515b971f184b9b1.zip |
Use struct in_addr rather than just "in_addr".
Add struct sockaddr_in.
Diffstat (limited to 'src/include/in.h')
-rw-r--r-- | src/include/in.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/include/in.h b/src/include/in.h index 7fb207da..5ae66769 100644 --- a/src/include/in.h +++ b/src/include/in.h @@ -1,6 +1,7 @@ #ifndef _IN_H #define _IN_H +#include "stdint.h" #include <if_ether.h> #define IP ETH_P_IP #define ARP ETH_P_ARP @@ -14,8 +15,19 @@ /* Same after going through htonl */ #define IP_BROADCAST 0xFFFFFFFF -typedef struct { +struct in_addr { uint32_t s_addr; -} in_addr; +}; + +typedef struct in_addr in_addr; + +typedef uint16_t in_port_t; + +struct sockaddr_in { + struct in_addr sin_addr; + in_port_t sin_port; +}; + +extern int inet_aton ( const char *cp, struct in_addr *inp ); #endif /* _IN_H */ |