libgb: make sure all BSSGP functions have bssgp_ prefix

We change the minority of functions employing the gprs_bssgp_ prefix to
match with the majority without gprs_ in front.
This commit is contained in:
Harald Welte 2012-06-17 13:04:02 +08:00
parent 11461a6457
commit ce95b27b68
9 changed files with 34 additions and 35 deletions

View File

@ -236,7 +236,7 @@ enum bssgp_ctr {
#include <osmocom/gprs/gprs_msgb.h> #include <osmocom/gprs/gprs_msgb.h>
/* BSSGP-UL-UNITDATA.ind */ /* BSSGP-UL-UNITDATA.ind */
int gprs_bssgp_rcvmsg(struct msgb *msg); int bssgp_rcvmsg(struct msgb *msg);
/* BSSGP-DL-UNITDATA.req */ /* BSSGP-DL-UNITDATA.req */
struct bssgp_lv { struct bssgp_lv {
@ -252,8 +252,8 @@ struct bssgp_dl_ud_par {
struct bssgp_lv ms_ra_cap; struct bssgp_lv ms_ra_cap;
uint8_t qos_profile[3]; uint8_t qos_profile[3];
}; };
int gprs_bssgp_tx_dl_ud(struct msgb *msg, uint16_t pdu_lifetime, int bssgp_tx_dl_ud(struct msgb *msg, uint16_t pdu_lifetime,
struct bssgp_dl_ud_par *dup); struct bssgp_dl_ud_par *dup);
uint16_t bssgp_parse_cell_id(struct gprs_ra_id *raid, const uint8_t *buf); uint16_t bssgp_parse_cell_id(struct gprs_ra_id *raid, const uint8_t *buf);
int bssgp_create_cell_id(uint8_t *buf, const struct gprs_ra_id *raid, int bssgp_create_cell_id(uint8_t *buf, const struct gprs_ra_id *raid,
@ -292,12 +292,12 @@ struct bssgp_paging_info {
}; };
/* Send a single GMM-PAGING.req to a given NSEI/NS-BVCI */ /* Send a single GMM-PAGING.req to a given NSEI/NS-BVCI */
int gprs_bssgp_tx_paging(uint16_t nsei, uint16_t ns_bvci, int bssgp_tx_paging(uint16_t nsei, uint16_t ns_bvci,
struct bssgp_paging_info *pinfo); struct bssgp_paging_info *pinfo);
/* gprs_bssgp_vty.c */ /* gprs_bssgp_vty.c */
int gprs_bssgp_vty_init(void); int bssgp_vty_init(void);
void gprs_bssgp_set_log_ss(int ss); void bssgp_set_log_ss(int ss);
int bssgp_prim_cb(struct osmo_prim_hdr *oph, void *ctx); int bssgp_prim_cb(struct osmo_prim_hdr *oph, void *ctx);

View File

@ -262,7 +262,7 @@ int main(int argc, char **argv)
gbcfg.nsi = bssgp_nsi; gbcfg.nsi = bssgp_nsi;
gprs_ns_vty_init(bssgp_nsi); gprs_ns_vty_init(bssgp_nsi);
gprs_ns_set_log_ss(DNS); gprs_ns_set_log_ss(DNS);
gprs_bssgp_set_log_ss(DBSSGP); bssgp_set_log_ss(DBSSGP);
osmo_signal_register_handler(SS_L_NS, &gbprox_signal, NULL); osmo_signal_register_handler(SS_L_NS, &gbprox_signal, NULL);
rc = gbproxy_parse_config(config_file, &gbcfg); rc = gbproxy_parse_config(config_file, &gbcfg);

View File

@ -51,7 +51,7 @@ static int _bssgp_tx_dl_ud(struct msgb *msg, struct sgsn_mm_ctx *mmctx)
memcpy(&dup.qos_profile, qos_profile_default, memcpy(&dup.qos_profile, qos_profile_default,
sizeof(qos_profile_default)); sizeof(qos_profile_default));
return gprs_bssgp_tx_dl_ud(msg, 1000, &dup); return bssgp_tx_dl_ud(msg, 1000, &dup);
} }

View File

@ -446,7 +446,7 @@ static int cb_data_ind(struct pdp_t *lib, void *packet, unsigned int len)
pinfo.ptmsi = &mm->p_tmsi; pinfo.ptmsi = &mm->p_tmsi;
pinfo.drx_params = mm->drx_parms; pinfo.drx_params = mm->drx_parms;
pinfo.qos[0] = 0; // FIXME pinfo.qos[0] = 0; // FIXME
rc = gprs_bssgp_tx_paging(mm->nsei, 0, &pinfo); rc = bssgp_tx_paging(mm->nsei, 0, &pinfo);
rate_ctr_inc(&mm->ctrg->ctr[GMM_CTR_PAGING_PS]); rate_ctr_inc(&mm->ctrg->ctr[GMM_CTR_PAGING_PS]);
/* FIXME: queue the packet we received from GTP */ /* FIXME: queue the packet we received from GTP */
break; break;

View File

@ -88,7 +88,7 @@ static int sgsn_ns_cb(enum gprs_ns_evt event, struct gprs_nsvc *nsvc,
switch (event) { switch (event) {
case GPRS_NS_EVT_UNIT_DATA: case GPRS_NS_EVT_UNIT_DATA:
/* hand the message into the BSSGP implementation */ /* hand the message into the BSSGP implementation */
rc = gprs_bssgp_rcvmsg(msg); rc = bssgp_rcvmsg(msg);
break; break;
default: default:
LOGP(DGPRS, LOGL_ERROR, "SGSN: Unknown event %u from NS\n", event); LOGP(DGPRS, LOGL_ERROR, "SGSN: Unknown event %u from NS\n", event);
@ -320,7 +320,7 @@ int main(int argc, char **argv)
exit(1); exit(1);
gprs_ns_set_log_ss(DNS); gprs_ns_set_log_ss(DNS);
gprs_bssgp_set_log_ss(DBSSGP); bssgp_set_log_ss(DBSSGP);
sgsn_nsi = gprs_ns_instantiate(&sgsn_ns_cb, tall_bsc_ctx); sgsn_nsi = gprs_ns_instantiate(&sgsn_ns_cb, tall_bsc_ctx);
if (!sgsn_nsi) { if (!sgsn_nsi) {
@ -332,7 +332,7 @@ int main(int argc, char **argv)
gprs_llc_init("/usr/local/lib/osmocom/crypt/"); gprs_llc_init("/usr/local/lib/osmocom/crypt/");
gprs_ns_vty_init(bssgp_nsi); gprs_ns_vty_init(bssgp_nsi);
gprs_bssgp_vty_init(); bssgp_vty_init();
gprs_llc_vty_init(); gprs_llc_vty_init();
gprs_sndcp_vty_init(); gprs_sndcp_vty_init();
/* FIXME: register signal handler for SS_L_NS */ /* FIXME: register signal handler for SS_L_NS */

View File

@ -540,8 +540,8 @@ static int bssgp_rx_fc_bvc(struct msgb *msg, struct tlv_parsed *tp,
} }
/* Receive a BSSGP PDU from a BSS on a PTP BVCI */ /* Receive a BSSGP PDU from a BSS on a PTP BVCI */
static int gprs_bssgp_rx_ptp(struct msgb *msg, struct tlv_parsed *tp, static int bssgp_rx_ptp(struct msgb *msg, struct tlv_parsed *tp,
struct bssgp_bvc_ctx *bctx) struct bssgp_bvc_ctx *bctx)
{ {
struct bssgp_normal_hdr *bgph = struct bssgp_normal_hdr *bgph =
(struct bssgp_normal_hdr *) msgb_bssgph(msg); (struct bssgp_normal_hdr *) msgb_bssgph(msg);
@ -619,8 +619,8 @@ static int gprs_bssgp_rx_ptp(struct msgb *msg, struct tlv_parsed *tp,
} }
/* Receive a BSSGP PDU from a BSS on a SIGNALLING BVCI */ /* Receive a BSSGP PDU from a BSS on a SIGNALLING BVCI */
static int gprs_bssgp_rx_sign(struct msgb *msg, struct tlv_parsed *tp, static int bssgp_rx_sign(struct msgb *msg, struct tlv_parsed *tp,
struct bssgp_bvc_ctx *bctx) struct bssgp_bvc_ctx *bctx)
{ {
struct bssgp_normal_hdr *bgph = struct bssgp_normal_hdr *bgph =
(struct bssgp_normal_hdr *) msgb_bssgph(msg); (struct bssgp_normal_hdr *) msgb_bssgph(msg);
@ -710,7 +710,7 @@ err_mand_ie:
} }
/* We expect msgb_bssgph() to point to the BSSGP header */ /* We expect msgb_bssgph() to point to the BSSGP header */
int gprs_bssgp_rcvmsg(struct msgb *msg) int bssgp_rcvmsg(struct msgb *msg)
{ {
struct bssgp_normal_hdr *bgph = struct bssgp_normal_hdr *bgph =
(struct bssgp_normal_hdr *) msgb_bssgph(msg); (struct bssgp_normal_hdr *) msgb_bssgph(msg);
@ -752,17 +752,17 @@ int gprs_bssgp_rcvmsg(struct msgb *msg)
} }
if (ns_bvci == BVCI_SIGNALLING) if (ns_bvci == BVCI_SIGNALLING)
rc = gprs_bssgp_rx_sign(msg, &tp, bctx); rc = bssgp_rx_sign(msg, &tp, bctx);
else if (ns_bvci == BVCI_PTM) else if (ns_bvci == BVCI_PTM)
rc = bssgp_tx_status(BSSGP_CAUSE_PDU_INCOMP_FEAT, NULL, msg); rc = bssgp_tx_status(BSSGP_CAUSE_PDU_INCOMP_FEAT, NULL, msg);
else else
rc = gprs_bssgp_rx_ptp(msg, &tp, bctx); rc = bssgp_rx_ptp(msg, &tp, bctx);
return rc; return rc;
} }
int gprs_bssgp_tx_dl_ud(struct msgb *msg, uint16_t pdu_lifetime, int bssgp_tx_dl_ud(struct msgb *msg, uint16_t pdu_lifetime,
struct bssgp_dl_ud_par *dup) struct bssgp_dl_ud_par *dup)
{ {
struct bssgp_bvc_ctx *bctx; struct bssgp_bvc_ctx *bctx;
struct bssgp_ud_hdr *budh; struct bssgp_ud_hdr *budh;
@ -851,8 +851,8 @@ int gprs_bssgp_tx_dl_ud(struct msgb *msg, uint16_t pdu_lifetime,
} }
/* Send a single GMM-PAGING.req to a given NSEI/NS-BVCI */ /* Send a single GMM-PAGING.req to a given NSEI/NS-BVCI */
int gprs_bssgp_tx_paging(uint16_t nsei, uint16_t ns_bvci, int bssgp_tx_paging(uint16_t nsei, uint16_t ns_bvci,
struct bssgp_paging_info *pinfo) struct bssgp_paging_info *pinfo)
{ {
struct msgb *msg = bssgp_msgb_alloc(); struct msgb *msg = bssgp_msgb_alloc();
struct bssgp_normal_hdr *bgph = struct bssgp_normal_hdr *bgph =
@ -913,7 +913,7 @@ int gprs_bssgp_tx_paging(uint16_t nsei, uint16_t ns_bvci,
return gprs_ns_sendmsg(bssgp_nsi, msg); return gprs_ns_sendmsg(bssgp_nsi, msg);
} }
void gprs_bssgp_set_log_ss(int ss) void bssgp_set_log_ss(int ss)
{ {
DBSSGP = ss; DBSSGP = ss;
} }

View File

@ -336,8 +336,8 @@ int bssgp_tx_ul_ud(struct bssgp_bvc_ctx *bctx, uint32_t tlli,
} }
/* Parse a single GMM-PAGING.req to a given NSEI/NS-BVCI */ /* Parse a single GMM-PAGING.req to a given NSEI/NS-BVCI */
int gprs_bssgp_rx_paging(struct bssgp_paging_info *pinfo, int bssgp_rx_paging(struct bssgp_paging_info *pinfo,
struct msgb *msg) struct msgb *msg)
{ {
struct bssgp_normal_hdr *bgph = struct bssgp_normal_hdr *bgph =
(struct bssgp_normal_hdr *) msgb_bssgph(msg); (struct bssgp_normal_hdr *) msgb_bssgph(msg);

View File

@ -167,7 +167,7 @@ DEFUN(logging_fltr_bvc,
return CMD_SUCCESS; return CMD_SUCCESS;
} }
int gprs_bssgp_vty_init(void) int bssgp_vty_init(void)
{ {
install_element_ve(&show_bssgp_cmd); install_element_ve(&show_bssgp_cmd);
install_element_ve(&show_bssgp_stats_cmd); install_element_ve(&show_bssgp_stats_cmd);

View File

@ -23,13 +23,12 @@ bssgp_tx_suspend;
bssgp_tx_suspend_ack; bssgp_tx_suspend_ack;
bssgp_tx_suspend_nack; bssgp_tx_suspend_nack;
bssgp_tx_ul_ud; bssgp_tx_ul_ud;
bssgp_rcvmsg
gprs_bssgp_rcvmsg bssgp_rx_paging
gprs_bssgp_rx_paging bssgp_set_log_ss
gprs_bssgp_set_log_ss bssgp_tx_dl_ud
gprs_bssgp_tx_dl_ud bssgp_tx_paging
gprs_bssgp_tx_paging bssgp_vty_init
gprs_bssgp_vty_init
gprs_ns_cause_str; gprs_ns_cause_str;
gprs_ns_destroy; gprs_ns_destroy;