📄 iucv.h
字号:
void (*MessagePending) (iucv_MessagePending * eib, void *pgm_data); void (*MessageComplete) (iucv_MessageComplete * eib, void *pgm_data);} iucv_interrupt_ops_t;/* *iucv_array_t : Defines buffer array. * Inside the array may be 31- bit addresses and 31-bit lengths. */typedef struct { u32 address; u32 length;} iucv_array_t __attribute__ ((aligned (8)));extern struct bus_type iucv_bus;extern struct device *iucv_root;/* -prototypes- *//* * Name: iucv_register_program * Purpose: Registers an application with IUCV * Input: prmname - user identification * userid - machine identification * pgmmask - indicates which bits in the prmname and userid combined will be * used to determine who is given control * ops - address of vector of interrupt handlers * pgm_data- application data passed to interrupt handlers * Output: NA * Return: address of handler * (0) - Error occurred, registration not completed. * NOTE: Exact cause of failure will be recorded in syslog. */iucv_handle_t iucv_register_program (uchar pgmname[16], uchar userid[8], uchar pgmmask[24], iucv_interrupt_ops_t * ops, void *pgm_data);/* * Name: iucv_unregister_program * Purpose: Unregister application with IUCV * Input: address of handler * Output: NA * Return: (0) - Normal return * (-EINVAL) - Internal error, wild pointer */int iucv_unregister_program (iucv_handle_t handle);/* * Name: iucv_accept * Purpose: This function is issued after the user receives a Connection Pending external * interrupt and now wishes to complete the IUCV communication path. * Input: pathid - u16 , Path identification number * msglim_reqstd - u16, The number of outstanding messages requested. * user_data - uchar[16], Data specified by the iucv_connect function. * flags1 - int, Contains options for this path. * -IPPRTY - 0x20- Specifies if you want to send priority message. * -IPRMDATA - 0x80, Specifies whether your program can handle a message * in the parameter list. * -IPQUSCE - 0x40, Specifies whether you want to quiesce the path being * established. * handle - iucv_handle_t, Address of handler. * pgm_data - void *, Application data passed to interrupt handlers. * flags1_out - int * Contains information about the path * - IPPRTY - 0x20, Indicates you may send priority messages. * msglim - *u16, Number of outstanding messages. * Output: return code from CP IUCV call.*/int iucv_accept (u16 pathid, u16 msglim_reqstd, uchar user_data[16], int flags1, iucv_handle_t handle, void *pgm_data, int *flags1_out, u16 * msglim);/* * Name: iucv_connect * Purpose: This function establishes an IUCV path. Although the connect may complete * successfully, you are not able to use the path until you receive an IUCV * Connection Complete external interrupt. * Input: pathid - u16 *, Path identification number * msglim_reqstd - u16, Number of outstanding messages requested * user_data - uchar[16], 16-byte user data * userid - uchar[8], User identification * system_name - uchar[8], 8-byte identifying the system name * flags1 - int, Contains options for this path. * -IPPRTY - 0x20, Specifies if you want to send priority message. * -IPRMDATA - 0x80, Specifies whether your program can handle a message * in the parameter list. * -IPQUSCE - 0x40, Specifies whether you want to quiesce the path being * established. * -IPLOCAL - 0X01, Allows an application to force the partner to be on * the local system. If local is specified then target class cannot be * specified. * flags1_out - int * Contains information about the path * - IPPRTY - 0x20, Indicates you may send priority messages. * msglim - * u16, Number of outstanding messages * handle - iucv_handle_t, Address of handler * pgm_data - void *, Application data passed to interrupt handlers * Output: return code from CP IUCV call * rc - return code from iucv_declare_buffer * -EINVAL - Invalid handle passed by application * -EINVAL - Pathid address is NULL * add_pathid_result - Return code from internal function add_pathid */int iucv_connect (u16 * pathid, u16 msglim_reqstd, uchar user_data[16], uchar userid[8], uchar system_name[8], int flags1, int *flags1_out, u16 * msglim, iucv_handle_t handle, void *pgm_data);/* * Name: iucv_purge * Purpose: This function cancels a message that you have sent. * Input: pathid - Path identification number. * msgid - Specifies the message ID of the message to be purged. * srccls - Specifies the source message class. * Output: audit - Contains information about asynchronous error * that may have affected the normal completion * of this message. * Return: Return code from CP IUCV call. */int iucv_purge (u16 pathid, u32 msgid, u32 srccls, __u32 *audit);/* * Name: iucv_query_maxconn * Purpose: This function determines the maximum number of communication paths you * may establish. * Return: maxconn - ulong, Maximum number of connection the virtual machine may * establish.*/ulong iucv_query_maxconn (void);/* * Name: iucv_query_bufsize * Purpose: This function determines how large an external interrupt * buffer IUCV requires to store information. * Return: bufsize - ulong, Size of external interrupt buffer. */ulong iucv_query_bufsize (void);/* * Name: iucv_quiesce * Purpose: This function temporarily suspends incoming messages on an * IUCV path. You can later reactivate the path by invoking * the iucv_resume function. * Input: pathid - Path identification number * user_data - 16-bytes of user data * Output: NA * Return: Return code from CP IUCV call. */int iucv_quiesce (u16 pathid, uchar user_data[16]);/* * Name: iucv_receive * Purpose: This function receives messages that are being sent to you * over established paths. Data will be returned in buffer for length of * buflen. * Input: * pathid - Path identification number. * buffer - Address of buffer to receive. * buflen - Length of buffer to receive. * msgid - Specifies the message ID. * trgcls - Specifies target class. * Output: * flags1_out: int *, Contains information about this path. * IPNORPY - 0x10 Specifies this is a one-way message and no reply is * expected. * IPPRTY - 0x20 Specifies if you want to send priority message. * IPRMDATA - 0x80 specifies the data is contained in the parameter list * residual_buffer - address of buffer updated by the number * of bytes you have received. * residual_length - * Contains one of the following values, if the receive buffer is: * The same length as the message, this field is zero. * Longer than the message, this field contains the number of * bytes remaining in the buffer. * Shorter than the message, this field contains the residual * count (that is, the number of bytes remaining in the * message that does not fit into the buffer. In this * case b2f0_result = 5. * Return: Return code from CP IUCV call. * (-EINVAL) - buffer address is pointing to NULL */int iucv_receive (u16 pathid, u32 msgid, u32 trgcls, void *buffer, ulong buflen, int *flags1_out, ulong * residual_buffer, ulong * residual_length); /* * Name: iucv_receive_array * Purpose: This function receives messages that are being sent to you * over established paths. Data will be returned in first buffer for * length of first buffer. * Input: pathid - Path identification number. * msgid - specifies the message ID. * trgcls - Specifies target class. * buffer - Address of array of buffers. * buflen - Total length of buffers. * Output: * flags1_out: int *, Contains information about this path. * IPNORPY - 0x10 Specifies this is a one-way message and no reply is * expected. * IPPRTY - 0x20 Specifies if you want to send priority message. * IPRMDATA - 0x80 specifies the data is contained in the parameter list * residual_buffer - address points to the current list entry IUCV * is working on. * residual_length - * Contains one of the following values, if the receive buffer is: * The same length as the message, this field is zero. * Longer than the message, this field contains the number of * bytes remaining in the buffer. * Shorter than the message, this field contains the residual * count (that is, the number of bytes remaining in the * message that does not fit into the buffer. In this * case b2f0_result = 5. * Return: Return code from CP IUCV call. * (-EINVAL) - Buffer address is NULL. */int iucv_receive_array (u16 pathid, u32 msgid, u32 trgcls, iucv_array_t * buffer, ulong buflen, int *flags1_out, ulong * residual_buffer, ulong * residual_length);/* * Name: iucv_reject * Purpose: The reject function refuses a specified message. Between the * time you are notified of a message and the time that you * complete the message, the message may be rejected. * Input: pathid - Path identification number. * msgid - Specifies the message ID. * trgcls - Specifies target class. * Output: NA * Return: Return code from CP IUCV call. */int iucv_reject (u16 pathid, u32 msgid, u32 trgcls);/* * Name: iucv_reply * Purpose: This function responds to the two-way messages that you * receive. You must identify completely the message to * which you wish to reply. ie, pathid, msgid, and trgcls. * Input: pathid - Path identification number. * msgid - Specifies the message ID. * trgcls - Specifies target class. * flags1 - Option for path. * IPPRTY- 0x20, Specifies if you want to send priority message. * buffer - Address of reply buffer. * buflen - Length of reply buffer. * Output: residual_buffer - Address of buffer updated by the number * of bytes you have moved. * residual_length - Contains one of the following values: * If the answer buffer is the same length as the reply, this field * contains zero. * If the answer buffer is longer than the reply, this field contains * the number of bytes remaining in the buffer. * If the answer buffer is shorter than the reply, this field contains * a residual count (that is, the number of bytes remianing in the * reply that does not fit into the buffer. In this * case b2f0_result = 5. * Return: Return code from CP IUCV call. * (-EINVAL) - Buffer address is NULL. */int iucv_reply (u16 pathid, u32 msgid, u32 trgcls, int flags1, void *buffer, ulong buflen, ulong * residual_buffer, ulong * residual_length);/* * Name: iucv_reply_array * Purpose: This function responds to the two-way messages that you * receive. You must identify completely the message to * which you wish to reply. ie, pathid, msgid, and trgcls.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -