Commit Graph

1899 Commits

Author SHA1 Message Date
Harald Welte d94d6a02d5 DB: don't use reserved "index" word in SQL table field name 2010-05-14 17:38:47 +02:00
Harald Welte 1ccbf44d79 [GPRS] gb_proxy: Initiate RESET procedure on persistent NS-VC at startup
Some BSS that connect to the proxy do not continue to perform the
RESET procedure after a timeout.  In order to resurrect them, we
simply start a RESET procedure.
2010-05-14 11:53:08 +00:00
Harald Welte 768f2871a5 [GPRS] Gb_proxy: Support common command line arguments
This allows us to use a user-specified configuration file
2010-05-14 11:22:33 +00:00
Harald Welte 2b36ae1a3d [GPRS] BSSGP: Refuse blocking of signalling BVC; Ignore traffic on blocked BVC 2010-05-13 21:45:23 +02:00
Harald Welte 3a1bece69c [GPRS] BSSGP: Make implementation more robust
We now actually are much more in line with what the specification
says.  We track the blocked/unblocked state, we don't accept
signalling messages on PTP functional entities (and vice versa),
and we don't simply create a BVC context with messages other than
BVC-RESET.
2010-05-13 21:29:11 +02:00
Harald Welte 1b170d1145 [GPRS] LLC: Start using different log levels 2010-05-13 21:29:11 +02:00
Harald Welte c6ecafe60c [GPRS] LLC: Use DLLC instead of DGPRS 2010-05-13 21:29:11 +02:00
Harald Welte b2e49186ef [GPRS] Add debug sections for LLC and SNDCP 2010-05-13 21:29:11 +02:00
Harald Welte f47dc0b58c [GPRS] BSSGP: Elaborate more on FIXMEs
And fix mistake regarding FLUSH-LL / FLUSH-LL-ACK direction
2010-05-13 21:29:11 +02:00
Harald Welte 24c9fc1700 [GPRS] Rename gsm_04_08_gprs.c to gprs_gmm.c
GMM refers to GPRS Mobility Management.
2010-05-13 21:29:11 +02:00
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