OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [net/] [ethernet/] [pe2.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1275 phoenix
#include <linux/netdevice.h>
2
#include <linux/skbuff.h>
3
#include <net/datalink.h>
4
#include <linux/mm.h>
5
#include <linux/in.h>
6
 
7
static void
8
pEII_datalink_header(struct datalink_proto *dl,
9
                struct sk_buff *skb, unsigned char *dest_node)
10
{
11
        struct net_device       *dev = skb->dev;
12
 
13
        skb->protocol = htons (ETH_P_IPX);
14
        if(dev->hard_header)
15
                dev->hard_header(skb, dev, ETH_P_IPX, dest_node, NULL, skb->len);
16
}
17
 
18
struct datalink_proto *
19
make_EII_client(void)
20
{
21
        struct datalink_proto   *proto;
22
 
23
        proto = (struct datalink_proto *) kmalloc(sizeof(*proto), GFP_ATOMIC);
24
        if (proto != NULL) {
25
                proto->type_len = 0;
26
                proto->header_length = 0;
27
                proto->datalink_header = pEII_datalink_header;
28
                proto->string_name = "EtherII";
29
        }
30
 
31
        return proto;
32
}
33
 
34
void destroy_EII_client(struct datalink_proto *dl)
35
{
36
        if (dl)
37
                kfree(dl);
38
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.