1*95e1ffb1Schristos /* $NetBSD: conf.c,v 1.3 2005/12/11 12:17:34 christos Exp $ */ 21625aa91Sigy 31625aa91Sigy /* 48f53455cSigy * Copyright (c) 2003 Naoto Shimazaki. 51625aa91Sigy * All rights reserved. 61625aa91Sigy * 71625aa91Sigy * Redistribution and use in source and binary forms, with or without 81625aa91Sigy * modification, are permitted provided that the following conditions 91625aa91Sigy * are met: 101625aa91Sigy * 1. Redistributions of source code must retain the above copyright 111625aa91Sigy * notice, this list of conditions and the following disclaimer. 121625aa91Sigy * 2. Redistributions in binary form must reproduce the above copyright 131625aa91Sigy * notice, this list of conditions and the following disclaimer in the 141625aa91Sigy * documentation and/or other materials provided with the distribution. 151625aa91Sigy * 168f53455cSigy * THIS SOFTWARE IS PROVIDED BY NAOTO SHIMAZAKI AND CONTRIBUTORS ``AS IS'' 178f53455cSigy * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 188f53455cSigy * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 198f53455cSigy * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE NAOTO OR CONTRIBUTORS BE 208f53455cSigy * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 211625aa91Sigy * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 221625aa91Sigy * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 231625aa91Sigy * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 241625aa91Sigy * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 258f53455cSigy * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 268f53455cSigy * THE POSSIBILITY OF SUCH DAMAGE. 271625aa91Sigy */ 281625aa91Sigy #include <sys/cdefs.h> 29*95e1ffb1Schristos __KERNEL_RCSID(0, "$NetBSD: conf.c,v 1.3 2005/12/11 12:17:34 christos Exp $"); 308f53455cSigy 318f53455cSigy #include <netinet/in.h> 321625aa91Sigy 331625aa91Sigy #include <lib/libsa/stand.h> 348f53455cSigy #include <lib/libsa/netif.h> 351625aa91Sigy #include <lib/libsa/tftp.h> 361625aa91Sigy 371625aa91Sigy #include "extern.h" 381625aa91Sigy 391625aa91Sigy struct devsw devsw[] = { 401625aa91Sigy { 411625aa91Sigy .dv_name = "flash", 421625aa91Sigy .dv_strategy = flash_strategy, 431625aa91Sigy .dv_open = flash_open, 441625aa91Sigy .dv_close = flash_close, 451625aa91Sigy .dv_ioctl = flash_ioctl, 461625aa91Sigy }, 478f53455cSigy { 488f53455cSigy .dv_name = "net", 498f53455cSigy .dv_strategy = net_strategy, 508f53455cSigy .dv_open = net_open, 518f53455cSigy .dv_close = net_close, 528f53455cSigy .dv_ioctl = net_ioctl, 538f53455cSigy }, 541625aa91Sigy }; 551625aa91Sigy int ndevs = sizeof devsw / sizeof devsw[0]; 561625aa91Sigy 578f53455cSigy struct fs_ops file_system[] = { 588f53455cSigy { 598f53455cSigy .open = tftp_open, 608f53455cSigy .close = tftp_close, 618f53455cSigy .read = tftp_read, 628f53455cSigy .write = tftp_write, 638f53455cSigy .seek = tftp_seek, 648f53455cSigy .stat = tftp_stat, 658f53455cSigy } 668f53455cSigy }; 678f53455cSigy int nfsys = sizeof file_system / sizeof file_system[0]; 688f53455cSigy 698f53455cSigy struct netif_driver *netif_drivers[] = { 708f53455cSigy &cs_driver, 718f53455cSigy }; 728f53455cSigy int n_netif_drivers = sizeof netif_drivers / sizeof netif_drivers[0]; 73