summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/ng_cisco.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netgraph/ng_cisco.h')
-rw-r--r--sys/netgraph/ng_cisco.h39
1 files changed, 28 insertions, 11 deletions
diff --git a/sys/netgraph/ng_cisco.h b/sys/netgraph/ng_cisco.h
index 559cc14..a51dbfa 100644
--- a/sys/netgraph/ng_cisco.h
+++ b/sys/netgraph/ng_cisco.h
@@ -56,21 +56,38 @@
/* Netgraph commands */
enum {
- /* This takes two struct in_addr's: the IP address and netmask */
- NGM_CISCO_SET_IPADDR = 1,
-
- /* This is both received and *sent* by this node (to the "inet"
- peer). The reply contains the same info as NGM_CISCO_SET_IPADDR. */
- NGM_CISCO_GET_IPADDR,
+ NGM_CISCO_SET_IPADDR = 1, /* requires a struct ng_cisco_ipaddr */
+ NGM_CISCO_GET_IPADDR, /* returns a struct ng_cisco_ipaddr */
+ NGM_CISCO_GET_STATUS, /* returns a struct ng_cisco_stat */
+};
- /* This returns a struct ngciscostat (see below) */
- NGM_CISCO_GET_STATUS,
+struct ng_cisco_ipaddr {
+ struct in_addr ipaddr; /* IP address */
+ struct in_addr netmask; /* Netmask */
};
-struct ngciscostat {
- u_int32_t seq_retries; /* # unack'd retries */
- u_int32_t keepalive_period; /* in seconds */
+/* Keep this in sync with the above structure definition */
+#define NG_CISCO_IPADDR_TYPE_INFO { \
+ { \
+ { "ipaddr", &ng_parse_ipaddr_type }, \
+ { "netmask", &ng_parse_ipaddr_type }, \
+ { NULL }, \
+ } \
+}
+
+struct ng_cisco_stats {
+ u_int32_t seqRetries; /* # unack'd retries */
+ u_int32_t keepAlivePeriod; /* in seconds */
};
+/* Keep this in sync with the above structure definition */
+#define NG_CISCO_STATS_TYPE_INFO { \
+ { \
+ { "seqRetries", &ng_parse_int32_type }, \
+ { "keepAlivePeriod", &ng_parse_int32_type }, \
+ { NULL }, \
+ } \
+}
+
#endif /* _NETGRAPH_CISCO_H_ */
OpenPOWER on IntegriCloud