2006-06-26 15:33:46 +00:00
|
|
|
#include <errno.h>
|
2006-08-01 20:27:26 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <byteswap.h>
|
2006-06-26 15:33:46 +00:00
|
|
|
#include <gpxe/pkbuff.h>
|
|
|
|
#include <gpxe/netdevice.h>
|
|
|
|
#include <gpxe/in.h>
|
2006-08-01 20:27:26 +00:00
|
|
|
#include <gpxe/if_ether.h>
|
|
|
|
#include <gpxe/tcpip.h>
|
2006-06-26 15:33:46 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Transmit IP6 packets
|
|
|
|
*/
|
2006-08-02 00:02:21 +00:00
|
|
|
static int ipv6_tx ( struct pk_buff *pkb,
|
|
|
|
struct tcpip_protocol *tcpip_protocol,
|
|
|
|
struct sockaddr_tcpip *st_dest ) {
|
2006-06-26 15:33:46 +00:00
|
|
|
return -ENOSYS;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Process incoming IP6 packets
|
|
|
|
*
|
|
|
|
* Placeholder function. Should rewrite in net/ipv6.c
|
|
|
|
*/
|
2006-08-02 00:02:21 +00:00
|
|
|
static int ipv6_rx ( struct pk_buff *pkb __unused,
|
|
|
|
struct net_device *netdev __unused,
|
|
|
|
const void *ll_source __unused ) {
|
|
|
|
return -ENOSYS;
|
2006-08-01 20:27:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static const char * ipv6_ntoa ( const void *net_addr ) {
|
|
|
|
// return inet6_ntoa ( * ( ( struct in6_addr * ) net_addr ) );
|
|
|
|
return "no support yet";
|
|
|
|
}
|
|
|
|
|
|
|
|
/** IPv6 protocol */
|
|
|
|
struct net_protocol ipv6_protocol = {
|
|
|
|
.name = "IP6",
|
|
|
|
.net_proto = htons ( ETH_P_IPV6 ),
|
|
|
|
.net_addr_len = sizeof ( struct in6_addr ),
|
|
|
|
.rx = ipv6_rx,
|
|
|
|
.ntoa = ipv6_ntoa,
|
|
|
|
};
|
|
|
|
|
|
|
|
NET_PROTOCOL ( ipv6_protocol );
|
|
|
|
|
|
|
|
/** IPv6 TCPIP net protocol */
|
|
|
|
struct tcpip_net_protocol ipv6_tcpip_protocol = {
|
2006-08-02 00:02:21 +00:00
|
|
|
.name = "IPv6",
|
2006-08-01 20:27:26 +00:00
|
|
|
.sa_family = AF_INET6,
|
|
|
|
.tx = ipv6_tx,
|
|
|
|
};
|
|
|
|
|
|
|
|
TCPIP_NET_PROTOCOL ( ipv6_tcpip_protocol );
|