PERFORCE change 165119 for review
Gabor Pali
pgj at FreeBSD.org
Wed Jun 24 22:48:35 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=165119
Change 165119 by pgj at petymeg-current on 2009/06/24 22:48:27
Add an initial version of the data structures for the pcblist
sysctl-stream model
Affected files ...
.. //depot/projects/soc2009/pgj_libstat/src/sys/sys/unpcb.h#2 edit
Differences ...
==== //depot/projects/soc2009/pgj_libstat/src/sys/sys/unpcb.h#2 (text+ko) ====
@@ -145,4 +145,56 @@
};
#endif /* _SYS_SOCKETVAR_H_ */
+/*
+ * Statistics structures to be used by user space monitoring tools.
+ */
+
+#define UNPCB_STREAM_VERSION 0x00000001
+
+/*
+ * Stream structure:
+ * (unpcb_stream) (unpcb_gen) (unpcb_data [unpcb_address]) ... (unpcb_gen)
+ *
+ */
+
+struct unpcb_stream {
+ u_int32_t us_version; /* Stream format version. */
+ u_int32_t us_count; /* Number of records. */
+ u_int32_t _us_pad[2]; /* Padding. */
+};
+
+struct unpcb_gen {
+ u_int64_t ug_gen;
+ u_int64_t ug_sogen;
+ u_int64_t _ug_pad[6];
+};
+
+/* Exported data for user applications (not complete) */
+struct unpcb_data {
+ uint16_t ud_address_len; /* 0: no address associated. */
+ uint16_t ud_qlen;
+ uint16_t ud_incqlen;
+ uint16_t ud_qlimit;
+ u_int32_t ud_snd_cc;
+ u_int32_t ud_snd_mcnt;
+ u_int32_t ud_snd_ccnt;
+ u_int32_t ud_snd_hiwat;
+ u_int32_t ud_snd_lowat;
+ u_int32_t ud_snd_mbcnt;
+ u_int32_t ud_snd_mbmax;
+ u_int32_t ud_rcv_cc;
+ u_int32_t ud_rcv_mcnt;
+ u_int32_t ud_rcv_ccnt;
+ u_int32_t ud_rcv_hiwat;
+ u_int32_t ud_rcv_lowat;
+ u_int32_t ud_rcv_mbcnt;
+ u_int32_t ud_rcv_mbmax;
+ u_int64_t ud_pcb;
+ u_int64_t ud_vnode;
+ u_int64_t ud_conn;
+ u_int64_t ud_refs;
+ u_int64_t ud_reflink;
+ uint16_t _ud_pad[22];
+};
+
#endif /* _SYS_UNPCB_H_ */
More information about the p4-projects
mailing list