aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gprs_sndcp.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-06-30 17:21:19 +0200
committerHarald Welte <laforge@gnumonks.org>2010-07-01 10:57:44 +0200
commitf78a3b2a2251ad19d6f0c8953173bc07aebbf6e3 (patch)
tree5ce28baed97eff91cc6c73a1d15814ad0e550ea3 /openbsc/src/gprs/gprs_sndcp.h
parentcacbc73d5e93174b5084f174a324c35620e4d1c6 (diff)
[SGSN] Add VTY interface for SNDCP
Diffstat (limited to 'openbsc/src/gprs/gprs_sndcp.h')
-rw-r--r--openbsc/src/gprs/gprs_sndcp.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/openbsc/src/gprs/gprs_sndcp.h b/openbsc/src/gprs/gprs_sndcp.h
new file mode 100644
index 000000000..6c7c83465
--- /dev/null
+++ b/openbsc/src/gprs/gprs_sndcp.h
@@ -0,0 +1,51 @@
+#ifndef _INT_SNDCP_H
+#define _INT_SNDCP_H
+
+#include <stdint.h>
+#include <osmocore/linuxlist.h>
+
+/* A fragment queue header, maintaining list of fragments for one N-PDU */
+struct defrag_state {
+ /* PDU number for which the defragmentation state applies */
+ uint16_t npdu;
+ /* highest segment number we have received so far */
+ uint8_t highest_seg;
+ /* bitmask of the segments we already have */
+ uint32_t seg_have;
+ /* do we still expect more segments? */
+ unsigned int no_more;
+ /* total length of all segments together */
+ unsigned int tot_len;
+
+ /* linked list of defrag_queue_entry: one for each fragment */
+ struct llist_head frag_list;
+
+ struct timer_list timer;
+};
+
+/* See 6.7.1.2 Reassembly */
+enum sndcp_rx_state {
+ SNDCP_RX_S_FIRST,
+ SNDCP_RX_S_SUBSEQ,
+ SNDCP_RX_S_DISCARD,
+};
+
+struct gprs_sndcp_entity {
+ struct llist_head list;
+
+ /* reference to the LLC Entity below this SNDCP entity */
+ struct gprs_llc_lle *lle;
+ /* The NSAPI we shall use on top of LLC */
+ uint8_t nsapi;
+
+ /* NPDU number for the GTP->SNDCP side */
+ uint16_t tx_npdu_nr;
+ /* SNDCP eeceiver state */
+ enum sndcp_rx_state rx_state;
+ /* The defragmentation queue */
+ struct defrag_state defrag;
+};
+
+extern struct llist_head gprs_sndcp_entities;
+
+#endif /* INT_SNDCP_H */