Harald Welte | 3e5ab69 | 2018-06-04 04:26:20 +0200 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | #include <stdint.h> |
| 4 | |
Max | 18428bb | 2018-12-14 15:49:08 +0100 | [diff] [blame] | 5 | /* a CTRL client config */ |
| 6 | struct ctrl_cfg { |
| 7 | /* name of this CTRL client */ |
| 8 | const char *name; |
| 9 | /* remote host/IP */ |
| 10 | const char *remote_host; |
| 11 | /* remote CTRL port */ |
| 12 | uint16_t remote_port; |
| 13 | }; |
| 14 | |
Harald Welte | 3e5ab69 | 2018-06-04 04:26:20 +0200 | [diff] [blame] | 15 | struct simple_ctrl_handle; |
| 16 | |
Harald Welte | 0e9d369 | 2018-06-04 11:52:39 +0200 | [diff] [blame] | 17 | struct simple_ctrl_handle *simple_ctrl_open(void *ctx, const char *host, uint16_t dport, |
| 18 | uint32_t tout_msec); |
Harald Welte | 3e5ab69 | 2018-06-04 04:26:20 +0200 | [diff] [blame] | 19 | void simple_ctrl_close(struct simple_ctrl_handle *sch); |
| 20 | |
Harald Welte | 7c94080 | 2018-06-04 12:04:38 +0200 | [diff] [blame] | 21 | void simple_ctrl_set_timeout(struct simple_ctrl_handle *sch, uint32_t tout_msec); |
| 22 | struct msgb *simple_ctrl_receive(struct simple_ctrl_handle *sch); |
| 23 | |
Harald Welte | 3e5ab69 | 2018-06-04 04:26:20 +0200 | [diff] [blame] | 24 | char *simple_ctrl_get(struct simple_ctrl_handle *sch, const char *var); |
| 25 | int simple_ctrl_set(struct simple_ctrl_handle *sch, const char *var, const char *val); |
| 26 | |