rump_net.c revision 1.8
11.8Spooka/*	$NetBSD: rump_net.c,v 1.8 2009/05/28 00:02:16 pooka Exp $	*/
21.1Spooka
31.1Spooka/*
41.1Spooka * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
51.1Spooka *
61.1Spooka * Redistribution and use in source and binary forms, with or without
71.1Spooka * modification, are permitted provided that the following conditions
81.1Spooka * are met:
91.1Spooka * 1. Redistributions of source code must retain the above copyright
101.1Spooka *    notice, this list of conditions and the following disclaimer.
111.1Spooka * 2. Redistributions in binary form must reproduce the above copyright
121.1Spooka *    notice, this list of conditions and the following disclaimer in the
131.1Spooka *    documentation and/or other materials provided with the distribution.
141.1Spooka *
151.1Spooka * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
161.1Spooka * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
171.1Spooka * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
181.1Spooka * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
191.1Spooka * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
201.1Spooka * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
211.1Spooka * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
221.1Spooka * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
231.1Spooka * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
241.1Spooka * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
251.1Spooka * SUCH DAMAGE.
261.1Spooka */
271.1Spooka
281.3Spooka#include <sys/cdefs.h>
291.8Spooka__KERNEL_RCSID(0, "$NetBSD: rump_net.c,v 1.8 2009/05/28 00:02:16 pooka Exp $");
301.5Spooka
311.1Spooka#include <sys/param.h>
321.1Spooka
331.1Spooka#include <sys/domain.h>
341.1Spooka#include <sys/mbuf.h>
351.1Spooka#include <sys/socketvar.h>
361.1Spooka
371.4Spooka#include <net/radix.h>
381.8Spooka#include <net/route.h>
391.4Spooka
401.1Spooka#include "rump_net_private.h"
411.1Spooka
421.8Spookavoid nocomponent(void);
431.8Spookavoid nocomponent() {}
441.8Spooka__weak_alias(rump_net_net_init,nocomponent);
451.8Spooka__weak_alias(rump_net_inet_init,nocomponent);
461.8Spooka__weak_alias(rump_net_local_init,nocomponent);
471.8Spooka__weak_alias(rump_net_sockin_init,nocomponent);
481.8Spooka__weak_alias(rump_net_virtif_init,nocomponent);
491.8Spooka
501.1Spookavoid
511.7Sceggerrump_net_init(void)
521.1Spooka{
531.1Spooka
541.1Spooka	mbinit();
551.8Spooka
561.8Spooka	domaininit(false);
571.8Spooka	/*
581.8Spooka	 * Add rest of the domains we failed to add in domaininit()
591.8Spooka	 * due to linkset lossage.
601.8Spooka	 */
611.8Spooka	rump_net_inet_init();
621.8Spooka	rump_net_local_init();
631.8Spooka	rump_net_sockin_init();
641.8Spooka	rump_net_virtif_init();
651.8Spooka	/* Note: should be last due to calling of rn_init() */
661.8Spooka	rump_net_net_init();
671.8Spooka
681.1Spooka	soinit();
691.1Spooka	soinit2();
701.8Spooka
711.2Spooka	rump_netisr_init();
721.1Spooka}
73