Use struct in_addr rather than just "in_addr".
authorMichael Brown <mcb30@etherboot.org>
Sat, 30 Apr 2005 13:49:28 +0000 (13:49 +0000)
committerMichael Brown <mcb30@etherboot.org>
Sat, 30 Apr 2005 13:49:28 +0000 (13:49 +0000)
Add struct sockaddr_in.

src/include/in.h

index 7fb207d..5ae6676 100644 (file)
@@ -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
 /* 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 */