Home | History | Annotate | Line # | Download | only in libnetmpls
      1 /* $NetBSD: netmpls_component.c,v 1.7 2022/09/03 02:48:01 thorpej Exp $ */
      2 
      3 /*
      4  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
      5  *
      6  * Development of this software was supported by The Nokia Foundation
      7  *
      8  * Copyright (c) 2013 The NetBSD Foundation, Inc.
      9  * All rights reserved.
     10  *
     11  * Redistribution and use in source and binary forms, with or without
     12  * modification, are permitted provided that the following conditions
     13  * are met:
     14  * 1. Redistributions of source code must retain the above copyright
     15  *    notice, this list of conditions and the following disclaimer.
     16  * 2. Redistributions in binary form must reproduce the above copyright
     17  *    notice, this list of conditions and the following disclaimer in the
     18  *    documentation and/or other materials provided with the distribution.
     19  *
     20  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
     21  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     22  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
     23  * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
     24  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     25  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
     26  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     27  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     29  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     30  * SUCH DAMAGE.
     31  */
     32 
     33 #include <sys/cdefs.h>
     34 __KERNEL_RCSID(0, "$NetBSD: netmpls_component.c,v 1.7 2022/09/03 02:48:01 thorpej Exp $");
     35 
     36 #include <sys/param.h>
     37 #include <sys/domain.h>
     38 #include <sys/protosw.h>
     39 
     40 #include <net/if.h>
     41 #include <net/route.h>
     42 
     43 #include <netmpls/mpls_var.h>
     44 
     45 #include <rump-sys/kern.h>
     46 #include <rump-sys/net.h>
     47 
     48 #include "ioconf.h"
     49 
     50 RUMP_COMPONENT(RUMP_COMPONENT_NET)
     51 {
     52 	extern struct domain mplsdomain;
     53 
     54 	domain_attach(&mplsdomain);
     55 }
     56 
     57 RUMP_COMPONENT(RUMP_COMPONENT_NET_IF)
     58 {
     59 
     60 	mplsattach(0);
     61 }
     62