Commit Graph

1462 Commits

Author SHA1 Message Date
Harald Welte 75135413cb u_int8_t -> uint8_t 2010-02-20 20:13:36 +01:00
Harald Welte 9ff1eabcd3 convert from u_int*_t to u_int*_t (stdint.h format) 2010-02-20 19:14:22 +01:00
Harald Welte a3d5514c21 change from u_int* to uint* (stdint.h) 2010-02-20 19:10:44 +01:00
Harald Welte 13f52974e6 move GSM protocol definitions to include/osmocore/protocol/* 2010-02-20 18:56:00 +01:00
Harald Welte 5998d114f5 add gsmtap.h 2010-02-20 18:43:19 +01:00
Harald Welte 5d720b11e8 add .gitignore to libosmocom 2010-02-20 17:30:47 +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 9442c1b9ba Merge branch 'on-waves/sccp' 2010-02-20 00:38:20 +01:00
Holger Hans Peter Freyther e2c5028dc4 [sccp] Use msgb->l2h instead of msgb->data for CR
Using msgb->data only works as long as msgb->data == msgb->l2h.. In
the case of receiving a MSU unit from a E1 link, or even receiving
the IPA header we will have some non SCCP data at msgb->data and then
cast garbage to what we think is making sense..
Use msgb->l2h and everything is fine.
2010-02-20 00:36:03 +01:00
Holger Hans Peter Freyther 4d2d95b35a ipaccess.c: Fix some resource leaks in error conditions.
* Close the socket when the bind is failing.
* Close the socket when the listen is failing.
* Close the socket then the bsc_register_fd is failing.
* Return an error when the socket call is not returning a socket.
2010-02-19 13:07:05 +01:00
Holger Hans Peter Freyther 1fdbf40e8a Install gsm_04_08.h and required headers into a openbsc/ 2010-02-16 17:51:42 +01:00
Holger Hans Peter Freyther 62c87b5237 Merge branch 'on-waves/sccp' 2010-02-14 19:27:52 +01:00
Holger Hans Peter Freyther b2abbe8a93 [sccp] Make the bitfields work on big endian machines too
* Use the endian.h to fogure out for which endianess we are
  building and then use the bitfields in reverse order
2010-02-14 19:27:16 +01:00
Holger Hans Peter Freyther 8fabf514ef [sccp] Set the data_len when parsing UDT messages as well
For UDT the msgb_l3len can be safely used but it is better
to set it to data_len for everyone..
2010-02-12 23:08:21 +01:00
Holger Hans Peter Freyther 7184c2d7d2 Merge branch 'on-waves/sccp' 2010-02-12 22:52:12 +01:00
Holger Hans Peter Freyther 8a69cb2d99 [sccp] Make the file includable outside of OpenBSC 2010-02-12 22:51:24 +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 6d89dac721 [msgb] Make it possible to include it directly and from liblaf0rge
* include <sys/types.h> to have a definition of the u_intX_t types
* include "linuxlist.h" via local includes so it can be found from
  the liblaf0rge directory where <openbsc/ does not exit.
2010-02-12 01:47:10 +01:00
Holger Hans Peter Freyther 245d17bd88 misc: Include the linuxlist header via a local include
This is needed for the lib where the include directory
is not called openbsc/.
2010-02-10 00:56:04 +01:00
Holger Hans Peter Freyther 6b46c474e5 liblaforge: Fix the .pc file. The preferred way to include is <laf0rge/foo.h> 2010-02-09 22:14:35 +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 701d175653 [tlv] Implement a variant for the IDTAG list for the IPA
Implement a helper that will allow to easily fill the
tag list with data.
2010-02-09 17:40:59 +01:00
Holger Hans Peter Freyther fb0b6fcaea [bsc] Allow to set a EGSM900, RGSM900 ARFCN
For R-GSM900 the channels 955-1023 are within the 900er band. The
System Information Type generation can not cope with these channels yet.
2010-02-09 17:40:49 +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 f5b36cac6b [telnet] Remove ancient #define... 2010-02-07 13:19:54 +01:00
Holger Hans Peter Freyther 3cb2890e56 [sccp] Slightly improve the log message 2010-02-03 18:19:05 +01:00
Holger Hans Peter Freyther 6ae657228c [sccp] Refer to the right Company in the Copyright/Copyleft line
Use On-Waves instead of the name I made up from the domain name.
2010-02-03 18:17:49 +01:00
Holger Hans Peter Freyther 67f5003caa Merge branch 'master' into on-waves/sccp 2010-02-03 18:15:05 +01:00
Holger Hans Peter Freyther 9377528c70 Merge branch 'on-waves/mgcp' 2010-02-03 18:11:22 +01:00
Holger Hans Peter Freyther 92026f1cef [mgcp] Refer to the right Company in the Copyright/Copyleft line
Use On-Waves instead of the name I made up from the domain name.
2010-02-03 18:10:07 +01:00
Holger Hans Peter Freyther 62e836c533 [mgcp] Make the mgcp_protocol generate a struct msgb*
Do not directly send data from inside the mgcp_protocol.c
implementation. Instead allocate and return a struct msgb*. The
caller can then either wrap that into the IPA protcol or directly
send it over the UDP socket.
2010-02-03 11:03:45 +01:00
Holger Hans Peter Freyther 77f7afe08e [mgcp] Prepare the in process MGCP handling by adding callbacks
* Call a callback when the endpoint was created, modified or deleted. This
  can be used by the BSC MUX to send a MGCP packet over TCP to the right
  the BSC to allocate the endpoint there with the right data, or it can be
  used in the BSC to send the right commands to the BTS.
2010-02-03 09:54:43 +01:00
Holger Hans Peter Freyther 2ada71de64 [mgcp] Replace DEBUGP with the LOGP statement
* Classify messages as LOGL_INFO or LOGL_ERROR
2010-02-03 09:13:10 +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
Holger Hans Peter Freyther e01ee97cd3 [mgcp] In forward mode we need to rediscover the BTS more often
In plain forward mode we don't have DLCX which will clean
and reset the configuration. We will need to remember the
last GSM BTS port and send data to it.
2010-02-01 13:17:04 +01:00
Holger Hans Peter Freyther 9100e1dea4 [mgcp] Handle BTS and NET being on the same host
* Do not only check the IP but also the port to figure out
  where to send the data
* Do not memset the endp->remote inside the bind_rtp but from
  inside the crcx as this will be modified by the MDCX
2010-02-01 13:16:53 +01:00
Holger Hans Peter Freyther 9b28fc8be2 [mgcp] Warn about unknown messages... 2010-02-01 13:16:44 +01:00
Holger Hans Peter Freyther bd5130d3c1 [mgcp] Allow to forward to a different port 2010-02-01 13:13:31 +01:00
Holger Hans Peter Freyther 6c79646089 [mgcp] Rename rtp and rtcp variables to net_rtp and net_rtcp
Rename the variables to refer to the fact that they are
the ports of the remote.

So we have:
    rtp_port as the local address we are binding to
    net_rtp  for the network rtp
    bsc_rtp  for the bsc rtp
2010-02-01 13:13:21 +01:00
Holger Hans Peter Freyther 601a67e274 [mgcp] Make it possible to not specify a bts ip
This way the mgcp will allow anyone to be the BTS..
in the future we might need to communicate things
properly between BSC and MGCP.
2010-02-01 13:13:11 +01:00
Holger Hans Peter Freyther caf49b4c14 [sccp] Implement sccp_parse_header to be used by the NAT code. 2010-01-29 04:36:48 +01:00
Holger Hans Peter Freyther ef84539fb7 [sccp] Split Connection DT1 into two parts
This is the last of supported messages to be split into a parse
and handle routine. Now all parse routines can be used by the NAT.
2010-01-29 04:36:38 +01:00
Holger Hans Peter Freyther 18c5cadc46 [sccp] Split Connection Release Complete into two parts 2010-01-29 04:36:29 +01:00