Commit Graph

38 Commits

Author SHA1 Message Date
Harald Welte d3fa84dbba use new libosmocore gsm_23_003.h for IMEI/IMSI length
... rather than our private definitions everwhere.  As an added benefit,
gprs_gsup_messages.h is now free of any header dependencies within
openbsc.
2016-04-29 13:10:37 +02:00
Holger Hans Peter Freyther 1464a121c0 ipa: Correct the prototype of these functions
They return nothing and not int.
2014-11-06 16:32:57 +01:00
Harald Welte ba874b82be move libctrl from openbsc to libosmoctrl (libosmocore.git) 2014-08-21 15:34:28 +02:00
Harald Welte eb62301938 ipaccess-proxy: avoid namespace collision with libosmo-abis 2014-08-18 22:49:50 +02:00
Holger Hans Peter Freyther abddd6aa44 nat/bsc: Check proto before calling ipaccess_rcvmsg_base
The code in the BSC/NAT called ipaccess_rcvmsg_base without
checking if the protocol is IPA. This lead the BSC to respond
to SCCP messages with an "ID ACK". From a quick look neither
the code of ipaccess_rcvmsg_base in OpenBSC nor the copy of
libosmo-abis ever checked the protocol header. So this code
has been wrong since initially being created in 2010.
2014-05-06 06:50:39 +02:00
Holger Hans Peter Freyther 7a0010bdd4 nat: Include LAC/CI as TV values at the end of the 'status' message
Extend the status message and send LAC/CI as part of the status
message. It is using TV to allow sending more fields in the feature.
We only need to encode the data and this is why there is no tlv
description yet.
2013-04-29 20:40:44 +02:00
Pablo Neira Ayuso ed5cacb240 src: port openBSC over libosmo-abis
This is a big patch that ports openBSC over libosmo-abis.
Sorry, the changes that are included here are all dependent
of libosmo-abis, splitting them into smaller pieces would
leave the repository in some intermediate state, which is
not desired.

The main changes are:

- The directory libabis/ has been removed as it now lives in
  libosmo-abis.

- new configuration file format for nanoBTS and HSL femto, we
  need to define the virtual e1_line and attach it to the OML
  link.

- all the existing BTS drivers (nanoBTS, hsl femto, Nokia site,
  BS11 and rbs2000) now use the new libosmo-abis framework.

- use r232 input driver available in libosmo-abis for bs11_config.

- use ipa_msg_recv instead of old ipaccess_read_msg function.

- delete definition of gsm_e1_subslot and input_signal_data.
  These structures now lives in libosmo-abis.

Most of this patch are deletions of libabis/ which has been
moved to libosmo-abis.

This patch also modifies openBSC to use all the new definitions
available in libosmocore and libosmo-abis. In order to do that,
we have replaced the following:

- DINP, DMI, DMIB and DMUX by their respective DL* correspondences.
- SS_GLOBAL by SS_L_GLOBAL
- SS_INPUT by SS_L_INPUT
- S_GLOBAL_SHUTDOWN by S_L_GLOBAL_SHUTDOWN
- SS_INPUT by SS_L_INPUT
- S_INP_* by S_L_INP_* sub-signals
- E1INP_NODE by L_E1INP_NODE vty node

This patch has been tested with:
- one nanoBTS
- the HSL femto with the examples available under libosmo-abis
- BS11 with both dahdi and misdn drivers.
2011-08-19 22:38:35 +02:00
Harald Welte a85515bea5 use new libosmogsm ip.access protocol header file 2011-05-22 21:57:36 +02:00
Pablo Neira Ayuso 4db9299286 src: use namespace prefix osmo_fd* and osmo_select*
Summary of changes:

