9
0
Fork 0
Commit Graph

236 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther aafa7c788e stats: Add rate_counter for more statistics on the MTP side 2011-01-22 16:22:18 +01:00
Holger Hans Peter Freyther eab20964b2 udp: Make the SNMP code asynchronous
Do not block the application when doing a SNMP request. Work
with the results coming back from the callback. Right now a
link can only be taken down and up.
2011-01-21 19:40:49 +01:00
Holger Hans Peter Freyther 4da421da6f udp: Make two snmp functions internal 2011-01-21 18:01:37 +01:00
Holger Hans Peter Freyther 083a30b9b8 udp: Poll SNMP for timeouts and fd every 100ms
This is the easiest way to integrate net-snmp with the event loop,
every 100ms we are going to check for timeouts or incoming messages
2011-01-21 18:01:36 +01:00
Holger Hans Peter Freyther f38114eee2 udp: Allow to run multiple links through the same socket
The UDP socket will be shared between multiple links, the
snmp session will be also shared between multiple links on
the same hardware.
2011-01-21 18:01:36 +01:00
Holger Hans Peter Freyther e250ac3f4b msc: Fix crash due pong timeout started from a msc reset
This is fixing a crash that is caused by the MTP link going
down/up and the main routines asking to send a reset to the
MSC. The sending of a reset is triggering the ping/pong
timeouts. In case there is no MSC connection we could crash.
2011-01-21 12:58:08 +01:00
Holger Hans Peter Freyther 050577a088 mtp: Return SLTA on the same SLS, send SLTM with a static sls
Derive the SLS from the static link_no we have assigned.
2011-01-20 19:28:15 +01:00
Holger Hans Peter Freyther 95057b9237 mtp: Send the SLTM/SLTA on the link directly
For both the SLTM that the app is sending and the SLTM we
are receiving we don't want to go through the SLC.
2011-01-20 19:07:16 +01:00
Holger Hans Peter Freyther 1cc24561b0 mtp: Count the links in a linkset 2011-01-20 19:07:16 +01:00
Holger Hans Peter Freyther fa8cf2d938 mtp: Create a method for a link failure to restart the link.
Make sure that a failed link will be restarted by calling the
reset method which should take the link down.
2011-01-20 19:07:16 +01:00
Holger Hans Peter Freyther 9b8a4a7f49 mtp: Remove the unused linkset_sccp_down routine as it is not used 2011-01-20 19:07:16 +01:00
Holger Hans Peter Freyther a8ce061d86 mtp: Move the link testing into a new file for mtp_link
The link testing should work under the linkset and if the
SLTM is failing the link should be taken down and it should
be restarted.
2011-01-20 19:07:16 +01:00
Holger Hans Peter Freyther 2d845fca0c mtp: Rename the the_link to set as it is a link set 2011-01-20 15:44:14 +01:00
Holger Hans Peter Freyther b4b747d7f7 mtp: Stop assigning the link_set it will be done in mtpl3 2011-01-20 15:39:40 +01:00
Holger Hans Peter Freyther 1349584c26 mtp: Start the linktest directly
No need for delaying the linktest, start it directly when
the linkset should come up
2011-01-20 15:08:57 +01:00
Holger Hans Peter Freyther 606eae8ece mtp: Send the TFP/TRA once the first link is available
Instead of sending SCCP TFP/TRA as a response to a TRA
the code will now send one as a response to the first
SLTA we receive in the linkset on the first link.
2011-01-20 14:23:10 +01:00
Holger Hans Peter Freyther 157de2a8ab mtp: Only respond to regular maintainenance for our code point 2011-01-20 13:11:29 +01:00
Holger Hans Peter Freyther 69e71e0670 isup: Attempt a short cut in the link bring up by sending a unblock
Attempt to unblock all circuits after the Gateway has blocked them. In
the ISUP spec we would need to go through the continuity test and such.
2011-01-20 11:49:39 +01:00
Holger Hans Peter Freyther 8f6eb5e688 isup: Handle a CGB with a CGBA and claim all circuits to be blocked
This is to help the Exchange B to go through the start procedure.
2011-01-20 11:49:39 +01:00
Holger Hans Peter Freyther ecd835500e isup: Make status parsing and status response be generic 2011-01-20 11:49:39 +01:00
Holger Hans Peter Freyther 6e11bee8cf isup: Attempt to handle a RSC on the exchange 2011-01-20 11:49:39 +01:00
Holger Hans Peter Freyther d8a73e24d2 isup: Allow to have a different OPC for ISUP messages. 2011-01-20 11:49:39 +01:00
Holger Hans Peter Freyther a4661fb228 isup: Fix the lebgth check in this packet 2011-01-20 11:49:39 +01:00
Holger Hans Peter Freyther cfbe80febb mtp: Send a TFA for the point codes we are routing to. 2011-01-20 11:37:50 +01:00
Holger Hans Peter Freyther adf7692031 mtp: Send TRA messages on all affected point codes 2011-01-20 11:37:50 +01:00
Holger Hans Peter Freyther 27c5e2357f mtp: Send the TFP for every POC we want to handle. 2011-01-20 11:37:50 +01:00
Holger Hans Peter Freyther bee2ed18c7 mtp: Make the input path work on a specific link of the linkset 2011-01-20 11:37:50 +01:00
Holger Hans Peter Freyther 84899a484c stp: Set the pcap fd properly... WIP merge this 2011-01-20 11:37:50 +01:00
Holger Hans Peter Freyther efbd8c2e80 stp: Allow to forward all ISUP messages without any modification 2011-01-20 11:37:50 +01:00
Holger Hans Peter Freyther 1b6901ec4a stp: Forward unhandled ISUP from one end to another 2011-01-20 11:37:50 +01:00
Holger Hans Peter Freyther 9cf11bc109 stp: Create a M2UA link by hand and connect the SCCP routines
This is a hacked version that will just forward SCCP from one
linkset to another one. It is missing configuration and ISUP.
2011-01-20 11:37:50 +01:00
Holger Hans Peter Freyther a93b83bf99 stp: Begin to implement a signalling transfer point
This is creating a new application that will be a signalling
transfer point. Right now it is a stripped down version of
the udt_relay, which is a stripped down version of cellmgr_ng.
2011-01-20 11:37:50 +01:00
Holger Hans Peter Freyther 92affdad72 mtp: Do not send anything in case the there is no link
If there is no usable link in the linkset we should not try
to send. This assumes that all incoming packages come from
links that are up. We do not check this right now but we
will have to check this.
2011-01-20 11:37:49 +01:00
Holger Hans Peter Freyther 101cd0bc83 mtp: Send the SSA/SSP for the apoc and assn of the request 2011-01-20 11:37:49 +01:00
Holger Hans Peter Freyther df8597aeea mtp: Send the SSA with the affected POC for SCCP. 2011-01-20 11:37:49 +01:00
Holger Hans Peter Freyther c17852ee34 m2ua: Write MTP packets to the pcap file if requested. 2011-01-20 11:37:49 +01:00
Holger Hans Peter Freyther d70a7e8e79 m2ua: Create a MTP Link class using SCTP/M2UA for the transport
This is a MTP Link that can be used with a MTP LinkSet. E.g. with
some config changes one could use cellmgr_ng or udt_relay over a
M2UA link.
2011-01-17 14:45:15 +01:00
Holger Hans Peter Freyther 0e2f9116f8 mtp: Rename link_data to mtp_link and move out the transport specific things
Rename link_data to mtp_link and move it into the mtp_data header
file, also remove the union to ease creating more of the subtypes.

