mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-02 13:03:33 +00:00
Compare commits
92 Commits
zecke/rele
...
on-waves/0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab46372e2a | ||
|
|
ff0a562f9a | ||
|
|
556008d724 | ||
|
|
0094f84f30 | ||
|
|
86069143ff | ||
|
|
44f0be88a3 | ||
|
|
5d88b372d7 | ||
|
|
71c7bf5907 | ||
|
|
869033148c | ||
|
|
bc0f7c0988 | ||
|
|
7d06063cfb | ||
|
|
4e42b637fd | ||
|
|
f44de9942b | ||
|
|
3a110ae60b | ||
|
|
bb84adc465 | ||
|
|
8d123ea3c0 | ||
|
|
88ca894df7 | ||
|
|
42b0d6b494 | ||
|
|
82d8b0457b | ||
|
|
433d6ee1a2 | ||
|
|
203a6eddf8 | ||
|
|
56ef6249e3 | ||
|
|
b2a96b1be7 | ||
|
|
d4c29c1574 | ||
|
|
3d947e6d67 | ||
|
|
b62c9a19cf | ||
|
|
ff5957568f | ||
|
|
7d2e1ca4be | ||
|
|
7ce2e0c8b0 | ||
|
|
78d442420b | ||
|
|
8cd2709ebf | ||
|
|
41a1780102 | ||
|
|
2f84715984 | ||
|
|
7253154fc5 | ||
|
|
6c1c76683f | ||
|
|
a92fe9a4ca | ||
|
|
e83a3f584e | ||
|
|
118ddebc36 | ||
|
|
bb53004d47 | ||
|
|
6af20842cb | ||
|
|
cc41cb07e7 | ||
|
|
d6fb23523a | ||
|
|
2aa0b45cc0 | ||
|
|
619df61ad2 | ||
|
|
893ea65f38 | ||
|
|
64b811f113 | ||
|
|
91fc9bf862 | ||
|
|
111a58dd37 | ||
|
|
d1a2563a74 | ||
|
|
7d3ef919ce | ||
|
|
cba98d87d6 | ||
|
|
5c18ad0829 | ||
|
|
0d9ed87d5c | ||
|
|
ec7be0c969 | ||
|
|
9be3347601 | ||
|
|
3eef7b7d81 | ||
|
|
9de4a6daa9 | ||
|
|
851ace9f33 | ||
|
|
d1dd069b48 | ||
|
|
401db32ca2 | ||
|
|
17e03d21d2 | ||
|
|
26a9bff201 | ||
|
|
80fb260a60 | ||
|
|
55a0716da7 | ||
|
|
c88fb75616 | ||
|
|
d55a4dc326 | ||
|
|
a4e6f2e6e1 | ||
|
|
7f71d99cc3 | ||
|
|
b92167cf80 | ||
|
|
4b6a6dbe7e | ||
|
|
763e8c7766 | ||
|
|
823ff16088 | ||
|
|
6f93c6a1e0 | ||
|
|
f97e48b0de | ||
|
|
761600b0fd | ||
|
|
8549462bc6 | ||
|
|
436e5c6308 | ||
|
|
f8b9d844c1 | ||
|
|
58ec07d580 | ||
|
|
71465c21f4 | ||
|
|
16d0a833f8 | ||
|
|
ea72b62cac | ||
|
|
49a84ec6e9 | ||
|
|
42c636b6c8 | ||
|
|
a0a55f555e | ||
|
|
23ed00e410 | ||
|
|
3fe910b9f1 | ||
|
|
097bdeb77d | ||
|
|
1b85de02e0 | ||
|
|
2281d1835f | ||
|
|
fb4433a129 | ||
|
|
d954dcf9e1 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +0,0 @@
|
||||
debian/*.log
|
||||
1
debian/autoreconf
vendored
1
debian/autoreconf
vendored
@@ -1 +0,0 @@
|
||||
openbsc
|
||||
142
debian/changelog
vendored
142
debian/changelog
vendored
@@ -1,142 +0,0 @@
|
||||
openbsc (0.15.0+z6) unstable; urgency=medium
|
||||
|
||||
* Include gbproxy fix (4339a539585030c4e1b846d024a005f3d5a631a4) on top of z5
|
||||
|
||||
-- Holger Hans Peter Freyther <holger@moiji-mobile.com> Thu, 17 Dec 2015 08:34:28 +0100
|
||||
|
||||
openbsc (0.15.0+z5) unstable; urgency=medium
|
||||
|
||||
* Based on 5e95a411946ba3c520f048c07f8fdc3dff26d564
|
||||
* First GTPhub build
|
||||
|
||||
-- Holger Hans Peter Freyther <holger@moiji-mobile.com> Mon, 30 Nov 2015 13:36:36 +0100
|
||||
|
||||
openbsc (0.15.0+z4) unstable; urgency=medium
|
||||
|
||||
* Based on 98fa3dc1c655033b31d90ed051cfa9144e30248c
|
||||
* Extended GBproxy counters
|
||||
|
||||
-- Holger Hans Peter Freyther <holger@moiji-mobile.com> Tue, 10 Nov 2015 09:36:55 +0100
|
||||
|
||||
openbsc (0.15.0+z3) unstable; urgency=medium
|
||||
|
||||
* Based on 292769e19e1ec7ea28b69370f04569501020659f
|
||||
* StatsD support
|
||||
* Beginning of OAP in the SGSN
|
||||
* Stronger random numbers for TMSI, TLLI in NITB, SGSN and GBProxy
|
||||
|
||||
-- Holger Hans Peter Freyther <holger@moiji-mobile.com> Tue, 03 Nov 2015 09:46:41 +0100
|
||||
|
||||
openbsc (0.15.0+z2) unstable; urgency=medium
|
||||
|
||||
* Allow to bind osmux to different ip addresses.
|
||||
* Based on a777c9ee3d4e433c713f7a5c346519aa0321f096
|
||||
|
||||
-- Holger Hans Peter Freyther <holger@moiji-mobile.com> Mon, 12 Oct 2015 20:38:27 +0200
|
||||
|
||||
openbsc (0.15.0+z1) unstable; urgency=medium
|
||||
|
||||
* Revert the SGSN fix
|
||||
* New build with osmux and NAT
|
||||
* Based on fa07b489dc3e14579b34365c0a0f1b5d5a70138f
|
||||
|
||||
-- Holger Hans Peter Freyther <holger@moiji-mobile.com> Mon, 12 Oct 2015 10:23:44 +0200
|
||||
|
||||
openbsc (0.14.0+z12) unstable; urgency=medium
|
||||
|
||||
* GBProxy compat commands
|
||||
* Misc updates from 925504bfe0834be6b1549af51242ef24fa2a0eaa
|
||||
|
||||
-- Holger Hans Peter Freyther <holger@moiji-mobile.com> Mon, 12 Oct 2015 10:01:26 +0200
|
||||
|
||||
openbsc (0.14.0+z11) unstable; urgency=medium
|
||||
|
||||
* Build with BSC NAT multi bind option
|
||||
|
||||
-- Holger Hans Peter Freyther <holger@moiji-mobile.com> Thu, 24 Sep 2015 10:45:23 +0200
|
||||
|
||||
openbsc (0.14.0+z10) unstable; urgency=medium
|
||||
|
||||
* Build with MGCP NAT fixes.
|
||||
|
||||
-- Holger Hans Peter Freyther <holger@moiji-mobile.com> Sun, 16 Aug 2015 15:30:15 +0200
|
||||
|
||||
openbsc (0.14.0+z9) unstable; urgency=low
|
||||
|
||||
* New upstream tag and additional patches.
|
||||
* SGSN/GSUP extensions
|
||||
* New NAT command.
|
||||
* Potential fix to QoS GTP sending
|
||||
* Merged GSUP extensions (change of IE)
|
||||
* Added simple CDR module to the SGSN
|
||||
* Put charging_id into CDR, send RAI/UCI/IMEI(SV) on PDP ctx creation.
|
||||
* Log HLR-Number, provide hlr-Number in purgeMS
|
||||
* Set LAC/CI to 0xFFFE/0xFF
|
||||
* Set spare selection mode flags.
|
||||
* Use the verified mode
|
||||
* Resolve GGSN dynamically
|
||||
* Never append the domain name to the query
|
||||
|
||||
-- Holger Hans Peter Freyther <holger@moiji-mobile.com> Sun, 16 Aug 2015 15:29:53 +0200
|
||||
|
||||
openbsc (0.12.0+git26-7) unstable; urgency=low
|
||||
|
||||
* 64bit fix for the MGCP rewriting
|
||||
|
||||
-- Holger Hans Peter Freyther <holger@freyther.de> Wed, 07 Nov 2012 11:39:34 +0100
|
||||
|
||||
openbsc (0.12.0+git26-6) precise; urgency=low
|
||||
|
||||
* Added init script for osmocom-sgsn.
|
||||
|
||||
-- Eric Butler <eric@codebutler.com> Fri, 24 Aug 2012 21:04:32 -0700
|
||||
|
||||
openbsc (0.12.0+git26-5) precise; urgency=low
|
||||
|
||||
* Don't enable MNCC sock by default.
|
||||
* Automatically create important directories.
|
||||
* Fix init script 'stop' command.
|
||||
|
||||
-- Eric Butler <eric@codebutler.com> Fri, 24 Aug 2012 20:56:33 -0700
|
||||
|
||||
openbsc (0.12.0+git26-4) precise; urgency=low
|
||||
|
||||
* Specify HLR path and enable RTP proxy.
|
||||
|
||||
-- Eric Butler <eric@codebutler.com> Mon, 20 Aug 2012 00:21:07 -0700
|
||||
|
||||
openbsc (0.12.0+git26-3) precise; urgency=low
|
||||
|
||||
* Fix init script.
|
||||
|
||||
-- Eric Butler <eric@codebutler.com> Sun, 19 Aug 2012 16:05:44 -0700
|
||||
|
||||
openbsc (0.12.0+git26-2) precise; urgency=low
|
||||
|
||||
* Fix libdbi package dependency.
|
||||
|
||||
-- Eric Butler <eric@codebutler.com> Wed, 15 Aug 2012 00:35:37 -0700
|
||||
|
||||
openbsc (0.12.0+git26-1) precise; urgency=low
|
||||
|
||||
* Fix version issue.
|
||||
|
||||
-- Eric Butler <eric@codebutler.com> Tue, 14 Aug 2012 21:00:51 -0700
|
||||
|
||||
openbsc (0.12.0+git26) precise; urgency=low
|
||||
|
||||
* Updated ubuntu package.
|
||||
|
||||
-- Eric Butler <eric@codebutler.com> Tue, 14 Aug 2012 17:36:51 -0700
|
||||
|
||||
openbsc (0.9.13.115.eb113-1) natty; urgency=low
|
||||
|
||||
* New upstream release
|
||||
|
||||
-- Harald Welte <laforge@gnumonks.org> Wed, 11 May 2011 18:41:24 +0000
|
||||
|
||||
openbsc (0.9.4-1) unstable; urgency=low
|
||||
|
||||
* Initial release
|
||||
|
||||
-- Harald Welte <laforge@gnumonks.org> Tue, 24 Aug 2010 13:34:24 +0200
|
||||
1
debian/compat
vendored
1
debian/compat
vendored
@@ -1 +0,0 @@
|
||||
7
|
||||
121
debian/control
vendored
121
debian/control
vendored
@@ -1,121 +0,0 @@
|
||||
Source: openbsc
|
||||
Section: net
|
||||
Priority: optional
|
||||
Maintainer: Harald Welte <laforge@gnumonks.org>
|
||||
Build-Depends: debhelper (>= 7.0.0~), autotools-dev, pkg-config, libgtp0-dev, libosmocore-dev, libosmo-sccp-dev, libdbi0-dev, dh-autoreconf, libosmo-abis-dev, libosmo-netif-dev, libdbd-sqlite3, libpcap-dev, libssl-dev, libc-ares-dev, libsmpp34-dev
|
||||
Standards-Version: 3.8.4
|
||||
Homepage: http://openbsc.osmocom.org/
|
||||
Vcs-Git: git://bs11-abis.gnumonks.org/openbsc.git
|
||||
Vcs-Browser: http://openbsc.osmocom.org/trac/browser
|
||||
|
||||
Package: osmocom-bsc
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: GSM Base Station Controller; BSC-only version of OpenBSC. Needs a real MSC!
|
||||
Classical BSC which requires MSC to operate.
|
||||
|
||||
Package: osmocom-nitb
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, libdbd-sqlite3
|
||||
Description: GSM Network-in-a-Box, implements BSC, MSC, SMSC, HLR, VLR
|
||||
All the GSM network components bundled together.
|
||||
|
||||
Package: osmocom-ipaccess-utils
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: Command line utilities for ip.access nanoBTS
|
||||
Utilities specific for ip.access unit.
|
||||
|
||||
Package: osmocom-bs11-utils
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: Command line utilities for Siemens BS-11 BTS
|
||||
Utilities specific for BS-11 unit.
|
||||
|
||||
Package: osmocom-sgsn
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: Osmocom Serving GPRS Support Node
|
||||
SGSN implementation.
|
||||
|
||||
Package: osmocom-gbproxy
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: Osmocom GPRS Gb Interface Proxy
|
||||
Proxy for Gb interface.
|
||||
|
||||
Package: osmocom-bsc-nat
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: Osmocom Base Station Controller Network Address Translation
|
||||
Network address translation for BSC.
|
||||
|
||||
Package: osmo-gtphub
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: Osmocom GTP Hub
|
||||
Proxy for comms between multiple SGSNs and GGSNs.
|
||||
|
||||
Package: osmocom-bsc-dbg
|
||||
Architecture: any
|
||||
Section: debug
|
||||
Priority: extra
|
||||
Depends: osmocom-bsc (= ${binary:Version}), ${misc:Depends}
|
||||
Description: Debug symbols for the OpenBSC BSC
|
||||
Make debugging possible
|
||||
|
||||
Package: osmocom-nitb-dbg
|
||||
Architecture: any
|
||||
Section: debug
|
||||
Priority: extra
|
||||
Depends: osmocom-nitb (= ${binary:Version}), ${misc:Depends}
|
||||
Description: Debug symbols for the OpenBSC NITB
|
||||
Make debugging possible
|
||||
|
||||
Package: osmocom-ipaccess-utils-dbg
|
||||
Architecture: any
|
||||
Section: debug
|
||||
Priority: extra
|
||||
Depends: osmocom-ipaccess-utils (= ${binary:Version}), ${misc:Depends}
|
||||
Description: Debug symbols for the OpenBSC ip.access utils
|
||||
Make debugging possible
|
||||
|
||||
Package: osmocom-bs11-utils-dbg
|
||||
Architecture: any
|
||||
Section: debug
|
||||
Priority: extra
|
||||
Depends: osmocom-bs11-utils (= ${binary:Version}), ${misc:Depends}
|
||||
Description: Debug symbols for the OpenBSC BS11 utils
|
||||
Make debugging possible
|
||||
|
||||
Package: osmocom-sgsn-dbg
|
||||
Architecture: any
|
||||
Section: debug
|
||||
Priority: extra
|
||||
Depends: osmocom-sgsn (= ${binary:Version}), ${misc:Depends}
|
||||
Description: Debug symbols for the OpenBSC Serving GPRS Support Node
|
||||
Make debugging possible
|
||||
|
||||
Package: osmocom-gbproxy-dbg
|
||||
Architecture: any
|
||||
Section: debug
|
||||
Priority: extra
|
||||
Depends: osmocom-gbproxy (= ${binary:Version}), ${misc:Depends}
|
||||
Description: Debug symbols for the OpenBSC GPRS GBProxy
|
||||
Make debugging possible
|
||||
|
||||
Package: osmocom-bsc-nat-dbg
|
||||
Architecture: any
|
||||
Section: debug
|
||||
Priority: extra
|
||||
Depends: osmocom-bsc-nat (= ${binary:Version}), ${misc:Depends}
|
||||
Description: Debug symbols for the OpenBSC Network Address Translation
|
||||
Make debugging possible
|
||||
|
||||
Package: osmo-gtphub-dbg
|
||||
Architecture: any
|
||||
Section: debug
|
||||
Priority: extra
|
||||
Depends: osmo-gtphub (= ${binary:Version}), ${misc:Depends}
|
||||
Description: Debug symbols for Osmocom GTP Hub
|
||||
Make debugging possible
|
||||
47
debian/copyright
vendored
47
debian/copyright
vendored
@@ -1,47 +0,0 @@
|
||||
This work was packaged for Debian by:
|
||||
|
||||
Harald Welte <laforge@gnumonks.org> on Tue, 24 Aug 2010 10:55:04 +0200
|
||||
|
||||
It was downloaded from:
|
||||
|
||||
git://bs11-abis.gnumonks.org/openbsc.git
|
||||
|
||||
Upstream Authors:
|
||||
|
||||
Harald Welte <laforge@gnumonks.org>
|
||||
Dieter Spaar <spaar@mirider.augusta.de>
|
||||
Holger Hans Peter Freyther <zecke@selfish.org>
|
||||
Sylvain Munaut <tnt@246tNt.com>
|
||||
Daniel Willmann <daniel@totalueberwachung.de>
|
||||
Jan Luebbe <jluebbe@debian.org>
|
||||
Mike Haben <michael.haben@btinternet.com>
|
||||
Andreas Eversberg <Andreas.Eversberg@versatel.de>
|
||||
|
||||
Copyright:
|
||||
|
||||
Copyright (C) 2008-2010 Harald Welte <laforge@gnumonks.org>
|
||||
Copyright (C) 2008-2009 Dieter Spaar <spaar@mirider.augusta.de>
|
||||
Copyright (C) 2008-2010 Holger Hans Peter Freyther <zecke@selfish.org>
|
||||
Copyright (C) 2009-2010 Sylvain Munaut <tnt@246tNt.com>
|
||||
Copyright (C) 2009-2010 On-Waves
|
||||
Copyright (C) 2008 Daniel Willmann <daniel@totalueberwachung.de>
|
||||
Copyright (C) 2008 Jan Luebbe <jluebbe@debian.org>
|
||||
Copyright (C) 2009 by Mike Haben <michael.haben@btinternet.com>
|
||||
Copyright (C) 2009 Andreas Eversberg <Andreas.Eversberg@versatel.de>
|
||||
|
||||
License:
|
||||
|
||||
GNU General Public License, Version 2 or later
|
||||
|
||||
The Debian packaging is:
|
||||
|
||||
Copyright (C) 2010 Harald Welte <laforge@gnumonks.org>
|
||||
|
||||
# Please chose a license for your packaging work. If the program you package
|
||||
# uses a mainstream license, using the same license is the safest choice.
|
||||
# Please avoid to pick license terms that are more restrictive than the
|
||||
# packaged work, as it may make Debian's contributions unacceptable upstream.
|
||||
# If you just want it to be GPL version 3, leave the following lines in.
|
||||
|
||||
and is licensed under the GPL version 3,
|
||||
see "/usr/share/common-licenses/GPL-3".
|
||||
1
debian/docs
vendored
1
debian/docs
vendored
@@ -1 +0,0 @@
|
||||
openbsc/README
|
||||
2
debian/osmo-gtphub.default
vendored
2
debian/osmo-gtphub.default
vendored
@@ -1,2 +0,0 @@
|
||||
CONFIG_FILE="/etc/osmocom/osmo-gtphub.cfg"
|
||||
|
||||
1
debian/osmo-gtphub.examples
vendored
1
debian/osmo-gtphub.examples
vendored
@@ -1 +0,0 @@
|
||||
openbsc/doc/examples/osmo-gtphub
|
||||
150
debian/osmo-gtphub.init
vendored
150
debian/osmo-gtphub.init
vendored
@@ -1,150 +0,0 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: osmo-gtphub
|
||||
# Required-Start: $network $local_fs
|
||||
# Required-Stop:
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Osmocom GTP hub
|
||||
# Description: Osmocom GTP hub
|
||||
### END INIT INFO
|
||||
|
||||
# Author: Neels Hofmeyr <nhofmeyr@sysmocom.de>
|
||||
|
||||
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
NAME=osmo-gtphub # Introduce the short server's name here
|
||||
DESC="Osmocom GTP hub" # Introduce a short description here
|
||||
DAEMON=/usr/bin/osmo-gtphub # Introduce the server's location here
|
||||
SCRIPTNAME=/etc/init.d/osmo-gtphub
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x $DAEMON ] || exit 0
|
||||
|
||||
# Read configuration variable file if it is present
|
||||
[ -r /etc/default/osmo-gtphub ] && . /etc/default/osmo-gtphub
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
. /lib/init/vars.sh
|
||||
|
||||
# Define LSB log_* functions.
|
||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
DAEMON_ARGS="$DAEMON_ARGS -D -c $CONFIG_FILE"
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
# Return
|
||||
# 0 if daemon has been started
|
||||
# 1 if daemon was already running
|
||||
# 2 if daemon could not be started
|
||||
start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \
|
||||
|| return 1
|
||||
start-stop-daemon --start --quiet --exec $DAEMON -- \
|
||||
$DAEMON_ARGS \
|
||||
|| return 2
|
||||
# Add code here, if necessary, that waits for the process to be ready
|
||||
# to handle requests from services started subsequently which depend
|
||||
# on this one. As a last resort, sleep for some time.
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
do_stop()
|
||||
{
|
||||
# Return
|
||||
# 0 if daemon has been stopped
|
||||
# 1 if daemon was already stopped
|
||||
# 2 if daemon could not be stopped
|
||||
# other if a failure occurred
|
||||
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --name $NAME
|
||||
RETVAL="$?"
|
||||
[ "$RETVAL" = 2 ] && return 2
|
||||
# Wait for children to finish too if this is a daemon that forks
|
||||
# and if the daemon is only ever run from this initscript.
|
||||
# If the above conditions are not satisfied then add some other code
|
||||
# that waits for the process to drop all resources that could be
|
||||
# needed by services started subsequently. A last resort is to
|
||||
# sleep for some time.
|
||||
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
|
||||
[ "$?" = 2 ] && return 2
|
||||
return "$RETVAL"
|
||||
}
|
||||
|
||||
#
|
||||
# Function that sends a SIGHUP to the daemon/service
|
||||
#
|
||||
do_reload() {
|
||||
#
|
||||
# If the daemon can reload its configuration without
|
||||
# restarting (for example, when it is sent a SIGHUP),
|
||||
# then implement that here.
|
||||
#
|
||||
start-stop-daemon --stop --signal 1 --quiet $PIDFILE --name $NAME
|
||||
return 0
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
|
||||
do_start
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
status)
|
||||
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
|
||||
;;
|
||||
#reload|force-reload)
|
||||
#
|
||||
# If do_reload() is not implemented then leave this commented out
|
||||
# and leave 'force-reload' as an alias for 'restart'.
|
||||
#
|
||||
#log_daemon_msg "Reloading $DESC" "$NAME"
|
||||
#do_reload
|
||||
#log_end_msg $?
|
||||
#;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented then remove the
|
||||
# 'force-reload' alias
|
||||
#
|
||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
case "$?" in
|
||||
0) log_end_msg 0 ;;
|
||||
1) log_end_msg 1 ;; # Old process is still running
|
||||
*) log_end_msg 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
log_end_msg 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
|
||||
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
|
||||
:
|
||||
1
debian/osmo-gtphub.install
vendored
1
debian/osmo-gtphub.install
vendored
@@ -1 +0,0 @@
|
||||
/usr/bin/osmo-gtphub
|
||||
2
debian/osmocom-bs11-utils.install
vendored
2
debian/osmocom-bs11-utils.install
vendored
@@ -1,2 +0,0 @@
|
||||
/usr/bin/bs11_config
|
||||
/usr/bin/isdnsync
|
||||
153
debian/osmocom-bsc-nat.init
vendored
153
debian/osmocom-bsc-nat.init
vendored
@@ -1,153 +0,0 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: osmocom-bsc-nat
|
||||
# Required-Start: $network $local_fs
|
||||
# Required-Stop:
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Osmocom GSM network-in-a-box
|
||||
# Description: A minimal implementation of the GSM Base Station Controller,
|
||||
# Mobile Switching Center, Home Location regster and all other
|
||||
# components to run a self-contained GSM network.
|
||||
### END INIT INFO
|
||||
|
||||
# Author: Harald Welte <laforge@gnumonks.org>
|
||||
|
||||
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
NAME=osmo-bsc_nat # Introduce the short server's name here
|
||||
DESC="Osmocom GSM BSC Multiplexer (NAT)" # Introduce a short description here
|
||||
DAEMON=/usr/bin/osmo-bsc_nat # Introduce the server's location here
|
||||
SCRIPTNAME=/etc/init.d/osmocom-bsc-nat
|
||||
CONFIG_FILE=/etc/osmocom/osmocom-bsc-nat.cfg
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x $DAEMON ] || exit 0
|
||||
|
||||
# Read configuration variable file if it is present
|
||||
[ -r /etc/default/osmocom-bsc-nat ] && . /etc/default/osmocom-bsc-nat
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
. /lib/init/vars.sh
|
||||
|
||||
# Define LSB log_* functions.
|
||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
DAEMON_ARGS="-D -c $CONFIG_FILE"
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
# Return
|
||||
# 0 if daemon has been started
|
||||
# 1 if daemon was already running
|
||||
# 2 if daemon could not be started
|
||||
start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \
|
||||
|| return 1
|
||||
start-stop-daemon --start --quiet --exec $DAEMON -- \
|
||||
$DAEMON_ARGS \
|
||||
|| return 2
|
||||
# Add code here, if necessary, that waits for the process to be ready
|
||||
# to handle requests from services started subsequently which depend
|
||||
# on this one. As a last resort, sleep for some time.
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
do_stop()
|
||||
{
|
||||
# Return
|
||||
# 0 if daemon has been stopped
|
||||
# 1 if daemon was already stopped
|
||||
# 2 if daemon could not be stopped
|
||||
# other if a failure occurred
|
||||
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --name $NAME
|
||||
RETVAL="$?"
|
||||
[ "$RETVAL" = 2 ] && return 2
|
||||
# Wait for children to finish too if this is a daemon that forks
|
||||
# and if the daemon is only ever run from this initscript.
|
||||
# If the above conditions are not satisfied then add some other code
|
||||
# that waits for the process to drop all resources that could be
|
||||
# needed by services started subsequently. A last resort is to
|
||||
# sleep for some time.
|
||||
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
|
||||
[ "$?" = 2 ] && return 2
|
||||
return "$RETVAL"
|
||||
}
|
||||
|
||||
#
|
||||
# Function that sends a SIGHUP to the daemon/service
|
||||
#
|
||||
do_reload() {
|
||||
#
|
||||
# If the daemon can reload its configuration without
|
||||
# restarting (for example, when it is sent a SIGHUP),
|
||||
# then implement that here.
|
||||
#
|
||||
start-stop-daemon --stop --signal 1 --quiet $PIDFILE --name $NAME
|
||||
return 0
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
|
||||
do_start
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
status)
|
||||
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
|
||||
;;
|
||||
#reload|force-reload)
|
||||
#
|
||||
# If do_reload() is not implemented then leave this commented out
|
||||
# and leave 'force-reload' as an alias for 'restart'.
|
||||
#
|
||||
#log_daemon_msg "Reloading $DESC" "$NAME"
|
||||
#do_reload
|
||||
#log_end_msg $?
|
||||
#;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented then remove the
|
||||
# 'force-reload' alias
|
||||
#
|
||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
case "$?" in
|
||||
0) log_end_msg 0 ;;
|
||||
1) log_end_msg 1 ;; # Old process is still running
|
||||
*) log_end_msg 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
log_end_msg 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
|
||||
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
|
||||
:
|
||||
1
debian/osmocom-bsc-nat.install
vendored
1
debian/osmocom-bsc-nat.install
vendored
@@ -1 +0,0 @@
|
||||
/usr/bin/osmo-bsc_nat
|
||||
1
debian/osmocom-bsc.examples
vendored
1
debian/osmocom-bsc.examples
vendored
@@ -1 +0,0 @@
|
||||
openbsc/doc/examples/osmo-bsc_mgcp
|
||||
2
debian/osmocom-bsc.install
vendored
2
debian/osmocom-bsc.install
vendored
@@ -1,2 +0,0 @@
|
||||
/usr/bin/osmo-bsc_mgcp
|
||||
/usr/bin/osmo-bsc
|
||||
151
debian/osmocom-gbproxy.init
vendored
151
debian/osmocom-gbproxy.init
vendored
@@ -1,151 +0,0 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: osmo-gbproxy
|
||||
# Required-Start: $network $local_fs
|
||||
# Required-Stop:
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Osmocom GBproxy
|
||||
# Description: A tool to proxy the GPRS Gb interface.
|
||||
### END INIT INFO
|
||||
|
||||
# Author: Harald Welte <laforge@gnumonks.org>
|
||||
|
||||
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
NAME=osmo-gbproxy # Introduce the short server's name here
|
||||
DESC="Osmocom GBProxy" # Introduce a short description here
|
||||
DAEMON=/usr/bin/osmo-gbproxy # Introduce the server's location here
|
||||
SCRIPTNAME=/etc/init.d/osmocom-gbproxy
|
||||
CONFIG_FILE=/etc/osmocom/osmocom-gbproxy.cfg
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x $DAEMON ] || exit 0
|
||||
|
||||
# Read configuration variable file if it is present
|
||||
[ -r /etc/default/osmocom-gbproxy ] && . /etc/default/osmocom-gbproxy
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
. /lib/init/vars.sh
|
||||
|
||||
# Define LSB log_* functions.
|
||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
DAEMON_ARGS="-D -c $CONFIG_FILE"
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
# Return
|
||||
# 0 if daemon has been started
|
||||
# 1 if daemon was already running
|
||||
# 2 if daemon could not be started
|
||||
start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \
|
||||
|| return 1
|
||||
start-stop-daemon --start --quiet --exec $DAEMON -- \
|
||||
$DAEMON_ARGS \
|
||||
|| return 2
|
||||
# Add code here, if necessary, that waits for the process to be ready
|
||||
# to handle requests from services started subsequently which depend
|
||||
# on this one. As a last resort, sleep for some time.
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
do_stop()
|
||||
{
|
||||
# Return
|
||||
# 0 if daemon has been stopped
|
||||
# 1 if daemon was already stopped
|
||||
# 2 if daemon could not be stopped
|
||||
# other if a failure occurred
|
||||
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --name $NAME
|
||||
RETVAL="$?"
|
||||
[ "$RETVAL" = 2 ] && return 2
|
||||
# Wait for children to finish too if this is a daemon that forks
|
||||
# and if the daemon is only ever run from this initscript.
|
||||
# If the above conditions are not satisfied then add some other code
|
||||
# that waits for the process to drop all resources that could be
|
||||
# needed by services started subsequently. A last resort is to
|
||||
# sleep for some time.
|
||||
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
|
||||
[ "$?" = 2 ] && return 2
|
||||
return "$RETVAL"
|
||||
}
|
||||
|
||||
#
|
||||
# Function that sends a SIGHUP to the daemon/service
|
||||
#
|
||||
do_reload() {
|
||||
#
|
||||
# If the daemon can reload its configuration without
|
||||
# restarting (for example, when it is sent a SIGHUP),
|
||||
# then implement that here.
|
||||
#
|
||||
start-stop-daemon --stop --signal 1 --quiet $PIDFILE --name $NAME
|
||||
return 0
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
|
||||
do_start
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
status)
|
||||
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
|
||||
;;
|
||||
#reload|force-reload)
|
||||
#
|
||||
# If do_reload() is not implemented then leave this commented out
|
||||
# and leave 'force-reload' as an alias for 'restart'.
|
||||
#
|
||||
#log_daemon_msg "Reloading $DESC" "$NAME"
|
||||
#do_reload
|
||||
#log_end_msg $?
|
||||
#;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented then remove the
|
||||
# 'force-reload' alias
|
||||
#
|
||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
case "$?" in
|
||||
0) log_end_msg 0 ;;
|
||||
1) log_end_msg 1 ;; # Old process is still running
|
||||
*) log_end_msg 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
log_end_msg 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
|
||||
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
|
||||
:
|
||||
1
debian/osmocom-gbproxy.install
vendored
1
debian/osmocom-gbproxy.install
vendored
@@ -1 +0,0 @@
|
||||
/usr/bin/osmo-gbproxy
|
||||
3
debian/osmocom-ipaccess-utils.install
vendored
3
debian/osmocom-ipaccess-utils.install
vendored
@@ -1,3 +0,0 @@
|
||||
/usr/bin/ipaccess-config
|
||||
/usr/bin/ipaccess-find
|
||||
/usr/bin/ipaccess-proxy
|
||||
8
debian/osmocom-nitb.default
vendored
8
debian/osmocom-nitb.default
vendored
@@ -1,8 +0,0 @@
|
||||
CONFIG_FILE="/etc/osmocom/osmo-nitb.cfg"
|
||||
HLR_FILE="/var/lib/osmocom/hlr.sqlite3"
|
||||
|
||||
DAEMON_ARGS="-P"
|
||||
|
||||
# Uncomment if using LCR+Asterisk
|
||||
# DAEMON_ARGS="-m -P"
|
||||
|
||||
3
debian/osmocom-nitb.dirs
vendored
3
debian/osmocom-nitb.dirs
vendored
@@ -1,3 +0,0 @@
|
||||
/etc/osmocom
|
||||
/var/log/osmocom
|
||||
/var/lib/osmocom
|
||||
1
debian/osmocom-nitb.examples
vendored
1
debian/osmocom-nitb.examples
vendored
@@ -1 +0,0 @@
|
||||
openbsc/doc/examples/osmo-nitb
|
||||
152
debian/osmocom-nitb.init
vendored
152
debian/osmocom-nitb.init
vendored
@@ -1,152 +0,0 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: osmo-nitb
|
||||
# Required-Start: $network $local_fs
|
||||
# Required-Stop:
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Osmocom GSM network-in-a-box
|
||||
# Description: A minimal implementation of the GSM Base Station Controller,
|
||||
# Mobile Switching Center, Home Location regster and all other
|
||||
# components to run a self-contained GSM network.
|
||||
### END INIT INFO
|
||||
|
||||
# Author: Harald Welte <laforge@gnumonks.org>
|
||||
|
||||
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
NAME=osmo-nitb # Introduce the short server's name here
|
||||
DESC="Osmocom GSM Network-in-a-Box" # Introduce a short description here
|
||||
DAEMON=/usr/bin/osmo-nitb # Introduce the server's location here
|
||||
SCRIPTNAME=/etc/init.d/osmocom-nitb
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x $DAEMON ] || exit 0
|
||||
|
||||
# Read configuration variable file if it is present
|
||||
[ -r /etc/default/osmocom-nitb ] && . /etc/default/osmocom-nitb
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
. /lib/init/vars.sh
|
||||
|
||||
# Define LSB log_* functions.
|
||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
DAEMON_ARGS="$DAEMON_ARGS -D -c $CONFIG_FILE -l $HLR_FILE"
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
# Return
|
||||
# 0 if daemon has been started
|
||||
# 1 if daemon was already running
|
||||
# 2 if daemon could not be started
|
||||
start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \
|
||||
|| return 1
|
||||
start-stop-daemon --start --quiet --exec $DAEMON -- \
|
||||
$DAEMON_ARGS \
|
||||
|| return 2
|
||||
# Add code here, if necessary, that waits for the process to be ready
|
||||
# to handle requests from services started subsequently which depend
|
||||
# on this one. As a last resort, sleep for some time.
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
do_stop()
|
||||
{
|
||||
# Return
|
||||
# 0 if daemon has been stopped
|
||||
# 1 if daemon was already stopped
|
||||
# 2 if daemon could not be stopped
|
||||
# other if a failure occurred
|
||||
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --name $NAME
|
||||
RETVAL="$?"
|
||||
[ "$RETVAL" = 2 ] && return 2
|
||||
# Wait for children to finish too if this is a daemon that forks
|
||||
# and if the daemon is only ever run from this initscript.
|
||||
# If the above conditions are not satisfied then add some other code
|
||||
# that waits for the process to drop all resources that could be
|
||||
# needed by services started subsequently. A last resort is to
|
||||
# sleep for some time.
|
||||
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
|
||||
[ "$?" = 2 ] && return 2
|
||||
return "$RETVAL"
|
||||
}
|
||||
|
||||
#
|
||||
# Function that sends a SIGHUP to the daemon/service
|
||||
#
|
||||
do_reload() {
|
||||
#
|
||||
# If the daemon can reload its configuration without
|
||||
# restarting (for example, when it is sent a SIGHUP),
|
||||
# then implement that here.
|
||||
#
|
||||
start-stop-daemon --stop --signal 1 --quiet $PIDFILE --name $NAME
|
||||
return 0
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
|
||||
do_start
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
status)
|
||||
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
|
||||
;;
|
||||
#reload|force-reload)
|
||||
#
|
||||
# If do_reload() is not implemented then leave this commented out
|
||||
# and leave 'force-reload' as an alias for 'restart'.
|
||||
#
|
||||
#log_daemon_msg "Reloading $DESC" "$NAME"
|
||||
#do_reload
|
||||
#log_end_msg $?
|
||||
#;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented then remove the
|
||||
# 'force-reload' alias
|
||||
#
|
||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
case "$?" in
|
||||
0) log_end_msg 0 ;;
|
||||
1) log_end_msg 1 ;; # Old process is still running
|
||||
*) log_end_msg 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
log_end_msg 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
|
||||
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
|
||||
:
|
||||
1
debian/osmocom-nitb.install
vendored
1
debian/osmocom-nitb.install
vendored
@@ -1 +0,0 @@
|
||||
/usr/bin/osmo-nitb
|
||||
2
debian/osmocom-sgsn.default
vendored
2
debian/osmocom-sgsn.default
vendored
@@ -1,2 +0,0 @@
|
||||
CONFIG_FILE="/etc/osmocom/osmo-sgsn.cfg"
|
||||
|
||||
1
debian/osmocom-sgsn.examples
vendored
1
debian/osmocom-sgsn.examples
vendored
@@ -1 +0,0 @@
|
||||
openbsc/doc/examples/osmo-sgsn
|
||||
150
debian/osmocom-sgsn.init
vendored
150
debian/osmocom-sgsn.init
vendored
@@ -1,150 +0,0 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: osmo-sgsn
|
||||
# Required-Start: $network $local_fs
|
||||
# Required-Stop:
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Osmocom Serving GPRS Support Node
|
||||
# Description: Osmocom Serving GPRS Support Node
|
||||
### END INIT INFO
|
||||
|
||||
# Author: Harald Welte <laforge@gnumonks.org>
|
||||
|
||||
# PATH should only include /usr/* if it runs after the mountnfs.sh script
|
||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||
NAME=osmo-sgsn # Introduce the short server's name here
|
||||
DESC="Osmocom Serving GPRS Support Node" # Introduce a short description here
|
||||
DAEMON=/usr/bin/osmo-sgsn # Introduce the server's location here
|
||||
SCRIPTNAME=/etc/init.d/osmocom-sgsn
|
||||
|
||||
# Exit if the package is not installed
|
||||
[ -x $DAEMON ] || exit 0
|
||||
|
||||
# Read configuration variable file if it is present
|
||||
[ -r /etc/default/osmocom-sgsn ] && . /etc/default/osmocom-sgsn
|
||||
|
||||
# Load the VERBOSE setting and other rcS variables
|
||||
. /lib/init/vars.sh
|
||||
|
||||
# Define LSB log_* functions.
|
||||
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
DAEMON_ARGS="$DAEMON_ARGS -D -c $CONFIG_FILE"
|
||||
|
||||
#
|
||||
# Function that starts the daemon/service
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
# Return
|
||||
# 0 if daemon has been started
|
||||
# 1 if daemon was already running
|
||||
# 2 if daemon could not be started
|
||||
start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \
|
||||
|| return 1
|
||||
start-stop-daemon --start --quiet --exec $DAEMON -- \
|
||||
$DAEMON_ARGS \
|
||||
|| return 2
|
||||
# Add code here, if necessary, that waits for the process to be ready
|
||||
# to handle requests from services started subsequently which depend
|
||||
# on this one. As a last resort, sleep for some time.
|
||||
}
|
||||
|
||||
#
|
||||
# Function that stops the daemon/service
|
||||
#
|
||||
do_stop()
|
||||
{
|
||||
# Return
|
||||
# 0 if daemon has been stopped
|
||||
# 1 if daemon was already stopped
|
||||
# 2 if daemon could not be stopped
|
||||
# other if a failure occurred
|
||||
start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --name $NAME
|
||||
RETVAL="$?"
|
||||
[ "$RETVAL" = 2 ] && return 2
|
||||
# Wait for children to finish too if this is a daemon that forks
|
||||
# and if the daemon is only ever run from this initscript.
|
||||
# If the above conditions are not satisfied then add some other code
|
||||
# that waits for the process to drop all resources that could be
|
||||
# needed by services started subsequently. A last resort is to
|
||||
# sleep for some time.
|
||||
start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
|
||||
[ "$?" = 2 ] && return 2
|
||||
return "$RETVAL"
|
||||
}
|
||||
|
||||
#
|
||||
# Function that sends a SIGHUP to the daemon/service
|
||||
#
|
||||
do_reload() {
|
||||
#
|
||||
# If the daemon can reload its configuration without
|
||||
# restarting (for example, when it is sent a SIGHUP),
|
||||
# then implement that here.
|
||||
#
|
||||
start-stop-daemon --stop --signal 1 --quiet $PIDFILE --name $NAME
|
||||
return 0
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
|
||||
do_start
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
stop)
|
||||
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
|
||||
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
|
||||
esac
|
||||
;;
|
||||
status)
|
||||
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
|
||||
;;
|
||||
#reload|force-reload)
|
||||
#
|
||||
# If do_reload() is not implemented then leave this commented out
|
||||
# and leave 'force-reload' as an alias for 'restart'.
|
||||
#
|
||||
#log_daemon_msg "Reloading $DESC" "$NAME"
|
||||
#do_reload
|
||||
#log_end_msg $?
|
||||
#;;
|
||||
restart|force-reload)
|
||||
#
|
||||
# If the "reload" option is implemented then remove the
|
||||
# 'force-reload' alias
|
||||
#
|
||||
log_daemon_msg "Restarting $DESC" "$NAME"
|
||||
do_stop
|
||||
case "$?" in
|
||||
0|1)
|
||||
do_start
|
||||
case "$?" in
|
||||
0) log_end_msg 0 ;;
|
||||
1) log_end_msg 1 ;; # Old process is still running
|
||||
*) log_end_msg 1 ;; # Failed to start
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# Failed to stop
|
||||
log_end_msg 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
|
||||
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
|
||||
:
|
||||
1
debian/osmocom-sgsn.install
vendored
1
debian/osmocom-sgsn.install
vendored
@@ -1 +0,0 @@
|
||||
/usr/bin/osmo-sgsn
|
||||
42
debian/rules
vendored
42
debian/rules
vendored
@@ -1,42 +0,0 @@
|
||||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
# Sample debian/rules that uses debhelper.
|
||||
#
|
||||
# This file was originally written by Joey Hess and Craig Small.
|
||||
# As a special exception, when this file is copied by dh-make into a
|
||||
# dh-make output file, you may use that output file without restriction.
|
||||
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
||||
#
|
||||
# Modified to make a template file for a multi-binary package with separated
|
||||
# build-arch and build-indep targets by Bill Allombert 2001
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
DEBIAN := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2)
|
||||
DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1)
|
||||
VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g')
|
||||
|
||||
export DEB_BUILD_HARDENING=1
|
||||
|
||||
%:
|
||||
dh --sourcedirectory=openbsc --with autoreconf $@
|
||||
|
||||
# This is needed for debian stable (squeeze)
|
||||
override_dh_autoreconf:
|
||||
cd openbsc && autoreconf --install --force
|
||||
|
||||
override_dh_strip:
|
||||
dh_strip -posmocom-bsc --dbg-package=osmocom-bsc-dbg
|
||||
dh_strip -posmocom-nitb --dbg-package=osmocom-nitb-dbg
|
||||
dh_strip -posmocom-ipaccess-utils --dbg-package=osmocom-ipaccess-utils-dbg
|
||||
dh_strip -posmocom-bs11-utils --dbg-package=osmocom-bs11-utils-dbg
|
||||
dh_strip -posmocom-sgsn --dbg-package=osmocom-sgsn-dbg
|
||||
dh_strip -posmocom-gbproxy --dbg-package=osmocom-gbproxy-dbg
|
||||
dh_strip -posmocom-bsc-nat --dbg-package=osmocom-bsc-nat-dbg
|
||||
dh_strip -posmo-gtphub --dbg-package=osmo-gtphub-dbg
|
||||
|
||||
override_dh_auto_configure:
|
||||
echo $(VERSION) > openbsc/.tarball-version
|
||||
dh_auto_configure --sourcedirectory=openbsc -- --enable-nat --enable-osmo-bsc --enable-smpp
|
||||
|
||||
1
debian/source/format
vendored
1
debian/source/format
vendored
@@ -1 +0,0 @@
|
||||
3.0 (native)
|
||||
64
openbsc/.gitignore
vendored
64
openbsc/.gitignore
vendored
@@ -1,91 +1,39 @@
|
||||
*.o
|
||||
*.lo
|
||||
*.a
|
||||
.deps
|
||||
Makefile
|
||||
Makefile.in
|
||||
bscconfig.h
|
||||
bscconfig.h.in
|
||||
openbsc.pc
|
||||
src/osmo-nitb/osmo-nitb
|
||||
src/osmo-bsc_mgcp/osmo-bsc_mgcp
|
||||
src/osmo-bsc/osmo-bsc
|
||||
src/utils/meas_vis
|
||||
src/utils/osmo-meas-pcap2db
|
||||
src/utils/osmo-meas-udp2db
|
||||
src/utils/smpp_mirror
|
||||
bsc_hack
|
||||
bsc_msc_ip
|
||||
*.*~
|
||||
*.sw?
|
||||
.libs
|
||||
*.pyc
|
||||
*.gcda
|
||||
*.gcno
|
||||
|
||||
#configure
|
||||
aclocal.m4
|
||||
autom4te.cache/
|
||||
config.log
|
||||
config.status
|
||||
config.guess
|
||||
config.sub
|
||||
configure
|
||||
compile
|
||||
depcomp
|
||||
install-sh
|
||||
missing
|
||||
stamp-h1
|
||||
libtool
|
||||
ltmain.sh
|
||||
|
||||
# git-version-gen magic
|
||||
.tarball-version
|
||||
.version
|
||||
|
||||
|
||||
# apps and app data
|
||||
hlr.sqlite3
|
||||
src/utils/bs11_config
|
||||
src/ipaccess/ipaccess-config
|
||||
src/ipaccess/ipaccess-find
|
||||
src/ipaccess/ipaccess-firmware
|
||||
src/ipaccess/ipaccess-proxy
|
||||
src/utils/isdnsync
|
||||
src/nat/bsc_nat
|
||||
src/gprs/osmo-sgsn
|
||||
src/gprs/osmo-gbproxy
|
||||
src/gprs/osmo-gtphub
|
||||
src/osmo-bsc_nat/osmo-bsc_nat
|
||||
bs11_config
|
||||
ipaccess-config
|
||||
ipaccess-find
|
||||
isdnsync
|
||||
|
||||
#tests
|
||||
tests/testsuite.dir
|
||||
tests/bsc-nat/bsc_nat_test
|
||||
tests/bsc-nat-trie/bsc_nat_trie_test
|
||||
tests/channel/channel_test
|
||||
tests/db/db_test
|
||||
tests/debug/debug_test
|
||||
tests/gsm0408/gsm0408_test
|
||||
tests/mgcp/mgcp_test
|
||||
tests/sccp/sccp_test
|
||||
tests/sms/sms_test
|
||||
tests/timer/timer_test
|
||||
tests/gprs/gprs_test
|
||||
tests/gbproxy/gbproxy_test
|
||||
tests/abis/abis_test
|
||||
tests/si/si_test
|
||||
tests/smpp/smpp_test
|
||||
tests/bsc/bsc_test
|
||||
tests/trau/trau_test
|
||||
tests/mgcp/mgcp_transcoding_test
|
||||
tests/sgsn/sgsn_test
|
||||
tests/subscr/subscr_test
|
||||
tests/oap/oap_test
|
||||
tests/gtphub/gtphub_test
|
||||
|
||||
tests/atconfig
|
||||
tests/atlocal
|
||||
tests/package.m4
|
||||
tests/testsuite
|
||||
tests/testsuite.log
|
||||
|
||||
|
||||
src/openbsc.cfg*
|
||||
|
||||
@@ -3,5 +3,3 @@ Holger Freyther <zecke@selfish.org>
|
||||
Jan Luebbe <jluebbe@debian.org>
|
||||
Stefan Schmidt <stefan@datenfreihafen.org>
|
||||
Daniel Willmann <daniel@totalueberwachung.de>
|
||||
Andreas Eversberg <Andreas.Eversberg@versatel.de>
|
||||
Sylvain Munaut <246tnt@gmail.com>
|
||||
|
||||
890
openbsc/COPYING
890
openbsc/COPYING
@@ -1,624 +1,285 @@
|
||||
GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
Version 3, 19 November 2007
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for
|
||||
software and other kinds of works, specifically designed to ensure
|
||||
cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
our General Public Licenses are intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users.
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
Developers that use our General Public Licenses protect your rights
|
||||
with two steps: (1) assert copyright on the software, and (2) offer
|
||||
you this License which gives you legal permission to copy, distribute
|
||||
and/or modify the software.
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
A secondary benefit of defending all users' freedom is that
|
||||
improvements made in alternate versions of the program, if they
|
||||
receive widespread use, become available for other developers to
|
||||
incorporate. Many developers of free software are heartened and
|
||||
encouraged by the resulting cooperation. However, in the case of
|
||||
software used on network servers, this result may fail to come about.
|
||||
The GNU General Public License permits making a modified version and
|
||||
letting the public access it on a server without ever releasing its
|
||||
source code to the public.
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
The GNU Affero General Public License is designed specifically to
|
||||
ensure that, in such cases, the modified source code becomes available
|
||||
to the community. It requires the operator of a network server to
|
||||
provide the source code of the modified version running there to the
|
||||
users of that server. Therefore, public use of a modified version, on
|
||||
a publicly accessible server, gives the public access to the source
|
||||
code of the modified version.
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
An older license, called the Affero General Public License and
|
||||
published by Affero, was designed to accomplish similar goals. This is
|
||||
a different license, not a version of the Affero GPL, but Affero has
|
||||
released a new version of the Affero GPL which permits relicensing under
|
||||
this license.
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU Affero General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
13. Remote Network Interaction; Use with the GNU General Public License.
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
Notwithstanding any other provision of this License, if you modify the
|
||||
Program, your modified version must prominently offer all users
|
||||
interacting with it remotely through a computer network (if your version
|
||||
supports such interaction) an opportunity to receive the Corresponding
|
||||
Source of your version by providing access to the Corresponding Source
|
||||
from a network server at no charge, through some standard or customary
|
||||
means of facilitating copying of software. This Corresponding Source
|
||||
shall include the Corresponding Source for any work covered by version 3
|
||||
of the GNU General Public License that is incorporated pursuant to the
|
||||
following paragraph.
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the work with which it is combined will remain governed by version
|
||||
3 of the GNU General Public License.
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU Affero General Public License from time to time. Such new versions
|
||||
will be similar in spirit to the present version, but may differ in detail to
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU Affero General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU Affero General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU Affero General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
NO WARRANTY
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
16. Limitation of Liability.
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
@@ -626,36 +287,53 @@ free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If your software can interact with users remotely through a computer
|
||||
network, you should also make sure that it provides a way for users to
|
||||
get its source. For example, if your program is a web application, its
|
||||
interface could display a "Source" link that leads users to an archive
|
||||
of the code. There are many ways you could offer source, and different
|
||||
solutions will be better for different programs; see section 13 for the
|
||||
specific requirements.
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
|
||||
|
||||
AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include
|
||||
SUBDIRS = doc include src tests
|
||||
INCLUDES = $(all_includes) -I$(top_srcdir)/include
|
||||
SUBDIRS = include src tests
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = openbsc.pc
|
||||
|
||||
BUILT_SOURCES = $(top_srcdir)/.version
|
||||
EXTRA_DIST = git-version-gen osmoappdesc.py .version
|
||||
$(top_srcdir)/.version:
|
||||
echo $(VERSION) > $@-t && mv $@-t $@
|
||||
dist-hook:
|
||||
echo $(VERSION) > $(distdir)/.tarball-version
|
||||
#dist-hook:
|
||||
# rm -rf `find $(distdir) -name .svn`
|
||||
|
||||
@@ -1,32 +1,18 @@
|
||||
About OpenBSC
|
||||
=============
|
||||
|
||||
OpenBSC is a minimalistic implementation of the GSM Network, with
|
||||
particular emphasis on the functionality typically provided by the BSC,
|
||||
MSC, HLR, VLR and SMSC.
|
||||
OpenBSC is a minimalistic implementation of the GSM Network, with particular
|
||||
emphasis on the functionality typically provided by the BSC, MSC, HLR, VLR.
|
||||
|
||||
Its currently supported interfaces towards the BTS are:
|
||||
Its only current interface is a mISDN based E1 interface utilizing the A-bis
|
||||
protocol between BSC and BTS. In other words, you can connect an existing
|
||||
GSM Base Transceiver Station (BTS) through E1 to OpenBSC.
|
||||
|
||||
* Classic A-bis over E1 using a mISDN based E1 interface. In other
|
||||
words, you can connect existing GSM Base Transceiver Station (BTS)
|
||||
through E1 to OpenBSC. So far, we have only tested the Siemens BS-11
|
||||
Test reports with other BTS are much appreciated!
|
||||
|
||||
* A-bis over IP as used by the ip.access nanoBTS product family
|
||||
|
||||
You can find the project documentation at http://openbsc.gnumonks.org/
|
||||
So far, it has only been tested with the Siemens microBTS BS-11. Test reports
|
||||
with other BTS are appreciated!
|
||||
|
||||
This project is still in its early days, and there are lots of areas where it
|
||||
doesn't behave as per GSM spec.
|
||||
|
||||
December 29, 2008
|
||||
Harald Welte <laforge@gnumonks.org>
|
||||
|
||||
|
||||
libosmocore
|
||||
===========
|
||||
|
||||
Please note that as of March 2010, OpenBSC has a dependency to a library
|
||||
called "libosmocore". You can obtain that library from
|
||||
|
||||
git://git.osmocom.org/libosmocore.git
|
||||
|
||||
|
||||
@@ -1,216 +0,0 @@
|
||||
dnl Process this file with autoconf to produce a configure script
|
||||
AC_INIT([openbsc],
|
||||
m4_esyscmd([./git-version-gen .tarball-version]),
|
||||
[openbsc@lists.osmocom.org])
|
||||
|
||||
AM_INIT_AUTOMAKE([dist-bzip2])
|
||||
AC_CONFIG_TESTDIR(tests)
|
||||
|
||||
dnl kernel style compile messages
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
dnl checks for programs
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_RANLIB
|
||||
|
||||
dnl checks for libraries
|
||||
AC_SEARCH_LIBS([dlopen], [dl dld], [LIBRARY_DL="$LIBS";LIBS=""])
|
||||
AC_SUBST(LIBRARY_DL)
|
||||
|
||||
|
||||
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.6.4)
|
||||
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.3.0)
|
||||
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl)
|
||||
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 0.7.0)
|
||||
PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 0.2.0)
|
||||
PKG_CHECK_MODULES(LIBOSMOGB, libosmogb >= 0.6.4)
|
||||
PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 0.0.1)
|
||||
PKG_CHECK_MODULES(LIBCRYPTO, libcrypto >= 0.9.5)
|
||||
|
||||
# Enabke/disable the NAT?
|
||||
AC_ARG_ENABLE([nat], [AS_HELP_STRING([--enable-nat], [Build the BSC NAT. Requires SCCP])],
|
||||
[osmo_ac_build_nat="$enableval"],[osmo_ac_build_nat="no"])
|
||||
if test "$osmo_ac_build_nat" = "yes" ; then
|
||||
PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.0.2)
|
||||
fi
|
||||
AM_CONDITIONAL(BUILD_NAT, test "x$osmo_ac_build_nat" = "xyes")
|
||||
AC_SUBST(osmo_ac_build_nat)
|
||||
|
||||
# Enable/disable the BSC?
|
||||
AC_ARG_ENABLE([osmo-bsc], [AS_HELP_STRING([--enable-osmo-bsc], [Build the Osmo BSC])],
|
||||
[osmo_ac_build_bsc="$enableval"],[osmo_ac_build_bsc="no"])
|
||||
if test "$osmo_ac_build_bsc" = "yes" ; then
|
||||
PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.0.6)
|
||||
fi
|
||||
AM_CONDITIONAL(BUILD_BSC, test "x$osmo_ac_build_bsc" = "xyes")
|
||||
AC_SUBST(osmo_ac_build_bsc)
|
||||
|
||||
# Enable/disable smpp support in the nitb?
|
||||
AC_ARG_ENABLE([smpp], [AS_HELP_STRING([--enable-smpp], [Build the SMPP interface])],
|
||||
[osmo_ac_build_smpp="$enableval"],[osmo_ac_build_smpp="no"])
|
||||
if test "$osmo_ac_build_smpp" = "yes" ; then
|
||||
PKG_CHECK_MODULES(LIBSMPP34, libsmpp34 >= 1.10)
|
||||
AC_DEFINE(BUILD_SMPP, 1, [Define if we want to build SMPP])
|
||||
fi
|
||||
AM_CONDITIONAL(BUILD_SMPP, test "x$osmo_ac_build_smpp" = "xyes")
|
||||
AC_SUBST(osmo_ac_build_smpp)
|
||||
|
||||
# Enable/disable transcoding within osmo-bsc_mgcp?
|
||||
AC_ARG_ENABLE([mgcp-transcoding], [AS_HELP_STRING([--enable-mgcp-transcoding], [Build the MGCP gateway with internal transcoding enabled.])],
|
||||
[osmo_ac_mgcp_transcoding="$enableval"],[osmo_ac_mgcp_transcoding="no"])
|
||||
AC_ARG_WITH([g729], [AS_HELP_STRING([--with-g729], [Enable G.729 encoding/decoding.])], [osmo_ac_with_g729="$withval"],[osmo_ac_with_g729="no"])
|
||||
|
||||
if test "$osmo_ac_mgcp_transcoding" = "yes" ; then
|
||||
AC_SEARCH_LIBS([gsm_create], [gsm], [LIBRARY_GSM="$LIBS";LIBS=""])
|
||||
AC_SUBST(LIBRARY_GSM)
|
||||
if test "$osmo_ac_with_g729" = "yes" ; then
|
||||
PKG_CHECK_MODULES(LIBBCG729, libbcg729 >= 0.1, [AC_DEFINE([HAVE_BCG729], [1], [Use bgc729 decoder/encoder])])
|
||||
fi
|
||||
AC_DEFINE(BUILD_MGCP_TRANSCODING, 1, [Define if we want to build the MGCP gateway with transcoding support])
|
||||
fi
|
||||
AM_CONDITIONAL(BUILD_MGCP_TRANSCODING, test "x$osmo_ac_mgcp_transcoding" = "xyes")
|
||||
AC_SUBST(osmo_ac_mgcp_transcoding)
|
||||
|
||||
|
||||
found_libgtp=yes
|
||||
PKG_CHECK_MODULES(LIBGTP, libgtp >= 0.92, , found_libgtp=no)
|
||||
AM_CONDITIONAL(HAVE_LIBGTP, test "$found_libgtp" = yes)
|
||||
AC_SUBST(found_libgtp)
|
||||
|
||||
found_libcares=yes
|
||||
PKG_CHECK_MODULES([LIBCARES], [libcares], [], [found_libcares=no])
|
||||
AM_CONDITIONAL(HAVE_LIBCARES, test "$found_libcares" = yes)
|
||||
AC_SUBST(found_libcares)
|
||||
|
||||
dnl checks for header files
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(dahdi/user.h,,AC_MSG_WARN(DAHDI input driver will not be built))
|
||||
AC_CHECK_HEADERS(dbi/dbd.h,,AC_MSG_ERROR(DBI library is not installed))
|
||||
AC_CHECK_HEADERS(pcap/pcap.h,,AC_MSG_ERROR(PCAP library is not installed))
|
||||
|
||||
found_cdk=yes
|
||||
AC_CHECK_HEADERS(cdk/cdk.h,,found_cdk=no)
|
||||
AM_CONDITIONAL(HAVE_LIBCDK, test "$found_cdk" = yes)
|
||||
|
||||
found_sqlite3=yes
|
||||
PKG_CHECK_MODULES(SQLITE3, sqlite3, ,found_sqlite3=no)
|
||||
AM_CONDITIONAL(HAVE_SQLITE3, test "$found_sqlite3" = yes)
|
||||
AC_SUBST(found_sqlite3)
|
||||
|
||||
|
||||
dnl Checks for typedefs, structures and compiler characteristics
|
||||
|
||||
# The following test is taken from WebKit's webkit.m4
|
||||
saved_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -fvisibility=hidden "
|
||||
AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
|
||||
[ AC_MSG_RESULT([yes])
|
||||
SYMBOL_VISIBILITY="-fvisibility=hidden"],
|
||||
AC_MSG_RESULT([no]))
|
||||
CFLAGS="$saved_CFLAGS"
|
||||
AC_SUBST(SYMBOL_VISIBILITY)
|
||||
|
||||
# Coverage build taken from WebKit's configure.in
|
||||
AC_MSG_CHECKING([whether to enable code coverage support])
|
||||
AC_ARG_ENABLE(coverage,
|
||||
AC_HELP_STRING([--enable-coverage],
|
||||
[enable code coverage support [default=no]]),
|
||||
[],[enable_coverage="no"])
|
||||
AC_MSG_RESULT([$enable_coverage])
|
||||
if test "$enable_coverage" = "yes"; then
|
||||
COVERAGE_CFLAGS="-ftest-coverage -fprofile-arcs"
|
||||
COVERAGE_LDFLAGS="-ftest-coverage -fprofile-arcs"
|
||||
AC_SUBST([COVERAGE_CFLAGS])
|
||||
AC_SUBST([COVERAGE_LDFLAGS])
|
||||
fi
|
||||
|
||||
AC_DEFUN([CHECK_TM_INCLUDES_TM_GMTOFF], [
|
||||
AC_CACHE_CHECK(
|
||||
[whether struct tm has tm_gmtoff member],
|
||||
osmo_cv_tm_includes_tm_gmtoff,
|
||||
[AC_LINK_IFELSE([
|
||||
AC_LANG_PROGRAM([
|
||||
#include <time.h>
|
||||
], [
|
||||
time_t t = time(NULL);
|
||||
struct tm* lt = localtime(&t);
|
||||
int off = lt->tm_gmtoff;
|
||||
])
|
||||
],
|
||||
osmo_cv_tm_includes_tm_gmtoff=yes,
|
||||
osmo_cv_tm_includes_tm_gmtoff=no
|
||||
)]
|
||||
)
|
||||
if test "x$osmo_cv_tm_includes_tm_gmtoff" = xyes; then
|
||||
AC_DEFINE(HAVE_TM_GMTOFF_IN_TM, 1,
|
||||
[Define if struct tm has tm_gmtoff member.])
|
||||
fi
|
||||
])
|
||||
|
||||
CHECK_TM_INCLUDES_TM_GMTOFF
|
||||
|
||||
AC_ARG_ENABLE([vty_tests],
|
||||
AC_HELP_STRING([--enable-vty-tests],
|
||||
[Include the VTY/CTRL tests in make check (deprecated)
|
||||
[default=no]]),
|
||||
[enable_ext_tests="$enableval"],[enable_ext_tests="no"])
|
||||
AC_ARG_ENABLE([external_tests],
|
||||
AC_HELP_STRING([--enable-external-tests],
|
||||
[Include the VTY/CTRL tests in make check [default=no]]),
|
||||
[enable_ext_tests="$enableval"],[enable_ext_tests="no"])
|
||||
if test "x$enable_ext_tests" = "xyes" ; then
|
||||
AM_PATH_PYTHON
|
||||
AC_CHECK_PROG(OSMOTESTEXT_CHECK,osmotestvty.py,yes)
|
||||
if test "x$OSMOTESTEXT_CHECK" != "xyes" ; then
|
||||
AC_MSG_ERROR([Please install osmocom-python to run the VTY/CTRL tests.])
|
||||
fi
|
||||
fi
|
||||
AC_MSG_CHECKING([whether to enable VTY/CTRL tests])
|
||||
AC_MSG_RESULT([$enable_ext_tests])
|
||||
AM_CONDITIONAL(ENABLE_EXT_TESTS, test "x$enable_ext_tests" = "xyes")
|
||||
|
||||
dnl Generate the output
|
||||
AM_CONFIG_HEADER(bscconfig.h)
|
||||
|
||||
AC_OUTPUT(
|
||||
openbsc.pc
|
||||
include/openbsc/Makefile
|
||||
include/Makefile
|
||||
src/Makefile
|
||||
src/libtrau/Makefile
|
||||
src/libbsc/Makefile
|
||||
src/libmsc/Makefile
|
||||
src/libmgcp/Makefile
|
||||
src/libcommon/Makefile
|
||||
src/libfilter/Makefile
|
||||
src/osmo-nitb/Makefile
|
||||
src/osmo-bsc/Makefile
|
||||
src/osmo-bsc_nat/Makefile
|
||||
src/osmo-bsc_mgcp/Makefile
|
||||
src/ipaccess/Makefile
|
||||
src/utils/Makefile
|
||||
src/gprs/Makefile
|
||||
tests/Makefile
|
||||
tests/atlocal
|
||||
tests/gsm0408/Makefile
|
||||
tests/db/Makefile
|
||||
tests/channel/Makefile
|
||||
tests/bsc/Makefile
|
||||
tests/bsc-nat/Makefile
|
||||
tests/bsc-nat-trie/Makefile
|
||||
tests/mgcp/Makefile
|
||||
tests/gprs/Makefile
|
||||
tests/gbproxy/Makefile
|
||||
tests/abis/Makefile
|
||||
tests/smpp/Makefile
|
||||
tests/trau/Makefile
|
||||
tests/sgsn/Makefile
|
||||
tests/subscr/Makefile
|
||||
tests/oap/Makefile
|
||||
tests/gtphub/Makefile
|
||||
doc/Makefile
|
||||
doc/examples/Makefile
|
||||
Makefile)
|
||||
54
openbsc/configure.in
Normal file
54
openbsc/configure.in
Normal file
@@ -0,0 +1,54 @@
|
||||
dnl Process this file with autoconf to produce a configure script
|
||||
AC_INIT
|
||||
|
||||
AM_INIT_AUTOMAKE(openbsc, 0.3onwaves)
|
||||
|
||||
dnl kernel style compile messages
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
||||
|
||||
dnl checks for programs
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_CC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_RANLIB
|
||||
|
||||
dnl checks for libraries
|
||||
AC_SEARCH_LIBS(crypt, crypt,
|
||||
[LIBCRYPT="-lcrypt"; AC_DEFINE([VTY_CRYPT_PW], [], [Use crypt functionality of vty.])])
|
||||
|
||||
dnl checks for header files
|
||||
AC_HEADER_STDC
|
||||
|
||||
dnl Checks for typedefs, structures and compiler characteristics
|
||||
|
||||
# The following test is taken from WebKit's webkit.m4
|
||||
saved_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -fvisibility=hidden "
|
||||
AC_MSG_CHECKING([if ${CC} supports -fvisibility=hidden])
|
||||
AC_COMPILE_IFELSE([char foo;],
|
||||
[ AC_MSG_RESULT([yes])
|
||||
SYMBOL_VISIBILITY="-fvisibility=hidden"],
|
||||
AC_MSG_RESULT([no]))
|
||||
CFLAGS="$saved_CFLAGS"
|
||||
AC_SUBST(SYMBOL_VISIBILITY)
|
||||
|
||||
|
||||
dnl Generate the output
|
||||
AM_CONFIG_HEADER(bscconfig.h)
|
||||
|
||||
AC_OUTPUT(
|
||||
openbsc.pc
|
||||
include/openbsc/Makefile
|
||||
include/vty/Makefile
|
||||
include/sccp/Makefile
|
||||
include/Makefile
|
||||
src/Makefile
|
||||
tests/Makefile
|
||||
tests/debug/Makefile
|
||||
tests/timer/Makefile
|
||||
tests/sms/Makefile
|
||||
tests/gsm0408/Makefile
|
||||
tests/db/Makefile
|
||||
tests/channel/Makefile
|
||||
tests/sccp/Makefile
|
||||
Makefile)
|
||||
2
openbsc/contrib/README
Normal file
2
openbsc/contrib/README
Normal file
@@ -0,0 +1,2 @@
|
||||
This contains a set of scripts used for the development of the
|
||||
MSC functionality.
|
||||
@@ -1,170 +0,0 @@
|
||||
-- Split trace based on SCCP Source
|
||||
-- There are still bugs to find... bugs bugs bugs... hmm
|
||||
do
|
||||
local function init_listener()
|
||||
print("CREATED LISTENER")
|
||||
local tap = Listener.new("ip", "sccp && (ip.src == 172.16.1.81 || ip.dst == 172.16.1.81)")
|
||||
local sccp_type_field = Field.new("sccp.message_type")
|
||||
local sccp_src_field = Field.new("sccp.slr")
|
||||
local sccp_dst_field = Field.new("sccp.dlr")
|
||||
local msg_type_field = Field.new("gsm_a.dtap_msg_mm_type")
|
||||
local lu_rej_field = Field.new("gsm_a.dtap.rej_cause")
|
||||
local ip_src_field = Field.new("ip.src")
|
||||
local ip_dst_field = Field.new("ip.dst")
|
||||
|
||||
--
|
||||
local bssmap_msgtype_field = Field.new("gsm_a.bssmap_msgtype")
|
||||
-- assignment failure 0x03
|
||||
--
|
||||
|
||||
--
|
||||
local dtap_cause_field = Field.new("gsm_a_dtap.cause")
|
||||
local dtap_cc_field = Field.new("gsm_a.dtap_msg_cc_type")
|
||||
|
||||
local connections = {}
|
||||
|
||||
function check_failure(con)
|
||||
check_lu_reject(con)
|
||||
check_disconnect(con)
|
||||
check_failures(con)
|
||||
end
|
||||
|
||||
-- cipher mode reject
|
||||
function check_failures(con)
|
||||
local msgtype = bssmap_msgtype_field()
|
||||
if not msgtype then
|
||||
return
|
||||
end
|
||||
|
||||
msgtype = tonumber(msgtype)
|
||||
if msgtype == 89 then
|
||||
print("Cipher mode reject")
|
||||
con[4] = true
|
||||
elseif msgtype == 0x03 then
|
||||
print("Assignment failure")
|
||||
con[4] = true
|
||||
elseif msgtype == 0x22 then
|
||||
print("Clear Request... RF failure?")
|
||||
con[4] = true
|
||||
end
|
||||
end
|
||||
|
||||
-- check if a DISCONNECT is normal
|
||||
function check_disconnect(con)
|
||||
local msg_type = dtap_cc_field()
|
||||
if not msg_type then
|
||||
return
|
||||
end
|
||||
|
||||
if tonumber(msg_type) ~= 0x25 then
|
||||
return
|
||||
end
|
||||
|
||||
local cause = dtap_cause_field()
|
||||
if not cause then
|
||||
return
|
||||
end
|
||||
|
||||
cause = tonumber(cause)
|
||||
if cause ~= 0x10 then
|
||||
print("DISCONNECT != Normal")
|
||||
con[4] = true
|
||||
end
|
||||
end
|
||||
|
||||
-- check if we have a LU Reject
|
||||
function check_lu_reject(con)
|
||||
local msg_type = msg_type_field()
|
||||
if not msg_type then
|
||||
return
|
||||
end
|
||||
|
||||
msg_type = tonumber(tostring(msg_type))
|
||||
if msg_type == 0x04 then
|
||||
print("LU REJECT with " .. tostring(lu_rej_field()))
|
||||
con[4] = true
|
||||
end
|
||||
end
|
||||
|
||||
function tap.packet(pinfo,tvb,ip)
|
||||
local ip_src = tostring(ip_src_field())
|
||||
local ip_dst = tostring(ip_dst_field())
|
||||
local sccp_type = tonumber(tostring(sccp_type_field()))
|
||||
local sccp_src = sccp_src_field()
|
||||
local sccp_dst = sccp_dst_field()
|
||||
|
||||
local con
|
||||
|
||||
if sccp_type == 0x01 then
|
||||
elseif sccp_type == 0x2 then
|
||||
local src = string.format("%s-%s", ip_src, tostring(sccp_src))
|
||||
local dst = string.format("%s-%s", ip_dst, tostring(sccp_dst))
|
||||
local datestring = os.date("%Y%m%d%H%M%S")
|
||||
local pcap_name = string.format("alink_trace_%s-%s_%s.pcap", src, dst, datestring)
|
||||
local dumper = Dumper.new_for_current(pcap_name)
|
||||
|
||||
local con = { ip_src, tostring(sccp_src), tostring(sccp_dst), false, dumper, pcap_name }
|
||||
|
||||
dumper:dump_current()
|
||||
connections[src] = con
|
||||
connections[dst] = con
|
||||
elseif sccp_type == 0x4 then
|
||||
-- close a connection... remove it from the list
|
||||
local src = string.format("%s-%s", ip_src, tostring(sccp_src))
|
||||
local dst = string.format("%s-%s", ip_dst, tostring(sccp_dst))
|
||||
|
||||
local con = connections[src]
|
||||
if not con then
|
||||
return
|
||||
end
|
||||
|
||||
con[5]:dump_current()
|
||||
con[5]:flush()
|
||||
|
||||
-- this causes a crash on unpacted wireshark
|
||||
con[5]:close()
|
||||
|
||||
-- the connection had a failure
|
||||
if con[4] == true then
|
||||
local datestring = os.date("%Y%m%d%H%M%S")
|
||||
local new_name = string.format("alink_failure_%s_%s-%s.pcap", datestring, con[2], con[3])
|
||||
os.rename(con[6], new_name)
|
||||
else
|
||||
os.remove(con[6])
|
||||
end
|
||||
|
||||
|
||||
-- clear the old connection
|
||||
connections[src] = nil
|
||||
connections[dst] = nil
|
||||
|
||||
elseif sccp_type == 0x5 then
|
||||
-- not handled yet... we should verify stuff here...
|
||||
local dst = string.format("%s-%s", ip_dst, tostring(sccp_dst))
|
||||
local con = connections[dst]
|
||||
if not con then
|
||||
return
|
||||
end
|
||||
con[5]:dump_current()
|
||||
elseif sccp_type == 0x6 then
|
||||
local dst = string.format("%s-%s", ip_dst, tostring(sccp_dst))
|
||||
local con = connections[dst]
|
||||
if not con then
|
||||
print("DON'T KNOW THIS CONNECTION for " .. ip_dst)
|
||||
return
|
||||
end
|
||||
con[5]:dump_current()
|
||||
check_failure(con)
|
||||
end
|
||||
|
||||
end
|
||||
function tap.draw()
|
||||
print("DRAW")
|
||||
end
|
||||
function tap.reset()
|
||||
print("RESET")
|
||||
end
|
||||
end
|
||||
|
||||
init_listener()
|
||||
end
|
||||
@@ -1 +0,0 @@
|
||||
Some crazy scripts call testing... and MSC link failure simulation
|
||||
@@ -1,8 +0,0 @@
|
||||
ABORT BUSY
|
||||
ABORT 'NO CARRIER'
|
||||
ABORT 'OK'
|
||||
|
||||
'' AT
|
||||
SAY "Dialing a number\n"
|
||||
'OK' ATD05660066;
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Evil dial script..
|
||||
|
||||
while true;
|
||||
do
|
||||
chat -v -f all_dial < /dev/ttyACM0 > /dev/ttyACM0
|
||||
sleep 5s
|
||||
chat -v -f hangup < /dev/ttyACM0 > /dev/ttyACM0
|
||||
sleep 2s
|
||||
done
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
sleep 3
|
||||
echo "enable"
|
||||
sleep 1
|
||||
echo "drop bts connection 0 oml"
|
||||
sleep 1
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
while true;
|
||||
do
|
||||
echo "Going to drop the OML connection"
|
||||
./drop-oml.sh | telnet 127.0.0.1 4242
|
||||
sleep 58m
|
||||
done
|
||||
@@ -1,4 +0,0 @@
|
||||
TIMEOUT 10
|
||||
'' ^Z
|
||||
SAY "Waiting for hangup confirm\n"
|
||||
'' ATH;
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
while true;
|
||||
do
|
||||
echo "Kill the osmo-bsc"
|
||||
/usr/bin/kill -s SIGUSR2 `pidof osmo-bsc`
|
||||
sleep 58s
|
||||
done
|
||||
@@ -1,104 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import sys,os
|
||||
from optparse import OptionParser
|
||||
import socket
|
||||
import struct
|
||||
|
||||
verbose = False
|
||||
|
||||
def prefix_ipa_ctrl_header(data):
|
||||
return struct.pack(">HBB", len(data)+1, 0xee, 0) + data
|
||||
|
||||
def remove_ipa_ctrl_header(data):
|
||||
if (len(data) < 4):
|
||||
raise BaseException("Answer too short!")
|
||||
(plen, ipa_proto, osmo_proto) = struct.unpack(">HBB", data[:4])
|
||||
if (plen + 3 > len(data)):
|
||||
print "Warning: Wrong payload length (expected %i, got %i)" % (plen, len(data) - 3)
|
||||
if (ipa_proto != 0xee or osmo_proto != 0):
|
||||
raise BaseException("Wrong protocol in answer!")
|
||||
|
||||
return data[4:plen+3], data[plen+3:]
|
||||
|
||||
def connect(host, port):
|
||||
if verbose:
|
||||
print "Connecting to host %s:%i" % (host, port)
|
||||
|
||||
sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sck.setblocking(1)
|
||||
sck.connect((host, port))
|
||||
return sck
|
||||
|
||||
def send(sck, data):
|
||||
if verbose:
|
||||
print "Sending \"%s\"" %(data)
|
||||
data = prefix_ipa_ctrl_header(data)
|
||||
sck.send(data)
|
||||
|
||||
def do_set(var, value, id, sck):
|
||||
setmsg = "SET %s %s %s" %(options.id, var, value)
|
||||
send(sck, setmsg)
|
||||
|
||||
def do_get(var, id, sck):
|
||||
getmsg = "GET %s %s" %(options.id, var)
|
||||
send(sck, getmsg)
|
||||
|
||||
parser = OptionParser("Usage: %prog [options] var [value]")
|
||||
parser.add_option("-d", "--host", dest="host",
|
||||
help="connect to HOST", metavar="HOST")
|
||||
parser.add_option("-p", "--port", dest="port", type="int",
|
||||
help="use PORT", metavar="PORT", default=4249)
|
||||
parser.add_option("-g", "--get", action="store_true",
|
||||
dest="cmd_get", help="perform GET operation")
|
||||
parser.add_option("-s", "--set", action="store_true",
|
||||
dest="cmd_set", help="perform SET operation")
|
||||
parser.add_option("-i", "--id", dest="id", default="1",
|
||||
help="set id manually", metavar="ID")
|
||||
parser.add_option("-v", "--verbose", action="store_true",
|
||||
dest="verbose", help="be verbose", default=False)
|
||||
parser.add_option("-m", "--monitor", action="store_true",
|
||||
dest="monitor", help="monitor the connection for traps", default=False)
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
verbose = options.verbose
|
||||
|
||||
if options.cmd_set and options.cmd_get:
|
||||
parser.error("Get and set options are mutually exclusive!")
|
||||
|
||||
if not (options.cmd_get or options.cmd_set or options.monitor):
|
||||
parser.error("One of -m, -g, or -s must be set")
|
||||
|
||||
if not (options.host):
|
||||
parser.error("Destination host and port required!")
|
||||
|
||||
sock = connect(options.host, options.port)
|
||||
|
||||
if options.cmd_set:
|
||||
if len(args) < 2:
|
||||
parser.error("Set requires var and value arguments")
|
||||
do_set(args[0], ' '.join(args[1:]), options.id, sock)
|
||||
|
||||
if options.cmd_get:
|
||||
if len(args) != 1:
|
||||
parser.error("Get requires the var argument")
|
||||
do_get(args[0], options.id, sock)
|
||||
|
||||
data = sock.recv(1024)
|
||||
while (len(data)>0):
|
||||
(answer, data) = remove_ipa_ctrl_header(data)
|
||||
print "Got message:", answer
|
||||
|
||||
if options.monitor:
|
||||
while (True):
|
||||
data = sock.recv(1024)
|
||||
if len(data) == 0:
|
||||
print "Connection is gone."
|
||||
break
|
||||
|
||||
while (len(data)>0):
|
||||
(answer, data) = remove_ipa_ctrl_header(data)
|
||||
print "Got message:", answer
|
||||
|
||||
sock.close()
|
||||
@@ -1,58 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
demonstrate a unblock bug on the GB Proxy..
|
||||
"""
|
||||
|
||||
bts_ns_reset = "\x02\x00\x81\x01\x01\x82\x1f\xe7\x04\x82\x1f\xe7"
|
||||
ns_reset_ack = "\x03\x01\x82\x1f\xe7\x04\x82\x1f\xe7"
|
||||
|
||||
bts_ns_unblock = "\x06"
|
||||
ns_unblock_ack = "\x07"
|
||||
|
||||
bts_bvc_reset_0 = "\x00\x00\x00\x00\x22\x04\x82\x00\x00\x07\x81\x03\x3b\x81\x02"
|
||||
ns_bvc_reset_0_ack = "\x00\x00\x00\x00\x23\x04\x82\x00\x00"
|
||||
|
||||
bts_bvc_reset_8167 = "\x00\x00\x00\x00\x22\x04\x82\x1f\xe7\x07\x81\x08\x08\x88\x72\xf4\x80\x10\x1c\x00\x9c\x40"
|
||||
|
||||
|
||||
import socket
|
||||
socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
socket.bind(("0.0.0.0", 0))
|
||||
socket.setblocking(1)
|
||||
|
||||
|
||||
import sys
|
||||
port = int(sys.argv[1])
|
||||
print "Sending data to port: %d" % port
|
||||
|
||||
def send_and_receive(packet):
|
||||
socket.sendto(packet, ("127.0.0.1", port))
|
||||
|
||||
try:
|
||||
data, addr = socket.recvfrom(4096)
|
||||
except socket.error, e:
|
||||
print "ERROR", e
|
||||
import sys
|
||||
sys.exit(0)
|
||||
return data
|
||||
|
||||
#send stuff once
|
||||
|
||||
to_send = [
|
||||
(bts_ns_reset, ns_reset_ack, "reset ack"),
|
||||
(bts_ns_unblock, ns_unblock_ack, "unblock ack"),
|
||||
(bts_bvc_reset_0, ns_bvc_reset_0_ack, "BVCI=0 reset ack"),
|
||||
]
|
||||
|
||||
|
||||
for (out, inp, type) in to_send:
|
||||
res = send_and_receive(out)
|
||||
if res != inp:
|
||||
print "Failed to get the %s" % type
|
||||
sys.exit(-1)
|
||||
|
||||
import time
|
||||
time.sleep(3)
|
||||
res = send_and_receive(bts_bvc_reset_8167)
|
||||
print "Sent all messages... check wireshark for the last response"
|
||||
@@ -1,78 +0,0 @@
|
||||
-- Simple LUA script to print the size of BSSGP messages over their type...
|
||||
|
||||
do
|
||||
local ip_bucket = {}
|
||||
|
||||
local pdu_types = {}
|
||||
pdu_types[ 6] = "PAGING"
|
||||
pdu_types[11] = "SUSPEND"
|
||||
pdu_types[12] = "SUSPEND-ACK"
|
||||
pdu_types[32] = "BVC-BLOCK"
|
||||
pdu_types[33] = "BVC-BLOCK-ACK"
|
||||
pdu_types[34] = "BVC-RESET"
|
||||
pdu_types[35] = "BVC-RESET-ACK"
|
||||
pdu_types[36] = "UNBLOCK"
|
||||
pdu_types[37] = "UNBLOCK-ACK"
|
||||
pdu_types[38] = "FLOW-CONTROL-BVC"
|
||||
pdu_types[39] = "FLOW-CONTROL-BVC-ACK"
|
||||
pdu_types[40] = "FLOW-CONTROL-MS"
|
||||
pdu_types[41] = "FLOW-CONTROL-MS-ACK"
|
||||
pdu_types[44] = "LLC-DISCARDED"
|
||||
|
||||
local function init_listener()
|
||||
-- handle the port as NS over IP
|
||||
local udp_port_table = DissectorTable.get("udp.port")
|
||||
local gprs_ns_dis = Dissector.get("gprs_ns")
|
||||
udp_port_table:add(23000,gprs_ns_dis)
|
||||
|
||||
-- bssgp filters
|
||||
local bssgp_pdu_get = Field.new("bssgp.pdu_type")
|
||||
local udp_length_get = Field.new("udp.length")
|
||||
|
||||
local tap = Listener.new("ip", "udp.port == 23000")
|
||||
function tap.packet(pinfo,tvb,ip)
|
||||
local pdu = bssgp_pdu_get()
|
||||
local len = udp_length_get()
|
||||
|
||||
-- only handle bssgp, but we also want the IP frame
|
||||
if not pdu then
|
||||
return
|
||||
end
|
||||
|
||||
pdu = tostring(pdu)
|
||||
if tonumber(pdu) == 0 or tonumber(pdu) == 1 then
|
||||
return
|
||||
end
|
||||
|
||||
local ip_src = tostring(ip.ip_src)
|
||||
local bssgp_histo = ip_bucket[ip_src]
|
||||
if not bssgp_histo then
|
||||
bssgp_histo = {}
|
||||
ip_bucket[ip_src] = bssgp_histo
|
||||
end
|
||||
|
||||
local key = pdu
|
||||
local bucket = bssgp_histo[key]
|
||||
if not bucket then
|
||||
bucket = {}
|
||||
bssgp_histo[key] = bucket
|
||||
end
|
||||
|
||||
table.insert(bucket, tostring(len))
|
||||
print("IP: " .. ip_src .. " PDU: " .. pdu_types[tonumber(pdu)] .. " Length: " .. tostring(len))
|
||||
end
|
||||
|
||||
function tap.draw()
|
||||
-- well... this will not be called...
|
||||
-- for ip,bssgp_histo in pairs(dumpers) do
|
||||
-- print("IP " .. ip)
|
||||
-- end
|
||||
end
|
||||
|
||||
function tap.reset()
|
||||
-- well... this will not be called...
|
||||
end
|
||||
end
|
||||
|
||||
init_listener()
|
||||
end
|
||||
@@ -1,80 +0,0 @@
|
||||
-- I count the buffer space needed for LLC PDUs in the worse case and print it
|
||||
|
||||
do
|
||||
local function init_listener()
|
||||
-- handle the port as NS over IP
|
||||
local udp_port_table = DissectorTable.get("udp.port")
|
||||
local gprs_ns_dis = Dissector.get("gprs_ns")
|
||||
udp_port_table:add(23000,gprs_ns_dis)
|
||||
|
||||
-- bssgp filters
|
||||
local bssgp_pdu_get = Field.new("bssgp.pdu_type")
|
||||
local bssgp_delay_get = Field.new("bssgp.delay_val")
|
||||
local llcgprs_get = Field.new("llcgprs")
|
||||
local pdus = nil
|
||||
|
||||
print("START...")
|
||||
|
||||
local tap = Listener.new("ip", "udp.port == 23000 && bssgp.pdu_type == 0")
|
||||
function tap.packet(pinfo,tvb,ip)
|
||||
local pdu = bssgp_pdu_get()
|
||||
local len = llcgprs_get().len
|
||||
local delay = bssgp_delay_get()
|
||||
|
||||
-- only handle bssgp, but we also want the IP frame
|
||||
if not pdu then
|
||||
return
|
||||
end
|
||||
|
||||
if tonumber(tostring(delay)) == 65535 then
|
||||
pdus = { next = pdus,
|
||||
len = len,
|
||||
expires = -1 }
|
||||
else
|
||||
local off = tonumber(tostring(delay)) / 100.0
|
||||
pdus = { next = pdus,
|
||||
len = len,
|
||||
expires = pinfo.rel_ts + off }
|
||||
end
|
||||
local now_time = tonumber(tostring(pinfo.rel_ts))
|
||||
local now_size = 0
|
||||
local l = pdus
|
||||
local prev = nil
|
||||
local count = 0
|
||||
while l do
|
||||
if now_time < l.expires or l.expires == -1 then
|
||||
now_size = now_size + l.len
|
||||
prev = l
|
||||
l = l.next
|
||||
count = count + 1
|
||||
else
|
||||
-- delete things
|
||||
if prev == nil then
|
||||
pdus = nil
|
||||
l = nil
|
||||
else
|
||||
prev.next = l.next
|
||||
l = l.next
|
||||
end
|
||||
end
|
||||
end
|
||||
-- print("TOTAL: " .. now_time .. " PDU_SIZE: " .. now_size)
|
||||
print(now_time .. " " .. now_size / 1024.0 .. " " .. count)
|
||||
-- print("NOW: " .. tostring(pinfo.rel_ts) .. " Delay: " .. tostring(delay) .. " Length: " .. tostring(len))
|
||||
end
|
||||
|
||||
function tap.draw()
|
||||
-- well... this will not be called...
|
||||
-- for ip,bssgp_histo in pairs(dumpers) do
|
||||
-- print("IP " .. ip)
|
||||
-- end
|
||||
print("END")
|
||||
end
|
||||
|
||||
function tap.reset()
|
||||
-- well... this will not be called...
|
||||
end
|
||||
end
|
||||
|
||||
init_listener()
|
||||
end
|
||||
@@ -1,46 +0,0 @@
|
||||
-- Create a file named by_ip/''ip_addess''.cap with all ip traffic of each ip host. (works for tshark only)
|
||||
-- Dump files are created for both source and destination hosts
|
||||
do
|
||||
local dir = "by_tlli"
|
||||
local dumpers = {}
|
||||
local function init_listener()
|
||||
local udp_port_table = DissectorTable.get("udp.port")
|
||||
local gprs_ns_dis = Dissector.get("gprs_ns")
|
||||
udp_port_table:add(23000,gprs_ns_dis)
|
||||
|
||||
local field_tlli = Field.new("bssgp.tlli")
|
||||
local tap = Listener.new("ip", "udp.port == 23000")
|
||||
|
||||
-- we will be called once for every IP Header.
|
||||
-- If there's more than one IP header in a given packet we'll dump the packet once per every header
|
||||
function tap.packet(pinfo,tvb,ip)
|
||||
local tlli = field_tlli()
|
||||
if not tlli then
|
||||
return
|
||||
end
|
||||
|
||||
local tlli_str = tostring(tlli)
|
||||
tlli_dmp = dumpers[tlli_str]
|
||||
if not tlli_dmp then
|
||||
local tlli_hex = string.format("0x%x", tonumber(tlli_str))
|
||||
print("Creating dump for TLLI " .. tlli_hex)
|
||||
tlli_dmp = Dumper.new_for_current(dir .. "/" .. tlli_hex .. ".pcap")
|
||||
dumpers[tlli_str] = tlli_dmp
|
||||
end
|
||||
tlli_dmp:dump_current()
|
||||
tlli_dmp:flush()
|
||||
end
|
||||
function tap.draw()
|
||||
for tlli,dumper in pairs(dumpers) do
|
||||
dumper:flush()
|
||||
end
|
||||
end
|
||||
function tap.reset()
|
||||
for tlli,dumper in pairs(dumpers) do
|
||||
dumper:close()
|
||||
end
|
||||
dumpers = {}
|
||||
end
|
||||
end
|
||||
init_listener()
|
||||
end
|
||||
@@ -1,59 +0,0 @@
|
||||
-- This script verifies that the N(U) is increasing...
|
||||
--
|
||||
do
|
||||
local nu_state_src = {}
|
||||
|
||||
local function init_listener()
|
||||
-- handle the port as NS over IP
|
||||
local udp_port_table = DissectorTable.get("udp.port")
|
||||
local gprs_ns_dis = Dissector.get("gprs_ns")
|
||||
udp_port_table:add(23000,gprs_ns_dis)
|
||||
|
||||
-- we want to look here...
|
||||
local llc_sapi_get = Field.new("llcgprs.sapib")
|
||||
local llc_nu_get = Field.new("llcgprs.nu")
|
||||
local bssgp_tlli_get = Field.new("bssgp.tlli")
|
||||
|
||||
local tap = Listener.new("ip", "udp.port == 23000")
|
||||
function tap.packet(pinfo,tvb,ip)
|
||||
local llc_sapi = llc_sapi_get()
|
||||
local llc_nu = llc_nu_get()
|
||||
local bssgp_tlli = bssgp_tlli_get()
|
||||
|
||||
if not llc_sapi or not llc_nu or not bssgp_tlli then
|
||||
return
|
||||
end
|
||||
|
||||
local ip_src = tostring(ip.ip_src)
|
||||
local bssgp_tlli = tostring(bssgp_tlli)
|
||||
local llc_nu = tostring(llc_nu)
|
||||
local llc_sapi = tostring(llc_sapi)
|
||||
|
||||
local src_key = ip_src .. "-" .. bssgp_tlli .. "-" .. llc_sapi
|
||||
local last_nu = nu_state_src[src_key]
|
||||
if not last_nu then
|
||||
-- print("Establishing mapping for " .. src_key)
|
||||
nu_state_src[src_key] = llc_nu
|
||||
return
|
||||
end
|
||||
|
||||
local function tohex(number)
|
||||
return string.format("0x%x", tonumber(number))
|
||||
end
|
||||
|
||||
nu_state_src[src_key] = llc_nu
|
||||
if tonumber(last_nu) + 1 ~= tonumber(llc_nu) then
|
||||
print("JUMP in N(U) on TLLI " .. tohex(bssgp_tlli) .. " and SAPI: " .. llc_sapi .. " src: " .. ip_src)
|
||||
print("\t last: " .. last_nu .. " now: " .. llc_nu)
|
||||
end
|
||||
end
|
||||
|
||||
function tap.draw()
|
||||
end
|
||||
|
||||
function tap.reset()
|
||||
end
|
||||
end
|
||||
init_listener()
|
||||
end
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
-- Remove old data from the database
|
||||
DELETE FROM Subscriber
|
||||
WHERE id != 1 AND datetime('now', '-10 days') > updated AND authorized != 1;
|
||||
DELETE FROM Equipment
|
||||
WHERE datetime('now', '-10 days') > updated;
|
||||
DELETE FROM EquipmentWatch
|
||||
WHERE datetime('now', '-10 days') > updated;
|
||||
DELETE FROM SMS
|
||||
WHERE datetime('now', '-10 days') > created;
|
||||
DELETE FROM VLR
|
||||
WHERE datetime('now', '-10 days') > updated;
|
||||
DELETE FROM ApduBlobs
|
||||
WHERE datetime('now', '-10 days') > created;
|
||||
DELETE FROM Counters
|
||||
WHERE datetime('now', '-10 days') > timestamp;
|
||||
DELETE FROM RateCounters
|
||||
WHERE datetime('now', '-10 days') > timestamp;
|
||||
VACUUM;
|
||||
@@ -10,7 +10,7 @@ rsip_resp = """200 321321332\r\n"""
|
||||
audit_packet = """AUEP %d 13@mgw MGCP 1.0\r\n"""
|
||||
crcx_packet = """CRCX %d 14@mgw MGCP 1.0\r\nC: 4a84ad5d25f\r\nL: p:20, a:GSM-EFR, nt:IN\r\nM: recvonly\r\n"""
|
||||
dlcx_packet = """DLCX %d 14@mgw MGCP 1.0\r\nC: 4a84ad5d25f\r\nI: %d\r\n"""
|
||||
mdcx_packet = """MDCX %d 14@mgw MGCP 1.0\r\nC: 4a84ad5d25f\r\nI: %d\r\nL: p:20, a:GSM-EFR, nt:IN\r\nM: recvonly\r\n\r\nv=0\r\no=- 258696477 0 IN IP4 172.16.1.107\r\ns=-\r\nc=IN IP4 172.16.1.107\r\nt=0 0\r\nm=audio 6666 RTP/AVP 127\r\na=rtpmap:127 GSM-EFR/8000/1\r\na=ptime:20\r\na=recvonly\r\nm=image 4402 udptl t38\r\na=T38FaxVersion:0\r\na=T38MaxBitRate:14400\r\n"""
|
||||
mdcx_packet = """MDCX %d 14@mgw MGCP 1.0\r\nC: 4a84ad5d25f\r\nI: %d\r\nL: p:20, a:GSM-EFR, nt:IN\r\nM: recvonly\r\n\r\nv=0\r\no=- 258696477 0 IN IP4 172.16.1.107\r\ns=-\r\nc=IN IP4 172.16.1.107\r\nt=0 0\r\nm=audio 4400 RTP/AVP 127\r\na=rtpmap:127 GSM-EFR/8000/1\r\na=ptime:20\r\na=recvonly\r\nm=image 4402 udptl t38\r\na=T38FaxVersion:0\r\na=T38MaxBitRate:14400\r\n"""
|
||||
|
||||
def hexdump(src, length=8):
|
||||
"""Recipe is from http://code.activestate.com/recipes/142812/"""
|
||||
@@ -25,24 +25,15 @@ def hexdump(src, length=8):
|
||||
|
||||
server_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
server_socket.bind(("127.0.0.1", MGCP_CALLAGENT_PORT))
|
||||
server_socket.setblocking(1)
|
||||
server_socket.setblocking(0)
|
||||
|
||||
last_ci = 1
|
||||
def send_and_receive(packet):
|
||||
global last_ci
|
||||
|
||||
def send_receive(packet):
|
||||
server_socket.sendto(packet, ("127.0.0.1", MGCP_GATEWAY_PORT))
|
||||
try:
|
||||
data, addr = server_socket.recvfrom(4096)
|
||||
|
||||
# attempt to store the CI of the response
|
||||
list = data.split("\n")
|
||||
for item in list:
|
||||
if item.startswith("I: "):
|
||||
last_ci = int(item[3:])
|
||||
|
||||
print hexdump(data), addr
|
||||
except socket.error, e:
|
||||
print e
|
||||
except socket.error:
|
||||
pass
|
||||
|
||||
def generate_tid():
|
||||
@@ -51,10 +42,13 @@ def generate_tid():
|
||||
|
||||
|
||||
|
||||
i = 1
|
||||
while True:
|
||||
send_and_receive(audit_packet % generate_tid())
|
||||
send_and_receive(crcx_packet % generate_tid() )
|
||||
send_and_receive(mdcx_packet % (generate_tid(), last_ci))
|
||||
send_and_receive(dlcx_packet % (generate_tid(), last_ci))
|
||||
send_receive(rsip_resp)
|
||||
send_receive(audit_packet)
|
||||
send_receive(crcx_packet % generate_tid() )
|
||||
send_receive(mdcx_packet % (generate_tid(), i))
|
||||
send_receive(dlcx_packet % (generate_tid(), i))
|
||||
i = i + 1
|
||||
|
||||
time.sleep(3)
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
/* make test_regexp */
|
||||
#include <sys/types.h>
|
||||
#include <regex.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
regex_t reg;
|
||||
regmatch_t matches[2];
|
||||
|
||||
if (argc != 4) {
|
||||
printf("Invoke with: test_regexp REGEXP REPLACE NR\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (regcomp(®, argv[1], REG_EXTENDED) != 0) {
|
||||
fprintf(stderr, "Regexp '%s' is not valid.\n", argv[1]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (regexec(®, argv[3], 2, matches, 0) == 0 && matches[1].rm_eo != -1)
|
||||
printf("New Number: %s%s\n", argv[2], &argv[3][matches[1].rm_so]);
|
||||
else
|
||||
printf("No match.\n");
|
||||
|
||||
regfree(®);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1,420 +0,0 @@
|
||||
#!/usr/bin/env escript
|
||||
%% -*- erlang -*-
|
||||
%%! -smp disable
|
||||
-module(gen_rtp_header).
|
||||
|
||||
% -mode(compile).
|
||||
|
||||
-define(VERSION, "0.1").
|
||||
|
||||
-export([main/1]).
|
||||
|
||||
-record(rtp_packet,
|
||||
{
|
||||
version = 2,
|
||||
padding = 0,
|
||||
marker = 0,
|
||||
payload_type = 0,
|
||||
seqno = 0,
|
||||
timestamp = 0,
|
||||
ssrc = 0,
|
||||
csrcs = [],
|
||||
extension = <<>>,
|
||||
payload = <<>>,
|
||||
realtime
|
||||
}).
|
||||
|
||||
|
||||
main(Args) ->
|
||||
DefaultOpts = [{format, state},
|
||||
{ssrc, 16#11223344},
|
||||
{rate, 8000},
|
||||
{pt, 98}],
|
||||
{PosArgs, Opts} = getopts_checked(Args, DefaultOpts),
|
||||
log(debug, fun (Dev) ->
|
||||
io:format(Dev, "Initial options:~n", []),
|
||||
dump_opts(Dev, Opts),
|
||||
io:format(Dev, "~s: ~p~n", ["Args", PosArgs])
|
||||
end, [], Opts),
|
||||
main(PosArgs, Opts).
|
||||
|
||||
main([First | RemArgs], Opts) ->
|
||||
try
|
||||
F = list_to_integer(First),
|
||||
Format = proplists:get_value(format, Opts, state),
|
||||
PayloadData = proplists:get_value(payload, Opts, undef),
|
||||
InFile = proplists:get_value(file, Opts, undef),
|
||||
|
||||
Payload = case {PayloadData, InFile} of
|
||||
{undef, undef} ->
|
||||
% use default value
|
||||
#rtp_packet{}#rtp_packet.payload;
|
||||
{P, undef} -> P;
|
||||
{_, File} ->
|
||||
log(info, "Loading file '~s'~n", [File], Opts),
|
||||
{ok, InDev} = file:open(File, [read]),
|
||||
DS = [ Pl#rtp_packet.payload || {_T, Pl} <- read_packets(InDev, Opts)],
|
||||
file:close(InDev),
|
||||
log(debug, "File '~s' closed, ~w packets read.~n", [File, length(DS)], Opts),
|
||||
DS
|
||||
end,
|
||||
Dev = standard_io,
|
||||
write_packet_pre(Dev, Format),
|
||||
do_groups(Dev, Payload, F, RemArgs, Opts),
|
||||
write_packet_post(Dev, Format),
|
||||
0
|
||||
catch
|
||||
_:_ ->
|
||||
log(debug, "~p~n", [hd(erlang:get_stacktrace())], Opts),
|
||||
usage(),
|
||||
halt(1)
|
||||
end
|
||||
;
|
||||
|
||||
main(_, _Opts) ->
|
||||
usage(),
|
||||
halt(1).
|
||||
|
||||
%%% group (count + offset) handling %%%
|
||||
|
||||
do_groups(_Dev, _Pl, _F, [], _Opts) ->
|
||||
ok;
|
||||
|
||||
do_groups(Dev, Pl, F, [L], Opts) ->
|
||||
do_groups(Dev, Pl, F, [L, 0], Opts);
|
||||
|
||||
do_groups(Dev, Pl, First, [L, O | Args], Opts) ->
|
||||
Ssrc = proplists:get_value(ssrc, Opts, #rtp_packet.ssrc),
|
||||
PT = proplists:get_value(pt, Opts, #rtp_packet.payload_type),
|
||||
Len = list_to_num(L),
|
||||
Offs = list_to_num(O),
|
||||
log(info, "Starting group: Ssrc=~.16B, PT=~B, First=~B, Len=~B, Offs=~B~n",
|
||||
[Ssrc, PT, First, Len, Offs], Opts),
|
||||
Pkg = #rtp_packet{ssrc = Ssrc, payload_type = PT},
|
||||
Pl2 = write_packets(Dev, Pl, Pkg, First, Len, Offs, Opts),
|
||||
{Args2, Opts2} = getopts_checked(Args, Opts),
|
||||
log(debug, fun (Io) ->
|
||||
io:format(Io, "Changed options:~n", []),
|
||||
dump_opts(Io, Opts2 -- Opts)
|
||||
end, [], Opts),
|
||||
do_groups(Dev, Pl2, First+Len, Args2, Opts2).
|
||||
|
||||
%%% error handling helpers %%%
|
||||
|
||||
getopts_checked(Args, Opts) ->
|
||||
try
|
||||
getopts(Args, Opts)
|
||||
catch
|
||||
C:R ->
|
||||
log(error, "~s~n",
|
||||
[explain_error(C, R, erlang:get_stacktrace(), Opts)], Opts),
|
||||
usage(),
|
||||
halt(1)
|
||||
end.
|
||||
|
||||
explain_error(error, badarg, [{erlang,list_to_integer,[S,B]} | _ ], _Opts) ->
|
||||
io_lib:format("Invalid number '~s' (base ~B)", [S, B]);
|
||||
explain_error(error, badarg, [{erlang,list_to_integer,[S]} | _ ], _Opts) ->
|
||||
io_lib:format("Invalid decimal number '~s'", [S]);
|
||||
explain_error(C, R, [Hd | _ ], _Opts) ->
|
||||
io_lib:format("~p, ~p:~p", [Hd, C, R]);
|
||||
explain_error(_, _, [], _Opts) ->
|
||||
"".
|
||||
|
||||
%%% usage and options %%%
|
||||
|
||||
myname() ->
|
||||
filename:basename(escript:script_name()).
|
||||
|
||||
usage(Text) ->
|
||||
io:format(standard_error, "~s: ~s~n", [myname(), Text]),
|
||||
usage().
|
||||
|
||||
usage() ->
|
||||
io:format(standard_error,
|
||||
"Usage: ~s [Options] Start Count1 Offs1 [[Options] Count2 Offs2 ...]~n",
|
||||
[myname()]).
|
||||
|
||||
show_version() ->
|
||||
io:format(standard_io,
|
||||
"~s ~s~n", [myname(), ?VERSION]).
|
||||
|
||||
show_help() ->
|
||||
io:format(standard_io,
|
||||
"Usage: ~s [Options] Start Count1 Offs1 [[Options] Count2 Offs2 ...]~n~n" ++
|
||||
"Options:~n" ++
|
||||
" -h, --help this text~n" ++
|
||||
" --version show version info~n" ++
|
||||
" -i, --file=FILE reads payload from file (state format by default)~n" ++
|
||||
" -f, --frame-size=N read payload as binary frames of size N instead~n" ++
|
||||
" -p, --payload=HEX set constant payload~n" ++
|
||||
" --verbose=N set verbosity~n" ++
|
||||
" -v increase verbosity~n" ++
|
||||
" --format=state use state format for output (default)~n" ++
|
||||
" -C, --format=c use simple C lines for output~n" ++
|
||||
" --format=carray use a C array for output~n" ++
|
||||
" -s, --ssrc=SSRC set the SSRC~n" ++
|
||||
" -t, --type=N set the payload type~n" ++
|
||||
" -r, --rate=N set the RTP rate [8000]~n" ++
|
||||
" -D, --duration=N set the packet duration in RTP time units [160]~n" ++
|
||||
" -d, --delay=FLOAT add offset to playout timestamp~n" ++
|
||||
"~n" ++
|
||||
"Arguments:~n" ++
|
||||
" Start initial packet (sequence) number~n" ++
|
||||
" Count number of packets~n" ++
|
||||
" Offs timestamp offset (in RTP units)~n" ++
|
||||
"", [myname()]).
|
||||
|
||||
getopts([ "--file=" ++ File | R], Opts) ->
|
||||
getopts(R, [{file, File} | Opts]);
|
||||
getopts([ "-i" ++ T | R], Opts) ->
|
||||
getopts_alias_arg("--file", T, R, Opts);
|
||||
getopts([ "--frame-size=" ++ N | R], Opts) ->
|
||||
Size = list_to_integer(N),
|
||||
getopts(R, [{frame_size, Size}, {in_format, bin} | Opts]);
|
||||
getopts([ "-f" ++ T | R], Opts) ->
|
||||
getopts_alias_arg("--frame-size", T, R, Opts);
|
||||
getopts([ "--duration=" ++ N | R], Opts) ->
|
||||
Duration = list_to_integer(N),
|
||||
getopts(R, [{duration, Duration} | Opts]);
|
||||
getopts([ "-D" ++ T | R], Opts) ->
|
||||
getopts_alias_arg("--duration", T, R, Opts);
|
||||
getopts([ "--rate=" ++ N | R], Opts) ->
|
||||
Rate = list_to_integer(N),
|
||||
getopts(R, [{rate, Rate} | Opts]);
|
||||
getopts([ "-r" ++ T | R], Opts) ->
|
||||
getopts_alias_arg("--rate", T, R, Opts);
|
||||
getopts([ "--version" | _], _Opts) ->
|
||||
show_version(),
|
||||
halt(0);
|
||||
getopts([ "--help" | _], _Opts) ->
|
||||
show_help(),
|
||||
halt(0);
|
||||
getopts([ "-h" ++ T | R], Opts) ->
|
||||
getopts_alias_no_arg("--help", T, R, Opts);
|
||||
getopts([ "--verbose=" ++ V | R], Opts) ->
|
||||
Verbose = list_to_integer(V),
|
||||
getopts(R, [{verbose, Verbose} | Opts]);
|
||||
getopts([ "-v" ++ T | R], Opts) ->
|
||||
Verbose = proplists:get_value(verbose, Opts, 0),
|
||||
getopts_short_no_arg(T, R, [ {verbose, Verbose+1} | Opts]);
|
||||
getopts([ "--format=state" | R], Opts) ->
|
||||
getopts(R, [{format, state} | Opts]);
|
||||
getopts([ "--format=c" | R], Opts) ->
|
||||
getopts(R, [{format, c} | Opts]);
|
||||
getopts([ "-C" ++ T | R], Opts) ->
|
||||
getopts_alias_no_arg("--format=c", T, R, Opts);
|
||||
getopts([ "--format=carray" | R], Opts) ->
|
||||
getopts(R, [{format, carray} | Opts]);
|
||||
getopts([ "--payload=" ++ Hex | R], Opts) ->
|
||||
getopts(R, [{payload, hex_to_bin(Hex)} | Opts]);
|
||||
getopts([ "--ssrc=" ++ Num | R], Opts) ->
|
||||
getopts(R, [{ssrc, list_to_num(Num)} | Opts]);
|
||||
getopts([ "-s" ++ T | R], Opts) ->
|
||||
getopts_alias_arg("--ssrc", T, R, Opts);
|
||||
getopts([ "--type=" ++ Num | R], Opts) ->
|
||||
getopts(R, [{pt, list_to_num(Num)} | Opts]);
|
||||
getopts([ "-t" ++ T | R], Opts) ->
|
||||
getopts_alias_arg("--type", T, R, Opts);
|
||||
getopts([ "--delay=" ++ Num | R], Opts) ->
|
||||
getopts(R, [{delay, list_to_float(Num)} | Opts]);
|
||||
getopts([ "-d" ++ T | R], Opts) ->
|
||||
getopts_alias_arg("--delay", T, R, Opts);
|
||||
|
||||
% parsing helpers
|
||||
getopts([ "--" | R], Opts) ->
|
||||
{R, normalize_opts(Opts)};
|
||||
getopts([ O = "--" ++ _ | _], _Opts) ->
|
||||
usage("Invalid option: " ++ O),
|
||||
halt(1);
|
||||
getopts([ [ $-, C | _] | _], _Opts) when C < $0; C > $9 ->
|
||||
usage("Invalid option: -" ++ [C]),
|
||||
halt(1);
|
||||
|
||||
getopts(R, Opts) ->
|
||||
{R, normalize_opts(Opts)}.
|
||||
|
||||
getopts_short_no_arg([], R, Opts) -> getopts(R, Opts);
|
||||
getopts_short_no_arg(T, R, Opts) -> getopts([ "-" ++ T | R], Opts).
|
||||
|
||||
getopts_alias_no_arg(A, [], R, Opts) -> getopts([A | R], Opts);
|
||||
getopts_alias_no_arg(A, T, R, Opts) -> getopts([A, "-" ++ T | R], Opts).
|
||||
|
||||
getopts_alias_arg(A, [], [T | R], Opts) -> getopts([A ++ "=" ++ T | R], Opts);
|
||||
getopts_alias_arg(A, T, R, Opts) -> getopts([A ++ "=" ++ T | R], Opts).
|
||||
|
||||
normalize_opts(Opts) ->
|
||||
[ proplists:lookup(E, Opts) || E <- proplists:get_keys(Opts) ].
|
||||
|
||||
%%% conversions %%%
|
||||
|
||||
bin_to_hex(Bin) -> [hd(integer_to_list(N,16)) || <<N:4>> <= Bin].
|
||||
hex_to_bin(Hex) -> << <<(list_to_integer([Nib],16)):4>> || Nib <- Hex>>.
|
||||
|
||||
list_to_num("-" ++ Str) -> -list_to_num(Str);
|
||||
list_to_num("0x" ++ Str) -> list_to_integer(Str, 16);
|
||||
list_to_num("0b" ++ Str) -> list_to_integer(Str, 2);
|
||||
list_to_num(Str = [ $0 | _ ]) -> list_to_integer(Str, 8);
|
||||
list_to_num(Str) -> list_to_integer(Str, 10).
|
||||
|
||||
%%% dumping data %%%
|
||||
|
||||
dump_opts(Dev, Opts) ->
|
||||
dump_opts2(Dev, Opts, proplists:get_keys(Opts)).
|
||||
|
||||
dump_opts2(Dev, Opts, [OptName | R]) ->
|
||||
io:format(Dev, " ~-10s: ~p~n",
|
||||
[OptName, proplists:get_value(OptName, Opts)]),
|
||||
dump_opts2(Dev, Opts, R);
|
||||
dump_opts2(_Dev, _Opts, []) -> ok.
|
||||
|
||||
%%% logging %%%
|
||||
|
||||
log(L, Fmt, Args, Opts) when is_list(Opts) ->
|
||||
log(L, Fmt, Args, proplists:get_value(verbose, Opts, 0), Opts).
|
||||
|
||||
log(debug, Fmt, Args, V, Opts) when V > 2 -> log2("DEBUG", Fmt, Args, Opts);
|
||||
log(info, Fmt, Args, V, Opts) when V > 1 -> log2("INFO", Fmt, Args, Opts);
|
||||
log(notice, Fmt, Args, V, Opts) when V > 0 -> log2("NOTICE", Fmt, Args, Opts);
|
||||
log(warn, Fmt, Args, _V, Opts) -> log2("WARNING", Fmt, Args, Opts);
|
||||
log(error, Fmt, Args, _V, Opts) -> log2("ERROR", Fmt, Args, Opts);
|
||||
|
||||
log(Lvl, Fmt, Args, V, Opts) when V >= Lvl -> log2("", Fmt, Args, Opts);
|
||||
|
||||
log(_, _, _, _i, _) -> ok.
|
||||
|
||||
log2(Type, Fmt, Args, _Opts) when is_list(Fmt) ->
|
||||
io:format(standard_error, "~s: " ++ Fmt, [Type | Args]);
|
||||
log2("", Fmt, Args, _Opts) when is_list(Fmt) ->
|
||||
io:format(standard_error, Fmt, Args);
|
||||
log2(_Type, Fun, _Args, _Opts) when is_function(Fun, 1) ->
|
||||
Fun(standard_error).
|
||||
|
||||
%%% RTP packets %%%
|
||||
|
||||
make_rtp_packet(P = #rtp_packet{version = 2}) ->
|
||||
<< (P#rtp_packet.version):2,
|
||||
0:1, % P
|
||||
0:1, % X
|
||||
0:4, % CC
|
||||
(P#rtp_packet.marker):1,
|
||||
(P#rtp_packet.payload_type):7,
|
||||
(P#rtp_packet.seqno):16,
|
||||
(P#rtp_packet.timestamp):32,
|
||||
(P#rtp_packet.ssrc):32,
|
||||
(P#rtp_packet.payload)/bytes
|
||||
>>.
|
||||
|
||||
parse_rtp_packet(
|
||||
<< 2:2, % Version 2
|
||||
0:1, % P (not supported yet)
|
||||
0:1, % X (not supported yet)
|
||||
0:4, % CC (not supported yet)
|
||||
M:1,
|
||||
PT:7,
|
||||
SeqNo: 16,
|
||||
TS:32,
|
||||
Ssrc:32,
|
||||
Payload/bytes >>) ->
|
||||
#rtp_packet{
|
||||
version = 0,
|
||||
marker = M,
|
||||
payload_type = PT,
|
||||
seqno = SeqNo,
|
||||
timestamp = TS,
|
||||
ssrc = Ssrc,
|
||||
payload = Payload}.
|
||||
|
||||
%%% payload generation %%%
|
||||
|
||||
next_payload(F) when is_function(F) ->
|
||||
{F(), F};
|
||||
next_payload({F, D}) when is_function(F) ->
|
||||
{P, D2} = F(D),
|
||||
{P, {F, D2}};
|
||||
next_payload([P | R]) ->
|
||||
{P, R};
|
||||
next_payload([]) ->
|
||||
undef;
|
||||
next_payload(Bin = <<_/bytes>>) ->
|
||||
{Bin, Bin}.
|
||||
|
||||
%%% real writing work %%%
|
||||
|
||||
write_packets(_Dev, DS, _P, _F, 0, _O, _Opts) ->
|
||||
DS;
|
||||
write_packets(Dev, DataSource, P = #rtp_packet{}, F, L, O, Opts) ->
|
||||
Format = proplists:get_value(format, Opts, state),
|
||||
Ptime = proplists:get_value(duration, Opts, 160),
|
||||
Delay = proplists:get_value(delay, Opts, 0),
|
||||
Rate = proplists:get_value(rate, Opts, 8000),
|
||||
case next_payload(DataSource) of
|
||||
{Payload, DataSource2} ->
|
||||
write_packet(Dev, Ptime * F / Rate + Delay,
|
||||
P#rtp_packet{seqno = F, timestamp = F*Ptime+O,
|
||||
payload = Payload},
|
||||
Format),
|
||||
write_packets(Dev, DataSource2, P, F+1, L-1, O, Opts);
|
||||
Other -> Other
|
||||
end.
|
||||
|
||||
write_packet(Dev, Time, P = #rtp_packet{}, Format) ->
|
||||
Bin = make_rtp_packet(P),
|
||||
|
||||
write_packet_line(Dev, Time, P, Bin, Format).
|
||||
|
||||
write_packet_pre(Dev, carray) ->
|
||||
io:format(Dev,
|
||||
"struct {float t; int len; char *data;} packets[] = {~n", []);
|
||||
|
||||
write_packet_pre(_Dev, _) -> ok.
|
||||
|
||||
write_packet_post(Dev, carray) ->
|
||||
io:format(Dev, "};~n", []);
|
||||
|
||||
write_packet_post(_Dev, _) -> ok.
|
||||
|
||||
write_packet_line(Dev, Time, _P, Bin, state) ->
|
||||
io:format(Dev, "~f ~s~n", [Time, bin_to_hex(Bin)]);
|
||||
|
||||
write_packet_line(Dev, Time, #rtp_packet{seqno = N, timestamp = TS}, Bin, c) ->
|
||||
ByteList = [ [ $0, $x | integer_to_list(Byte, 16) ] || <<Byte:8>> <= Bin ],
|
||||
ByteStr = string:join(ByteList, ", "),
|
||||
io:format(Dev, "/* time=~f, SeqNo=~B, TS=~B */ {~s}~n", [Time, N, TS, ByteStr]);
|
||||
|
||||
write_packet_line(Dev, Time, #rtp_packet{seqno = N, timestamp = TS}, Bin, carray) ->
|
||||
io:format(Dev, " /* RTP: SeqNo=~B, TS=~B */~n", [N, TS]),
|
||||
io:format(Dev, " {~f, ~B, \"", [Time, size(Bin)]),
|
||||
[ io:format(Dev, "\\x~2.16.0B", [Byte]) || <<Byte:8>> <= Bin ],
|
||||
io:format(Dev, "\"},~n", []).
|
||||
|
||||
%%% real reading work %%%
|
||||
|
||||
read_packets(Dev, Opts) ->
|
||||
Format = proplists:get_value(in_format, Opts, state),
|
||||
|
||||
read_packets(Dev, Opts, Format).
|
||||
|
||||
read_packets(Dev, Opts, Format) ->
|
||||
case read_packet(Dev, Opts, Format) of
|
||||
eof -> [];
|
||||
Tuple -> [Tuple | read_packets(Dev, Opts, Format)]
|
||||
end.
|
||||
|
||||
read_packet(Dev, Opts, bin) ->
|
||||
Size = proplists:get_value(frame_size, Opts),
|
||||
case file:read(Dev, Size) of
|
||||
{ok, Data} -> {0, #rtp_packet{payload = iolist_to_binary(Data)}};
|
||||
eof -> eof
|
||||
end;
|
||||
read_packet(Dev, _Opts, Format) ->
|
||||
case read_packet_line(Dev, Format) of
|
||||
{Time, Bin} -> {Time, parse_rtp_packet(Bin)};
|
||||
eof -> eof
|
||||
end.
|
||||
|
||||
read_packet_line(Dev, state) ->
|
||||
case io:fread(Dev, "", "~f ~s") of
|
||||
{ok, [Time, Hex]} -> {Time, hex_to_bin(Hex)};
|
||||
eof -> eof
|
||||
end.
|
||||
@@ -1,21 +0,0 @@
|
||||
"
|
||||
Simple UDP replay from the state files
|
||||
"
|
||||
|
||||
PackageLoader fileInPackage: #Sockets.
|
||||
FileStream fileIn: 'rtp_replay_shared.st'.
|
||||
|
||||
|
||||
Eval [
|
||||
| replay file host dport |
|
||||
|
||||
file := Smalltalk arguments at: 1 ifAbsent: [ 'rtpstream.state' ].
|
||||
host := Smalltalk arguments at: 2 ifAbsent: [ '127.0.0.1' ].
|
||||
dport := (Smalltalk arguments at: 3 ifAbsent: [ '4000' ]) asInteger.
|
||||
sport := (Smalltalk arguments at: 4 ifAbsent: [ '0' ]) asInteger.
|
||||
|
||||
replay := RTPReplay on: file fromPort: sport.
|
||||
|
||||
Transcript nextPutAll: 'Going to stream now'; nl.
|
||||
replay streamAudio: host port: dport.
|
||||
]
|
||||
@@ -1,118 +0,0 @@
|
||||
"
|
||||
Simple UDP replay from the state files
|
||||
"
|
||||
|
||||
PackageLoader fileInPackage: #Sockets.
|
||||
|
||||
Object subclass: SDPUtils [
|
||||
"Look into using PetitParser."
|
||||
SDPUtils class >> findPort: aSDP [
|
||||
aSDP linesDo: [:line |
|
||||
(line startsWith: 'm=audio ') ifTrue: [
|
||||
| stream |
|
||||
stream := line readStream
|
||||
skip: 'm=audio ' size;
|
||||
yourself.
|
||||
^ Number readFrom: stream.
|
||||
]
|
||||
].
|
||||
|
||||
^ self error: 'Not found'.
|
||||
]
|
||||
|
||||
SDPUtils class >> findHost: aSDP [
|
||||
aSDP linesDo: [:line |
|
||||
(line startsWith: 'c=IN IP4 ') ifTrue: [
|
||||
| stream |
|
||||
^ stream := line readStream
|
||||
skip: 'c=IN IP4 ' size;
|
||||
upToEnd.
|
||||
]
|
||||
].
|
||||
|
||||
^ self error: 'Not found'.
|
||||
]
|
||||
]
|
||||
|
||||
Object subclass: RTPReplay [
|
||||
| filename socket |
|
||||
RTPReplay class >> on: aFile [
|
||||
^ self new
|
||||
initialize;
|
||||
file: aFile; yourself
|
||||
]
|
||||
|
||||
RTPReplay class >> on: aFile fromPort: aPort [
|
||||
^ self new
|
||||
initialize: aPort;
|
||||
file: aFile; yourself
|
||||
]
|
||||
|
||||
initialize [
|
||||
self initialize: 0.
|
||||
]
|
||||
|
||||
initialize: aPort [
|
||||
socket := Sockets.DatagramSocket local: '0.0.0.0' port: aPort.
|
||||
]
|
||||
|
||||
file: aFile [
|
||||
filename := aFile
|
||||
]
|
||||
|
||||
localPort [
|
||||
^ socket port
|
||||
]
|
||||
|
||||
streamAudio: aHost port: aPort [
|
||||
| file last_time last_image udp_send dest |
|
||||
|
||||
last_time := nil.
|
||||
last_image := nil.
|
||||
file := FileStream open: filename mode: #read.
|
||||
|
||||
"Send the payload"
|
||||
dest := Sockets.SocketAddress byName: aHost.
|
||||
udp_send := [:payload | | datagram |
|
||||
datagram := Sockets.Datagram data: payload contents address: dest port: aPort.
|
||||
socket nextPut: datagram
|
||||
].
|
||||
|
||||
[file atEnd] whileFalse: [
|
||||
| lineStream time data now_image |
|
||||
lineStream := file nextLine readStream.
|
||||
|
||||
"Read the time, skip the blank, parse the data"
|
||||
time := Number readFrom: lineStream.
|
||||
lineStream skip: 1.
|
||||
|
||||
data := WriteStream on: (ByteArray new: 30).
|
||||
[lineStream atEnd] whileFalse: [
|
||||
| hex |
|
||||
hex := lineStream next: 2.
|
||||
data nextPut: (Number readFrom: hex readStream radix: 16).
|
||||
].
|
||||
|
||||
last_time isNil
|
||||
ifTrue: [
|
||||
"First time, send it right now"
|
||||
last_time := time.
|
||||
last_image := Time millisecondClockValue.
|
||||
udp_send value: data.
|
||||
]
|
||||
ifFalse: [
|
||||
| wait_image new_image_time |
|
||||
|
||||
"How long to wait?"
|
||||
wait_image := last_image + ((time - last_time) * 1000).
|
||||
[ wait_image > Time millisecondClockValue ]
|
||||
whileTrue: [Processor yield].
|
||||
|
||||
udp_send value: data.
|
||||
last_time := time.
|
||||
last_image := wait_image.
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
"""
|
||||
Create a SIP connection and then stream...
|
||||
"""
|
||||
|
||||
PackageLoader
|
||||
fileInPackage: #OsmoSIP.
|
||||
|
||||
"Load for the replay code"
|
||||
FileStream fileIn: 'rtp_replay_shared.st'.
|
||||
|
||||
|
||||
Osmo.SIPCall subclass: StreamCall [
|
||||
| sem stream |
|
||||
|
||||
createCall: aSDP [
|
||||
| sdp |
|
||||
stream := RTPReplay on: 'rtp_ssrc6976010.240.240.1_to_10.240.240.50.state'.
|
||||
sdp := aSDP % {stream localPort}.
|
||||
^ super createCall: sdp.
|
||||
]
|
||||
|
||||
sem: aSemaphore [
|
||||
sem := aSemaphore
|
||||
]
|
||||
|
||||
sessionNew [
|
||||
| host port |
|
||||
Transcript nextPutAll: 'The call has started'; nl.
|
||||
Transcript nextPutAll: sdp_result; nl.
|
||||
|
||||
host := SDPUtils findHost: sdp_result.
|
||||
port := SDPUtils findPort: sdp_result.
|
||||
|
||||
[
|
||||
stream streamAudio: host port: port.
|
||||
Transcript nextPutAll: 'Streaming has finished.'; nl.
|
||||
] fork.
|
||||
]
|
||||
|
||||
sessionFailed [
|
||||
sem signal
|
||||
]
|
||||
|
||||
sessionEnd [
|
||||
sem signal
|
||||
]
|
||||
]
|
||||
|
||||
Eval [
|
||||
| transport agent call sem sdp_fr sdp_amr |
|
||||
|
||||
|
||||
sdp_fr := (WriteStream on: String new)
|
||||
nextPutAll: 'v=0'; cr; nl;
|
||||
nextPutAll: 'o=twinkle 1739517580 1043400482 IN IP4 127.0.0.1'; cr; nl;
|
||||
nextPutAll: 's=-'; cr; nl;
|
||||
nextPutAll: 'c=IN IP4 127.0.0.1'; cr; nl;
|
||||
nextPutAll: 't=0 0'; cr; nl;
|
||||
nextPutAll: 'm=audio %1 RTP/AVP 0 101'; cr; nl;
|
||||
nextPutAll: 'a=rtpmap:0 PCMU/8000'; cr; nl;
|
||||
nextPutAll: 'a=rtpmap:101 telephone-event/8000'; cr; nl;
|
||||
nextPutAll: 'a=fmtp:101 0-15'; cr; nl;
|
||||
nextPutAll: 'a=ptime:20'; cr; nl;
|
||||
contents.
|
||||
|
||||
sem := Semaphore new.
|
||||
transport := Osmo.SIPUdpTransport
|
||||
startOn: '0.0.0.0' port: 5066.
|
||||
agent := Osmo.SIPUserAgent createOn: transport.
|
||||
transport start.
|
||||
|
||||
call := (StreamCall
|
||||
fromUser: 'sip:1000@sip.zecke.osmocom.org'
|
||||
host: '127.0.0.1'
|
||||
port: 5060
|
||||
to: 'sip:123456@127.0.0.1'
|
||||
on: agent)
|
||||
sem: sem; yourself.
|
||||
|
||||
call createCall: sdp_fr.
|
||||
|
||||
|
||||
"Wait for the stream to have ended"
|
||||
sem wait.
|
||||
|
||||
(Delay forSeconds: 4) wait.
|
||||
]
|
||||
@@ -1,28 +0,0 @@
|
||||
print("Ni hao")
|
||||
|
||||
|
||||
do
|
||||
local tap = Listener.new("ip", "rtp")
|
||||
local rtp_ssrc = Field.new("rtp.ssrc")
|
||||
local frame_time = Field.new("frame.time_relative")
|
||||
local rtp = Field.new("rtp")
|
||||
|
||||
function tap.packet(pinfo, tvb, ip)
|
||||
local ip_src, ip_dst = tostring(ip.ip_src), tostring(ip.ip_dst)
|
||||
local rtp_data = rtp()
|
||||
local filename = "rtp_ssrc" .. rtp_ssrc() "_src_" .. ip_src .. "_to_" .. ip_dst .. ".state"
|
||||
local f = io.open(filename, "a")
|
||||
|
||||
f:write(tostring(frame_time()) .. " ")
|
||||
f:write(tostring(rtp_data.value))
|
||||
f:write("\n")
|
||||
f:close()
|
||||
end
|
||||
|
||||
function tap.draw()
|
||||
print("DRAW")
|
||||
end
|
||||
function tap.reset()
|
||||
print("RESET")
|
||||
end
|
||||
end
|
||||
30
openbsc/contrib/send_handshake.py
Executable file
30
openbsc/contrib/send_handshake.py
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
|
||||
# packages
|
||||
ACK ="\x00\x01\xfe\x06"
|
||||
RESET_ACK = "\x00\x13\xfd\x09\x00\x03\x07\x0b\x04\x43\x01\x00\xfe\x04\x43\x5c\x00\xfe\x03\x00\x01\x31"
|
||||
PAGE = "\x00\x20\xfd\x09\x00\x03\x07\x0b\x04\x43\x01\x00\xfe\x04\x43\x5c\x00\xfe\x10\x00\x0e\x52\x08\x08\x29\x42\x08\x05\x03\x12\x23\x42\x1a\x01\x06"
|
||||
|
||||
|
||||
# simple handshake...
|
||||
sys.stdout.write(ACK)
|
||||
sys.stdout.flush()
|
||||
sys.stdin.read(4)
|
||||
|
||||
# wait for some data and send reset ack
|
||||
sys.stdin.read(21)
|
||||
sys.stdout.write(RESET_ACK)
|
||||
sys.stdout.flush()
|
||||
|
||||
sys.stdout.write(RESET_ACK)
|
||||
sys.stdout.flush()
|
||||
|
||||
# page a subscriber
|
||||
sys.stdout.write(PAGE)
|
||||
sys.stdout.flush()
|
||||
|
||||
while True:
|
||||
sys.stdin.read(1)
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
"I create output for some simple SQL statements for the HLR db"
|
||||
|
||||
|
||||
Eval [
|
||||
|
||||
"Create tables if they don't exist"
|
||||
Transcript show: 'CREATE TABLE SMS (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
created TIMESTAMP NOT NULL,
|
||||
sent TIMESTAMP,
|
||||
sender_id INTEGER NOT NULL,
|
||||
receiver_id INTEGER NOT NULL,
|
||||
deliver_attempts INTEGER NOT NULL DEFAULT 0,
|
||||
valid_until TIMESTAMP,
|
||||
reply_path_req INTEGER NOT NULL,
|
||||
status_rep_req INTEGER NOT NULL,
|
||||
protocol_id INTEGER NOT NULL,
|
||||
data_coding_scheme INTEGER NOT NULL,
|
||||
ud_hdr_ind INTEGER NOT NULL,
|
||||
dest_addr TEXT,
|
||||
user_data BLOB,
|
||||
header BLOB,
|
||||
text TEXT);'; nl;
|
||||
show: 'CREATE TABLE Subscriber (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
created TIMESTAMP NOT NULL,
|
||||
updated TIMESTAMP NOT NULL,
|
||||
imsi NUMERIC UNIQUE NOT NULL,
|
||||
name TEXT,
|
||||
extension TEXT UNIQUE,
|
||||
authorized INTEGER NOT NULL DEFAULT 0,
|
||||
tmsi TEXT UNIQUE,
|
||||
lac INTEGER NOT NULL DEFAULT 0);'; nl.
|
||||
|
||||
"Create some dummy subscribers"
|
||||
num_sub := 1000.
|
||||
num_sms := 30.
|
||||
lac := 1.
|
||||
|
||||
Transcript show: 'BEGIN;'; nl.
|
||||
|
||||
1 to: num_sub do: [:each |
|
||||
Transcript show: 'INSERT INTO Subscriber
|
||||
(imsi, created, updated, authorized, lac, extension)
|
||||
VALUES
|
||||
(%1, datetime(''now''), datetime(''now''), 1, %2, %3);' %
|
||||
{(274090000000000 + each). lac. each}; nl.
|
||||
].
|
||||
|
||||
1 to: num_sms do: [:sms |
|
||||
1 to: num_sub do: [:sub |
|
||||
Transcript show: 'INSERT INTO SMS
|
||||
(created, sender_id, receiver_id, valid_until,
|
||||
reply_path_req, status_rep_req, protocol_id,
|
||||
data_coding_scheme, ud_hdr_ind, dest_addr,
|
||||
text) VALUES
|
||||
(datetime(''now''), 1, %1, ''2222-2-2'',
|
||||
0, 0, 0,
|
||||
0, 0, ''123456'',
|
||||
''abc'');' % {sub}; nl.
|
||||
]
|
||||
].
|
||||
|
||||
Transcript show: 'COMMIT;'; nl.
|
||||
|
||||
]
|
||||
@@ -1,10 +0,0 @@
|
||||
"Query for one SMS"
|
||||
|
||||
Eval [
|
||||
1 to: 100 do: [:each |
|
||||
Transcript show: 'SELECT SMS.* FROM SMS
|
||||
JOIN Subscriber ON SMS.receiver_id = Subscriber.id
|
||||
WHERE SMS.id >= 1 AND SMS.sent IS NULL AND Subscriber.lac > 0
|
||||
ORDER BY SMS.id LIMIT 1;'; nl.
|
||||
].
|
||||
]
|
||||
@@ -1,5 +0,0 @@
|
||||
probe process("/usr/lib/libsqlite3.so.0.8.6").function("sqlite3_get_table")
|
||||
{
|
||||
a = user_string($zSql);
|
||||
printf("sqlite3_get_table called '%s'\n", a);
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
[Unit]
|
||||
Description=OpenBSC MGCP
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
ExecStart=/usr/bin/osmo-bsc_mgcp -s -c /etc/osmocom/osmo-bsc-mgcp.cfg
|
||||
RestartSec=2
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -1,12 +0,0 @@
|
||||
[Unit]
|
||||
Description=OpenBSC BSC
|
||||
Wants=osmo-bsc-mgcp.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
ExecStart=/usr/bin/osmo-bsc -c /etc/osmocom/osmo-bsc.cfg -s
|
||||
RestartSec=2
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -1,11 +0,0 @@
|
||||
[Unit]
|
||||
Description=OpenBSC Network In the Box (NITB)
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
ExecStart=/usr/bin/osmo-nitb -s -C -c /etc/osmocom/osmo-nitb.cfg -l /var/lib/osmocom/hlr.sqlite3
|
||||
RestartSec=2
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -1,11 +0,0 @@
|
||||
[Unit]
|
||||
Description=OpenBSC SGSN
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Restart=always
|
||||
ExecStart=/usr/bin/osmo-sgsn -c /etc/osmocom/osmo-sgsn.cfg
|
||||
RestartSec=2
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -1,16 +0,0 @@
|
||||
|
||||
OBJS = testconv_main.o
|
||||
|
||||
CC = gcc
|
||||
CFLAGS = -O0 -ggdb -Wall
|
||||
LDFLAGS =
|
||||
CPPFLAGS = -I../.. -I../../include $(shell pkg-config --cflags libosmocore) $(shell pkg-config --cflags libbcg729)
|
||||
LIBS = ../../src/libmgcp/libmgcp.a ../../src/libcommon/libcommon.a $(shell pkg-config --libs libosmocore) $(shell pkg-config --libs libbcg729) -lgsm -lrt
|
||||
|
||||
testconv: $(OBJS)
|
||||
$(CC) -o $@ $^ $(LDFLAGS) $(LIBS)
|
||||
|
||||
testconv_main.o: testconv_main.c
|
||||
|
||||
$(OBJS):
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
|
||||
@@ -1,133 +0,0 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <err.h>
|
||||
|
||||
#include <osmocom/core/talloc.h>
|
||||
#include <osmocom/core/application.h>
|
||||
|
||||
#include <openbsc/debug.h>
|
||||
#include <openbsc/gsm_data.h>
|
||||
#include <openbsc/mgcp.h>
|
||||
#include <openbsc/mgcp_internal.h>
|
||||
|
||||
#include "bscconfig.h"
|
||||
#ifndef BUILD_MGCP_TRANSCODING
|
||||
#error "Requires MGCP transcoding enabled (see --enable-mgcp-transcoding)"
|
||||
#endif
|
||||
|
||||
#include "openbsc/mgcp_transcode.h"
|
||||
|
||||
static int audio_name_to_type(const char *name)
|
||||
{
|
||||
if (!strcasecmp(name, "gsm"))
|
||||
return 3;
|
||||
#ifdef HAVE_BCG729
|
||||
else if (!strcasecmp(name, "g729"))
|
||||
return 18;
|
||||
#endif
|
||||
else if (!strcasecmp(name, "pcma"))
|
||||
return 8;
|
||||
else if (!strcasecmp(name, "l16"))
|
||||
return 11;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int mgcp_get_trans_frame_size(void *state_, int nsamples, int dst);
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
char buf[4096] = {0x80, 0};
|
||||
int cc, rc;
|
||||
struct mgcp_rtp_end *dst_end;
|
||||
struct mgcp_rtp_end *src_end;
|
||||
struct mgcp_trunk_config tcfg = {{0}};
|
||||
struct mgcp_endpoint endp = {0};
|
||||
struct mgcp_process_rtp_state *state;
|
||||
int in_size;
|
||||
int in_samples = 160;
|
||||
int out_samples = 0;
|
||||
uint32_t ts = 0;
|
||||
uint16_t seq = 0;
|
||||
|
||||
osmo_init_logging(&log_info);
|
||||
|
||||
tcfg.endpoints = &endp;
|
||||
tcfg.number_endpoints = 1;
|
||||
endp.tcfg = &tcfg;
|
||||
mgcp_initialize_endp(&endp);
|
||||
|
||||
dst_end = &endp.bts_end;
|
||||
src_end = &endp.net_end;
|
||||
|
||||
if (argc <= 2)
|
||||
errx(1, "Usage: {gsm|g729|pcma|l16} {gsm|g729|pcma|l16} [SPP]");
|
||||
|
||||
if ((src_end->codec.payload_type = audio_name_to_type(argv[1])) == -1)
|
||||
errx(1, "invalid input format '%s'", argv[1]);
|
||||
if ((dst_end->codec.payload_type = audio_name_to_type(argv[2])) == -1)
|
||||
errx(1, "invalid output format '%s'", argv[2]);
|
||||
if (argc > 3)
|
||||
out_samples = atoi(argv[3]);
|
||||
|
||||
if (out_samples) {
|
||||
dst_end->codec.frame_duration_den = dst_end->codec.rate;
|
||||
dst_end->codec.frame_duration_num = out_samples;
|
||||
dst_end->frames_per_packet = 1;
|
||||
}
|
||||
|
||||
rc = mgcp_transcoding_setup(&endp, dst_end, src_end);
|
||||
if (rc < 0)
|
||||
errx(1, "setup failed: %s", strerror(-rc));
|
||||
|
||||
state = dst_end->rtp_process_data;
|
||||
OSMO_ASSERT(state != NULL);
|
||||
|
||||
in_size = mgcp_transcoding_get_frame_size(state, in_samples, 0);
|
||||
OSMO_ASSERT(sizeof(buf) >= in_size + 12);
|
||||
|
||||
buf[1] = src_end->codec.payload_type;
|
||||
*(uint16_t*)(buf+2) = htons(1);
|
||||
*(uint32_t*)(buf+4) = htonl(0);
|
||||
*(uint32_t*)(buf+8) = htonl(0xaabbccdd);
|
||||
|
||||
while ((cc = read(0, buf + 12, in_size))) {
|
||||
int cont;
|
||||
int len;
|
||||
|
||||
if (cc != in_size)
|
||||
err(1, "read");
|
||||
|
||||
*(uint16_t*)(buf+2) = htonl(seq);
|
||||
*(uint32_t*)(buf+4) = htonl(ts);
|
||||
|
||||
seq += 1;
|
||||
ts += in_samples;
|
||||
|
||||
cc += 12; /* include RTP header */
|
||||
|
||||
len = cc;
|
||||
|
||||
do {
|
||||
cont = mgcp_transcoding_process_rtp(&endp, dst_end,
|
||||
buf, &len, sizeof(buf));
|
||||
if (cont == -EAGAIN) {
|
||||
fprintf(stderr, "Got EAGAIN\n");
|
||||
break;
|
||||
}
|
||||
|
||||
if (cont < 0)
|
||||
errx(1, "processing failed: %s", strerror(-cont));
|
||||
|
||||
len -= 12; /* ignore RTP header */
|
||||
|
||||
if (write(1, buf + 12, len) != len)
|
||||
err(1, "write");
|
||||
|
||||
len = cont;
|
||||
} while (len > 0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
SUBDIRS = examples
|
||||
@@ -31,65 +31,44 @@ GSM 04.08 3.4.13: RR connection release procedure
|
||||
|
||||
== Implementation in OpenBSC ==
|
||||
|
||||
There are two possible reasons a gsm_subscriber_connection
|
||||
will be released. One is a network failure, the other is
|
||||
the completion of an operation/transaction.
|
||||
|
||||
=== Failure ===
|
||||
The BSC API will call the gsm_04_08.c:gsm0408_clear_request callback
|
||||
and the MSC part will release all transactions, operations and such
|
||||
and the channels will be released as error case.
|
||||
|
||||
=== Success ===
|
||||
Every time an 'operation' or 'transaction' is finished msc_release_connection
|
||||
will be called and it will determine if the gsm_subscriber_connection can
|
||||
be released.
|
||||
|
||||
In case it can be released bsc_api.c:gsm0808_clear will be called
|
||||
which will release all lchan's associated with the connection. For the
|
||||
primary channel a SACH Deactivate will be send with the release
|
||||
reason NORMAL RELEASE.
|
||||
|
||||
|
||||
bsc_api.c:gsm0808_clear
|
||||
* Release a channel used for handover
|
||||
* Release the primary lchan with normal release, SACH deactivate
|
||||
|
||||
chan_alloc.c:lchan_release(chan, sacch_deactivate, reason)
|
||||
* Start the release procedure. It is working in steps with callbacks
|
||||
coming from the abis_rsl.c code.
|
||||
* Release all SAPI's > 0 as local end (The BTS should send a
|
||||
REL_CONF a message)
|
||||
* Send SACH Deactivate on SAPI=0 if required.
|
||||
* Start T3109 (stop it when the main signalling link is disconnected)
|
||||
or when the channel released. On timeout start the error handling.
|
||||
* abis_rsl.c schedules the RSL_MT_RF_CHAN_REL once all SAPI's are
|
||||
released and after T3111 has timed out or there is an error.
|
||||
|
||||
chan_alloc.c:lchan_auto_release()
|
||||
* checks if use count still > 0 (abort)
|
||||
* calls gsm48_send_rr_release()
|
||||
* which calls rsl_deact_sacch()
|
||||
* calls rsl_release_request()
|
||||
* which sends RLL Link Release request
|
||||
|
||||
RX of RELease INDication:
|
||||
* Calls internal rsl_handle_release which might release the RF.
|
||||
* call rsl_rf_chan_release() (send RF_CHAN_REL)
|
||||
|
||||
RX of RELease CONFirmation:
|
||||
* Calls internal rsl_handle_release which might release the RF.
|
||||
RX of RELease CONFimem:
|
||||
* call rsl_rf_chan_release() (send RF_CHAN_REL)
|
||||
|
||||
* RX of RF_CHAN_REL_ACK
|
||||
* call lchan_free()
|
||||
* subscr_put()
|
||||
* delete release_timer
|
||||
|
||||
|
||||
=== Integration with SMS ===
|
||||
|
||||
* RX of CP_ERROR or unimplemented MT
|
||||
* trigger trans_free() which will msc_release_connection()
|
||||
* trigger trans_free() which will lchan_auto_release()
|
||||
|
||||
* CP TC1* expired while waiting for CP-ACK
|
||||
* trigger trans_free() which will msc_release_connection()
|
||||
* trigger trans_free() which will lchan_auto_release()
|
||||
|
||||
* RX of RP_ERROR
|
||||
* trigger trans_free() which will msc_release_connection()
|
||||
* trigger trans_free() which will lchan_auto_release()
|
||||
|
||||
* TX of CP-ACK in MT DELIVER
|
||||
* trigger trans_free() which will msc_release_connection()
|
||||
* trigger trans_free() which will lchan_auto_release()
|
||||
|
||||
* RX of CP-ACK in MO SUBMIT
|
||||
* trigger trans_free() which will msc_release_connection()
|
||||
* trigger trans_free() which will lchan_auto_release()
|
||||
|
||||
* RX of RP-ACK in MT DELIVER (and no more messages)
|
||||
* trigger rsl_release_request() for SAPI3
|
||||
|
||||
* RX of RP-SMMA in MT DELIVER (and no more messages)
|
||||
* trigger rsl_release_request() for SAPI3
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
The protocol for the control interface is wrapped inside the ip.access header
|
||||
with the IPAC_PROTO_OSMO protocol ID (0xee). Inside the ip.access header is
|
||||
a struct ipaccess_head_ext with protocol ID 0x00 which indicates the control
|
||||
interface.
|
||||
|
||||
After that the actual protocol is text based:
|
||||
|
||||
* Getting the value of a variable
|
||||
-> GET <id> <var>
|
||||
<- GET_REPLY <id> <var> <val>
|
||||
or ERROR <id> <reason>
|
||||
|
||||
* Setting the value of a variable
|
||||
-> SET <id> <var> <val>
|
||||
<- SET_REPLY <id> <var> <val>
|
||||
or ERROR <id> <reason>
|
||||
|
||||
* A value changes which triggers a trap
|
||||
<- TRAP <var> <val>
|
||||
|
||||
<id> needs to be unique within a connection. '0' is not allowed
|
||||
@@ -52,10 +52,10 @@ int abis_link_event(int event, void *data);
|
||||
signal some event (such as layer 1 connect/disconnect) from the
|
||||
input core to the stack.
|
||||
|
||||
int subch_demux_in(mx, const uint8_t *data, int len);
|
||||
int subch_demux_in(mx, const u_int8_t *data, int len);
|
||||
receive 'len' bytes from a given E1 timeslot (TRAU frames)
|
||||
|
||||
int subchan_mux_out(mx, uint8_t *data, int len);
|
||||
int subchan_mux_out(mx, u_int8_t *data, int len);
|
||||
obtain 'len' bytes of output data to be sent on E1 timeslot
|
||||
|
||||
Intrface by Input Core for Input Plugins
|
||||
@@ -112,8 +112,8 @@ struct e1inp_sign_link {
|
||||
struct llist_head tx_list;
|
||||
|
||||
/* SAPI and TEI on the E1 TS */
|
||||
uint8_t sapi;
|
||||
uint8_t tei;
|
||||
u_int8_t sapi;
|
||||
u_int8_t tei;
|
||||
}
|
||||
|
||||
enum e1inp_ts_type {
|
||||
@@ -140,7 +140,7 @@ struct e1inp_ts {
|
||||
union {
|
||||
struct {
|
||||
/* mISDN driver has one fd for each ts */
|
||||
struct osmo_fd;
|
||||
struct bsc_fd;
|
||||
} misdn;
|
||||
} driver;
|
||||
};
|
||||
@@ -160,7 +160,7 @@ int e1inp_update_ts(struct e1inp_ts *ts);
|
||||
|
||||
/* Receive a packet from the E1 driver */
|
||||
int e1inp_rx_ts(struct e1inp_ts *ts, struct msgb *msg,
|
||||
uint8_t tei, uint8_t sapi);
|
||||
u_int8_t tei, u_int8_t sapi);
|
||||
|
||||
/* Send a packet, callback function in the driver */
|
||||
int e1driver_tx_ts(struct e1inp_ts *ts, struct msgb *msg)
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
|
||||
CFG_FILES = find $(srcdir) -name '*.cfg*' | sed -e 's,^$(srcdir),,'
|
||||
|
||||
dist-hook:
|
||||
for f in $$($(CFG_FILES)); do \
|
||||
j="$(distdir)/$$f" && \
|
||||
mkdir -p "$$(dirname $$j)" && \
|
||||
$(INSTALL_DATA) $(srcdir)/$$f $$j; \
|
||||
done
|
||||
|
||||
install-data-hook:
|
||||
for f in $$($(CFG_FILES)); do \
|
||||
j="$(DESTDIR)$(docdir)/examples/$$f" && \
|
||||
mkdir -p "$$(dirname $$j)" && \
|
||||
$(INSTALL_DATA) $(srcdir)/$$f $$j; \
|
||||
done
|
||||
|
||||
uninstall-hook:
|
||||
@$(PRE_UNINSTALL)
|
||||
for f in $$($(CFG_FILES)); do \
|
||||
j="$(DESTDIR)$(docdir)/examples/$$f" && \
|
||||
$(RM) $$j; \
|
||||
done
|
||||
@@ -1,105 +0,0 @@
|
||||
!
|
||||
! OsmoBSC (0.9.14+gitr1+3d331c0062bb0c9694dbd4d1eab7adc58138c3ae) configuration saved from vty
|
||||
!!
|
||||
password foo
|
||||
!
|
||||
!
|
||||
line vty
|
||||
no login
|
||||
!
|
||||
e1_input
|
||||
e1_line 0 driver ipa
|
||||
network
|
||||
network country code 1
|
||||
mobile network code 1
|
||||
short name OsmoBSC
|
||||
long name OsmoBSC
|
||||
auth policy closed
|
||||
location updating reject cause 13
|
||||
encryption a5 0
|
||||
neci 1
|
||||
paging any use tch 0
|
||||
rrlp mode none
|
||||
mm info 1
|
||||
handover 0
|
||||
handover window rxlev averaging 10
|
||||
handover window rxqual averaging 1
|
||||
handover window rxlev neighbor averaging 10
|
||||
handover power budget interval 6
|
||||
handover power budget hysteresis 3
|
||||
handover maximum distance 9999
|
||||
timer t3101 10
|
||||
timer t3103 0
|
||||
timer t3105 0
|
||||
timer t3107 0
|
||||
timer t3109 0
|
||||
timer t3111 0
|
||||
timer t3113 60
|
||||
timer t3115 0
|
||||
timer t3117 0
|
||||
timer t3119 0
|
||||
timer t3122 0
|
||||
timer t3141 0
|
||||
dtx-used 0
|
||||
subscriber-keep-in-ram 0
|
||||
bts 0
|
||||
type nanobts
|
||||
band DCS1800
|
||||
cell_identity 0
|
||||
location_area_code 1
|
||||
training_sequence_code 7
|
||||
base_station_id_code 63
|
||||
ms max power 15
|
||||
cell reselection hysteresis 4
|
||||
rxlev access min 0
|
||||
channel allocator ascending
|
||||
rach tx integer 9
|
||||
rach max transmission 7
|
||||
ip.access unit_id 0 0
|
||||
oml ip.access stream_id 255 line 0
|
||||
neighbor-list mode manual-si5
|
||||
neighbor-list add arfcn 100
|
||||
neighbor-list add arfcn 200
|
||||
si5 neighbor-list add arfcn 10
|
||||
si5 neighbor-list add arfcn 20
|
||||
gprs mode none
|
||||
trx 0
|
||||
rf_locked 0
|
||||
arfcn 871
|
||||
nominal power 23
|
||||
max_power_red 20
|
||||
rsl e1 tei 0
|
||||
timeslot 0
|
||||
phys_chan_config CCCH+SDCCH4
|
||||
hopping enabled 0
|
||||
timeslot 1
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 2
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 3
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 4
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 5
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 6
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
timeslot 7
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
msc
|
||||
ip.access rtp-base 4000
|
||||
timeout-ping 20
|
||||
timeout-pong 5
|
||||
dest 192.168.100.11 6666 0
|
||||
access-list-name msc-list
|
||||
no access-list-name
|
||||
bsc
|
||||
no access-list-name
|
||||
access-list-name bsc-list
|
||||
@@ -1 +0,0 @@
|
||||
678012512671923:6:6:
|
||||
@@ -1,72 +0,0 @@
|
||||
!
|
||||
! OsmoBSCNAT (0.12.0.266-2daa9) configuration saved from vty
|
||||
!!
|
||||
!
|
||||
log stderr
|
||||
logging filter all 1
|
||||
logging color 1
|
||||
logging timestamp 0
|
||||
logging level all everything
|
||||
logging level rll notice
|
||||
logging level cc notice
|
||||
logging level mm notice
|
||||
logging level rr notice
|
||||
logging level rsl notice
|
||||
logging level nm info
|
||||
logging level mncc notice
|
||||
logging level pag notice
|
||||
logging level meas notice
|
||||
logging level sccp notice
|
||||
logging level msc notice
|
||||
logging level mgcp notice
|
||||
logging level ho notice
|
||||
logging level db notice
|
||||
logging level ref notice
|
||||
logging level gprs everything
|
||||
logging level ns info
|
||||
logging level bssgp everything
|
||||
logging level llc everything
|
||||
logging level sndcp everything
|
||||
logging level nat notice
|
||||
logging level ctrl notice
|
||||
logging level smpp everything
|
||||
logging level lglobal notice
|
||||
logging level llapd notice
|
||||
logging level linp notice
|
||||
logging level lmux notice
|
||||
logging level lmi notice
|
||||
logging level lmib notice
|
||||
logging level lsms notice
|
||||
!
|
||||
line vty
|
||||
no login
|
||||
!
|
||||
mgcp
|
||||
bind ip 0.0.0.0
|
||||
bind port 2427
|
||||
rtp bts-base 4000
|
||||
rtp net-base 16000
|
||||
rtp ip-dscp 0
|
||||
no rtcp-omit
|
||||
sdp audio-payload number 126
|
||||
sdp audio-payload name AMR/8000
|
||||
loop 0
|
||||
number endpoints 1
|
||||
call-agent ip 127.0.0.1
|
||||
rtp transcoder-base 0
|
||||
transcoder-remote-base 4000
|
||||
nat
|
||||
msc ip 127.0.0.1
|
||||
msc port 5000
|
||||
timeout auth 2
|
||||
timeout ping 20
|
||||
timeout pong 5
|
||||
ip-dscp 0
|
||||
access-list bla imsi-allow ^11$
|
||||
|
||||
bsc 0
|
||||
token bla
|
||||
location_area_code 1234
|
||||
description bsc
|
||||
max-endpoints 32
|
||||
paging forbidden 0
|
||||
@@ -1,44 +0,0 @@
|
||||
!
|
||||
! OsmoGbProxy (UNKNOWN) configuration saved from vty
|
||||
!!
|
||||
!
|
||||
log stderr
|
||||
logging filter all 1
|
||||
logging color 1
|
||||
logging timestamp 0
|
||||
logging level all everything
|
||||
logging level gprs debug
|
||||
logging level ns info
|
||||
logging level bssgp debug
|
||||
logging level lglobal notice
|
||||
logging level llapd notice
|
||||
logging level linp notice
|
||||
logging level lmux notice
|
||||
logging level lmi notice
|
||||
logging level lmib notice
|
||||
logging level lsms notice
|
||||
!
|
||||
line vty
|
||||
no login
|
||||
!
|
||||
ns
|
||||
nse 666 nsvci 666
|
||||
nse 666 remote-role sgsn
|
||||
! nse 666 encapsulation framerelay-gre
|
||||
! nse 666 remote-ip 172.16.1.70
|
||||
! nse 666 fr-dlci 666
|
||||
timer tns-block 3
|
||||
timer tns-block-retries 3
|
||||
timer tns-reset 3
|
||||
timer tns-reset-retries 3
|
||||
timer tns-test 30
|
||||
timer tns-alive 3
|
||||
timer tns-alive-retries 10
|
||||
encapsulation udp local-port 23000
|
||||
! encapsulation framerelay-gre enabled 1
|
||||
gbproxy
|
||||
sgsn nsei 666
|
||||
core-mobile-country-code 666
|
||||
core-mobile-network-code 6
|
||||
core-access-point-name none match-imsi ^666066|^66607
|
||||
tlli-list max-length 200
|
||||
@@ -1,25 +0,0 @@
|
||||
!
|
||||
! Osmocom Gb Proxy (0.9.0.404-6463) configuration saved from vty
|
||||
!!
|
||||
!
|
||||
line vty
|
||||
no login
|
||||
!
|
||||
gbproxy
|
||||
sgsn nsei 101
|
||||
ns
|
||||
nse 101 nsvci 101
|
||||
nse 101 remote-role sgsn
|
||||
nse 101 encapsulation udp
|
||||
nse 101 remote-ip 192.168.100.239
|
||||
nse 101 remote-port 7777
|
||||
timer tns-block 3
|
||||
timer tns-block-retries 3
|
||||
timer tns-reset 3
|
||||
timer tns-reset-retries 3
|
||||
timer tns-test 30
|
||||
timer tns-alive 3
|
||||
timer tns-alive-retries 10
|
||||
encapsulation framerelay-gre enabled 0
|
||||
encapsulation framerelay-gre local-ip 0.0.0.0
|
||||
encapsulation udp local-port 23000
|
||||
@@ -1,23 +0,0 @@
|
||||
!
|
||||
! Osmocom gtphub configuration
|
||||
!
|
||||
|
||||
line vty
|
||||
no login
|
||||
|
||||
gtphub
|
||||
! Local addresses to listen on and send from, each on standard ports
|
||||
! 2123 and 2152. Setting these addresses is mandatory.
|
||||
bind-to-sgsns 127.0.0.1
|
||||
bind-to-ggsns 127.0.0.2
|
||||
|
||||
! Local nonstandard ports or separate IPs:
|
||||
!bind-to-sgsns ctrl 127.0.0.1 2342 user 127.0.0.1 4223
|
||||
|
||||
! Proxy: unconditionally direct all traffic to...
|
||||
!ggsn-proxy 127.0.0.3
|
||||
!sgsn-proxy 127.0.0.4
|
||||
|
||||
! Proxy with nonstandard ports or separate IPs:
|
||||
!ggsn-proxy ctrl 127.0.0.3 2123 user 127.0.0.5 2152
|
||||
|
||||
@@ -1,164 +0,0 @@
|
||||
!
|
||||
! OpenBSC (0.9.0.845-57c4) configuration saved from vty
|
||||
!!
|
||||
password foo
|
||||
!
|
||||
line vty
|
||||
no login
|
||||
!
|
||||
e1_input
|
||||
e1_line 0 driver misdn
|
||||
network
|
||||
network country code 1
|
||||
mobile network code 1
|
||||
short name OpenBSC
|
||||
long name OpenBSC
|
||||
auth policy closed
|
||||
location updating reject cause 13
|
||||
encryption a5 0
|
||||
neci 1
|
||||
rrlp mode none
|
||||
mm info 0
|
||||
handover 0
|
||||
handover window rxlev averaging 10
|
||||
handover window rxqual averaging 1
|
||||
handover window rxlev neighbor averaging 10
|
||||
handover power budget interval 6
|
||||
handover power budget hysteresis 3
|
||||
handover maximum distance 9999
|
||||
timer t3101 10
|
||||
timer t3103 0
|
||||
timer t3105 0
|
||||
timer t3107 0
|
||||
timer t3109 4
|
||||
timer t3111 0
|
||||
timer t3113 60
|
||||
timer t3115 0
|
||||
timer t3117 0
|
||||
timer t3119 0
|
||||
timer t3141 0
|
||||
bts 0
|
||||
type bs11
|
||||
band GSM900
|
||||
cell_identity 0
|
||||
location_area_code 1
|
||||
training_sequence_code 7
|
||||
base_station_id_code 63
|
||||
ms max power 15
|
||||
cell reselection hysteresis 4
|
||||
rxlev access min 0
|
||||
channel allocator descending
|
||||
rach tx integer 9
|
||||
rach max transmission 7
|
||||
oml e1 line 0 timeslot 1 sub-slot full
|
||||
oml e1 tei 25
|
||||
gprs mode none
|
||||
trx 0
|
||||
rf_locked 0
|
||||
arfcn 121
|
||||
nominal power 24
|
||||
max_power_red 12
|
||||
rsl e1 line 0 timeslot 1 sub-slot full
|
||||
rsl e1 tei 1
|
||||
timeslot 0
|
||||
phys_chan_config CCCH
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 1 sub-slot full
|
||||
timeslot 1
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 2 sub-slot 1
|
||||
timeslot 2
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 2 sub-slot 2
|
||||
timeslot 3
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 2 sub-slot 3
|
||||
timeslot 4
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 3 sub-slot 0
|
||||
timeslot 5
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 3 sub-slot 1
|
||||
timeslot 6
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 3 sub-slot 2
|
||||
timeslot 7
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 3 sub-slot 3
|
||||
trx 1
|
||||
rf_locked 0
|
||||
arfcn 119
|
||||
nominal power 24
|
||||
max_power_red 12
|
||||
rsl e1 line 0 timeslot 1 sub-slot full
|
||||
rsl e1 tei 2
|
||||
timeslot 0
|
||||
phys_chan_config SDCCH8
|
||||
hopping enabled 1
|
||||
hopping sequence-number 0
|
||||
hopping maio 0
|
||||
hopping arfcn add 117
|
||||
hopping arfcn add 119
|
||||
timeslot 1
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 1
|
||||
hopping sequence-number 0
|
||||
hopping maio 0
|
||||
hopping arfcn add 117
|
||||
hopping arfcn add 119
|
||||
e1 line 0 timeslot 4 sub-slot 1
|
||||
timeslot 2
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 1
|
||||
hopping sequence-number 0
|
||||
hopping maio 0
|
||||
hopping arfcn add 117
|
||||
hopping arfcn add 119
|
||||
e1 line 0 timeslot 4 sub-slot 2
|
||||
timeslot 3
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 1
|
||||
hopping sequence-number 0
|
||||
hopping maio 0
|
||||
hopping arfcn add 117
|
||||
hopping arfcn add 119
|
||||
e1 line 0 timeslot 4 sub-slot 3
|
||||
timeslot 4
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 1
|
||||
hopping sequence-number 0
|
||||
hopping maio 0
|
||||
hopping arfcn add 117
|
||||
hopping arfcn add 119
|
||||
e1 line 0 timeslot 5 sub-slot 0
|
||||
timeslot 5
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 1
|
||||
hopping sequence-number 0
|
||||
hopping maio 0
|
||||
hopping arfcn add 117
|
||||
hopping arfcn add 119
|
||||
e1 line 0 timeslot 5 sub-slot 1
|
||||
timeslot 6
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 1
|
||||
hopping sequence-number 0
|
||||
hopping maio 0
|
||||
hopping arfcn add 117
|
||||
hopping arfcn add 119
|
||||
e1 line 0 timeslot 5 sub-slot 2
|
||||
timeslot 7
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 1
|
||||
hopping sequence-number 0
|
||||
hopping maio 0
|
||||
hopping arfcn add 117
|
||||
hopping arfcn add 119
|
||||
e1 line 0 timeslot 5 sub-slot 3
|
||||
@@ -1,99 +0,0 @@
|
||||
!
|
||||
! OpenBSC configuration saved from vty
|
||||
! !
|
||||
password foo
|
||||
!
|
||||
line vty
|
||||
no login
|
||||
!
|
||||
e1_input
|
||||
e1_line 0 driver ipa
|
||||
network
|
||||
network country code 1
|
||||
mobile network code 1
|
||||
short name OpenBSC
|
||||
long name OpenBSC
|
||||
auth policy closed
|
||||
location updating reject cause 13
|
||||
encryption a5 0
|
||||
neci 1
|
||||
rrlp mode none
|
||||
mm info 0
|
||||
handover 0
|
||||
handover window rxlev averaging 10
|
||||
handover window rxqual averaging 1
|
||||
handover window rxlev neighbor averaging 10
|
||||
handover power budget interval 6
|
||||
handover power budget hysteresis 3
|
||||
handover maximum distance 9999
|
||||
timer t3101 10
|
||||
timer t3103 0
|
||||
timer t3105 0
|
||||
timer t3107 0
|
||||
timer t3109 4
|
||||
timer t3111 0
|
||||
timer t3113 60
|
||||
timer t3115 0
|
||||
timer t3117 0
|
||||
timer t3119 0
|
||||
timer t3141 0
|
||||
bts 0
|
||||
type nanobts
|
||||
band DCS1800
|
||||
cell_identity 0
|
||||
location_area_code 1
|
||||
training_sequence_code 7
|
||||
base_station_id_code 63
|
||||
ms max power 15
|
||||
cell reselection hysteresis 4
|
||||
rxlev access min 0
|
||||
channel allocator ascending
|
||||
rach tx integer 9
|
||||
rach max transmission 7
|
||||
ip.access unit_id 1800 0
|
||||
oml ip.access stream_id 255 line 0
|
||||
gprs mode none
|
||||
trx 0
|
||||
rf_locked 0
|
||||
arfcn 871
|
||||
nominal power 23
|
||||
max_power_red 0
|
||||
rsl e1 tei 0
|
||||
timeslot 0
|
||||
phys_chan_config CCCH+SDCCH4
|
||||
timeslot 1
|
||||
phys_chan_config SDCCH8
|
||||
timeslot 2
|
||||
phys_chan_config TCH/F
|
||||
timeslot 3
|
||||
phys_chan_config TCH/F
|
||||
timeslot 4
|
||||
phys_chan_config TCH/F
|
||||
timeslot 5
|
||||
phys_chan_config TCH/F
|
||||
timeslot 6
|
||||
phys_chan_config TCH/F
|
||||
timeslot 7
|
||||
phys_chan_config TCH/F
|
||||
trx 1
|
||||
rf_locked 0
|
||||
arfcn 873
|
||||
nominal power 23
|
||||
max_power_red 0
|
||||
rsl e1 tei 0
|
||||
timeslot 0
|
||||
phys_chan_config SDCCH8
|
||||
timeslot 1
|
||||
phys_chan_config TCH/F
|
||||
timeslot 2
|
||||
phys_chan_config TCH/F
|
||||
timeslot 3
|
||||
phys_chan_config TCH/F
|
||||
timeslot 4
|
||||
phys_chan_config TCH/F
|
||||
timeslot 5
|
||||
phys_chan_config TCH/F
|
||||
timeslot 6
|
||||
phys_chan_config TCH/F
|
||||
timeslot 7
|
||||
phys_chan_config TCH/F
|
||||
@@ -1,77 +0,0 @@
|
||||
!
|
||||
! OpenBSC configuration saved from vty
|
||||
! !
|
||||
password foo
|
||||
!
|
||||
line vty
|
||||
no login
|
||||
!
|
||||
e1_input
|
||||
e1_line 0 driver ipa
|
||||
network
|
||||
network country code 1
|
||||
mobile network code 1
|
||||
short name OpenBSC
|
||||
long name OpenBSC
|
||||
auth policy closed
|
||||
location updating reject cause 13
|
||||
encryption a5 0
|
||||
neci 1
|
||||
rrlp mode none
|
||||
mm info 1
|
||||
handover 0
|
||||
handover window rxlev averaging 10
|
||||
handover window rxqual averaging 1
|
||||
handover window rxlev neighbor averaging 10
|
||||
handover power budget interval 6
|
||||
handover power budget hysteresis 3
|
||||
handover maximum distance 9999
|
||||
timer t3101 10
|
||||
timer t3103 0
|
||||
timer t3105 0
|
||||
timer t3107 0
|
||||
timer t3109 4
|
||||
timer t3111 0
|
||||
timer t3113 60
|
||||
timer t3115 0
|
||||
timer t3117 0
|
||||
timer t3119 0
|
||||
timer t3141 0
|
||||
bts 0
|
||||
type nanobts
|
||||
band DCS1800
|
||||
cell_identity 0
|
||||
location_area_code 1
|
||||
training_sequence_code 7
|
||||
base_station_id_code 63
|
||||
ms max power 15
|
||||
cell reselection hysteresis 4
|
||||
rxlev access min 0
|
||||
channel allocator ascending
|
||||
rach tx integer 9
|
||||
rach max transmission 7
|
||||
ip.access unit_id 1801 0
|
||||
oml ip.access stream_id 255 line 0
|
||||
gprs mode none
|
||||
trx 0
|
||||
rf_locked 0
|
||||
arfcn 514
|
||||
nominal power 23
|
||||
max_power_red 20
|
||||
rsl e1 tei 0
|
||||
timeslot 0
|
||||
phys_chan_config CCCH+SDCCH4
|
||||
timeslot 1
|
||||
phys_chan_config SDCCH8
|
||||
timeslot 2
|
||||
phys_chan_config TCH/F
|
||||
timeslot 3
|
||||
phys_chan_config TCH/F
|
||||
timeslot 4
|
||||
phys_chan_config TCH/F
|
||||
timeslot 5
|
||||
phys_chan_config TCH/F
|
||||
timeslot 6
|
||||
phys_chan_config TCH/F
|
||||
timeslot 7
|
||||
phys_chan_config TCH/F
|
||||
@@ -1,117 +0,0 @@
|
||||
!
|
||||
! OpenBSC configuration saved from vty
|
||||
! !
|
||||
password foo
|
||||
!
|
||||
line vty
|
||||
no login
|
||||
!
|
||||
e1_input
|
||||
e1_line 0 driver misdn
|
||||
network
|
||||
network country code 1
|
||||
mobile network code 1
|
||||
short name OpenBSC
|
||||
long name OpenBSC
|
||||
timer t3101 10
|
||||
timer t3113 60
|
||||
bts 0
|
||||
type nokia_site
|
||||
band GSM1800
|
||||
cell_identity 1
|
||||
location_area_code 1
|
||||
base_station_id_code 63
|
||||
training_sequence_code 7
|
||||
|
||||
oml e1 line 0 timeslot 1 sub-slot full
|
||||
oml e1 tei 1
|
||||
|
||||
trx 0
|
||||
arfcn 866
|
||||
max_power_red 24
|
||||
rsl e1 line 0 timeslot 2 sub-slot full
|
||||
rsl e1 tei 1
|
||||
timeslot 0
|
||||
phys_chan_config CCCH+SDCCH4
|
||||
e1 line 0 timeslot 6 sub-slot full
|
||||
timeslot 1
|
||||
phys_chan_config SDCCH8
|
||||
e1 line 0 timeslot 6 sub-slot 1
|
||||
timeslot 2
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 6 sub-slot 2
|
||||
timeslot 3
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 6 sub-slot 3
|
||||
timeslot 4
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 7 sub-slot 0
|
||||
timeslot 5
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 7 sub-slot 1
|
||||
timeslot 6
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 7 sub-slot 2
|
||||
timeslot 7
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 7 sub-slot 3
|
||||
|
||||
trx 1
|
||||
arfcn 870
|
||||
max_power_red 24
|
||||
rsl e1 line 0 timeslot 3 sub-slot full
|
||||
rsl e1 tei 2
|
||||
timeslot 0
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 8 sub-slot 0
|
||||
timeslot 1
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 8 sub-slot 1
|
||||
timeslot 2
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 8 sub-slot 2
|
||||
timeslot 3
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 8 sub-slot 3
|
||||
timeslot 4
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 9 sub-slot 0
|
||||
timeslot 5
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 9 sub-slot 1
|
||||
timeslot 6
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 9 sub-slot 2
|
||||
timeslot 7
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 9 sub-slot 3
|
||||
|
||||
trx 2
|
||||
arfcn 874
|
||||
max_power_red 24
|
||||
rsl e1 line 0 timeslot 4 sub-slot full
|
||||
rsl e1 tei 3
|
||||
timeslot 0
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 10 sub-slot 0
|
||||
timeslot 1
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 10 sub-slot 1
|
||||
timeslot 2
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 10 sub-slot 2
|
||||
timeslot 3
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 10 sub-slot 3
|
||||
timeslot 4
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 11 sub-slot 0
|
||||
timeslot 5
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 11 sub-slot 1
|
||||
timeslot 6
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 11 sub-slot 2
|
||||
timeslot 7
|
||||
phys_chan_config TCH/F
|
||||
e1 line 0 timeslot 11 sub-slot 3
|
||||
@@ -1,221 +0,0 @@
|
||||
!
|
||||
! OpenBSC (0.9.11.308-62d46) configuration saved from vty
|
||||
!!
|
||||
password foo
|
||||
!
|
||||
line vty
|
||||
no login
|
||||
!
|
||||
network
|
||||
network country code 262
|
||||
mobile network code 42
|
||||
short name OpenBSC
|
||||
long name OpenBSC
|
||||
auth policy closed
|
||||
location updating reject cause 13
|
||||
encryption a5 0
|
||||
neci 0
|
||||
paging any use tch 0
|
||||
rrlp mode none
|
||||
mm info 0
|
||||
handover 0
|
||||
handover window rxlev averaging 10
|
||||
handover window rxqual averaging 1
|
||||
handover window rxlev neighbor averaging 10
|
||||
handover power budget interval 6
|
||||
handover power budget hysteresis 3
|
||||
handover maximum distance 9999
|
||||
timer t3101 10
|
||||
timer t3103 0
|
||||
timer t3105 0
|
||||
timer t3107 0
|
||||
timer t3109 4
|
||||
timer t3111 0
|
||||
timer t3113 60
|
||||
timer t3115 0
|
||||
timer t3117 0
|
||||
timer t3119 0
|
||||
timer t3122 0
|
||||
timer t3141 0
|
||||
dtx-used 0
|
||||
subscriber-keep-in-ram 0
|
||||
bts 0
|
||||
type rbs2000
|
||||
band GSM900
|
||||
cell_identity 0
|
||||
location_area_code 1
|
||||
training_sequence_code 7
|
||||
base_station_id_code 63
|
||||
ms max power 15
|
||||
cell reselection hysteresis 4
|
||||
rxlev access min 0
|
||||
channel allocator descending
|
||||
rach tx integer 9
|
||||
rach max transmission 7
|
||||
oml e1 line 0 timeslot 1 sub-slot full
|
||||
oml e1 tei 62
|
||||
neighbor-list mode automatic
|
||||
gprs mode none
|
||||
is-connection-list add 4 512 12
|
||||
is-connection-list add 16 524 12
|
||||
is-connection-list add 28 536 12
|
||||
is-connection-list add 40 548 12
|
||||
trx 0
|
||||
rf_locked 0
|
||||
arfcn 55
|
||||
nominal power 24
|
||||
max_power_red 12
|
||||
rsl e1 line 0 timeslot 1 sub-slot full
|
||||
rsl e1 tei 0
|
||||
timeslot 0
|
||||
phys_chan_config CCCH+SDCCH4
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 1 sub-slot full
|
||||
timeslot 1
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 2 sub-slot 1
|
||||
timeslot 2
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 2 sub-slot 2
|
||||
timeslot 3
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 2 sub-slot 3
|
||||
timeslot 4
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 3 sub-slot 0
|
||||
timeslot 5
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 3 sub-slot 1
|
||||
timeslot 6
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 3 sub-slot 2
|
||||
timeslot 7
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 3 sub-slot 3
|
||||
trx 1
|
||||
rf_locked 0
|
||||
arfcn 57
|
||||
nominal power 24
|
||||
max_power_red 12
|
||||
rsl e1 line 0 timeslot 4 sub-slot full
|
||||
rsl e1 tei 1
|
||||
timeslot 0
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 5 sub-slot 0
|
||||
timeslot 1
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 5 sub-slot 1
|
||||
timeslot 2
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 5 sub-slot 2
|
||||
timeslot 3
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 5 sub-slot 3
|
||||
timeslot 4
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 6 sub-slot 0
|
||||
timeslot 5
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 6 sub-slot 1
|
||||
timeslot 6
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 6 sub-slot 2
|
||||
timeslot 7
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 6 sub-slot 3
|
||||
trx 2
|
||||
rf_locked 0
|
||||
arfcn 59
|
||||
nominal power 24
|
||||
max_power_red 12
|
||||
rsl e1 line 0 timeslot 7 sub-slot full
|
||||
rsl e1 tei 2
|
||||
timeslot 0
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 8 sub-slot 0
|
||||
timeslot 1
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 8 sub-slot 1
|
||||
timeslot 2
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 8 sub-slot 2
|
||||
timeslot 3
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 8 sub-slot 3
|
||||
timeslot 4
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 9 sub-slot 0
|
||||
timeslot 5
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 9 sub-slot 1
|
||||
timeslot 6
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 9 sub-slot 2
|
||||
timeslot 7
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 9 sub-slot 3
|
||||
trx 3
|
||||
rf_locked 0
|
||||
arfcn 61
|
||||
nominal power 24
|
||||
max_power_red 12
|
||||
rsl e1 line 0 timeslot 10 sub-slot full
|
||||
rsl e1 tei 3
|
||||
timeslot 0
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 11 sub-slot 0
|
||||
timeslot 1
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 11 sub-slot 1
|
||||
timeslot 2
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 11 sub-slot 2
|
||||
timeslot 3
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 11 sub-slot 3
|
||||
timeslot 4
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 12 sub-slot 0
|
||||
timeslot 5
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 12 sub-slot 1
|
||||
timeslot 6
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 12 sub-slot 2
|
||||
timeslot 7
|
||||
phys_chan_config TCH/F
|
||||
hopping enabled 0
|
||||
e1 line 0 timeslot 12 sub-slot 3
|
||||
|
||||
e1_input
|
||||
e1_line 0 driver dahdi
|
||||
@@ -1,26 +0,0 @@
|
||||
!
|
||||
! Osmocom SGSN configuration
|
||||
!
|
||||
!
|
||||
line vty
|
||||
no login
|
||||
!
|
||||
sgsn
|
||||
gtp local-ip 127.0.0.1
|
||||
ggsn 0 remote-ip 127.0.0.1
|
||||
ggsn 0 gtp-version 1
|
||||
!
|
||||
ns
|
||||
timer tns-block 3
|
||||
timer tns-block-retries 3
|
||||
timer tns-reset 3
|
||||
timer tns-reset-retries 3
|
||||
timer tns-test 30
|
||||
timer tns-alive 3
|
||||
timer tns-alive-retries 10
|
||||
encapsulation udp local-ip 127.0.0.1
|
||||
encapsulation udp local-port 23000
|
||||
encapsulation framerelay-gre enabled 0
|
||||
!
|
||||
bssgp
|
||||
!
|
||||
@@ -12,7 +12,7 @@ specific parameters from channel assignment:
|
||||
|
||||
hopping sequence generation (6.2.3):
|
||||
|
||||
uint8_t rntable[114] = {
|
||||
u_int8_t rntable[114] = {
|
||||
48, 98, 63, 1, 36, 95, 78, 102, 94, 73,
|
||||
0, 64, 25, 81, 76, 59, 124, 23, 104, 100,
|
||||
101, 47, 118, 85, 18, 56, 96, 86, 54, 2,
|
||||
@@ -29,15 +29,15 @@ uint8_t rntable[114] = {
|
||||
/* mai=0 represents lowest ARFCN in the MA */
|
||||
|
||||
|
||||
uint8_t hopping_mai(uint8_t hsn, uint32_t fn, uint8_t maio,
|
||||
uint8_t t1, uint8_t t2, uint8_t t3_)
|
||||
u_int8_t hopping_mai(u_int8_t hsn, u_int32_t fn, u_int8_t maio,
|
||||
u_int8_t t1, u_int8_t t2, u_int8_t t3_)
|
||||
{
|
||||
uint8_t mai;
|
||||
u_int8_t mai;
|
||||
|
||||
if (hsn == 0) /* cyclic hopping */
|
||||
mai = (fn + maio) % n;
|
||||
else {
|
||||
uint32_t m, m_, t_, s;
|
||||
u_int32_t m, m_, t_, s;
|
||||
|
||||
m = t2 + rntable[(hsn xor (t1 % 64)) + t3];
|
||||
m_ = m % (2^NBIN);
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
|
||||
IPA SCCP message flow in the BSC
|
||||
|
||||
February, 2013 Holger Hans Peter Freyther
|
||||
|
||||
CONTENTS
|
||||
|
||||
1. SCCP inside the IPA header
|
||||
2. Supported SCCP message types
|
||||
3. Receiving SCCP messages
|
||||
4. Sending SCCP messages
|
||||
|
||||
|
||||
1. SCCP inside the IPA header
|
||||
|
||||
Many Soft-MSCs implement something that is called SCCP/lite. This means
|
||||
that SCCP messages are transported inside a small multiplexing protocol
|
||||
over TCP/IP. This is an alternative to a full SIGTRAN implementation.
|
||||
|
||||
The multiplexing protocol is the same as used with the sysmoBTS and the
|
||||
ip.access nanoBTS. It is a three byte header with two bytes for the length
|
||||
in network byte order and one byte for the type. The type to be used for
|
||||
SCCP is 0xFD.
|
||||
|
||||
struct ipa_header {
|
||||
uint16_t length_in_network_order;
|
||||
uint8_t type;
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
|
||||
2. Supported SCCP message types
|
||||
|
||||
To implement GSM 08.08 only a subset of SCCP messages need to be implemented.
|
||||
For transporting paging and reset messages SCCP UDT messages are used. For
|
||||
the connections with a Mobile Station (MS) a SCCP connection is opened. This
|
||||
means that the SCCP CR, SCCP CC, SCCP CREF, SCCP RLC, SCCP RLSD, SCCP DT1
|
||||
and SCCP IT messages are supported.
|
||||
|
||||
|
||||
3. Receiving SCCP UDT messages
|
||||
|
||||
This is an illustration of the flow of messages. The IPA multiplexing protocol
|
||||
is used for various protocols. This means there is a central place where the
|
||||
multiplexing stream terminates. The stream is terminated in the osmo_bsc_msc.c
|
||||
file and the ipaccess_a_fd_cb method. For SCCP messages the SCCP dispatching
|
||||
sccp_system_incoming method is called. This function is implemented in the
|
||||
libosmo-sccp library.
|
||||
|
||||
To receive UDT messages osmo_bsc_sccp.c:osmo_bsc_sccp_init is using the
|
||||
sccp_set_read function to register a callback for UDT messages. The callback
|
||||
is msc_sccp_read and it is calling bsc_handle_udt that is implemented in the
|
||||
osmo_bsc_bssap.c. This function will handle the GSM 08.08 BSSAP messages.
|
||||
Currently only the reset acknowledge and the paging messages are handled.
|
||||
|
||||
The BSC currently does not accept incoming SCCP messages and is only opening
|
||||
SCCP connections to the MSC. When opening a connection the callbacks for state
|
||||
changes (connection confirmed, released, release complete) are set and a routine
|
||||
for handling incoming data. This registration is done in the osmo_bsc_sccp.c
|
||||
file and the bsc_create_new_connection method. The name of the callback is
|
||||
msc_outgoing_sccp_data and this will call bsc_handle_dt1 that is implemented
|
||||
in the osmo_bsc_bssap.c file. This will forward the messages to the right
|
||||
Mobile Station (MS).
|
||||
|
||||
|
||||
4. Sending SCCP messages
|
||||
|
||||
There are three parts to sending that will be explained below. The first part
|
||||
is to send an entire SCCP frame (which includes the GSM 08.08 data) to the
|
||||
MSC. This is done by first registering the low level sending. sccp_system_init
|
||||
is called with the function that is responsible for sending a message. The
|
||||
msc_sccp_write_ipa will call the msc_queue_write function with the data and
|
||||
the right MSC connection. Below the msc_queue_write the IPA header will be
|
||||
prepended to the msg and then send to the MSC.
|
||||
|
||||
The BSC supports multiple different A-link connections, the decision to pick
|
||||
the right MSC is done in this method. It is either done via the SCCP connection
|
||||
or the ctx pointer.
|
||||
|
||||
When the BSC is starting a BSS RESET message will be sent to the MSC. The reset
|
||||
is created in osmo_bsc_msc.c:initialize_if_needed and sccp_write is called with
|
||||
the GSM 08.08 data and the connection to use. The libosmo-sccp library will
|
||||
embed it into a SCCP UDT message and call the msc_sccp_write_ipa method.
|
||||
|
||||
When a new SCCP connection is to be created the bsc_create_new_connection
|
||||
in the osmo_bsc_sccp.c file. The sccp_connection_socket method will create
|
||||
the context for a SCCP connection. The state and data callback will be used
|
||||
to be notified about data and changes. Once the connection is configured the
|
||||
bsc_open_connection will be called that will ask the libosmo-sccp library to
|
||||
create a SCCP CR message using the sccp_connection_connect method. For active
|
||||
connections the sccp_connection_write method will be called.
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ problems:
|
||||
* therefore, we can have e.g. both the BSC and the OML interface send a
|
||||
SET ATTRIBUTE message, where the responses would end up at the wrong
|
||||
query.
|
||||
* The BTS has 10s to ACK/NACK a command. We do not run any timers.
|
||||
|
||||
the only possible solutions i can imagine:
|
||||
* have some kind of exclusive locking, where the OML interface gets blocked
|
||||
|
||||
@@ -1,250 +0,0 @@
|
||||
|
||||
Osmocom Authentication Protocol (OAP)
|
||||
|
||||
1. General
|
||||
|
||||
The Osmocom Authentication Protocol employs mutual authentication to register a
|
||||
client with a server over an IPA connection. Milenage is used as the
|
||||
authentication algorithm, where client and server have a shared secret.
|
||||
|
||||
For example, an SGSN, as OAP client, may use its SGSN ID to register with a MAP
|
||||
proxy, an OAP server.
|
||||
|
||||
1.1. Connection
|
||||
|
||||
The protocol expects that a reliable, ordered, packet boundaries preserving
|
||||
connection is used (e.g. IPA over TCP).
|
||||
|
||||
1.2. Using IPA
|
||||
|
||||
By default, the following identifiers should be used:
|
||||
- IPA protocol: 0xee (OSMO)
|
||||
- IPA OSMO protocol extension: 0x06 (OAP)
|
||||
|
||||
2. Procedures
|
||||
|
||||
Ideal communication sequence:
|
||||
|
||||
Client Server
|
||||
| |
|
||||
| Register (ID) |
|
||||
|----------------------------------->|
|
||||
| |
|
||||
| Challenge (RAND+AUTN) |
|
||||
|<-----------------------------------|
|
||||
| |
|
||||
| Challenge Result (XRES) |
|
||||
|----------------------------------->|
|
||||
| |
|
||||
| Register Result |
|
||||
|<-----------------------------------|
|
||||
|
||||
Variation "test setup":
|
||||
|
||||
Client Server
|
||||
| |
|
||||
| Register (ID) |
|
||||
|----------------------------------->|
|
||||
| |
|
||||
| Register Result |
|
||||
|<-----------------------------------|
|
||||
|
||||
Variation "invalid sequence nr":
|
||||
|
||||
Client Server
|
||||
| |
|
||||
| Register (ID) |
|
||||
|----------------------------------->|
|
||||
| |
|
||||
| Challenge (RAND+AUTN) |
|
||||
|<-----------------------------------|
|
||||
| |
|
||||
| Sync Request (AUTS) |
|
||||
|----------------------------------->|
|
||||
| |
|
||||
| Challenge (RAND'+AUTN') |
|
||||
|<-----------------------------------|
|
||||
| |
|
||||
| Challenge Result (XRES) |
|
||||
|----------------------------------->|
|
||||
| |
|
||||
| Register Result |
|
||||
|<-----------------------------------|
|
||||
|
||||
2.1. Register
|
||||
|
||||
The client sends a REGISTER_REQ message containing an identifier number.
|
||||
|
||||
2.2. Challenge
|
||||
|
||||
The OAP server (optionally) sends back a CHALLENGE_REQ, containing random bytes
|
||||
and a milenage authentication token generated from these random bytes, using a
|
||||
shared secret, to authenticate itself to the OAP client. The server may omit
|
||||
this challenge entirely, based on its configuration, and immediately reply with
|
||||
a Register Result response. If the client cannot be registered (e.g. id is
|
||||
invalid), the server sends a REGISTER_ERR response.
|
||||
|
||||
2.3. Challenge Result
|
||||
|
||||
When the client has received a Challenge, it may verify the server's
|
||||
authenticity and validity of the sequence number (included in AUTN), and, if
|
||||
valid, reply with a CHALLENGE_RES message. This shall contain an XRES
|
||||
authentication token generated by milenage from the same random bytes received
|
||||
from the server and the same shared secet. If the client decides to cancel the
|
||||
registration (e.g. invalid AUTN), it shall not reply to the CHALLENGE_REQ; a
|
||||
CHALLENGE_ERR message may be sent, but is not mandatory. For example, the
|
||||
client may directly start with a new REGISTER_REQ message.
|
||||
|
||||
2.4. Sync Request
|
||||
|
||||
When the client has received a Challenge but sees an invalid sequence number
|
||||
(embedded in AUTN, according to the milenage algorithm), the client may send a
|
||||
SYNC_REQ message containing an AUTS synchronisation token.
|
||||
|
||||
2.5. Sync Result
|
||||
|
||||
If the server has received a valid Sync Request, it shall answer by directly
|
||||
sending another Challenge (see 2.2.). If an invalid Sync Request is received,
|
||||
the server shall reply with a REGISTER_ERR message.
|
||||
|
||||
2.6. Register Result
|
||||
|
||||
The server sends a REGISTER_RES message to indicate that registration has been
|
||||
successful. If the server cannot register the client (e.g. invalid challenge
|
||||
response), it shall send a REGISTER_ERR message.
|
||||
|
||||
3. Message Format
|
||||
|
||||
3.1. General
|
||||
|
||||
Every message is based on the following message format
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
|
||||
The receiver shall be able to receive IEs in any order. Unknown IEs shall be
|
||||
ignored.
|
||||
|
||||
3.2.1. Register Request
|
||||
|
||||
Client -> Server
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
30 Client ID big endian int (2 oct) M TLV 4
|
||||
|
||||
3.2.2. Register Error
|
||||
|
||||
Server -> Client
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
02 Cause GMM cause, M TLV 3
|
||||
04.08: 10.5.5.14
|
||||
|
||||
3.2.6. Register Result
|
||||
|
||||
Server -> Client
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
|
||||
3.2.3. Challenge
|
||||
|
||||
Server -> Client
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
20 RAND octet string (16) M TLV 18
|
||||
23 AUTN octet string (16) M TLV 18
|
||||
|
||||
3.2.4. Challenge Error
|
||||
|
||||
Client -> Server
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
02 Cause GMM cause, M TLV 3
|
||||
04.08: 10.5.5.14
|
||||
|
||||
3.2.5. Challenge Result
|
||||
|
||||
Client -> Server
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
21 XRES octet string (8) M TLV 10
|
||||
|
||||
3.2.3. Sync Request
|
||||
|
||||
Client -> Server
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
20 AUTS octet string (16) M TLV 18
|
||||
|
||||
3.2.4. Sync Error
|
||||
|
||||
Server -> Client
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
02 Cause GMM cause, M TLV 3
|
||||
04.08: 10.5.5.14
|
||||
|
||||
4. Information Elements
|
||||
|
||||
4.1. General
|
||||
|
||||
[...]
|
||||
|
||||
4.2.1. Message Type
|
||||
|
||||
+---------------------------------------------------+
|
||||
| 8 7 6 5 4 3 2 1 |
|
||||
| |
|
||||
| 0 0 0 0 0 1 0 0 - Register Request |
|
||||
| 0 0 0 0 0 1 0 1 - Register Error |
|
||||
| 0 0 0 0 0 1 1 0 - Register Result |
|
||||
| |
|
||||
| 0 0 0 0 1 0 0 0 - Challenge Request |
|
||||
| 0 0 0 0 1 0 0 1 - Challenge Error |
|
||||
| 0 0 0 0 1 0 1 0 - Challenge Result |
|
||||
| |
|
||||
| 0 0 0 0 1 1 0 0 - Sync Request |
|
||||
| 0 0 0 0 1 1 0 1 - Sync Error (not used) |
|
||||
| 0 0 0 0 1 1 1 0 - Sync Result (not used) |
|
||||
| |
|
||||
+---------------------------------------------------+
|
||||
|
||||
4.2.2. IE Identifier (informational)
|
||||
|
||||
These are the standard values for the IEI.
|
||||
|
||||
+---------------------------------------------------------+
|
||||
| IEI Info Element Type |
|
||||
| |
|
||||
| 0x02 Cause GMM cause, 04.08: 10.5.5.14 |
|
||||
| 0x20 RAND octet string |
|
||||
| 0x23 AUTN octet string |
|
||||
| 0x24 XRES octet string |
|
||||
| 0x25 AUTS octet string |
|
||||
| 0x30 Client ID big endian int (2 octets) |
|
||||
+---------------------------------------------------------+
|
||||
|
||||
4.2.3. Client ID
|
||||
|
||||
8 7 6 5 4 3 2 1
|
||||
+-----------------------------------------------------+
|
||||
| | Client ID IEI | octet 1
|
||||
+-----------------------------------------------------+
|
||||
| Length of Client ID IE contents (2) | octet 2
|
||||
+-----------------------------------------------------+
|
||||
| Client ID number, most significant byte | octet 3
|
||||
+-----------------------------------------------------+
|
||||
| Client ID number, least significant byte | octet 4
|
||||
+-----------------------------------------------------+
|
||||
|
||||
The Client ID number shall be interpreted as an unsigned 16bit integer, where 0
|
||||
indicates an invalid / unset ID.
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
|
||||
GSM Paging implementation in OpenBSC
|
||||
|
||||
== Code structure ==
|
||||
|
||||
The code is implemented in the libbsc/paging.c file. The external
|
||||
interface is documented/specified in the include/openbsc/paging.h
|
||||
header file. The code is used by the NITB and BSC application.
|
||||
|
||||
|
||||
== Implementation ==
|
||||
|
||||
Paging can be initiated in two ways. The standard way is to page by
|
||||
LAC. Each BTS has its own list/queue of outstanding paging operation.
|
||||
When a subscriber is paged one "struct paging_request" per BTS will
|
||||
be allocated and added to the tail of the list. The BTS is supposed
|
||||
to be configured to not repeat the paging.
|
||||
|
||||
A paging_request will remain in the queue until a paging response or at
|
||||
the expiry of the T3113. Every 500 milliseconds a RSL paging command is
|
||||
send to the BTS. The 500 milliseconds is a throttling to not crash the
|
||||
ip.access nanoBTS. Once one paging_request has been handled it will be
|
||||
put at the end of the queue/list and the available slots for the BTS
|
||||
will be decreased.
|
||||
|
||||
The available slots will be updated based on the paging load information
|
||||
element of the CCCH Load indication. If no paging slots are considered
|
||||
to be available and no load indication is sent a timer is started. The
|
||||
current timeout is 500 milliseconds and at the expiry of the timer the
|
||||
available slots will be set to 20.
|
||||
|
||||
OpenBSC has the " paging free <-1-1024>" configuration option. In case
|
||||
there are less free channels than required no paging request will be
|
||||
sent to the BTS. Instead it will be attempted to send the paging request
|
||||
at the next timeout (500 milliseconds).
|
||||
|
||||
== Limitation ==
|
||||
|
||||
The paging throughput could be higher but this has lead to crashes on the
|
||||
ip.access nanoBTS in the past.
|
||||
|
||||
== Configuration ==
|
||||
|
||||
=== ip.access nanoBTS ===
|
||||
|
||||
The current CCCH Load indication threshold is 10% and the period is 1 second.
|
||||
The code can be found inside the src/libbsc/bts_ipaccess_nanobts.c inside the
|
||||
nanobts_attr_bts array.
|
||||
@@ -1,468 +0,0 @@
|
||||
|
||||
GPRS Subscriber Update Protocol
|
||||
|
||||
1. General
|
||||
|
||||
This document describes the remote protocol that is used by the SGSN to update
|
||||
and manage the local subscriber list. The protocol and the messages are
|
||||
designed after the corresponding MAP messages (see GSM 09.02) with the
|
||||
following differences:
|
||||
|
||||
- The encoding uses TLV structures instead of ASN.1 encodings
|
||||
- Segmentation is not used
|
||||
|
||||
See the specification of the Gr interface (GSM 03.60).
|
||||
|
||||
2. Connection
|
||||
|
||||
The protocol expects that a reliable, ordered, packet boundaries preserving
|
||||
connection is used (e.g. IPA over TCP). The remote peer is either a service
|
||||
that understands the protocol natively or a wrapper service that maps the
|
||||
messages to/from real MAP messages that can be used to directly communicate
|
||||
with an HLR.
|
||||
|
||||
2.1. Using IPA
|
||||
|
||||
By default, the following identifiers should be used:
|
||||
- IPA protocol: 0xee (OSMO)
|
||||
- IPA OSMO protocol extension: 0x05
|
||||
|
||||
2. Procedures
|
||||
|
||||
2.1. Authentication management
|
||||
|
||||
The SGSN sends a SEND_AUTHENTICATION_INFO_REQ message containing the MS's IMSI
|
||||
to the peer. On errors, especially if authentication info is not availabe for
|
||||
that IMSI, the peer returns a SEND_AUTHENTICATION_INFO_ERR message. Otherwise
|
||||
the peer returns a SEND_AUTHENTICATION_INFO_RES message. If this message
|
||||
contains at least one authentication tuple, the SGSN replaces all tuples that
|
||||
are assigned to the subscriber. If the message doesn't contain any tuple the
|
||||
SGSN may reject the Attach Request. (see GSM 09.02, 25.5.6)
|
||||
|
||||
2.2. Location Updating
|
||||
|
||||
The SGSN sends a UPDATE_LOCATION_REQ to the peer. If the request is denied by
|
||||
the network, the peer returns an UPDATE_LOCATION_ERR message to the SGSN.
|
||||
Otherwise the peer returns an UPDATE_LOCATION_RES message containing all
|
||||
information fields that shall be inserted into the subscriber record. If
|
||||
the 'PDP info complete' information element is set in the message, the SGSN
|
||||
clears existing PDP information fields in the subscriber record first.
|
||||
(see GSM 09.02, 19.1.1.8)
|
||||
|
||||
[...]
|
||||
|
||||
3. Message Format
|
||||
|
||||
3.1. General
|
||||
|
||||
Every message is based on the following message format
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
01 IMSI 4.2.9 M TLV 2-10
|
||||
|
||||
If a numeric range is indicated in the 'presence' column, multiple information
|
||||
elements with the same tag may be used in sequence. The information elements
|
||||
shall be sent in the given order. Nevertheless after the generic part the
|
||||
receiver shall be able to received them in any order. Unknown IE shall be
|
||||
ignored.
|
||||
|
||||
3.2.1. Send Authentication Info Request
|
||||
|
||||
SGSN -> Network peer
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
01 IMSI 4.2.9 M TLV 2-10
|
||||
|
||||
3.2.2. Send Authentication Info Error
|
||||
|
||||
Network peer -> SGSN
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
01 IMSI 4.2.9 M TLV 2-10
|
||||
02 Cause GMM cause, M TLV 3
|
||||
04.08: 10.5.5.14
|
||||
|
||||
3.2.3. Send Authentication Info Response
|
||||
|
||||
Network peer -> SGSN
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
01 IMSI 4.2.9 M TLV 2-10
|
||||
03 Auth tuple 4.2.5 0-5 TLV 36
|
||||
|
||||
3.2.4. Update Location Request
|
||||
|
||||
SGSN -> Network peer
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
01 IMSI 4.2.9 M TLV 2-10
|
||||
|
||||
3.2.5. Update Location Error
|
||||
|
||||
Network peer -> SGSN
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
01 IMSI 4.2.9 M TLV 2-10
|
||||
02 Cause GMM cause, M TLV 3
|
||||
04.08: 10.5.5.14
|
||||
|
||||
3.2.6. Update Location Result
|
||||
|
||||
Network peer -> SGSN
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
01 IMSI 4.2.9 M TLV 2-10
|
||||
08 MSISDN 4.2.10 O TLV 0-9
|
||||
09 HLR Number 4.2.12 O TLV 0-9
|
||||
04 PDP info complete 4.2.8 O TLV 2
|
||||
05 PDP info 4.2.3 1-10 TLV
|
||||
|
||||
If the PDP info complete IE is present, the old PDP info list shall be cleared.
|
||||
|
||||
3.2.7. Location Cancellation Request
|
||||
|
||||
Network peer -> SGSN
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
01 IMSI 4.2.9 M TLV 2-10
|
||||
06 Cancellation type 4.2.6 M TLV 3
|
||||
|
||||
3.2.8. Location Cancellation Result
|
||||
|
||||
SGSN -> Network peer
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
01 IMSI 4.2.9 M TLV 2-10
|
||||
|
||||
3.2.9. Purge MS Request
|
||||
|
||||
SGSN -> Network peer
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
01 IMSI 4.2.9 M TLV 2-10
|
||||
09 HLR Number 4.2.12 M TLV 0-9
|
||||
|
||||
3.2.10. Purge MS Error
|
||||
|
||||
Network peer -> SGSN
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
01 IMSI 4.2.9 M TLV 2-10
|
||||
02 Cause GMM cause, M TLV 3
|
||||
04.08: 10.5.5.14
|
||||
|
||||
3.2.11. Purge MS Result
|
||||
|
||||
Network peer -> SGSN
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
01 IMSI 4.2.9 M TLV 2-10
|
||||
07 Freeze P-TMSI 4.2.8 O TLV 2
|
||||
|
||||
3.2.12. Insert Subscriber Data Request
|
||||
|
||||
Network peer -> SGSN
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
01 IMSI 4.2.9 M TLV 2-10
|
||||
04 PDP info complete 4.2.8 O TLV 2
|
||||
05 PDP info 4.2.3 0-10 TLV
|
||||
|
||||
If the PDP info complete IE is present, the old PDP info list shall be cleared.
|
||||
|
||||
3.2.13. Insert Subscriber Data Error
|
||||
|
||||
SGSN -> Network peer
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
01 IMSI 4.2.9 M TLV 2-10
|
||||
02 Cause GMM cause, M TLV 3
|
||||
04.08: 10.5.5.14
|
||||
|
||||
3.2.14. Insert Subscriber Data Result
|
||||
|
||||
SGSN -> Network peer
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
01 IMSI 4.2.9 M TLV 2-10
|
||||
|
||||
3.2.15. Delete Subscriber Data Request
|
||||
|
||||
Network peer -> SGSN
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
01 IMSI 4.2.9 M TLV 2-10
|
||||
10 PDP context id 4.2.3 0-10 TLV
|
||||
(no conditional IE)
|
||||
|
||||
3.2.16. Delete Subscriber Data Error
|
||||
|
||||
SGSN -> Network peer
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
01 IMSI 4.2.9 M TLV 2-10
|
||||
02 Cause GMM cause, M TLV 3
|
||||
04.08: 10.5.5.14
|
||||
|
||||
3.2.17. Delete Subscriber Data Result
|
||||
|
||||
Network peer -> SGSN
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Message type 4.2.1 M V 1
|
||||
01 IMSI 4.2.9 M TLV 2-10
|
||||
|
||||
4. Information Elements
|
||||
|
||||
4.1. General
|
||||
|
||||
[...]
|
||||
|
||||
4.2.1. Message Type
|
||||
|
||||
+---------------------------------------------------+
|
||||
| 8 7 6 5 4 3 2 1 |
|
||||
| |
|
||||
| 0 0 0 0 0 1 0 0 - Update Location Request |
|
||||
| 0 0 0 0 0 1 0 1 - Update Location Error |
|
||||
| 0 0 0 0 0 1 1 0 - Update Location Result |
|
||||
| |
|
||||
| 0 0 0 0 1 0 0 0 - Send Auth Info Request |
|
||||
| 0 0 0 0 1 0 0 1 - Send Auth Info Error |
|
||||
| 0 0 0 0 1 0 1 0 - Send Auth Info Result |
|
||||
| |
|
||||
| 0 0 0 0 1 1 0 0 - Purge MS Request |
|
||||
| 0 0 0 0 1 1 0 1 - Purge MS Error |
|
||||
| 0 0 0 0 1 1 1 0 - Purge MS Result |
|
||||
| |
|
||||
| 0 0 0 1 0 0 0 0 - Insert Subscr. Data Request |
|
||||
| 0 0 0 1 0 0 0 1 - Insert Subscr. Data Error |
|
||||
| 0 0 0 1 0 0 1 0 - Insert Subscr. Data Result |
|
||||
| |
|
||||
| 0 0 0 1 0 1 0 0 - Delete Subscr. Data Request |
|
||||
| 0 0 0 1 0 1 0 1 - Delete Subscr. Data Error |
|
||||
| 0 0 0 1 0 1 1 0 - Delete Subscr. Data Result |
|
||||
| |
|
||||
| 0 0 0 1 1 1 0 0 - Location Cancellation Request |
|
||||
| 0 0 0 1 1 1 0 1 - Location Cancellation Error |
|
||||
| 0 0 0 1 1 1 1 0 - Location Cancellation Result |
|
||||
| |
|
||||
+---------------------------------------------------+
|
||||
|
||||
4.2.2. IP Address
|
||||
|
||||
The value part is encoded like in the Packet data protocol address IE defined
|
||||
in GSM 04.08, 10.5.6.4. PDP type organization must be set to 'IETF allocated
|
||||
address'.
|
||||
|
||||
4.2.3. PDP Info
|
||||
|
||||
This is a container for information elements describing a single PDP.
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
PDP Info IEI M V 1
|
||||
Length of PDP Info IE length, no ext M V 1
|
||||
10 PDP context id big endian int, 1-N C TLV 3
|
||||
11 PDP type 4.2.4 C TLV 4
|
||||
12 Access point name 04.08, 10.5.6.1 C TLV 3-102
|
||||
13 Quality of Service 4.2.11 O TLV 1-20
|
||||
|
||||
The conditional IE are mandantory unless mentioned otherwise.
|
||||
|
||||
4.2.4. PDP Type
|
||||
|
||||
The PDP type value consists of 2 octets that are encoded like octet 4-5 of the
|
||||
End User Address defined in GSM 09.60, 7.9.18.
|
||||
|
||||
8 7 6 5 4 3 2 1
|
||||
+-----------------------------------------------------+
|
||||
| | PDP type IEI | octet 1
|
||||
+-----------------------------------------------------+
|
||||
| Length of PDP type IE contents (2) | octet 2
|
||||
+-----------------------------------------------------+
|
||||
| Spare | PDP type org. | octet 3
|
||||
+-----------------------------------------------------+
|
||||
| PDP type number | octet 4
|
||||
+-----------------------------------------------------+
|
||||
|
||||
The spare bits are left undefined. While 09.60 defines them as '1 1 1 1', there
|
||||
are MAP traces where these bits are set to '0 0 0 0'. So the receiver shall
|
||||
ignore these bits.
|
||||
|
||||
Examples:
|
||||
|
||||
IPv4: PDP type org: 1 (IETF), PDP type number: 0x21
|
||||
IPv6: PDP type org: 1 (IETF), PDP type number: 0x57
|
||||
|
||||
4.2.5. Auth tuple
|
||||
|
||||
This is a container for information elements describing a single authentication
|
||||
tuple.
|
||||
|
||||
IEI Info Element Type Pres. Format Length
|
||||
Auth. Tuple IEI M V 1
|
||||
Length of Ath Tuple IE length, no ext M V 1
|
||||
20 RAND octet string (16) M TLV 18
|
||||
21 SRES octet string (4) M TLV 6
|
||||
22 Kc octet string (8) M TLV 10
|
||||
|
||||
4.2.6. Cancellation Type
|
||||
|
||||
8 7 6 5 4 3 2 1
|
||||
+-----------------------------------------------------+
|
||||
| | Cancellation type IEI | octet 1
|
||||
+-----------------------------------------------------+
|
||||
| Length of Cancellation Type IE contents (1) | octet 2
|
||||
+-----------------------------------------------------+
|
||||
| Cancellation type number | octet 4
|
||||
+-----------------------------------------------------+
|
||||
|
||||
Where the cancellation type number is:
|
||||
|
||||
+---------------------------------------------------+
|
||||
| 8 7 6 5 4 3 2 1 |
|
||||
| |
|
||||
| 0 0 0 0 0 0 0 0 - Update Procedure |
|
||||
| 0 0 0 0 0 0 0 1 - Subscription Withdraw |
|
||||
+---------------------------------------------------+
|
||||
|
||||
4.2.7. IE Identifier (informational)
|
||||
|
||||
These are the standard values for the IEI. See the message definitions for the
|
||||
IEI that shall be used for the encoding.
|
||||
|
||||
+---------------------------------------------------------+
|
||||
| IEI Info Element Type |
|
||||
| |
|
||||
| 0x01 IMSI Mobile identity, 04.08: 10.5.1.4 |
|
||||
| 0x02 Cause GMM cause, 04.08: 10.5.5.14 |
|
||||
| 0x03 Auth tuple 4.2.5 |
|
||||
| 0x04 PDP info compl 4.2.8 |
|
||||
| 0x05 PDP info 4.2.3 |
|
||||
| 0x06 Cancel type 4.2.6 |
|
||||
| 0x07 Freeze P-TMSI 4.2.8 |
|
||||
| 0x08 MSISDN ISDN-AddressString/octet, 4.2.10 |
|
||||
| 0x09 HLR Number 4.2.12 |
|
||||
| 0x10 PDP context id big endian int |
|
||||
| 0x11 PDP type 4.2.4 |
|
||||
| 0x12 APN 04.08, 10.5.6.1 |
|
||||
| 0x13 QoS 4.2.11 |
|
||||
| 0x20 RAND octet string |
|
||||
| 0x21 SRES octet string |
|
||||
| 0x22 Kc octet string |
|
||||
+---------------------------------------------------------+
|
||||
|
||||
|
||||
4.2.8 Empty field
|
||||
|
||||
This is used for flags, if and only if this IE is present, the flag is set.
|
||||
The semantics depend on the IEI and the context.
|
||||
|
||||
8 7 6 5 4 3 2 1
|
||||
+-----------------------------------------------------+
|
||||
| | IEI | octet 1
|
||||
+-----------------------------------------------------+
|
||||
| Length of IE contents (0) | octet 2
|
||||
+-----------------------------------------------------+
|
||||
|
||||
4.2.9. IMSI
|
||||
|
||||
The IMSI is encoded like in octet 4-N of the Called Party BCD Number defined in GSM 04.08, 10.5.4.7.
|
||||
|
||||
8 7 6 5 4 3 2 1
|
||||
+-----------------------------------------------------+
|
||||
| | IMSI IEI | octet 1
|
||||
+-----------------------------------------------------+
|
||||
| Length of IMSI IE contents | octet 2
|
||||
+-----------------------------------------------------+
|
||||
| Number digit 2 | Number digit 1 | octet 3
|
||||
+-----------------------------------------------------+
|
||||
| Number digit 4 | Number digit 3 | octet 4
|
||||
+-----------------------------------------------------+
|
||||
: : :
|
||||
+-----------------------------------------------------+
|
||||
| see note 1) | octet 2+(N+1)div2
|
||||
+-----------------------------------------------------+
|
||||
|
||||
Note 1) Either '1 1 1 1 | Number digit N' (N odd) or
|
||||
'Number digit N | Number digit N-1' (N even),
|
||||
where N is the number of digits.
|
||||
|
||||
4.2.10. ISDN-AddressString / MSISDN / Called Party BCD Number
|
||||
|
||||
The MSISDN is encoded as an ISDN-AddressString in GSM 09.02 and Called Party
|
||||
BCD Number in GSM 04.08. It will be stored by the SGSN and then passed as is
|
||||
to the GGSN during the activation of the primary PDP Context.
|
||||
|
||||
8 7 6 5 4 3 2 1
|
||||
+-----------------------------------------------------+
|
||||
| | IEI | octet 1
|
||||
+-----------------------------------------------------+
|
||||
| Length of IE contents | octet 2
|
||||
+-----------------------------------------------------+
|
||||
| ext | Type of num | Numbering plan | octet 2
|
||||
+-----------------------------------------------------+
|
||||
| Number digit 2 | Number digit 1 | octet 3
|
||||
+-----------------------------------------------------+
|
||||
| Number digit 4 | Number digit 3 | octet 4
|
||||
+-----------------------------------------------------+
|
||||
: : :
|
||||
+-----------------------------------------------------+
|
||||
|
||||
|
||||
4.2.11 Quality of Service Subscribed Service
|
||||
|
||||
This encodes the subscribed QoS of a subscriber. It will be used by the
|
||||
SGSN during the PDP Context activation. If the length of the QoS data
|
||||
is 3 (three) octets it is assumed that these are octets 3-5 of the TS
|
||||
3GPP TS 24.008 Quality of Service Octets. If it is more than three then
|
||||
then it is assumed that the first octet is the Allocation/Retention
|
||||
Priority and the reset are encoded as octets 3-N of 24.008.
|
||||
|
||||
|
||||
8 7 6 5 4 3 2 1
|
||||
+-----------------------------------------------------+
|
||||
| | IEI | octet 1
|
||||
+-----------------------------------------------------+
|
||||
| Length of IE contents | octet 2
|
||||
+-----------------------------------------------------+
|
||||
: : :
|
||||
+-----------------------------------------------------+
|
||||
|
||||
4.2.12. HLR Number encoded as GSM 09.02 ISDN-AddressString
|
||||
|
||||
The HLR Number is encoded as an ISDN-AddressString in GSM 09.02. It
|
||||
will be stored by the SGSN can be used by the CDR module to keep a
|
||||
record.
|
||||
|
||||
8 7 6 5 4 3 2 1
|
||||
+-----------------------------------------------------+
|
||||
| | IEI | octet 1
|
||||
+-----------------------------------------------------+
|
||||
| Length of IE contents | octet 2
|
||||
+-----------------------------------------------------+
|
||||
| ext | Type of num | Numbering plan | octet 2
|
||||
+-----------------------------------------------------+
|
||||
| Number digit 2 | Number digit 1 | octet 3
|
||||
+-----------------------------------------------------+
|
||||
| Number digit 4 | Number digit 3 | octet 4
|
||||
+-----------------------------------------------------+
|
||||
: : :
|
||||
+-----------------------------------------------------+
|
||||
@@ -1,151 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Print a version string.
|
||||
scriptversion=2010-01-28.01
|
||||
|
||||
# Copyright (C) 2007-2010 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/.
|
||||
# It may be run two ways:
|
||||
# - from a git repository in which the "git describe" command below
|
||||
# produces useful output (thus requiring at least one signed tag)
|
||||
# - from a non-git-repo directory containing a .tarball-version file, which
|
||||
# presumes this script is invoked like "./git-version-gen .tarball-version".
|
||||
|
||||
# In order to use intra-version strings in your project, you will need two
|
||||
# separate generated version string files:
|
||||
#
|
||||
# .tarball-version - present only in a distribution tarball, and not in
|
||||
# a checked-out repository. Created with contents that were learned at
|
||||
# the last time autoconf was run, and used by git-version-gen. Must not
|
||||
# be present in either $(srcdir) or $(builddir) for git-version-gen to
|
||||
# give accurate answers during normal development with a checked out tree,
|
||||
# but must be present in a tarball when there is no version control system.
|
||||
# Therefore, it cannot be used in any dependencies. GNUmakefile has
|
||||
# hooks to force a reconfigure at distribution time to get the value
|
||||
# correct, without penalizing normal development with extra reconfigures.
|
||||
#
|
||||
# .version - present in a checked-out repository and in a distribution
|
||||
# tarball. Usable in dependencies, particularly for files that don't
|
||||
# want to depend on config.h but do want to track version changes.
|
||||
# Delete this file prior to any autoconf run where you want to rebuild
|
||||
# files to pick up a version string change; and leave it stale to
|
||||
# minimize rebuild time after unrelated changes to configure sources.
|
||||
#
|
||||
# It is probably wise to add these two files to .gitignore, so that you
|
||||
# don't accidentally commit either generated file.
|
||||
#
|
||||
# Use the following line in your configure.ac, so that $(VERSION) will
|
||||
# automatically be up-to-date each time configure is run (and note that
|
||||
# since configure.ac no longer includes a version string, Makefile rules
|
||||
# should not depend on configure.ac for version updates).
|
||||
#
|
||||
# AC_INIT([GNU project],
|
||||
# m4_esyscmd([build-aux/git-version-gen .tarball-version]),
|
||||
# [bug-project@example])
|
||||
#
|
||||
# Then use the following lines in your Makefile.am, so that .version
|
||||
# will be present for dependencies, and so that .tarball-version will
|
||||
# exist in distribution tarballs.
|
||||
#
|
||||
# BUILT_SOURCES = $(top_srcdir)/.version
|
||||
# $(top_srcdir)/.version:
|
||||
# echo $(VERSION) > $@-t && mv $@-t $@
|
||||
# dist-hook:
|
||||
# echo $(VERSION) > $(distdir)/.tarball-version
|
||||
|
||||
case $# in
|
||||
1) ;;
|
||||
*) echo 1>&2 "Usage: $0 \$srcdir/.tarball-version"; exit 1;;
|
||||
esac
|
||||
|
||||
tarball_version_file=$1
|
||||
nl='
|
||||
'
|
||||
|
||||
# First see if there is a tarball-only version file.
|
||||
# then try "git describe", then default.
|
||||
if test -f $tarball_version_file
|
||||
then
|
||||
v=`cat $tarball_version_file` || exit 1
|
||||
case $v in
|
||||
*$nl*) v= ;; # reject multi-line output
|
||||
[0-9]*) ;;
|
||||
*) v= ;;
|
||||
esac
|
||||
test -z "$v" \
|
||||
&& echo "$0: WARNING: $tarball_version_file seems to be damaged" 1>&2
|
||||
fi
|
||||
|
||||
if test -n "$v"
|
||||
then
|
||||
: # use $v
|
||||
elif test -d ./../.git \
|
||||
&& v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
|
||||
|| git describe --abbrev=4 HEAD 2>/dev/null` \
|
||||
&& case $v in
|
||||
[0-9]*) ;;
|
||||
v[0-9]*) ;;
|
||||
*) (exit 1) ;;
|
||||
esac
|
||||
then
|
||||
# Is this a new git that lists number of commits since the last
|
||||
# tag or the previous older version that did not?
|
||||
# Newer: v6.10-77-g0f8faeb
|
||||
# Older: v6.10-g0f8faeb
|
||||
case $v in
|
||||
*-*-*) : git describe is okay three part flavor ;;
|
||||
*-*)
|
||||
: git describe is older two part flavor
|
||||
# Recreate the number of commits and rewrite such that the
|
||||
# result is the same as if we were using the newer version
|
||||
# of git describe.
|
||||
vtag=`echo "$v" | sed 's/-.*//'`
|
||||
numcommits=`git rev-list "$vtag"..HEAD | wc -l`
|
||||
v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`;
|
||||
;;
|
||||
esac
|
||||
|
||||
# Change the first '-' to a '.', so version-comparing tools work properly.
|
||||
# Remove the "g" in git describe's output string, to save a byte.
|
||||
v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
|
||||
else
|
||||
v=UNKNOWN
|
||||
fi
|
||||
|
||||
v=`echo "$v" |sed 's/^v//'`
|
||||
|
||||
# Don't declare a version "dirty" merely because a time stamp has changed.
|
||||
git status > /dev/null 2>&1
|
||||
|
||||
dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty=
|
||||
case "$dirty" in
|
||||
'') ;;
|
||||
*) # Append the suffix only if there isn't one already.
|
||||
case $v in
|
||||
*-dirty) ;;
|
||||
*) v="$v-dirty" ;;
|
||||
esac ;;
|
||||
esac
|
||||
|
||||
# Omit the trailing newline, so that m4_esyscmd can use the result directly.
|
||||
echo "$v" | tr -d '\012'
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
@@ -1,3 +1,3 @@
|
||||
SUBDIRS = openbsc
|
||||
SUBDIRS = openbsc vty sccp
|
||||
|
||||
noinst_HEADERS = mISDNif.h compat_af_isdn.h
|
||||
|
||||
@@ -1,24 +1,8 @@
|
||||
noinst_HEADERS = abis_nm.h abis_rsl.h db.h gsm_04_08.h gsm_data.h \
|
||||
gsm_subscriber.h gsm_04_11.h debug.h signal.h \
|
||||
misdn.h chan_alloc.h paging.h ctrl.h \
|
||||
trau_mux.h rs232.h openbscdefines.h rtp_proxy.h \
|
||||
bsc_rll.h mncc.h transaction.h ussd.h gsm_04_80.h \
|
||||
silent_call.h mgcp.h meas_rep.h rest_octets.h \
|
||||
system_information.h handover.h mgcp_internal.h \
|
||||
vty.h socket.h e1_config.h trau_upqueue.h token_auth.h \
|
||||
handover_decision.h rrlp.h \
|
||||
crc24.h gprs_llc.h gprs_gmm.h \
|
||||
gb_proxy.h gprs_sgsn.h gsm_04_08_gprs.h sgsn.h \
|
||||
auth.h osmo_msc.h bsc_msc.h bsc_nat.h \
|
||||
osmo_bsc_rf.h osmo_bsc.h network_listen.h bsc_nat_sccp.h \
|
||||
osmo_msc_data.h osmo_bsc_grace.h sms_queue.h abis_om2000.h \
|
||||
bss.h gsm_data_shared.h ipaccess.h mncc_int.h \
|
||||
arfcn_range_encode.h nat_rewrite_trie.h bsc_nat_callstats.h \
|
||||
osmux.h mgcp_transcode.h gprs_utils.h utils.h \
|
||||
gprs_gb_parse.h smpp.h meas_feed.h gprs_gsup_messages.h \
|
||||
gprs_gsup_client.h bsc_msg_filter.h \
|
||||
oap.h oap_messages.h \
|
||||
gtphub.h
|
||||
|
||||
openbsc_HEADERS = gsm_04_08.h meas_rep.h bsc_api.h
|
||||
openbscdir = $(includedir)/openbsc
|
||||
noinst_HEADERS = abis_nm.h abis_rsl.h debug.h db.h gsm_04_08.h gsm_data.h \
|
||||
gsm_subscriber.h linuxlist.h msgb.h select.h tlv.h gsm_04_11.h \
|
||||
timer.h misdn.h chan_alloc.h telnet_interface.h paging.h \
|
||||
subchan_demux.h trau_frame.h e1_input.h trau_mux.h signal.h \
|
||||
gsm_utils.h ipaccess.h rs232.h openbscdefines.h rtp_proxy.h \
|
||||
bsc_rll.h mncc.h talloc.h transaction.h ussd.h gsm_04_80.h \
|
||||
silent_call.h mgcp.h meas_rep.h bitvec.h rest_octets.h \
|
||||
system_information.h handover.h bssap.h bsc_msc.h bsc_nat.h
|
||||
|
||||
@@ -5,32 +5,690 @@
|
||||
* All Rights Reserved
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _NM_H
|
||||
#define _NM_H
|
||||
|
||||
#include <osmocom/gsm/tlv.h>
|
||||
#include <osmocom/gsm/abis_nm.h>
|
||||
#include <osmocom/gsm/protocol/gsm_12_21.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <openbsc/tlv.h>
|
||||
|
||||
/* PRIVATE */
|
||||
|
||||
/* generic header in front of every OML message according to TS 08.59 */
|
||||
struct abis_om_hdr {
|
||||
u_int8_t mdisc;
|
||||
u_int8_t placement;
|
||||
u_int8_t sequence;
|
||||
u_int8_t length;
|
||||
u_int8_t data[0];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#define ABIS_OM_MDISC_FOM 0x80
|
||||
#define ABIS_OM_MDISC_MMI 0x40
|
||||
#define ABIS_OM_MDISC_TRAU 0x20
|
||||
#define ABIS_OM_MDISC_MANUF 0x10
|
||||
#define ABIS_OM_PLACEMENT_ONLY 0x80
|
||||
#define ABIS_OM_PLACEMENT_FIRST 0x40
|
||||
#define ABIS_OM_PLACEMENT_MIDDLE 0x20
|
||||
#define ABIS_OM_PLACEMENT_LAST 0x10
|
||||
|
||||
struct abis_om_obj_inst {
|
||||
u_int8_t bts_nr;
|
||||
u_int8_t trx_nr;
|
||||
u_int8_t ts_nr;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct abis_om_fom_hdr {
|
||||
u_int8_t msg_type;
|
||||
u_int8_t obj_class;
|
||||
struct abis_om_obj_inst obj_inst;
|
||||
u_int8_t data[0];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#define ABIS_OM_FOM_HDR_SIZE (sizeof(struct abis_om_hdr) + sizeof(struct abis_om_fom_hdr))
|
||||
|
||||
/* Section 9.1: Message Types */
|
||||
enum abis_nm_msgtype {
|
||||
/* SW Download Management Messages */
|
||||
NM_MT_LOAD_INIT = 0x01,
|
||||
NM_MT_LOAD_INIT_ACK,
|
||||
NM_MT_LOAD_INIT_NACK,
|
||||
NM_MT_LOAD_SEG,
|
||||
NM_MT_LOAD_SEG_ACK,
|
||||
NM_MT_LOAD_ABORT,
|
||||
NM_MT_LOAD_END,
|
||||
NM_MT_LOAD_END_ACK,
|
||||
NM_MT_LOAD_END_NACK,
|
||||
NM_MT_SW_ACT_REQ, /* BTS->BSC */
|
||||
NM_MT_SW_ACT_REQ_ACK,
|
||||
NM_MT_SW_ACT_REQ_NACK,
|
||||
NM_MT_ACTIVATE_SW, /* BSC->BTS */
|
||||
NM_MT_ACTIVATE_SW_ACK,
|
||||
NM_MT_ACTIVATE_SW_NACK,
|
||||
NM_MT_SW_ACTIVATED_REP, /* 0x10 */
|
||||
/* A-bis Interface Management Messages */
|
||||
NM_MT_ESTABLISH_TEI = 0x21,
|
||||
NM_MT_ESTABLISH_TEI_ACK,
|
||||
NM_MT_ESTABLISH_TEI_NACK,
|
||||
NM_MT_CONN_TERR_SIGN,
|
||||
NM_MT_CONN_TERR_SIGN_ACK,
|
||||
NM_MT_CONN_TERR_SIGN_NACK,
|
||||
NM_MT_DISC_TERR_SIGN,
|
||||
NM_MT_DISC_TERR_SIGN_ACK,
|
||||
NM_MT_DISC_TERR_SIGN_NACK,
|
||||
NM_MT_CONN_TERR_TRAF,
|
||||
NM_MT_CONN_TERR_TRAF_ACK,
|
||||
NM_MT_CONN_TERR_TRAF_NACK,
|
||||
NM_MT_DISC_TERR_TRAF,
|
||||
NM_MT_DISC_TERR_TRAF_ACK,
|
||||
NM_MT_DISC_TERR_TRAF_NACK,
|
||||
/* Transmission Management Messages */
|
||||
NM_MT_CONN_MDROP_LINK = 0x31,
|
||||
NM_MT_CONN_MDROP_LINK_ACK,
|
||||
NM_MT_CONN_MDROP_LINK_NACK,
|
||||
NM_MT_DISC_MDROP_LINK,
|
||||
NM_MT_DISC_MDROP_LINK_ACK,
|
||||
NM_MT_DISC_MDROP_LINK_NACK,
|
||||
/* Air Interface Management Messages */
|
||||
NM_MT_SET_BTS_ATTR = 0x41,
|
||||
NM_MT_SET_BTS_ATTR_ACK,
|
||||
NM_MT_SET_BTS_ATTR_NACK,
|
||||
NM_MT_SET_RADIO_ATTR,
|
||||
NM_MT_SET_RADIO_ATTR_ACK,
|
||||
NM_MT_SET_RADIO_ATTR_NACK,
|
||||
NM_MT_SET_CHAN_ATTR,
|
||||
NM_MT_SET_CHAN_ATTR_ACK,
|
||||
NM_MT_SET_CHAN_ATTR_NACK,
|
||||
/* Test Management Messages */
|
||||
NM_MT_PERF_TEST = 0x51,
|
||||
NM_MT_PERF_TEST_ACK,
|
||||
NM_MT_PERF_TEST_NACK,
|
||||
NM_MT_TEST_REP,
|
||||
NM_MT_SEND_TEST_REP,
|
||||
NM_MT_SEND_TEST_REP_ACK,
|
||||
NM_MT_SEND_TEST_REP_NACK,
|
||||
NM_MT_STOP_TEST,
|
||||
NM_MT_STOP_TEST_ACK,
|
||||
NM_MT_STOP_TEST_NACK,
|
||||
/* State Management and Event Report Messages */
|
||||
NM_MT_STATECHG_EVENT_REP = 0x61,
|
||||
NM_MT_FAILURE_EVENT_REP,
|
||||
NM_MT_STOP_EVENT_REP,
|
||||
NM_MT_STOP_EVENT_REP_ACK,
|
||||
NM_MT_STOP_EVENT_REP_NACK,
|
||||
NM_MT_REST_EVENT_REP,
|
||||
NM_MT_REST_EVENT_REP_ACK,
|
||||
NM_MT_REST_EVENT_REP_NACK,
|
||||
NM_MT_CHG_ADM_STATE,
|
||||
NM_MT_CHG_ADM_STATE_ACK,
|
||||
NM_MT_CHG_ADM_STATE_NACK,
|
||||
NM_MT_CHG_ADM_STATE_REQ,
|
||||
NM_MT_CHG_ADM_STATE_REQ_ACK,
|
||||
NM_MT_CHG_ADM_STATE_REQ_NACK,
|
||||
NM_MT_REP_OUTST_ALARMS = 0x93,
|
||||
NM_MT_REP_OUTST_ALARMS_ACK,
|
||||
NM_MT_REP_OUTST_ALARMS_NACK,
|
||||
/* Equipment Management Messages */
|
||||
NM_MT_CHANGEOVER = 0x71,
|
||||
NM_MT_CHANGEOVER_ACK,
|
||||
NM_MT_CHANGEOVER_NACK,
|
||||
NM_MT_OPSTART,
|
||||
NM_MT_OPSTART_ACK,
|
||||
NM_MT_OPSTART_NACK,
|
||||
NM_MT_REINIT,
|
||||
NM_MT_REINIT_ACK,
|
||||
NM_MT_REINIT_NACK,
|
||||
NM_MT_SET_SITE_OUT, /* BS11: get alarm ?!? */
|
||||
NM_MT_SET_SITE_OUT_ACK,
|
||||
NM_MT_SET_SITE_OUT_NACK,
|
||||
NM_MT_CHG_HW_CONF = 0x90,
|
||||
NM_MT_CHG_HW_CONF_ACK,
|
||||
NM_MT_CHG_HW_CONF_NACK,
|
||||
/* Measurement Management Messages */
|
||||
NM_MT_MEAS_RES_REQ = 0x8a,
|
||||
NM_MT_MEAS_RES_RESP,
|
||||
NM_MT_STOP_MEAS,
|
||||
NM_MT_START_MEAS,
|
||||
/* Other Messages */
|
||||
NM_MT_GET_ATTR = 0x81,
|
||||
NM_MT_GET_ATTR_RESP,
|
||||
NM_MT_GET_ATTR_NACK,
|
||||
NM_MT_SET_ALARM_THRES,
|
||||
NM_MT_SET_ALARM_THRES_ACK,
|
||||
NM_MT_SET_ALARM_THRES_NACK,
|
||||
};
|
||||
|
||||
enum abis_nm_msgtype_bs11 {
|
||||
NM_MT_BS11_RESET_RESOURCE = 0x74,
|
||||
|
||||
NM_MT_BS11_BEGIN_DB_TX = 0xa3,
|
||||
NM_MT_BS11_BEGIN_DB_TX_ACK,
|
||||
NM_MT_BS11_BEGIN_DB_TX_NACK,
|
||||
NM_MT_BS11_END_DB_TX = 0xa6,
|
||||
NM_MT_BS11_END_DB_TX_ACK,
|
||||
NM_MT_BS11_END_DB_TX_NACK,
|
||||
NM_MT_BS11_CREATE_OBJ = 0xa9,
|
||||
NM_MT_BS11_CREATE_OBJ_ACK,
|
||||
NM_MT_BS11_CREATE_OBJ_NACK,
|
||||
NM_MT_BS11_DELETE_OBJ = 0xac,
|
||||
NM_MT_BS11_DELETE_OBJ_ACK,
|
||||
NM_MT_BS11_DELETE_OBJ_NACK,
|
||||
|
||||
NM_MT_BS11_SET_ATTR = 0xd0,
|
||||
NM_MT_BS11_SET_ATTR_ACK,
|
||||
NM_MT_BS11_SET_ATTR_NACK,
|
||||
NM_MT_BS11_LMT_SESSION = 0xdc,
|
||||
|
||||
NM_MT_BS11_GET_STATE = 0xe3,
|
||||
NM_MT_BS11_GET_STATE_ACK,
|
||||
NM_MT_BS11_LMT_LOGON = 0xe5,
|
||||
NM_MT_BS11_LMT_LOGON_ACK,
|
||||
NM_MT_BS11_RESTART = 0xe7,
|
||||
NM_MT_BS11_RESTART_ACK,
|
||||
NM_MT_BS11_DISCONNECT = 0xe9,
|
||||
NM_MT_BS11_DISCONNECT_ACK,
|
||||
NM_MT_BS11_LMT_LOGOFF = 0xec,
|
||||
NM_MT_BS11_LMT_LOGOFF_ACK,
|
||||
NM_MT_BS11_RECONNECT = 0xf1,
|
||||
NM_MT_BS11_RECONNECT_ACK,
|
||||
};
|
||||
|
||||
enum abis_nm_msgtype_ipacc {
|
||||
NM_MT_IPACC_RESTART = 0x87,
|
||||
NM_MT_IPACC_RESTART_ACK,
|
||||
NM_MT_IPACC_RSL_CONNECT = 0xe0,
|
||||
NM_MT_IPACC_RSL_CONNECT_ACK,
|
||||
NM_MT_IPACC_RSL_CONNECT_NACK,
|
||||
NM_MT_IPACC_RSL_DISCONNECT = 0xe3,
|
||||
NM_MT_IPACC_RSL_DISCONNECT_ACK,
|
||||
NM_MT_IPACC_RSL_DISCONNECT_NACK,
|
||||
NM_MT_IPACC_CONN_TRAF = 0xe6,
|
||||
NM_MT_IPACC_CONN_TRAF_ACK,
|
||||
NM_MT_IPACC_CONN_TRAF_NACK,
|
||||
NM_MT_IPACC_DEF_BOOT_SW = 0xec,
|
||||
NM_MT_IPACC_DEF_BOOT_SW_ACK,
|
||||
MN_MT_IPACC_DEF_BOOT_SW_NACK,
|
||||
NM_MT_IPACC_SET_NVATTR = 0xef,
|
||||
NM_MT_IPACC_SET_NVATTR_ACK,
|
||||
NM_MT_IPACC_SET_NVATTR_NACK,
|
||||
NM_MT_IPACC_GET_NVATTR = 0xf2,
|
||||
NM_MT_IPACC_GET_NVATTR_ACK,
|
||||
NM_MT_IPACC_GET_NVATTR_NACK,
|
||||
NM_MT_IPACC_SET_ATTR = 0xf5,
|
||||
NM_MT_IPACC_SET_ATTR_ACK,
|
||||
NM_MT_IPACC_SET_ATTR_NACK,
|
||||
};
|
||||
|
||||
enum abis_nm_bs11_cell_alloc {
|
||||
NM_BS11_CANR_GSM = 0x00,
|
||||
NM_BS11_CANR_DCS1800 = 0x01,
|
||||
};
|
||||
|
||||
/* Section 9.2: Object Class */
|
||||
enum abis_nm_obj_class {
|
||||
NM_OC_SITE_MANAGER = 0x00,
|
||||
NM_OC_BTS,
|
||||
NM_OC_RADIO_CARRIER,
|
||||
NM_OC_CHANNEL,
|
||||
NM_OC_BASEB_TRANSC,
|
||||
/* RFU: 05-FE */
|
||||
|
||||
NM_OC_IPAC_E1_TRUNK = 0x0e,
|
||||
NM_OC_IPAC_E1_PORT = 0x0f,
|
||||
NM_OC_IPAC_E1_CHAN = 0x10,
|
||||
NM_OC_IPAC_CLK_MODULE = 0x22,
|
||||
|
||||
NM_OC_BS11_ADJC = 0xa0,
|
||||
NM_OC_BS11_HANDOVER = 0xa1,
|
||||
NM_OC_BS11_PWR_CTRL = 0xa2,
|
||||
NM_OC_BS11_BTSE = 0xa3, /* LMT? */
|
||||
NM_OC_BS11_RACK = 0xa4,
|
||||
NM_OC_BS11 = 0xa5, /* 01: ALCO */
|
||||
NM_OC_BS11_TEST = 0xa6,
|
||||
NM_OC_BS11_ENVABTSE = 0xa8,
|
||||
NM_OC_BS11_BPORT = 0xa9,
|
||||
|
||||
NM_OC_GPRS_NSE = 0xf0,
|
||||
NM_OC_GPRS_CELL = 0xf1,
|
||||
NM_OC_GPRS_NSVC = 0xf2,
|
||||
|
||||
NM_OC_NULL = 0xff,
|
||||
};
|
||||
|
||||
/* Section 9.4: Attributes */
|
||||
enum abis_nm_attr {
|
||||
NM_ATT_ABIS_CHANNEL = 0x01,
|
||||
NM_ATT_ADD_INFO,
|
||||
NM_ATT_ADD_TEXT,
|
||||
NM_ATT_ADM_STATE,
|
||||
NM_ATT_ARFCN_LIST,
|
||||
NM_ATT_AUTON_REPORT,
|
||||
NM_ATT_AVAIL_STATUS,
|
||||
NM_ATT_BCCH_ARFCN,
|
||||
NM_ATT_BSIC,
|
||||
NM_ATT_BTS_AIR_TIMER,
|
||||
NM_ATT_CCCH_L_I_P,
|
||||
NM_ATT_CCCH_L_T,
|
||||
NM_ATT_CHAN_COMB,
|
||||
NM_ATT_CONN_FAIL_CRIT,
|
||||
NM_ATT_DEST,
|
||||
/* res */
|
||||
NM_ATT_EVENT_TYPE = 0x11, /* BS11: file data ?!? */
|
||||
NM_ATT_FILE_ID,
|
||||
NM_ATT_FILE_VERSION,
|
||||
NM_ATT_GSM_TIME,
|
||||
NM_ATT_HSN,
|
||||
NM_ATT_HW_CONFIG,
|
||||
NM_ATT_HW_DESC,
|
||||
NM_ATT_INTAVE_PARAM,
|
||||
NM_ATT_INTERF_BOUND,
|
||||
NM_ATT_LIST_REQ_ATTR,
|
||||
NM_ATT_MAIO,
|
||||
NM_ATT_MANUF_STATE,
|
||||
NM_ATT_MANUF_THRESH,
|
||||
NM_ATT_MANUF_ID,
|
||||
NM_ATT_MAX_TA,
|
||||
NM_ATT_MDROP_LINK, /* 0x20 */
|
||||
NM_ATT_MDROP_NEXT,
|
||||
NM_ATT_NACK_CAUSES,
|
||||
NM_ATT_NY1,
|
||||
NM_ATT_OPER_STATE,
|
||||
NM_ATT_OVERL_PERIOD,
|
||||
NM_ATT_PHYS_CONF,
|
||||
NM_ATT_POWER_CLASS,
|
||||
NM_ATT_POWER_THRESH,
|
||||
NM_ATT_PROB_CAUSE,
|
||||
NM_ATT_RACH_B_THRESH,
|
||||
NM_ATT_LDAVG_SLOTS,
|
||||
NM_ATT_RAD_SUBC,
|
||||
NM_ATT_RF_MAXPOWR_R,
|
||||
NM_ATT_SITE_INPUTS,
|
||||
NM_ATT_SITE_OUTPUTS,
|
||||
NM_ATT_SOURCE, /* 0x30 */
|
||||
NM_ATT_SPEC_PROB,
|
||||
NM_ATT_START_TIME,
|
||||
NM_ATT_T200,
|
||||
NM_ATT_TEI,
|
||||
NM_ATT_TEST_DUR,
|
||||
NM_ATT_TEST_NO,
|
||||
NM_ATT_TEST_REPORT,
|
||||
NM_ATT_VSWR_THRESH,
|
||||
NM_ATT_WINDOW_SIZE,
|
||||
/* Res */
|
||||
NM_ATT_BS11_RSSI_OFFS = 0x3d,
|
||||
NM_ATT_BS11_TXPWR = 0x3e,
|
||||
NM_ATT_BS11_DIVERSITY = 0x3f,
|
||||
/* Res */
|
||||
NM_ATT_TSC = 0x40,
|
||||
NM_ATT_SW_CONFIG,
|
||||
NM_ATT_SW_DESCR,
|
||||
NM_ATT_SEVERITY,
|
||||
NM_ATT_GET_ARI,
|
||||
NM_ATT_HW_CONF_CHG,
|
||||
NM_ATT_OUTST_ALARM,
|
||||
NM_ATT_FILE_DATA,
|
||||
NM_ATT_MEAS_RES,
|
||||
NM_ATT_MEAS_TYPE,
|
||||
|
||||
NM_ATT_BS11_ESN_FW_CODE_NO = 0x4c,
|
||||
NM_ATT_BS11_ESN_HW_CODE_NO = 0x4f,
|
||||
|
||||
NM_ATT_BS11_ESN_PCB_SERIAL = 0x55,
|
||||
NM_ATT_BS11_EXCESSIVE_DISTANCE = 0x58,
|
||||
|
||||
NM_ATT_BS11_ALL_TEST_CATG = 0x60,
|
||||
NM_ATT_BS11_BTSLS_HOPPING,
|
||||
NM_ATT_BS11_CELL_ALLOC_NR,
|
||||
NM_ATT_BS11_CELL_GLOBAL_ID,
|
||||
NM_ATT_BS11_ENA_INTERF_CLASS = 0x66,
|
||||
NM_ATT_BS11_ENA_INT_INTEC_HANDO = 0x67,
|
||||
NM_ATT_BS11_ENA_INT_INTRC_HANDO = 0x68,
|
||||
NM_ATT_BS11_ENA_MS_PWR_CTRL = 0x69,
|
||||
NM_ATT_BS11_ENA_PWR_BDGT_HO = 0x6a,
|
||||
NM_ATT_BS11_ENA_PWR_CTRL_RLFW = 0x6b,
|
||||
NM_ATT_BS11_ENA_RXLEV_HO = 0x6c,
|
||||
NM_ATT_BS11_ENA_RXQUAL_HO = 0x6d,
|
||||
NM_ATT_BS11_FACCH_QUAL = 0x6e,
|
||||
|
||||
NM_ATT_IPACC_DST_IP = 0x80,
|
||||
NM_ATT_IPACC_DST_IP_PORT = 0x81,
|
||||
NM_ATT_IPACC_SSRC = 0x82,
|
||||
NM_ATT_IPACC_RTP_PAYLD_TYPE = 0x83,
|
||||
NM_ATT_IPACC_BASEB_ID = 0x84,
|
||||
NM_ATT_IPACC_STREAM_ID = 0x85,
|
||||
NM_ATT_IPACC_NV_FLAGS = 0x86,
|
||||
NM_ATT_IPACC_FREQ_CTRL = 0x87,
|
||||
NM_ATT_IPACC_PRIM_OML_CFG = 0x88,
|
||||
NM_ATT_IPACC_SEC_OML_CFG = 0x89,
|
||||
NM_ATT_IPACC_IP_IF_CFG = 0x8a, /* IP interface */
|
||||
NM_ATT_IPACC_IP_GW_CFG = 0x8b, /* IP gateway */
|
||||
NM_ATT_IPACC_IN_SERV_TIME = 0x8c,
|
||||
NM_ATT_IPACC_TRX_BTS_ASS = 0x8d,
|
||||
NM_ATT_IPACC_LOCATION = 0x8e, /* string describing location */
|
||||
NM_ATT_IPACC_PAGING_CFG = 0x8f,
|
||||
NM_ATT_IPACC_FILE_DATA = 0x90,
|
||||
NM_ATT_IPACC_UNIT_ID = 0x91, /* Site/BTS/TRX */
|
||||
NM_ATT_IPACC_PARENT_UNIT_ID = 0x92,
|
||||
NM_ATT_IPACC_UNIT_NAME = 0x93, /* default: nbts-<mac-as-string> */
|
||||
NM_ATT_IPACC_SNMP_CFG = 0x94,
|
||||
NM_ATT_IPACC_PRIM_OML_CFG_LIST = 0x95,
|
||||
NM_ATT_IPACC_PRIM_OML_FB_TOUT = 0x96,
|
||||
NM_ATT_IPACC_CUR_SW_CFG = 0x97,
|
||||
NM_ATT_IPACC_TIMING_BUS = 0x98,
|
||||
NM_ATT_IPACC_CGI = 0x99,
|
||||
NM_ATT_IPACC_RAC = 0x9a,
|
||||
NM_ATT_IPACC_OBJ_VERSION = 0x9b,
|
||||
NM_ATT_IPACC_GPRS_PAGING_CFG = 0x9c,
|
||||
NM_ATT_IPACC_NSEI = 0x9d,
|
||||
NM_ATT_IPACC_BVCI = 0x9e,
|
||||
NM_ATT_IPACC_NSVCI = 0x9f,
|
||||
NM_ATT_IPACC_NS_CFG = 0xa0,
|
||||
NM_ATT_IPACC_BSSGP_CFG = 0xa1,
|
||||
NM_ATT_IPACC_NS_LINK_CFG = 0xa2,
|
||||
NM_ATT_IPACC_RLC_CFG = 0xa3,
|
||||
NM_ATT_IPACC_ALM_THRESH_LIST = 0xa4,
|
||||
NM_ATT_IPACC_MONIT_VAL_LIST = 0xa5,
|
||||
NM_ATT_IPACC_TIB_CONTROL = 0xa6,
|
||||
NM_ATT_IPACC_SUPP_FEATURES = 0xa7,
|
||||
NM_ATT_IPACC_CODING_SCHEMES = 0xa8,
|
||||
NM_ATT_IPACC_RLC_CFG_2 = 0xa9,
|
||||
NM_ATT_IPACC_HEARTB_TOUT = 0xaa,
|
||||
NM_ATT_IPACC_UPTIME = 0xab,
|
||||
NM_ATT_IPACC_RLC_CFG_3 = 0xac,
|
||||
NM_ATT_IPACC_SSL_CFG = 0xad,
|
||||
NM_ATT_IPACC_SEC_POSSIBLE = 0xae,
|
||||
NM_ATT_IPACC_IML_SSL_STATE = 0xaf,
|
||||
NM_ATT_IPACC_REVOC_DATE = 0xb0,
|
||||
|
||||
|
||||
NM_ATT_BS11_RF_RES_IND_PER = 0x8f,
|
||||
|
||||
NM_ATT_BS11_RX_LEV_MIN_CELL = 0x90,
|
||||
NM_ATT_BS11_ABIS_EXT_TIME = 0x91,
|
||||
NM_ATT_BS11_TIMER_HO_REQUEST = 0x92,
|
||||
NM_ATT_BS11_TIMER_NCELL = 0x93,
|
||||
NM_ATT_BS11_TSYNC = 0x94,
|
||||
NM_ATT_BS11_TTRAU = 0x95,
|
||||
NM_ATT_BS11_EMRG_CFG_MEMBER = 0x9b,
|
||||
NM_ATT_BS11_TRX_AREA = 0x9f,
|
||||
|
||||
NM_ATT_BS11_BCCH_RECONF = 0xd7,
|
||||
NM_ATT_BS11_BIT_ERR_THESH = 0xa0,
|
||||
NM_ATT_BS11_BOOT_SW_VERS = 0xa1,
|
||||
NM_ATT_BS11_CCLK_ACCURACY = 0xa3,
|
||||
NM_ATT_BS11_CCLK_TYPE = 0xa4,
|
||||
NM_ATT_BS11_INP_IMPEDANCE = 0xaa,
|
||||
NM_ATT_BS11_L1_PROT_TYPE = 0xab,
|
||||
NM_ATT_BS11_LINE_CFG = 0xac,
|
||||
NM_ATT_BS11_LI_PORT_1 = 0xad,
|
||||
NM_ATT_BS11_LI_PORT_2 = 0xae,
|
||||
|
||||
NM_ATT_BS11_L1_REM_ALM_TYPE = 0xb0,
|
||||
NM_ATT_BS11_SW_LOAD_INTENDED = 0xbb,
|
||||
NM_ATT_BS11_SW_LOAD_SAFETY = 0xbc,
|
||||
NM_ATT_BS11_SW_LOAD_STORED = 0xbd,
|
||||
|
||||
NM_ATT_BS11_VENDOR_NAME = 0xc1,
|
||||
NM_ATT_BS11_HOPPING_MODE = 0xc5,
|
||||
NM_ATT_BS11_LMT_LOGON_SESSION = 0xc6,
|
||||
NM_ATT_BS11_LMT_LOGIN_TIME = 0xc7,
|
||||
NM_ATT_BS11_LMT_USER_ACC_LEV = 0xc8,
|
||||
NM_ATT_BS11_LMT_USER_NAME = 0xc9,
|
||||
|
||||
NM_ATT_BS11_L1_CONTROL_TS = 0xd8,
|
||||
NM_ATT_BS11_RADIO_MEAS_GRAN = 0xdc, /* in SACCH multiframes */
|
||||
NM_ATT_BS11_RADIO_MEAS_REP = 0xdd,
|
||||
|
||||
NM_ATT_BS11_SH_LAPD_INT_TIMER = 0xe8,
|
||||
|
||||
NM_ATT_BS11_BTS_STATE = 0xf0,
|
||||
NM_ATT_BS11_E1_STATE = 0xf1,
|
||||
NM_ATT_BS11_PLL = 0xf2,
|
||||
NM_ATT_BS11_RX_OFFSET = 0xf3,
|
||||
NM_ATT_BS11_ANT_TYPE = 0xf4,
|
||||
NM_ATT_BS11_PLL_MODE = 0xfc,
|
||||
NM_ATT_BS11_PASSWORD = 0xfd,
|
||||
};
|
||||
#define NM_ATT_BS11_FILE_DATA NM_ATT_EVENT_TYPE
|
||||
|
||||
/* Section 9.4.4: Administrative State */
|
||||
enum abis_nm_adm_state {
|
||||
NM_STATE_LOCKED = 0x01,
|
||||
NM_STATE_UNLOCKED = 0x02,
|
||||
NM_STATE_SHUTDOWN = 0x03,
|
||||
NM_STATE_NULL = 0xff,
|
||||
};
|
||||
|
||||
/* Section 9.4.7: Administrative State */
|
||||
enum abis_nm_avail_state {
|
||||
NM_AVSTATE_IN_TEST = 1,
|
||||
NM_AVSTATE_POWER_OFF = 2,
|
||||
NM_AVSTATE_OFF_LINE = 3,
|
||||
NM_AVSTATE_DEPENDENCY = 5,
|
||||
NM_AVSTATE_DEGRADED = 6,
|
||||
NM_AVSTATE_NOT_INSTALLED= 7,
|
||||
NM_AVSTATE_OK = 0xff,
|
||||
};
|
||||
|
||||
/* Section 9.4.13: Channel Combination */
|
||||
enum abis_nm_chan_comb {
|
||||
NM_CHANC_TCHFull = 0x00, /* TCH/F + TCH/H + SACCH/TF */
|
||||
NM_CHANC_TCHHalf = 0x01, /* TCH/H(0,1) + FACCH/H(0,1) +
|
||||
SACCH/TH(0,1) */
|
||||
NM_CHANC_TCHHalf2 = 0x02, /* TCH/H(0) + FACCH/H(0) + SACCH/TH(0) +
|
||||
TCH/H(1) */
|
||||
NM_CHANC_SDCCH = 0x03, /* SDCCH/8 + SACCH/8 */
|
||||
NM_CHANC_mainBCCH = 0x04, /* FCCH + SCH + BCCH + CCCH */
|
||||
NM_CHANC_BCCHComb = 0x05, /* FCCH + SCH + BCCH + CCCH + SDCCH/4 +
|
||||
SACCH/C4 */
|
||||
NM_CHANC_BCCH = 0x06, /* BCCH + CCCH */
|
||||
NM_CHANC_BCCH_CBCH = 0x07, /* CHANC_BCCHComb + CBCH */
|
||||
NM_CHANC_SDCCH_CBCH = 0x08, /* CHANC_SDCCH8 + CBCH */
|
||||
/* ip.access */
|
||||
NM_CHANC_IPAC_bPDCH = 0x0b, /* PBCCH + PCCCH + PDTCH/F + PACCH/F +
|
||||
PTCCH/F */
|
||||
NM_CHANC_IPAC_cPDCH = 0x0c, /* PBCCH + PDTCH/F + PACCH/F + PTCCH/F */
|
||||
NM_CHANC_IPAC_PDCH = 0x0d, /* PDTCH/F + PACCH/F + PTCCH/F */
|
||||
NM_CHANC_IPAC_TCHFull_PDCH = 0x80,
|
||||
NM_CHANC_IPAC_TCHFull_TCHHalf = 0x81,
|
||||
};
|
||||
|
||||
/* Section 9.4.16: Event Type */
|
||||
enum abis_nm_event_type {
|
||||
NM_EVT_COMM_FAIL = 0x00,
|
||||
NM_EVT_QOS_FAIL = 0x01,
|
||||
NM_EVT_PROC_FAIL = 0x02,
|
||||
NM_EVT_EQUIP_FAIL = 0x03,
|
||||
NM_EVT_ENV_FAIL = 0x04,
|
||||
};
|
||||
|
||||
/* Section: 9.4.63: Perceived Severity */
|
||||
enum abis_nm_severity {
|
||||
NM_SEVER_CEASED = 0x00,
|
||||
NM_SEVER_CRITICAL = 0x01,
|
||||
NM_SEVER_MAJOR = 0x02,
|
||||
NM_SEVER_MINOR = 0x03,
|
||||
NM_SEVER_WARNING = 0x04,
|
||||
NM_SEVER_INDETERMINATE = 0x05,
|
||||
};
|
||||
|
||||
/* Section 9.4.43: Probable Cause Type */
|
||||
enum abis_nm_pcause_type {
|
||||
NM_PCAUSE_T_X721 = 0x01,
|
||||
NM_PCAUSE_T_GSM = 0x02,
|
||||
NM_PCAUSE_T_MANUF = 0x03,
|
||||
};
|
||||
|
||||
/* Section 9.4.36: NACK Causes */
|
||||
enum abis_nm_nack_cause {
|
||||
/* General Nack Causes */
|
||||
NM_NACK_INCORR_STRUCT = 0x01,
|
||||
NM_NACK_MSGTYPE_INVAL = 0x02,
|
||||
NM_NACK_OBJCLASS_INVAL = 0x05,
|
||||
NM_NACK_OBJCLASS_NOTSUPP = 0x06,
|
||||
NM_NACK_BTSNR_UNKN = 0x07,
|
||||
NM_NACK_TRXNR_UNKN = 0x08,
|
||||
NM_NACK_OBJINST_UNKN = 0x09,
|
||||
NM_NACK_ATTRID_INVAL = 0x0c,
|
||||
NM_NACK_ATTRID_NOTSUPP = 0x0d,
|
||||
NM_NACK_PARAM_RANGE = 0x0e,
|
||||
NM_NACK_ATTRLIST_INCONSISTENT = 0x0f,
|
||||
NM_NACK_SPEC_IMPL_NOTSUPP = 0x10,
|
||||
NM_NACK_CANT_PERFORM = 0x11,
|
||||
/* Specific Nack Causes */
|
||||
NM_NACK_RES_NOTIMPL = 0x19,
|
||||
NM_NACK_RES_NOTAVAIL = 0x1a,
|
||||
NM_NACK_FREQ_NOTAVAIL = 0x1b,
|
||||
NM_NACK_TEST_NOTSUPP = 0x1c,
|
||||
NM_NACK_CAPACITY_RESTR = 0x1d,
|
||||
NM_NACK_PHYSCFG_NOTPERFORM = 0x1e,
|
||||
NM_NACK_TEST_NOTINIT = 0x1f,
|
||||
NM_NACK_PHYSCFG_NOTRESTORE = 0x20,
|
||||
NM_NACK_TEST_NOSUCH = 0x21,
|
||||
NM_NACK_TEST_NOSTOP = 0x22,
|
||||
NM_NACK_MSGINCONSIST_PHYSCFG = 0x23,
|
||||
NM_NACK_FILE_INCOMPLETE = 0x25,
|
||||
NM_NACK_FILE_NOTAVAIL = 0x26,
|
||||
NM_NACK_FILE_NOTACTIVATE = 0x27,
|
||||
NM_NACK_REQ_NOT_GRANT = 0x28,
|
||||
NM_NACK_WAIT = 0x29,
|
||||
NM_NACK_NOTH_REPORT_EXIST = 0x2a,
|
||||
NM_NACK_MEAS_NOTSUPP = 0x2b,
|
||||
NM_NACK_MEAS_NOTSTART = 0x2c,
|
||||
};
|
||||
|
||||
/* Section 9.4.1 */
|
||||
struct abis_nm_channel {
|
||||
u_int8_t attrib;
|
||||
u_int8_t bts_port;
|
||||
u_int8_t timeslot;
|
||||
u_int8_t subslot;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Siemens BS-11 specific objects in the SienemsHW (0xA5) object class */
|
||||
enum abis_bs11_objtype {
|
||||
BS11_OBJ_ALCO = 0x01,
|
||||
BS11_OBJ_BBSIG = 0x02, /* obj_class: 0,1 */
|
||||
BS11_OBJ_TRX1 = 0x03, /* only DEACTIVATE TRX1 */
|
||||
BS11_OBJ_CCLK = 0x04,
|
||||
BS11_OBJ_GPSU = 0x06,
|
||||
BS11_OBJ_LI = 0x07,
|
||||
BS11_OBJ_PA = 0x09, /* obj_class: 0, 1*/
|
||||
};
|
||||
|
||||
enum abis_bs11_trx_power {
|
||||
BS11_TRX_POWER_GSM_2W = 0x06,
|
||||
BS11_TRX_POWER_GSM_250mW= 0x07,
|
||||
BS11_TRX_POWER_GSM_80mW = 0x08,
|
||||
BS11_TRX_POWER_GSM_30mW = 0x09,
|
||||
BS11_TRX_POWER_DCS_3W = 0x0a,
|
||||
BS11_TRX_POWER_DCS_1W6 = 0x0b,
|
||||
BS11_TRX_POWER_DCS_500mW= 0x0c,
|
||||
BS11_TRX_POWER_DCS_160mW= 0x0d,
|
||||
};
|
||||
|
||||
enum abis_bs11_li_pll_mode {
|
||||
BS11_LI_PLL_LOCKED = 2,
|
||||
BS11_LI_PLL_STANDALONE = 3,
|
||||
};
|
||||
|
||||
enum abis_bs11_line_cfg {
|
||||
BS11_LINE_CFG_STAR = 0x00,
|
||||
BS11_LINE_CFG_MULTIDROP = 0x01,
|
||||
BS11_LINE_CFG_LOOP = 0x02,
|
||||
};
|
||||
|
||||
enum abis_bs11_phase {
|
||||
BS11_STATE_SOFTWARE_RQD = 0x01,
|
||||
BS11_STATE_LOAD_SMU_INTENDED = 0x11,
|
||||
BS11_STATE_LOAD_SMU_SAFETY = 0x21,
|
||||
BS11_STATE_LOAD_FAILED = 0x31,
|
||||
BS11_STATE_LOAD_DIAGNOSTIC = 0x41,
|
||||
BS11_STATE_WARM_UP = 0x51,
|
||||
BS11_STATE_WARM_UP_2 = 0x52,
|
||||
BS11_STATE_WAIT_MIN_CFG = 0x62,
|
||||
BS11_STATE_MAINTENANCE = 0x72,
|
||||
BS11_STATE_LOAD_MBCCU = 0x92,
|
||||
BS11_STATE_WAIT_MIN_CFG_2 = 0xA2,
|
||||
BS11_STATE_NORMAL = 0x03,
|
||||
BS11_STATE_ABIS_LOAD = 0x13,
|
||||
};
|
||||
|
||||
enum abis_nm_ipacc_test_no {
|
||||
NM_IPACC_TESTNO_RLOOP_ANT = 0x01,
|
||||
NM_IPACC_TESTNO_RLOOP_XCVR = 0x02,
|
||||
NM_IPACC_TESTNO_FUNC_OBJ = 0x03,
|
||||
NM_IPACC_TESTNO_CHAN_USAGE = 0x40,
|
||||
NM_IPACC_TESTNO_BCCH_CHAN_USAGE = 0x41,
|
||||
NM_IPACC_TESTNO_FREQ_SYNC = 0x42,
|
||||
NM_IPACC_TESTNO_BCCH_INFO = 0x43,
|
||||
NM_IPACC_TESTNO_TX_BEACON = 0x44,
|
||||
NM_IPACC_TESTNO_SYSINFO_MONITOR = 0x45,
|
||||
NM_IPACC_TESTNO_BCCCH_MONITOR = 0x46,
|
||||
};
|
||||
|
||||
/* first byte after length inside NM_ATT_TEST_REPORT */
|
||||
enum abis_nm_ipacc_test_res {
|
||||
NM_IPACC_TESTRES_SUCCESS = 0,
|
||||
NM_IPACC_TESTRES_TIMEOUT = 1,
|
||||
NM_IPACC_TESTRES_NO_CHANS = 2,
|
||||
NM_IPACC_TESTRES_PARTIAL = 3,
|
||||
NM_IPACC_TESTRES_STOPPED = 4,
|
||||
};
|
||||
|
||||
/* internal IE inside NM_ATT_TEST_REPORT */
|
||||
enum abis_nm_ipacc_testres_ie {
|
||||
NM_IPACC_TR_IE_FREQ_ERR_LIST = 3,
|
||||
NM_IPACC_TR_IE_CHAN_USAGE = 4,
|
||||
NM_IPACC_TR_IE_BCCH_INFO = 6,
|
||||
NM_IPACC_TR_IE_RESULT_DETAILS = 8,
|
||||
NM_IPACC_TR_IE_FREQ_ERR = 18,
|
||||
};
|
||||
|
||||
enum ipac_eie {
|
||||
NM_IPAC_EIE_ARFCN_WHITE = 0x01,
|
||||
NM_IPAC_EIE_ARFCH_BLACK = 0x02,
|
||||
NM_IPAC_EIE_FREQ_ERR_LIST = 0x03,
|
||||
NM_IPAC_EIE_CHAN_USE_LIST = 0x04,
|
||||
NM_IPAC_EIE_BCCH_INFO_TYPE = 0x05,
|
||||
NM_IPAC_EIE_BCCH_INFO = 0x06,
|
||||
/* FIXME */
|
||||
};
|
||||
|
||||
enum ipac_bcch_info_type {
|
||||
IPAC_BINF_RXLEV = (1 << 8),
|
||||
IPAC_BINF_RXQUAL = (1 << 9),
|
||||
IPAC_BINF_FREQ_ERR_QUAL = (1 << 10),
|
||||
IPAC_BINF_FRAME_OFFSET = (1 << 11),
|
||||
IPAC_BINF_FRAME_NR_OFFSET = (1 << 12),
|
||||
IPAC_BINF_BSIC = (1 << 13),
|
||||
IPAC_BINF_CGI = (1 << 14),
|
||||
IPAC_BINF_NEIGH_BA_SI2 = (1 << 15),
|
||||
IPAC_BINF_NEIGH_BA_SI2bis = (1 << 0),
|
||||
IPAC_BINF_NEIGH_BA_SI2ter = (1 << 1),
|
||||
IPAC_BINF_CELL_ALLOC = (1 << 2),
|
||||
};
|
||||
|
||||
struct cell_global_id {
|
||||
uint16_t mcc;
|
||||
uint16_t mnc;
|
||||
uint16_t lac;
|
||||
uint16_t ci;
|
||||
u_int16_t mcc;
|
||||
u_int16_t mnc;
|
||||
u_int16_t lac;
|
||||
u_int16_t ci;
|
||||
};
|
||||
|
||||
/* The BCCH info from an ip.access test, in host byte order
|
||||
@@ -38,20 +696,20 @@ struct cell_global_id {
|
||||
struct ipac_bcch_info {
|
||||
struct llist_head list;
|
||||
|
||||
uint16_t info_type;
|
||||
uint8_t freq_qual;
|
||||
uint16_t arfcn;
|
||||
uint8_t rx_lev;
|
||||
uint8_t rx_qual;
|
||||
u_int16_t info_type;
|
||||
u_int8_t freq_qual;
|
||||
u_int16_t arfcn;
|
||||
u_int8_t rx_lev;
|
||||
u_int8_t rx_qual;
|
||||
int16_t freq_err;
|
||||
uint16_t frame_offset;
|
||||
uint32_t frame_nr_offset;
|
||||
uint8_t bsic;
|
||||
u_int16_t frame_offset;
|
||||
u_int32_t frame_nr_offset;
|
||||
u_int8_t bsic;
|
||||
struct cell_global_id cgi;
|
||||
uint8_t ba_list_si2[16];
|
||||
uint8_t ba_list_si2bis[16];
|
||||
uint8_t ba_list_si2ter[16];
|
||||
uint8_t ca_list_si1[16];
|
||||
u_int8_t ba_list_si2[16];
|
||||
u_int8_t ba_list_si2bis[16];
|
||||
u_int8_t ba_list_si2ter[16];
|
||||
u_int8_t ca_list_si1[16];
|
||||
};
|
||||
|
||||
/* PUBLIC */
|
||||
@@ -66,124 +724,99 @@ struct abis_nm_cfg {
|
||||
int (*sw_act_req)(struct msgb *);
|
||||
};
|
||||
|
||||
struct abis_nm_sw_descr {
|
||||
/* where does it start? how long is it? */
|
||||
const uint8_t *start;
|
||||
size_t len;
|
||||
|
||||
/* the parsed data */
|
||||
const uint8_t *file_id;
|
||||
uint16_t file_id_len;
|
||||
const uint8_t *file_ver;
|
||||
uint16_t file_ver_len;
|
||||
};
|
||||
|
||||
extern int abis_nm_rcvmsg(struct msgb *msg);
|
||||
|
||||
int abis_nm_tlv_parse(struct tlv_parsed *tp, struct gsm_bts *bts, const uint8_t *buf, int len);
|
||||
int abis_nm_tlv_parse(struct tlv_parsed *tp, const u_int8_t *buf, int len);
|
||||
int abis_nm_rx(struct msgb *msg);
|
||||
int abis_nm_opstart(struct gsm_bts *bts, uint8_t obj_class, uint8_t i0, uint8_t i1, uint8_t i2);
|
||||
int abis_nm_chg_adm_state(struct gsm_bts *bts, uint8_t obj_class, uint8_t i0,
|
||||
uint8_t i1, uint8_t i2, enum abis_nm_adm_state adm_state);
|
||||
int abis_nm_establish_tei(struct gsm_bts *bts, uint8_t trx_nr,
|
||||
uint8_t e1_port, uint8_t e1_timeslot, uint8_t e1_subslot,
|
||||
uint8_t tei);
|
||||
int abis_nm_opstart(struct gsm_bts *bts, u_int8_t obj_class, u_int8_t i0, u_int8_t i1, u_int8_t i2);
|
||||
int abis_nm_chg_adm_state(struct gsm_bts *bts, u_int8_t obj_class, u_int8_t i0,
|
||||
u_int8_t i1, u_int8_t i2, enum abis_nm_adm_state adm_state);
|
||||
int abis_nm_establish_tei(struct gsm_bts *bts, u_int8_t trx_nr,
|
||||
u_int8_t e1_port, u_int8_t e1_timeslot, u_int8_t e1_subslot,
|
||||
u_int8_t tei);
|
||||
int abis_nm_conn_terr_sign(struct gsm_bts_trx *trx,
|
||||
uint8_t e1_port, uint8_t e1_timeslot, uint8_t e1_subslot);
|
||||
u_int8_t e1_port, u_int8_t e1_timeslot, u_int8_t e1_subslot);
|
||||
int abis_nm_conn_terr_traf(struct gsm_bts_trx_ts *ts,
|
||||
uint8_t e1_port, uint8_t e1_timeslot,
|
||||
uint8_t e1_subslot);
|
||||
int abis_nm_get_attr(struct gsm_bts *bts, uint8_t obj_class,
|
||||
uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr,
|
||||
uint8_t *attr, uint8_t attr_len);
|
||||
int abis_nm_set_bts_attr(struct gsm_bts *bts, uint8_t *attr, int attr_len);
|
||||
int abis_nm_set_radio_attr(struct gsm_bts_trx *trx, uint8_t *attr, int attr_len);
|
||||
int abis_nm_set_channel_attr(struct gsm_bts_trx_ts *ts, uint8_t chan_comb);
|
||||
int abis_nm_sw_act_req_ack(struct gsm_bts *bts, uint8_t obj_class, uint8_t i1,
|
||||
uint8_t i2, uint8_t i3, int nack, uint8_t *attr, int att_len);
|
||||
int abis_nm_raw_msg(struct gsm_bts *bts, int len, uint8_t *msg);
|
||||
u_int8_t e1_port, u_int8_t e1_timeslot,
|
||||
u_int8_t e1_subslot);
|
||||
int abis_nm_set_bts_attr(struct gsm_bts *bts, u_int8_t *attr, int attr_len);
|
||||
int abis_nm_set_radio_attr(struct gsm_bts_trx *trx, u_int8_t *attr, int attr_len);
|
||||
int abis_nm_set_channel_attr(struct gsm_bts_trx_ts *ts, u_int8_t chan_comb);
|
||||
int abis_nm_sw_act_req_ack(struct gsm_bts *bts, u_int8_t obj_class, u_int8_t i1,
|
||||
u_int8_t i2, u_int8_t i3, int nack, u_int8_t *attr, int att_len);
|
||||
int abis_nm_raw_msg(struct gsm_bts *bts, int len, u_int8_t *msg);
|
||||
int abis_nm_event_reports(struct gsm_bts *bts, int on);
|
||||
int abis_nm_reset_resource(struct gsm_bts *bts);
|
||||
int abis_nm_software_load(struct gsm_bts *bts, int trx_nr, const char *fname,
|
||||
uint8_t win_size, int forced,
|
||||
int abis_nm_software_load(struct gsm_bts *bts, const char *fname,
|
||||
u_int8_t win_size, int forced,
|
||||
gsm_cbfn *cbfn, void *cb_data);
|
||||
int abis_nm_software_load_status(struct gsm_bts *bts);
|
||||
int abis_nm_software_activate(struct gsm_bts *bts, const char *fname,
|
||||
gsm_cbfn *cbfn, void *cb_data);
|
||||
|
||||
int abis_nm_conn_mdrop_link(struct gsm_bts *bts, uint8_t e1_port0, uint8_t ts0,
|
||||
uint8_t e1_port1, uint8_t ts1);
|
||||
int abis_nm_conn_mdrop_link(struct gsm_bts *bts, u_int8_t e1_port0, u_int8_t ts0,
|
||||
u_int8_t e1_port1, u_int8_t ts1);
|
||||
|
||||
int abis_nm_perform_test(struct gsm_bts *bts, uint8_t obj_class,
|
||||
uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr,
|
||||
uint8_t test_nr, uint8_t auton_report, struct msgb *msg);
|
||||
int abis_nm_perform_test(struct gsm_bts *bts, u_int8_t obj_class,
|
||||
u_int8_t bts_nr, u_int8_t trx_nr, u_int8_t ts_nr,
|
||||
u_int8_t test_nr, u_int8_t auton_report,
|
||||
u_int8_t *phys_config, u_int16_t phys_config_len);
|
||||
|
||||
int abis_nm_chcomb4pchan(enum gsm_phys_chan_config pchan);
|
||||
|
||||
/* Siemens / BS-11 specific */
|
||||
int abis_nm_bs11_reset_resource(struct gsm_bts *bts);
|
||||
int abis_nm_bs11_db_transmission(struct gsm_bts *bts, int begin);
|
||||
int abis_nm_bs11_create_object(struct gsm_bts *bts, enum abis_bs11_objtype type,
|
||||
uint8_t idx, uint8_t attr_len, const uint8_t *attr);
|
||||
int abis_nm_bs11_create_envaBTSE(struct gsm_bts *bts, uint8_t idx);
|
||||
int abis_nm_bs11_create_bport(struct gsm_bts *bts, uint8_t idx);
|
||||
u_int8_t idx, u_int8_t attr_len, const u_int8_t *attr);
|
||||
int abis_nm_bs11_create_envaBTSE(struct gsm_bts *bts, u_int8_t idx);
|
||||
int abis_nm_bs11_create_bport(struct gsm_bts *bts, u_int8_t idx);
|
||||
int abis_nm_bs11_delete_object(struct gsm_bts *bts,
|
||||
enum abis_bs11_objtype type, uint8_t idx);
|
||||
int abis_nm_bs11_delete_bport(struct gsm_bts *bts, uint8_t idx);
|
||||
int abis_nm_bs11_conn_oml_tei(struct gsm_bts *bts, uint8_t e1_port,
|
||||
uint8_t e1_timeslot, uint8_t e1_subslot, uint8_t tei);
|
||||
enum abis_bs11_objtype type, u_int8_t idx);
|
||||
int abis_nm_bs11_delete_bport(struct gsm_bts *bts, u_int8_t idx);
|
||||
int abis_nm_bs11_conn_oml_tei(struct gsm_bts *bts, u_int8_t e1_port,
|
||||
u_int8_t e1_timeslot, u_int8_t e1_subslot, u_int8_t tei);
|
||||
int abis_nm_bs11_get_oml_tei_ts(struct gsm_bts *bts);
|
||||
int abis_nm_bs11_get_serno(struct gsm_bts *bts);
|
||||
int abis_nm_bs11_set_trx_power(struct gsm_bts_trx *trx, uint8_t level);
|
||||
int abis_nm_bs11_set_trx_power(struct gsm_bts_trx *trx, u_int8_t level);
|
||||
int abis_nm_bs11_get_trx_power(struct gsm_bts_trx *trx);
|
||||
int abis_nm_bs11_logon(struct gsm_bts *bts, uint8_t level, const char *name, int on);
|
||||
int abis_nm_bs11_factory_logon(struct gsm_bts *bts, int on);
|
||||
int abis_nm_bs11_infield_logon(struct gsm_bts *bts, int on);
|
||||
int abis_nm_bs11_set_trx1_pw(struct gsm_bts *bts, const char *password);
|
||||
int abis_nm_bs11_set_pll_locked(struct gsm_bts *bts, int locked);
|
||||
int abis_nm_bs11_get_pll_mode(struct gsm_bts *bts);
|
||||
int abis_nm_bs11_set_pll(struct gsm_bts *bts, int value);
|
||||
int abis_nm_bs11_get_cclk(struct gsm_bts *bts);
|
||||
int abis_nm_bs11_get_state(struct gsm_bts *bts);
|
||||
int abis_nm_bs11_load_swl(struct gsm_bts *bts, const char *fname,
|
||||
uint8_t win_size, int forced, gsm_cbfn *cbfn);
|
||||
u_int8_t win_size, int forced, gsm_cbfn *cbfn);
|
||||
int abis_nm_bs11_set_ext_time(struct gsm_bts *bts);
|
||||
int abis_nm_bs11_get_bport_line_cfg(struct gsm_bts *bts, uint8_t bport);
|
||||
int abis_nm_bs11_set_bport_line_cfg(struct gsm_bts *bts, uint8_t bport, enum abis_bs11_line_cfg line_cfg);
|
||||
int abis_nm_bs11_set_bport_line_cfg(struct gsm_bts *bts, u_int8_t bport, enum abis_bs11_line_cfg line_cfg);
|
||||
int abis_nm_bs11_bsc_disconnect(struct gsm_bts *bts, int reconnect);
|
||||
int abis_nm_bs11_restart(struct gsm_bts *bts);
|
||||
|
||||
/* ip.access nanoBTS specific commands */
|
||||
int abis_nm_ipaccess_msg(struct gsm_bts *bts, uint8_t msg_type,
|
||||
uint8_t obj_class, uint8_t bts_nr,
|
||||
uint8_t trx_nr, uint8_t ts_nr,
|
||||
uint8_t *attr, int attr_len);
|
||||
int abis_nm_ipaccess_set_nvattr(struct gsm_bts_trx *trx, uint8_t *attr,
|
||||
int abis_nm_ipaccess_msg(struct gsm_bts *bts, u_int8_t msg_type,
|
||||
u_int8_t obj_class, u_int8_t bts_nr,
|
||||
u_int8_t trx_nr, u_int8_t ts_nr,
|
||||
u_int8_t *attr, int attr_len);
|
||||
int abis_nm_ipaccess_set_nvattr(struct gsm_bts *bts, u_int8_t *attr,
|
||||
int attr_len);
|
||||
int abis_nm_ipaccess_restart(struct gsm_bts_trx *trx);
|
||||
int abis_nm_ipaccess_set_attr(struct gsm_bts *bts, uint8_t obj_class,
|
||||
uint8_t bts_nr, uint8_t trx_nr, uint8_t ts_nr,
|
||||
uint8_t *attr, uint8_t attr_len);
|
||||
int abis_nm_ipaccess_restart(struct gsm_bts *bts);
|
||||
int abis_nm_ipaccess_set_attr(struct gsm_bts *bts, u_int8_t obj_class,
|
||||
u_int8_t bts_nr, u_int8_t trx_nr, u_int8_t ts_nr,
|
||||
u_int8_t *attr, u_int8_t attr_len);
|
||||
int abis_nm_ipaccess_rsl_connect(struct gsm_bts_trx *trx,
|
||||
uint32_t ip, uint16_t port, uint8_t stream);
|
||||
void abis_nm_ipaccess_cgi(uint8_t *buf, struct gsm_bts *bts);
|
||||
int ipac_parse_bcch_info(struct ipac_bcch_info *binf, uint8_t *buf);
|
||||
const char *ipacc_testres_name(uint8_t res);
|
||||
u_int32_t ip, u_int16_t port, u_int8_t stream);
|
||||
int ipac_parse_bcch_info(struct ipac_bcch_info *binf, u_int8_t *buf);
|
||||
const char *ipacc_testres_name(u_int8_t res);
|
||||
|
||||
/* Functions calling into other code parts */
|
||||
int nm_is_running(struct gsm_nm_state *s);
|
||||
|
||||
int abis_nm_vty_init(void);
|
||||
|
||||
void abis_nm_clear_queue(struct gsm_bts *bts);
|
||||
|
||||
int _abis_nm_sendmsg(struct msgb *msg);
|
||||
|
||||
void abis_nm_queue_send_next(struct gsm_bts *bts); /* for bs11_config. */
|
||||
|
||||
int abis_nm_parse_sw_config(const uint8_t *data, const size_t len,
|
||||
struct abis_nm_sw_descr *res, const int res_len);
|
||||
int abis_nm_select_newest_sw(const struct abis_nm_sw_descr *sw, const size_t len);
|
||||
|
||||
/* Helper functions for updating attributes */
|
||||
int abis_nm_update_max_power_red(struct gsm_bts_trx *trx);
|
||||
enum nm_evt {
|
||||
EVT_STATECHG_OPER,
|
||||
EVT_STATECHG_ADM,
|
||||
};
|
||||
int nm_state_event(enum nm_evt evt, u_int8_t obj_class, void *obj,
|
||||
struct gsm_nm_state *old_state, struct gsm_nm_state *new_state);
|
||||
|
||||
const char *nm_opstate_name(u_int8_t os);
|
||||
const char *nm_avail_name(u_int8_t avail);
|
||||
#endif /* _NM_H */
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
#ifndef OPENBSC_ABIS_OM2K_H
|
||||
#define OPENBSC_ABIS_OM2K_H
|
||||
/* Ericsson RBS 2xxx GSM O&M (OM2000) messages on the A-bis interface
|
||||
* implemented based on protocol trace analysis, no formal documentation */
|
||||
|
||||
/* (C) 2010-2011 by Harald Welte <laforge@gnumonks.org>
|
||||
*
|
||||
* All Rights Reserved
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
enum abis_om2k_mo_cls {
|
||||
OM2K_MO_CLS_TRXC = 0x01,
|
||||
OM2K_MO_CLS_TS = 0x03,
|
||||
OM2K_MO_CLS_TF = 0x04,
|
||||
OM2K_MO_CLS_IS = 0x05,
|
||||
OM2K_MO_CLS_CON = 0x06,
|
||||
OM2K_MO_CLS_DP = 0x07,
|
||||
OM2K_MO_CLS_CF = 0x0a,
|
||||
OM2K_MO_CLS_TX = 0x0b,
|
||||
OM2K_MO_CLS_RX = 0x0c,
|
||||
};
|
||||
|
||||
enum om2k_mo_state {
|
||||
OM2K_MO_S_RESET = 0,
|
||||
OM2K_MO_S_STARTED,
|
||||
OM2K_MO_S_ENABLED,
|
||||
OM2K_MO_S_DISABLED,
|
||||
};
|
||||
|
||||
struct abis_om2k_mo {
|
||||
uint8_t class;
|
||||
uint8_t bts;
|
||||
uint8_t assoc_so;
|
||||
uint8_t inst;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* on-wire format for IS conn group */
|
||||
struct om2k_is_conn_grp {
|
||||
uint16_t icp1;
|
||||
uint16_t icp2;
|
||||
uint8_t cont_idx;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* internal data formant for IS conn group */
|
||||
struct is_conn_group {
|
||||
struct llist_head list;
|
||||
uint16_t icp1;
|
||||
uint16_t icp2;
|
||||
uint8_t ci;
|
||||
};
|
||||
|
||||
extern const struct abis_om2k_mo om2k_mo_cf;
|
||||
extern const struct abis_om2k_mo om2k_mo_is;
|
||||
extern const struct abis_om2k_mo om2k_mo_con;
|
||||
extern const struct abis_om2k_mo om2k_mo_tf;
|
||||
|
||||
extern const struct value_string om2k_mo_class_short_vals[];
|
||||
|
||||
int abis_om2k_rcvmsg(struct msgb *msg);
|
||||
|
||||
extern const struct abis_om2k_mo om2k_mo_cf;
|
||||
|
||||
int abis_om2k_tx_reset_cmd(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
|
||||
int abis_om2k_tx_start_req(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
|
||||
int abis_om2k_tx_status_req(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
|
||||
int abis_om2k_tx_connect_cmd(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
|
||||
int abis_om2k_tx_disconnect_cmd(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
|
||||
int abis_om2k_tx_enable_req(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
|
||||
int abis_om2k_tx_disable_req(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
|
||||
int abis_om2k_tx_test_req(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
|
||||
int abis_om2k_tx_op_info(struct gsm_bts *bts, const struct abis_om2k_mo *mo,
|
||||
uint8_t operational);
|
||||
int abis_om2k_tx_is_conf_req(struct gsm_bts *bts);
|
||||
int abis_om2k_tx_tf_conf_req(struct gsm_bts *bts);
|
||||
int abis_om2k_tx_rx_conf_req(struct gsm_bts_trx *trx);
|
||||
int abis_om2k_tx_tx_conf_req(struct gsm_bts_trx *trx);
|
||||
int abis_om2k_tx_ts_conf_req(struct gsm_bts_trx_ts *ts);
|
||||
|
||||
int abis_om2k_vty_init(void);
|
||||
|
||||
struct vty;
|
||||
void abis_om2k_config_write_bts(struct vty *vty, struct gsm_bts *bts);
|
||||
|
||||
#endif /* OPENBCS_ABIS_OM2K_H */
|
||||
@@ -5,105 +5,563 @@
|
||||
* All Rights Reserved
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _RSL_H
|
||||
#define _RSL_H
|
||||
|
||||
#include <osmocom/gsm/protocol/gsm_08_58.h>
|
||||
struct abis_rsl_common_hdr {
|
||||
u_int8_t msg_discr;
|
||||
u_int8_t msg_type;
|
||||
u_int8_t data[0];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
#include <osmocom/core/msgb.h>
|
||||
/* Chapter 8.3 */
|
||||
struct abis_rsl_rll_hdr {
|
||||
struct abis_rsl_common_hdr c;
|
||||
u_int8_t ie_chan;
|
||||
u_int8_t chan_nr;
|
||||
u_int8_t ie_link_id;
|
||||
u_int8_t link_id;
|
||||
u_int8_t data[0];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
struct gsm_bts;
|
||||
struct gsm_lchan;
|
||||
struct gsm_subscriber;
|
||||
struct gsm_bts_trx_ts;
|
||||
/* Chapter 8.3 and 8.4 */
|
||||
struct abis_rsl_dchan_hdr {
|
||||
struct abis_rsl_common_hdr c;
|
||||
u_int8_t ie_chan;
|
||||
u_int8_t chan_nr;
|
||||
u_int8_t data[0];
|
||||
} __attribute__ ((packed));
|
||||
|
||||
|
||||
int rsl_bcch_info(struct gsm_bts_trx *trx, uint8_t type,
|
||||
const uint8_t *data, int len);
|
||||
int rsl_sacch_filling(struct gsm_bts_trx *trx, uint8_t type,
|
||||
const uint8_t *data, int len);
|
||||
int rsl_chan_activate(struct gsm_bts_trx *trx, uint8_t chan_nr,
|
||||
uint8_t act_type,
|
||||
/* Chapter 9.1 */
|
||||
#define ABIS_RSL_MDISC_RLL 0x02
|
||||
#define ABIS_RSL_MDISC_DED_CHAN 0x08
|
||||
#define ABIS_RSL_MDISC_COM_CHAN 0x0c
|
||||
#define ABIS_RSL_MDISC_TRX 0x10
|
||||
#define ABIS_RSL_MDISC_LOC 0x20
|
||||
#define ABIS_RSL_MDISC_IPACCESS 0x7e
|
||||
#define ABIS_RSL_MDISC_TRANSP 0x01
|
||||
|
||||
#define ABIS_RSL_MDISC_IS_TRANSP(x) (x & 0x01)
|
||||
|
||||
/* Chapter 9.1 */
|
||||
enum abis_rsl_msgtype {
|
||||
/* Radio Link Layer Management */
|
||||
RSL_MT_DATA_REQ = 0x01,
|
||||
RSL_MT_DATA_IND,
|
||||
RSL_MT_ERROR_IND,
|
||||
RSL_MT_EST_REQ,
|
||||
RSL_MT_EST_CONF,
|
||||
RSL_MT_EST_IND,
|
||||
RSL_MT_REL_REQ,
|
||||
RSL_MT_REL_CONF,
|
||||
RSL_MT_REL_IND,
|
||||
RSL_MT_UNIT_DATA_REQ,
|
||||
RSL_MT_UNIT_DATA_IND, /* 0x0b */
|
||||
|
||||
/* Common Channel Management / TRX Management */
|
||||
RSL_MT_BCCH_INFO = 0x11,
|
||||
RSL_MT_CCCH_LOAD_IND,
|
||||
RSL_MT_CHAN_RQD,
|
||||
RSL_MT_DELETE_IND,
|
||||
RSL_MT_PAGING_CMD,
|
||||
RSL_MT_IMMEDIATE_ASSIGN_CMD,
|
||||
RSL_MT_SMS_BC_REQ,
|
||||
/* empty */
|
||||
RSL_MT_RF_RES_IND = 0x19,
|
||||
RSL_MT_SACCH_FILL,
|
||||
RSL_MT_OVERLOAD,
|
||||
RSL_MT_ERROR_REPORT,
|
||||
RSL_MT_SMS_BC_CMD,
|
||||
RSL_MT_CBCH_LOAD_IND,
|
||||
RSL_MT_NOT_CMD, /* 0x1f */
|
||||
|
||||
/* Dedicate Channel Management */
|
||||
RSL_MT_CHAN_ACTIV = 0x21,
|
||||
RSL_MT_CHAN_ACTIV_ACK,
|
||||
RSL_MT_CHAN_ACTIV_NACK,
|
||||
RSL_MT_CONN_FAIL,
|
||||
RSL_MT_DEACTIVATE_SACCH,
|
||||
RSL_MT_ENCR_CMD,
|
||||
RSL_MT_HANDO_DET,
|
||||
RSL_MT_MEAS_RES,
|
||||
RSL_MT_MODE_MODIFY_REQ,
|
||||
RSL_MT_MODE_MODIFY_ACK,
|
||||
RSL_MT_MODE_MODIFY_NACK,
|
||||
RSL_MT_PHY_CONTEXT_REQ,
|
||||
RSL_MT_PHY_CONTEXT_CONF,
|
||||
RSL_MT_RF_CHAN_REL,
|
||||
RSL_MT_MS_POWER_CONTROL,
|
||||
RSL_MT_BS_POWER_CONTROL, /* 0x30 */
|
||||
RSL_MT_PREPROC_CONFIG,
|
||||
RSL_MT_PREPROC_MEAS_RES,
|
||||
RSL_MT_RF_CHAN_REL_ACK,
|
||||
RSL_MT_SACCH_INFO_MODIFY,
|
||||
RSL_MT_TALKER_DET,
|
||||
RSL_MT_LISTENER_DET,
|
||||
RSL_MT_REMOTE_CODEC_CONF_REP,
|
||||
RSL_MT_RTD_REP,
|
||||
RSL_MT_PRE_HANDO_NOTIF,
|
||||
RSL_MT_MR_CODEC_MOD_REQ,
|
||||
RSL_MT_MR_CODEC_MOD_ACK,
|
||||
RSL_MT_MR_CODEC_MOD_NACK,
|
||||
RSL_MT_MR_CODEC_MOD_PER,
|
||||
RSL_MT_TFO_REP,
|
||||
RSL_MT_TFO_MOD_REQ, /* 0x3f */
|
||||
RSL_MT_LOCATION_INFO = 0x41,
|
||||
|
||||
/* ip.access specific RSL message types */
|
||||
RSL_MT_IPAC_DIR_RETR_ENQ = 0x40,
|
||||
RSL_MT_IPAC_PDCH_ACT = 0x48,
|
||||
RSL_MT_IPAC_PDCH_ACT_ACK,
|
||||
RSL_MT_IPAC_PDCH_ACT_NACK,
|
||||
RSL_MT_IPAC_PDCH_DEACT = 0x4b,
|
||||
RSL_MT_IPAC_PDCH_DEACT_ACK,
|
||||
RSL_MT_IPAC_PDCH_DEACT_NACK,
|
||||
RSL_MT_IPAC_CONNECT_MUX = 0x50,
|
||||
RSL_MT_IPAC_CONNECT_MUX_ACK,
|
||||
RSL_MT_IPAC_CONNECT_MUX_NACK,
|
||||
RSL_MT_IPAC_BIND_MUX = 0x53,
|
||||
RSL_MT_IPAC_BIND_MUX_ACK,
|
||||
RSL_MT_IPAC_BIND_MUX_NACK,
|
||||
RSL_MT_IPAC_DISC_MUX = 0x56,
|
||||
RSL_MT_IPAC_DISC_MUX_ACK,
|
||||
RSL_MT_IPAC_DISC_MUX_NACK,
|
||||
RSL_MT_IPAC_CRCX = 0x70, /* Bind to local BTS RTP port */
|
||||
RSL_MT_IPAC_CRCX_ACK,
|
||||
RSL_MT_IPAC_CRCX_NACK,
|
||||
RSL_MT_IPAC_MDCX = 0x73,
|
||||
RSL_MT_IPAC_MDCX_ACK,
|
||||
RSL_MT_IPAC_MDCX_NACK,
|
||||
RSL_MT_IPAC_DLCX_IND = 0x76,
|
||||
RSL_MT_IPAC_DLCX = 0x77,
|
||||
RSL_MT_IPAC_DLCX_ACK,
|
||||
RSL_MT_IPAC_DLCX_NACK,
|
||||
};
|
||||
|
||||
/* Siemens vendor-specific */
|
||||
enum abis_rsl_msgtype_siemens {
|
||||
RSL_MT_SIEMENS_MRPCI = 0x41,
|
||||
RSL_MT_SIEMENS_INTRAC_HO_COND_IND = 0x42,
|
||||
RSL_MT_SIEMENS_INTERC_HO_COND_IND = 0x43,
|
||||
RSL_MT_SIEMENS_FORCED_HO_REQ = 0x44,
|
||||
RSL_MT_SIEMENS_PREF_AREA_REQ = 0x45,
|
||||
RSL_MT_SIEMENS_PREF_AREA = 0x46,
|
||||
RSL_MT_SIEMENS_START_TRACE = 0x47,
|
||||
RSL_MT_SIEMENS_START_TRACE_ACK = 0x48,
|
||||
RSL_MT_SIEMENS_STOP_TRACE = 0x49,
|
||||
RSL_MT_SIEMENS_TRMR = 0x4a,
|
||||
RSL_MT_SIEMENS_HO_FAIL_IND = 0x4b,
|
||||
RSL_MT_SIEMENS_STOP_TRACE_ACK = 0x4c,
|
||||
RSL_MT_SIEMENS_UPLF = 0x4d,
|
||||
RSL_MT_SIEMENS_UPLB = 0x4e,
|
||||
RSL_MT_SIEMENS_SET_SYS_INFO_10 = 0x4f,
|
||||
RSL_MT_SIEMENS_MODIF_COND_IND = 0x50,
|
||||
};
|
||||
|
||||
/* Chapter 9.3 */
|
||||
enum abis_rsl_ie {
|
||||
RSL_IE_CHAN_NR = 0x01,
|
||||
RSL_IE_LINK_IDENT,
|
||||
RSL_IE_ACT_TYPE,
|
||||
RSL_IE_BS_POWER,
|
||||
RSL_IE_CHAN_IDENT,
|
||||
RSL_IE_CHAN_MODE,
|
||||
RSL_IE_ENCR_INFO,
|
||||
RSL_IE_FRAME_NUMBER,
|
||||
RSL_IE_HANDO_REF,
|
||||
RSL_IE_L1_INFO,
|
||||
RSL_IE_L3_INFO,
|
||||
RSL_IE_MS_IDENTITY,
|
||||
RSL_IE_MS_POWER,
|
||||
RSL_IE_PAGING_GROUP,
|
||||
RSL_IE_PAGING_LOAD,
|
||||
RSL_IE_PYHS_CONTEXT = 0x10,
|
||||
RSL_IE_ACCESS_DELAY,
|
||||
RSL_IE_RACH_LOAD,
|
||||
RSL_IE_REQ_REFERENCE,
|
||||
RSL_IE_RELEASE_MODE,
|
||||
RSL_IE_RESOURCE_INFO,
|
||||
RSL_IE_RLM_CAUSE,
|
||||
RSL_IE_STARTNG_TIME,
|
||||
RSL_IE_TIMING_ADVANCE,
|
||||
RSL_IE_UPLINK_MEAS,
|
||||
RSL_IE_CAUSE,
|
||||
RSL_IE_MEAS_RES_NR,
|
||||
RSL_IE_MSG_ID,
|
||||
/* reserved */
|
||||
RSL_IE_SYSINFO_TYPE = 0x1e,
|
||||
RSL_IE_MS_POWER_PARAM,
|
||||
RSL_IE_BS_POWER_PARAM,
|
||||
RSL_IE_PREPROC_PARAM,
|
||||
RSL_IE_PREPROC_MEAS,
|
||||
RSL_IE_IMM_ASS_INFO, /* Phase 1 (3.6.0), later Full below */
|
||||
RSL_IE_SMSCB_INFO = 0x24,
|
||||
RSL_IE_MS_TIMING_OFFSET,
|
||||
RSL_IE_ERR_MSG,
|
||||
RSL_IE_FULL_BCCH_INFO,
|
||||
RSL_IE_CHAN_NEEDED,
|
||||
RSL_IE_CB_CMD_TYPE,
|
||||
RSL_IE_SMSCB_MSG,
|
||||
RSL_IE_FULL_IMM_ASS_INFO,
|
||||
RSL_IE_SACCH_INFO,
|
||||
RSL_IE_CBCH_LOAD_INFO,
|
||||
RSL_IE_SMSCB_CHAN_INDICATOR,
|
||||
RSL_IE_GROUP_CALL_REF,
|
||||
RSL_IE_CHAN_DESC = 0x30,
|
||||
RSL_IE_NCH_DRX_INFO,
|
||||
RSL_IE_CMD_INDICATOR,
|
||||
RSL_IE_EMLPP_PRIO,
|
||||
RSL_IE_UIC,
|
||||
RSL_IE_MAIN_CHAN_REF,
|
||||
RSL_IE_MR_CONFIG,
|
||||
RSL_IE_MR_CONTROL,
|
||||
RSL_IE_SUP_CODEC_TYPES,
|
||||
RSL_IE_CODEC_CONFIG,
|
||||
RSL_IE_RTD,
|
||||
RSL_IE_TFO_STATUS,
|
||||
RSL_IE_LLP_APDU,
|
||||
/* Siemens vendor-specific */
|
||||
RSL_IE_SIEMENS_MRPCI = 0x40,
|
||||
RSL_IE_SIEMENS_PREF_AREA_TYPE = 0x43,
|
||||
RSL_IE_SIEMENS_ININ_CELL_HO_PAR = 0x45,
|
||||
RSL_IE_SIEMENS_TRACE_REF_NR = 0x46,
|
||||
RSL_IE_SIEMENS_INT_TRACE_IDX = 0x47,
|
||||
RSL_IE_SIEMENS_L2_HDR_INFO = 0x48,
|
||||
RSL_IE_SIEMENS_HIGHEST_RATE = 0x4e,
|
||||
RSL_IE_SIEMENS_SUGGESTED_RATE = 0x4f,
|
||||
|
||||
/* ip.access */
|
||||
RSL_IE_IPAC_SRTP_CONFIG = 0xe0,
|
||||
RSL_IE_IPAC_PROXY_UDP = 0xe1,
|
||||
RSL_IE_IPAC_BSCMPL_TOUT = 0xe2,
|
||||
RSL_IE_IPAC_REMOTE_IP = 0xf0,
|
||||
RSL_IE_IPAC_REMOTE_PORT = 0xf1,
|
||||
RSL_IE_IPAC_RTP_PAYLOAD = 0xf2,
|
||||
RSL_IE_IPAC_LOCAL_PORT = 0xf3,
|
||||
RSL_IE_IPAC_SPEECH_MODE = 0xf4,
|
||||
RSL_IE_IPAC_LOCAL_IP = 0xf5,
|
||||
RSL_IE_IPAC_CONN_STAT = 0xf6,
|
||||
RSL_IE_IPAC_HO_C_PARMS = 0xf7,
|
||||
RSL_IE_IPAC_CONN_ID = 0xf8,
|
||||
RSL_IE_IPAC_RTP_CSD_FMT = 0xf9,
|
||||
RSL_IE_IPAC_RTP_JIT_BUF = 0xfa,
|
||||
RSL_IE_IPAC_RTP_COMPR = 0xfb,
|
||||
RSL_IE_IPAC_RTP_PAYLOAD2= 0xfc,
|
||||
RSL_IE_IPAC_RTP_MPLEX = 0xfd,
|
||||
RSL_IE_IPAC_RTP_MPLEX_ID= 0xfe,
|
||||
};
|
||||
|
||||
/* Chapter 9.3.1 */
|
||||
#define RSL_CHAN_NR_MASK 0xf8
|
||||
#define RSL_CHAN_Bm_ACCHs 0x08
|
||||
#define RSL_CHAN_Lm_ACCHs 0x10 /* .. 0x18 */
|
||||
#define RSL_CHAN_SDCCH4_ACCH 0x20 /* .. 0x38 */
|
||||
#define RSL_CHAN_SDCCH8_ACCH 0x40 /* ...0x78 */
|
||||
#define RSL_CHAN_BCCH 0x80
|
||||
#define RSL_CHAN_RACH 0x88
|
||||
#define RSL_CHAN_PCH_AGCH 0x90
|
||||
|
||||
/* Chapter 9.3.3 */
|
||||
#define RSL_ACT_TYPE_INITIAL 0x00
|
||||
#define RSL_ACT_TYPE_REACT 0x80
|
||||
#define RSL_ACT_INTRA_IMM_ASS 0x00
|
||||
#define RSL_ACT_INTRA_NORM_ASS 0x01
|
||||
#define RSL_ACT_INTER_ASYNC 0x02
|
||||
#define RSL_ACT_INTER_SYNC 0x03
|
||||
#define RSL_ACT_SECOND_ADD 0x04
|
||||
#define RSL_ACT_SECOND_MULTI 0x05
|
||||
|
||||
/* Chapter 9.3.6 */
|
||||
struct rsl_ie_chan_mode {
|
||||
u_int8_t dtx_dtu;
|
||||
u_int8_t spd_ind;
|
||||
u_int8_t chan_rt;
|
||||
u_int8_t chan_rate;
|
||||
} __attribute__ ((packed));
|
||||
#define RSL_CMOD_DTXu 0x01 /* uplink */
|
||||
#define RSL_CMOD_DTXd 0x02 /* downlink */
|
||||
enum rsl_cmod_spd {
|
||||
RSL_CMOD_SPD_SPEECH = 0x01,
|
||||
RSL_CMOD_SPD_DATA = 0x02,
|
||||
RSL_CMOD_SPD_SIGN = 0x03,
|
||||
};
|
||||
#define RSL_CMOD_CRT_SDCCH 0x01
|
||||
#define RSL_CMOD_CRT_TCH_Bm 0x08 /* full-rate */
|
||||
#define RSL_CMOD_CRT_TCH_Lm 0x09 /* half-rate */
|
||||
/* FIXME: More CRT types */
|
||||
/* Speech */
|
||||
#define RSL_CMOD_SP_GSM1 0x01
|
||||
#define RSL_CMOD_SP_GSM2 0x11
|
||||
#define RSL_CMOD_SP_GSM3 0x21
|
||||
/* Data */
|
||||
#define RSL_CMOD_SP_NT_14k5 0x58
|
||||
#define RSL_CMOD_SP_NT_12k0 0x50
|
||||
#define RSL_CMOD_SP_NT_6k0 0x51
|
||||
|
||||
/* Chapter 9.3.5 */
|
||||
struct rsl_ie_chan_ident {
|
||||
/* GSM 04.08 10.5.2.5 */
|
||||
struct {
|
||||
u_int8_t iei;
|
||||
u_int8_t chan_nr; /* enc_chan_nr */
|
||||
u_int8_t oct3;
|
||||
u_int8_t oct4;
|
||||
} chan_desc;
|
||||
#if 0 /* spec says we need this but Abissim doesn't use it */
|
||||
struct {
|
||||
u_int8_t tag;
|
||||
u_int8_t len;
|
||||
} mobile_alloc;
|
||||
#endif
|
||||
} __attribute__ ((packed));
|
||||
|
||||
/* Chapter 9.3.22 */
|
||||
#define RLL_CAUSE_T200_EXPIRED 0x01
|
||||
#define RLL_CAUSE_REEST_REQ 0x02
|
||||
#define RLL_CAUSE_UNSOL_UA_RESP 0x03
|
||||
#define RLL_CAUSE_UNSOL_DM_RESP 0x04
|
||||
#define RLL_CAUSE_UNSOL_DM_RESP_MF 0x05
|
||||
#define RLL_CAUSE_UNSOL_SPRV_RESP 0x06
|
||||
#define RLL_CAUSE_SEQ_ERR 0x07
|
||||
#define RLL_CAUSE_UFRM_INC_PARAM 0x08
|
||||
#define RLL_CAUSE_SFRM_INC_PARAM 0x09
|
||||
#define RLL_CAUSE_IFRM_INC_MBITS 0x0a
|
||||
#define RLL_CAUSE_IFRM_INC_LEN 0x0b
|
||||
#define RLL_CAUSE_FRM_UNIMPL 0x0c
|
||||
#define RLL_CAUSE_SABM_MF 0x0d
|
||||
#define RLL_CAUSE_SABM_INFO_NOTALL 0x0e
|
||||
|
||||
/* Chapter 9.3.26 */
|
||||
#define RSL_ERRCLS_NORMAL 0x00
|
||||
#define RSL_ERRCLS_RESOURCE_UNAVAIL 0x20
|
||||
#define RSL_ERRCLS_SERVICE_UNAVAIL 0x30
|
||||
#define RSL_ERRCLS_SERVICE_UNIMPL 0x40
|
||||
#define RSL_ERRCLS_INVAL_MSG 0x50
|
||||
#define RSL_ERRCLS_PROTO_ERROR 0x60
|
||||
#define RSL_ERRCLS_INTERWORKING 0x70
|
||||
|
||||
/* normal event */
|
||||
#define RSL_ERR_RADIO_IF_FAIL 0x00
|
||||
#define RSL_ERR_RADIO_LINK_FAIL 0x01
|
||||
#define RSL_ERR_HANDOVER_ACC_FAIL 0x02
|
||||
#define RSL_ERR_TALKER_ACC_FAIL 0x03
|
||||
#define RSL_ERR_OM_INTERVENTION 0x07
|
||||
#define RSL_ERR_NORMAL_UNSPEC 0x0f
|
||||
#define RSL_ERR_T_MSRFPCI_EXP 0x18
|
||||
/* resource unavailable */
|
||||
#define RSL_ERR_EQUIPMENT_FAIL 0x20
|
||||
#define RSL_ERR_RR_UNAVAIL 0x21
|
||||
#define RSL_ERR_TERR_CH_FAIL 0x22
|
||||
#define RSL_ERR_CCCH_OVERLOAD 0x23
|
||||
#define RSL_ERR_ACCH_OVERLOAD 0x24
|
||||
#define RSL_ERR_PROCESSOR_OVERLOAD 0x25
|
||||
#define RSL_ERR_RES_UNAVAIL 0x2f
|
||||
/* service or option not available */
|
||||
#define RSL_ERR_TRANSC_UNAVAIL 0x30
|
||||
#define RSL_ERR_SERV_OPT_UNAVAIL 0x3f
|
||||
/* service or option not implemented */
|
||||
#define RSL_ERR_ENCR_UNIMPL 0x40
|
||||
#define RSL_ERR_SERV_OPT_UNIMPL 0x4f
|
||||
/* invalid message */
|
||||
#define RSL_ERR_RCH_ALR_ACTV_ALLOC 0x50
|
||||
#define RSL_ERR_INVALID_MESSAGE 0x5f
|
||||
/* protocol error */
|
||||
#define RSL_ERR_MSG_DISCR 0x60
|
||||
#define RSL_ERR_MSG_TYPE 0x61
|
||||
#define RSL_ERR_MSG_SEQ 0x62
|
||||
#define RSL_ERR_IE_ERROR 0x63
|
||||
#define RSL_ERR_MAND_IE_ERROR 0x64
|
||||
#define RSL_ERR_OPT_IE_ERROR 0x65
|
||||
#define RSL_ERR_IE_NONEXIST 0x66
|
||||
#define RSL_ERR_IE_LENGTH 0x67
|
||||
#define RSL_ERR_IE_CONTENT 0x68
|
||||
#define RSL_ERR_PROTO 0x6f
|
||||
/* interworking */
|
||||
#define RSL_ERR_INTERWORKING 0x7f
|
||||
|
||||
/* Chapter 9.3.30 */
|
||||
#define RSL_SYSTEM_INFO_8 0x00
|
||||
#define RSL_SYSTEM_INFO_1 0x01
|
||||
#define RSL_SYSTEM_INFO_2 0x02
|
||||
#define RSL_SYSTEM_INFO_3 0x03
|
||||
#define RSL_SYSTEM_INFO_4 0x04
|
||||
#define RSL_SYSTEM_INFO_5 0x05
|
||||
#define RSL_SYSTEM_INFO_6 0x06
|
||||
#define RSL_SYSTEM_INFO_7 0x07
|
||||
#define RSL_SYSTEM_INFO_16 0x08
|
||||
#define RSL_SYSTEM_INFO_17 0x09
|
||||
#define RSL_SYSTEM_INFO_2bis 0x0a
|
||||
#define RSL_SYSTEM_INFO_2ter 0x0b
|
||||
#define RSL_SYSTEM_INFO_5bis 0x0d
|
||||
#define RSL_SYSTEM_INFO_5ter 0x0e
|
||||
#define RSL_SYSTEM_INFO_10 0x0f
|
||||
#define REL_EXT_MEAS_ORDER 0x47
|
||||
#define RSL_MEAS_INFO 0x48
|
||||
#define RSL_SYSTEM_INFO_13 0x28
|
||||
#define RSL_SYSTEM_INFO_2quater 0x29
|
||||
#define RSL_SYSTEM_INFO_9 0x2a
|
||||
#define RSL_SYSTEM_INFO_18 0x2b
|
||||
#define RSL_SYSTEM_INFO_19 0x2c
|
||||
#define RSL_SYSTEM_INFO_20 0x2d
|
||||
|
||||
/* Chapter 9.3.40 */
|
||||
#define RSL_CHANNEED_ANY 0x00
|
||||
#define RSL_CHANNEED_SDCCH 0x01
|
||||
#define RSL_CHANNEED_TCH_F 0x02
|
||||
#define RSL_CHANNEED_TCH_ForH 0x03
|
||||
|
||||
/* Chapter 3.3.2.3 Brocast control channel */
|
||||
/* CCCH-CONF, NC is not combined */
|
||||
#define RSL_BCCH_CCCH_CONF_1_NC 0x00
|
||||
#define RSL_BCCH_CCCH_CONF_1_C 0x01
|
||||
#define RSL_BCCH_CCCH_CONF_2_NC 0x02
|
||||
#define RSL_BCCH_CCCH_CONF_3_NC 0x04
|
||||
#define RSL_BCCH_CCCH_CONF_4_NC 0x06
|
||||
|
||||
/* BS-PA-MFRMS */
|
||||
#define RSL_BS_PA_MFRMS_2 0x00
|
||||
#define RSL_BS_PA_MFRMS_3 0x01
|
||||
#define RSL_BS_PA_MFRMS_4 0x02
|
||||
#define RSL_BS_PA_MFRMS_5 0x03
|
||||
#define RSL_BS_PA_MFRMS_6 0x04
|
||||
#define RSL_BS_PA_MFRMS_7 0x05
|
||||
#define RSL_BS_PA_MFRMS_8 0x06
|
||||
#define RSL_BS_PA_MFRMS_9 0x07
|
||||
|
||||
/* RSL_IE_IPAC_RTP_PAYLOAD[2] */
|
||||
enum rsl_ipac_rtp_payload {
|
||||
RSL_IPAC_RTP_GSM = 1,
|
||||
RSL_IPAC_RTP_EFR,
|
||||
RSL_IPAC_RTP_AMR,
|
||||
RSL_IPAC_RTP_CSD,
|
||||
RSL_IPAC_RTP_MUX,
|
||||
};
|
||||
|
||||
/* RSL_IE_IPAC_SPEECH_MODE, lower four bits */
|
||||
enum rsl_ipac_speech_mode_s {
|
||||
RSL_IPAC_SPEECH_GSM_FR = 0, /* GSM FR (Type 1, FS) */
|
||||
RSL_IPAC_SPEECH_GSM_EFR = 1, /* GSM EFR (Type 2, FS) */
|
||||
RSL_IPAC_SPEECH_GSM_AMR_FR = 2, /* GSM AMR/FR (Type 3, FS) */
|
||||
RSL_IPAC_SPEECH_GSM_HR = 3, /* GSM HR (Type 1, HS) */
|
||||
RSL_IPAC_SPEECH_GSM_AMR_HR = 5, /* GSM AMR/hr (Type 3, HS) */
|
||||
RSL_IPAC_SPEECH_AS_RTP = 0xf, /* As specified by RTP Payload IE */
|
||||
};
|
||||
/* RSL_IE_IPAC_SPEECH_MODE, upper four bits */
|
||||
enum rsl_ipac_speech_mode_m {
|
||||
RSL_IPAC_SPEECH_M_RXTX = 0, /* Send and Receive */
|
||||
RSL_IPAC_SPEECH_M_RX = 1, /* Receive only */
|
||||
RSL_IPAC_SPEECH_M_TX = 2, /* Send only */
|
||||
};
|
||||
|
||||
/* RSL_IE_IPAC_RTP_CSD_FMT, lower four bits */
|
||||
enum rsl_ipac_rtp_csd_format_d {
|
||||
RSL_IPAC_RTP_CSD_EXT_TRAU = 0,
|
||||
RSL_IPAC_RTP_CSD_NON_TRAU = 1,
|
||||
RSL_IPAC_RTP_CSD_TRAU_BTS = 2,
|
||||
RSL_IPAC_RTP_CSD_IWF_FREE = 3,
|
||||
};
|
||||
/* RSL_IE_IPAC_RTP_CSD_FMT, upper four bits */
|
||||
enum rsl_ipac_rtp_csd_format_ir {
|
||||
RSL_IPAC_RTP_CSD_IR_8k = 0,
|
||||
RSL_IPAC_RTP_CSD_IR_16k = 1,
|
||||
RSL_IPAC_RTP_CSD_IR_32k = 2,
|
||||
RSL_IPAC_RTP_CSD_IR_64k = 3,
|
||||
};
|
||||
|
||||
#include "msgb.h"
|
||||
|
||||
int rsl_bcch_info(struct gsm_bts_trx *trx, u_int8_t type,
|
||||
const u_int8_t *data, int len);
|
||||
int rsl_sacch_filling(struct gsm_bts_trx *trx, u_int8_t type,
|
||||
const u_int8_t *data, int len);
|
||||
int rsl_chan_activate(struct gsm_bts_trx *trx, u_int8_t chan_nr,
|
||||
u_int8_t act_type,
|
||||
struct rsl_ie_chan_mode *chan_mode,
|
||||
struct rsl_ie_chan_ident *chan_ident,
|
||||
uint8_t bs_power, uint8_t ms_power,
|
||||
uint8_t ta);
|
||||
int rsl_chan_activate_lchan(struct gsm_lchan *lchan, uint8_t act_type,
|
||||
uint8_t ho_ref);
|
||||
u_int8_t bs_power, u_int8_t ms_power,
|
||||
u_int8_t ta);
|
||||
int rsl_chan_activate_lchan(struct gsm_lchan *lchan, u_int8_t act_type,
|
||||
u_int8_t ta, u_int8_t ho_ref);
|
||||
int rsl_chan_mode_modify_req(struct gsm_lchan *ts);
|
||||
int rsl_encryption_cmd(struct msgb *msg);
|
||||
int rsl_paging_cmd(struct gsm_bts *bts, uint8_t paging_group, uint8_t len,
|
||||
uint8_t *ms_ident, uint8_t chan_needed);
|
||||
int rsl_imm_assign_cmd(struct gsm_bts *bts, uint8_t len, uint8_t *val);
|
||||
int rsl_paging_cmd(struct gsm_bts *bts, u_int8_t paging_group, u_int8_t len,
|
||||
u_int8_t *ms_ident, u_int8_t chan_needed);
|
||||
int rsl_paging_cmd_subscr(struct gsm_bts *bts, u_int8_t chan_needed,
|
||||
struct gsm_subscriber *subscr);
|
||||
int rsl_imm_assign_cmd(struct gsm_bts *bts, u_int8_t len, u_int8_t *val);
|
||||
|
||||
int rsl_data_request(struct msgb *msg, uint8_t link_id);
|
||||
int rsl_establish_request(struct gsm_lchan *lchan, uint8_t link_id);
|
||||
int rsl_relase_request(struct gsm_lchan *lchan, uint8_t link_id);
|
||||
int rsl_data_request(struct msgb *msg, u_int8_t link_id);
|
||||
int rsl_establish_request(struct gsm_lchan *lchan, u_int8_t link_id);
|
||||
int rsl_relase_request(struct gsm_lchan *lchan, u_int8_t link_id);
|
||||
|
||||
/* Siemens vendor-specific RSL extensions */
|
||||
struct rsl_mrpci {
|
||||
u_int8_t power_class:3,
|
||||
vgcs_capable:1,
|
||||
vbs_capable:1,
|
||||
gsm_phase:2;
|
||||
} __attribute__ ((packed));
|
||||
|
||||
enum rsl_mrpci_pwrclass {
|
||||
RSL_MRPCI_PWRC_1 = 0,
|
||||
RSL_MRPCI_PWRC_2 = 1,
|
||||
RSL_MRPCI_PWRC_3 = 2,
|
||||
RSL_MRPCI_PWRC_4 = 3,
|
||||
RSL_MRPCI_PWRC_5 = 4,
|
||||
};
|
||||
enum rsl_mrpci_phase {
|
||||
RSL_MRPCI_PHASE_1 = 0,
|
||||
/* reserved */
|
||||
RSL_MRPCI_PHASE_2 = 2,
|
||||
RSL_MRPCI_PHASE_2PLUS = 3,
|
||||
};
|
||||
|
||||
int rsl_siemens_mrpci(struct gsm_lchan *lchan, struct rsl_mrpci *mrpci);
|
||||
|
||||
/* ip.access specfic RSL extensions */
|
||||
int rsl_ipacc_crcx(struct gsm_lchan *lchan);
|
||||
int rsl_ipacc_mdcx(struct gsm_lchan *lchan, uint32_t ip,
|
||||
uint16_t port, uint8_t rtp_payload2);
|
||||
int rsl_ipacc_mdcx(struct gsm_lchan *lchan, u_int32_t ip,
|
||||
u_int16_t port, u_int8_t rtp_payload2);
|
||||
int rsl_ipacc_mdcx_to_rtpsock(struct gsm_lchan *lchan);
|
||||
int rsl_ipacc_pdch_activate(struct gsm_bts_trx_ts *ts, int act);
|
||||
int rsl_ipacc_pdch_activate(struct gsm_lchan *lchan);
|
||||
|
||||
int abis_rsl_rcvmsg(struct msgb *msg);
|
||||
|
||||
uint64_t str_to_imsi(const char *imsi_str);
|
||||
int rsl_release_request(struct gsm_lchan *lchan, uint8_t link_id,
|
||||
enum rsl_rel_mode release_mode);
|
||||
|
||||
int rsl_lchan_set_state(struct gsm_lchan *lchan, int);
|
||||
int rsl_lchan_mark_broken(struct gsm_lchan *lchan, const char *broken);
|
||||
unsigned int get_paging_group(u_int64_t imsi, unsigned int bs_cc_chans,
|
||||
int n_pag_blocks);
|
||||
unsigned int n_pag_blocks(int bs_ccch_sdcch_comb, unsigned int bs_ag_blks_res);
|
||||
u_int64_t str_to_imsi(const char *imsi_str);
|
||||
u_int8_t lchan2chan_nr(const struct gsm_lchan *lchan);
|
||||
int rsl_release_request(struct gsm_lchan *lchan, u_int8_t link_id);
|
||||
|
||||
/* to be provided by external code */
|
||||
int abis_rsl_sendmsg(struct msgb *msg);
|
||||
int rsl_deact_sacch(struct gsm_lchan *lchan);
|
||||
int rsl_chan_release(struct gsm_lchan *lchan);
|
||||
|
||||
/* BCCH related code */
|
||||
int rsl_ccch_conf_to_bs_cc_chans(int ccch_conf);
|
||||
int rsl_ccch_conf_to_bs_ccch_sdcch_comb(int ccch_conf);
|
||||
|
||||
int rsl_sacch_info_modify(struct gsm_lchan *lchan, uint8_t type,
|
||||
const uint8_t *data, int len);
|
||||
int rsl_number_of_paging_subchannels(struct gsm_bts *bts);
|
||||
|
||||
int rsl_chan_bs_power_ctrl(struct gsm_lchan *lchan, unsigned int fpc, int db);
|
||||
int rsl_chan_ms_power_ctrl(struct gsm_lchan *lchan, unsigned int fpc, int dbm);
|
||||
|
||||
/* SMSCB functionality */
|
||||
int rsl_sms_cb_command(struct gsm_bts *bts, uint8_t chan_number,
|
||||
struct rsl_ie_cb_cmd_type cb_command,
|
||||
const uint8_t *data, int len);
|
||||
|
||||
/* some Nokia specific stuff */
|
||||
int rsl_nokia_si_begin(struct gsm_bts_trx *trx);
|
||||
int rsl_nokia_si_end(struct gsm_bts_trx *trx);
|
||||
|
||||
/* required for Nokia BTS power control */
|
||||
int rsl_bs_power_control(struct gsm_bts_trx *trx, uint8_t channel, uint8_t reduction);
|
||||
|
||||
|
||||
int rsl_release_sapis_from(struct gsm_lchan *lchan, int start,
|
||||
enum rsl_rel_mode release_mode);
|
||||
int rsl_start_t3109(struct gsm_lchan *lchan);
|
||||
|
||||
int rsl_direct_rf_release(struct gsm_lchan *lchan);
|
||||
|
||||
#endif /* RSL_MT_H */
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#ifndef ARFCN_RANGE_ENCODE_H
|
||||
#define ARFCN_RANGE_ENCODE_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
enum {
|
||||
ARFCN_RANGE_INVALID = -1,
|
||||
ARFCN_RANGE_128 = 127,
|
||||
ARFCN_RANGE_256 = 255,
|
||||
ARFCN_RANGE_512 = 511,
|
||||
ARFCN_RANGE_1024 = 1023,
|
||||
};
|
||||
|
||||
#define RANGE_ENC_MAX_ARFCNS 29
|
||||
|
||||
int range_enc_determine_range(const int *arfcns, int size, int *f0_out);
|
||||
int range_enc_arfcns(const int rng, const int *arfcns, int sze, int *out, int idx);
|
||||
int range_enc_find_index(const int rng, const int *arfcns, int size);
|
||||
int range_enc_filter_arfcns(int *arfcns, const int sze, const int f0, int *f0_included);
|
||||
|
||||
int range_enc_range128(uint8_t *chan_list, int f0, int *w);
|
||||
int range_enc_range256(uint8_t *chan_list, int f0, int *w);
|
||||
int range_enc_range512(uint8_t *chan_list, int f0, int *w);
|
||||
int range_enc_range1024(uint8_t *chan_list, int f0, int f0_incl, int *w);
|
||||
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user