⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 aep.h

📁 PGP8.0源码 请认真阅读您的文件包然后写出其具体功能
💻 H
📖 第 1 页 / 共 2 页
字号:
/*____________________________________________________________________________
		Copyright (C) 2002 PGP Corporation
        All rights reserved.

        $Id: Aep.h,v 1.2 2002/08/06 20:10:49 dallen Exp $
____________________________________________________________________________*/

/****************************************************************************
*                                                                           *
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY     *
* KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE       *
* IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR     *
* PURPOSE.                                                                  *
*                                                                           *
* Copyright (C) 1993-95  Microsoft Corporation.  All Rights Reserved.       *
*                                                                           *
****************************************************************************/

/****************************************************************************\
*
* AEP (Asynchronous Event Packet) Data Structure
*
\****************************************************************************/

#define 	AEP_PrivateLen          32      /* Random Length Assignment         */

/* Definitions for AER Functions */

#define AEP_INITIALIZE				0	/* initialize driver/interface */
#define AEP_SYSTEM_CRIT_SHUTDOWN 1	/* indicates system critical shutdown */
#define AEP_BOOT_COMPLETE			2	/* booting done - switch to run time*/
#define AEP_CONFIG_DCB				3	/* configure device */
#define AEP_UNCONFIG_DCB 			4	/* unconfigure device */
#define AEP_IOP_TIMEOUT         	5	/* iop timeout occured */
#define AEP_DEVICE_INQUIRY      	6	/* get device indentification data  */
#define AEP_HALF_SEC				7	/* 1/2 second interval notification */
#define AEP_1_SEC					8	/* one second interval notification */
#define AEP_2_SECS					9	/* two second interval notification */
#define AEP_4_SECS					10	/* four second interval notification*/
#define AEP_DBG_DOT_CMD				11	/* parameters for '.I' debug command*/
#define AEP_ASSOCIATE_DCB			12	/* associate logical DCBs w/ physical */
#define AEP_REAL_MODE_HANDOFF		13	/* IFSMGR about to hook in */
#define AEP_SYSTEM_SHUTDOWN 		14	/* indicates system shutdown */
#define AEP_UNINITIALIZE			15	/* uninitialize driver/interface */
#define AEP_DCB_LOCK  				16	/* logical dcb is going to be locked */
#define AEP_MOUNT_NOTIFY			17	/* notify drivers of volume mount */
#define AEP_CREATE_VRP				18	/* notify drivers of VRP creation */
#define AEP_DESTROY_VRP				19	/* notify drivers of VRP destruction */
#define AEP_REFRESH_DRIVE			20	/* tell drivers to refresh drive data */
#define AEP_PEND_UNCONFIG_DCB		21	/* tell drivers that DCB removal is pending */
#define AEP_1E_VEC_UPDATE			22	/* notify int13 of a possible change in the */
							/* int 1eh vector for copy protection */
#define AEP_CHANGE_RPM			23	/* inform driver vsd to change the floppy spindle speed */

#define AEP_MAX_FUNC				23 /* maximum legal function */

typedef struct AEPHDR { /* */

	USHORT  	AEP_func;			/* Function Code                    */
	USHORT  	AEP_result;			/* result: zero = no error          */
	ULONG   	AEP_ddb;			/* driver data block Pointer        */
	UCHAR 	AEP_lgn;				/* curr. load group num. -- got from DVT */
	UCHAR		AEP_align[3];		/* preserve dword alignment */

} AEP, *PAEP;

/* generic AEP result codes follow */

#define AEP_SUCCESS           0  /* good status */
#define AEP_FAILURE          -1  /* bad status */

