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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [net/] [802/] [p8023.c] - Rev 1777

Go to most recent revision | Compare with Previous | Blame | View Log

#include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <net/datalink.h>
#include <linux/mm.h>
#include <linux/in.h>
 
static void
p8023_datalink_header(struct datalink_proto *dl, 
		struct sk_buff *skb, unsigned char *dest_node)
{
	struct device	*dev = skb->dev;
 
	dev->hard_header(skb, dev, ETH_P_802_3, dest_node, NULL, skb->len);
}
 
struct datalink_proto *
make_8023_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 = p8023_datalink_header;
		proto->string_name = "802.3";
	}
 
	return proto;
}
 
void destroy_8023_client(struct datalink_proto *dl)
{
	if (dl)
		kfree_s(dl,sizeof(struct datalink_proto));
}
 
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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