diff --git a/openbsc/include/openbsc/abis_rsl.h b/openbsc/include/openbsc/abis_rsl.h index 1ffea3f14..a911be355 100644 --- a/openbsc/include/openbsc/abis_rsl.h +++ b/openbsc/include/openbsc/abis_rsl.h @@ -142,16 +142,16 @@ enum abis_rsl_msgtype { RSL_MT_IPAC_DISC_MUX = 0x56, RSL_MT_IPAC_DISC_MUX_ACK, RSL_MT_IPAC_DISC_MUX_NACK, - RSL_MT_IPAC_BIND = 0x70, /* Bind to local BTS RTP port */ - RSL_MT_IPAC_BIND_ACK, - RSL_MT_IPAC_BIND_NACK, - RSL_MT_IPAC_CONNECT = 0x73, - RSL_MT_IPAC_CONNECT_ACK, - RSL_MT_IPAC_CONNECT_NACK, - RSL_MT_IPAC_DISCONNECT_IND = 0x76, - RSL_MT_IPAC_DISCONNECT = 0x77, - RSL_MT_IPAC_DISCONNECT_ACK, - RSL_MT_IPAC_DISCONNECT_NACK, + RSL_MT_IPAC_CRCX = 0x70, /* Bind to local BTS RTP port */ + RSL_MT_IPAC_CRCX_ACK, + RSL_MT_IPAC_CRCX_NACK, + RSL_MT_IPAC_MDCX = 0x73, + RSL_MT_IPAC_MDCX_ACK, + RSL_MT_IPAC_MDCX_NACK, + RSL_MT_IPAC_DLCX_IND = 0x76, + RSL_MT_IPAC_DLCX = 0x77, + RSL_MT_IPAC_DLCX_ACK, + RSL_MT_IPAC_DLCX_NACK, }; /* Siemens vendor-specific */ @@ -535,10 +535,10 @@ enum rsl_mrpci_phase { int rsl_siemens_mrpci(struct gsm_lchan *lchan, struct rsl_mrpci *mrpci); /* ip.access specfic RSL extensions */ -int rsl_ipacc_bind(struct gsm_lchan *lchan); -int rsl_ipacc_connect(struct gsm_lchan *lchan, u_int32_t ip, - u_int16_t port, u_int16_t conn_id, - u_int8_t rtp_payload2); +int rsl_ipacc_crcx(struct gsm_lchan *lchan); +int rsl_ipacc_mdcx(struct gsm_lchan *lchan, u_int32_t ip, + u_int16_t port, u_int16_t conn_id, + u_int8_t rtp_payload2); int rsl_ipacc_pdch_activate(struct gsm_lchan *lchan); int abis_rsl_rcvmsg(struct msgb *msg); diff --git a/openbsc/include/openbsc/signal.h b/openbsc/include/openbsc/signal.h index 9e5511f6f..fee9d5bfd 100644 --- a/openbsc/include/openbsc/signal.h +++ b/openbsc/include/openbsc/signal.h @@ -57,8 +57,8 @@ enum signal_sms { /* SS_ABISIP signals */ enum signal_abisip { - S_ABISIP_BIND_ACK, - S_ABISIP_DISC_IND, + S_ABISIP_CRCX_ACK, + S_ABISIP_DLCX_IND, }; /* SS_NM signals */ diff --git a/openbsc/src/abis_rsl.c b/openbsc/src/abis_rsl.c index 2d006030f..f6e0b87a7 100644 --- a/openbsc/src/abis_rsl.c +++ b/openbsc/src/abis_rsl.c @@ -1362,14 +1362,14 @@ static u_int8_t ipa_smod_s_for_tch_mode(u_int8_t tch_mode) } /* ip.access specific RSL extensions */ -int rsl_ipacc_bind(struct gsm_lchan *lchan) +int rsl_ipacc_crcx(struct gsm_lchan *lchan) { struct msgb *msg = rsl_msgb_alloc(); struct abis_rsl_dchan_hdr *dh; u_int8_t speech_mode; dh = (struct abis_rsl_dchan_hdr *) msgb_put(msg, sizeof(*dh)); - init_dchan_hdr(dh, RSL_MT_IPAC_BIND); + init_dchan_hdr(dh, RSL_MT_IPAC_CRCX); dh->c.msg_discr = ABIS_RSL_MDISC_IPACCESS; dh->chan_nr = lchan2chan_nr(lchan); @@ -1386,7 +1386,7 @@ int rsl_ipacc_bind(struct gsm_lchan *lchan) return abis_rsl_sendmsg(msg); } -int rsl_ipacc_connect(struct gsm_lchan *lchan, u_int32_t ip, u_int16_t port, +int rsl_ipacc_mdcx(struct gsm_lchan *lchan, u_int32_t ip, u_int16_t port, u_int16_t conn_id, u_int8_t rtp_payload2) { struct msgb *msg = rsl_msgb_alloc(); @@ -1396,7 +1396,7 @@ int rsl_ipacc_connect(struct gsm_lchan *lchan, u_int32_t ip, u_int16_t port, struct in_addr ia; dh = (struct abis_rsl_dchan_hdr *) msgb_put(msg, sizeof(*dh)); - init_dchan_hdr(dh, RSL_MT_IPAC_CONNECT); + init_dchan_hdr(dh, RSL_MT_IPAC_MDCX); dh->c.msg_discr = ABIS_RSL_MDISC_IPACCESS; dh->chan_nr = lchan2chan_nr(lchan); @@ -1404,7 +1404,7 @@ int rsl_ipacc_connect(struct gsm_lchan *lchan, u_int32_t ip, u_int16_t port, speech_mode = 0x00 | ipa_smod_s_for_tch_mode(lchan->tch_mode); ia.s_addr = htonl(ip); - DEBUGP(DRSL, "channel=%s chan_nr=0x%02x IPAC_CONNECT " + DEBUGP(DRSL, "channel=%s chan_nr=0x%02x IPAC_MDCX " "IP=%s PORT=%d RTP_PAYLOAD2=%d CONN_ID=%d speech_mode=0x%02x\n", gsm_ts_name(lchan->ts), dh->chan_nr, inet_ntoa(ia), port, rtp_payload2, conn_id, speech_mode); @@ -1454,7 +1454,7 @@ int rsl_ipacc_pdch_activate(struct gsm_lchan *lchan) return abis_rsl_sendmsg(msg); } -static int abis_rsl_rx_ipacc_bindack(struct msgb *msg) +static int abis_rsl_rx_ipacc_crcx_ack(struct msgb *msg) { struct abis_rsl_dchan_hdr *dh = msgb_l2(msg); struct tlv_parsed tv; @@ -1492,12 +1492,12 @@ static int abis_rsl_rx_ipacc_bindack(struct msgb *msg) ts->abis_ip.bound_port = ntohs(port); ts->abis_ip.conn_id = ntohs(attr_f8); - dispatch_signal(SS_ABISIP, S_ABISIP_BIND_ACK, msg->lchan); + dispatch_signal(SS_ABISIP, S_ABISIP_CRCX_ACK, msg->lchan); return 0; } -static int abis_rsl_rx_ipacc_disc_ind(struct msgb *msg) +static int abis_rsl_rx_ipacc_dlcx_ind(struct msgb *msg) { struct abis_rsl_dchan_hdr *dh = msgb_l2(msg); struct tlv_parsed tv; @@ -1508,7 +1508,7 @@ static int abis_rsl_rx_ipacc_disc_ind(struct msgb *msg) print_rsl_cause(TLVP_VAL(&tv, RSL_IE_CAUSE), TLVP_LEN(&tv, RSL_IE_CAUSE)); - dispatch_signal(SS_ABISIP, S_ABISIP_DISC_IND, msg->lchan); + dispatch_signal(SS_ABISIP, S_ABISIP_DLCX_IND, msg->lchan); return 0; } @@ -1523,27 +1523,27 @@ static int abis_rsl_rx_ipacc(struct msgb *msg) gsm_ts_name(msg->lchan->ts), rllh->chan_nr); switch (rllh->c.msg_type) { - case RSL_MT_IPAC_BIND_ACK: - DEBUGPC(DRSL, "IPAC_BIND_ACK "); - rc = abis_rsl_rx_ipacc_bindack(msg); + case RSL_MT_IPAC_CRCX_ACK: + DEBUGPC(DRSL, "IPAC_CRCX_ACK "); + rc = abis_rsl_rx_ipacc_crcx_ack(msg); break; - case RSL_MT_IPAC_BIND_NACK: + case RSL_MT_IPAC_CRCX_NACK: /* somehow the BTS was unable to bind the lchan to its local * port?!? */ - DEBUGPC(DRSL, "IPAC_BIND_NACK "); + DEBUGPC(DRSL, "IPAC_CRCX_NACK "); break; - case RSL_MT_IPAC_CONNECT_ACK: + case RSL_MT_IPAC_MDCX_ACK: /* the BTS tells us that a connect operation was successful */ - DEBUGPC(DRSL, "IPAC_CONNECT_ACK "); + DEBUGPC(DRSL, "IPAC_MDCX_ACK "); break; - case RSL_MT_IPAC_CONNECT_NACK: + case RSL_MT_IPAC_MDCX_NACK: /* somehow the BTS was unable to connect the lchan to a remote * port */ - DEBUGPC(DRSL, "IPAC_CONNECT_NACK "); + DEBUGPC(DRSL, "IPAC_MDCX_NACK "); break; - case RSL_MT_IPAC_DISCONNECT_IND: - DEBUGPC(DRSL, "IPAC_DISCONNECT_IND "); - rc = abis_rsl_rx_ipacc_disc_ind(msg); + case RSL_MT_IPAC_DLCX_IND: + DEBUGPC(DRSL, "IPAC_DLCX_IND "); + rc = abis_rsl_rx_ipacc_dlcx_ind(msg); break; default: DEBUGPC(DRSL, "Unknown ip.access msg_type 0x%02x", rllh->c.msg_type); diff --git a/openbsc/src/gsm_04_08.c b/openbsc/src/gsm_04_08.c index 7a8bcbdea..4d352bc1f 100644 --- a/openbsc/src/gsm_04_08.c +++ b/openbsc/src/gsm_04_08.c @@ -1830,7 +1830,7 @@ static int handle_abisip_signal(unsigned int subsys, unsigned int signal, ts = lchan->ts; switch (signal) { - case S_ABISIP_BIND_ACK: + case S_ABISIP_CRCX_ACK: /* the BTS has successfully bound a TCH to a local ip/port, * which means we can connect our UDP socket to it */ if (ts->abis_ip.rtp_socket) { @@ -1848,7 +1848,7 @@ static int handle_abisip_signal(unsigned int subsys, unsigned int signal, if (rc < 0) goto out_err; break; - case S_ABISIP_DISC_IND: + case S_ABISIP_DLCX_IND: /* the BTS tells us a RTP stream has been disconnected */ if (ts->abis_ip.rtp_socket) { rtp_socket_free(ts->abis_ip.rtp_socket); @@ -1870,7 +1870,7 @@ static int ipacc_connect_proxy_bind(struct gsm_lchan *lchan) struct rtp_socket *rs = ts->abis_ip.rtp_socket; int rc; - rc = rsl_ipacc_connect(lchan, ntohl(rs->rtp.sin_local.sin_addr.s_addr), + rc = rsl_ipacc_mdcx(lchan, ntohl(rs->rtp.sin_local.sin_addr.s_addr), ntohs(rs->rtp.sin_local.sin_port), ts->abis_ip.conn_id, /* FIXME: use RTP payload of bound socket, not BTS*/ @@ -1911,14 +1911,14 @@ static int tch_map(struct gsm_lchan *lchan, struct gsm_lchan *remote_lchan) } else { /* directly connect TCH RTP streams to each other */ ts = remote_lchan->ts; - rc = rsl_ipacc_connect(lchan, ts->abis_ip.bound_ip, + rc = rsl_ipacc_mdcx(lchan, ts->abis_ip.bound_ip, ts->abis_ip.bound_port, lchan->ts->abis_ip.conn_id, ts->abis_ip.rtp_payload2); if (rc < 0) return rc; ts = lchan->ts; - rc = rsl_ipacc_connect(remote_lchan, ts->abis_ip.bound_ip, + rc = rsl_ipacc_mdcx(remote_lchan, ts->abis_ip.bound_ip, ts->abis_ip.bound_port, remote_lchan->ts->abis_ip.conn_id, ts->abis_ip.rtp_payload2); diff --git a/openbsc/src/gsm_04_08_utils.c b/openbsc/src/gsm_04_08_utils.c index 053e999b7..b8fe43069 100644 --- a/openbsc/src/gsm_04_08_utils.c +++ b/openbsc/src/gsm_04_08_utils.c @@ -602,7 +602,7 @@ int gsm48_lchan_modify(struct gsm_lchan *lchan, u_int8_t lchan_mode, /* FIXME: we not only need to do this after mode modify, but * also after channel activation */ if (is_ipaccess_bts(lchan->ts->trx->bts) && lchan_mode != GSM48_CMODE_SIGN) - rc = rsl_ipacc_bind(lchan); + rc = rsl_ipacc_crcx(lchan); return rc; }