Annotation of sys/dev/pci/if_san_obsd.h, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: if_san_obsd.h,v 1.5 2005/04/01 21:42:36 canacar Exp $ */
! 2:
! 3: /*-
! 4: * Copyright (c) 2001-2004 Sangoma Technologies (SAN)
! 5: * All rights reserved. www.sangoma.com
! 6: *
! 7: * This code is written by Alex Feldman <al.feldman@sangoma.com> for SAN.
! 8: *
! 9: * Redistribution and use in source and binary forms, with or without
! 10: * modification, are permitted provided that the following conditions
! 11: * are met:
! 12: * 1. Redistributions of source code must retain the above copyright
! 13: * notice, this list of conditions and the following disclaimer.
! 14: * 2. Redistributions in binary form must reproduce the above
! 15: * copyright notice, this list of conditions and the following disclaimer
! 16: * in the documentation and/or other materials provided with the
! 17: * distribution.
! 18: * 3. Neither the name of Sangoma Technologies nor the names of its
! 19: * contributors may be used to endorse or promote products derived
! 20: * from this software without specific prior written permission.
! 21: *
! 22: * THIS SOFTWARE IS PROVIDED BY SANGOMA TECHNOLOGIES AND CONTRIBUTORS
! 23: * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
! 24: * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
! 25: * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
! 26: * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
! 27: * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
! 28: * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
! 29: * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
! 30: * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
! 31: * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
! 32: * THE POSSIBILITY OF SUCH DAMAGE.
! 33: */
! 34:
! 35:
! 36:
! 37: #ifndef __IF_SAN_OBSD_H
! 38: # define __IF_SAN_OBSD_H
! 39:
! 40: #define IF_IFACE_V35 0x1001
! 41: #define IF_IFACE_T1 0x1002
! 42: #define IF_IFACE_E1 0x1003
! 43: #define IF_IFACE_SYNC_SERIAL 0x1004
! 44:
! 45: #define IF_PROTO_HDLC 0x2001
! 46: #define IF_PROTO_PPP 0x2002
! 47: #define IF_PROTO_CISCO 0x2003
! 48: #define IF_PROTO_FR 0x2004
! 49: #define IF_PROTO_FR_ADD_PVC 0x2005
! 50: #define IF_PROTO_FR_DEL_PVC 0x2006
! 51: #define IF_PROTO_X25 0x2007
! 52: #define WAN_PROTO_X25 0x2007
! 53:
! 54: #define IF_GET_PROTO 0x3001
! 55:
! 56: #define te1_settings void
! 57: #define sync_serial_settings void
! 58:
! 59: #define ifs_size data_length
! 60: #define ifs_te1 data
! 61: #define ifs_sync data
! 62: #define ifs_cisco data
! 63: #define ifs_fr data
! 64: #define ifs_fr_pvc data
! 65: #define ifs_fr_pvc_info data
! 66:
! 67:
! 68: #define SANCFG_LBO_FLAG 0x0001
! 69: #define SANCFG_CLOCK_FLAG 0x0002
! 70:
! 71: typedef struct { int dummy; } cisco_proto, fr_proto, fr_proto_pvc;
! 72: struct if_settings {
! 73: unsigned int type;
! 74: unsigned int data_length;
! 75: unsigned long flags;
! 76: void* data;
! 77: };
! 78:
! 79: typedef struct {
! 80: int proto;
! 81: int iface;
! 82: char hwprobe[100];
! 83: sdla_te_cfg_t te_cfg;
! 84: union {
! 85: cisco_proto cisco;
! 86: fr_proto fr;
! 87: fr_proto_pvc fr_pvc;
! 88: } protocol;
! 89: } wanlite_def_t;
! 90:
! 91: /* WANPIPE Generic function interface */
! 92: # if defined(_KERNEL)
! 93: struct ifnet *wanpipe_generic_alloc (sdla_t *);
! 94: void wanpipe_generic_free (struct ifnet *);
! 95: int wanpipe_generic_name (sdla_t *, char *, int);
! 96: int wanpipe_generic_register(sdla_t *, struct ifnet *, char *);
! 97: void wanpipe_generic_unregister(struct ifnet *);
! 98: int wanpipe_generic_open(struct ifnet *);
! 99: int wanpipe_generic_close(struct ifnet *);
! 100: int wanpipe_generic_input(struct ifnet *, struct mbuf *);
! 101: int wanpipe_generic_tx_timeout(struct ifnet *);
! 102: int wp_lite_set_proto(struct ifnet *, struct ifreq *);
! 103: int wp_lite_set_te1_cfg(struct ifnet *, struct ifreq *);
! 104: # endif
! 105: #endif /* __IF_SAN_OBSD_H */
CVSweb