2006-04-24 17:42:49 +02:00
|
|
|
#ifndef _GPXE_IP_H
|
|
|
|
#define _GPXE_IP_H
|
2006-03-24 18:22:09 +01:00
|
|
|
|
|
|
|
/** @file
|
|
|
|
*
|
|
|
|
* IP protocol
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2006-06-18 00:36:27 +02:00
|
|
|
#include <ip.h>
|
|
|
|
|
2006-06-25 07:16:54 +02:00
|
|
|
/* 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;
|
2006-04-30 04:08:42 +02:00
|
|
|
struct net_protocol;
|
2006-03-24 18:22:09 +01:00
|
|
|
|
2006-04-30 04:08:42 +02:00
|
|
|
extern struct net_protocol ipv4_protocol;
|
2006-06-25 07:16:54 +02:00
|
|
|
extern struct net_protocol ipv6_protocol;
|
2006-03-24 18:22:09 +01:00
|
|
|
|
2006-06-16 02:19:46 +02:00
|
|
|
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 );
|
2006-06-25 07:16:54 +02:00
|
|
|
|
2006-06-18 00:36:27 +02:00
|
|
|
extern int ipv4_uip_tx ( struct pk_buff *pkb );
|
2006-06-16 02:19:46 +02:00
|
|
|
|
2006-06-25 07:16:54 +02:00
|
|
|
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 );
|
|
|
|
|
2006-04-24 17:42:49 +02:00
|
|
|
#endif /* _GPXE_IP_H */
|