/*
**	AEP_INITIALIZE definition:
**
**	IOS makes this during the registration of a layer driver. In the case
** of a port driver registration IOS checks to see if the init was a success.
** If so IOS sends down an AEP_INQUIRE_DCB discussed below. If the 
** AEP_INQUIRE was successful IOS sends an AEP_CONFIG_DCB call to all the
** layer drivers. It then repeats the AEP_INQUIRE_DCB call. In the case of
** SCSI IOS makes as many inquiries as is specified in AEP_bi_i_max_target
** returned in the AEP_INITIALIZE call. Also in the case of SCSI the scan 
** order can be sepcified AEP_bi_flags. If AEP_BI_FL_SCSI_SCAN_DOWN is set 
** the scanning is done in the reverse order. 
**
** The driver can also set AEP_BI_FL_SEND_CONFIG_AGAIN in AEP_bi_flags. If 
** this is set IOS will redo the whole sequence of AEP_INITIALIZE, 
** AEP_INQUIRE and AEP_CONFIG again. This is typically not needed as IOS
** will call the port driver again if the port driver controls more than 
** controller. 
**
** Note that in the case of a non-scsi port diver IOS sends down as 
** AEP_INQUIRY until the driver says AEP_NO_MORE_DEVICES in the result 
** field.  If the result of the AEP_INQUIRY was AEP_NO_INQ_DATA then the
** next location is inquired and there is no config call sent out.
**
*/
typedef struct AEP_bi_init { /* */

	struct AEPHDR	AEP_bi_i_hdr;		/* Standard Header */
	ULONG		AEP_bi_reference_data; 	/* optional value passed in from drp */
	UCHAR		AEP_bi_flags;				/* flags defined below */
	CHAR		AEP_bi_i_max_target;		/* max scsi target id */
	CHAR		AEP_bi_i_max_lun;			/* max scsi lun */
	ULONG		AEP_bi_i_dcb;				/* init dcb for port drivers */
	PVOID		AEP_bi_i_hdevnode;  		/* handle to devnode for this adapter */
	PVOID		AEP_bi_i_regkey;    		/* registry key for this adapter */
	UCHAR		AEP_bi_i_align[1];		/* preserve dword alignment */

} AEP_bi_init, *PAEP_bi_init;

/*
** define flags for AEP_bi_flags
*/

#define AEP_BI_FL_SCSI_SCAN_DOWN 0x01    /* device requires reverse ID scanning */
#define AEP_BI_FL_SEND_CONFIG_AGAIN 0x02 /* device wants this config info again */


/*
**	AEP_DEVICE_INQUIRY definition:
**
** This call is of interest only to port drivers. The inquiry data is 
** filled into the DCB_product_ID, DCB_vendor_ID and DCB_REV_LEVEL fields.
** Refer to discussion of AEP_INITIALIZE above for more details. 
**
*/
typedef struct AEP_inquiry_device { /* */

	struct AEPHDR	AEP_i_d_hdr; 	/* Standard Header */
	ULONG		AEP_i_d_dcb;			/* dcb pointer	*/

} AEP_inquiry_device, *PAEP_inquiry_device;

/* AEP_i_d_status values */

#define AEP_NO_INQ_DATA      1  /* No inquiry data available                */
#define AEP_NO_MORE_DEVICES  2  /* no more devices of this type             */


/*
**	AEP_UNINITIALIZE definition:
**
** This is broadcast by IOS during the process of deallocating a DDB. Note 
** that as far as port drivers are concerned there is typically one DDB
** per controller. Port drivers use this AEP call to dealloc any 
** resources that they may have allocated to handle i/o to the controller
** represented by that DDB. For instance, IRQ and port trappings should be 
** be freed at this time.
**
** Note that the DDB is part of the standard AEP header.  
**
*/
typedef struct AEP_bi_uninit { /* */

	struct AEPHDR	AEP_bi_u_hdr; 	/* Standard Header */

} AEP_bi_uninit, *PAEP_bi_uninit;


/*
**	AEP_BOOT_COMPLETE definition:
**
** This call out is made by IOS at init_complete time and at the end of 
** loading, initing/registering a port driver. 
**
** If a driver chooses to be unloaded at this time it should return an error
** on this AEP. This will result in deregistration and unloading of the 
** driver.  No DDB pointer is passed on this call, so only one call will be 
** received. For instance a VSD can return failure if it has determined that
** it has not inserted itself in any one of the DCBs in the system.
**
*/
typedef struct AEP_boot_done { /* */

	struct AEPHDR	AEP_b_d_hdr; 	/* AEP_BOOT_COMPLETE */

} AEP_boot_done, *PAEP_boot_done;


