aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2018-05-02 22:32:19 +0200
committerHarald Welte <laforge@gnumonks.org>2018-05-23 16:19:52 +0000
commitd4788cdf653bac49907eef7b1d2856bdd53fb0a5 (patch)
treeae86a73549bf1dcae402013e1774c664bc83bac8
parent1cec9c4c40873f83842a34a383eb92fb2764b8fe (diff)
gprs_gmm: make functions relating to GMM Attach Request public
GMM Attach Request will be handled in it's own file and will use those functions. Change-Id: Ic90d77f7b0bacd2a8e2e409e82d676772d352749
-rw-r--r--include/osmocom/sgsn/gprs_gmm.h8
-rw-r--r--src/gprs/gprs_gmm.c10
2 files changed, 13 insertions, 5 deletions
diff --git a/include/osmocom/sgsn/gprs_gmm.h b/include/osmocom/sgsn/gprs_gmm.h
index 6324c5da..b89eff56 100644
--- a/include/osmocom/sgsn/gprs_gmm.h
+++ b/include/osmocom/sgsn/gprs_gmm.h
@@ -11,6 +11,9 @@ int gsm48_tx_gsm_act_pdp_rej(struct sgsn_mm_ctx *mm, uint8_t tid,
uint8_t cause, uint8_t pco_len, uint8_t *pco_v);
int gsm48_tx_gsm_act_pdp_acc(struct sgsn_pdp_ctx *pdp);
int gsm48_tx_gsm_deact_pdp_acc(struct sgsn_pdp_ctx *pdp);
+int gsm48_tx_gmm_auth_ciph_req(struct sgsn_mm_ctx *mm,
+ const struct osmo_auth_vector *vec,
+ uint8_t key_seq, bool force_standby);
int gsm0408_gprs_rcvmsg_gb(struct msgb *msg, struct gprs_llc_llme *llme,
bool drop_cipherable);
@@ -32,4 +35,9 @@ time_t gprs_max_time_to_idle(void);
int iu_rab_act_ps(uint8_t rab_id, struct sgsn_pdp_ctx *pdp);
+int gsm48_tx_gmm_id_req(struct sgsn_mm_ctx *mm, uint8_t id_type);
+int gsm48_tx_gmm_att_rej(struct sgsn_mm_ctx *mm,
+ uint8_t gmm_cause);
+int gsm48_tx_gmm_att_ack(struct sgsn_mm_ctx *mm);
+
#endif /* _GPRS_GMM_H */
diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c
index 93d64a4b..df498c1a 100644
--- a/src/gprs/gprs_gmm.c
+++ b/src/gprs/gprs_gmm.c
@@ -424,7 +424,7 @@ static struct gsm48_qos default_qos = {
};
/* Chapter 9.4.2: Attach accept */
-static int gsm48_tx_gmm_att_ack(struct sgsn_mm_ctx *mm)
+int gsm48_tx_gmm_att_ack(struct sgsn_mm_ctx *mm)
{
struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 ATT ACK");
struct gsm48_hdr *gh;
@@ -503,7 +503,7 @@ static int gsm48_tx_gmm_att_rej_oldmsg(const struct msgb *old_msg,
gmm_copy_id(msg, old_msg);
return _tx_gmm_att_rej(msg, gmm_cause, NULL);
}
-static int gsm48_tx_gmm_att_rej(struct sgsn_mm_ctx *mm,
+int gsm48_tx_gmm_att_rej(struct sgsn_mm_ctx *mm,
uint8_t gmm_cause)
{
struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 ATT REJ");
@@ -547,7 +547,7 @@ static int gsm48_tx_gmm_det_ack_oldmsg(struct msgb *oldmsg, uint8_t force_stby)
}
/* Transmit Chapter 9.4.12 Identity Request */
-static int gsm48_tx_gmm_id_req(struct sgsn_mm_ctx *mm, uint8_t id_type)
+int gsm48_tx_gmm_id_req(struct sgsn_mm_ctx *mm, uint8_t id_type)
{
struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 ID REQ");
struct gsm48_hdr *gh;
@@ -577,7 +577,7 @@ static bool mmctx_is_r99(const struct sgsn_mm_ctx *mm)
}
/* 3GPP TS 24.008 Section 9.4.9: Authentication and Ciphering Request */
-static int gsm48_tx_gmm_auth_ciph_req(struct sgsn_mm_ctx *mm,
+int gsm48_tx_gmm_auth_ciph_req(struct sgsn_mm_ctx *mm,
const struct osmo_auth_vector *vec,
uint8_t key_seq, bool force_standby)
{
@@ -1533,7 +1533,7 @@ static int gsm48_tx_gmm_ra_upd_ack(struct sgsn_mm_ctx *mm)
}
/* Chapter 9.4.17: Routing area update reject */
-static int gsm48_tx_gmm_ra_upd_rej(struct msgb *old_msg, uint8_t cause)
+int gsm48_tx_gmm_ra_upd_rej(struct msgb *old_msg, uint8_t cause)
{
struct msgb *msg = gsm48_msgb_alloc_name("GSM 04.08 RA UPD REJ");
struct gsm48_hdr *gh;