Holger Hans Peter Freyther
8151973c73
nat: Move the write queue init to the allocation function
...
This is required for unit tests that want to queue messages
and see if we can provoke a memleak.
2010-06-15 20:24:16 +08:00
Holger Hans Peter Freyther
a4376adb54
[nat] Ignore paging that is to page by BSS...
...
We do not want to handle this identity. If we can not page by
lac there is no need to page anything else.
2010-06-15 20:24:15 +08:00
Holger Hans Peter Freyther
7a773696dc
nat: Always initialize the out pointer...
...
Always initialize the pointer to a invalid value in case
we encounter a parsing error or such.
2010-06-15 20:24:14 +08:00
Holger Hans Peter Freyther
979a309c94
nat: Print the LAC that was searched for and not found.
2010-06-15 20:24:14 +08:00
Holger Hans Peter Freyther
8139553962
nat: Make the MSC configurable.
2010-06-15 20:24:14 +08:00
Holger Hans Peter Freyther
a88742cf5e
nat: Move MSC ip address into the config..
...
The address can still be specified on the cli and it will
overwrite the config in the config file.
2010-06-15 20:24:14 +08:00
Holger Hans Peter Freyther
1395948e18
Use osmocore tlv definition for GSM0808.
2010-06-15 20:24:14 +08:00
Holger Hans Peter Freyther
d1278c1fc9
nat: Two fixes for the write memory case...
...
Add new BSCs to the tail so we keep the sort order when writing
them out to the vty, fix the LAC command.
2010-06-15 20:24:13 +08:00
Holger Hans Peter Freyther
d4702862d3
[statistics] Provide basic statistics for the NAT
...
Count number of SCCP connections, number of BSC reconnects,
number of calls. For most of them we have a per BSC and a
global count.
Right now all structs using the counters survive until the
end of the application so we do not need to free them.
2010-06-15 20:24:13 +08:00
Holger Hans Peter Freyther
2896df7605
nat: Attempt to have a single BSC write method
...
This method currently prepends the IPA header and sends
the data. In the future we might be able to use SCTP for
it.
We have to remove the IPA header from the static messages
for that to work.
This code is untested.
2010-06-15 20:24:13 +08:00
Holger Hans Peter Freyther
47dd4944ae
nat: Store the config in the connection instead of the lac
...
This allows that we can print the Nr. next to the lac
and it allows us to change the lac at runtime without
reconnecting the BSC.
2010-06-15 20:24:12 +08:00
Holger Hans Peter Freyther
530c4b1aad
nat: Print the unknown byte as a integer instead of charachter
...
The value might be a non printable one.
2010-06-15 20:24:11 +08:00
Holger Hans Peter Freyther
a0df82d48d
nat: Handle CRCX/MDCX/DLCX at the nat
...
* Forward a rewritten msg to the BSS. We change the IP and port
to point to the NAT instead of the core network. We also keep
track of the BSC and the transacition id.
* Handle the case where we have not found a SCCP connection and
need to send a response ourselves.
2010-06-15 20:24:10 +08:00
Holger Hans Peter Freyther
465313e48c
nat: Look at the assignment command and remember on which timeslot the data is
...
This information will be needed when we are trying to forward
MGCP connections to and from the BSC through the IPA protocol.
2010-06-15 20:24:09 +08:00
Holger Hans Peter Freyther
23fe7be1ca
sccp: Move the destruction of the sccp connection to a new place
2010-06-15 20:24:09 +08:00
Holger Hans Peter Freyther
e9be5175ff
nat: Some more input validation... on the paging command.
2010-06-15 20:24:09 +08:00
Holger Hans Peter Freyther
bae9da49b9
nat: Move paging by lac handling code into the utils file
...
Moving it here means we can more easily test this code, there is one
behaviour change with the code that we only support paging messages
with one LAC and will silently ignore the others.
2010-06-15 20:24:09 +08:00
Holger Hans Peter Freyther
f8048d9f5c
nat: Assign the connection inside the new helper function.
2010-06-15 20:24:08 +08:00
Holger Hans Peter Freyther
dcf8a7db43
nat: Move creation of the structs to a separate file
...
This way one can create the bsc_nat structure in unit tests..
2010-06-15 20:24:08 +08:00