From e0faf22f31c48fb27b43c1825897d26e58feafc4 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 3 May 2009 17:20:00 +0200 Subject: This is my initial working version. There is a bug in boot in this version: subhurd sometimes cannot boot. --- pfinet.old/linux-src/net/ethernet/pe2.c | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 pfinet.old/linux-src/net/ethernet/pe2.c (limited to 'pfinet.old/linux-src/net/ethernet/pe2.c') diff --git a/pfinet.old/linux-src/net/ethernet/pe2.c b/pfinet.old/linux-src/net/ethernet/pe2.c new file mode 100644 index 00000000..4915f070 --- /dev/null +++ b/pfinet.old/linux-src/net/ethernet/pe2.c @@ -0,0 +1,38 @@ +#include +#include +#include +#include +#include + +static void +pEII_datalink_header(struct datalink_proto *dl, + struct sk_buff *skb, unsigned char *dest_node) +{ + struct device *dev = skb->dev; + + skb->protocol = htons (ETH_P_IPX); + if(dev->hard_header) + dev->hard_header(skb, dev, ETH_P_IPX, dest_node, NULL, skb->len); +} + +struct datalink_proto * +make_EII_client(void) +{ + struct datalink_proto *proto; + + proto = (struct datalink_proto *) kmalloc(sizeof(*proto), GFP_ATOMIC); + if (proto != NULL) { + proto->type_len = 0; + proto->header_length = 0; + proto->datalink_header = pEII_datalink_header; + proto->string_name = "EtherII"; + } + + return proto; +} + +void destroy_EII_client(struct datalink_proto *dl) +{ + if (dl) + kfree_s(dl, sizeof(struct datalink_proto)); +} -- cgit v1.2.3