Commit Graph

1480 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther 1d7f2f80b8 Merge remote branch 'origin/on-waves/mgcp' 2010-02-26 20:20:17 +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 140f6e9b12 [misc] Add LIBOSMOCORE_CFLAGS to the includes 2010-02-26 20:10:58 +01:00
Holger Hans Peter Freyther 36ed8cc4c3 [mgcp] Patch the rtp payload depending on the direction.
The RTP header code is taken from the rtp_proxy, we will need
to figure out how to unite these properly in the long run.
2010-02-26 13:42:58 +01:00
Holger Hans Peter Freyther ef6bb25aa5 [mgcp] Keep track of the local and remote RTP payload type
Keep track of which RTP payload type to use for which direction.
2010-02-26 13:41:22 +01:00
Holger Hans Peter Freyther fe86d3c9f8 [mgcp] Introduce a policy CB for the MGCP protocol
The are three policies. Accept, Reject and Defer. This will
allow to handle network connections and such from the policy
callback instead of directly acting on it.
2010-02-26 13:37:05 +01:00
Holger Hans Peter Freyther a820c5f89d [mgcp] Fix two bugs in the protocol handling
In case of a wrongly formatted AUEP, CRCX, DLCX, MDCX the
transaction id pointer was a dangling pointer... Initialize
the transaction id to a static string..

Also fix a off by one bug. We want to extract four elements
from the MGCP message and not only 3... So a short AUEP message
made it us read too many things.
2010-02-26 13:32:55 +01:00
Holger Hans Peter Freyther 63f2db2ec9 [mgcp] Switch logging from notice to debug 2010-02-26 13:31:46 +01:00
Holger Hans Peter Freyther 154b9553f7 [mgcp] Add a method to free the endpoint. 2010-02-26 13:30:23 +01:00
Holger Hans Peter Freyther 2890d102c7 [rtp] Describe the struct in a way that it will work for Big Endian too
Play with the right bits on PPC.
2010-02-26 13:12:41 +01:00
Holger Hans Peter Freyther 590cd98842 [mgcp] Print the rtp_port number, do not assume it was already assigned. 2010-02-26 13:10:51 +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 6414a0cb22 [mgcp] Make the creation of the mgcp message public. 2010-02-22 12:09:41 +01:00
Holger Hans Peter Freyther 8d188eda15 [mgcp] Cleanup the code. send_ was a misleading name
The send_ methods stopped to send the MGCP messages but was
changed to actually just create a msgb_ that can be sent to
a mediagateway. Rename the methods now.
2010-02-22 12:09:39 +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 1ed97629ad remove libosmocore from openbsc
From now on, you will have to obtain, build and install libosmocore
before being able to build openbsc.  Sorry for that.  But I hope
it's a small price to pay for having no code duplication with our
work on the phone side GSM stack!
2010-02-20 23:22:54 +01:00
Harald Welte 8427e2e5df update .gitignore file 2010-02-20 20:58:06 +01:00
Harald Welte 7756235562 make sure libosmocom builds when cross-compiling for ARM without OS
This is required to build the library and be able to use it from
within OsmocomBB.
2010-02-20 20:14:01 +01:00
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