s/struct bsc_fd/struct osmo_fd/g
s/bsc_register_fd/osmo_fd_register/g
s/bsc_unregister_fd/osmo_fd_unregister/g
s/bsc_select_main/osmo_select_main/g
2011-05-06 12:11:23 +02:00
Holger Hans Peter Freyther 2a9eeaa588 bsc: Allow the NAT to query the list of LACs
Right now the code assumes that any request coming
from the NAT is a query and the code responds to with
a list of configured LACs.
2011-04-26 09:35:31 +02:00
Holger Hans Peter Freyther c3f28320c2 ipa: Reserve two new values for the Osmo IPA extensions
We want to send MGCP through the Osmo Extension and also
want to send the list of local LACs to it.
2011-04-26 09:33:47 +02:00
Holger Hans Peter Freyther c42ad8b686 misc: Move from u_int to uint types of stdint.h
This was done with sed on the files.
2011-04-18 17:31:39 +02:00
Pablo Neira Ayuso 0d20b63574 libabis: ipaccess: more robust ipaccess_idtag_name()
ipaccess_idtag_name() now takes a uint8_t as parameter which is the
length of the type tag.

This patch was suggested by Zecke.
2011-04-12 21:50:46 +02:00
Holger Hans Peter Freyther 5d7b65b407 ipaccess: Add a function to prepend the osmocom ext header
* include/openbsc/ipaccess.h: Reserve a protocol number for control
  commands
* input/ipaccess.c: New function ipaccess_prepend_header_ext prepends
  the extension header
2011-04-07 23:31:58 +02:00
Pablo Neira Ayuso c281b4e85a libabis: ipaccess: export ipaccess_parse_unitid
Now this is used by ipaccess-proxy, remove redundant implementation in it.
2011-04-07 23:28:00 +02:00
Pablo Neira Ayuso 66add64b71 libabis: ipaccess: export ipaccess_idtag_name()
Now this is used by ipaccess-proxy, remove redundant implemention in it.
2011-04-07 23:28:00 +02:00
Pablo Neira Ayuso 22f58a9a58 libabis: ipaccess: conclude new ipaccess_send_*() functions and use them
This patch finishes the new ipaccess_send_*() functions and use them
in the ipaccess-proxy code.

I have also cleanup the definition of the PONG, ID_ACK and ID_REQ
messages (including some minor documentation about them).

I had to rename ipaccess_recvmsg() in ipaccess-proxy to avoid clashing
with the one defined in libabis.
2011-04-07 23:28:00 +02:00
Pablo Neira Ayuso 136f453dd2 src: use new library libosmogsm and new path to headers in libosmocore
libosmogsm is a new library that is distributed in the libosmocore.
Now, openbsc depends on it. This patch gets openbsc with this
change.

This patch also rewrites all include path to the new
osmocom/[gsm|core]

Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-23 18:17:56 +01:00
Holger Hans Peter Freyther 368a0a73d4 ipa: Only use one IPA number for Osmo extensions
Instead of using more numbers from the proto range we will
use the 0xee and then have a mini header with our new proto
id in there. For a start rename the use types to _OLD.
2011-01-07 16:54:46 +01:00
Holger Hans Peter Freyther ec8a4e23d3 ipaccess: Add a structure for informing the USSD provider about the state
This is used to inform the USSD provider about the state of the
connection.
2010-10-25 21:06:03 +02:00
Holger Hans Peter Freyther 19c530c5e7 ipaccess: Put our extensions to the protocol into the same enum
Rename NAT_IPAC_PROTO_MGCP to IPAC_PROTO_MGCP and place it in
the enum. We need to be prepared to change this number if IPA
is ever going to use it for something else.
2010-10-13 23:55:32 +02:00
Holger Hans Peter Freyther 70402a4e4d [ipa] Handle losing the RSL/OML connection..
This is addressing multiple issues regarding the loss of the
OML/RSL link to the BTS.

