Commit Graph

1889 Commits

Author SHA1 Message Date
Harald Welte
4cc605ac24 [GPRS] BSSGP: add function declaration 2010-05-13 21:29:11 +02:00
Harald Welte
1ae09c7bd6 [GPRS] LLC: Improve implementation compliance to spec
Don't allocate a LLC Entity just because BSSGP passes any random
SAPI/TLLI up to us.  We can only do this for XID and UI frames
of the GMM SAPI.

Furthermore, add more comments and debug messages.
2010-05-13 21:29:11 +02:00
Holger Hans Peter Freyther
e15ad48a82 ipaccess-config: Silence compiler warning. 2010-05-14 02:54:40 +08:00
Holger Hans Peter Freyther
6fc8791dbf [misc] Silence compiler warning...
If someone tries to set the type to unknown he should know
what he is doing, just silence the warning.
2010-05-14 02:53:22 +08:00
Holger Hans Peter Freyther
42993c26e0 Forward declare make_socket. 2010-05-14 02:49:39 +08:00
Holger Hans Peter Freyther
c9c42effd8 Merge branch 'on-waves/mgcp' 2010-05-14 02:46:21 +08:00
Holger Hans Peter Freyther
b5be7ac39c [mgcp] Make show mgcp available in both modes. 2010-05-14 02:45:52 +08:00
Holger Hans Peter Freyther
7373109abc Merge branch 'master' into on-waves/mgcp 2010-05-14 02:42:15 +08:00
Holger Hans Peter Freyther
c1cb5eb38d [mgcp] Clean up VTY code, the ranges are checked by the VTY code. 2010-05-14 02:39:51 +08:00
Holger Hans Peter Freyther
1384af6522 [mgcp] Use A.B.C.D for the ip addresses inside the vty config
Make the vty code parse the ip addresses for us and validate
them for us.
2010-05-14 02:39:42 +08:00
Holger Hans Peter Freyther
b3c206aa34 [mgcp] Improve the language of the comments. 2010-05-14 02:39:33 +08:00
Holger Hans Peter Freyther
b715d7f890 [mgcp] Include stdlib.h for abs. 2010-05-14 02:39:16 +08:00
Holger Hans Peter Freyther
cf5cc5bb5b [vty] Add power measurements to the one line summary. 2010-05-14 02:09:23 +08:00
Holger Hans Peter Freyther
3d6a5d648e [vty] Add a one line show lchan summary command. 2010-05-14 02:08:49 +08:00
Holger Hans Peter Freyther
029235ea96 [vty] Move "show lchan" into a parameterized method
I want to have a shorter lchan summary but with the same
config parameters. Change the current code to be a method
that takes a dump routine as parameter.
2010-05-14 02:03:16 +08:00
Holger Hans Peter Freyther
b8819bb845 [vty] Remove unfinished code from the VTY... 2010-05-14 02:01:48 +08:00
Holger Hans Peter Freyther
7b90d4a83b rach: Allow to set the emergency call bit
Add the rach emergency call allowed (0|1) setting and implement
it by directly manipulating the t2 value. It is the third bit which
is set to 0 when emergency calls are enabled and to one if it is
only enabled for access classes 11 to 15.
2010-05-14 00:48:43 +08:00
Holger Hans Peter Freyther
3a0a463fa4 rach: Allow to set the emergency call bit
Add the rach emergency call allowed (0|1) setting and implement
it by directly manipulating the t2 value. It is the third bit which
is set to 0 when emergency calls are enabled and to one if it is
only enabled for access classes 11 to 15.
2010-05-14 00:48:09 +08:00
Harald Welte
3863e04918 [GPRS] NS: Remove 'unknown_nsvc' from list of NS-VCs 2010-05-13 14:20:56 +02:00
Harald Welte
4cf12e9350 [GPRS] Gb Proxy: More verbose logging 2010-05-13 14:14:56 +02:00
Harald Welte
9aa97fc137 [GPRS] NS: Fix segfault when receiving message from unknown NS-VC
In the previous code we used a static fake_nsvc structure in
case we needed to send a message to an unknown NSVC for which
we don't have a real 'struct nsvc'. However, since we now have
a rate_ctr_group hanging off the nsvc, the fake structure didn't
have that.

So now we keep a nsi->unknown_nsvc around to be used whenever
we need a nsvc but don't have a real one.  The gprs_ns_vty.c
code explicitly does not list that NSVC in 'show ns'
2010-05-13 14:00:59 +02:00
Harald Welte
a6fd8f2339 [GPRS] NS: remove debug statement about l2len 2010-05-13 13:09:01 +02:00
Harald Welte
8d80d066ec Merge commit 'cf734784b0433dfa6b77909f83cc3620e523f5d7' 2010-05-13 12:55:56 +02:00
Harald Welte
c191986691 [GPRS] NS: more rate counters for BLOCK / DEAD count 2010-05-13 12:55:20 +02:00
Harald Welte
cf734784b0 [rate_ctr] Rename group_prefix_fmt to group_name_prefix 2010-05-13 12:53:35 +02:00
Harald Welte
dd178b2dc9 rate_counters: Remove group-name-sprintf-with-idx string 2010-05-13 12:50:44 +02:00
Harald Welte
73b2359fb0 [GPRS] NS: Show statistics on VTY only if requested 2010-05-13 12:32:30 +02:00
Harald Welte
e183345748 [GPRS] NS: properly assign msgb->l2h to count outgoing bytes correctly 2010-05-13 12:18:49 +02:00
Harald Welte
087fcff9a5 rate_ctr: Store the numeric index as part of 'rate_ctr_group' 2010-05-13 12:16:17 +02:00
Harald Welte
8e605b045e [GPRS] NS: Fix wrong counter use and remove debug statement 2010-05-13 11:57:44 +02:00
Harald Welte
89deee9b99 Add missing file vty/utils.c 2010-05-13 11:53:52 +02:00
Harald Welte
2279414d1c Merge commit '7b45d608872f17ab8b71d53a2d87e5f8d621b007' 2010-05-13 11:52:40 +02:00
Harald Welte
66f793a770 [GPRS] SGSN: Add Signal handler and NS VTY support 2010-05-13 11:50:04 +02:00
Harald Welte
f2b4cd7b86 [GPRS] NS: Start to use rate_ctr_group code from libosmocore
Every NS-VC now has a set of counters for incoming and outgoing
number of packets and bytes.

