david/ipxe
Archived
1
0
This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
ipxe/src/include/gpxe/in.h
Michael Brown 824d6ffa7f Header rearrangement.
I want to get to the point where any header in include/ reflects a
standard user-level header (e.g. a POSIX header), while everything that's
specific to gPXE lives in include/gpxe/.  Headers that reflect a Linux
header (e.g. if_ether.h) should also be in include/gpxe/, with the same
name as the Linux header and, preferably, the same names used for the
definitions.
2006-04-24 15:42:49 +00:00

34 lines
582 B
C

#ifndef _GPXE_IN_H
#define _GPXE_IN_H
#include <stdint.h>
#define IP_ICMP 1
#define IP_IGMP 2
#define IP_TCP 6
#define IP_UDP 17
#define INADDR_NONE 0xffffffff
#define INADDR_BROADCAST 0xffffffff
#define IN_MULTICAST(addr) ( ( (addr) & 0xf0000000 ) == 0xe0000000 )
struct in_addr {
uint32_t s_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 );
extern char * inet_ntoa ( struct in_addr in );
#endif /* _GPXE_IN_H */