root/net/tcp/protocols.c

/* [previous][next][first][last][top][bottom][index][help] */
   1 /* protocols.c */
   2 
   3 /* these headers are overkill, but until I clean up the socket header
   4    files, this is the best way. */
   5 
   6 /* $Id: protocols.c,v 0.8.4.3 1992/11/15 14:55:30 bir7 Exp $ */
   7 /* $Log: protocols.c,v $
   8  * Revision 0.8.4.3  1992/11/15  14:55:30  bir7
   9  * Remove ctrl-h so diff no longer thinks it's a binary file.
  10  *
  11  * Revision 0.8.4.2  1992/11/10  10:38:48  bir7
  12  * Change free_s to kfree_s and accidently changed free_skb to kfree_skb.
  13  *
  14  * Revision 0.8.4.1  1992/11/10  00:17:18  bir7
  15  * version change only.
  16  *
  17  * Revision 0.8.3.2  1992/11/10  00:14:47  bir7
  18  * Changed malloc to kmalloc and added Id and Log
  19  *
  20  */
  21 
  22 #include <asm/segment.h>
  23 #include <asm/system.h>
  24 #include <linux/types.h>
  25 #include <linux/kernel.h>
  26 #include <linux/sched.h>
  27 #include <linux/string.h>
  28 #include <linux/socket.h>
  29 #include <netinet/in.h>
  30 #include "timer.h"
  31 #include "ip.h"
  32 #include "tcp.h"
  33 #include "sock.h"
  34 #include "icmp.h"
  35 
  36 int udp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt,
  37             unsigned long daddr, unsigned short len,
  38             unsigned long saddr, int redo, struct ip_protocol *protocol);
  39 
  40 void udp_err  (int err, unsigned char *header, unsigned long daddr,
  41                unsigned long saddr, struct ip_protocol *protocol);
  42 
  43 
  44 int tcp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt,
  45             unsigned long daddr, unsigned short len,
  46             unsigned long saddr, int redo, struct ip_protocol *protocol);
  47 
  48 void tcp_err  (int err, unsigned char *header, unsigned long daddr,
  49                unsigned long saddr, struct ip_protocol *protocol);
  50 
  51 int icmp_rcv(struct sk_buff *skb, struct device *dev, struct options *opt,
  52              unsigned long daddr, unsigned short len,
  53              unsigned long saddr, int redo, struct ip_protocol *protocol);
  54 
  55 
  56 static struct ip_protocol tcp_protocol =
  57 {
  58    tcp_rcv,
  59    tcp_err,
  60    NULL,
  61    IPPROTO_TCP,
  62    0, /* copy */
  63    NULL
  64 };
  65 
  66 static struct ip_protocol udp_protocol =
  67 {
  68    udp_rcv,
  69    udp_err,
  70    &tcp_protocol,
  71    IPPROTO_UDP,
  72    0, /* copy */
  73    NULL
  74 };
  75 
  76 static struct ip_protocol icmp_protocol =
  77 {
  78    icmp_rcv,
  79    NULL,
  80    &udp_protocol,
  81    IPPROTO_ICMP,
  82    0, /* copy */
  83    NULL
  84 };
  85 
  86 struct ip_protocol *ip_protocol_base = &icmp_protocol;

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