Commit Graph

62 Commits

Author SHA1 Message Date
Harald Welte c9a341b248 move ipaccess tools into their own subdirectory
They will now be built fully inside src/ipaccess, using their
own Makefile.am
2010-05-04 07:47:54 +02:00
Harald Welte e236596bf4 [gprs] Move all GPRS related code to src/gprs subdirectory 2010-05-04 07:41:59 +02:00
Harald Welte 288be16587 [gprs] Build the SGSN stand-alone and not as part of bsc_hack
Instead of continuing to add more and more functionality to the
bsc_hack binary, we should have the new SGSN code run as a separate
executable.

After this commit we now build a 'osmo_sgsn' executable, using its
own osmo_sgsn.cfg config file.

However, the SGSN is not yet functional, mainly due to the fact that
the BSSGP and GMM code are written with the assumption that there
is a msgb->trx->bts and the according 'sturct gsm_bts' data model
around - which clearly is no longer the case outside of bsc_hack.
2010-05-04 07:20:43 +02:00
Harald Welte 169a00403f [gprs] Makefile reorganization
We don't need to explicitly link telnet_interface.c and vty_interface_cmds.c
as they're now part of libvty.a
2010-05-04 07:20:42 +02:00
Harald Welte 799e0c92c6 gb_proxy: Add initial VTY configuration code 2010-05-04 07:20:42 +02:00
Harald Welte 9f75c35eb3 GPRS: Introduce a GPRS Gb Proxy
The ida of the Gb proxy is to aggregate Gb links with a number of BSS
and then present all the BSSGP-VC's together inside one NS-VC to the
actual SGSN.

The code is not yet expected to be complete.
2010-05-04 07:20:42 +02:00
Harald Welte 9b455bf801 Create new 'gprs-sgsn' branch on top of 'gprs-conf'
This branch contains the partial SGSN/GGSN implementation that
was originally developed as part of the gprs branch.
2010-05-04 07:20:41 +02:00
Harald Welte 0b484a4fb1 Makefile cleanup
move vty_interface_cmds.c and telnet_interface.c into libvty
rather than explicitly linking the C files for every program
2010-05-01 14:02:25 +02:00
Holger Hans Peter Freyther 441273766a [mgcp] Add the logging commands for the MGCP command. 2010-04-07 22:55:17 +02:00
Holger Hans Peter Freyther 3c71232b11 [vty] Move the VTY logging commands to a new file
Currently vty_interface.c is used for the BSC config, in case of
the MGCP Gateway or the BSC Nat process these logging commands are
not available. Move the commands to a new vty_interface_cmds.c file
to allow to share basic commands across different programs.
2010-04-06 12:20:34 +02:00
Holger Hans Peter Freyther ec32b5860e bsc: Start creating 08.08 like API
The 08.08 API will interface with the internal BSC code and it is
the boundary between MSC and BSC. So nothing that calls the BSC
functionality should know about lchan or such.
2010-03-25 09:07:28 +01:00
Holger Hans Peter Freyther f99f0930fd Move the version/copyright string to a separate file
It didn't really belong into the bsc_init.c... now we could
even easily autogenerate this file.
2010-03-24 10:24:38 +01:00
Holger Hans Peter Freyther 6552d0b596 Include bscconfig.h without ../ for the srcdir != build dir case 2010-03-24 10:20:27 +01:00
Holger Hans Peter Freyther 1ebad74377 Merge remote branch 'origin/master' into on-waves/mgcp
Conflicts:
	openbsc/include/openbsc/Makefile.am
	openbsc/src/Makefile.am
2010-02-26 20:16:45 +01:00
Holger Hans Peter Freyther 1b0ea97457 [mgcp] Move the network bits to a separate file...
This change separates the protocol from the actual network code
(bind, forward data). This will allow to more easily hook up the
RTP code from OpenBSC and to not use local sockets at all.
2010-02-22 12:09:41 +01:00
Holger Hans Peter Freyther 7bdc637aae [mgcp] Move away from global variables and split out VTY code
In separation of using the MGCP parsing in another context, refactor
the code to operate on a struct mgcp_config, split out the vty code
from the mgcp_protocol.c, and move the callbacks into the mgcp code.