This is done in preparation to the linkset knowing more about the
link (e.g. having a link test per link instead of per link).
2011-01-17 14:11:26 +01:00
Holger Hans Peter Freyther d91f94024e mtp: Create the SLC with all links 2011-01-17 11:27:32 +01:00
Holger Hans Peter Freyther 0f833b084b mtp: take the linkset down when the last link is failing 2011-01-17 11:27:01 +01:00
Holger Hans Peter Freyther 85e17d1224 mtp: Remove the forced_down as it is never read in that application 2011-01-17 11:27:00 +01:00
Holger Hans Peter Freyther fe72c160e2 mtp: Turn the MTPl2 link into a list of links. 2011-01-17 11:27:00 +01:00
Holger Hans Peter Freyther 069e635413 mtp: Keep an array for the SLS -> SLC mapping for active links. 2011-01-17 11:21:12 +01:00
Holger Hans Peter Freyther 644aafbc94 mtp: Make the link_data be a child of the link_set
Change the order of the link and linkset. The link will be
below the linkset. This change should make it more easy to
introduce multiple linksets.
2011-01-17 11:21:11 +01:00
Holger Hans Peter Freyther c8405692b3 mtp: Propagate link and linkset failures in two stages
Handle a single link failure in links.c and if all the
links have failed propagate it up. This is preparing the
multiple links support.
2011-01-17 11:21:11 +01:00
Holger Hans Peter Freyther 569f1e171d mtp: Rename mtp_link to mtp_link_set as this is the linkset
The link_udp is actually below the linkset. We need to get this
right now and then can have multiple links.
2011-01-17 11:21:11 +01:00
Holger Hans Peter Freyther 346e1c4bc4 mtp: Attempt to select the sls properly in the round robin fashion
When we call the submit method with a SLS of -1 we will try
to find the next SLS to do things in a round robin way.
2011-01-17 11:21:10 +01:00
Holger Hans Peter Freyther 45738887be mtp: Kill the link variable from the mtp link. 2011-01-17 11:21:10 +01:00
Holger Hans Peter Freyther b6edf97481 linkset: Prepare the UDP support to support multiple links. 2011-01-17 11:21:10 +01:00
Holger Hans Peter Freyther 016ba29ec2 msc: Remove the msc_clear_queue now that it is not needed 2011-01-17 11:21:10 +01:00
Holger Hans Peter Freyther f19afaed7b sccp: Stop queueing messages between SLTM messages
Remove the queueing of messages that was added during a debugging
session and should not be needed. This will simply bringing down
the linkset.
2011-01-17 11:21:09 +01:00
Holger Hans Peter Freyther a99b04b700 mtp: Move the link code into a new file called links. 2011-01-17 11:21:09 +01:00
Holger Hans Peter Freyther f9b4a86e8d misc: Remove the link_c7 dummy methods 2011-01-17 11:21:09 +01:00
Holger Hans Peter Freyther de56c22702 license: Switch to the GNU AGPLv3 for this network service 2011-01-16 20:35:13 +01:00
Holger Hans Peter Freyther ea853044c8 mgcp: Merge from master. Fix some issues with the new code 2011-01-07 11:38:00 +01:00
Holger Hans Peter Freyther 7e0936ee52 mgcp: Merge new mgcp_protocol to parse digital trunks. 2011-01-06 19:50:32 +01:00
Holger Hans Peter Freyther 7a72556577 mtp: Allow to have a different POC for SCCP 2011-01-01 13:34:58 +01:00
Holger Hans Peter Freyther ff9cd6f8f6 mtp: Well we do not wait for the SST any more but start transmitting. 2010-12-31 21:47:14 +01:00
Holger Hans Peter Freyther 0945961af3 mtp: Add some SSNs we want to handle.
This should be really configurable. SSN=1 should always lead to a
SSA, the others depend on what we run on our end of the link.
2010-12-31 16:54:04 +01:00
Holger Hans Peter Freyther 80ab4c6066 mtp: Implement the subsystem test and respond with a SSP/SSA
The SCMG handling should be moved to a different file. Right
now the list of supported SSNs is not configurable but it should.
2010-12-31 13:40:19 +01:00
Holger Hans Peter Freyther eefd72cd74 mtp: Remove the flood feature as the issue has been debugged
The issue with paging messages with a PointCode and the too
long queue has been fixed by rewriting the header.
2010-12-20 17:24:23 +01:00
Holger Hans Peter Freyther 882082c1f6 mgcp: Fix the adaptation name for the config options 2010-12-20 17:21:26 +01:00
Holger Hans Peter Freyther 2c472a3f7b mgcp: Fix the management objects 2010-12-20 17:21:26 +01:00
Holger Hans Peter Freyther d10a3c1b4a mtp: Attempt to fix the SCCP restart logic.
The SST is not necessary. We will have to assume the link is
established after having gotten the TRA on the Affected Point Code
and we will need to always handle the restart allowed.
2010-12-10 13:22:46 +01:00
Holger Hans Peter Freyther 3aad776b28 isup: Respond to a ISUP GRS with a GRA. 2010-12-10 13:22:46 +01:00
Holger Hans Peter Freyther 433ea2f037 isup: Implement handling GRS and GRA messages for ISUP. 2010-12-10 13:22:46 +01:00
Holger Hans Peter Freyther c21cfaa023 isup: Start parsing the ISUP messages
Introduce a ISUP debug category, parse the reset circuit
message, add a test case for this easy parsing.
2010-12-10 13:22:46 +01:00
Holger Hans Peter Freyther ae7418177e mtp: Print a TFP message on the screen when we get a message 2010-12-08 11:28:12 +01:00
Holger Hans Peter Freyther 3a80cb2593 mtp: Prepare ISUP handling, just print the ISUP part. 2010-12-08 11:12:46 +01:00
Holger Hans Peter Freyther 1291ce5f8c mtp: Print un-handled messages 2010-12-08 11:10:34 +01:00
Holger Hans Peter Freyther 8220b94064 udt_relay: Remove the abort and return a NULL pointer after a message 2010-12-08 10:08:40 +01:00
Holger Hans Peter Freyther 396282ef8e udt_relay: Initialize the ni_ni as well here 2010-12-08 10:08:14 +01:00
Holger Hans Peter Freyther 8fa8e584dd mgcp: Add config options for some GAIN options, apply them. 2010-12-01 23:45:22 +01:00
Holger Hans Peter Freyther 3bbb58bfdb mtp: Group all MTP settings together. 2010-11-26 21:25:38 +01:00
Holger Hans Peter Freyther b38b33b884 mtp: Make the spare/ni configurable 2010-11-26 21:21:04 +01:00
Holger Hans Peter Freyther e976df1b5b mtp: Be able to set the spare bits in the network indicator 2010-11-26 21:07:11 +01:00
Holger Hans Peter Freyther 4e3e28e916 mtp: Store the NetworIndicator in the mtp_link and use it
Prepare to make the ni configurable and store it inside the
mtp_link where it can be changed by the user of the mtp_link.
Initialize this to the current value.
2010-11-26 21:05:39 +01:00
Holger Hans Peter Freyther 2a9bf2b615 mtp: Set the network indicator in the mtp_msg_alloc
Prepare to have different network indicators.
2010-11-26 21:01:58 +01:00
Holger Hans Peter Freyther 7694381f52 udt: Add a forward_only to the bsc struct and use it for the msc_conn
Simply forward everything, no need for inspecting things.
2010-11-16 11:16:37 +01:00
Holger Hans Peter Freyther 594ee9a8c4 udt_relay: Add a forked copy of main to just relay messages
Do not run any of the header rewriting for messages. This will
simply relay SCCP friends to the MTP library. Some work on msc_conn.c
is needed to avoid calling most of it.
2010-11-16 11:03:19 +01:00
Holger Hans Peter Freyther ed3046339e mgcp: Print the extra settings from the config 2010-10-27 19:33:06 +02:00
Holger Hans Peter Freyther d25dfce4f5 assignment: An evil hack to include some fake IES..
Add stuff to the message...
2010-10-27 15:59:33 +02:00
Holger Hans Peter Freyther e3abeb1400 mgcp: Assume that on a MDCX all data is present...
Send a dummy packet on each MDCX message. This assumes
that the remote address is available by then and this
should fix not hearing the ringtone as the NAT didn't
know to which port to forward the data.
2010-10-18 19:37:32 +02:00
Holger Hans Peter Freyther 5d930f8745 mtp: Store the mtp_link inside the connection
Prepare to have multiple links to the BSC.
2010-10-08 23:18:15 +08:00
Holger Hans Peter Freyther dedb7ce3fe mtp: Ignore the spare bits as of Q.701 6.2
The sender is supposed to set them to 0 and we are asked
to ignore them. Apparently something called SIF is enabled
on the sender side.
2010-10-08 17:49:24 +08:00
Holger Hans Peter Freyther 5228069365 ussd: Pass the bsc_data to have access to the USSD message 2010-10-06 16:09:25 +08:00
Holger Hans Peter Freyther dfcf2df698 ussd: Create the hook where packages from the MSC pass by 2010-10-06 06:20:35 +08:00
Holger Hans Peter Freyther a4ca6d3947 msc: Create a function to send or queue messages. 2010-10-06 04:51:44 +08:00
Holger Hans Peter Freyther 0f349f2c6d ussd: Add the hook where we can capture the Location Updating Request 2010-10-06 04:39:08 +08:00
Holger Hans Peter Freyther 377ba4293a msc: Return an error if we close the fd 2010-10-01 20:37:40 +08:00
Holger Hans Peter Freyther 98f6dd5cdc msc: Stop the msc reconnect timer as well (possible bfd corruption fix)
It appears that we run into a PING timeout before we have received
the first message and then will try to close the connection tiwce.

