diff options
author | Nikhil Chandru Rao | 2006-06-25 07:16:54 +0200 |
---|---|---|
committer | Nikhil Chandru Rao | 2006-06-25 07:16:54 +0200 |
commit | 90fbff8f3437518dbb9b43d4333112f61e141ec5 (patch) | |
tree | ffadba5a8193bb52eecdbc8fc7149cde5686b674 /src/include/gpxe/ip.h | |
parent | updated UDP interface (diff) | |
download | ipxe-90fbff8f3437518dbb9b43d4333112f61e141ec5.tar.gz ipxe-90fbff8f3437518dbb9b43d4333112f61e141ec5.tar.xz ipxe-90fbff8f3437518dbb9b43d4333112f61e141ec5.zip |
added support for processing and transmitting without uIP
Diffstat (limited to 'src/include/gpxe/ip.h')
-rw-r--r-- | src/include/gpxe/ip.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/include/gpxe/ip.h b/src/include/gpxe/ip.h index 7cd2fcff..2212d8e5 100644 --- a/src/include/gpxe/ip.h +++ b/src/include/gpxe/ip.h @@ -9,14 +9,40 @@ #include <ip.h> +/* IP constants */ + +#define IP_HLEN 20 +#define IP_VER 4 +#define IP_MASK_VER 0xf0 +#define IP_MASK_HLEN 0x0f +#define IP_PSHLEN 12 + +/* IP header defaults */ +#define IP_TOS 0 +#define IP_TTL 64 + +/* IP6 constants */ + +#define IP6_HLEN 38 + +struct pk_buff; +struct net_device; struct net_protocol; extern struct net_protocol ipv4_protocol; +extern struct net_protocol ipv6_protocol; extern int add_ipv4_address ( struct net_device *netdev, struct in_addr address, struct in_addr netmask, struct in_addr gateway ); extern void del_ipv4_address ( struct net_device *netdev ); + extern int ipv4_uip_tx ( struct pk_buff *pkb ); +extern int ipv4_tx ( struct pk_buff *pkb, uint16_t trans_proto, struct in_addr *dest ); +extern int ipv6_tx ( struct pk_buff *pkb, uint16_t trans_proto, struct in6_addr *dest ); + +extern void ipv4_rx ( struct pk_buff *pkb, struct net_device *netdev, const void *ll_source ); +extern void ipv6_rx ( struct pk_buff *pkb, struct net_device *netdev, const void *ll_source ); + #endif /* _GPXE_IP_H */ |