root/net/tcp/pack_type.c

/* [previous][next][first][last][top][bottom][index][help] */
   1 /* pack_type.c - implements raw packet sockets. */
   2 /*
   3     Copyright (C) 1992  Ross Biro
   4 
   5     This program is free software; you can redistribute it and/or modify
   6     it under the terms of the GNU General Public License as published by
   7     the Free Software Foundation; either version 2, or (at your option)
   8     any later version.
   9 
  10     This program is distributed in the hope that it will be useful,
  11     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13     GNU General Public License for more details.
  14 
  15     You should have received a copy of the GNU General Public License
  16     along with this program; if not, write to the Free Software
  17     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
  18 
  19     The Author may be reached as bir7@leland.stanford.edu or
  20     C/O Department of Mathematics; Stanford University; Stanford, CA 94305
  21 */
  22 /* $Id: pack_type.c,v 0.8.4.3 1992/12/12 19:25:04 bir7 Exp $ */
  23 /* $Log: pack_type.c,v $
  24  * Revision 0.8.4.3  1992/12/12  19:25:04  bir7
  25  * Cleaned up Log messages.
  26  *
  27  * Revision 0.8.4.2  1992/11/10  10:38:48  bir7
  28  * Change free_s to kfree_s and accidently changed free_skb to kfree_skb.
  29  *
  30  * Revision 0.8.4.1  1992/11/10  00:17:18  bir7
  31  * version change only.
  32  *
  33  * Revision 0.8.3.2  1992/11/10  00:14:47  bir7
  34  * Changed malloc to kmalloc and added Id and Log
  35  *
  36  */
  37 
  38 #include <linux/stddef.h>
  39 #include "dev.h"
  40 #include "eth.h"
  41 
  42 extern int arp_rcv (struct sk_buff *skb, struct device *dev,
  43                     struct packet_type *pt);
  44 
  45 static struct packet_type arp_packet_type=
  46 {
  47    NET16(ETHERTYPE_ARP),
  48    0, /* copy */
  49    arp_rcv,
  50    NULL,
  51    NULL /* next */
  52 };
  53 
  54 extern int ip_rcv (struct sk_buff *skb, struct device *dev,
  55                    struct packet_type *pt);
  56 
  57 static struct packet_type ip_packet_type=
  58 {
  59    NET16(ETHERTYPE_IP),
  60    0, /* copy */
  61    ip_rcv,
  62    NULL,
  63    &arp_packet_type
  64 };
  65    
  66 struct packet_type *ptype_base = &ip_packet_type;
  67 
  68 
  69 
  70 
  71 

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