/*
**	AEP_CONFIG_DCB definition:
**
** IOS circulates all the DCBs in the system, both physical and logical, to
** all the layer drivers via this call. This is made as and when each layer
** is initialized. Typicall a port driver init results in the creation of
** one or more physical DCBs. These are circulated through all the layers.
** Each layer driver can choose to insert itself in the call down list for
** this DCB if necessary. For instance a driver interested in seeing requests
** to a CDRON will insert itself in that DCB. The device types are defined 
** in dcb.h.
**
**	Also if a layer satisfies a specific demand that is stipulated in the DCB
** dmd flags it must turn off the demand bit, indicating to the layers above
** that the demand has been met.
**
*/
typedef struct AEP_dcb_config { /* */

	struct AEPHDR	AEP_d_c_hdr; 	/* Standard Header */
	ULONG		AEP_d_c_dcb;			/* 32-bit ptr to DCB */
				
} AEP_dcb_config, *PAEP_dcb_config;


/*
**	AEP_UNCONFIG_DCB definition:
**
** This notification is made by IOS when a DCB is being destroyed. A layer
** typically just makes a note of the fact that the DCB is going away. For
** instance the driver could dec a count of DCBs that it has inserted itself
** in if the DCB being UNCONFIG'd is one that is of interest to it. Then 
** in a subseuqent AEP_BOOT_COMPKETE call it could return an error if the 
** count is 0.
** 
*/
typedef struct AEP_dcb_unconfig { /* */

	struct AEPHDR	AEP_d_u_hdr; 	/* Standard Header */
	ULONG		AEP_d_u_dcb;			/* 32-bit offset of DCB */

} AEP_dcb_unconfig, *PAEP_dcb_unconfig;


/*
**	AEP_PEND_CONFIG_DCB definition:
**
** This is the first AEP call the IOS makes when a DCB is being destroyed.
** Layer drivers are expected to not initiate any further i/o to the device
** after this call is made. 
*/
typedef struct AEP_dcb_unconfig_pend { /* */

	struct AEPHDR	AEP_d_u_p_hdr;	/* AEP_PEND_UNCONFIG_DCB */
	ULONG		AEP_d_u_p_dcb;			/* 32-bit offset of DCB    */

} AEP_dcb_unconfig_pend, *PAEP_dcb_unconfig_pend;


/*
** AEP_IOP_TIMEOUT definition:
**
** Once an IOP is issued to IOS via IOS_SendCommand a 15 second timer is 
** started on the IOP. When this goes to zero all layer drivers are notified
** of this IOP via this AEP. Note that if the i/o is done and the IOP is
** released within 15 seconds this will not happen. 
**
*/
typedef struct AEP_iop_timeout_occurred { /* */

	struct AEPHDR	AEP_i_t_o_hdr;	/* Standard Header */
	ULONG		AEP_i_t_o_iop;			/* pointer to offending iop */
				
} AEP_iop_timeout_occurred, *PAEP_iop_timeout_occurred;


/*
**	AEP_DBG_DOT_CMD definition:
**
** The AEP_dot_command function provides a means for debug "dot" commands 
** entered by the user into the windows system debugger to be propogated to
** each layer.   So, a layer can easily implement support for a "dot" 
** command without having to directly interface with the debugger.
**
** Each layer will receive a call for each debug "dot" command that begins 
** with ".I" at their AEP handler, with the AEP packet as defined below:
**
** The AEP_d_c_pkeyword member provides a pointer to the subkeyword typed by 
** the user.   For example ".IXYZ" will result in the "XYZ" keyword being
** passed in.   The AEP_d_c_key_len member contains the length of this 
** keyword.
**
** The AEP_d_c_flags member contains flags which indicate which numeric 
** parameters are present.  For example, if the user typed ".IXYZ 1 46", 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -