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