Stop the msc_timeout when we close down the connection.
2010-10-01 20:30:53 +08:00
Holger Hans Peter Freyther 4776571989 bsc_ussd: Add a dummy USSD module...used for welcome SMS 2010-09-30 17:45:12 +08:00
Holger Hans Peter Freyther 35948551fd bsc: Move more sccp code into the bsc_sccp.c 2010-09-30 17:30:50 +08:00
Holger Hans Peter Freyther 1cb634a1e2 bsc: Refactor and move SCCP ConTrack to bsc_sccp.c
Move the code, update Makefile.am, add includes.
2010-09-30 16:10:17 +08:00
Holger Hans Peter Freyther 0e4e35fdd6 bsc: Be able to configure the LAC/MNC/MCC... 2010-09-30 03:04:28 +08:00
Holger Hans Peter Freyther b3e1068992 sccp: Move the SCCP connection out to a new structure. 2010-09-30 01:57:45 +08:00
Holger Hans Peter Freyther fdae5c9a7d vty: Add a telnet interface to the cellmgr 2010-09-30 01:01:03 +08:00
Holger Hans Peter Freyther 2656e8f4aa vty: Implement writing the config file 2010-09-30 00:41:37 +08:00
Holger Hans Peter Freyther 7942abc95d vty: Move the vty code to a new file, move config params. 2010-09-30 00:34:46 +08:00
Holger Hans Peter Freyther cdad4de330 mgcp: Only if this node is supposed to send data send a dummy packet
In case the gateway is configured as recvonly, do not send a dummy
load as this is against the policy.
2010-09-18 23:59:43 +08:00
Holger Hans Peter Freyther b988caa160 mgcp: Be able to parse the 'M: sendonly' as the connection param 2010-09-18 20:23:05 +08:00
Holger Hans Peter Freyther 95cac74e37 mgw: Add a realloc_cb that will give up the old endpoint
Free the endpoint if we need to realloc, the sequencing
and blocking will take care of everything.
2010-09-18 03:16:52 +08:00
Holger Hans Peter Freyther e40bc38c42 mgcp: Merge the realloc_cb from OpenBSC here. 2010-09-18 03:11:00 +08:00
Holger Hans Peter Freyther 33cdb7e027 mgcp: Add an option to force reallocating endpoints. 2010-09-17 22:03:47 +08:00
Holger Hans Peter Freyther 757f174e76 mgcp: Keep the data for the config in a global var again. 2010-09-17 22:03:08 +08:00
Holger Hans Peter Freyther 4bbfa274a4 Add a command to ask for the version number, generate a config file 2010-09-15 20:53:56 +08:00
Holger Hans Peter Freyther 5b08401701 mgcp: Use uint32_t for the CI in every place. 2010-08-08 07:51:51 +08:00
Holger Hans Peter Freyther 7b7c297c8f msc: Separate the BSC and MSC link completly...
Make the msc_conn responsible for creating the link to
the core network and reopening it, make the BTS code just
call the msc methods and the MSC will throw away data in
case it can not be forwarded.

This avoids a problem that we start a reconnect timer
while we have a connection in progress and then add the
same file descriptor twice. This is mostly a speculative
fix to the problem.
2010-08-07 05:41:06 +08:00
Holger Hans Peter Freyther e33d93c366 msc: Manage the msc_link_down only in the msc_conn.c
Only write to this property in the msc_conn context and
not from within the main procedure.
2010-08-07 02:40:35 +08:00
Holger Hans Peter Freyther 0c95c6ac93 msc: Rename closing to msc_link_down
This is the indicator if the MSC is connected and authenticated
or not. This name should be better than closing.
2010-08-07 02:39:37 +08:00
Holger Hans Peter Freyther 3e054ee556 msc: Use msc_clear_queue instead of custom clear code. 2010-08-07 02:32:44 +08:00
Holger Hans Peter Freyther 6258539928 msc: Use the msc_close_connection routine
Remove code duplication, the only difference is that the generic
callback pointer is not reset. But as we have lost the connection
we will go through the normnal connect again which will fix things.
2010-08-07 02:26:47 +08:00
Holger Hans Peter Freyther 71f4f355fa msc: Use the msc function to clear the queue 2010-08-07 02:00:32 +08:00
Holger Hans Peter Freyther 43d9eec14b msc: Make close_msc public, call it from main..
We would have not stopped the timer, fix that by only
having one function to close the connection to the msc.
2010-08-07 01:54:19 +08:00
Holger Hans Peter Freyther d5918ff9e4 mgcp: Add an option to enable/disable vad and enable it by default 2010-08-07 00:19:07 +08:00
Holger Hans Peter Freyther 5fb30572a6 mgcp: Move the MGCP_NODE number into a public header file 2010-08-07 00:19:06 +08:00
Holger Hans Peter Freyther e66c7c10ea cleanup: Remove code that is provided by libosmocore now.
libosmocore contains the GSM08.08 definition, no need to copy
that anymore.
2010-08-04 18:51:16 +08:00
Holger Hans Peter Freyther cf381e2447 Update SCCP includes for the new location of files. 2010-08-04 18:39:26 +08:00
Holger Hans Peter Freyther e807376257 mgcp_ss7: Move the vty code/params over to mgcp_vty.c
Share more code with the OpenBSC version of the VTY code
minus the changes to allow to parse a generic hostname
instead of an ip address.
2010-08-04 07:34:21 +08:00
Holger Hans Peter Freyther a174318a7b mgcp: Remove commands not used/wanted for the cellmgr_ng. 2010-08-04 07:28:39 +08:00
Holger Hans Peter Freyther f9e9977101 mgcp_ss7: Change the vty config to operate on the static g_cfg pointer
Work more like the other mgcp gateway and first allocate the config
and then apply the setting on it.. The next step will be to move to
the real vty code minus some bits.
2010-08-04 07:22:52 +08:00
Holger Hans Peter Freyther f41617bb11 mgcp: Allocate the mgcp config earlier.. 2010-08-04 07:08:33 +08:00
Holger Hans Peter Freyther fde865f18d mgcp: Add the OpenBSC VTY code almost 1:1 to here 2010-08-04 06:39:13 +08:00
Holger Hans Peter Freyther cc1a9384b0 mgcp_ss7: Add the telnet interface to the mgcp_ss7. 2010-08-04 06:24:51 +08:00
Holger Hans Peter Freyther d2c46d4644 mgcp_ss7: Add logging commands.. 2010-08-04 06:24:45 +08:00
Holger Hans Peter Freyther d86208d1ed mgcp: Update to the latest code drop. 2010-08-04 06:11:27 +08:00
Holger Hans Peter Freyther 73cdc5fd97 mgcp_ss7: Remove unnecessary code... 2010-08-04 06:09:14 +08:00
Holger Hans Peter Freyther 8c6b356d1c main: Fix linking of OpenBSC... 2010-08-04 06:09:14 +08:00
Holger Hans Peter Freyther 7a6e7361b5 main: Remove left overs from old code. 2010-08-04 06:09:14 +08:00
Holger Hans Peter Freyther d4310b9865 debug: Add a debug area to make the application link 2010-08-04 06:09:14 +08:00
Holger Hans Peter Freyther 48f4d63d8d main.c: Make the link_c7_init weak to make the application link 2010-08-04 06:09:13 +08:00
Holger Hans Peter Freyther cbf7d18bb9 Use libosmocore instead of the old temporary laF0rge1 lib.. 2010-08-04 06:08:40 +08:00
Holger Hans Peter Freyther 9ed3e1b3f3 u_int32_t -> uint32_t 2010-07-31 05:22:56 +08:00
Holger Hans Peter Freyther 585f3d90d1 u_int16_t -> uint16_t 2010-07-31 04:38:17 +08:00
Holger Hans Peter Freyther 5aa17014de u_int8_t -> uint8_t 2010-07-31 04:37:26 +08:00
Holger Hans Peter Freyther 97f66e2b53 Public release of the cellmgr_ng code to convert E1 to IPA SCCP 2010-07-28 03:36:32 +08:00