netcan_component.c revision 1.2
11.2Sbouyer/* $NetBSD: netcan_component.c,v 1.2 2017/05/27 21:02:56 bouyer Exp $ */ 21.2Sbouyer 31.2Sbouyer/* 41.2Sbouyer * Copyright (c) 2010 Antti Kantee. All Rights Reserved. 51.2Sbouyer * 61.2Sbouyer * Redistribution and use in source and binary forms, with or without 71.2Sbouyer * modification, are permitted provided that the following conditions 81.2Sbouyer * are met: 91.2Sbouyer * 1. Redistributions of source code must retain the above copyright 101.2Sbouyer * notice, this list of conditions and the following disclaimer. 111.2Sbouyer * 2. Redistributions in binary form must reproduce the above copyright 121.2Sbouyer * notice, this list of conditions and the following disclaimer in the 131.2Sbouyer * documentation and/or other materials provided with the distribution. 141.2Sbouyer * 151.2Sbouyer * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 161.2Sbouyer * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 171.2Sbouyer * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 181.2Sbouyer * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 191.2Sbouyer * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 201.2Sbouyer * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 211.2Sbouyer * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 221.2Sbouyer * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 231.2Sbouyer * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 241.2Sbouyer * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 251.2Sbouyer * SUCH DAMAGE. 261.2Sbouyer */ 271.2Sbouyer 281.2Sbouyer#include <sys/cdefs.h> 291.2Sbouyer__KERNEL_RCSID(0, "$NetBSD: netcan_component.c,v 1.2 2017/05/27 21:02:56 bouyer Exp $"); 301.2Sbouyer 311.2Sbouyer#include <sys/param.h> 321.2Sbouyer#include <sys/domain.h> 331.2Sbouyer#include <sys/protosw.h> 341.2Sbouyer 351.2Sbouyer#include <rump-sys/kern.h> 361.2Sbouyer#include <rump-sys/net.h> 371.2Sbouyer#include <net/netisr.h> 381.2Sbouyer#include <netcan/can_var.h> 391.2Sbouyer 401.2SbouyerRUMP_COMPONENT(RUMP_COMPONENT_NET) 411.2Sbouyer{ 421.2Sbouyer extern struct domain candomain; 431.2Sbouyer 441.2Sbouyer domain_attach(&candomain); 451.2Sbouyer rump_netisr_register(NETISR_CAN, canintr); 461.2Sbouyer} 471.2Sbouyer 481.2Sbouyervoid canloopinit(void); 491.2SbouyerRUMP_COMPONENT(RUMP_COMPONENT_NET_IF) 501.2Sbouyer{ 511.2Sbouyer canloopinit(); 521.2Sbouyer} 53