david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

Use struct in_addr rather than just "in_addr".

Add struct sockaddr_in.
This commit is contained in:
Michael Brown 2005-04-30 13:49:28 +00:00
parent 70567c51a2
commit 00b78f73a4
1 changed files with 14 additions and 2 deletions

View 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
@ -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 */