Holger Hans Peter Freyther
b84b5f61ac
nat: Free the endpoint when we get an empty CI.
...
In case the BSC is sending us an empty/unused CI we have
a bug, but for now let us free the endpoint and figure out
which response we are getting.
2010-08-06 08:34:46 +08:00
Holger Hans Peter Freyther
4634013cde
mgcp: Make the CI uint32_t all the way to avoid mismatch
2010-08-06 08:29:37 +08:00
Holger Hans Peter Freyther
9c31cfc3a2
nat: Provide information of when a msg does not contain a CI
...
When we fail to find a CI in a message that should contain it
then print the message so we can analyze the issue and improve
the code later on.
2010-08-06 08:19:05 +08:00
Holger Hans Peter Freyther
d5e6c2374b
nat: Use the mgcp_config_alloc to have defaults initialized
...
Initialize the net_base properly and benefit from future
config changes but also reset certain defauls that we do
not want at the nat.
2010-08-05 19:17:25 +08:00
Holger Hans Peter Freyther
58ff219c85
mgcp: Attempt to separate the RTP/RTCP port for the Network and for the BTS
...
We plan to have two different ports for the network and for the
BTS to avoid detecting the BTS and to dynamically allocate the
port to have old data not go to a new socket.
2010-08-05 06:10:57 +08:00
Holger Hans Peter Freyther
a17d701a70
mgcp: Group the state for bts/net into a struct and have two instances
...
Group the data that each end (network/bts) have into a struct and use
this struct throughout the sourcecode.
2010-08-05 06:10:54 +08:00
Holger Hans Peter Freyther
e66cac359e
nat: Fix the spelling of that comment.
2010-08-05 06:04:13 +08:00
Holger Hans Peter Freyther
cbfd09843a
nat: Show if we are connected to the MSC.
2010-08-04 02:34:10 +08:00
Holger Hans Peter Freyther
a99c5b9d0f
nat: Count the number of connects to the MSC.
2010-08-04 02:31:55 +08:00
Holger Hans Peter Freyther
03a0ad08cf
nat: Indent the connected... to make it belong to the BSC group
2010-08-04 02:29:03 +08:00
Harald Welte
d5db12c160
Use new include paths of libosmo-sccp 0.0.2
2010-08-03 15:11:51 +02:00
Holger Hans Peter Freyther
c2b31ed9cd
nat: Fix compilation with nat not being enabled.
...
common_vty.c was including bsc_nat.h which tried to
get the sccp/sccp_types.h which is not required to be
installed. Move all structs using/embedding SCCP structures
into the bsc_nat_sccp.h and include. This should fix
the compilation.
2010-07-31 05:20:31 +08:00
Holger Hans Peter Freyther
30e1ae923d
sccp: Use the external libosmo-sccp as sccp implementation
...
Add --enable-nat and --enable-osmo-bsc to build applications
requiring the Osmo SCCP library to be installed. We are not
using autodiscover as this is out of fashion.
2010-07-31 04:09:38 +08:00
Holger Hans Peter Freyther
6b7710739a
nat: Rename ip-tos to ip-dscp and provide an alias...
2010-07-27 19:21:53 +08:00
Holger Hans Peter Freyther
8d7b10ef58
nat: Clang reported two places with garbage data
...
Initialize the variables to NULL to fix it.
2010-07-23 19:43:12 +08:00
Holger Hans Peter Freyther
306e2bc724
nat: u_int32_t -> uint32_t
2010-07-23 19:09:51 +08:00
Holger Hans Peter Freyther
e2c1520a71
nat: u_int16_t -> uint16_t
2010-07-23 19:09:21 +08:00
Holger Hans Peter Freyther
dbd16fe59a
nat: u_int8_t -> uint8_t
2010-07-23 19:08:55 +08:00
Holger Hans Peter Freyther
f21e453dc9
nat: Provide an easy view to see if something is connected to the NAT.
2010-07-22 20:37:35 +08:00
Holger Hans Peter Freyther
c95cfda58d
nat: Introduce a show statistics-by-lac LAC
...
Currently show show statistics only work by given the internal
configuration number, add a version that is working by LAC of
the BSC.
2010-07-22 20:26:10 +08:00
Holger Hans Peter Freyther
d1d45b3b89
nat: Remove the first_contact variable.
2010-07-05 14:47:15 +08:00
Holger Hans Peter Freyther
20ee312d5c
nat: Create a method to determine if any MSC is connected.
...
In the future we will have multiple MSC connections so we will
need to figure if any of them is active.
2010-07-05 14:39:44 +08:00
Holger Hans Peter Freyther
bec411b9db
nat: Store the msc_con in the data of the bsc_fd
...
* Stop using nat->msc_con in the read_cb but use the data.
2010-07-05 14:30:21 +08:00
Holger Hans Peter Freyther
db65bbd515
nat: Make queue_for_msc use the msc_con parameter, pass in the right msc_con
...
* Return msg'es to the right MSC Con. Right now it is nat->msc_con.
* When forwarding from BSC to MSC, use the msc_con inside the
sccp_connections. This means we will only forward data with a
connection to the BSC.
2010-07-05 14:30:14 +08:00
Holger Hans Peter Freyther
3a77e61033
nat: Keep track of the MSC handling the connection.
...
In the future we might have multiple MSCs connected
and need to dispatch it to the right one.
2010-07-05 13:33:18 +08:00
Holger Hans Peter Freyther
71d36b3d04
nat: Add spaces to the desc to align it properly on the vty output
2010-06-17 18:31:18 +08:00
Holger Hans Peter Freyther
8330c1c386
nat: Count the number of dropped SCCP and MGCP calls as well.
...
Count the number of dropped calls and lost SCCP connections
due the loss of a connection to the BSC...
2010-06-17 18:29:42 +08:00
Holger Hans Peter Freyther
b2c38ebb1f
nat: Switch per BSC counters to the rate ctr.
...
This is switching the simple statistics to the rate counter
and is updating all users...
2010-06-17 18:18:12 +08:00
Holger Hans Peter Freyther
9764331062
bsc_api: Move gsm48_rcvmsg into the BSC API and dispatch.
...
The next step in the way to the BSC API. We have a clear a
new connection was opened signal now... and the MSC could
use it...
2010-06-17 16:41:25 +08:00
Holger Hans Peter Freyther
7b4a53d537
nat: Rename BSC_NODE to NAT_BSC_NODE to avoid future issues.
2010-06-17 14:42:20 +08:00
Holger Hans Peter Freyther
9c78697fa2
nat: Add the exit/end command to the NAT config nodes.
2010-06-17 14:39:15 +08:00
Holger Hans Peter Freyther
28e2988ce2
nat: Add the OSMO NAT to the build process.
2010-06-15 20:31:43 +08:00
Holger Hans Peter Freyther
1398f13a64
nat: Attempt to update the VTY usage to the latest version
...
* Install the show commands to be available in the enable mode as well
* Provide a copyright header..
2010-06-15 20:31:35 +08:00
Holger Hans Peter Freyther
69d801e23a
nat: Do not use the bssap.h include as it does not exist in this branch.
2010-06-15 20:24:21 +08:00
Holger Hans Peter Freyther
27d36de3b9
nat: Fix the access-list-name command...
...
We have added two commands with the same name to the tree..
the second one should have been the BSC...
2010-06-15 20:24:21 +08:00
Holger Hans Peter Freyther
26c3a358d6
nat: Add both entries to the tail to keep the order they are inserted
2010-06-15 20:24:21 +08:00
Holger Hans Peter Freyther
d77c8171aa
nat: Allow to specify multiple entries in the access-list...
...
Inside the access-list we have a list of entries that have
either one allow or one deny rule... we do not allow to remove
a single rule but one has to remove the whole list, in that case
talloc will handle cleaning all entries.
Right now the matching is O(n*m) as we traverse the list
(multiple times) and run the regexp multiple times. One
way to make it faster would be to concat all regexps into
one.
2010-06-15 20:24:21 +08:00
Holger Hans Peter Freyther
29c67039fe
nat: Shorten the access-list struct and method names (still way too long)
2010-06-15 20:24:21 +08:00
Holger Hans Peter Freyther
e4900a074a
[nat] Implement the removal of an access-list.
2010-06-15 20:24:21 +08:00
Holger Hans Peter Freyther
f0c3e912e3
[nat] Fix the parsing of the access-list regexp...
...
We need to start at argv[1] for the regexp of
this access-list, also subtract one from number
of items..
2010-06-15 20:24:21 +08:00
Holger Hans Peter Freyther
86c4dc3a0e
[nat] Fix VTY bug with access-lists...
...
vty->index does not hold a BSC Config at this point as we are
on the nat level... use the global _nat pointer for now...
2010-06-15 20:24:21 +08:00
Holger Hans Peter Freyther
8affef5059
[nat] Introduce the concept of access-list
...
One can set one access-list to one BSC and one
access-list to one NAT. The matching of IMSIs
remains the same for now, also applying the
white/blacklist. Access lists can not be deleted
for now and no perf opt is done (e.g. one could
cache the result of the last lookup in the bsc
struct).
2010-06-15 20:24:21 +08:00
Holger Hans Peter Freyther
078321aaae
[nat] Add ip-tos option to the nat.
...
This is applied to all incoming BSC connections.
2010-06-15 20:24:21 +08:00
Holger Hans Peter Freyther
ca999a989d
msc: Add msc ip-tos NR option for the BSC
...
Allow to set the TOS field via the VTY interface. The
SO_PRIORITY was not used as it has no effect on the
packets being sent (in contrast to the documentation).
2010-06-15 20:24:20 +08:00
Holger Hans Peter Freyther
b71c23bb0a
[nat] Make the refusal more complicated to support more MSCs
...
We will need to confirm the connection, then we can send the
GSM48 message, then we need to close the connection... the
embedding in the refusal method was way too easy..
2010-06-15 20:24:20 +08:00
Holger Hans Peter Freyther
fa20c94456
[nat] Make create_sccp_src_ref return the SCCP Connection.
...
Right now it was not possible to just find a connection, by returning
the connection that is created we will have direct access to it. It
will be used by the local connection handling.
2010-06-15 20:24:20 +08:00
Holger Hans Peter Freyther
e1fb5670cd
[nat] Remove parameter that is never accessed directly
...
The msgb needs to be around when we access the parsed structure
but that needs to be guranteed by the caller handing out the parsed
structure.
2010-06-15 20:24:20 +08:00
Holger Hans Peter Freyther
c58da4b374
[nat] Add the notion of a "local" connection.
...
A local connection is only between the MUX and the real BSC. We will
not forward anything to the MSC. This will be needed for the IMSI
filtering as sending a CREF is not liked by every BSC...
2010-06-15 20:24:20 +08:00
Holger Hans Peter Freyther
605f62a16a
[nat] Do not access the con after the removal
...
In case of a RLC message we will destroy the SCCP connection. This means
that accessing the con and con->bsc will access old memory. Keep the status
local and move the con into an inner scope.
2010-06-15 20:24:20 +08:00
Holger Hans Peter Freyther
ed775e4c1d
[nat] Send a GSM48 message within the reject message
2010-06-15 20:24:20 +08:00