There should be no functional changes.
2010-02-22 12:09:24 +01:00
Harald Welte f98a4974d7 finish openbsc / libosmocore separation
* use pkg-config from openbsc to find header and library
* move sms and timer tests to libosmocore itself
* ensure "make distcheck" works on both packages
2010-02-20 17:29:27 +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 c64d9f7201 Move debug.c into the liblaf0rge1.a too
The msgb class is using the debug framework and needs to be able
to output data. We would need a way to add custom areas or to have
the struct of areas outside of the default debug.c... but this can
happen at a later point.
2010-02-12 22:42:19 +01:00
Holger Hans Peter Freyther 5e6f52f15a [sccp] Install the static sccp library and the headers 2010-02-12 22:42:13 +01:00
Holger Hans Peter Freyther b19dc286aa liblaf0rge: Make the other targets depend on the liblaforge...
Everything is linking fine here.
2010-02-09 22:04:09 +01:00
Holger Hans Peter Freyther a49ffb4cb4 Create a liblaforge with OpenBSC utility functions to be used for other projects 2010-02-09 21:51:44 +01:00
Holger Hans Peter Freyther e0955029a1 [mgcp] Prepare to do MGCP over TCP and inside the bsc_msc_ip process
* Separate main process and protocol handling into two parts.
* Change the protocol handling to work with UDP and TCP connection
* This will allow to speak MGCP over TCP between the BSC MUX and
  the real BSC.
2010-02-03 08:50:33 +01:00
Holger Hans Peter Freyther 89f3cb8606 [mgcp] Rename the source to mgcp_main.c 2010-02-02 12:07:21 +01:00
Holger Hans Peter Freyther a18445d262 [mgcp] Move the MGCP procoess into a sub directory 2010-02-01 14:00:07 +01:00
Daniel Willmann 604d851b89 Register GSM_BTS_TYPE_UNKNOWN in bsc_hack.c
The way the VTY configuration sytem works is that it first registers a
BTS of type GSM_BTS_TYPE_UNKNOWN and then sets the type correctly (after
encountering the type statement). This makes sure that registering a BTS
of type UNKNOWN succeeds.
2010-01-14 21:52:34 +01:00
Harald Welte 39315c4798 [OML] parse attributes depending on BTS type
Some NM attributes are defined differently depending on
the BTS type.  Having one big nm_att_tlvdef[] table for
all BTS types is no longer sufficient.  This patch

* introduces 'struct gsm_bts_model' to describe a BTS model
* adds definitions of gsm_bts_model for BS-11 and nanoBTS
* changes the abis_nm_tlv_parse() function: include a bts pointer
2010-01-10 18:01:52 +01:00
Sylvain Munaut d7c9e5cad8 encryption: Import a GPL comp128 implementation
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-01-03 10:54:07 +01:00
Holger Hans Peter Freyther dade8980e3 [ipaccess] Move firmware analysis into the ipaccess-config utility
* This turns ipaccess-firmware.c into a plain helper, fix the
  ipaccess name...
2009-12-30 07:08:39 +01:00
Holger Hans Peter Freyther af351a21f2 [ipaccess] Start using talloc in the firmware code
* We are not leaking anything... *yeah*, talloc rocks
2009-12-30 06:42:17 +01:00
Holger Hans Peter Freyther a25b20c174 [ipaccess] Call it ipaccess-firmware 2009-12-27 14:07:40 +01:00
Holger Hans Peter Freyther 426da090db [ipaccess] Move ipaccess utilities into a dedicated subdirectory 2009-12-24 11:28:29 +01:00
Harald Welte 2ca7c31429 Add ipaccess-proxy, a proxy for ip.access A-bis over IP
This proxy allows us to restart OpenBSC while the BTS's are kept
running with their CCCH/BCCH alive.  This is very useful to
make sure the phones don't roam to other networks while restarting
OpenBSC.

The proxy also intrduces UDP sockets for injecting UDP packets
into the A-bis data stream.
2009-12-23 22:44:04 +01:00
Holger Hans Peter Freyther 65d67dc222 [ipaccess] Start adding a tool that analyzes the ipaccess header
So far I have not much idea about the format. It is starting with
the magic byte and the header is spanning until the next occurence
of the " SDP" marker.
2009-12-23 12:52:30 +01:00
Harald Welte ffa55a4e87 statistics: Introduce 'struct counter' instead of using unsigned long
This has the advantage that counters can be added all over the code
very easily, while having only one routine that stores all of the
current counter values to the database.  The counters are synced
every 60 seconds, providing relatively fine grained statistics
about the network usage as time passes by.
2009-12-22 20:42:40 +01:00
Holger Hans Peter Freyther 0a64603db9 [misc] Move handover into libmsc.a
Handover is a high level decision, it can span multiple BSCs
and belongs mostly into the MSC domain.
2009-12-22 08:19:42 +01:00
Holger Hans Peter Freyther 4f5456c040 [misc] Move rtp_proxy.c into the libbsc.c
For the time being RSL has to know about Layer4 and upwards
and is using the RTP socket class....
2009-12-22 07:48:20 +01:00
Harald Welte 38fe2a67e1 meas_rep: utility function for processing of measurement reports
This provides two functions: get_meas_rep_avg() to obtain the sliding
window average of one particular field, and meas_rep_n_out_of_m_be()
to check if at least N out of M measurments are >= BE.
2009-12-21 13:33:10 +01:00
Harald Welte 8d77b9540a [handover] first functional handover implementation
With this commit, we can successfully hand over a channel from one cell to
another cell.  We implement asynchronous intra-BSC (but inter-BTS) handover.

Changes:
* introduce new DHO log category
* extend rsl_chan_activate_lchan() with argument for HO reference
* introduce actual minimal handover decision making in handover_decision.c
* various fixes to bsc_handover_start() in  handover_logic.c
2009-12-17 00:31:10 +01:00
Harald Welte a43f789a0a Replace template-based SYSTEM INFORMATION with real implementation
Before this commit, OpenBSC used templates for the SYSTEM INFO
1, 2, 3, 4, 5 and 6 messages.  Those templates were patched in
various places to reflect the network config like ARFCN.

Now, we actually generate those SI messages ourselves, using
values from the configuration file, and even calculating neighbor
cell lists.

All bts'es that you have configured in OpenBSC will end up in
the neighbor cell list - which should be more than sufficient for
the current small-single-site networks.
2009-12-01 18:04:30 +05:30
Harald Welte 798418a068 [handover] Implement handover control logic
Code to implement handover control logic.  A yet-to-be-implemented
handover algorithm will call bsc_handover_start(old_lchan, new_bts)
to start the handover process.
2009-11-29 22:56:14 +01:00
Holger Hans Peter Freyther 7466351026 [misc] Fix the make distcheck
Mention the two new header files, do not list isdnsync twice
2009-11-20 17:58:52 +01:00
Holger Hans Peter Freyther 338fa562c0 [mgcp] Add telnet interface for mgcp. 2009-11-20 14:05:17 +01:00
Holger Hans Peter Freyther f67945f004 [mgcp] Add a simple mgcp gateway used for the BSC
The python script is a simple call-agent driving the
client. Currently it is sending a AuditEndpoint message
and is printing the result.

The bsc_mgcp.c is a standalone process that will implement
a MGCP Gateway for the MSC. On call handling the Call-Agent
will ask the Gateway to "CreateConnection" and then this
gateway needs to communicate with OpenBSC.

Currently CreateConnection,ModifiyConnection,DeleteConnection
and Endpoint auditing is implemented.

[mgcp] Send RSIP on start and on first receive of any message

Ignore the first request and send a RSIP. We do that because
we might tunnel UDP through some other things and have no direct
way to connect to the call-agent.
Also the transaction is not checked and we ignore the response
from the call-agent, actually we print the '200 ' or any other
value as unhandled...

[mgcp] Print the MGCP command next to the response code

This allows to see which commands were sent by the server

mgcp: Terminate it with a new line

[mgcp] Make number of endpoints static...

For now this is fixed to the number of endpoints as of the GSM
specification...

