Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Definitions and interface for Linux - z/VM Monitor Stream.
0004  *
0005  * Copyright IBM Corp. 2003, 2008
0006  *
0007  * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
0008  */
0009 
0010 #define APPLDATA_MAX_REC_SIZE     4024  /* Maximum size of the */
0011                     /* data buffer */
0012 #define APPLDATA_MAX_PROCS 100
0013 
0014 #define APPLDATA_PROC_NAME_LENGTH 16    /* Max. length of /proc name */
0015 
0016 #define APPLDATA_RECORD_MEM_ID      0x01    /* IDs to identify the */
0017 #define APPLDATA_RECORD_OS_ID       0x02    /* individual records, */
0018 #define APPLDATA_RECORD_NET_SUM_ID  0x03    /* must be < 256 !     */
0019 #define APPLDATA_RECORD_PROC_ID     0x04
0020 
0021 #define CTL_APPLDATA_TIMER  2121    /* sysctl IDs, must be unique */
0022 #define CTL_APPLDATA_INTERVAL   2122
0023 #define CTL_APPLDATA_MEM    2123
0024 #define CTL_APPLDATA_OS     2124
0025 #define CTL_APPLDATA_NET_SUM    2125
0026 #define CTL_APPLDATA_PROC   2126
0027 
0028 struct appldata_ops {
0029     struct list_head list;
0030     struct ctl_table_header *sysctl_header;
0031     struct ctl_table *ctl_table;
0032     int    active;              /* monitoring status */
0033 
0034     /* fill in from here */
0035     char name[APPLDATA_PROC_NAME_LENGTH];   /* name of /proc fs node */
0036     unsigned char record_nr;        /* Record Nr. for Product ID */
0037     void (*callback)(void *data);       /* callback function */
0038     void *data;             /* record data */
0039     unsigned int size;          /* size of record */
0040     struct module *owner;           /* THIS_MODULE */
0041     char mod_lvl[2];            /* modification level, EBCDIC */
0042 };
0043 
0044 extern int appldata_register_ops(struct appldata_ops *ops);
0045 extern void appldata_unregister_ops(struct appldata_ops *ops);
0046 extern int appldata_diag(char record_nr, u16 function, unsigned long buffer,
0047              u16 length, char *mod_lvl);
0048