/usr/include/pcp/pmjson.h is in libpcp-web1-dev 4.0.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | /*
* Copyright (c) 2015-2017 Red Hat.
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
* Javascript Object Notation metric value extraction (libpcp_web)
*/
#ifndef PCP_PMJSON_H
#define PCP_PMJSON_H
#ifdef __cplusplus
extern "C" {
#endif
typedef enum json_flags {
pmjson_flag_bitfield = (1<<0),
pmjson_flag_boolean = (1<<1),
pmjson_flag_s32 = (1<<2),
pmjson_flag_u32 = (1<<3),
pmjson_flag_s64 = (1<<4),
pmjson_flag_u64 = (1<<5),
pmjson_flag_float = (1<<6),
pmjson_flag_double = (1<<7),
pmjson_flag_minimal = (1<<10),
pmjson_flag_pretty = (1<<11),
pmjson_flag_quiet = (1<<12),
pmjson_flag_yaml = (1<<13),
} json_flags;
typedef struct json_metric_desc {
char *json_pointer; /* json pointer to metric */
json_flags flags; /* flags to check if set */
int num_values; /* number of values */
pmAtomValue values; /* metric value */
char *dom; /* instance name */
} json_metric_desc;
typedef int (*json_get)(char *, int, void *);
extern int pmjsonGet(json_metric_desc *, int, pmInDom, json_get, void *);
extern int pmjsonInit(int, json_metric_desc *, int);
extern int pmjsonInitIndom(int, json_metric_desc *, int, pmInDom);
extern int pmjsonPrint(FILE *, json_flags, const char *, json_get, void *);
#ifdef __cplusplus
}
#endif
#endif /* PCP_PMJSON_H */
|