if_snvar.h revision 54994
1/* 2 * Copyright (c) 1999 M. Warner Losh <imp@village.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 * 25 * $FreeBSD: head/sys/dev/sn/if_snvar.h 54994 1999-12-22 08:44:13Z imp $ 26 */ 27 28#ifndef _IF_SNVAR_H 29#define _IF_SNVAR_H 30 31#include <net/if_arp.h> 32 33/* 34 * Ethernet software status per interface. The first element MUST 35 * be the arpcom struct since the address of the arpcom struct is 36 * used as a backdoor to obtain the address of this whole structure 37 * in many cases. 38 */ 39struct sn_softc { 40 struct arpcom arpcom; /* Ethernet common part */ 41 short sn_io_addr; /* i/o bus address (BASE) */ 42 int pages_wanted; /* Size of outstanding MMU ALLOC */ 43 int intr_mask; /* Most recently set interrupt mask */ 44 device_t dev; 45 void *intrhand; 46 struct resource *irq_res; 47 int irq_rid; 48 struct resource *port_res; 49 int port_rid; 50}; 51 52int sn_probe(device_t, int); 53int sn_attach(device_t); 54void sn_intr(void *); 55 56int sn_activate(device_t); 57void sn_deactivate(device_t); 58 59#endif /* _IF_SNVAR_H */ 60