Header for RTNETLINK communication between kernel and user-space
for a qdisc emulating a UMTS RRC. Data structs, params and defaults.

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>

diff -r 953e210b191a include/linux/pkt_sched.h
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -465,5 +465,74 @@ struct tc_netem_corrupt
 };
 
 #define NETEM_DIST_SCALE	8192
+ 
+/* UMTS RRC emulator */
+
+enum {
+	TCA_RRC_UNSPEC,
+	TCA_RRC_DATA,
+	__TCA_RRC_MAX,
+};
+
+#define TCA_RRC_MAX (__TCA_RRC_MAX - 1)
+
+struct tc_rrc_qopt {
+	__u32	dch_tail;				/* length of dch tail in integral seconds */
+	__u32   fach_tail;				/* length of fach tail in integral seconds */
+	__u32	fach_dch_promo_mu;		/* average ms latency to upswitch from fach into dch */
+	__u32	fach_dch_promo_sigma;	/* +- ms latency to upswitch from fach into dch */
+	__u32   idle_promo_mu;			/* average ms latency to upswitch out of idle */
+	__u32   idle_promo_sigma;		/* +- ms latency to upswitch out of idle */
+	__u32   rlc_buf_threshold_ul;	/* RLC buffer threshold to leave fach for uplink */
+	__u32   rlc_buf_threshold_dl;	/* RLC buffer threholds to leave fach for downlink */
+	__u32	delay;					/* Wireless channel delay (average ms) */
+	__u32	jitter;					/* Wireless channel jitter (stdev ms) */
+	__u32	drop;					/* Wireless channel % drop packets */
+	__u32	dl_dch_rate;			/* Wireless channel downlink rate in bps */
+	__u32	ul_dch_rate;			/* Wireless channel uplink rate in bps */
+	__u32	flags;					/* See flag definitions below */
+	/* Second section is stats */
+	__u32   dch_pkts_ul;
+	__u32   dch_pkts_dl;
+	__u32   dch_bytes_ul;
+	__u32   dch_bytes_dl;
+	__u32   fach_pkts_ul;
+	__u32   fach_pkts_dl;
+	__u32   fach_bytes_ul;
+	__u32   fach_bytes_dl;
+	__u32	idle_upswitch;
+	__u32   dch_downswitch;
+	__u32   fach_upswitch;
+	__u32   fach_downswitch;
+	__u32   dch_ticks;
+	__u32   fach_ticks;
+	__u32   idle_trans_ticks;
+	__u32   fach_trans_ticks;
+	__u32   fd_calls;
+	__u32   fd_sleep_ticks;
+	__u32   fd_pkt_drops;
+	__u32	fd_byte_drops;
+};
+
+#define RRC_FLAG_IDLE_TO_DCH		1 /* upswitch from IDLE into DCH, otherwise IDLE->FACH */
+#define RRC_FLAG_IF_INVERT			2 /* If operating on a vif from a Xen dom0, ingress is 
+									   * actually egress, and viceversa */
+#define RRC_FLAG_FAST_DORMANCY		4 /* Trigger fast dormancy */
+
+#define DFLT_DCH_TAIL_S             5
+#define DFLT_FACH_TAIL_S            12
+#define DFLT_FACH_DCH_MU_MS         1500
+#define DFLT_FACH_DCH_SIGMA_MS      500
+#define DFLT_IDLE_PROMO_MU_MS       2000
+#define DFLT_IDLE_PROMO_SIGMA_MS    1000
+#define DFLT_RLC_BUF_THRESHOLD_UL   540
+#define DFLT_RLC_BUF_THRESHOLD_DL   475
+#define DFLT_IDLE_TO_DCH            1
+#define DFLT_IF_INVERT              1
+#define DFLT_DELAY_MS               30
+#define DFLT_JITTER_MS              10
+#define DFLT_DROP_PCT               8
+#define DFLT_DL_DCH_RATE_MBPS       7
+#define DFLT_UL_DCH_RATE_MBPS       1
 
 #endif
