diff options
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/Makefile.am | 17 | ||||
-rw-r--r-- | openbsc/src/bsc_init.c | 6 | ||||
-rw-r--r-- | openbsc/src/input/ipaccess.c | 19 | ||||
-rw-r--r-- | openbsc/src/sccp/sccp.c | 7 |
4 files changed, 34 insertions, 15 deletions
diff --git a/openbsc/src/Makefile.am b/openbsc/src/Makefile.am index 161c283f6..ba3d2802c 100644 --- a/openbsc/src/Makefile.am +++ b/openbsc/src/Makefile.am @@ -3,14 +3,19 @@ AM_CFLAGS=-Wall sbin_PROGRAMS = bsc_hack bs11_config ipaccess-find ipaccess-config \ isdnsync bsc_mgcp ipaccess-proxy -noinst_LIBRARIES = libbsc.a libmsc.a libvty.a libsccp.a +noinst_LIBRARIES = libbsc.a libmsc.a libvty.a noinst_HEADERS = vty/cardshell.h +bscdir = $(libdir) +bsc_LIBRARIES = liblaf0rge1.a libsccp.a + +liblaf0rge1_a_SOURCES = msgb.c timer.c talloc.c select.c signal.c debug.c + libbsc_a_SOURCES = abis_rsl.c abis_nm.c gsm_data.c gsm_04_08_utils.c \ - msgb.c select.c chan_alloc.c timer.c debug.c \ + chan_alloc.c \ gsm_subscriber_base.c subchan_demux.c bsc_rll.c transaction.c \ trau_frame.c trau_mux.c paging.c e1_config.c e1_input.c tlv_parser.c \ - input/misdn.c input/ipaccess.c signal.c gsm_utils.c talloc.c \ + input/misdn.c input/ipaccess.c signal.c gsm_utils.c \ talloc_ctx.c system_information.c bitvec.c rest_octets.c \ rtp_proxy.c statistics.c bts_siemens_bs11.c bts_ipaccess_nanobts.c \ bts_unknown.c @@ -25,7 +30,7 @@ libvty_a_SOURCES = vty/buffer.c vty/command.c vty/vector.c vty/vty.c libsccp_a_SOURCES = sccp/sccp.c bsc_hack_SOURCES = bsc_hack.c bsc_init.c vty_interface.c vty_interface_layer3.c -bsc_hack_LDADD = libmsc.a libbsc.a libmsc.a libvty.a -ldl -ldbi $(LIBCRYPT) +bsc_hack_LDADD = libmsc.a libbsc.a libmsc.a libvty.a liblaf0rge1.a -ldl -ldbi $(LIBCRYPT) bs11_config_SOURCES = bs11_config.c abis_nm.c gsm_data.c msgb.c debug.c \ select.c timer.c rs232.c tlv_parser.c signal.c talloc.c \ @@ -34,11 +39,11 @@ bs11_config_SOURCES = bs11_config.c abis_nm.c gsm_data.c msgb.c debug.c \ ipaccess_find_SOURCES = ipaccess/ipaccess-find.c select.c timer.c ipaccess_config_SOURCES = ipaccess/ipaccess-config.c ipaccess/ipaccess-firmware.c -ipaccess_config_LDADD = libbsc.a libmsc.a libbsc.a libvty.a -ldl -ldbi $(LIBCRYPT) +ipaccess_config_LDADD = libbsc.a libmsc.a libbsc.a libvty.a liblaf0rge1.a -ldl -ldbi $(LIBCRYPT) isdnsync_SOURCES = isdnsync.c bsc_mgcp_SOURCES = mgcp/mgcp_main.c mgcp/mgcp_protocol.c msgb.c talloc.c debug.c select.c timer.c telnet_interface.c -bsc_mgcp_LDADD = libvty.a +bsc_mgcp_LDADD = libvty.a liblaf0rge1.a ipaccess_proxy_SOURCES = ipaccess/ipaccess-proxy.c msgb.c select.c talloc.c debug.c timer.c diff --git a/openbsc/src/bsc_init.c b/openbsc/src/bsc_init.c index 622fb98cd..617d4ae44 100644 --- a/openbsc/src/bsc_init.c +++ b/openbsc/src/bsc_init.c @@ -802,8 +802,10 @@ static int bootstrap_bts(struct gsm_bts *bts) } break; case GSM_BAND_900: - if (bts->c0->arfcn < 1 || bts->c0->arfcn > 124) { - LOGP(DNM, LOGL_ERROR, "GSM900 channel must be between 1-124.\n"); + if (bts->c0->arfcn < 1 || + (bts->c0->arfcn > 124 && bts->c0->arfcn < 955) || + bts->c0->arfcn > 1023) { + LOGP(DNM, LOGL_ERROR, "GSM900 channel must be between 1-124, 955-1023.\n"); return -EINVAL; } break; diff --git a/openbsc/src/input/ipaccess.c b/openbsc/src/input/ipaccess.c index 90d7cea85..10a3d2283 100644 --- a/openbsc/src/input/ipaccess.c +++ b/openbsc/src/input/ipaccess.c @@ -89,7 +89,7 @@ static const char *ipac_idtag_name(int tag) return idtag_names[tag]; } -static int ipac_idtag_parse(struct tlv_parsed *dec, unsigned char *buf, int len) +int ipaccess_idtag_parse(struct tlv_parsed *dec, unsigned char *buf, int len) { u_int8_t t_len; u_int8_t t_tag; @@ -164,6 +164,17 @@ static int parse_unitid(const char *str, u_int16_t *site_id, u_int16_t *bts_id, return 0; } +/* send the id ack */ +int ipaccess_send_id_ack(int fd) +{ + return write(fd, id_ack, sizeof(id_ack)); +} + +int ipaccess_send_id_req(int fd) +{ + return write(fd, id_req, sizeof(id_req)); +} + /* base handling of the ip.access protocol */ int ipaccess_rcvmsg_base(struct msgb *msg, struct bsc_fd *bfd) @@ -180,7 +191,7 @@ int ipaccess_rcvmsg_base(struct msgb *msg, break; case IPAC_MSGT_ID_ACK: DEBUGP(DMI, "ID_ACK? -> ACK!\n"); - ret = write(bfd->fd, id_ack, sizeof(id_ack)); + ret = ipaccess_send_id_ack(bfd->fd); break; } return 0; @@ -201,7 +212,7 @@ static int ipaccess_rcvmsg(struct e1inp_line *line, struct msgb *msg, case IPAC_MSGT_ID_RESP: DEBUGP(DMI, "ID_RESP "); /* parse tags, search for Unit ID */ - ipac_idtag_parse(&tlvp, (u_int8_t *)msg->l2h + 2, + ipaccess_idtag_parse(&tlvp, (u_int8_t *)msg->l2h + 2, msgb_l2len(msg)-2); DEBUGP(DMI, "\n"); @@ -530,7 +541,7 @@ static int listen_fd_cb(struct bsc_fd *listen_bfd, unsigned int what) } /* Request ID. FIXME: request LOCATION, HW/SW VErsion, Unit Name, Serno */ - ret = write(bfd->fd, id_req, sizeof(id_req)); + ret = ipaccess_send_id_req(bfd->fd); return ret; //return e1inp_line_register(line); diff --git a/openbsc/src/sccp/sccp.c b/openbsc/src/sccp/sccp.c index a19926630..d9c232249 100644 --- a/openbsc/src/sccp/sccp.c +++ b/openbsc/src/sccp/sccp.c @@ -24,11 +24,12 @@ #include <string.h> -#include <sccp/sccp.h> - +#include <openbsc/msgb.h> #include <openbsc/debug.h> #include <openbsc/talloc.h> -#include <openbsc/linuxlist.h> + +#include <sccp/sccp.h> + static void *tall_sccp_ctx; static LLIST_HEAD(sccp_connections); |