1 /*
2 * ddi.c Implement the Device Driver Interface (DDI) routines.
3 * Currently, this is only used by the NET layer of LINUX,
4 * but it eventually might move to an upper directory of
5 * the system.
6 *
7 * Version: @(#)ddi.c 1.0.5 04/22/93
8 *
9 * Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
10 *
11 *
12 * For the moment I'm classifying DDI as 'dead'. However if/when Fred
13 * produces a masterpiece of design DDI may get resurrected. With the
14 * current kernel as modules work by Peter MacDonald they might be
15 * redundant anyway. Thus I've removed all but the protocol initialise.
16 *
17 * We will end up with protocol initialisers and socket family initialisers.
18 */
19 #include <asm/segment.h>
20 #include <asm/system.h>
21 #include <linux/types.h>
22 #include <linux/config.h>
23 #include <linux/kernel.h>
24 #include <linux/sched.h>
25 #include <linux/string.h>
26 #include <linux/mm.h>
27 #include <linux/socket.h>
28 #include <linux/ddi.h>
29
30
31 #undef DDI_DEBUG
32 #ifdef DDI_DEBUG
33 # define PRINTK(x) printk x
34 #else
35 # define PRINTK(x) /**/
36 #endif
37
38
39 extern struct ddi_proto protocols[]; /* network protocols */
40
41
42 /*
43 * This is the function that is called by a kernel routine during
44 * system startup. Its purpose is to walk trough the "devices"
45 * table (defined above), and to call all moduled defined in it.
46 */
47 void
48 ddi_init(void)
/* ![[previous]](../icons/n_left.png)
![[next]](../icons/n_right.png)
![[first]](../icons/n_first.png)
![[last]](../icons/n_last.png)
![[top]](../icons/top.png)
![[bottom]](../icons/bottom.png)
![[index]](../icons/index.png)
*/
49 {
50 struct ddi_proto *pro;
51
52 PRINTK (("DDI: Starting up!\n"));
53
54 /* Kick all configured protocols. */
55 pro = protocols;
56 while (pro->name != NULL)
57 {
58 (*pro->init)(pro);
59 pro++;
60 }
61 /* We're all done... */
62 }