1.) When we lose the OML link, close down all RSL connections
on all TRXs (only tested with one TRX) and free the e1inp_line
allocated for the OML connection.
2.) When we lose the RSL link on any TRX and we know to which
lines this connection belongs, we will close down the OML connection
as we have a problem to just reactivate one RSL link.
3.) When we lose the RSL link on any TRX and we do not know
where it belongs to we will free the bfd we have allocated in the
rsl listen/accept method and we properly close the socket (i could
not test this one properly). This is made under the assumption
the BTS has not responded to the ID request.
4.) When we already have a bts->oml_link we will throw it away
and use the new link (it should not happen) and the same applies
to the rsl link.
2010-04-15 11:17:24 +02:00
Holger Hans Peter Freyther 38722cca48 ipa-firmware: Write the firmware parts to a file
The first non working version to dump the content of the sdp
to the terminal..
2010-03-22 11:22:54 +01:00
Holger Hans Peter Freyther 57e9300142 ipa-firmware: Remove the part_length from the struct sdp_firmware
* The length of the table is not at a fixed position. We will need
  to read the offset, seek there, read the data, convert it to the
  host endianes.
* Prepare the code to work with offsets of 0...
2010-03-22 09:59:57 +01:00
Harald Welte dfe6c7d910 split 'libosmocore' from openbsc codebase
This library is intended to collect all generic/common funcitionality
of all Osmocom.org projects, including OpenBSC but also OsmocomBB

The library currently includes the following modules:

bitvec, comp128, gsm_utils, msgb, select, signal, statistics, talloc, timer,
tlv_parse, linuxlist

msgb allocation error debugging had to be temporarily disabled as it depends on
'debug.c' functionality which at the moment remains in OpenBSC
2010-02-20 16:27:23 +01:00
Holger Hans Peter Freyther d3d5be1cde [ipaccess] Make the IPA version of LTV public. 2010-02-09 17:40:37 +01:00
Holger Hans Peter Freyther 3bc856bc16 [ipa] Make sending of ID REQ public...
Make sending of the ID Request message public. We are going
to use this in the BSC NAT code to ask for querying the BSC.
2010-02-07 13:21:51 +01:00
Holger Hans Peter Freyther 301e628761 [ipaccess] Create a method to send the ID ACK messages 2010-02-07 13:21:40 +01:00
Holger Hans Peter Freyther 0183edd18c [ipaccess] Change the name to be slightly better.. 2009-12-30 06:42:16 +01:00
Holger Hans Peter Freyther c9f8a6dca3 [ipaccess] Expose the sub header list as well.. 2009-12-30 06:42:16 +01:00
Holger Hans Peter Freyther 4a98cad85e [ipaccess] Turn firmware parsing into a routine so it can be used
* text3 seems to be a version as the text content starts
  with a 'v'
* move the sdp_firmware into the ipaccess.h and declare
  the function. The headers are returned through a list.
2009-12-30 06:42:16 +01:00
Harald Welte 87ed5cd4ad introduce #defines for ip.access RSL and OML UDP ports 2009-12-23 22:47:53 +01:00
Sylvain Munaut d7d1c99a53 ip.access: Header has a 16bit length in network byte order
This is confirmed by looking at the source of their dissector.
The length can go up to 273 bytes apparently (again, according
to the source of their dissector).
2009-10-29 16:33:59 +01:00
Holger Hans Peter Freyther 0e7b0732f6 Include e1_input.h for the e1inp_line 2009-10-22 15:48:59 +02:00
Holger Hans Peter Freyther f734a14485 [ipaccess] Add SCCP/A descriminator 2009-09-30 06:27:21 +02:00
Holger Hans Peter Freyther d5f052230c [ipaccess] Prepare to reuse parts of the code for the A-link
For the MSC<->BSC connection we are going to use the same header
as used from BTS<->BSC but we are not having an E1-Link, a gsm network
or a gsm_bts available and can not use this part of the code.
2009-09-30 06:27:16 +02:00
Holger Hans Peter Freyther 34e97495a6 misc: Add prototypes to header files, include more header files
Fix various warnings about implicit declarations of functions.
2009-08-10 07:54:02 +02:00
Harald Welte 13e10daa33 move openbsc into its own subdirectory 2009-06-10 05:40:52 +08:00