osmo-sysmon/osysmon.h

43 lines
871 B
C
Raw Normal View History

2018-06-04 02:26:20 +00:00
#pragma once
#include <osmocom/core/select.h>
#include <osmocom/core/utils.h>
#include <osmocom/vty/command.h>
2018-06-04 02:26:20 +00:00
#include <stdbool.h>
#include <linux/if.h>
#include "value_node.h"
struct rtnl_client_state;
2018-06-04 02:26:20 +00:00
struct osysmon_state {
struct rtnl_client_state *rcs;
/* list of 'struct ctrl client' */
struct llist_head ctrl_clients;
/* list of 'struct netdev' */
struct llist_head netdevs;
2018-06-04 02:26:20 +00:00
};
extern struct osysmon_state *g_oss;
enum osysmon_vty_node {
CTRL_CLIENT_NODE = _LAST_OSMOVTY_NODE + 1,
CTRL_CLIENT_GETVAR_NODE,
NETDEV_NODE,
};
int osysmon_ctrl_go_parent(struct vty *vty);
int osysmon_ctrl_init();
int osysmon_ctrl_poll(struct value_node *parent);
int osysmon_rtnl_go_parent(struct vty *vty);
int osysmon_rtnl_init();
int osysmon_rtnl_poll(struct value_node *parent);
int osysmon_sysinfo_init();
int osysmon_sysinfo_poll(struct value_node *parent);