summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/include/ntp_request.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ntp/include/ntp_request.h')
-rw-r--r--contrib/ntp/include/ntp_request.h44
1 files changed, 43 insertions, 1 deletions
diff --git a/contrib/ntp/include/ntp_request.h b/contrib/ntp/include/ntp_request.h
index 8166a4d..eb13fad 100644
--- a/contrib/ntp/include/ntp_request.h
+++ b/contrib/ntp/include/ntp_request.h
@@ -112,6 +112,15 @@
*/
/*
+ * union of raw addresses to save space
+ */
+union addrun
+{
+ struct in6_addr addr6;
+ struct in_addr addr;
+};
+
+/*
* A request packet. These are almost a fixed length.
*/
struct req_pkt {
@@ -275,6 +284,8 @@ struct resp_pkt {
#define REQ_SET_PRECISION 41 /* (not used) */
#define REQ_MON_GETLIST_1 42 /* return collected v1 monitor data */
#define REQ_HOSTNAME_ASSOCID 43 /* Here is a hostname + assoc_id */
+#define REQ_IF_STATS 44 /* get interface statistics */
+#define REQ_IF_RELOAD 45 /* reload interface list */
/* Determine size of pre-v6 version of structures */
#define v4sizeof(type) offsetof(type, v6_flag)
@@ -290,6 +301,7 @@ struct resp_pkt {
#define INFO_FLAG_AUTHENABLE 0x20
#define INFO_FLAG_SEL_CANDIDATE 0x40
#define INFO_FLAG_SHORTLIST 0x80
+#define INFO_FLAG_IBURST 0x100
/*
* Flags in the system information returns
@@ -517,7 +529,7 @@ struct info_mem_stats {
u_int32 findpeer_calls;
u_int32 allocations;
u_int32 demobilizations;
- u_char hashcount[HASH_SIZE];
+ u_char hashcount[NTP_HASH_SIZE];
};
@@ -872,6 +884,36 @@ struct info_kernel {
};
/*
+ * interface statistics
+ */
+struct info_if_stats {
+ union addrun unaddr; /* address */
+ union addrun unbcast; /* broadcast */
+ union addrun unmask; /* mask */
+ u_int32 v6_flag; /* is this v6 */
+ char name[32]; /* name of interface */
+ int32 flags; /* interface flags */
+ int32 last_ttl; /* last TTL specified */
+ int32 num_mcast; /* No. of IP addresses in multicast socket */
+ int32 received; /* number of incoming packets */
+ int32 sent; /* number of outgoing packets */
+ int32 notsent; /* number of send failures */
+ int32 uptime; /* number of seconds this interface was active */
+ u_int32 scopeid; /* Scope used for Multicasting */
+ u_int32 ifindex; /* interface index - from system */
+ u_int32 ifnum; /* sequential interface number */
+ u_int32 peercnt; /* number of peers referencinf this interface - informational only */
+ u_short family; /* Address family */
+ u_char ignore_packets; /* Specify whether the packet should be ignored */
+ u_char action; /* reason the item is listed */
+ int32 _filler0; /* pad to a 64 bit size boundary */
+};
+
+#define IFS_EXISTS 1 /* just exists */
+#define IFS_CREATED 2 /* was just created */
+#define IFS_DELETED 3 /* was just delete */
+
+/*
* Info returned with IP -> hostname lookup
*/
/* 144 might need to become 32, matching data[] member of req_pkt */
OpenPOWER on IntegriCloud