From 00b78f73a420c917479e13ae3515b971f184b9b1 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sat, 30 Apr 2005 13:49:28 +0000 Subject: [PATCH] Use struct in_addr rather than just "in_addr". Add struct sockaddr_in. --- src/include/in.h | 16 ++++++++++++++-- 1 file 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 #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 */