We also split the VTY part of the gprs_ns.c implementation into gprs_ns_vty.c
to make sure the protocol can actually be used without the VTY code being
present.
2010-05-13 11:45:07 +02:00
Harald Welte
7b45d60887 Add new 'rate counter' implementation to libosmocore
A 'rate counter' is a counter that counts events but also keeps
track of the rate of events (per second, minute, hour and day).

'rate counters' are generally abstracted in 'rate counter groups',
which are instances of a 'rate counter group description'.  This
way we can have e.g. a description describing what kind of counters
a BTS (or TRX) has - and we can then create one instance of that
group for every BTS or TRX that exists.
2010-05-13 11:35:30 +02:00
Harald Welte
0ab535bfc3 [GPRS] Gb Proxy: Cosmetic fix of log message 2010-05-13 10:34:56 +02:00
Harald Welte
6df0c5187b GPRS: Gb proxy memory leak debugging with SIGUSR 2010-05-12 20:53:42 +02:00
Harald Welte
8272c77231 GPRS: We have to do the msgb_free() in NS not Gb Proxy
As only NS-UNITDATA messages are ever passed into the Gb Proxy,
we need to do the msgb_free() at a much higher point in the calling
stack, i.e. inside the NS protocol layer.  This means it is now
the same logic as in OpenBSC itself.
2010-05-12 20:53:42 +02:00
Harald Welte
22229d6841 Fix missing #include preventing compilation of vty_interface.c 2010-05-12 20:28:04 +02:00
Harald Welte
39d0bb5f7c Gb Proxy: Proper msgb memory management
The old idea was to take a msgb from gbprox_rcvmsg() and then
modify it and finally send it all the way down to nsip_sendmsg()
to the remote peer.

However, this introduces memory management difficulties, as we then
have to distinguish three cases:
 * msgb was sent to a remote peer
 * we sent some error message and need to free the msgb
 * we need to make n-1 copies in case of a BSSVC-RESET from the SGSN

So instead we now simply always copy the message if we pass it on.

All messages received by gbprox_rcvmsg() are msgb_free()d in the very
same routine

All messages allocated by tx2peer() or tx2sgsn() are freed after
nsip_sendmsg()
2010-05-12 20:22:55 +02:00
Harald Welte
ea4647d264 NS: Make all timers configurable from VTY 2010-05-12 20:22:55 +02:00
Harald Welte
995a2d36da use new install_element_ve() 2010-05-12 20:22:55 +02:00
Holger Hans Peter Freyther
d6adf5e098 ipaccess: Make sure flashing of the secondary BTS is working
Use the TRX throughout the flash process.
2010-05-13 00:42:02 +08:00
Holger Hans Peter Freyther
64278ede35 sw_load: Specify the trx_nr for the software load
For the multi TRX setup we will need to specify the right trx->nr
to be able to flash the BTS. For the BS11 case we are ignoring the
additional argument.
2010-05-13 00:41:48 +08:00
Holger Hans Peter Freyther
52fd4e4395 ipaccess: Send the reset to the BASEBAND_TRANSC and supply TRX
Send the IPA Restart to a given BTS/TRX, change the signal callbacks
to carry the trx instead of the BTS so we have an easy access to the
right TRX and change the ipaccess-config to use that TRX. This is
fixing the restart with a multi TRX setup.

Even if we have the msg->trx, use the gsm_bts_trx_by_nr and get
the TRX from the fom header. This is because the OpenBSC and the
BTS numbering might not match for the multi TRX case.
2010-05-13 00:41:30 +08:00
Holger Hans Peter Freyther
ebead597ff ipaccess: Refactor... unite some code 2010-05-13 00:40:40 +08:00
Holger Hans Peter Freyther
9958f477b4 ipaccess: Use the right trx when performing the test 2010-05-13 00:39:30 +08:00
Holger Hans Peter Freyther
505f20d7c4 ipaccess: Use the current TRX to set the OML address. 2010-05-13 00:39:18 +08:00
Holger Hans Peter Freyther
5fbf5f4f8d ipaccess: Wait for the BASEBAND_TRANSCEIVER and then bootstrap OML
Currently we are connecting to the BTS and once the OML is established
we are bootstrapping the OML. This does not work for a multi TRX setup
as we will need to use a trx_nr != 0 for it.

Change the code to wait for a message (in this case NM OC_BASEBAND_TRANSC)
to detect the trx_nr used by the BTS and then use that TRX to bootstrap
the network.

I have tested setting the unit id on a single and multi trx system for
the first and second trx.
2010-05-13 00:38:49 +08:00
Holger Hans Peter Freyther
aa0db809e2 abis: Pass the abis_om_obj_inst in the nm_state_event.. 2010-05-13 00:37:48 +08:00