root/net/inet/p8023.c

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. p8023_datalink_header
  2. make_8023_client

   1 #include <linux/netdevice.h>
   2 #include <linux/skbuff.h>
   3 #include "datalink.h"
   4 #include <linux/mm.h>
   5 #include <linux/in.h>
   6 
   7 static void
   8 p8023_datalink_header(struct datalink_proto *dl, 
     /* [previous][next][first][last][top][bottom][index][help] */
   9                 struct sk_buff *skb, unsigned char *dest_node)
  10 {
  11         struct device   *dev = skb->dev;
  12         unsigned long   len = skb->len;
  13         unsigned long   hard_len = dev->hard_header_len;
  14 
  15         dev->hard_header(skb->data, dev, len - hard_len,
  16                         dest_node, NULL, len - hard_len, skb);
  17         skb->h.raw = skb->data + hard_len;
  18 }
  19 
  20 struct datalink_proto *
  21 make_8023_client(void)
     /* [previous][next][first][last][top][bottom][index][help] */
  22 {
  23         struct datalink_proto   *proto;
  24 
  25         proto = (struct datalink_proto *) kmalloc(sizeof(*proto), GFP_ATOMIC);
  26         if (proto != NULL) {
  27                 proto->type_len = 0;
  28                 proto->header_length = 0;
  29                 proto->datalink_header = p8023_datalink_header;
  30         }
  31 
  32         return proto;
  33 }
  34 

/* [previous][next][first][last][top][bottom][index][help] */