aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/gprs
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2013-10-08 12:04:44 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-10-08 14:50:46 +0200
commit84cdc70e0bbeddf33404df472f3c992f5446ff12 (patch)
treed206a43a000bf5ff4828a93d7464c40bf6f56e89 /include/osmocom/gprs
parentdcce196be96c842bde791f8838a07206fd9fdd24 (diff)
gb: Separate nsvc creation from NS message processing
This patch refactors gprs_ns_rcvmsg() by moving the parts relevant to the NS messages into the new functions gprs_ns_vc_create() (nsvc object creation) and gprs_ns_process_msg() (main NS automaton). These do not contain code that directly depends on the link layer (they call other functions that still do). This reduces the gprs_ns_rcvmsg() function to calling these two functions and optionally setting up the link layer specific fields of the nsvc. Sponsored-by: On-Waves ehf
Diffstat (limited to 'include/osmocom/gprs')
-rw-r--r--include/osmocom/gprs/gprs_ns.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/osmocom/gprs/gprs_ns.h b/include/osmocom/gprs/gprs_ns.h
index 8ca5a887..c709312a 100644
--- a/include/osmocom/gprs/gprs_ns.h
+++ b/include/osmocom/gprs/gprs_ns.h
@@ -49,6 +49,15 @@ enum gprs_ns_evt {
GPRS_NS_EVT_UNIT_DATA,
};
+/*! \brief Osmocom NS VC create status */
+enum gprs_ns_cs {
+ GPRS_NS_CS_CREATED, /*!< A NSVC object has been created */
+ GPRS_NS_CS_FOUND, /*!< A NSVC object has been found */
+ GPRS_NS_CS_REJECTED, /*!< Rejected and answered message */
+ GPRS_NS_CS_SKIPPED, /*!< Skipped message */
+ GPRS_NS_CS_ERROR, /*!< Failed to process message */
+};
+
struct gprs_nsvc;
/*! \brief Osmocom GPRS callback function type */
typedef int gprs_ns_cb_t(enum gprs_ns_evt event, struct gprs_nsvc *nsvc,