[mgcp] The endpoint names seem to be base 16... use strtoul to parse

Use strtoul to parse the base 16 number from the mgw string.

[mgcp] Log the endpoints as hex numbers...

[mgcp] Only send the RSIP on the first incoming message..

Remove call_agent option (also remove the number from the getopt
call).

[mgcp] Start couting at 1 for the mgcp

[mgcp] Slight attempt to improve the grammar of the strings

[mgcp] Share validation routines between DLCX and MDCX

[mgcp] Remove help for dead config options

[mgcp] Specify a different IN addr in the SDP records

In case of NAT traversal be able to listen on a given
interface (like 127.0.0.1) but claim to receive data
at the beginning of the tunnel.

[mgcp] Fix the static copy of the SDP file

WIP verify out factoring broken..

[mgcp] Introduce VTY to the mgcp for config file parsing...

Parse the MGCP config file via the VTY framework.

[mgcp] Handle SDP parameters through VTY..

Currently the payload type, name and rate can be specified
in the config file.

[mgcp] Add an option to bind all rtp ports early

This can be useful for testing and in deployment to make sure
no runtime resource limit can be hit.

[mgcp] Add some API doc comment

[mgcp] Convert the packets of the example server to ascii

This will allow to easily patch the call id... to run the
server in a loop and make it work with the mediagateway

[mgcp] Assign CI_UNUSED... to be more obvious...

[mgcp] Use DEBUG and not DEBUGPC and specially not printf

Improve the logging a bit in the mgcp

[mgcp] Change the fake server to change the call id

This assume the call-agent will just increment the id
as well.... this is true for our implementation

[mgcp] Generate the transaction id dynamically..

This way wireshark will be more happy about it...

[mgcp] Recognize responses from the network..

This is just recognizing the response code and
then is doing nothing with it. Also change the
script to generate response messages...

[mgcp] Improve debug messages for CRCX/MDCX..

Log on which ports the media gateway is listening
and where the other (server) gateway is located
2009-11-20 14:05:04 +01:00
Holger Hans Peter Freyther ac96770ad7 [sccp] Implement parts of ITU SCCP for use in the A-Interface
include/sccp/sccp_types.h contain Q.713 and GSM definitions
include/sccp/sccp.h is the application interface resembling
                    the esentials of the UNIX socket interface.

src/sccp.c is the actual implementation of SCCP featuring
           connection and UDT1 support.

tests/sccp/sccp.c is testing connection creation and formating
                  of the SCCP messages used by the A-interface. And
                  it contains a simple fuzzing test to test the
                  robustnes of the implementation.
2009-11-20 13:09:15 +01:00
Harald Welte a148233b5e Add "silent call" feature to OpenBSC
This allows the administrator to use the vty interface to issue a silent
call to a given subscriber by using
	"subscriber extension XXXX silent call start"
and stopping that silent call with
	"subscriber extension XXXX silent call stop"
2009-11-14 10:08:40 +01:00
Harald Welte 6eafe9137c Add USDD code from Mike Haben
This is the initial checkin of the USSD code from Mike Haben.  I didn't
put it in the main branch as I think it still needs some cleanup.
2009-10-26 20:39:25 +01:00
Holger Hans Peter Freyther 8b457fb350 [bsc_init] Create a bsc_init.c that can be used for setting up hings.
Share the initialization and bootstraping of the network by moving
the code to a new file and making boostrap_network and shutdown_net
external.

Cleanup the header list after the move and remove trailing whitespace.
2009-08-17 09:52:42 +02:00
Holger Hans Peter Freyther cfa90d4165 [vty] Move layer3+ functionality to vty_interface_layer3.c
Move everything that is policy, requires access to a DB or is
generally in the domain of the MSC to vty_interface_layer3.c.
2009-08-17 09:52:42 +02:00
Holger Hans Peter Freyther 1494a768c1 [bsc] Move the GSM 04.08 helper functions to gsm_04_08_utils.c
The existing gsm_04_08.c implementation is mixing BSC and MSC
behavior. Move some simple parsing and generation functions over
to gsm_04_08_utils.c to allow a different MSC to define the policy.
2009-08-17 09:52:42 +02:00