Commit Graph

186 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther e75a34faa5 gprs_ns.c: Make make_socket known to the compiler 2010-05-23 21:19:55 +08:00
Holger Hans Peter Freyther 5617d99388 gprs: Fix warnings on funny casts for the return statement
Change gprs_nsvc_reset to return void instead of a int
as the gb_proxy.c currently ignores the reutnr value anyway.

Change the caller inside gprs_ns to return the newly allocated
nsvc instead of the return of gprs_nsvc_reset.
2010-05-23 21:18:01 +08:00
Holger Hans Peter Freyther d30cefaac1 gprs_bssgp.c: Return something from non void methods.
In one use the rc variable we are assigning to, in the
others return 0 even if we have a FIXME there.
2010-05-23 21:12:15 +08:00
Holger Hans Peter Freyther b6eded84fe gprs_bssgp.c: Cast const of TLVP_VAL away.
Fix a compiler warning, we cast the const away at various
other parts in the code as well. We should consider removing
the const from the TLV struct..
2010-05-23 21:11:19 +08:00
Harald Welte ce4ccbc434 [GPRS] NS: Better formatting of VTY output 2010-05-19 17:02:57 +02:00
Harald Welte 869aaa401d [GPRS] NS: properly parse FR DLCI on Rx 2010-05-19 16:48:12 +02:00
Harald Welte 1100a9d1fa [GPRS] NS: Never respond to STATUS with STATUS to prevent loops! 2010-05-19 16:01:39 +02:00
Harald Welte 6c4136e347 [GPRS] NS: SOCK_RAW sockets always provide the full IPv4 header on receive 2010-05-19 15:53:22 +02:00
Harald Welte b11226d77a [GPRS] NS/FR/GRE rcvmsg case: msgb_free() in error case 2010-05-19 15:46:49 +02:00
Harald Welte ba4c666a9f [GPRS] NS: Make sure we allocate NS packet with headroom for FR/GRE 2010-05-19 15:38:10 +02:00
Harald Welte ac914b8778 [GPRS] NS: FR/GRE: Use AF_INET, correctly encode FR DLCI and GRE payload type 2010-05-19 15:37:34 +02:00
Harald Welte 7fb05234a7 [GPRS] NS: VTY: Move all local ip/port bind values into 'ns' node
This removes the requirement for gb_proxy and sgsn to have duplicate
vty parsing code
2010-05-19 15:09:09 +02:00
Harald Welte b3ee265b69 [GPRS] Add Frame Relay in GRE encapsulation for NS 2010-05-19 14:38:50 +02:00
Harald Welte e0c42d1a3b [GPRS] SGSN: properly delete a PDP context after receiving PDP CTX DEACT REQ 2010-05-18 14:32:29 +02:00
Harald Welte bf03d90d98 [GPRS] BSSG: Fix Vty printing of BVC 2010-05-18 12:00:55 +02:00
Harald Welte 61c07842f2 [GPRS] BSSGP: Use correct values for SIGNALLING and PTM BVCI 2010-05-18 11:57:08 +02:00
Harald Welte fdc73884d0 [GPRS] SGSN: Activate BSSGP VTY functions 2010-05-18 08:02:36 +02:00
Harald Welte 4e5721d02b [GPRS] BSSGP: Add VTY for configuration and inpection
This also includes log filtering based on NSEI/BVCI tuple
2010-05-17 23:41:43 +02:00
Harald Welte 16c8dbb655 [GPRS] BSSGP: Introduce packet/byte counters 2010-05-17 23:30:01 +02:00
Harald Welte a78b9c270b [GPRS] BSSGP: expose more internal structures / API 2010-05-17 23:02:42 +02:00
Harald Welte 8a521136a4 [GPRS] BSSGP: Rename bssgp_bts_ctx to bssgp_bvc_ctx
The Context really is about a BVC (BSSGP Virtual Connection).  In
the case we operate BSSGP on the SGSN side, this corresponds to
a link to a BTS.
2010-05-17 22:59:29 +02:00
Harald Welte 41337832c4 [GPRS] NS: Receiving a STATUS message is a NOTICEable event 2010-05-16 23:17:16 +02:00
Harald Welte 6703bf76c0 VTY: Context-sensitive help for logging related commands 2010-05-16 00:00:04 +02:00
Harald Welte 91f7f4ba96 [GPRS] NS: Allow filtering of log messages by NSVC / NSEI 2010-05-15 23:52:02 +02:00
Harald Welte 24133c3958 [GPRS] NS: VTY: Don't nsvc_delete() on 'no nse...'
Rather than deleting the NSE from memory, we simply mark it as non-persistent.
This makes sure that there are no invalid references (e.g. from gbprox_peer)
to the gprs_nsvc structure, but at the same time ensures it will no longer
be stored as part of writing the config file.
2010-05-15 23:06:26 +02:00
Harald Welte 92883345c8 [GPRS] NS: Introduce command to display a single NSE 2010-05-15 23:04:03 +02:00
Harald Welte 90af194a9d [GPRS] NS: Always start NS-ALIVE procedure after RESET
So far, we only started the ALIVE procedure on RESET-ACK if the
remote end was the SGSN.  This resulted in the BSS->Proxy connections
only being tested for alive-status from the BSS side, but not from
our side.

