mirror of https://gerrit.osmocom.org/osmo-sysmon
27 lines
743 B
C
27 lines
743 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
/* a CTRL client config */
|
|
struct ctrl_cfg {
|
|
/* name of this CTRL client */
|
|
const char *name;
|
|
/* remote host/IP */
|
|
const char *remote_host;
|
|
/* remote CTRL port */
|
|
uint16_t remote_port;
|
|
};
|
|
|
|
struct simple_ctrl_handle;
|
|
|
|
struct simple_ctrl_handle *simple_ctrl_open(void *ctx, const char *host, uint16_t dport,
|
|
uint32_t tout_msec);
|
|
void simple_ctrl_close(struct simple_ctrl_handle *sch);
|
|
|
|
void simple_ctrl_set_timeout(struct simple_ctrl_handle *sch, uint32_t tout_msec);
|
|
struct msgb *simple_ctrl_receive(struct simple_ctrl_handle *sch);
|
|
|
|
char *simple_ctrl_get(struct simple_ctrl_handle *sch, const char *var);
|
|
int simple_ctrl_set(struct simple_ctrl_handle *sch, const char *var, const char *val);
|
|
|