diff options
author | Michael Brown | 2006-03-23 17:45:01 +0100 |
---|---|---|
committer | Michael Brown | 2006-03-23 17:45:01 +0100 |
commit | dde1c5ad18d1d8fb66cab52262f1ecc36df9fab2 (patch) | |
tree | 151fb910c0df4d7b788c697039d8e21b0e0958b6 /src/include/gpxe/in.h | |
parent | Add Makefile for hijack and prototester utilities. (diff) | |
download | ipxe-dde1c5ad18d1d8fb66cab52262f1ecc36df9fab2.tar.gz ipxe-dde1c5ad18d1d8fb66cab52262f1ecc36df9fab2.tar.xz ipxe-dde1c5ad18d1d8fb66cab52262f1ecc36df9fab2.zip |
Moved include/in.h to include/gpxe/in.h, so that it can be included by
prototester.
Diffstat (limited to 'src/include/gpxe/in.h')
-rw-r--r-- | src/include/gpxe/in.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/include/gpxe/in.h b/src/include/gpxe/in.h new file mode 100644 index 00000000..5ae66769 --- /dev/null +++ b/src/include/gpxe/in.h @@ -0,0 +1,33 @@ +#ifndef _IN_H +#define _IN_H + +#include "stdint.h" +#include <if_ether.h> +#define IP ETH_P_IP +#define ARP ETH_P_ARP +#define RARP ETH_P_RARP + +#define IP_ICMP 1 +#define IP_IGMP 2 +#define IP_TCP 6 +#define IP_UDP 17 + +/* Same after going through htonl */ +#define IP_BROADCAST 0xFFFFFFFF + +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 ); + +#endif /* _IN_H */ |