net_component.c revision 1.6
11.6Skre/*	$NetBSD: net_component.c,v 1.6 2016/08/10 10:09:42 kre Exp $	*/
21.1Spooka
31.1Spooka/*
41.1Spooka * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
51.1Spooka *
61.1Spooka * Development of this software was supported by The Nokia Foundation
71.1Spooka *
81.1Spooka * Redistribution and use in source and binary forms, with or without
91.1Spooka * modification, are permitted provided that the following conditions
101.1Spooka * are met:
111.1Spooka * 1. Redistributions of source code must retain the above copyright
121.1Spooka *    notice, this list of conditions and the following disclaimer.
131.1Spooka * 2. Redistributions in binary form must reproduce the above copyright
141.1Spooka *    notice, this list of conditions and the following disclaimer in the
151.1Spooka *    documentation and/or other materials provided with the distribution.
161.1Spooka *
171.1Spooka * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
181.1Spooka * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
191.1Spooka * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
201.1Spooka * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
211.1Spooka * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
221.1Spooka * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
231.1Spooka * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
241.1Spooka * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
251.1Spooka * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
261.1Spooka * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
271.1Spooka * SUCH DAMAGE.
281.1Spooka */
291.1Spooka
301.1Spooka#include <sys/cdefs.h>
311.6Skre__KERNEL_RCSID(0, "$NetBSD: net_component.c,v 1.6 2016/08/10 10:09:42 kre Exp $");
321.1Spooka
331.1Spooka#include <sys/param.h>
341.1Spooka#include <sys/domain.h>
351.1Spooka#include <sys/protosw.h>
361.1Spooka
371.1Spooka#include <net/if.h>
381.4Sozaki#include <net/if_llatbl.h>
391.1Spooka#include <net/route.h>
401.1Spooka
411.5Spooka#include <rump-sys/kern.h>
421.1Spooka
431.1SpookaRUMP_COMPONENT(RUMP_COMPONENT_NET)
441.1Spooka{
451.1Spooka
461.1Spooka	ifinit1();
471.1Spooka	ifinit();
481.4Sozaki	lltableinit();
491.1Spooka}
501.1Spooka
511.1SpookaRUMP_COMPONENT(RUMP_COMPONENT_NET_ROUTE)
521.1Spooka{
531.3Spooka	extern struct domain routedomain, linkdomain;
541.3Spooka#ifdef COMPAT_50
551.3Spooka	extern struct domain compat_50_routedomain;
561.3Spooka#endif
571.1Spooka
581.2Spooka	domain_attach(&linkdomain);
591.2Spooka	domain_attach(&routedomain);
601.3Spooka#ifdef COMPAT_50
611.2Spooka	domain_attach(&compat_50_routedomain);
621.3Spooka#endif
631.1Spooka}
641.1Spooka
651.1SpookaRUMP_COMPONENT(RUMP_COMPONENT_NET_IF)
661.1Spooka{
671.1Spooka
681.6Skre	loopinit();
691.1Spooka}
70