linux-old/net/protocols.c
<<
>>
Prefs
   1/*
   2 *      Protocol initializer table. Here separately for convenience
   3 *
   4 */
   5 
   6 
   7#include <linux/config.h>
   8#include <linux/types.h>
   9#include <linux/kernel.h>
  10#include <linux/net.h>
  11#include <linux/fs.h>
  12
  13#ifdef  CONFIG_UNIX
  14#include <linux/un.h>
  15#include <net/af_unix.h>
  16#endif
  17
  18#ifdef  CONFIG_INET
  19#include <linux/inet.h>
  20#ifdef  CONFIG_IPV6
  21extern void inet6_proto_init(struct net_proto *pro);
  22#endif
  23#endif  /* INET */
  24
  25#ifdef CONFIG_ECONET
  26extern void econet_proto_init(struct net_proto *pro);
  27#endif
  28
  29#ifdef CONFIG_NETLINK
  30extern void netlink_proto_init(struct net_proto *pro);
  31#endif
  32
  33#ifdef CONFIG_PACKET
  34extern void packet_proto_init(struct net_proto *pro);
  35#endif
  36
  37#if defined(CONFIG_IPX) || defined(CONFIG_IPX_MODULE)
  38#define NEED_802
  39#include <net/ipxcall.h>
  40#endif
  41
  42#ifdef CONFIG_X25
  43#include <net/x25call.h>
  44#endif
  45
  46#ifdef CONFIG_LAPB
  47#include <net/lapbcall.h>
  48#endif
  49
  50#ifdef CONFIG_AX25
  51#include <net/ax25call.h>
  52#ifdef CONFIG_NETROM
  53#include <net/nrcall.h>
  54#endif
  55#ifdef CONFIG_ROSE
  56#include <net/rosecall.h>
  57#endif
  58#endif
  59
  60#ifdef CONFIG_IRDA
  61#include <net/irda/irdacall.h>
  62#endif
  63
  64#if defined(CONFIG_DECNET)
  65#include <net/decnet_call.h>
  66#endif
  67
  68#if defined(CONFIG_ATALK) || defined(CONFIG_ATALK_MODULE)
  69#define NEED_802
  70#include <net/atalkcall.h>
  71#endif
  72
  73#if defined(CONFIG_NETBEUI)
  74#define NEED_LLC
  75#include <net/netbeuicall.h>
  76#endif
  77
  78#if defined(CONFIG_LLC)
  79#define NEED_LLC
  80#endif
  81
  82#include <net/psnapcall.h>
  83
  84#ifdef CONFIG_TR
  85#include <linux/netdevice.h>
  86#include <linux/trdevice.h>
  87extern void rif_init(struct net_proto *);
  88#endif
  89
  90#ifdef NEED_LLC
  91#define NEED_802
  92#include <net/llccall.h>
  93#endif
  94
  95#ifdef NEED_802
  96#include <net/p8022call.h>
  97#endif
  98
  99/*
 100 *      Protocol Table
 101 */
 102 
 103struct net_proto protocols[] = {
 104#ifdef  CONFIG_NETLINK
 105  { "NETLINK",  netlink_proto_init      },
 106#endif
 107
 108#ifdef  CONFIG_PACKET
 109  { "PACKET",   packet_proto_init       },
 110#endif
 111
 112#ifdef  CONFIG_UNIX
 113  { "UNIX",     unix_proto_init },                      /* Unix domain socket family    */
 114#endif
 115
 116#ifdef NEED_802
 117  { "802.2",    p8022_proto_init },                     /* 802.2 demultiplexor          */
 118  { "SNAP",     snap_proto_init },                      /* SNAP demultiplexor           */
 119#endif
 120
 121#ifdef CONFIG_TR
 122  { "RIF",      rif_init },                             /* RIF for Token ring           */
 123#endif  
 124
 125#ifdef NEED_LLC
 126  { "802.2LLC", llc_init },                             /* 802.2 LLC */
 127#endif  
 128
 129#ifdef CONFIG_AX25  
 130  { "AX.25",    ax25_proto_init },                      /* Amateur Radio AX.25 */
 131#ifdef CONFIG_NETROM
 132  { "NET/ROM",  nr_proto_init },                        /* Amateur Radio NET/ROM */
 133#endif
 134#ifdef CONFIG_ROSE
 135  { "Rose",     rose_proto_init },                      /* Amateur Radio X.25 PLP */
 136#endif
 137#endif  
 138#ifdef CONFIG_DECNET
 139  { "DECnet",   decnet_proto_init },                    /* DECnet */
 140#endif
 141#ifdef  CONFIG_INET
 142  { "INET",     inet_proto_init },                      /* TCP/IP */
 143#ifdef  CONFIG_IPV6
 144  { "INET6",    inet6_proto_init},                      /* IPv6 */
 145#endif
 146#endif
 147
 148#ifdef  CONFIG_IPX
 149  { "IPX",      ipx_proto_init },                       /* IPX                          */
 150#endif
 151
 152#ifdef CONFIG_ATALK
 153  { "DDP",      atalk_proto_init },                     /* Netatalk Appletalk driver    */
 154#endif
 155
 156#ifdef CONFIG_LAPB
 157  { "LAPB",     lapb_proto_init },                      /* LAPB protocols */
 158#endif
 159
 160#ifdef CONFIG_X25
 161  { "X.25",     x25_proto_init },                       /* CCITT X.25 Packet Layer */
 162#endif
 163
 164#ifdef CONFIG_ECONET
 165  { "Econet",   econet_proto_init },                    /* Acorn Econet */
 166#endif
 167
 168#ifdef CONFIG_IRDA
 169  { "IrDA",     irda_proto_init },                     /* IrDA protocols */
 170#endif
 171
 172  { NULL,       NULL            }                       /* End marker                   */
 173};
 174
lxr.linux.no kindly hosted by Redpill Linpro AS, provider of Linux consulting and operations services since 1995.