1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright 2001-2002 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _SYS_USBA_USBA_DEVDB_IMPL_H 28 #define _SYS_USBA_USBA_DEVDB_IMPL_H 29 30 #pragma ident "%Z%%M% %I% %E% SMI" 31 32 #ifdef __cplusplus 33 extern "C" { 34 #endif 35 36 #include <sys/usb/usba/usba_devdb.h> 37 #include <sys/kobj.h> 38 #include <sys/kobj_lex.h> 39 #include <sys/sysmacros.h> 40 #include <sys/avl.h> 41 42 #define USBCONF_FILE "/etc/usb/config_map.conf" 43 44 static char usbconf_file[] = USBCONF_FILE; 45 46 typedef struct usba_devdb_info { 47 usba_configrec_t *usb_dev; 48 avl_node_t avl_link; 49 } usba_devdb_info_t; 50 51 52 typedef enum { 53 USB_SELECTION, USB_VENDOR, USB_PRODUCT, USB_CFGNDX, USB_SRNO, 54 USB_PATH, USB_DRIVER, USB_NONE 55 } config_field_t; 56 57 typedef struct usbcfg_var { 58 const char *name; 59 config_field_t field; 60 } usba_cfg_var_t; 61 62 static usba_cfg_var_t usba_cfg_varlist[] = { 63 { "selection", USB_SELECTION }, 64 { "idVendor", USB_VENDOR }, 65 { "idProduct", USB_PRODUCT }, 66 { "cfgndx", USB_CFGNDX }, 67 { "srno", USB_SRNO }, 68 { "pathname", USB_PATH }, 69 { "driver", USB_DRIVER }, 70 { NULL, USB_NONE }, 71 }; 72 73 #ifdef __cplusplus 74 } 75 #endif 76 77 #endif /* _SYS_USBA_USBA_DEVDB_IMPL_H */ 78