aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/gprs_llc.h
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-05-18 12:20:12 +0200
committerHarald Welte <laforge@gnumonks.org>2010-05-18 12:22:12 +0200
commit2e918a87ebace1886ff29dc8ccbfe5aede695184 (patch)
tree91eaca71485de988a907d930b0464d0902f3d598 /openbsc/include/openbsc/gprs_llc.h
parent68b99a4a084eaf2e9a867e42853cea636691cca2 (diff)
[GPRS] LLC: Add VTY interface for LLC
Diffstat (limited to 'openbsc/include/openbsc/gprs_llc.h')
-rw-r--r--openbsc/include/openbsc/gprs_llc.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gprs_llc.h b/openbsc/include/openbsc/gprs_llc.h
index 608fb0578..21ebaa25d 100644
--- a/openbsc/include/openbsc/gprs_llc.h
+++ b/openbsc/include/openbsc/gprs_llc.h
@@ -59,10 +59,49 @@ enum gprs_llc_primitive {
LL_STATUS_IND, /* TLLI, Cause */
};
+/* Section 4.5.2 Logical Link States + Annex C.2 */
+enum gprs_llc_ll_state {
+ GPRS_LLS_UNASSIGNED = 1, /* No TLLI yet */
+ GPRS_LLS_ASSIGNED_ADM = 2, /* TLLI assigned */
+ GPRS_LLS_LOCAL_EST = 3, /* Local Establishment */
+ GPRS_LLS_REMOTE_EST = 4, /* Remote Establishment */
+ GPRS_LLS_ABM = 5,
+ GPRS_LLS_LOCAL_REL = 6, /* Local Release */
+ GPRS_LLS_TIMER_REC = 7, /* Timer Recovery */
+};
+
+/* Section 4.7.1: Logical Link Entity: One per DLCI (TLLI + SAPI) */
+struct gprs_llc_lle {
+ struct llist_head list;
+
+ struct timer_list t200;
+ struct timer_list t201; /* wait for acknowledgement */
+
+ enum gprs_llc_ll_state state;
+
+ uint32_t tlli;
+ uint32_t sapi;
+
+ uint8_t v_sent;
+ uint8_t v_ack;
+ uint8_t v_recv;
+
+ unsigned int n200;
+ unsigned int retrans_ctr;
+
+ /* over which BSSGP BTS ctx do we need to transmit */
+ uint16_t bvci;
+ uint16_t nsei;
+};
+
+extern struct llist_head gprs_llc_lles;
+
/* BSSGP-UL-UNITDATA.ind */
int gprs_llc_rcvmsg(struct msgb *msg, struct tlv_parsed *tv);
/* LL-UNITDATA.req */
int gprs_llc_tx_ui(struct msgb *msg, uint8_t sapi, int command);
+int gprs_llc_vty_init(void);
+
#endif