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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uClinux-2.0.x/] [net/] [802/] [p8023.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
#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
p8023_datalink_header(struct datalink_proto *dl,
9
                struct sk_buff *skb, unsigned char *dest_node)
10
{
11
        struct device   *dev = skb->dev;
12
 
13
        dev->hard_header(skb, dev, ETH_P_802_3, dest_node, NULL, skb->len);
14
}
15
 
16
struct datalink_proto *
17
make_8023_client(void)
18
{
19
        struct datalink_proto   *proto;
20
 
21
        proto = (struct datalink_proto *) kmalloc(sizeof(*proto), GFP_ATOMIC);
22
        if (proto != NULL) {
23
                proto->type_len = 0;
24
                proto->header_length = 0;
25
                proto->datalink_header = p8023_datalink_header;
26
                proto->string_name = "802.3";
27
        }
28
 
29
        return proto;
30
}
31
 
32
void destroy_8023_client(struct datalink_proto *dl)
33
{
34
        if (dl)
35
                kfree_s(dl,sizeof(struct datalink_proto));
36
}
37
 

powered by: WebSVN 2.1.0

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