2 * drivers/s390/net/iucv.h
6 * Copyright (C) 2000 IBM Corporation
7 * Author(s):Alan Altmark (Alan_Altmark@us.ibm.com)
8 * Xenia Tkatschow (xenia@us.ibm.com)
12 * To explore any of the IUCV functions, one must first register
13 * their program using iucv_register_program(). Once your program has
14 * successfully completed a register, it can exploit the other functions.
15 * For furthur reference on all IUCV functionality, refer to the
16 * CP Programming Services book, also available on the web
17 * thru www.ibm.com/s390/vm/pubs, manual # SC24-5760
19 * Definition of Return Codes
20 * -All positive return codes including zero are reflected back
21 * from CP except for iucv_register_program. The definition of each
22 * return code can be found in CP Programming Services book.
23 * Also available on the web thru www.ibm.com/s390/vm/pubs, manual # SC24-5760
25 * (-EINVAL) Invalid value
26 * (-ENOMEM) storage allocation failed
27 * pgmask defined in iucv_register_program will be set depending on input
32 #include <linux/types.h>
33 #include <asm/debug.h>
36 * Debug Facility stuff
38 #define IUCV_DBF_SETUP_NAME "iucv_setup"
39 #define IUCV_DBF_SETUP_LEN 32
40 #define IUCV_DBF_SETUP_INDEX 1
41 #define IUCV_DBF_SETUP_NR_AREAS 1
42 #define IUCV_DBF_SETUP_LEVEL 3
44 #define IUCV_DBF_DATA_NAME "iucv_data"
45 #define IUCV_DBF_DATA_LEN 128
46 #define IUCV_DBF_DATA_INDEX 1
47 #define IUCV_DBF_DATA_NR_AREAS 1
48 #define IUCV_DBF_DATA_LEVEL 2
50 #define IUCV_DBF_TRACE_NAME "iucv_trace"
51 #define IUCV_DBF_TRACE_LEN 16
52 #define IUCV_DBF_TRACE_INDEX 2
53 #define IUCV_DBF_TRACE_NR_AREAS 1
54 #define IUCV_DBF_TRACE_LEVEL 3
56 #define IUCV_DBF_TEXT(name,level,text) \
58 debug_text_event(iucv_dbf_##name,level,text); \
61 #define IUCV_DBF_HEX(name,level,addr,len) \
63 debug_event(iucv_dbf_##name,level,(void*)(addr),len); \
66 extern DEFINE_PER_CPU(char[256], iucv_dbf_txt_buf);
68 #define IUCV_DBF_TEXT_(name,level,text...) \
70 char* iucv_dbf_txt_buf = get_cpu_var(iucv_dbf_txt_buf); \
71 sprintf(iucv_dbf_txt_buf, text); \
72 debug_text_event(iucv_dbf_##name,level,iucv_dbf_txt_buf); \
73 put_cpu_var(iucv_dbf_txt_buf); \
76 #define IUCV_DBF_SPRINTF(name,level,text...) \
78 debug_sprintf_event(iucv_dbf_trace, level, ##text ); \
79 debug_sprintf_event(iucv_dbf_trace, level, text ); \
83 * some more debug stuff
85 #define IUCV_HEXDUMP16(importance,header,ptr) \
86 PRINT_##importance(header "%02x %02x %02x %02x %02x %02x %02x %02x " \
87 "%02x %02x %02x %02x %02x %02x %02x %02x\n", \
88 *(((char*)ptr)),*(((char*)ptr)+1),*(((char*)ptr)+2), \
89 *(((char*)ptr)+3),*(((char*)ptr)+4),*(((char*)ptr)+5), \
90 *(((char*)ptr)+6),*(((char*)ptr)+7),*(((char*)ptr)+8), \
91 *(((char*)ptr)+9),*(((char*)ptr)+10),*(((char*)ptr)+11), \
92 *(((char*)ptr)+12),*(((char*)ptr)+13), \
93 *(((char*)ptr)+14),*(((char*)ptr)+15)); \
94 PRINT_##importance(header "%02x %02x %02x %02x %02x %02x %02x %02x " \
95 "%02x %02x %02x %02x %02x %02x %02x %02x\n", \
96 *(((char*)ptr)+16),*(((char*)ptr)+17), \
97 *(((char*)ptr)+18),*(((char*)ptr)+19), \
98 *(((char*)ptr)+20),*(((char*)ptr)+21), \
99 *(((char*)ptr)+22),*(((char*)ptr)+23), \
100 *(((char*)ptr)+24),*(((char*)ptr)+25), \
101 *(((char*)ptr)+26),*(((char*)ptr)+27), \
102 *(((char*)ptr)+28),*(((char*)ptr)+29), \
103 *(((char*)ptr)+30),*(((char*)ptr)+31));
106 iucv_hex_dump(unsigned char *buf, size_t len)
110 for (i = 0; i < len; i++) {
113 printk("%02x ", *(buf + i));
121 #define uchar unsigned char
122 #define ushort unsigned short
123 #define ulong unsigned long
124 #define iucv_handle_t void *
127 * All flags are defined in the field IPFLAGS1 of each function
128 * and can be found in CP Programming Services.
129 * IPLOCAL - Indicates the connect can only be satisfied on the
131 * IPPRTY - Indicates a priority message
132 * IPQUSCE - Indicates you do not want to receive messages on a
133 * path until an iucv_resume is issued
134 * IPRMDATA - Indicates that the message is in the parameter list
139 #define IPRMDATA 0x80
142 * All flags are defined in the output field of IPFLAGS1 for each function
143 * and can be found in CP Programming Services.
144 * IPNORPY - Specifies this is a one-way message and no reply is expected.
145 * IPPRTY - Indicates a priority message is permitted. Defined in flags1.
149 #define Nonpriority_MessagePendingInterruptsFlag 0x80
150 #define Priority_MessagePendingInterruptsFlag 0x40
151 #define Nonpriority_MessageCompletionInterruptsFlag 0x20
152 #define Priority_MessageCompletionInterruptsFlag 0x10
153 #define IUCVControlInterruptsFlag 0x08
154 #define AllInterrupts 0xf8
156 * Mapping of external interrupt buffers should be used with the corresponding
158 * Names: iucv_ConnectionPending -> connection pending
159 * iucv_ConnectionComplete -> connection complete
160 * iucv_ConnectionSevered -> connection severed
161 * iucv_ConnectionQuiesced -> connection quiesced
162 * iucv_ConnectionResumed -> connection resumed
163 * iucv_MessagePending -> message pending
164 * iucv_MessageComplete -> message complete
177 } iucv_ConnectionPending;
190 } iucv_ConnectionComplete;
202 } iucv_ConnectionSevered;
214 } iucv_ConnectionQuiesced;
226 } iucv_ConnectionResumed;
243 } iucv_MessagePending;
258 } iucv_MessageComplete;
261 * iucv_interrupt_ops_t: Is a vector of functions that handle
264 * eib - is a pointer to a 40-byte area described
265 * with one of the structures above.
266 * pgm_data - this data is strictly for the
267 * interrupt handler that is passed by
268 * the application. This may be an address
272 void (*ConnectionPending) (iucv_ConnectionPending * eib,
274 void (*ConnectionComplete) (iucv_ConnectionComplete * eib,
276 void (*ConnectionSevered) (iucv_ConnectionSevered * eib,
278 void (*ConnectionQuiesced) (iucv_ConnectionQuiesced * eib,
280 void (*ConnectionResumed) (iucv_ConnectionResumed * eib,
282 void (*MessagePending) (iucv_MessagePending * eib, void *pgm_data);
283 void (*MessageComplete) (iucv_MessageComplete * eib, void *pgm_data);
284 } iucv_interrupt_ops_t;
287 *iucv_array_t : Defines buffer array.
288 * Inside the array may be 31- bit addresses and 31-bit lengths.
293 } iucv_array_t __attribute__ ((aligned (8)));
295 extern struct bus_type iucv_bus;
296 extern struct device *iucv_root;
300 * Name: iucv_register_program
301 * Purpose: Registers an application with IUCV
302 * Input: prmname - user identification
303 * userid - machine identification
304 * pgmmask - indicates which bits in the prmname and userid combined will be
305 * used to determine who is given control
306 * ops - address of vector of interrupt handlers
307 * pgm_data- application data passed to interrupt handlers
309 * Return: address of handler
310 * (0) - Error occurred, registration not completed.
311 * NOTE: Exact cause of failure will be recorded in syslog.
313 iucv_handle_t iucv_register_program (uchar pgmname[16],
316 iucv_interrupt_ops_t * ops,
320 * Name: iucv_unregister_program
321 * Purpose: Unregister application with IUCV
322 * Input: address of handler
324 * Return: (0) - Normal return
325 * (-EINVAL) - Internal error, wild pointer
327 int iucv_unregister_program (iucv_handle_t handle);
331 * Purpose: This function is issued after the user receives a Connection Pending external
332 * interrupt and now wishes to complete the IUCV communication path.
333 * Input: pathid - u16 , Path identification number
334 * msglim_reqstd - u16, The number of outstanding messages requested.
335 * user_data - uchar[16], Data specified by the iucv_connect function.
336 * flags1 - int, Contains options for this path.
337 * -IPPRTY - 0x20- Specifies if you want to send priority message.
338 * -IPRMDATA - 0x80, Specifies whether your program can handle a message
339 * in the parameter list.
340 * -IPQUSCE - 0x40, Specifies whether you want to quiesce the path being
342 * handle - iucv_handle_t, Address of handler.
343 * pgm_data - void *, Application data passed to interrupt handlers.
344 * flags1_out - int * Contains information about the path
345 * - IPPRTY - 0x20, Indicates you may send priority messages.
346 * msglim - *u16, Number of outstanding messages.
347 * Output: return code from CP IUCV call.
350 int iucv_accept (u16 pathid,
354 iucv_handle_t handle,
355 void *pgm_data, int *flags1_out, u16 * msglim);
359 * Purpose: This function establishes an IUCV path. Although the connect may complete
360 * successfully, you are not able to use the path until you receive an IUCV
361 * Connection Complete external interrupt.
362 * Input: pathid - u16 *, Path identification number
363 * msglim_reqstd - u16, Number of outstanding messages requested
364 * user_data - uchar[16], 16-byte user data
365 * userid - uchar[8], User identification
366 * system_name - uchar[8], 8-byte identifying the system name
367 * flags1 - int, Contains options for this path.
368 * -IPPRTY - 0x20, Specifies if you want to send priority message.
369 * -IPRMDATA - 0x80, Specifies whether your program can handle a message
370 * in the parameter list.
371 * -IPQUSCE - 0x40, Specifies whether you want to quiesce the path being
373 * -IPLOCAL - 0X01, Allows an application to force the partner to be on
374 * the local system. If local is specified then target class cannot be
376 * flags1_out - int * Contains information about the path
377 * - IPPRTY - 0x20, Indicates you may send priority messages.
378 * msglim - * u16, Number of outstanding messages
379 * handle - iucv_handle_t, Address of handler
380 * pgm_data - void *, Application data passed to interrupt handlers
381 * Output: return code from CP IUCV call
382 * rc - return code from iucv_declare_buffer
383 * -EINVAL - Invalid handle passed by application
384 * -EINVAL - Pathid address is NULL
385 * add_pathid_result - Return code from internal function add_pathid
388 iucv_connect (u16 * pathid,
392 uchar system_name[8],
395 u16 * msglim, iucv_handle_t handle, void *pgm_data);
399 * Purpose: This function cancels a message that you have sent.
400 * Input: pathid - Path identification number.
401 * msgid - Specifies the message ID of the message to be purged.
402 * srccls - Specifies the source message class.
403 * Output: audit - Contains information about asynchronous error
404 * that may have affected the normal completion
406 * Return: Return code from CP IUCV call.
408 int iucv_purge (u16 pathid, u32 msgid, u32 srccls, __u32 *audit);
410 * Name: iucv_query_maxconn
411 * Purpose: This function determines the maximum number of communication paths you
413 * Return: maxconn - ulong, Maximum number of connection the virtual machine may
416 ulong iucv_query_maxconn (void);
419 * Name: iucv_query_bufsize
420 * Purpose: This function determines how large an external interrupt
421 * buffer IUCV requires to store information.
422 * Return: bufsize - ulong, Size of external interrupt buffer.
424 ulong iucv_query_bufsize (void);
428 * Purpose: This function temporarily suspends incoming messages on an
429 * IUCV path. You can later reactivate the path by invoking
430 * the iucv_resume function.
431 * Input: pathid - Path identification number
432 * user_data - 16-bytes of user data
434 * Return: Return code from CP IUCV call.
436 int iucv_quiesce (u16 pathid, uchar user_data[16]);
440 * Purpose: This function receives messages that are being sent to you
441 * over established paths. Data will be returned in buffer for length of
444 * pathid - Path identification number.
445 * buffer - Address of buffer to receive.
446 * buflen - Length of buffer to receive.
447 * msgid - Specifies the message ID.
448 * trgcls - Specifies target class.
450 * flags1_out: int *, Contains information about this path.
451 * IPNORPY - 0x10 Specifies this is a one-way message and no reply is
453 * IPPRTY - 0x20 Specifies if you want to send priority message.
454 * IPRMDATA - 0x80 specifies the data is contained in the parameter list
455 * residual_buffer - address of buffer updated by the number
456 * of bytes you have received.
458 * Contains one of the following values, if the receive buffer is:
459 * The same length as the message, this field is zero.
460 * Longer than the message, this field contains the number of
461 * bytes remaining in the buffer.
462 * Shorter than the message, this field contains the residual
463 * count (that is, the number of bytes remaining in the
464 * message that does not fit into the buffer. In this
465 * case b2f0_result = 5.
466 * Return: Return code from CP IUCV call.
467 * (-EINVAL) - buffer address is pointing to NULL
469 int iucv_receive (u16 pathid,
475 ulong * residual_buffer, ulong * residual_length);
478 * Name: iucv_receive_array
479 * Purpose: This function receives messages that are being sent to you
480 * over established paths. Data will be returned in first buffer for
481 * length of first buffer.
482 * Input: pathid - Path identification number.
483 * msgid - specifies the message ID.
484 * trgcls - Specifies target class.
485 * buffer - Address of array of buffers.
486 * buflen - Total length of buffers.
488 * flags1_out: int *, Contains information about this path.
489 * IPNORPY - 0x10 Specifies this is a one-way message and no reply is
491 * IPPRTY - 0x20 Specifies if you want to send priority message.
492 * IPRMDATA - 0x80 specifies the data is contained in the parameter list
493 * residual_buffer - address points to the current list entry IUCV
496 * Contains one of the following values, if the receive buffer is:
497 * The same length as the message, this field is zero.
498 * Longer than the message, this field contains the number of
499 * bytes remaining in the buffer.
500 * Shorter than the message, this field contains the residual
501 * count (that is, the number of bytes remaining in the
502 * message that does not fit into the buffer. In this
503 * case b2f0_result = 5.
504 * Return: Return code from CP IUCV call.
505 * (-EINVAL) - Buffer address is NULL.
507 int iucv_receive_array (u16 pathid,
510 iucv_array_t * buffer,
513 ulong * residual_buffer, ulong * residual_length);
517 * Purpose: The reject function refuses a specified message. Between the
518 * time you are notified of a message and the time that you
519 * complete the message, the message may be rejected.
520 * Input: pathid - Path identification number.
521 * msgid - Specifies the message ID.
522 * trgcls - Specifies target class.
524 * Return: Return code from CP IUCV call.
526 int iucv_reject (u16 pathid, u32 msgid, u32 trgcls);
530 * Purpose: This function responds to the two-way messages that you
531 * receive. You must identify completely the message to
532 * which you wish to reply. ie, pathid, msgid, and trgcls.
533 * Input: pathid - Path identification number.
534 * msgid - Specifies the message ID.
535 * trgcls - Specifies target class.
536 * flags1 - Option for path.
537 * IPPRTY- 0x20, Specifies if you want to send priority message.
538 * buffer - Address of reply buffer.
539 * buflen - Length of reply buffer.
540 * Output: residual_buffer - Address of buffer updated by the number
541 * of bytes you have moved.
542 * residual_length - Contains one of the following values:
543 * If the answer buffer is the same length as the reply, this field
545 * If the answer buffer is longer than the reply, this field contains
546 * the number of bytes remaining in the buffer.
547 * If the answer buffer is shorter than the reply, this field contains
548 * a residual count (that is, the number of bytes remianing in the
549 * reply that does not fit into the buffer. In this
550 * case b2f0_result = 5.
551 * Return: Return code from CP IUCV call.
552 * (-EINVAL) - Buffer address is NULL.
554 int iucv_reply (u16 pathid,
558 void *buffer, ulong buflen, ulong * residual_buffer,
559 ulong * residual_length);
562 * Name: iucv_reply_array
563 * Purpose: This function responds to the two-way messages that you
564 * receive. You must identify completely the message to
565 * which you wish to reply. ie, pathid, msgid, and trgcls.
566 * The array identifies a list of addresses and lengths of
567 * discontiguous buffers that contains the reply data.
568 * Input: pathid - Path identification number
569 * msgid - Specifies the message ID.
570 * trgcls - Specifies target class.
571 * flags1 - Option for path.
572 * IPPRTY- 0x20, Specifies if you want to send priority message.
573 * buffer - Address of array of reply buffers.
574 * buflen - Total length of reply buffers.
575 * Output: residual_buffer - Address of buffer which IUCV is currently working on.
576 * residual_length - Contains one of the following values:
577 * If the answer buffer is the same length as the reply, this field
579 * If the answer buffer is longer than the reply, this field contains
580 * the number of bytes remaining in the buffer.
581 * If the answer buffer is shorter than the reply, this field contains
582 * a residual count (that is, the number of bytes remianing in the
583 * reply that does not fit into the buffer. In this
584 * case b2f0_result = 5.
585 * Return: Return code from CP IUCV call.
586 * (-EINVAL) - Buffer address is NULL.
588 int iucv_reply_array (u16 pathid,
592 iucv_array_t * buffer,
593 ulong buflen, ulong * residual_address,
594 ulong * residual_length);
597 * Name: iucv_reply_prmmsg
598 * Purpose: This function responds to the two-way messages that you
599 * receive. You must identify completely the message to
600 * which you wish to reply. ie, pathid, msgid, and trgcls.
601 * Prmmsg signifies the data is moved into the
603 * Input: pathid - Path identification number.
604 * msgid - Specifies the message ID.
605 * trgcls - Specifies target class.
606 * flags1 - Option for path.
607 * IPPRTY- 0x20 Specifies if you want to send priority message.
608 * prmmsg - 8-bytes of data to be placed into the parameter.
611 * Return: Return code from CP IUCV call.
613 int iucv_reply_prmmsg (u16 pathid,
614 u32 msgid, u32 trgcls, int flags1, uchar prmmsg[8]);
618 * Purpose: This function restores communications over a quiesced path
619 * Input: pathid - Path identification number.
620 * user_data - 16-bytes of user data.
622 * Return: Return code from CP IUCV call.
624 int iucv_resume (u16 pathid, uchar user_data[16]);
628 * Purpose: This function transmits data to another application.
629 * Data to be transmitted is in a buffer and this is a
630 * one-way message and the receiver will not reply to the
632 * Input: pathid - Path identification number.
633 * trgcls - Specifies target class.
634 * srccls - Specifies the source message class.
635 * msgtag - Specifies a tag to be associated with the message.
636 * flags1 - Option for path.
637 * IPPRTY- 0x20 Specifies if you want to send priority message.
638 * buffer - Address of send buffer.
639 * buflen - Length of send buffer.
640 * Output: msgid - Specifies the message ID.
641 * Return: Return code from CP IUCV call.
642 * (-EINVAL) - Buffer address is NULL.
644 int iucv_send (u16 pathid,
647 u32 srccls, u32 msgtag, int flags1, void *buffer, ulong buflen);
650 * Name: iucv_send_array
651 * Purpose: This function transmits data to another application.
652 * The contents of buffer is the address of the array of
653 * addresses and lengths of discontiguous buffers that hold
654 * the message text. This is a one-way message and the
655 * receiver will not reply to the message.
656 * Input: pathid - Path identification number.
657 * trgcls - Specifies target class.
658 * srccls - Specifies the source message class.
659 * msgtag - Specifies a tag to be associated witht the message.
660 * flags1 - Option for path.
661 * IPPRTY- specifies if you want to send priority message.
662 * buffer - Address of array of send buffers.
663 * buflen - Total length of send buffers.
664 * Output: msgid - Specifies the message ID.
665 * Return: Return code from CP IUCV call.
666 * (-EINVAL) - Buffer address is NULL.
668 int iucv_send_array (u16 pathid,
673 int flags1, iucv_array_t * buffer, ulong buflen);
676 * Name: iucv_send_prmmsg
677 * Purpose: This function transmits data to another application.
678 * Prmmsg specifies that the 8-bytes of data are to be moved
679 * into the parameter list. This is a one-way message and the
680 * receiver will not reply to the message.
681 * Input: pathid - Path identification number.
682 * trgcls - Specifies target class.
683 * srccls - Specifies the source message class.
684 * msgtag - Specifies a tag to be associated with the message.
685 * flags1 - Option for path.
686 * IPPRTY- 0x20 specifies if you want to send priority message.
687 * prmmsg - 8-bytes of data to be placed into parameter list.
688 * Output: msgid - Specifies the message ID.
689 * Return: Return code from CP IUCV call.
691 int iucv_send_prmmsg (u16 pathid,
694 u32 srccls, u32 msgtag, int flags1, uchar prmmsg[8]);
697 * Name: iucv_send2way
698 * Purpose: This function transmits data to another application.
699 * Data to be transmitted is in a buffer. The receiver
700 * of the send is expected to reply to the message and
701 * a buffer is provided into which IUCV moves the reply
703 * Input: pathid - Path identification number.
704 * trgcls - Specifies target class.
705 * srccls - Specifies the source message class.
706 * msgtag - Specifies a tag associated with the message.
707 * flags1 - Option for path.
708 * IPPRTY- 0x20 Specifies if you want to send priority message.
709 * buffer - Address of send buffer.
710 * buflen - Length of send buffer.
711 * ansbuf - Address of buffer into which IUCV moves the reply of
713 * anslen - Address of length of buffer.
714 * Output: msgid - Specifies the message ID.
715 * Return: Return code from CP IUCV call.
716 * (-EINVAL) - Buffer or ansbuf address is NULL.
718 int iucv_send2way (u16 pathid,
724 void *buffer, ulong buflen, void *ansbuf, ulong anslen);
727 * Name: iucv_send2way_array
728 * Purpose: This function transmits data to another application.
729 * The contents of buffer is the address of the array of
730 * addresses and lengths of discontiguous buffers that hold
731 * the message text. The receiver of the send is expected to
732 * reply to the message and a buffer is provided into which
733 * IUCV moves the reply to this message.
734 * Input: pathid - Path identification number.
735 * trgcls - Specifies target class.
736 * srccls - Specifies the source message class.
737 * msgtag - Specifies a tag to be associated with the message.
738 * flags1 - Option for path.
739 * IPPRTY- 0x20 Specifies if you want to send priority message.
740 * buffer - Sddress of array of send buffers.
741 * buflen - Total length of send buffers.
742 * ansbuf - Address of array of buffer into which IUCV moves the reply
744 * anslen - Address of length reply buffers.
745 * Output: msgid - Specifies the message ID.
746 * Return: Return code from CP IUCV call.
747 * (-EINVAL) - Buffer address is NULL.
749 int iucv_send2way_array (u16 pathid,
755 iucv_array_t * buffer,
756 ulong buflen, iucv_array_t * ansbuf, ulong anslen);
759 * Name: iucv_send2way_prmmsg
760 * Purpose: This function transmits data to another application.
761 * Prmmsg specifies that the 8-bytes of data are to be moved
762 * into the parameter list. This is a two-way message and the
763 * receiver of the message is expected to reply. A buffer
764 * is provided into which IUCV moves the reply to this
766 * Input: pathid - Rath identification number.
767 * trgcls - Specifies target class.
768 * srccls - Specifies the source message class.
769 * msgtag - Specifies a tag to be associated with the message.
770 * flags1 - Option for path.
771 * IPPRTY- 0x20 Specifies if you want to send priority message.
772 * prmmsg - 8-bytes of data to be placed in parameter list.
773 * ansbuf - Address of buffer into which IUCV moves the reply of
775 * anslen - Address of length of buffer.
776 * Output: msgid - Specifies the message ID.
777 * Return: Return code from CP IUCV call.
778 * (-EINVAL) - Buffer address is NULL.
780 int iucv_send2way_prmmsg (u16 pathid,
786 uchar prmmsg[8], void *ansbuf, ulong anslen);
789 * Name: iucv_send2way_prmmsg_array
790 * Purpose: This function transmits data to another application.
791 * Prmmsg specifies that the 8-bytes of data are to be moved
792 * into the parameter list. This is a two-way message and the
793 * receiver of the message is expected to reply. A buffer
794 * is provided into which IUCV moves the reply to this
795 * message. The contents of ansbuf is the address of the
796 * array of addresses and lengths of discontiguous buffers
797 * that contain the reply.
798 * Input: pathid - Path identification number.
799 * trgcls - Specifies target class.
800 * srccls - Specifies the source message class.
801 * msgtag - Specifies a tag to be associated with the message.
802 * flags1 - Option for path.
803 * IPPRTY- 0x20 specifies if you want to send priority message.
804 * prmmsg - 8-bytes of data to be placed into the parameter list.
805 * ansbuf - Address of array of buffer into which IUCV moves the reply
807 * anslen - Address of length of reply buffers.
808 * Output: msgid - Specifies the message ID.
809 * Return: Return code from CP IUCV call.
810 * (-EINVAL) - Ansbuf address is NULL.
812 int iucv_send2way_prmmsg_array (u16 pathid,
819 iucv_array_t * ansbuf, ulong anslen);
823 * Purpose: This function enables or disables the following IUCV
824 * external interruptions: Nonpriority and priority message
825 * interrupts, nonpriority and priority reply interrupts.
826 * Input: SetMaskFlag - options for interrupts
827 * 0x80 - Nonpriority_MessagePendingInterruptsFlag
828 * 0x40 - Priority_MessagePendingInterruptsFlag
829 * 0x20 - Nonpriority_MessageCompletionInterruptsFlag
830 * 0x10 - Priority_MessageCompletionInterruptsFlag
831 * 0x08 - IUCVControlInterruptsFlag
833 * Return: Return code from CP IUCV call.
835 int iucv_setmask (int SetMaskFlag);
839 * Purpose: This function terminates an IUCV path.
840 * Input: pathid - Path identification number.
841 * user_data - 16-bytes of user data.
843 * Return: Return code from CP IUCV call.
844 * (-EINVAL) - Interal error, wild pointer.
846 int iucv_sever (u16 pathid, uchar user_data[16]);