Import 2.3.10pre5
[davej-history.git] / net / protocols.c
blob0a15b477349d76f85887da811164fba6ca81eba5
1 /*
2 * Protocol initializer table. Here separately for convenience
4 */
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>
13 #ifdef CONFIG_UNIX
14 #include <linux/un.h>
15 #include <net/af_unix.h>
16 #endif
18 #ifdef CONFIG_INET
19 #include <linux/inet.h>
20 #ifdef CONFIG_IPV6
21 extern void inet6_proto_init(struct net_proto *pro);
22 #endif
23 #endif /* INET */
25 #ifdef CONFIG_ECONET
26 extern void econet_proto_init(struct net_proto *pro);
27 #endif
29 #ifdef CONFIG_NETLINK
30 extern void netlink_proto_init(struct net_proto *pro);
31 #endif
33 #ifdef CONFIG_PACKET
34 extern void packet_proto_init(struct net_proto *pro);
35 #endif
37 #if defined(CONFIG_IPX) || defined(CONFIG_IPX_MODULE)
38 #define NEED_802
39 #include <net/ipxcall.h>
40 #endif
42 #ifdef CONFIG_X25
43 #include <net/x25call.h>
44 #endif
46 #ifdef CONFIG_LAPB
47 #include <net/lapbcall.h>
48 #endif
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
60 #ifdef CONFIG_IRDA
61 #include <net/irda/irdacall.h>
62 #endif
64 #if defined(CONFIG_DECNET)
65 #include <net/decnet_call.h>
66 #endif
68 #if defined(CONFIG_ATALK) || defined(CONFIG_ATALK_MODULE)
69 #define NEED_802
70 #include <net/atalkcall.h>
71 #endif
73 #if defined(CONFIG_NETBEUI)
74 #define NEED_LLC
75 #include <net/netbeuicall.h>
76 #endif
78 #if defined(CONFIG_LLC)
79 #define NEED_LLC
80 #endif
82 #include <net/psnapcall.h>
84 #ifdef CONFIG_TR
85 #include <linux/netdevice.h>
86 #include <linux/trdevice.h>
87 extern void rif_init(struct net_proto *);
88 #endif
90 #ifdef NEED_LLC
91 #define NEED_802
92 #include <net/llccall.h>
93 #endif
95 #ifdef NEED_802
96 #include <net/p8022call.h>
97 #endif
100 * Protocol Table
103 struct net_proto protocols[] = {
104 #ifdef CONFIG_NETLINK
105 { "NETLINK", netlink_proto_init },
106 #endif
108 #ifdef CONFIG_PACKET
109 { "PACKET", packet_proto_init },
110 #endif
112 #ifdef CONFIG_UNIX
113 { "UNIX", unix_proto_init }, /* Unix domain socket family */
114 #endif
116 #ifdef NEED_802
117 { "802.2", p8022_proto_init }, /* 802.2 demultiplexor */
118 { "SNAP", snap_proto_init }, /* SNAP demultiplexor */
119 #endif
121 #ifdef CONFIG_TR
122 { "RIF", rif_init }, /* RIF for Token ring */
123 #endif
125 #ifdef NEED_LLC
126 { "802.2LLC", llc_init }, /* 802.2 LLC */
127 #endif
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
148 #ifdef CONFIG_IPX
149 { "IPX", ipx_proto_init }, /* IPX */
150 #endif
152 #ifdef CONFIG_ATALK
153 { "DDP", atalk_proto_init }, /* Netatalk Appletalk driver */
154 #endif
156 #ifdef CONFIG_LAPB
157 { "LAPB", lapb_proto_init }, /* LAPB protocols */
158 #endif
160 #ifdef CONFIG_X25
161 { "X.25", x25_proto_init }, /* CCITT X.25 Packet Layer */
162 #endif
164 #ifdef CONFIG_ECONET
165 { "Econet", econet_proto_init }, /* Acorn Econet */
166 #endif
168 #ifdef CONFIG_IRDA
169 { "IrDA", irda_proto_init }, /* IrDA protocols */
170 #endif
172 { NULL, NULL } /* End marker */