wusbd.h revision ff0e937b36dcde1a47ff7b00aa76a491c0dc07a8
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _WUSBD_H
#define _WUSBD_H
#ifdef __cplusplus
extern "C" {
#endif
#define WUSB_HOST_PATH "/dev/usb"
#define WUSB_HOST_NAME "whost"
#define WUSB_HWA_HOST_NODE "hwa-host"
/* door server commands */
enum {
WUSB_DCMD_LIST_DATA = 0,
};
enum {
WUSBADM_OK = 0,
WUSBADM_AUTH_FAILURE, /* authorization check failure */
WUSBADM_NO_HOST, /* host id does not exist */
WUSBADM_NO_DEVICE, /* failure */
WUSBADM_CCSTORE_ACC, /* fail to access CC store */
WUSBADM_NO_SUPPORT, /* failure */
WUSBADM_INVAL_HOSTID, /* host-id not exist */
WUSBADM_INVAL_DEVID, /* dev-id not exist */
WUSBADM_HOST_NOT_ATTACH, /* the device file not exist */
WUSBADM_FAILURE /* other kind of failure */
};
#define WUSB_AUTH_READ "solaris.admin.wusb.read"
#define WUSB_AUTH_MODIFY "solaris.admin.wusb.modify"
#define WUSB_AUTH_HOST "solaris.admin.wusb.host"
#define WUSB_BUF_LEN 1024
/* return values */
#define WUSBA_SUCCESS 0
#define WUSBA_FAILURE -1
typedef struct wusbd_door_call {
/* association type */
#define ASSO_TYPE_NUMERIC 0x01
#define ASSO_TYPE_CABLE 0x02
/* assocation data */
typedef struct wusb_asso_ctrl {
typedef struct wusb_dev_ctrl {
void daemonize();
#ifdef __cplusplus
}
#endif
#endif /* _WUSBD_H */