td.h revision cee0fb94c0d4227de0a00efc162fb2739844b641
/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _TD_
#define _TD_
#include "csi_structs.h"
#include "csi_rpc_header.h"
#include "csi_adi_header.h"
#include "cl_pub.h"
typedef struct {
char message_content;
typedef struct {
char message_content;
#define SIZEOFIDBUF 100
typedef enum {
LONG,
} FORMAT;
typedef enum {
} PACKET_TYPE;
extern char td_msg_buf[];
extern char td_ascii_buf[];
extern PACKET_TYPE td_packet_type;
extern unsigned char td_mopts;
extern unsigned long td_xopts;
extern char *td_msg_ptr;
extern char *td_fix_portion;
extern char *td_var_portion;
extern int td_adi_protocol;
void td_get_packet(void);
void td_csi_header_rpc(CSI_HEADER_RPC *);
void td_csi_header_adi(CSI_HEADER_ADI *);
void td_critical_info(MESSAGE_HEADER *, unsigned);
char *td_net_addr(unsigned char *);
char *td_utoa(unsigned int);
char *td_ltoa(long);
char *td_ultoa(unsigned long);
char *td_stoa(short);
char *td_ustoa(unsigned short);
char *td_rm_space(char *);
void td_print_header(void);
void td_hex_dump(void);
void td_print_volid(VOLID *);
void td_print_volrange(VOLRANGE *);
void td_print_driveid(DRIVEID *);
void td_print_msgid(MESSAGE_ID *);
void td_print_acs(ACS *);
void td_print_v0_capid(V0_CAPID *);
void td_print_capid(CAPID *);
void td_print_cellid(CELLID *);
void td_print_lsmid(LSMID *);
void td_print_portid(PORTID *);
void td_print_poolid(POOLID*);
void td_print_panelid(PANELID *);
void td_print_subpanelid(SUBPANELID *);
void td_print_lockid(LOCKID *);
void td_print_userid(USERID *);
void td_print_acs_list(ACS *, unsigned short);
void td_print_lsmid_list(LSMID *, unsigned short);
void td_print_capid_list(CAPID *, unsigned short);
void td_print_v0_capid_list(V0_CAPID *, unsigned short);
void td_print_portid_list(PORTID *, unsigned short);
void td_print_poolid_list(POOLID *, unsigned short);
void td_print_panelid_list(PANELID *, unsigned short);
void td_print_subpanelid_list(SUBPANELID *, unsigned short);
void td_print_volid_list(VOLID *, unsigned short);
void td_print_volrange_list(VOLRANGE *, unsigned short);
void td_print_driveid_list(DRIVEID *, unsigned short);
void td_print_msgid_list(MESSAGE_ID *, unsigned short);
void td_decode_ack(VERSION);
void td_print_command(COMMAND *);
void td_print_type(TYPE *);
void td_print_count(unsigned short *);
void td_print_state(STATE *);
void td_print_status(STATUS *);
void td_print_freecells(FREECELLS *);
void td_print_low_water_mark(unsigned long *);
void td_print_high_water_mark(unsigned long *);
void td_print_pool_attr(unsigned long *);
void td_print_max_use(unsigned short *);
void td_print_cur_use(unsigned short *);
void td_print_location(LOCATION *);
void td_print_cap_mode(CAP_MODE *);
void td_print_cap_priority(CAP_PRIORITY *);
void td_decode_resp_status(RESPONSE_STATUS *);
void td_decode_vol_status(VOLUME_STATUS *);
void td_decode_vol_status_list(VOLUME_STATUS *, unsigned short);
void td_print_media_type(MEDIA_TYPE *);
void td_print_media_type_list(MEDIA_TYPE *, unsigned short);
void td_print_drive_type(DRIVE_TYPE *);
void td_print_drive_type_list(DRIVE_TYPE *, unsigned short);
void td_print_category(int *catetory);
void td_print_code(int *code);
void td_print_sense_key(unsigned char *sense_key);
void td_print_asc(unsigned char *asc);
void td_print_ascq(unsigned char *ascq);
unsigned short count);
unsigned short count);
void td_print_xml_data_length(unsigned short *length);
void td_invalid_command(VERSION);
void td_idle_command(VERSION);
void td_start_command(VERSION);
void td_audit_req(VERSION);
void td_cancel_req(VERSION);
void td_define_pool_req(VERSION);
void td_delete_pool_req(VERSION);
void td_dismount_req(VERSION);
void td_eject_req(VERSION);
void td_enter_req(VERSION);
void td_venter_req(VERSION);
void td_lock_req(VERSION);
void td_mount_req(VERSION);
void td_mount_scratch_req(VERSION);
void td_query_req(VERSION);
void td_set_cap_req(VERSION);
void td_set_clean_req(VERSION);
void td_set_scratch_req(VERSION);
void td_vary_req(VERSION);
void td_register_req(VERSION);
void td_unregister_req(VERSION);
void td_check_registration_req(VERSION);
void td_display_req(VERSION);
void td_audit_resp(VERSION);
void td_cancel_resp(VERSION);
void td_define_pool_resp(VERSION);
void td_delete_pool_resp(VERSION);
void td_dismount_resp(VERSION);
void td_eject_enter(VERSION);
void td_lock_resp(VERSION);
void td_mount_resp(VERSION);
void td_mount_scratch_resp(VERSION);
void td_query_resp(VERSION);
void td_query_lock_resp(VERSION);
void td_set_cap_resp(VERSION);
void td_set_clean_resp(VERSION);
void td_set_scratch_resp(VERSION);
void td_vary_resp(VERSION);
void td_register_resp(VERSION);
void td_unregister_resp(VERSION);
void td_display_resp(VERSION);
void td_mount_pinfo_resp(VERSION);
void td_mount_pinfo_req(VERSION);
void td_print_drive_addr(unsigned short *drive_addr);
#endif /* _TD_ */