Also: export nsvc_by_nsvci() function as a public API function.
2010-05-15 23:02:24 +02:00
Harald Welte 43f3b69c43 [GPRS] NS: Add 'nsvc nsei ... (block|unblock|reset)' command to VTY 2010-05-14 19:36:59 +02:00
Harald Welte a52ff459ec [VTY] Introduce "end" command that works from any level in config
Using "end" you can always return to the "enable" level, and from
there the "show" commands are available.  So no more need for
exit/exit/exit/exit/disable.
2010-05-14 19:11:04 +02:00
Harald Welte 804fc81d2b [VTY] Remove OpenBSC specific node-exit handling from src/vty
The idea is to move the VTY code into libosmocore at some point,
and for that we need to eliminate OpenBSC specifics from it
2010-05-14 18:59:17 +02:00
Harald Welte 731d1fc956 [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 58e65c90a8 [GPRS] BSSGP: Refuse blocking of signalling BVC; Ignore traffic on blocked BVC 2010-05-13 21:45:23 +02:00
Harald Welte 25de811023 [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 6b7cf2551e [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 61112344e5 [GPRS] BSSGP: add function declaration 2010-05-13 21:29:11 +02:00
Holger Hans Peter Freyther 5e1a6b5b11 Merge branch 'on-waves/mgcp' 2010-05-14 02:46:21 +08:00
Holger Hans Peter Freyther 74136415ad Merge branch 'master' into on-waves/mgcp 2010-05-14 02:42:15 +08:00
Harald Welte 60cc6acaff [GPRS] NS: Remove 'unknown_nsvc' from list of NS-VCs 2010-05-13 14:20:56 +02:00
Harald Welte dd1c83c52d [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 cd2890b0c6 [GPRS] NS: remove debug statement about l2len 2010-05-13 13:09:01 +02:00
Harald Welte 5f93a52073 Merge commit 'cf734784b0433dfa6b77909f83cc3620e523f5d7' 2010-05-13 12:55:56 +02:00
Harald Welte c51c23cda5 [GPRS] NS: more rate counters for BLOCK / DEAD count 2010-05-13 12:55:20 +02:00
Harald Welte af1d4cb5a8 [GPRS] NS: Show statistics on VTY only if requested 2010-05-13 12:32:30 +02:00
Harald Welte ec20ba47c7 [GPRS] NS: properly assign msgb->l2h to count outgoing bytes correctly 2010-05-13 12:18:49 +02:00
Harald Welte 3953bdddb7 [GPRS] NS: Fix wrong counter use and remove debug statement 2010-05-13 11:57:44 +02:00
Harald Welte a3724cdb6e Merge commit '7b45d608872f17ab8b71d53a2d87e5f8d621b007' 2010-05-13 11:52:40 +02:00
Harald Welte 144e0295c2 [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 91813cf214 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 fe4ab901cc NS: Make all timers configurable from VTY 2010-05-12 20:22:55 +02:00
Harald Welte ef5324fc94 use new install_element_ve() 2010-05-12 20:22:55 +02:00