/* * MODULE: MPDEV_ROUTINES.H * * VERSION: X-21 * * Copyright 2002 Compaq Information Technologies Group, L.P. * * Compaq and the Compaq logo are trademarks of Compaq Information * Technologies Group, L.P. in the U.S. and/or other countries. * * Confidential computer software. Valid license from Compaq required for * possession, use or copying. Consistent with FAR 12.211 and 12.212, * Commercial Computer Software, Computer Software Documentation, and * Technical Data for Commercial Items are licensed to the U.S. Government * under vendor's standard commercial license. * *++ * * FACILITY: * * VMS Executive (LIB_H) * * ABSTRACT: * * This module contains the C function prototypes for the VMS system * routines that begin with the MPDEV$ that use a standard call interface. * * NOTE: * * The conventions used in these function prototypes are: * * 1. Case * This header file supports invoking the routines by either using all * lowercase or all uppercase names for the system routines. Either * naming convention works even in the presence of the /NAME=AS_IS * compiler switch. * * 2. Integer size * The generic "int" type is used where it doesn't matter whether the * integer is 32 or 64 bits wide. Thus "int" is the returned value of * most functions and is the type for most integers passed by value. * However, an unambiguous integer type, e.g. int32, is used for any * integer that is passed by reference. Also, int64 is used for any * integer that is expected to be 64 bits wide even if it is passed by * value. * * 3. Types * The function prototypes use the types defined in [SYSLIB]SYS$LIB_C.TLB. * The definitions of all types used are included below. * * 4. Parameter names * Parameter names are used in the prototypes. Although they are ignored * by the compiler they do provide useful documentation. For example: * * void ioc_std$reqcom (int iost1, int iost2, UCB *ucb); * * is used instead of the functionally equivalent: * * void ioc_std$reqcom (int, int, UCB *); * * 5. Parameters passed by reference * The parameter name includes the "_p" suffix if the parameter is passed * by reference unless the parameter type implies that it is always passed * by reference. For example, there is no "_p" suffix in: * * UCB *ucb; * int32 iosb[2]; * * since structures and arrays are always passed by reference. However: * * int32 *outlen_p; * UCB **new_ucb_p; * * include the suffix to denote that outlen_p is a pointer to a 32 bit * integer, and to denote that new_ucb_p is a pointer to a pointer to a * UCB structure. * * 6. Mixed pointer sizes within one argument * If a 64-bit pointer is being passed by reference, the reference to * the pointer should also be 64 bits wide to avoid confusion. * For example: * * PTE_PPQ va_pte_p; * VOID_PPQ start_va_p; * * should be used instead of: * * PTE_PQ *va_pte_p; * VOID_PQ *start_va_p; * * * AUTHOR: * * David E. Eiche * * CREATION DATE: 11-May-1998 * * MODIFICATION HISTORY: * * X-21 ABP Anu B. Pant 26-Sep-2002 * Change mpdev$driver_start prototype to return int. * * X-20 LSS0435 Leonard S. Szubowicz 16-May-2002 * Part of the fix for PTRs 75-66-975, 75-66-1089, and 75-66-1090. * Starting and ending path verification to "find an active path" * is now handled by new routines MPDEV$PV_START_FIND_ACTIVE and * MPDEV$PV_END_FIND_ACTIVE. * Also, take this opportunity to add MPDEV$LEAST_USED_LCL_PATH * which will be used to provide a bias for balancing path use. * * X-19 RAB016 Robert A. Brooks 10-Jan-2002 * Add MPDEV$CANCEL_POLLER_IRP * * X-18 Anne McElearney 15-Oct-2001 * Change references to routine MPDEV$IS_CURRENT_ONLINE to * MPDEV$IS_DEVICE_ONLINE. The routine name changed because * the behavior of the routine changed due to fixing * PTR 75-45-482. * * X-17 LSS0426 Leonard S. Szubowicz 15-Oct-2001 * Part of the fix for PTR 75-66-346: Add routine prototype for * MPDEV$INIT_CDRP_IN_IRP. * * X-16 LSS0414 Leonard S. Szubowicz 22-Feb-2001 * Fold X-12A3. * Incorporate comments from code review of X-12A2. * MPDEV$DISPOSE_IFNOT_FWDABLE replaces MPDEV$IS_IRP_FORWARDABLE. * * X-15 LSS0413 Leonard S. Szubowicz 23-Jan-2001 * Fold X-12A2. * Part of the fix for CLD 70-3-4160: Provide a method that * allows both Multipath and HSM to intercept the DDT$PS_CANCEL_2 * driver entry point in a compatible fashion. This is facilitated * by keeping all Multipath DDT intercepts in place once they are * established regardless of the current path. Also add prototypes * for routines mpdev$opcom_msg and mpdev$is_irp_forwardable. * * X-14 GP Genady Perchenko 21-Aug-2000 * Add definition for mpdev$get_alt_host_ucb and mpdev$get_mscp_ucb * * X-13 ABP Anu Pant 13-Mar-2000 * Add new routine mpdev$ms_notify and mpdev$ms_notify_kast. * * Add new parameter (pointer to MPDEV_ACB)to mpdev$manual_switch * to deliver completion AST for multipath system service. * * Change parameter of mpdev$manual_switch and mpdev$locate_target_ucb * to support 64-bits pointer for multipath system services. * * X-12 LSS0396 Leonard S. Szubowicz 28-Apr-1999 * Part of the fix for PTRs 75-3-4260 and 75-43-393. Add the * prototype for the mpdev$mntv_sssc routine used to invoke the * "mount verification shadow set state change" action routine on * a shadow set. * Part of the fix for PTR 75-43-571. Add prototypes for * mpdev$set_valid and mpdev$clear_valid that reflect UCB$V_VALID * bit changes to the primary path UCB on a multipath set. * * X-11 JMB055 James M. Blue 30-Sep-1998 * Modify mpdev$locate_target_ucb and mpdev$manual_switch to * add an ASCIZ string parameter to receive the final full * path description string. * * X-10 JMB048 James M. Blue 31-Jul-1998 * Add status return for MPDEV$SET_BITS routine. Needed for * attempt to disable the current path. * * X-9 GP Genady Perchenko 21-Jul-1998 * Add mpdev$map_status_shdset routine. * * X-8 JMB032 James M. Blue 17-Jul-1998 * Modify prototypes for MPDEV$ADD_POLLER_PATH to return an int. * * X-7 GP Genady Perchenko 15-Jul-1998 * Add support for mpdev$pv_start_manual. Moved mpdev$map_status * up to keep all routines in alphabetical order. Renamed * mpdev$find_online_path to mpdev$is_current_online. * * X-6 DEE0415 David E. Eiche 08-Jul-1998 * Add support for routines mpdev$locate_target_ucb, * mpdev$manual_switch, and mpdev$set_bits. * * X-5 GP Genady Perchenko 05-Jun-1998 * Make default size of the pointers 32-bit. * * X-4 GP Genady Perchenko 02-Jun-1998 * Add support for the new routines mpdev$driver_pending_io. * Renamed mpdev$is_pv_allowed to mpdev$map_status. * * X-3 DEE0406 David E. Eiche 28-May-1998 * Add support for the new routine mpdev$setup_intercept. * * X-2 DEE0402 David E. Eiche 16-May-1998 * Add prototype and define for mpdev$add_poller_path. * Also, reflect changes to calling sequences: * 1. Change mpdev$pv_do_io_to_path to mpdev$do_io_to_path; * 2. Add UCB pointer to calling sequence for mpdev$do_io_to_path; * 3. Remove UCB pointer from calling sequence for * mpdev$pv_convert_mvirp. * Fix call to driver cancel to include reason for cancel. * * X-1 DEE0401 David E. Eiche 13-May-1998 * Initial check-in. * *-- */ #ifndef __MPDEV_ROUTINES_LOADED #define __MPDEV_ROUTINES_LOADED 1 /* * Define all types that are used in the following function prototypes. */ #include #include #include #include #include #include #include #include /* * VMS system routine entry points are defined externally using uppercase names. * The following macros allow the usage of the lowercase versions of these * names even in the presence of the /NAME=AS_IS compiler switch. */ #define mpdev$add_mpdev_ddt MPDEV$ADD_MPDEV_DDT #define mpdev$add_path_to_set MPDEV$ADD_PATH_TO_SET #define mpdev$add_poller_path MPDEV$ADD_POLLER_PATH #define mpdev$cancel_poller_irp MPDEV$CANCEL_POLLER_IRP #define mpdev$clear_valid MPDEV$CLEAR_VALID #define mpdev$dispose_ifnot_fwdable MPDEV$DISPOSE_IFNOT_FWDABLE #define mpdev$do_io_to_path MPDEV$DO_IO_TO_PATH #define mpdev$driver_altstart MPDEV$DRIVER_ALTSTART #define mpdev$driver_cancel MPDEV$DRIVER_CANCEL #define mpdev$driver_fast_fdt MPDEV$DRIVER_FAST_FDT #define mpdev$driver_pending_io MPDEV$DRIVER_PENDING_IO #define mpdev$driver_start MPDEV$DRIVER_START #define mpdev$driver_startio_pvip MPDEV$DRIVER_STARTIO_PVIP #define mpdev$get_alt_host_ucb MPDEV$GET_ALT_HOST_UCB #define mpdev$get_mscp_ucb MPDEV$GET_MSCP_UCB #define mpdev$init_cdrp_in_irp MPDEV$INIT_CDRP_IN_IRP #define mpdev$is_device_online MPDEV$IS_DEVICE_ONLINE #define mpdev$is_path_selectable MPDEV$IS_PATH_SELECTABLE #define mpdev$least_used_lcl_path MPDEV$LEAST_USED_LCL_PATH #define mpdev$locate_target_ucb MPDEV$LOCATE_TARGET_UCB #define mpdev$manual_switch MPDEV$MANUAL_SWITCH #define mpdev$map_status MPDEV$MAP_STATUS #define mpdev$map_status_shdset MPDEV$MAP_STATUS_SHDSET #define mpdev$mntv_sssc MPDEV$MNTV_SSSC #define mpdev$ms_notify MPDEV$MS_NOTIFY #define mpdev$ms_notify_kast MPDEV$MS_NOTIFY_KAST #define mpdev$opcom_msg MPDEV$OPCOM_MSG #define mpdev$pv_convert_mvirp MPDEV$PV_CONVERT_MVIRP #define mpdev$pv_end MPDEV$PV_END #define mpdev$pv_end_find_active MPDEV$PV_END_FIND_ACTIVE #define mpdev$pv_end_shdset MPDEV$PV_END_SHDSET #define mpdev$pv_intercept_packack MPDEV$PV_INTERCEPT_PACKACK #define mpdev$pv_io_done MPDEV$PV_IO_DONE #define mpdev$pv_restore_mvirp MPDEV$PV_RESTORE_MVIRP #define mpdev$pv_set_state MPDEV$PV_SET_STATE #define mpdev$pv_start MPDEV$PV_START #define mpdev$pv_start_find_active MPDEV$PV_START_FIND_ACTIVE #define mpdev$pv_start_manual MPDEV$PV_START_MANUAL #define mpdev$pv_start_shdset MPDEV$PV_START_SHDSET #define mpdev$set_bits MPDEV$SET_BITS #define mpdev$set_valid MPDEV$SET_VALID #define mpdev$special1 MPDEV$SPECIAL1 #define mpdev$switch_path MPDEV$SWITCH_PATH /* * Function prototypes for system routines with the MPDEV$ prefix. */ #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __save /* Save the previously-defined required ptr size */ #pragma __required_pointer_size __short /* And set ptr size default to 32-bit pointers */ #endif int mpdev$add_mpdev_ddt( MPDEV *mpdev, UCB *primary_ucb, UCB *candidate_ucb ); int mpdev$add_path_to_set( UCB *primary_ucb, UCB *candidate_ucb ); int mpdev$add_poller_path( UCB *candidate_ucb ); void mpdev$cancel_poller_irp( UCB *ucb ); void mpdev$clear_valid( UCB *ucb ); int mpdev$dispose_ifnot_fwdable( IRP *irp, UCB *src_ucb, UCB *dst_ucb ); void mpdev$do_io_to_path( IRP *irp, UCB *ucb ); void mpdev$driver_altstart( IRP *irp, UCB *ucb ); int mpdev$driver_cancel( int chan, IRP *irp, PCB *pcb, UCB *ucb, int reason ); int mpdev$driver_fast_fdt( IRP *irp, PCB *pcb, UCB *ucb, CCB *ccb ); int mpdev$driver_pending_io( void *que_hdr, IRP *irp ); int mpdev$driver_start( IRP *irp, UCB *ucb ); int mpdev$driver_startio_pvip( IRP *irp, UCB *ucb ); UCB *mpdev$get_alt_host_ucb(UCB *ucb); UCB *mpdev$get_mscp_ucb(UCB *ucb); void mpdev$init_cdrp_in_irp( IRP *irp, UCB *ucb ); int mpdev$is_device_online( UCB *primary_ucb ); int mpdev$is_path_selectable( UCB *ucb ); UCB *mpdev$least_used_lcl_path( MPDEV *mpdev ); int mpdev$locate_target_ucb( UCB *primary_ucb, VOID_PQ target_id, CHAR_PQ target_string, UCB **target_ucb_p ); int mpdev$manual_switch( UCB *primary_ucb, VOID_PQ target_id, CHAR_PQ target_string, MPDEV_ACB * ); int mpdev$map_status( int io_status ); int mpdev$map_status_shdset( int io_status, UCB *shadow_ucb ); void mpdev$mntv_sssc( int io_status, IRP *vp_irp, UCB *shadow_ucb ); void mpdev$ms_notify(MPDEV_ACB *, MPDEV *, int); void mpdev$ms_notify_kast(PCB *, ACB64 *); void mpdev$opcom_msg( int opc_code, MPDEV *mpdev, UCB *old_ucb ); void mpdev$pv_convert_mvirp( IRP *irp, int func ); void mpdev$pv_end( UCB *primary_ucb ); void mpdev$pv_end_find_active( IRP *packack_irp, UCB *primary_ucb ); void mpdev$pv_end_shdset( UCB *shadow_ucb ); void mpdev$pv_intercept_packack( IRP *irp, UCB *ucb ); void mpdev$pv_io_done( IRP *irp ); void mpdev$pv_restore_mvirp( IRP *irp ); void mpdev$pv_set_state( UCB *ucb, int path_state ); void mpdev$pv_start( UCB *primary_ucb ); void mpdev$pv_start_find_active( IRP *packack_irp, UCB *primary_ucb ); void mpdev$pv_start_manual( UCB *primary_ucb, UCB *target_ucb); void mpdev$pv_start_shdset( UCB *shadow_ucb ); int mpdev$set_bits( UCB *ucb, unsigned int *bit_field, unsigned int bit_mask, unsigned int bit_value ); void mpdev$set_valid( UCB *ucb ); int mpdev$special1( UCB *ucb, int (*cancel_routine)(int chan, IRP *irp, PCB *pcb, UCB *ucb, int reason) ); void mpdev$switch_path( UCB *ucb ); #ifdef __INITIAL_POINTER_SIZE /* Defined whenever ptr size pragmas supported */ #pragma __required_pointer_size __restore /* Restore the previously-defined required ptr size */ #endif #endif /* __MPDEV_ROUTINES_LOADED */