/*
* Please do not edit this file.
* It was generated using rpcgen.
*/
#ifndef _PROTOCOL_H_RPCGEN
#define _PROTOCOL_H_RPCGEN
#include <rpc/rpc.h>
#ifdef __cplusplus
extern "C" {
#endif
enum Ganglia_value_types {
GANGLIA_VALUE_UNKNOWN = 0,
GANGLIA_VALUE_STRING = 1,
GANGLIA_VALUE_UNSIGNED_SHORT = 2,
GANGLIA_VALUE_SHORT = 3,
GANGLIA_VALUE_UNSIGNED_INT = 4,
GANGLIA_VALUE_INT = 5,
GANGLIA_VALUE_FLOAT = 6,
GANGLIA_VALUE_DOUBLE = 7,
};
typedef enum Ganglia_value_types Ganglia_value_types;
struct Ganglia_gmetric_message {
char *type;
char *name;
char *value;
char *units;
u_int slope;
u_int tmax;
u_int dmax;
};
typedef struct Ganglia_gmetric_message Ganglia_gmetric_message;
struct Ganglia_spoof_header {
char *spoofName;
char *spoofIP;
};
typedef struct Ganglia_spoof_header Ganglia_spoof_header;
struct Ganglia_spoof_message {
struct Ganglia_spoof_header spheader;
struct Ganglia_gmetric_message gmetric;
};
typedef struct Ganglia_spoof_message Ganglia_spoof_message;
enum Ganglia_message_formats {
metric_user_defined = 0,
metric_cpu_num = 0 + 1,
metric_cpu_speed = 0 + 2,
metric_mem_total = 0 + 3,
metric_swap_total = 0 + 4,
metric_boottime = 0 + 5,
metric_sys_clock = 0 + 6,
metric_machine_type = 0 + 7,
metric_os_name = 0 + 8,
metric_os_release = 0 + 9,
metric_cpu_user = 0 + 10,
metric_cpu_nice = 0 + 11,
metric_cpu_system = 0 + 12,
metric_cpu_idle = 0 + 13,
metric_cpu_aidle = 0 + 14,
metric_load_one = 0 + 15,
metric_load_five = 0 + 16,
metric_load_fifteen = 0 + 17,
metric_proc_run = 0 + 18,
metric_proc_total = 0 + 19,
metric_mem_free = 0 + 20,
metric_mem_shared = 0 + 21,
metric_mem_buffers = 0 + 22,
metric_mem_cached = 0 + 23,
metric_swap_free = 0 + 24,
metric_gexec = 0 + 25,
metric_heartbeat = 0 + 26,
metric_mtu = 0 + 27,
metric_location = 0 + 28,
metric_bytes_out = 0 + 29,
metric_bytes_in = 0 + 30,
metric_pkts_in = 0 + 31,
metric_pkts_out = 0 + 32,
metric_disk_total = 0 + 33,
metric_disk_free = 0 + 34,
metric_part_max_used = 0 + 35,
metric_cpu_wio = 0 + 36,
metric_bread_sec = 0 + 37,
metric_bwrite_sec = 0 + 38,
metric_lread_sec = 0 + 39,
metric_lwrite_sec = 0 + 40,
metric_rcache = 0 + 41,
metric_wcache = 0 + 42,
metric_phread_sec = 0 + 43,
metric_phwrite_sec = 0 + 44,
metric_cpu_intr = 0 + 45,
metric_cpu_sintr = 0 + 46,
metric_mem_arm = 0 + 47,
metric_mem_rm = 0 + 48,
metric_mem_avm = 0 + 49,
metric_mem_vm = 0 + 50,
GANGLIA_NUM_25_METRICS = 0 + 51,
spoof_metric = 4096,
spoof_heartbeat = 4097,
};
typedef enum Ganglia_message_formats Ganglia_message_formats;
struct Ganglia_message {
Ganglia_message_formats id;
union {
Ganglia_gmetric_message gmetric;
Ganglia_spoof_message spmetric;
Ganglia_spoof_header spheader;
u_short u_short;
u_int u_int;
char *str;
float f;
double d;
} Ganglia_message_u;
};
typedef struct Ganglia_message Ganglia_message;
struct Ganglia_25metric {
int key;
char *name;
int tmax;
Ganglia_value_types type;
char *units;
char *slope;
char *fmt;
int msg_size;
};
typedef struct Ganglia_25metric Ganglia_25metric;
#define GANGLIA_MAX_MESSAGE_LEN (1500 - 28 - 8)
Ganglia_25metric *Ganglia_25metric_bykey( int key );
Ganglia_25metric *Ganglia_25metric_byname( char *name );
/* the xdr functions */
#if defined(__STDC__) || defined(__cplusplus)
extern bool_t xdr_Ganglia_value_types (XDR *, Ganglia_value_types*);
extern bool_t xdr_Ganglia_gmetric_message (XDR *, Ganglia_gmetric_message*);
extern bool_t xdr_Ganglia_spoof_header (XDR *, Ganglia_spoof_header*);
extern bool_t xdr_Ganglia_spoof_message (XDR *, Ganglia_spoof_message*);
extern bool_t xdr_Ganglia_message_formats (XDR *, Ganglia_message_formats*);
extern bool_t xdr_Ganglia_message (XDR *, Ganglia_message*);
extern bool_t xdr_Ganglia_25metric (XDR *, Ganglia_25metric*);
#else /* K&R C */
extern bool_t xdr_Ganglia_value_types ();
extern bool_t xdr_Ganglia_gmetric_message ();
extern bool_t xdr_Ganglia_spoof_header ();
extern bool_t xdr_Ganglia_spoof_message ();
extern bool_t xdr_Ganglia_message_formats ();
extern bool_t xdr_Ganglia_message ();
extern bool_t xdr_Ganglia_25metric ();
#endif /* K&R C */
#ifdef __cplusplus
}
#endif
#endif /* !_PROTOCOL_H_RPCGEN */
syntax highlighted by Code2HTML, v. 0.9.1