2 * drivers/s390/char/sclp_rw.h
3 * interface to the SCLP-read/write driver
6 * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
7 * Author(s): Martin Peschke <mpeschke@de.ibm.com>
8 * Martin Schwidefsky <schwidefsky@de.ibm.com>
14 #include <linux/list.h>
22 } __attribute__((packed));
33 u16 general_msg_flags;
35 u8 originating_system_name[8];
37 } __attribute__((packed));
44 } __attribute__((packed));
47 struct mdb_header header;
49 } __attribute__((packed));
52 struct evbuf_header header;
54 } __attribute__((packed));
57 struct sccb_header header;
58 struct msg_buf msg_buf;
59 } __attribute__((packed));
61 /* The number of empty mto buffers that can be contained in a single sccb. */
62 #define NR_EMPTY_MTO_PER_SCCB ((PAGE_SIZE - sizeof(struct sclp_buffer) - \
63 sizeof(struct write_sccb)) / sizeof(struct mto))
66 * data structure for information about list of SCCBs (only for writing),
67 * will be located at the end of a SCCBs page
70 struct list_head list; /* list_head for sccb_info chain */
71 struct sclp_req request;
72 struct write_sccb *sccb;
76 /* output format settings */
77 unsigned short columns;
79 /* statistics about this buffer */
80 unsigned int mto_char_sum; /* # chars in sccb */
81 unsigned int mto_number; /* # mtos in sccb */
82 /* Callback that is called after reaching final status. */
83 void (*callback)(struct sclp_buffer *, int);
86 int sclp_rw_init(void);
87 struct sclp_buffer *sclp_make_buffer(void *, unsigned short, unsigned short);
88 void *sclp_unmake_buffer(struct sclp_buffer *);
89 int sclp_buffer_space(struct sclp_buffer *);
90 int sclp_write(struct sclp_buffer *buffer, const unsigned char *, int);
91 int sclp_emit_buffer(struct sclp_buffer *,void (*)(struct sclp_buffer *,int));
92 void sclp_set_columns(struct sclp_buffer *, unsigned short);
93 void sclp_set_htab(struct sclp_buffer *, unsigned short);
94 int sclp_chars_in_buffer(struct sclp_buffer *);
96 #endif /* __SCLP_RW_H__ */