Compare commits

...

No commits in common. "debian/0.9.13-0_jrsantos.5" and "master" have entirely different histories.

490 changed files with 95196 additions and 84701 deletions

1
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1 @@
open_collective: osmocom

85
.gitignore vendored Normal file
View File

@ -0,0 +1,85 @@
debian/*.log
debian/autoreconf.*
debian/*.substvars
debian/tmp
debian/files
debian/.debhelper
debian/osmo-msc*/
*.o
*.lo
*.a
.deps
Makefile
Makefile.in
config.h
config.h.in
*.pc
*.*~
*.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
m4/*.m4
# git-version-gen magic
.tarball-version
.version
# apps and app data
src/osmo-msc/osmo-msc
src/utils/smpp_mirror
sms.db
src/osmo-msc/*.cfg*
#tests
tests/testsuite.dir
tests/*/*_test
# ignore compiled binaries like msc_vlr_test_foo; do not ignore
# msc_vlr_test_foo.{c,ok,err}, but do still ignore the corresponding .o object
# files:
tests/msc_vlr/msc_vlr_test_*
!tests/msc_vlr/msc_vlr_test_*.*
tests/msc_vlr/msc_vlr_test_*.o
tests/atconfig
tests/atlocal
tests/package.m4
tests/testsuite
tests/testsuite.log
writtenconfig/
# manuals
doc/manuals/*.html
doc/manuals/*.svg
doc/manuals/*.pdf
doc/manuals/*__*.png
doc/manuals/*.check
doc/manuals/generated/
doc/manuals/osmomsc-usermanual.xml
doc/manuals/common
doc/manuals/build
doc/manuals/vty/msc_vty_reference.xml
contrib/osmo-msc.spec

3
.gitreview Normal file
View File

@ -0,0 +1,3 @@
[gerrit]
host=gerrit.osmocom.org
project=osmo-msc

12
.mailmap Normal file
View File

@ -0,0 +1,12 @@
Harald Welte <laforge@gnumonks.org>
Harald Welte <laforge@gnumonks.org> <laflocal@hanuman.gnumonks.org>
Harald Welte <laforge@gnumonks.org> <laflocal@goeller.de.gnumonks.org>
Holger Hans Peter Freyther <holger@moiji-mobile.com> <zecke@selfish.org>
Holger Hans Peter Freyther <holger@moiji-mobile.com> <ich@tamarin.(none)>
Holger Hans Peter Freyther <holgre@moiji-mobile.com> <holger@freyther.de>
Andreas Eversberg <jolly@eversberg.eu>
Andreas Eversberg <jolly@eversberg.eu> <Andreas.Eversberg@versatel.de>
Andreas Eversberg <jolly@eversberg.eu> <root@nuedel.(none)>
Pablo Neira Ayuso <pablo@soleta.eu> <pablo@gnumonks.org>
Max Suraev <msuraev@sysmocom.de>
Tom Tsou <tom.tsou@ettus.com> <tom@tsou.cc>

View File

@ -1 +0,0 @@
0.9.13

View File

@ -5,3 +5,5 @@ Stefan Schmidt <stefan@datenfreihafen.org>
Daniel Willmann <daniel@totalueberwachung.de>
Andreas Eversberg <Andreas.Eversberg@versatel.de>
Sylvain Munaut <246tnt@gmail.com>
Jacob Erlbeck <jerlbeck@sysmocom.de>
Neels Hofmeyr <nhofmeyr@sysmocom.de>

View File

@ -1,12 +1,35 @@
AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
INCLUDES = $(all_includes) -I$(top_srcdir)/include
SUBDIRS = include src tests
## FIXME: automake >= 1.13 or autoconf >= 2.70 provide better suited AC_CONFIG_MACRO_DIRS for configure.ac
## remove line below when OE toolchain is updated to version which include those
ACLOCAL_AMFLAGS = -I m4
AM_CPPFLAGS = \
$(all_includes) \
-I$(top_srcdir)/include \
$(NULL)
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = openbsc.pc
SUBDIRS = \
include \
src \
doc \
contrib \
tests \
$(NULL)
BUILT_SOURCES = $(top_srcdir)/.version
EXTRA_DIST = \
.version \
README.md \
debian \
git-version-gen \
osmoappdesc.py \
$(NULL)
AM_DISTCHECK_CONFIGURE_FLAGS = \
--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
@RELMAKE@
$(top_srcdir)/.version:
echo $(VERSION) > $@-t && mv $@-t $@
dist-hook:

View File

@ -1,762 +0,0 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/bscconfig.h.in \
$(srcdir)/openbsc.pc.in $(top_srcdir)/configure AUTHORS \
COPYING depcomp install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = bscconfig.h
CONFIG_CLEAN_FILES = openbsc.pc
CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
DATA = $(pkgconfig_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
distdir dist dist-all distcheck
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
{ test ! -d "$(distdir)" \
|| { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr "$(distdir)"; }; }
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
COVERAGE_CFLAGS = @COVERAGE_CFLAGS@
COVERAGE_LDFLAGS = @COVERAGE_LDFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GPRS_LIBGTP = @GPRS_LIBGTP@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBOSMOCORE_CFLAGS = @LIBOSMOCORE_CFLAGS@
LIBOSMOCORE_LIBS = @LIBOSMOCORE_LIBS@
LIBOSMOSCCP_CFLAGS = @LIBOSMOSCCP_CFLAGS@
LIBOSMOSCCP_LIBS = @LIBOSMOSCCP_LIBS@
LIBOSMOVTY_CFLAGS = @LIBOSMOVTY_CFLAGS@
LIBOSMOVTY_LIBS = @LIBOSMOVTY_LIBS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
SYMBOL_VISIBILITY = @SYMBOL_VISIBILITY@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign dist-bzip2 1.6
INCLUDES = $(all_includes) -I$(top_srcdir)/include
SUBDIRS = include src tests
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = openbsc.pc
BUILT_SOURCES = $(top_srcdir)/.version
all: $(BUILT_SOURCES) bscconfig.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
am--refresh:
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
bscconfig.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/bscconfig.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status bscconfig.h
$(srcdir)/bscconfig.h.in: $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f bscconfig.h stamp-h1
openbsc.pc: $(top_builddir)/config.status $(srcdir)/openbsc.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $@
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
done
uninstall-pkgconfigDATA:
@$(NORMAL_UNINSTALL)
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) bscconfig.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) bscconfig.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) bscconfig.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) bscconfig.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
dist-hook
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
dist-lzma: distdir
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
$(am__remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
$(am__remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__remove_distdir)
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod a+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@$(am__cd) '$(distuninstallcheck_dir)' \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-recursive
all-am: Makefile $(DATA) bscconfig.h
installdirs: installdirs-recursive
installdirs-am:
for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-recursive
clean-am: clean-generic mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am: install-pkgconfigDATA
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am:
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am: uninstall-pkgconfigDATA
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
ctags-recursive install install-am install-strip \
tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
dist-hook dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
distcheck distclean distclean-generic distclean-hdr \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
installdirs-am maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
tags-recursive uninstall uninstall-am uninstall-pkgconfigDATA
$(top_srcdir)/.version:
echo $(VERSION) > $@-t && mv $@-t $@
dist-hook:
echo $(VERSION) > $(distdir)/.tarball-version
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

32
README
View File

@ -1,32 +0,0 @@
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.
Its currently supported interfaces towards the BTS are:
* 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/
This project is still in its early days, and there are lots of areas where it
doesn't behave as per GSM spec.
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

110
README.md Normal file
View File

@ -0,0 +1,110 @@
osmo-msc - Osmocom MSC Implementation
=====================================
This repository contains a C-language implementation of a GSM **Mobile Switching
Centre (MSC)** for 2G (GSM) and 3G (UMTS). It is part of the
[Osmocom](https://osmocom.org/) Open Source Mobile Communications
project.
OsmoMSC exposes
* *A over IP* towards BSCs (e.g. [osmo-bsc](https://osmocom.org/projects/osmobsc/wiki): 3GPP AoIP or SCCPlite
* *IuCS over IP* towards RNCs / HNBGW (e.g. [osmo-hnbgw](https://osmocom.org/projects/osmohnbgw/wiki))
* *MGCP* towards a co-located [osmo-mgw](https://osmocom.org/projects/osmo-mgw/wiki) for the RTP streams
* *[GSUP](https://osmocom.org/projects/cellular-infrastructure/wiki/GSUP)* (instead of 3GPP MAP) towards [osmo-hlr](https://osmocom.org/projects/osmo-hlr/wiki)
* *SMPP* towards any external SMS sending/receiving applications
* *[MNCC](https://osmocom.org/projects/osmomsc/wiki/MNCC)* as external call-control interface towards e.g.
[osmo-sip-connectr](https://osmocom.org/projects/osmo-sip-conector/wiki)
* The Osmocom typical telnet *VTY* and *CTRL* interfaces.
* The Osmocom typical *statsd* exporter.
OsmoMSC implements
* mobility management
* call control (either via built-in MNCC handler or external osmo-sip-connector)
* voice group call ([VGCS](https://osmocom.org/projects/cellular-infrastructure/wiki/Voice_Group_Call)) and
voice broadcast calls ([VBS](https://osmocom.org/projects/cellular-infrastructure/wiki/Voice_Broadcast_Call)) as used in GSM-R
* USSD (exposed via GSUP)
* SMS (either via built-in SMSC or external via GSUP)
Homepage
--------
You can find the OsmoMSC home page and wiki online at
<https://osmocom.org/projects/osmomsc/wiki>.
GIT Repository
--------------
You can clone from the official osmo-msc.git repository using
git clone https://gitea.osmocom.org/cellular-infrastructure/osmo-msc
There is a web interface at <https://gitea.osmocom.org/cellular-infrastructure/osmo-msc>
Documentation
-------------
User Manuals and VTY reference manuals are [optionally] built in PDF form
as part of the build process.
Pre-rendered PDF version of the current "master" can be found at
[User Manual](https://ftp.osmocom.org/docs/latest/osmomsc-usermanual.pdf)
as well as the [VTY Reference Manual](https://ftp.osmocom.org/docs/latest/osmomsc-vty-reference.pdf)
Forum
-----
We welcome any osmo-msc related discussions in the
[Cellular Network Infrastructure -> 2G/3G CN](https://discourse.osmocom.org/c/cni/2g-3g-cn)
section of the osmocom discourse (web based Forum).
Mailing List
------------
Discussions related to osmo-msc are happening on the
openbsc@lists.osmocom.org mailing list, please see
<https://lists.osmocom.org/mailman/listinfo/openbsc> for subscription
options and the list archive.
Please observe the [Osmocom Mailing List
Rules](https://osmocom.org/projects/cellular-infrastructure/wiki/Mailing_List_Rules)
when posting.
Issue Tracker
-------------
We use the [issue tracker of the osmo-msc project on osmocom.org](https://osmocom.org/projects/osmomsc/issues) for
tracking the state of bug reports and feature requests. Feel free to submit any issues you may find, or help
us out by resolving existing issues.
Contributing
------------
Our coding standards are described at
<https://osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards>
We us a gerrit based patch submission/review process for managing
contributions. Please see
<https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit> for
more details
The current patch queue for osmo-msc can be seen at
<https://gerrit.osmocom.org/#/q/project:osmo-msc+status:open>
History
-------
OsmoMSC originated from the [OsmoNITB](https://osmocom.org/projects/osmonitb/wiki/OsmoNITB)
project, which started as a minimalistic all-in-one implementation of the GSM Network. In 2017, OsmoNITB had
reached maturity and diversity (including M3UA SIGTRAN and 3G support in the form of IuCS and IuPS interfaces)
that naturally lead to a separation of the all-in-one approach to fully independent separate programs as in
typical GSM networks.
OsmoMSC was one of the parts split off from the old openbsc.git.

11
README.vty-tests Normal file
View File

@ -0,0 +1,11 @@
To run the configuration parsing and output (VTY) test suite, first install
https://gitea.osmocom.org/cellular-infrastructure/osmo-python-tests
and pass the following configure options here:
./configure --enable-external-tests
The VTY tests are then included in the standard check target:
make check

10
TODO-RELEASE Normal file
View File

@ -0,0 +1,10 @@
# When cleaning up this file: bump API version in corresponding Makefile.am and rename corresponding debian/lib*.install
# according to https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html#Updating-version-info
# In short:
# LIBVERSION=c:r:a
# If the library source code has changed at all since the last update, then increment revision: c:r + 1:a.
# If any interfaces have been added, removed, or changed since the last update: c + 1:0:0.
# If any interfaces have been added since the last public release: c:r:a + 1.
# If any interfaces have been removed or changed since the last public release: c:r:0.
#library what description / commit summary line
libosmogsm >1.9.0 ABI breakage in struct osmo_gsup_pdp_info, use new fields pdp_type_* and pdp_address.

1148
aclocal.m4 vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,61 +0,0 @@
/* bscconfig.h.in. Generated from configure.in by autoheader. */
/* Define to 1 if you have the <dahdi/user.h> header file. */
#undef HAVE_DAHDI_USER_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
/* Use crypt functionality of vty. */
#undef VTY_CRYPT_PW

6307
configure vendored

File diff suppressed because it is too large Load Diff

259
configure.ac Normal file
View File

@ -0,0 +1,259 @@
dnl Process this file with autoconf to produce a configure script
AC_INIT([osmo-msc],
m4_esyscmd([./git-version-gen .tarball-version]),
[openbsc@lists.osmocom.org])
dnl *This* is the root dir, even if an install-sh exists in ../ or ../../
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE([dist-bzip2])
AC_CONFIG_TESTDIR(tests)
CFLAGS="$CFLAGS -std=gnu11"
dnl kernel style compile messages
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl include release helper
RELMAKE='-include osmo-release.mk'
AC_SUBST([RELMAKE])
dnl checks for programs
AC_PROG_MAKE_SET
AC_PROG_CC
AC_PROG_INSTALL
LT_INIT
dnl patching ${archive_cmds} to affect generation of file "libtool" to fix linking with clang
AS_CASE(["$LD"],[*clang*],
[AS_CASE(["${host_os}"],
[*linux*],[archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'])])
dnl check for pkg-config (explained in detail in libosmocore/configure.ac)
AC_PATH_PROG(PKG_CONFIG_INSTALLED, pkg-config, no)
if test "x$PKG_CONFIG_INSTALLED" = "xno"; then
AC_MSG_WARN([You need to install pkg-config])
fi
PKG_PROG_PKG_CONFIG([0.20])
PKG_CHECK_MODULES(LIBSQLITE3, sqlite3)
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.9.0)
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 1.9.0)
PKG_CHECK_MODULES(LIBOSMOCTRL, libosmoctrl >= 1.9.0)
PKG_CHECK_MODULES(LIBOSMOGSM, libosmogsm >= 1.9.0)
PKG_CHECK_MODULES(LIBOSMOABIS, libosmoabis >= 1.5.0)
PKG_CHECK_MODULES(LIBOSMONETIF, libosmo-netif >= 1.4.0)
PKG_CHECK_MODULES(LIBOSMOSIGTRAN, libosmo-sigtran >= 1.8.0)
PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 1.8.0)
PKG_CHECK_MODULES(LIBOSMOMGCPCLIENT, libosmo-mgcp-client >= 1.12.0)
PKG_CHECK_MODULES(LIBOSMOGSUPCLIENT, libosmo-gsup-client >= 1.7.0)
AC_CHECK_FUNC([timegm], [AC_DEFINE(HAVE_TIMEGM, 1, Define if libc implements timegm)])
old_LIBS=$LIBS
AC_SEARCH_LIBS([sctp_send], [sctp], [
AC_DEFINE(HAVE_LIBSCTP, 1, [Define 1 to enable SCTP support])
AC_SUBST(HAVE_LIBSCTP, [1])
if test -n "$ac_lib"; then
AC_SUBST(LIBSCTP_LIBS, [-l$ac_lib])
fi
], [
AC_MSG_ERROR([sctp_send not found in searched libs])])
LIBS=$old_LIBS
AC_ARG_ENABLE(sanitize,
[AS_HELP_STRING(
[--enable-sanitize],
[Compile with address sanitizer enabled],
)],
[sanitize=$enableval], [sanitize="no"])
if test x"$sanitize" = x"yes"
then
CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined"
CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined"
fi
AC_ARG_ENABLE(werror,
[AS_HELP_STRING(
[--enable-werror],
[Turn all compiler warnings into errors, with exceptions:
a) deprecation (allow upstream to mark deprecation without breaking builds);
b) "#warning" pragmas (allow to remind ourselves of errors without breaking builds)
]
)],
[werror=$enableval], [werror="no"])
if test x"$werror" = x"yes"
then
WERROR_FLAGS="-Werror"
WERROR_FLAGS+=" -Wno-error=deprecated -Wno-error=deprecated-declarations"
WERROR_FLAGS+=" -Wno-error=cpp" # "#warning"
CFLAGS="$CFLAGS $WERROR_FLAGS"
CPPFLAGS="$CPPFLAGS $WERROR_FLAGS"
fi
# Enable/disable smpp support in the msc?
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.14.0)
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 3G aka IuPS + IuCS support?
AC_ARG_ENABLE([iu], [AS_HELP_STRING([--enable-iu], [Build 3G support, aka IuPS and IuCS interfaces])],
[osmo_ac_iu="$enableval"],[osmo_ac_iu="no"])
if test "x$osmo_ac_iu" = "xyes" ; then
PKG_CHECK_MODULES(LIBASN1C, libasn1c >= 0.9.30)
PKG_CHECK_MODULES(LIBOSMORANAP, libosmo-ranap >= 1.5.0)
AC_DEFINE(BUILD_IU, 1, [Define if we want to build IuPS and IuCS interfaces support])
fi
AM_CONDITIONAL(BUILD_IU, test "x$osmo_ac_iu" = "xyes")
AC_SUBST(osmo_ac_iu)
# 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([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 https://gitea.osmocom.org/cellular-infrastructure/osmo-python-tests 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")
# Generate manuals
AC_ARG_ENABLE(manuals,
[AS_HELP_STRING(
[--enable-manuals],
[Generate manual PDFs [default=no]],
)],
[osmo_ac_build_manuals=$enableval], [osmo_ac_build_manuals="no"])
AM_CONDITIONAL([BUILD_MANUALS], [test x"$osmo_ac_build_manuals" = x"yes"])
AC_ARG_VAR(OSMO_GSM_MANUALS_DIR, [path to common osmo-gsm-manuals files, overriding pkg-config and "../osmo-gsm-manuals"
fallback])
if test x"$osmo_ac_build_manuals" = x"yes"
then
# Find OSMO_GSM_MANUALS_DIR (env, pkg-conf, fallback)
if test -n "$OSMO_GSM_MANUALS_DIR"; then
echo "checking for OSMO_GSM_MANUALS_DIR... $OSMO_GSM_MANUALS_DIR (from env)"
else
OSMO_GSM_MANUALS_DIR="$($PKG_CONFIG osmo-gsm-manuals --variable=osmogsmmanualsdir 2>/dev/null)"
if test -n "$OSMO_GSM_MANUALS_DIR"; then
echo "checking for OSMO_GSM_MANUALS_DIR... $OSMO_GSM_MANUALS_DIR (from pkg-conf)"
else
OSMO_GSM_MANUALS_DIR="../osmo-gsm-manuals"
echo "checking for OSMO_GSM_MANUALS_DIR... $OSMO_GSM_MANUALS_DIR (fallback)"
fi
fi
if ! test -d "$OSMO_GSM_MANUALS_DIR"; then
AC_MSG_ERROR("OSMO_GSM_MANUALS_DIR does not exist! Install osmo-gsm-manuals or set OSMO_GSM_MANUALS_DIR.")
fi
# Find and run check-depends
CHECK_DEPENDS="$OSMO_GSM_MANUALS_DIR/check-depends.sh"
if ! test -x "$CHECK_DEPENDS"; then
CHECK_DEPENDS="osmo-gsm-manuals-check-depends"
fi
if ! $CHECK_DEPENDS; then
AC_MSG_ERROR("missing dependencies for --enable-manuals")
fi
# Put in Makefile with absolute path
OSMO_GSM_MANUALS_DIR="$(realpath "$OSMO_GSM_MANUALS_DIR")"
AC_SUBST([OSMO_GSM_MANUALS_DIR])
fi
# https://www.freedesktop.org/software/systemd/man/daemon.html
AC_ARG_WITH([systemdsystemunitdir],
[AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],,
[with_systemdsystemunitdir=auto])
AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"], [
def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
AS_IF([test "x$def_systemdsystemunitdir" = "x"],
[AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
[AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])
with_systemdsystemunitdir=no],
[with_systemdsystemunitdir="$def_systemdsystemunitdir"])])
AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
[AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"])
AC_MSG_RESULT([CFLAGS="$CFLAGS"])
AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"])
dnl Generate the output
AM_CONFIG_HEADER(config.h)
AC_OUTPUT(
include/Makefile
include/osmocom/Makefile
include/osmocom/msc/Makefile
include/osmocom/smpp/Makefile
src/Makefile
src/libmsc/Makefile
src/libvlr/Makefile
src/libsmpputil/Makefile
src/osmo-msc/Makefile
src/utils/Makefile
tests/Makefile
tests/atlocal
tests/smpp/Makefile
tests/db_sms/Makefile
tests/sms_queue/Makefile
tests/msc_vlr/Makefile
tests/sdp_msg/Makefile
tests/mncc/Makefile
tests/csd/Makefile
doc/Makefile
doc/examples/Makefile
doc/manuals/Makefile
doc/sequence_charts/Makefile
contrib/Makefile
contrib/systemd/Makefile
Makefile)

View File

@ -1,111 +0,0 @@
dnl Process this file with autoconf to produce a configure script
AC_INIT([openbsc],
m4_esyscmd([./git-version-gen .tarball-version]),
[openbsc-devel@lists.openbsc.org])
AM_INIT_AUTOMAKE([dist-bzip2])
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.])])
AC_SEARCH_LIBS(gtp_new, gtp,
[LIBCRYPT="-lgtp"; AC_SUBST([GPRS_LIBGTP], [1])])
AM_CONDITIONAL(HAVE_LIBGTP, test "x$GPRS_LIBGTP" != "x")
AC_ARG_ENABLE([nat], [AS_HELP_STRING([--enable-nat], [Build the BSC NAT. Requires SCCP])],
[
PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.0.2)
osmo_ac_build_nat="yes"
],
[
osmo_ac_build_nat="no"
])
AM_CONDITIONAL(BUILD_NAT, test "x$osmo_ac_build_nat" = "xyes")
AC_ARG_ENABLE([osmo-bsc], [AS_HELP_STRING([--enable-osmo-bsc], [Build the Osmo BSC])],
[
PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.0.2)
osmo_ac_build_bsc="yes"
],
[
osmo_ac_build_bsc="no"
])
AM_CONDITIONAL(BUILD_BSC, test "x$osmo_ac_build_bsc" = "xyes")
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.1.30)
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.1.28)
dnl checks for header files
AC_HEADER_STDC
AC_CHECK_HEADERS(dahdi/user.h,,AC_MSG_WARN(DAHDI input driver will not be built))
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)
# 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
dnl Generate the output
AM_CONFIG_HEADER(bscconfig.h)
AC_OUTPUT(
openbsc.pc
include/openbsc/Makefile
include/Makefile
src/Makefile
src/libtrau/Makefile
src/libabis/Makefile
src/libbsc/Makefile
src/libmsc/Makefile
src/libmgcp/Makefile
src/libcommon/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/libgb/Makefile
src/gprs/Makefile
tests/Makefile
tests/debug/Makefile
tests/gsm0408/Makefile
tests/db/Makefile
tests/channel/Makefile
tests/bsc-nat/Makefile
tests/mgcp/Makefile
Makefile)

1
contrib/Makefile.am Normal file
View File

@ -0,0 +1 @@
SUBDIRS = systemd

87
contrib/jenkins.sh Executable file
View File

@ -0,0 +1,87 @@
#!/usr/bin/env bash
# jenkins build helper script for openbsc. This is how we build on jenkins.osmocom.org
#
# environment variables:
# * IU: configure 3G support (values: "--enable-iu", "--disable-iu")
# * WITH_MANUALS: build manual PDFs if set to "1"
# * PUBLISH: upload manuals after building if set to "1" (ignored without WITH_MANUALS = "1")
# * IS_MASTER_BUILD: set to 1 when running from master-builds (not gerrit-verifications)
#
if ! [ -x "$(command -v osmo-build-dep.sh)" ]; then
echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !"
exit 2
fi
exit_tar_workspace() {
if [ "$IS_MASTER_BUILD" = "1" ]; then
tar -cJf "/tmp/workspace.tar.xz" "$base"
mv /tmp/workspace.tar.xz "$base"
fi
cat-testlogs.sh
}
set -ex
base="$PWD"
deps="$base/deps"
inst="$deps/install"
export deps inst
osmo-clean-workspace.sh
mkdir "$deps" || true
osmo-build-dep.sh libosmocore "" ac_cv_path_DOXYGEN=false
verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")
export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH"
export LD_LIBRARY_PATH="$inst/lib"
export PATH="$inst/bin:$PATH"
osmo-build-dep.sh libosmo-abis
osmo-build-dep.sh libosmo-netif
osmo-build-dep.sh libosmo-sccp
osmo-build-dep.sh libsmpp34
osmo-build-dep.sh osmo-mgw
osmo-build-dep.sh osmo-hlr
if [ "x$IU" = "x--enable-iu" ]; then
osmo-build-dep.sh libasn1c
#osmo-build-dep.sh asn1c aper-prefix # only needed for make regen in osmo-iuh
osmo-build-dep.sh osmo-iuh
fi
# Additional configure options and depends
CONFIG=""
if [ "$WITH_MANUALS" = "1" ]; then
CONFIG="--enable-manuals"
fi
set +x
echo
echo
echo
echo " =============================== osmo-msc ==============================="
echo
set -x
cd "$base"
autoreconf --install --force
./configure --enable-sanitize --enable-werror --enable-smpp $IU --enable-external-tests $CONFIG
$MAKE $PARALLEL_MAKE
LD_LIBRARY_PATH="$inst/lib" $MAKE check \
|| exit_tar_workspace
LD_LIBRARY_PATH="$inst/lib" \
DISTCHECK_CONFIGURE_FLAGS="--enable-werror --enable-smpp $IU --enable-external-tests $CONFIG" \
$MAKE $PARALLEL_MAKE distcheck \
|| exit_tar_workspace
if [ "$WITH_MANUALS" = "1" ] && [ "$PUBLISH" = "1" ]; then
make -C "$base/doc/manuals" publish
fi
$MAKE $PARALLEL_MAKE maintainer-clean
osmo-clean-workspace.sh

View File

@ -0,0 +1,6 @@
EXTRA_DIST = osmo-msc.service
if HAVE_SYSTEMD
systemdsystemunit_DATA = \
osmo-msc.service
endif

View File

@ -0,0 +1,21 @@
[Unit]
Description=Osmocom Mobile Switching Center (MSC)
Wants=osmo-hlr.service
Wants=osmo-mgw.service
After=osmo-hlr.service
After=osmo-hnbgw.service
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
Restart=always
StateDirectory=osmocom
WorkingDirectory=%S/osmocom
User=osmocom
Group=osmocom
ExecStart=/usr/bin/osmo-msc -c /etc/osmocom/osmo-msc.cfg
RestartSec=2
[Install]
WantedBy=multi-user.target

1436
debian/changelog vendored

File diff suppressed because it is too large Load Diff

2
debian/compat vendored
View File

@ -1 +1 @@
4
10

82
debian/control vendored
View File

@ -1,11 +1,75 @@
Source: opensgsn
Section: unknown
Priority: optional
Maintainer: unknown <jrsantos@vanu.com>
Build-Depends: debhelper (>= 4.0.0), autotools-dev, pkg-config, libgtp-dev (>= 0.91-0~jrsantos.1), libosmocore-dev (>= 0.1.30)
Standards-Version: 3.6.1
Source: osmo-msc
Section: net
Priority: extra
Maintainer: Osmocom team <openbsc@lists.osmocom.org>
Build-Depends: debhelper (>= 10),
dh-autoreconf,
autotools-dev,
autoconf,
automake,
libtool,
pkg-config,
libsqlite3-dev,
libsctp-dev,
libtalloc-dev,
libsmpp34-dev (>= 1.14.0),
libasn1c-dev (>= 0.9.30),
libosmocore-dev (>= 1.9.0),
libosmo-sccp-dev (>= 1.8.0),
libosmo-sigtran-dev (>= 1.8.0),
libosmo-abis-dev (>= 1.5.0),
libosmo-mgcp-client-dev (>= 1.12.0),
libosmo-gsup-client-dev (>= 1.7.0),
libosmo-netif-dev (>= 1.4.0),
libosmo-ranap-dev (>= 1.5.0),
osmo-gsm-manuals-dev (>= 1.5.0)
Standards-Version: 3.9.8
Vcs-Git: https://gitea.osmocom.org/cellular-infrastructure/osmo-msc
Vcs-Browser: https://gitea.osmocom.org/cellular-infrastructure/osmo-msc
Homepage: https://osmocom.org/projects/osmomsc
Package: opensgsn
Package: osmo-msc
Architecture: any
Depends: ${shlibs:Depends}
Description: Free Software implementation of the GPRS Serving GPRS Support Node
Multi-Arch: foreign
Depends: ${misc:Depends}, ${shlibs:Depends}
Recommends: osmo-mgw
Description: OsmoMSC: Osmocom's Mobile Switching Center for 2G and 3G circuit-switched mobile networks
The Mobile Switching Center (MSC) is the heart of 2G/3G
circuit-switched services. It terminates the A-interface links from the
Base Station Controllers (BSC) and handles the MM and CC sub-layers of
the Layer 3 protocol from the phones (MS).
.
This Osmocom implementation of the MSC handles A interfaces via 3GPP
AoIP in an ASP role. It furthermore implements IETF MGCP against an
external media gateway, such as OsmoMGW. It does *not* implement MAP
towards a HLR, but the much simpler Osmocom GSUP protocol, which can
be translated to MAP if needed.
Package: osmo-msc-dbg
Section: debug
Architecture: any
Multi-Arch: same
Depends: osmo-msc (= ${binary:Version}), ${misc:Depends}
Description: OsmoMSC: Osmocom's Mobile Switching Center for 2G and 3G circuit-switched mobile networks
The Mobile Switching Center (MSC) is the heart of 2G/3G
circuit-switched services. It terminates the A-interface links from the
Base Station Controllers (BSC) and handles the MM and CC sub-layers of
the Layer 3 protocol from the phones (MS).
.
This Osmocom implementation of the MSC handles A interfaces via 3GPP
AoIP in an ASP role. It furthermore implements IETF MGCP against an
external media gateway, such as OsmoMGW. It does *not* implement MAP
towards a HLR, but the much simpler Osmocom GSUP protocol, which can
be translated to MAP if needed.
.
This package contains the debug symbols for osmo-msc in order to
generate meaningful backtraces in bug-reports.
Package: osmo-msc-doc
Architecture: all
Section: doc
Priority: optional
Depends: ${misc:Depends}
Description: ${misc:Package} PDF documentation
Various manuals: user manual, VTY reference manual and/or
protocol/interface manuals.

849
debian/copyright vendored
View File

@ -1,678 +1,173 @@
This package was debianized by
Jonathan Santos <jrsantos@jonathanrsantos.com> Wed, 25 May 2011 14:14:35 -0400
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: osmo-msc
Source: https://gitea.osmocom.org/cellular-infrastructure/osmo-msc
Files: *
Copyright: 2008 Daniel Willmann <daniel@totalueberwachung.de>
2008 Jan Luebbe <jluebbe@debian.org>
2008-2015 Holger Hans Peter Freyther <zecke@selfish.org>
2008-2016 Harald Welte <laforge@gnumonks.org>
2009 Andreas Eversberg <Andreas.Eversberg@versatel.de>
2009 Mike Haben <michael.haben@btinternet.com>
2010 Sylvain Munaut <tnt@246tNt.com>
2010-2013 On-Waves
2013 Jacob Erlbeck <jerlbeck@sysmocom.de>
2011 Andreas Eversberg <jolly@eversberg.eu>
2011-2017 sysmocom s.f.m.c. GmbH <info@sysmocom.de>
2014-2015 Alexander Chemeris <Alexander.Chemeris@fairwaves.co>
License: AGPL-3.0+
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/>.
Files: src/libmsc/mncc_builtin.c
src/libmsc/mncc_sock.c
Copyright: 2008-2010 Harald Welte <laforge@gnumonks.org>
2009 Andreas Eversberg <Andreas.Eversberg@versatel.de>
2012 Holger Hans Peter Freyther
License: GPL-2.0+
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 General Public License for more details.
.
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.
.
On Debian systems, the complete text of the GNU General Public License
Version 2 can be found in `/usr/share/common-licenses/GPL-2'.
Files: osmoappdesc.py
Copyright: 2013 Katerina Barone-Adesi <kat.obsc@gmail.com>
License: GPL-3.0+
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/>
.
Most systems won't be able to use these, so they're separated out
.
On Debian systems, the complete text of the GNU General Public License
Version 3 can be found in `/usr/share/common-licenses/GPL-3'.
Files: git-version-gen
Copyright: 2007-2010 Free Software Foundation, Inc.
License: GPL-3.0+
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).
.
On Debian systems, the complete text of the GNU General Public License
Version 3 can be found in `/usr/share/common-licenses/GPL-3'.
Files: tests/vty_test_runner.py
Copyright: 2013 Holger Hans Peter Freyther
2013 Katerina Barone-Adesi <kat.obsc@gmail.com>
License: GPL-3.0+
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/>.
.
On Debian systems, the complete text of the GNU General Public License
Version 3 can be found in `/usr/share/common-licenses/GPL-3'.
Files: include/openbsc/slhc.h
Copyright: 1989 Regents of the University of California.
License: __UNKNOWN__
Redistribution and use in source and binary forms are permitted
provided that the above copyright notice and this paragraph are
duplicated in all such forms and that any documentation,
advertising materials, and other materials related to such
distribution and use acknowledge that the software was developed
by the University of California, Berkeley. The name of the
University may not be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
.
Van Jacobson (van@helios.ee.lbl.gov), Dec 31, 1989:
- Initial distribution.
.
modified for KA9Q Internet Software Package by
Katie Stevens (dkstevens@ucdavis.edu)
University of California, Davis
Computing Services
- 01-31-90 initial adaptation
It was downloaded from http://openbsc.osmocom.org
Copyright Holder:
Harald Welte <laforge@gnumonks.org>
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>
License:
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
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.
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.
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.
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.
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.
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.
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
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
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.
13. Remote Network Interaction; Use with the GNU General Public License.
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.
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.
14. Revised Versions 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
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.
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.
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.
15. Disclaimer of Warranty.
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.
16. Limitation of Liability.
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
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
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
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
(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/>.
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.
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/>.

45
debian/opensgsn.init vendored
View File

@ -1,45 +0,0 @@
#! /bin/sh
set -e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DESC="Osmocom SGSN"
NAME=osmo-sgsn
DAEMON=/usr/bin/$NAME
SCRIPTNAME=/etc/init.d/opensgsn
test -x $DAEMON || exit 0
d_start() {
start-stop-daemon --start --quiet --exec $DAEMON -- -c /etc/sgsn.conf -D
}
d_stop() {
start-stop-daemon --stop --quiet --name $NAME
}
case "$1" in
start)
echo -n "Starting $DESC: $NAME"
d_start
echo "."
;;
stop)
echo -n "Stopping $DESC: $NAME"
d_stop
echo "."
;;
restart|force-reload)
echo -n "Restarting $DESC: $NAME"
d_stop
sleep 1
d_start
echo "."
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0

1
debian/osmo-msc-doc.install vendored Normal file
View File

@ -0,0 +1 @@
usr/share/doc/osmo-msc-doc/*.pdf

6
debian/osmo-msc.install vendored Normal file
View File

@ -0,0 +1,6 @@
etc/osmocom/osmo-msc.cfg
lib/systemd/system/osmo-msc.service
usr/bin/osmo-msc
usr/share/doc/osmo-msc/examples/osmo-msc/osmo-msc.cfg usr/share/doc/osmo-msc/examples
usr/share/doc/osmo-msc/examples/osmo-msc/osmo-msc_custom-sccp.cfg usr/share/doc/osmo-msc/examples
usr/share/doc/osmo-msc/examples/osmo-msc/osmo-msc_multi-cs7.cfg usr/share/doc/osmo-msc/examples

38
debian/postinst vendored Executable file
View File

@ -0,0 +1,38 @@
#!/bin/sh -e
case "$1" in
configure)
# Create the osmocom group and user (if it doesn't exist yet)
if ! getent group osmocom >/dev/null; then
groupadd --system osmocom
fi
if ! getent passwd osmocom >/dev/null; then
useradd \
--system \
--gid osmocom \
--home-dir /var/lib/osmocom \
--shell /sbin/nologin \
--comment "Open Source Mobile Communications" \
osmocom
fi
# Fix permissions of previous (root-owned) install (OS#4107)
if dpkg --compare-versions "$2" le "1.12.0"; then
if [ -e /etc/osmocom/osmo-msc.cfg ]; then
chown -v osmocom:osmocom /etc/osmocom/osmo-msc.cfg
chmod -v 0660 /etc/osmocom/osmo-msc.cfg
fi
if [ -d /etc/osmocom ]; then
chown -v root:osmocom /etc/osmocom
chmod -v 2775 /etc/osmocom
fi
mkdir -p /var/lib/osmocom
chown -R -v osmocom:osmocom /var/lib/osmocom
fi
;;
esac
# dh_installdeb(1) will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#

163
debian/rules vendored
View File

@ -1,108 +1,67 @@
#!/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.
# You must remove unused comment lines for the released package.
# See debhelper(7) (uncomment to enable)
# This is an autogenerated template for debian/rules.
#
# Output every command that modifies files on the build system.
#export DH_VERBOSE = 1
#
# Copy some variable definitions from pkg-info.mk and vendor.mk
# under /usr/share/dpkg/ to here if they are useful.
#
# See FEATURE AREAS/ENVIRONMENT in dpkg-buildflags(1)
# Apply all hardening options
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# Package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# Package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
#
# With debhelper version 9 or newer, the dh command exports
# all buildflags. So there is no need to include the
# /usr/share/dpkg/buildflags.mk file here if compat is 9 or newer.
#
# These are rarely used code. (START)
#
# The following include for *.mk magically sets miscellaneous
# variables while honoring existing values of pertinent
# environment variables:
#
# Architecture-related variables such as DEB_TARGET_MULTIARCH:
#include /usr/share/dpkg/architecture.mk
# Vendor-related variables such as DEB_VENDOR:
#include /usr/share/dpkg/vendor.mk
# Package-related variables such as DEB_DISTRIBUTION
#include /usr/share/dpkg/pkg-info.mk
#
# You may alternatively set them susing a simple script such as:
# DEB_VENDOR ?= $(shell dpkg-vendor --query Vendor)
#
# These are rarely used code. (END)
#
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# main packaging script based on dh7 syntax
%:
dh $@ --with autoreconf
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
# debmake generated override targets
# Set options for ./configure
CONFIGURE_FLAGS += --enable-iu --enable-smpp --with-systemdsystemunitdir=/lib/systemd/system --enable-manuals
override_dh_auto_configure:
dh_auto_configure -- $(CONFIGURE_FLAGS)
#
# Do not install libtool archive, python .pyc .pyo
#override_dh_install:
# dh_install --list-missing -X.la -X.pyc -X.pyo
# See https://www.debian.org/doc/manuals/developers-reference/best-pkging-practices.html#bpp-dbg
override_dh_strip:
dh_strip --dbg-package=osmo-msc-dbg
CFLAGS = -Wall -g
# Print test results in case of a failure
override_dh_auto_test:
dh_auto_test || (find . -name testsuite.log -exec cat {} \; ; false)
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
config.status: configure
dh_testdir
# Add here commands to configure the package.
CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
build: build-stamp
build-stamp: config.status
dh_testdir
# Add here commands to compile the package.
$(MAKE) -C src/libcommon
$(MAKE) -C src/libgb
$(MAKE) -C src/gprs
#docbook-to-man debian/opensgsn.sgml > opensgsn.1
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp
# Add here commands to clean up after the build process.
-$(MAKE) distclean
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
cp -f /usr/share/misc/config.guess config.guess
endif
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
# Add here commands to install the package into debian/opensgsn.
$(MAKE) -C src/gprs install DESTDIR=$(CURDIR)/debian/opensgsn
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
# dh_install
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
dh_installinit
# dh_installcron
# dh_installinfo
dh_installman
dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
# dh_python
# dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
# Don't create .pdf.gz files (barely saves space and they can't be opened directly by most pdf readers)
override_dh_compress:
dh_compress -X.pdf

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (native)

630
depcomp
View File

@ -1,630 +0,0 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2009-04-28.21; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 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 2, 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/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by `PROGRAMS ARGS'.
object Object file output by `PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputing dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u="sed s,\\\\\\\\,/,g"
depmode=msvisualcpp
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> "$depfile"
echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
icc)
# Intel's C compiler understands `-MD -MF file'. However on
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# ICC 7.0 will fill foo.d with something like
# foo.o: sub/foo.c
# foo.o: sub/foo.h
# which is wrong. We want:
# sub/foo.o: sub/foo.c
# sub/foo.o: sub/foo.h
# sub/foo.c:
# sub/foo.h:
# ICC 7.1 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using \ :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
# Add `dependent.h:' lines.
sed -ne '2,${
s/^ *//
s/ \\*$//
s/$/:/
p
}' "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
# With Tru64 cc, shared objects can also be used to make a
# static library. This mechanism is used in libtool 1.4 series to
# handle both shared and static libraries in a single compilation.
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
#
# With libtool 1.5 this exception was removed, and libtool now
# generates 2 separate objects for the 2 libraries. These two
# compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
tmpdepfile2=$dir$base.o.d # libtool 1.5
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.o.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
tmpdepfile4=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for `:'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
"$@" $dashmflag |
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no eat=no
for arg
do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
if test $eat = yes; then
eat=no
continue
fi
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-arch)
eat=yes ;;
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix=`echo "$object" | sed 's/^.*\././'`
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
IFS=" "
for arg
do
case "$arg" in
-o)
shift
;;
$object)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E 2>/dev/null |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvcmsys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:

5
doc/Makefile.am Normal file
View File

@ -0,0 +1,5 @@
SUBDIRS = \
examples \
manuals \
sequence_charts \
$(NULL)

30
doc/examples/Makefile.am Normal file
View File

@ -0,0 +1,30 @@
OSMOCONF_FILES = \
osmo-msc/osmo-msc.cfg
osmoconfdir = $(sysconfdir)/osmocom
osmoconf_DATA = $(OSMOCONF_FILES)
EXTRA_DIST = $(OSMOCONF_FILES)
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

View File

@ -0,0 +1,30 @@
!
! OsmoMSC configuration saved from vty
!
log stderr
logging color 1
logging print category-hex 0
logging print category 1
logging timestamp 0
logging print file basename last
logging print level 1
line vty
no login
!
network
network country code 001
mobile network code 01
short name OsmoMSC
long name OsmoMSC
encryption a5 0
rrlp mode none
mm info 1
mgw 0
remote-ip 127.0.0.1
remote-port 2427
local-port 2728
msc
assign-tmsi
auth-tuple-max-reuse-count 3
auth-tuple-reuse-on-error 1

View File

@ -0,0 +1,38 @@
!
! OsmoMSC configuration saved from vty
!
log stderr
logging color 1
logging print category-hex 0
logging print category 1
logging timestamp 0
logging print file basename last
logging print level 1
line vty
no login
!
network
network country code 1
mobile network code 1
short name OsmoMSC
long name OsmoMSC
encryption a5 0
rrlp mode none
mm info 1
mgw 0
remote-ip 127.0.0.1
remote-port 2427
local-port 2728
cs7 instance 0
point-code 0.23.1
asp asp-clnt-OsmoMSC-A-Iu 2905 0 m3ua
! where to reach the STP:
remote-ip 127.0.0.5
!local-ip 10.23.24.1
role asp
sctp-role client
msc
cs7-instance-a 0
cs7-instance-iu 0
assign-tmsi

View File

@ -0,0 +1,42 @@
!
! OsmoMSC configuration saved from vty
!
log stderr
logging color 1
logging print category-hex 0
logging print category 1
logging timestamp 0
logging print file basename last
logging print level 1
line vty
no login
!
network
network country code 1
mobile network code 1
short name OsmoMSC
long name OsmoMSC
encryption a5 0
rrlp mode none
mm info 1
mgw 0
remote-ip 127.0.0.1
remote-port 2427
local-port 2728
cs7 instance 0
point-code 0.23.1
asp asp-clnt-OsmoMSC-A 2905 0 m3ua
remote-ip 127.0.0.5
role asp
sctp-role client
cs7 instance 1
point-code 0.23.2
asp asp-clnt-OsmoMSC-Iu 2905 0 m3ua
remote-ip 127.0.0.6
role asp
sctp-role client
msc
cs7-instance-a 0
cs7-instance-iu 1
assign-tmsi

24
doc/manuals/Makefile.am Normal file
View File

@ -0,0 +1,24 @@
EXTRA_DIST = osmomsc-usermanual.adoc \
osmomsc-usermanual-docinfo.xml \
osmomsc-vty-reference.xml \
regen_doc.sh \
chapters \
images \
vty
if BUILD_MANUALS
ASCIIDOC = osmomsc-usermanual.adoc
ASCIIDOC_DEPS = $(srcdir)/chapters/*.adoc
include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.asciidoc.inc
VTY_REFERENCE = osmomsc-vty-reference.xml
include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.vty-reference.inc
BUILT_REFERENCE_XML = $(builddir)/vty/msc_vty_reference.xml
$(builddir)/vty/msc_vty_reference.xml: $(top_builddir)/src/osmo-msc/osmo-msc
mkdir -p $(builddir)/vty
$(top_builddir)/src/osmo-msc/osmo-msc --vty-ref-xml > $@
OSMO_REPOSITORY = osmo-msc
include $(OSMO_GSM_MANUALS_DIR)/build/Makefile.common.inc
endif

View File

@ -0,0 +1,31 @@
[[control]]
== Control interface
The actual protocol is described in <<common-control-if>>, the variables common
to all programs using it are described in <<ctrl_common_vars>>. This section
describes the CTRL interface variables specific to OsmoMSC.
.Variables available on OsmoMSC's Control interface
[options="header",width="100%",cols="20%,5%,5%,50%,20%"]
|===
|Name|Access|Trap|Value|Comment
|subscriber-list-active-v1|RO|No||Return list of active subscribers.
|===
=== subscriber-list-active-v1
Return a list of subscribers that are successfully attached (including full
successful authentication and ciphering if those are enabled).
The reply comprises of one subscriber per line, of the format
----
<IMSI>,<MSISDN>\n[<IMSI>,<MSISDN>\n[...]]
----
For example:
----
901700000015252,22801
901700000015253,22802
----

View File

@ -0,0 +1,4 @@
[[counters]]
== Counters
include::./counters_generated.adoc[]

View File

@ -0,0 +1,56 @@
// autogenerated by show asciidoc counters
These counters and their description based on OsmoMSC 1.4.0 (OsmoMSC).
=== Rate Counters
// generating tables for rate_ctr_group
// rate_ctr_group table mobile switching center
.msc - mobile switching center
[options="header"]
|===
| Name | Reference | Description
| loc_update_type:attach | <<msc_loc_update_type:attach>> | Received Location Update (IMSI Attach) requests.
| loc_update_type:normal | <<msc_loc_update_type:normal>> | Received Location Update (LAC change) requests.
| loc_update_type:periodic | <<msc_loc_update_type:periodic>> | Received (periodic) Location Update requests.
| loc_update_type:detach | <<msc_loc_update_type:detach>> | Received IMSI Detach indications.
| loc_update_resp:failed | <<msc_loc_update_resp:failed>> | Rejected Location Updates requests.
| loc_update_resp:completed | <<msc_loc_update_resp:completed>> | Successful Location Update procedures.
| cm_service_request:rejected | <<msc_cm_service_request:rejected>> | Rejected CM Service Requests.
| cm_service_request:accepted | <<msc_cm_service_request:accepted>> | Accepted CM Service Requests.
| paging_resp:rejected | <<msc_paging_resp:rejected>> | Rejected Paging Responses.
| paging_resp:accepted | <<msc_paging_resp:accepted>> | Accepted Paging Responses.
| sms:submitted | <<msc_sms:submitted>> | Total MO SMS received from the MS.
| sms:no_receiver | <<msc_sms:no_receiver>> | Failed MO SMS delivery attempts (no receiver found).
| sms:deliver_unknown_error | <<msc_sms:deliver_unknown_error>> | Failed MO SMS delivery attempts (other reason).
| sms:delivered | <<msc_sms:delivered>> | Total MT SMS delivery attempts.
| sms:rp_err_mem | <<msc_sms:rp_err_mem>> | Failed MT SMS delivery attempts (no memory).
| sms:rp_err_other | <<msc_sms:rp_err_other>> | Failed MT SMS delivery attempts (other reason).
| call:mo_setup | <<msc_call:mo_setup>> | Received MO SETUP messages (MO call establishment).
| call:mo_connect_ack | <<msc_call:mo_connect_ack>> | Received MO CONNECT messages (MO call establishment).
| call:mt_setup | <<msc_call:mt_setup>> | Sent MT SETUP messages (MT call establishment).
| call:mt_connect | <<msc_call:mt_connect>> | Sent MT CONNECT messages (MT call establishment).
| call:active | <<msc_call:active>> | Calls that ever reached the active state.
| call:complete | <<msc_call:complete>> | Calls terminated by DISCONNECT message after reaching the active state.
| call:incomplete | <<msc_call:incomplete>> | Calls terminated by any other reason after reaching the active state.
| nc_ss:mo_requests | <<msc_nc_ss:mo_requests>> | Received MS-initiated call independent SS/USSD requests.
| nc_ss:mo_established | <<msc_nc_ss:mo_established>> | Established MS-initiated call independent SS/USSD sessions.
| nc_ss:mt_requests | <<msc_nc_ss:mt_requests>> | Received network-initiated call independent SS/USSD requests.
| nc_ss:mt_established | <<msc_nc_ss:mt_established>> | Established network-initiated call independent SS/USSD sessions.
| bssmap:cipher_mode_reject | <<msc_bssmap:cipher_mode_reject>> | Number of CIPHER MODE REJECT messages processed by BSSMAP layer
| bssmap:cipher_mode_complete | <<msc_bssmap:cipher_mode_complete>> | Number of CIPHER MODE COMPLETE messages processed by BSSMAP layer
|===
== Osmo Stat Items
// generating tables for osmo_stat_items
== Osmo Counters
// generating tables for osmo_counters
// ungrouped osmo_counters
.ungrouped osmo counters
[options="header"]
|===
| Name | Reference | Description
| msc.active_calls | <<ungroup_counter_msc.active_calls>> |
| msc.active_nc_ss | <<ungroup_counter_msc.active_nc_ss>> |
|===

View File

@ -0,0 +1,209 @@
[[net]]
== Configuring the Core Network
The core network parameters are configured by the config file (as in `osmo-msc
-c osmo-msc.cfg`). The config file is parsed by the VTY, which is also
available via telnet in the running `osmo-msc` instance. Be aware that even
though you may be able to change these parameters without restarting
`osmo-msc`, some may not take immediate effect, and it is safest to use the
config file to have these parameters set at startup time.
The core network parameters are found in the `config` / `network`.
A full reference to the available commands can be found in the _OsmoMSC VTY
reference manual_ <<vty-ref-osmomsc>>. This section describes only the most
commonly used settings.
Here is an overview of the config items, described in more detail below:
----
network
network country code 262
mobile network code 89
mm info 1
short name OsmoMSC
long name OsmoMSC
authentication required
encryption a5 3
----
[TIP]
====
Use the telnet VTY interface to query the current configuration of a running
`osmo-msc` process:
----
$ telnet localhost 4254
OsmoMSC> enable
OsmoMSC# show running-config
----
Some parameters may be changed without restarting `osmo-msc`. To reach the
`network` node, enter:
----
OsmoMSC> enable
OsmoMSC# configure terminal
OsmoMSC(config)# network
OsmoMSC(config-net)# short name Example-Name
OsmoMSC(config-net)# exit
OsmoMSC(config)#
----
The telnet VTY features tab-completion as well as context sensitive help shown
when entering a `?` question mark.
You can always use the `list` VTY command or enter `?` on the blank prompt to
get a list of all possible commands at the current node.
====
=== MCC/MNC
The key identities of every GSM PLMN is the Mobile Country Code and the Mobile
Network Code. They are identical over the entire network. In most cases, the
MCC/MNC will be allocated to the operator by the respective local regulatory
authority. For example, to set the MCC/MNC of 262-89, have this in your
osmo-msc.cfg:
----
network
network country code 262
mobile network code 89
----
=== Configuring MM INFO
The _MM INFO_ procedure can be used after a successful _LOCATION UPDATE_ in
order to transmit the human-readable network name as well as local time zone
information to the MS. By default, _MM INFO_ is not active, i.e. `0`. Set to `1`
to activate this feature:
----
network
mm info 1
short name OsmoMSC
long name OsmoMSC
----
[NOTE]
====
Not all phones support the MM INFO procedure. If a phone is not
factory-programmed to contain the name for your MCC/MNC, it will likely only
provide a numeric display of the network name, such as _262-89_, or show the
country code transformed into a letter, such as _D 89_.
====
The time information transmitted is determined by the local system time of the
operating system on which OsmoMSC is running.
=== Authentication
A subscriber's IMSI must be entered in the HLR database to be able to attach. A
subscriber-create-on-demand feature is also available, see the _OsmoHLR
reference manual_ <<userman-osmohlr>>.
A known IMSI in the HLR may or may not have authentication keys associated,
which profoundly affects the ability to attach and the algorithms used to
negotiate authentication, as the following sections explain for 2G and 3G.
==== Authentication on 2G
If authentication tokens (such as KI for 2G, or K and OP/OPC for UMTS) are
present in the HLR, OsmoMSC will only attach a subscriber after successful
authentication. Note that the 3G authentication keys are also used on 2G when
the MS indicates UMTS AKA capability, in which case the full UMTS style mutual
authentication may indeed take place on 2G (GERAN).
On 2G, if no authentication keys are present in the HLR for a given subscriber,
OsmoMSC will attach the subscriber _without_ authentication. Subscribers that
lack authentication keys can always be rejected with this setting:
----
network
authentication required
----
==== Authentication on 3G
3G (UTRAN) always requires authentication (a.k.a. Integrity Protection) by
specification, and hence authentication keys must be present in the HLR for a
subscriber to be able to attach on 3G.
OsmoMSC always indicates UIA1 and UIA2 as permitted Integrity Protection
algorithms on 3G.
=== Ciphering
To enable ciphering on the radio link, authentication must take place first:
the Kc resulting from authentication is the key used for ciphering. Hence, to
be able to use ciphering, a subscriber must have authentication tokens
available in the HLR.
==== Ciphering on 2G
The MS, BTS and MSC must agree on a ciphering algorithm to use.
- The MS sends its supported ciphering algorithms via Classmark IEs during
Location Updating.
- Typically the BSC needs to know which A5 ciphers are supported by connected
BTSes, see the `network / encryption a5` configuration item for OsmoBSC
<<vty-ref-osmobsc>>.
- Finally, OsmoMSC may impose that specific A5 ciphers shall not be considered.
It is the responsibility of the BSC to then pick an A5 cipher that satisfies
all requirements.
- In OsmoMSC, A5/0 means that ciphering is turned off.
+
----
network
encryption a5 0
----
- A5/1 and A5/3 are currently supported by Osmocom.
+
----
network
encryption a5 1 3
----
- Never use A5/2: it is an "export grade cipher" and has been deprecated for
its low ciphering strength.
- To allow either no encryption or any of A5/1 or A5/3 based on the presence of
authentication keys and abilities of the MS, SIM and BSC configuration, it is
recommended to enable all ciphers in OsmoMSC. The highest available A5 cipher
will be used; the order in which the A5 options are configured does not
affect the choice.
+
----
network
encryption a5 0 1 3
----
==== Ciphering on 3G
While authentication is always required on 3G, ciphering is optional.
So far OsmoMSC allows switching ciphering on 3G either on or off -- the default
behavior is to enable ciphering. (Individual choice of algorithms may be added
in the future.)
Disable 3G ciphering:
----
network
encryption uea 0
----
Enable 3G ciphering (default):
----
network
encryption uea 1 2
----
OsmoMSC indicates UEA1 and UEA2 as permitted encryption algorithms on 3G.

View File

@ -0,0 +1,65 @@
include::{commondir}/chapters/osmux/osmux.adoc[]
=== Osmux Support in {program-name}
==== {program-name} in a A/IP with IPA/SCCPlite network setup
In this kind of setup, the CN side of BSC co-located MGW is managed by the MSC,
meaning the use of Osmux is transparent to BSC since MSC takes care of both peer
MGW connections. Moreover, in this case the MSC has no dynamic information on
Osmux support in the BSC co-located MGW until `CRCX` time, which means
configuration on both nodes need to be carefully set up so they can work
together.
Osmux usage in {program-name} in managed through the VTY command `osmux
(on|off|only)`. Since there's no dynamic information on Osmux support, it may be
required in the future to have an extra VTY command which can be set per BSC to
fine-tune which ones should use Osmux and which shouldn't.
{program-name} will behave differently during call set up based on the VTY
command presented above:
* `off`: {program-name} won't include an `X-Osmux` extension to `CRCX` sent to
the BSC co-located MGW when configuring the CN side of the MGW endpoint. If
the MGW answers with a `CRCX ACK` containing an `X-Osmux`, {program-name} will
cancel the call establishment.
* `on`: {program-name} will initially configure its co-located MGW to use Osmux, then
similarly send a `CRCX` with an `X-Osmux` extension towards the BSC co-located
MGW. Under this configuration, if the BSC co-located MGW didn't support Osmux,
it could send a `CRCX ACK` without `X-Osmux` extension or fail (depending on
its own configuration), and {program-name} could choose to re-create its local
connection as non-Osmux (RTP) (and possibly try again against BSC co-located
MGW), but this behavior is currently not implemented. As a result, currently
`on` behaves the same as `only`.
* `only`: {program-name} will configure its co-located MGW as well as the BSC
co-located MGW to use Osmux by including the `X-Osmux` MGCP extension. If MGW
rejects to use Osmux, {program-name} will reject the call and the call
establishment will fail.
==== {program-name} in a 3GPP AoIP network setup
Osmux usage in {program-name} in managed through the VTY command `osmux
(on|off|only)`. Once enabled (`on` or `only`), {program-name} will start
appending the vendor specific _Osmux Support_ IE in _BSSMAP RESET_ and _BSSMAP
RESET-ACK_ message towards the BSC in order to announce it supports Osmux, and
BSC will do the same. This way, {program-name} can decide whether to use Osmux
or not based on this information when setting up a call (this time using _Osmux
CID_ IE). It should be noted that this option should not be enabled unless BSCs
managed by {program-name} support handling this extension IE (like OsmoBSC),
3rd-party BSCs might otherwise refuse the related _RESET_/_RESET-ACK_ messages.
{program-name} will behave differently during call set up based on the VTY
command presented above:
* `off`: {program-name} won't use Osmux. That is, it will send a _BSSMAP Assign
Request_ without the _Osmux CID_ IE, and will send a `CRCX` without `X-Osmux`
extension towards its co-located MGW.
* `on`: If BSC announced Osmux support to {program-name} during _BSSMAP RESET_
time, then {program-name} will set up the call to use Osmux (by adding
`X-Osmux` to MGCP `CRCX` and _Osmux CID_ IE to _BSSMAP Assign Request_). If
the BSC didn't announce Osmux support to {program-name}, then {program-name}
will use RTP to set up the call (by avoiding addition of previously described
bits).
* `only`: Same as per `on`, except that {program-name} will allow to set up only
Osmux calls on the CN-side, this is, it will reject to set up voice calls for
BSC which didn't announce Osmux support.

View File

@ -0,0 +1,127 @@
[[overview]]
== Overview
This manual should help you getting started with OsmoMSC. It will cover
aspects of configuring and running the OsmoMSC.
[[intro_overview]]
=== About OsmoMSC
OsmoMSC is the Osmocom implementation of a Mobile Switching Center (MSC) for 2G
and 3G GSM and UMTS mobile networks. Its interfaces are:
- GSUP towards OsmoHLR (or a MAP proxy);
- A over IP towards a BSC (e.g. OsmoBSC);
- IuCS towards an RNC or HNB-GW (e.g. OsmoHNBGW) for 3G voice;
- MNCC (Mobile Network Call Control derived from GSM TS 04.07);
- SMPP 3.4 (Short Message Peer-to-Peer);
- The Osmocom typical telnet VTY and CTRL interfaces.
OsmoMSC originated from the OpenBSC project, which started as a minimalistic
all-in-one implementation of the GSM Network. In 2017, OpenBSC had reached
maturity and diversity (including M3UA SIGTRAN and 3G support in the form of
IuCS and IuPS interfaces) that naturally lead to a separation of the all-in-one
approach to fully independent separate programs as in typical GSM networks.
Before it was split off, OsmoMSC originated from libmsc of the old openbsc.git.
Since a true _A_ interface and IuCS for 3G support is available, OsmoMSC
exists only as a separate standalone entity.
Key differences of the new OsmoMSC compared to the old OsmoNITB are:
- The complete VLR implementation that communicates with the separate HLR
(OsmoHLR) for subscriber management. In contrast to the OsmoNITB, HLR queries
are fully asynchronous, and the separate HLR allows using centralized
subscriber management for both circuit-switched and packet-switched domains
(i.e. one OsmoHLR for both OsmoMSC and OsmoSGSN).
- VLR and HLR brought full UMTS AKA (Authentication and Key Agreement) support,
i.e. Milenage authentication in both the full 3G variant as well as the
backwards compatible 2G variant.
- Addition of a true _A_ interface for 2G voice services. Previously, OsmoBSC
had an SCCPlite based _A_ interface towards 3rd party MSC implementations.
OsmoMSC features a true SCCP/M3UA _A_ interface, which allows running OsmoBSC
against this Osmocom based MSC implementation. The new SCCP/M3UA SIGTRAN for
the _A_ interface is implemented in libosmo-sccp, which is used by OsmoMSC
and OsmoBSC (and others), to establish a link via an STP (e.g. OsmoSTP).
- Addition of an _IuCS_ interface to allow operating 3G voice services, also
via SCCP/M3UA SIGTRAN, for example connecting via OsmoHNBGW to a 3G small
cell device.
Find the OsmoMSC issue tracker and wiki online at
- https://osmocom.org/projects/osmomsc
- https://osmocom.org/projects/osmomsc/wiki
[[fig-gsm]]
.Typical GSM network architecture used with OsmoMSC
[graphviz]
----
digraph G {
rankdir=LR;
MS0 [label="MS"]
MS1 [label="MS"]
MS2 [label="MS"]
MS3 [label="MS"]
UE0 [label="UE"]
UE1 [label="UE"]
BTS0 [label="BTS"]
BTS1 [label="BTS"]
STP [label="STP\n(SCCP routing)"]
HLR [label="HLR+AUC+EIR"]
HNB [label="RNC or hNodeB"]
MGW
MS0->BTS0 [label="Um"]
MS1->BTS0 [label="Um"]
MS2->BTS1 [label="Um"]
MS3->BTS1 [label="Um"]
UE0->HNB
UE1->HNB
BTS0->BSC [label="Abis"]
BTS1->BSC [label="Abis"]
BSC->STP [label="A/SCCP/M3UA"]
STP->MSC [label="A/SCCP/M3UA"]
STP->MSC [label="IuCS/SCCP/M3UA"]
VLR->HLR [label="GSUP"]
HNB->HNBGW [label="Iuh"]
HNBGW->STP [label="IuCS/SCCP/M3UA"]
MSC->MGW [label="MGCP"]
BTS0->MGW [label="RTP"]
BTS1->MGW [label="RTP"]
subgraph cluster_msc {
label = "OsmoMSC";
MSC->SMSC;
MSC->VLR
}
}
----
=== Software Components
This is a brief description of OsmoMSC's internal software components.
==== SMSC
A minimal store-and-forward server for SMS, supporting both MO and MT
SMS service, as well as multi-part messages.
The built-in SMSC also supports an external SMSC interface. For more
information, see <<smpp>>.
==== MSC
The MSC component implements the mobility management (MM) functions of the TS
04.08 and delegates to SMSC for SMS message handling and the VLR for subscriber
management.
Furthermore, it can handle TS 04.08 Call Control (CC), either by use of
an internal MNCC handler, or by use of an external MNCC agent. For more
information see <<mncc>>.
==== VLR
A fully featured Visitor Location Register handles the subscriber management
and authentication, and interfaces via GSUP to the external HLR.

View File

@ -0,0 +1,172 @@
== Running OsmoMSC
The OsmoMSC executable (`osmo-msc`) offers the following command-line
arguments:
=== SYNOPSIS
*osmo-msc* [-h|-V] [-d 'DBGMASK'] [-D] [-c 'CONFIGFILE'] [-s] [-T] [-e 'LOGLEVEL']
=== OPTIONS
*-h, --help*::
Print a short help message about the supported options
*-V, --version*::
Print the compile-time version number of the program
*-d, --debug 'DBGMASK','DBGLEVELS'*::
Set the log subsystems and levels for logging to stderr. This
has mostly been superseded by VTY-based logging configuration,
see <<logging>> for further information.
*-D, --daemonize*::
Fork the process as a daemon into background.
*-c, --config-file 'CONFIGFILE'*::
Specify the file and path name of the configuration file to be
used. If none is specified, use `osmo-msc.cfg` in the current
working directory.
*-s, --disable-color*::
Disable colors for logging to stderr. This has mostly been
deprecated by VTY based logging configuration, see <<logging>>
for more information.
*-T, --timestamp*::
Enable time-stamping of log messages to stderr. This has mostly
been deprecated by VTY based logging configuration, see
<<logging>> for more information.
*-e, --log-level 'LOGLEVEL'*::
Set the global log level for logging to stderr. This has mostly
been deprecated by VTY based logging configuration, see
<<logging>> for more information.
=== Multiple instances
Running multiple instances of `osmo-msc` on the same computer is possible if all
interfaces (VTY, CTRL) are separated using the appropriate configuration
options. The IP based interfaces are binding to local host by default. In order
to separate the processes, the user has to bind those services to specific but
different IP addresses and/or ports.
The VTY and the Control interface can be bound to IP addresses from the loopback
address range, for example:
----
line vty
bind 127.0.0.2
ctrl
bind 127.0.0.2
----
If external SMPP is enabled, you may bind it to a different interface using:
----
smpp
local-tcp-ip 10.23.42.1 2775
----
More on SMPP configuration in <<smpp-config-global>>.
The external MNCC handler is a UNIX domain socket that is created when external MNCC handling is configured. A separate
path must be used per osmo-msc instance:
----
msc
mncc external /tmp/mncc_socket
----
More on MNCC in <<mncc-external>>.
The SGs interface by default listens on 0.0.0.0:29118 (SCTP). Each instance of OsmoMSC must use a different IP address
and/or port. For details about the configuration of the SGs interface, see section <<sgs>>.
For the following links, OsmoMSC acts as a client and does not listen/bind to a
specific interface, and will hence not encounter conflicts for multiple instances
running on the same interface:
- The SCCP/M3UA links are established by OsmoMSC contacting an STP.
- The GSUP link is established by OsmoMSC contacting an HLR.
- The MGCP link is established by OsmoMSC contacting an MGW.
=== Configure primary links
==== Configure SCCP/M3UA to accept _A_ and _IuCS_ links
OsmoMSC acts as client to contact an STP instance and establish an SCCP/M3UA
link.
An example configuration of OsmoMSC's SCCP link:
----
cs7 instance 0
point-code 0.23.1
asp asp-clnt-OsmoMSC-A-Iu 2905 0 m3ua
remote-ip 127.0.0.1
role asp
sctp-role client
----
This configuration is explained in detail in <<cs7_config>>.
Note that _A_ and _IuCS_ may use different SCCP instances, if so desired:
----
cs7 instance 0
asp my-OsmoMSC-A 2905 0 m3ua
remote-ip 10.23.42.1
role asp
sctp-role client
cs7 instance 1
asp my-OsmoMSC-Iu 2905 0 m3ua
remote-ip 10.23.42.2
role asp
sctp-role client
msc
cs7-instance-a 0
cs7-instance-iu 1
----
==== Configure GSUP to reach the HLR
OsmoMSC will assume a GSUP server (OsmoHLR) to run on the local host and the
default GSUP port (4222). Contacting an HLR at a different IP address can be
configured as follows:
----
hlr
! IP address of the remote HLR:
remote-ip 10.23.42.1
! default port is 4222, optionally configurable by:
remote-port 1234
----
==== Configure MGCP to connect to an MGW
OsmoMSC uses a media gateway (typically OsmoMGW) to direct RTP streams. By
default, an MGW is expected to receive MGCP requests on the IANA-registered
default port for MGCP (2427) on local host (127.0.0.1).
Here is an example configuration for a remote MGW:
----
network
mgw 0
remote-ip 10.9.8.7
remote-port 2427
reset-endpoint rtpbridge/* <1>
----
<1> The 'reset-endpoint' setting instructs the OsmoMGW to send a wildcarded
DLCX to the media gateway. This helps to clear lingering calls from the
media gateway when the OsmoMSC is restarted.
OsmoMSC is also able to handle a pool of media gateways for load
distribution. See also <<mgw_pooling>>.
[NOTE]
====
Previous versions of OsmoMSC (1.9.0 and below) didn't have the 'mgw' VTY node and
hence didn't support the MGW pooling feature. Therefore, historically the MGW
related commands where placed under the `msc` VTY node. The MGW related commands
under the `msc` VTY are still parsed and used but its use is deprecated and
hence discouraged in favour of the new `mgw` node. Writing the config to a file
from within OsmoMSC will automatically convert the config to use the new `mgw`
node.
====

View File

@ -0,0 +1,55 @@
[[sgs]]
== SGs interface
OsmoMSC offers an SGs interface using the SGsAP protocol. The SGs interface is an
optional interface between a 2G (GERAN) / 3G (UTRAN) MSC and an 4G (EUTRAN) MME.
Its purpose is to facilitate both CSFB (Circuit-Switched Fall Back) and SMSoS
(SMS over SGs). It is used for Mobility management (MM) and paging procedures
between the EPS (Evolved Packet Services) and CS (Circuit Switched) domain.
=== VTY configuration
The SGs interface implementation in OsmoMSC is automatically active and requires
only minimal configuration. When no specific configuration is provided OsmoMSC
will listen on 0.0.0.0:29118 (SCTP) for incoming connections.
This is sufficient in the most configurations, but in larger installations,
where services are either tied to specific interfaces and/or more instances of
OsmoMSC run in parallel, a custom configuration is necessary.
The user has the option to configure the IP address (`local-ip`) and the SCTP
port (`local-port`) and also the `vlr-name` that OsmoMSC uses to identify itself
towards the MME. It should be noted that the `vlr-name` is usually the DNS name
for the IP address of the VLR/MSC, so IP address used and the `vlr-name` should
match the DNS server entry.
----
sgs
local-ip 127.0.0.1
local-port 29118
vlr-name vlr.example.net
----
In order to fine tune the behavior of the SGs interface the user also has
control over the relevant timers (`ts5`, `ts6-2`, `ts7`, `ts11`, `ts14`, `ts15`)
and counters (`ns7`, `ns11`). Each timer and counter has to be configured
separately. In the following example we change the value of ts and ns11.
----
sgs
timer ts7 23
counter ns11 100
----
[NOTE]
====
In case multiple instances of OsmoMSC run in parallel, it is advised to use a
different `vlr-name` for each instance. In any case it must be ensured that the
SGs interface of each instance is bound to a different IP address and/or port.
====
=== Connection monitoring
The user can use the VTY command `show sgs-connections` to list the MMEs that
are currently connected to OsmoMSC.

View File

@ -0,0 +1,15 @@
msc {
UE, MME, VLR [label="MSC/VLR"], HSS [label="HSS/HLR"];
UE => MME [label="Attach Request"];
UE box HSS [label="Steps 3..16 of LTE Attach procedure TS 23.401"];
MME box MME [label="Derive VLR Number"];
MME => VLR [label="LU Request"];
VLR box VLR [label="Create SGs Association"];
VLR box HSS [label="MAP/GSUP UL / ISD"];
MME <= VLR [label="LU Accept"];
UE box HSS [label="Steps 17..16 of LTE Attach procedure TS 23.401"];
|||;
...;
MME <= VLR [label="Paging Request"];
}

View File

@ -0,0 +1,18 @@
msc {
hscale=2;
UE, ENB [label="eNodeB"], BSS, MME, VLR [label="MSC/VLR"], HSS [label="HSS/HLR"];
UE => MME [label="NAS Extended Service Request"];
ENB <= MME [label="S1-AP UE Context Mod Req with CSFB"];
ENB => MME [label="S1-AP UE Context Mod Resp"];
UE <= ENB [label="NACC (Network Assisted Cell Change)"];
ENB => MME [label="S1-AP S1 UE Context Release Req"];
UE box MME [label="S1 UE Context Release"];
UE box HSS [label="UE changes RAT then LA and/or RA update"];
UE <=> HSS [label="PS Suspend (TS 23.060)"];
UE => BSS [label="CM SERV REQ"];
BSS => VLR [label="COMPL L3 (CM SERV REQ)"];
UE <=> VLR [label="Normal 2G Voice Call"];
}

View File

@ -0,0 +1,21 @@
msc {
hscale=2;
UE, MME, VLR [label="MSC/VLR"], HSS [label="HSS/HLR"], SMSC;
UE box HSS [label="EPS/IMSI attach procedure"];
...;
UE box MME [label="UE triggered Service Request"];
UE => MME [label="UL NAS Transport"];
MME => VLR [label="SGsAP UPLINK UNITDATA\n(CP-DATA/RP-DATA/TPDU)"];
VLR => SMSC [label="MAP/GSUP Forward SM"];
MME <= VLR [label="SGsAP DOWNLINK UNITDATA"];
UE <= MME [label="DL NAS Transport"];
...;
VLR <= SMSC [label="Delivery Report"];
MME <= VLR [label="SGsAP DOWNLINK UNITDATA"];
UE <= MME [label="DL NAS Transport"];
UE => MME [label="UL NAS Transport"];
MME => VLR [label="SGsAP UPLINK UNITDATA"];
MME <= VLR [label="SGsAP RELEASE REQ"];
}

View File

@ -0,0 +1,17 @@
msc {
hscale=2;
UE, ENB [label="eNodeB"], BSS, MME, VLR [label="MSC/VLR"], PSTN;
VLR <= PSTN [label="ISUP IAM or SIP INVITE"];
MME <= VLR [label="SGsAP PAGING REQUEST"];
ENB <= MME [label="Paging"];
UE <= MME [label="Paging"];
UE => MME [label="Extended Service Req"];
MME => VLR [label="SGsAP SERVICE REQUEST"];
ENB <= MME [label="Initial UE Ctx Setup"];
UE => BSS [label="Paging Response"];
BSS => VLR [label="COMPL L3 (PAGING RESP)"];
UE <=> VLR [label="Normal 2G Voice Call"];
}

View File

@ -0,0 +1,22 @@
msc {
hscale=2;
UE, MME, VLR [label="MSC/VLR"], HSS [label="HSS/HLR"], SMSC;
UE box HSS [label="EPS/IMSI attach procedure"];
...;
VLR <= SMSC [label="MAP/GSUP ForwardSM"];
MME <= VLR [label="SGsAP PAGING"];
UE <= MME [label="Paging"];
UE box MME [label="Service Request"];
MME => VLR [label="SGsAP SERVICE REQ"];
MME <= VLR [label="SGsAP DL UNITDATA\n(CP-DATA/RP-DATA/TPDU)"];
UE <= MME [label="DL NAS Transport"];
UE => MME [label="UL NAS Transport"];
MME => VLR [label="SGsAP UL UNITDATA"];
...;
UE => MME [label="UL NAS Transport"];
MME => VLR [label="SGsAP UL UNITDATA"];
VLR => SMSC [label="Delivery report"];
MME <= VLR [label="SGsAP RELEASE REQ"];
}

View File

@ -0,0 +1,47 @@
<revhistory>
<revision>
<revnumber>1</revnumber>
<date>September 18th, 2017</date>
<authorinitials>NH</authorinitials>
<revremark>
Initial version; based on OsmoNITB manual version 2.
</revremark>
</revision>
</revhistory>
<authorgroup>
<author>
<firstname>Neels</firstname>
<surname>Hofmeyr</surname>
<email>nhofmeyr@sysmocom.de</email>
<authorinitials>NH</authorinitials>
<affiliation>
<shortaffil>sysmocom</shortaffil>
<orgname>sysmocom - s.f.m.c. GmbH</orgname>
<jobtitle>Senior Developer</jobtitle>
</affiliation>
</author>
</authorgroup>
<copyright>
<year>2017</year>
<holder>sysmocom - s.f.m.c. GmbH</holder>
</copyright>
<legalnotice>
<para>
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
Version 1.3 or any later version published by the Free Software
Foundation; with the Invariant Sections being just 'Foreword',
'Acknowledgements' and 'Preface', with no Front-Cover Texts,
and no Back-Cover Texts. A copy of the license is included in
the section entitled "GNU Free Documentation License".
</para>
<para>
The Asciidoc source code of this manual can be found at
<ulink url="http://git.osmocom.org/osmo-gsm-manuals/">
http://git.osmocom.org/osmo-gsm-manuals/
</ulink>
</para>
</legalnotice>

View File

@ -0,0 +1,55 @@
:gfdl-enabled:
:program-name: OsmoMSC
OsmoMSC User Manual
====================
Neels Hofmeyr <nhofmeyr@sysmocom.de>
include::./common/chapters/preface.adoc[]
include::{srcdir}/chapters/overview.adoc[]
include::{srcdir}/chapters/running.adoc[]
include::{srcdir}/chapters/control.adoc[]
include::./common/chapters/counters-overview.adoc[]
include::{srcdir}/chapters/counters.adoc[]
include::./common/chapters/vty.adoc[]
include::./common/chapters/logging.adoc[]
include::./common/chapters/sigtran-osmocom.adoc[]
include::./common/chapters/cs7-config.adoc[]
include::./common/chapters/cs7-config.adoc[]
include::{srcdir}/chapters/net.adoc[]
include::./common/chapters/smpp.adoc[]
include::./common/chapters/mncc.adoc[]
include::{srcdir}/chapters/osmux_msc.adoc[]
include::./common/chapters/mgwpool.adoc[]
include::{srcdir}/chapters/sgs.adoc[]
include::./common/chapters/control_if.adoc[]
include::./common/chapters/gsup.adoc[]
include::./common/chapters/vty_cpu_sched.adoc[]
include::./common/chapters/port_numbers.adoc[]
include::./common/chapters/bibliography.adoc[]
include::./common/chapters/glossary.adoc[]
include::./common/chapters/gfdl.adoc[]

View File

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
ex:ts=2:sw=42sts=2:et
-*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-->
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML 5.0//EN"
"http://docbook.org/xml/5.0/dtd/docbook.dtd" [
<!ENTITY chapter-vty SYSTEM "./common/chapters/vty.xml" >
<!ENTITY sections-vty SYSTEM "generated/docbook_vty.xml" >
]>
<book>
<info>
<revhistory>
<revision>
<revnumber>v1</revnumber>
<date>18th September 2017</date>
<authorinitials>nh</authorinitials>
<revremark>Initial</revremark>
</revision>
</revhistory>
<title>OsmoMSC VTY Reference</title>
<copyright>
<year>2017</year>
</copyright>
<legalnotice>
<para>This work is copyright by <orgname>sysmocom - s.f.m.c. GmbH</orgname>. All rights reserved.
</para>
</legalnotice>
</info>
<!-- Main chapters-->
&chapter-vty;
</book>

17
doc/manuals/regen_doc.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh -x
if [ -z "$DOCKER_PLAYGROUND" ]; then
echo "You need to set DOCKER_PLAYGROUND"
exit 1
fi
SCRIPT=$(realpath "$0")
MANUAL_DIR=$(dirname "$SCRIPT")
COMMIT=${COMMIT:-$(git log -1 --format=format:%H)}
cd "$DOCKER_PLAYGROUND/scripts" || exit 1
OSMO_MSC_BRANCH=$COMMIT ./regen_doc.sh osmo-msc 4254 \
"$MANUAL_DIR/chapters/counters_generated.adoc" \
"$MANUAL_DIR/vty/msc_vty_reference.xml"

View File

@ -0,0 +1,21 @@
<vtydoc xmlns='urn:osmocom:xml:libosmocore:vty:doc:1.0'>
<node id='config-mncc-int'>
<name>MNCC Internal Configuration</name>
<description>This node allows to configure the default codecs for
the internal call control handling.</description>
</node>
<node id='config-smpp'>
<name>SMPP Configuration</name>
<description>This node allows to configure the SMPP interface
for interfacing with external SMS applications. This section
contains generic/common SMPP related configuration, and no
per-ESME specific parameters.</description>
</node>
<node id='config-smpp-esme'>
<name>ESME Configuration</name>
<description>This node allows to configure one particular SMPP
ESME, which is an External SMS Entity such as a SMS based
application server. You can define any number of ESME within
the SMPP node of the OsmoNITB VTY.</description>
</node>
</vtydoc>

View File

@ -0,0 +1,34 @@
all:
echo "built only on manual invocation, needs mscgen and dot (graphviz) programs: invoke 'make charts'"
charts: msc dot
EXTRA_DIST = \
$(srcdir)/*.msc \
$(NULL)
CLEANFILES = \
$(builddir)/*.png \
$(NULL)
msc: \
$(builddir)/mncc_call_fsm.png \
$(builddir)/inter_bsc_ho.png \
$(builddir)/inter_msc_ho.png \
$(builddir)/voice_call_external_mncc.png \
$(builddir)/voice_call_internal_mncc.png \
$(builddir)/call_reestablishment.png \
$(NULL)
dot: \
$(NULL)
$(builddir)/%.png: %.msc
mscgen -T png -o $@ $<
$(builddir)/%.png: $(srcdir)/%.dot
dot -Tpng $< > $@
.PHONY: poll
poll:
while true; do $(MAKE) msc dot; sleep 1; done

View File

@ -0,0 +1,33 @@
msc {
hscale="2";
ms[label="MS"],cell1[label="Cell 1 (BTS+BSC)"],cell0[label="Cell 0 (BTS+BSC)"],__msc[label="MSC"];
ms rbox __msc [label="Call Re-Establishment"];
ms note __msc [label="Ongoing voice call: MM is established"];
...;
ms -x cell0 [label="radio link fails"];
ms x- cell0;
__msc abox __msc [label="Keep MM until timeout"];
ms => cell1 [label="Channel Required"];
ms <= cell1 [label="Immediate Assignment"];
ms => cell1 [label="Complete Layer3"];
cell1 => __msc [label="Complete Layer3:\nCM Re-Establishment Request"];
cell0 <= __msc [label="Clear Command"];
cell0 => __msc [label="Clear Complete"];
cell1 <= __msc [label="Authentication Request"];
cell1 => __msc [label="Authentication Response"];
cell1 <= __msc [label="Cipher Mode Commad"];
cell1 => __msc [label="Cipher Mode Complete"];
cell1 <= __msc [label="Assignment Request\nthis Assignment ACKs the CM Re-Establishment"];
ms <= cell1 [label="RR Assignment Command"];
ms => cell1 [label="RR Assignment Complete"];
cell1 => __msc [label="Assignment Complete"];
}

View File

@ -0,0 +1,36 @@
msc {
hscale=2;
bsca [label="BSC-A"], i[label="MSC-I"], a[label="MSC-A"], t[label="MSC-T"], bscb[label="BSC-B"];
i note t [label="'MSC-A,I,T' are explained in 3GPP TS 49.008 '4.3 Roles of MSC-A, MSC-I and MSC-T'"];
i note i [label="I = Internal; the MSC that does BSSMAP to the BSC (may change to a remote MSC-B after HO)"];
a note a [label="A = first; the MSC that has MM control BSSMAP to the BSC (never changes)"];
t note t [label="T = transitory; the MSC that a handover is going towards (may be MSC-A for inter-BSC HO, may be a remote MSC-B)"];
bsca => i [label="BSSMAP Handover Required"];
i -> a [label="BSSMAP Handover Required"];
a -> t [label="MAP Prepare Handover"];
t => bscb [label="BSSMAP Handover Request"];
t <= bscb [label="BSSMAP Handover Request ACK"];
a <- t [label="MAP Prepare Handover Response"];
i <- a [label="MAP Prepare Handover Response"];
bsca <= i [label="BSSMAP Handover Command"];
--- [label="MS sends RACH to new cell"];
t <= bscb [label="BSSMAP Handover Detected"];
a <- t [label="MAP Access Signaling Request"];
t <= bscb [label="BSSMAP Handover Complete"];
a <- t [label="MAP Send End Signal"];
a abox a [label="MSC-A accepts the new BSC"];
i note t [label="previous MSC-I gets dropped, MSC-T becomes the new MSC-I"];
i abox i [label="discard"];
t abox t [label="MSC-I"];
bsca <= i [label="BSSMAP Clear Command"];
}

View File

@ -0,0 +1,82 @@
msc {
hscale=2;
bsca [label="BSC-A"], ai[label="MSC-I (at MSC-A)"], a[label="MSC-A"], bt[label="MSC-T (at MSC-B)"], bi[label="MSC-I (at MSC-B)"], bscb[label="BSC-B"],
ct[label="MSC-T (at MSC-C)"], bscc[label="BSC-C"];
ai note bt [label="'MSC-A,I,T' are explained in 3GPP TS 49.008 '4.3 Roles of MSC-A, MSC-I and MSC-T'"];
ai note ai [label="I = Internal; the MSC that does BSSMAP to the BSC (may change to a remote MSC-B after HO)"];
a note a [label="A = first; the MSC that has MM control (never changes)"];
bt note bi [label="B = second; the MSC that acts as BSS relay for MSC-A"];
bt note bt [label="T = transitory; the MSC that a handover is going towards (may be MSC-A for inter-BSC HO, may be a remote MSC-B)"];
bsca => ai [label="BSSMAP Handover Required"];
ai -> a [label="BSSMAP Handover Required"];
a rbox a [label="MSC-A routes all MSC-T messages to remote MSC-B."];
a => bt [label="MAP Prepare Handover"];
a note bt [label="in Osmocom, MAP messages are actually sent as GSUP, to the HLR"];
bt rbox bt [label="MSC-B routes all MSC-A type messages back to MSC-A."];
bt rbox bt [label="MSC-B generates a Handover MSISDN"];
bt => bscb [label="BSSMAP Handover Request"];
bt <= bscb [label="BSSMAP Handover Request ACK"];
a <= bt [label="MAP Prepare Handover Response"];
a => bt [label="establish SIP call to Handover MSISDN via external MNCC"];
ai <- a [label="BSSMAP Handover Command"];
bsca <= ai [label="BSSMAP Handover Command"];
--- [label="MS sends RACH to new cell"];
bt <= bscb [label="BSSMAP Handover Detected"];
a <= bt [label="MAP Access Signaling Request"];
bt <= bscb [label="BSSMAP Handover Complete"];
a <= bt [label="MAP Send End Signal"];
bt rbox bt [label="MSC-B drops the generated Handover MSISDN"];
a abox a [label="MSC-A accepts the new MSC-B and BSC"];
ai note bt [label="previous MSC-I (A) gets dropped, MSC-T (B) becomes the new MSC-I"];
ai rbox a [label="MSC-A performs all MSC-I tasks via MAP at remote MSC-B's MSC-I."];
bt abox bi [label="MSC-I"];
ai abox ai [label="discard"];
bsca <= ai [label="BSSMAP Clear Command"];
...;
...;
--- [label="Another inter-MSC handover"];
a note bi [label="MSC-A remains in charge"];
bscb => bi [label="BSSMAP Handover Required"];
bi => a [label="BSSMAP Handover Required"];
a rbox a [label="MSC-A routes all MSC-T messages to remote MSC-C."];
a => ct [label="MAP Prepare Handover"];
ct rbox ct [label="MSC-C routes all MSC-A type messages back to MSC-A."];
ct => bscc [label="BSSMAP Handover Request"];
ct <= bscc [label="BSSMAP Handover Request ACK"];
a <= ct [label="MAP Prepare Handover Response"];
a => bi [label="MAP Prepare Handover Response"];
bscb <= bi [label="BSSMAP Handover Command"];
--- [label="MS sends RACH to new cell"];
ct <= bscc [label="BSSMAP Handover Detected"];
a <= ct [label="MAP Access Signaling Request"];
ct <= bscc [label="BSSMAP Handover Complete"];
a <= ct [label="MAP Send End Signal"];
a abox a [label="MSC-A accepts the new MSC-C and BSC"];
bi note ct [label="previous MSC-I (B) gets dropped, MSC-T (B) becomes the new MSC-I"];
ai rbox a [label="MSC-A performs all MSC-I tasks via MAP at remote MSC-C's MSC-I."];
ct abox ct [label="MSC-I"];
bi abox bi [label="discard"];
bscb <= bi [label="BSSMAP Clear Command"];
}

View File

@ -0,0 +1,104 @@
msc {
hscale=3;
msc1[label="osmo-msc"], mncc1[label="MNCC FSM\n(osmo-msc mncc_call.c)"], sipcon1[label="osmo-sip-connector"], sip[label="PBX"], sipcon2[label="osmo-sip-connector"], mncc2[label="MNCC FSM\n(osmo-msc mncc_call.c)"], msc2[label="osmo-msc"];
msc1 note sipcon1 [label="MO call"];
sipcon2 note msc2 [label="MT call"];
mncc1 abox mncc1 [label="MNCC_CALL_ST_NOT_STARTED"];
msc1 rbox msc1 [label="mncc_outgoing_start()"];
msc1 -> mncc1 [label="MNCC_CALL_EV_OUTGOING_START"];
mncc1 abox mncc1 [label="MNCC_CALL_ST_OUTGOING_WAIT_PROCEEDING"];
mncc1 => sipcon1 [label="MNCC_SETUP_IND
\n callref, IMSI, called and calling number, SDP"];
sipcon1 => sip [label="SIP INVITE
\n from, to, SDP"];
sipcon1 <= sip [label="SIP 100 Trying"];
mncc1 <= sipcon1 [label="MNCC_RTP_CREATE
\n callref"];
mncc1 rbox mncc1 [label="mncc_rx_rtp_create()"];
mncc1 => sipcon1 [label="MNCC_RTP_CREATE
\n callref, RTP IP address and port"];
mncc1 <= sipcon1 [label="MNCC_CALL_PROC_REQ
\n callref, RTP IP address and port"];
mncc1 abox mncc1 [label="MNCC_CALL_ST_OUTGOING_WAIT_COMPLETE"];
sip => sipcon2 [label="SIP INVITE
\n from, to, SDP"];
sipcon2 => sip [label="SIP 100 Trying"];
msc2 <= sipcon2 [label="MNCC_SETUP_REQ
\n callref, called and calling number
\n SDP"];
mncc2 abox mncc2 [label="MNCC_CALL_ST_NOT_STARTED"];
msc2 rbox msc2 [label="mncc_incoming_start()"];
msc2 -> mncc2 [label="MNCC_CALL_EV_INCOMING_START"];
mncc2 abox mncc2 [label="MNCC_CALL_ST_INCOMING_WAIT_COMPLETE"];
mncc2 => sipcon2 [label="MNCC_CALL_CONF_IND
\n callref, bearer capabilities, cccap and IMSI, SDP?"];
mncc2 <= sipcon2 [label="MNCC_RTP_CREATE
\n callref"];
mncc2 rbox mncc2 [label="mncc_rx_rtp_create()"];
mncc2 => sipcon2 [label="MNCC_RTP_CREATE
\n callref, RTP IP address and port, SDP?"];
mncc2 => sipcon2 [label="MNCC_ALERT_IND
\n callref"];
sipcon2 => sip [label="SIP 180 Ringing
\n SDP"];
sipcon1 <= sip [label="SIP 180 Ringing
\n SDP"];
mncc1 <= sipcon1 [label="MNCC_ALERT_REQ
\n callref and progress"];
sipcon1 => sip [label="SIP PRACK 180 Ringing"];
sipcon1 <= sip [label="SIP PRACK 200"];
mncc1 <= sipcon1 [label="MNCC_RTP_CONNECT
\n callref, RTP IP and port"];
mncc1 rbox mncc1 [label="mncc_rx_rtp_connect()"];
msc1 <- mncc1 [label="rtp_stream_set_remote_addr()"];
mncc2 => sipcon2 [label="MNCC_SETUP_CNF
\n callref, imsi and connected number, SDP?"];
sipcon2 => sip [label="SIP 200 OK
\n SDP"];
mncc2 <= sipcon2 [label="MNCC_RTP_CONNECT
\n callref, RTP IP and port"];
mncc2 rbox mncc2 [label="mncc_rx_rtp_connect()"];
mncc2 <= sipcon2 [label="MNCC_SETUP_COMPL_REQ
\n callref"];
mncc2 abox mncc2 [label="MNCC_CALL_ST_TALKING"];
sipcon1 <= sip [label="SIP 200 OK INVITE"];
mncc1 <= sipcon1 [label="MNCC_SETUP_RSP
\n callref"];
mncc1 => sipcon1 [label="MNCC_SETUP_COMPL_IND
\n callref"];
mncc1 abox mncc1 [label="MNCC_CALL_ST_TALKING"];
sipcon1 => sip [label="SIP ACK"];
...;
... [label="Call goes on for a while..."];
...;
mncc1 rbox mncc1 [label="mncc_release()"];
mncc1 => sipcon1 [label="MNCC_DISC_IND
\n callref and cause"];
mncc1 abox mncc1 [label="MNCC_CALL_ST_WAIT_RELEASE_ACK"];
sipcon1 => sip [label="SIP BYE"];
sipcon1 <= sip [label="SIP 200 OK"];
mncc1 <= sipcon1 [label="MNCC_REL_REQ
\n callref and cause"];
sip => sipcon2 [label="SIP BYE"];
sip <= sipcon2 [label="SIP 200 OK"];
mncc2 <= sipcon2 [label="MNCC_DISC_REQ
\n callref and cause"];
mncc2 => sipcon2 [label="MNCC_REL_IND
\n callref and cause"];
mncc2 abox mncc2 [label="terminated"];
mncc1 => sipcon1 [label="MNCC_REL_CNF
\n callref"];
mncc1 abox mncc1 [label="terminated"];
}

View File

@ -0,0 +1,753 @@
#!/usr/bin/env python3
doc=r'''
Reading a log, it can be hard to figure out what is the important bit going on.
This is a tool that reads an osmo-msc log and tries to compose a ladder diagram from it automatically.
'''
import argparse
import sys
import re
import tempfile
import os
def error(*msg):
sys.stderr.write('%s\n' % (''.join(msg)))
exit(1)
def quote(msg, quote='"'):
return '"%s"' % (msg.replace('"', r'\"'))
class Entity:
def __init__(self, name, descr=None, attrs={}):
self.name = name
self.descr = descr
self.attrs = attrs
class Arrow:
def __init__(self, mo_mt, left, arrow, right, descr=None, attrs={}, ran_conn=None, imsi=None, tmsi=None):
self.mo_mt = mo_mt
self.left = left
self.arrow = arrow
self.right = right
self.descr = descr
self.attrs = attrs
self.ran_conn = ran_conn
self.imsi = imsi
self.tmsi = tmsi
def __repr__(self):
return 'Arrow(%s %s %s %s: %s IMSI=%s)' % (self.mo_mt, self.left, self.arrow, self.right, self.descr, self.imsi)
class Separator:
def __init__(self):
self.separator = None
self.descr = None
self.attrs = {}
class EmptyLine:
def __init__(self):
self.count = 1
MS = 'ms'
UE = 'ms' #'ue'
MS_UE_UNKNOWN = 'ms' #None
MSC = 'msc'
MGW = 'mgw'
MNCC = 'mncc'
MO = 'mo'
MT = 'mt'
MO_MT_UNKNOWN = None
class OutputBase:
def __init__(self, write_to, start_with_re=None):
self._write_to = write_to
self.start_with_re = None
if start_with_re is not None:
self.start_with_re = re.compile(start_with_re)
def head(self):
self.writeln('# Generated by osmo-msc.git/doc/sequence_charts/msc_log_to_ladder.py')
def tail(self):
pass
def render(self, diagram):
self.head()
if diagram.root_attrs:
self.root_attrs(diagram.root_attrs)
self.entities(diagram.entities)
started = (self.start_with_re is None)
for line in diagram.lines:
if not started:
if hasattr(line, 'descr') and self.start_with_re.match(line.descr):
started = True
else:
continue
self.add(line)
self.tail()
def entities(self, entities):
for entity in entities:
self.entity(entity)
def write(self, line):
self._write_to.write(line)
def writeln(self, line):
self.write('%s\n' % line)
def emptyline(self, emptyline):
self.write('\n' * emptyline.count);
def add(self, thing):
func = getattr(self, thing.__class__.__name__.lower())
func(thing)
class OutputLadder(OutputBase):
def indent_multiline(self, s):
return s.replace('\n', '\n\t')
def attrs_str(self, attrs, prefix=' '):
if not attrs:
return ''
return '%s{%s}' % (prefix or '', ','.join('%s=%s' % (k,v) for k,v in attrs.items()))
def root_attrs(self, attrs):
self.writeln(self.attrs_str(attrs, prefix=None))
def entity(self, entity):
self.writeln('%s = %s%s' % (entity.name, self.indent_multiline(entity.descr), self.attrs_str(entity.attrs)))
def arrow(self, arrow):
mo_mt = arrow.mo_mt or MO
def prepend_mo_mt(name):
if name in ('.', MNCC):
return name
return '%s%s' % (mo_mt, name)
self.writeln('%s %s %s%s%s%s'
% (prepend_mo_mt(arrow.left),
arrow.arrow,
prepend_mo_mt(arrow.right),
'\t' if arrow.descr else '',
self.indent_multiline(arrow.descr or ''),
self.attrs_str(arrow.attrs)))
def separator(self, sep_str, descr, attrs):
self.writeln('%s%s%s%s'
% (separator.separator,
' ' if separator.descr else '',
self.indent_multiline(separator.descr or ''),
self.attrs_str(separator.attrs)))
class OutputMscgen(OutputBase):
ARROWS = {
'>' : '=>>',
'->' : '=>',
'-->' : '>>',
'~>' : '->',
'=>' : ':>',
'-><' : '-x',
'<' : '<<=',
'<-' : '<=',
'<--' : '<<',
'<~' : '<-',
'<=' : '<:',
'><-' : 'x-',
'<>' : 'abox',
'()' : 'rbox',
'[]' : 'note',
}
def head(self):
super().head()
self.writeln('msc {')
def tail(self):
self.writeln('}')
def entities(self, entities):
estr = []
for entity in entities:
estr.append('%s%s' % (entity.name, self.attrs_str(self.all_attrs(entity.descr, entity.attrs), prefix='')))
if not estr:
return
self.writeln('%s;' % (','.join(estr)))
def attrs_list_str(self, attrs):
if not attrs:
return ''
def escape(s):
return s.replace('\n', r'\n').replace('\r', '').replace('\t', r'\t')
return ','.join('%s="%s"' % (k,escape(v)) for k,v in attrs.items())
def attrs_str(self, attrs, prefix=' '):
attrs_list_str = self.attrs_list_str(attrs)
if not attrs_list_str:
return ''
return '%s[%s]' % (prefix or '', attrs_list_str)
def root_attrs(self, attrs):
if not attrs:
return
self.writeln('%s;' % self.attrs_list_str(attrs))
def all_attrs(self, descr, attrs):
a = {}
if descr:
a['label'] = descr
a.update(attrs)
return a
def entity(self, entity):
error('OutputMscgen.entity() should not be called')
def arrow_txlate(self, arrow):
txlate = OutputMscgen.ARROWS.get(arrow)
if not txlate:
error('Unknown arrow: %r' % arrow)
return txlate
def arrow(self, arrow):
mo_mt = arrow.mo_mt or MO
def prepend_mo_mt(name):
if name in ('.', MNCC):
return name
return '%s%s' % (mo_mt, name)
l = prepend_mo_mt(arrow.left)
r = arrow.right
if r == '.':
r = l
else:
r = prepend_mo_mt(r)
a = {'label': arrow.descr}
a.update(arrow.attrs)
attrs = self.attrs_str(a)
self.writeln('%s %s %s%s;'
% (l, self.arrow_txlate(arrow.arrow), r,
self.attrs_str(self.all_attrs(arrow.descr, arrow.attrs), prefix='\t')))
def separator(self, sep_str, descr, attrs):
self.writeln('%s%s%s%s;'
% (separator.separator,
self.attrs_str(self.all_attrs(descr, attrs), prefix='\t')))
def emptyline(self, emptyline):
self.write('\n' * emptyline.count);
def ms_from_ran(ran_type_or_conn):
if ran_type_or_conn.startswith('UTRAN-Iu'):
return UE
if ran_type_or_conn.startswith('RANAP'):
return UE
if ran_type_or_conn.startswith('GERAN-A'):
return MS
if ran_type_or_conn.startswith('BSS'):
return MS
return MS_UE_UNKNOWN
class Diagram:
def __init__(self):
self.root_attrs = {}
self.entities = []
self.lines = []
self.mo_mt_unknown_lines = []
def add_line(self, line):
self.lines.append(line)
def resolve_unknown_mo_mt(self):
def try_match(a, b):
if a < 0 or a >= len(self.lines):
return False
if b < 0 or b >= len(self.lines):
return False
la = self.lines[a]
lb = self.lines[b]
if not hasattr(lb, 'mo_mt'):
return False
if lb.mo_mt == MO_MT_UNKNOWN:
return False
for match_attr in ('imsi', 'tmsi', 'ran_conn'):
if not hasattr(la, match_attr):
continue
if not hasattr(lb, match_attr):
continue
la_attr = getattr(la, match_attr)
if la_attr is None:
continue
lb_attr = getattr(lb, match_attr)
if la_attr == lb_attr:
la.mo_mt = lb.mo_mt
return True
return False
while True:
changes = 0
for i in range(len(self.lines)):
line = self.lines[i]
if not hasattr(line, 'mo_mt'):
continue
if line.mo_mt is not MO_MT_UNKNOWN:
continue
# don't know MO/MT, try to resolve from near messages
for j in range(1,100):
if try_match(i, i-j):
break
if try_match(i, i+j):
break
if line.mo_mt is not MO_MT_UNKNOWN:
changes += 1
if not changes:
break
re_source_file_last = re.compile(r'(.*) \(([^):]+:[0-9]+)\)$')
class Rule:
def __init__(self, name, re_str, handler):
self.name = name
self.re = re.compile(re_str)
self.handler = handler
def match(self, line):
m = self.re.match(line)
if not m:
return False
return self.handler(m)
def mo_mt_from_l3type(l3type):
if l3type == 'PAGING_RESP':
return MT
elif l3type == 'CM_SERVICE_REQ':
return MO
else:
return MO_MT_UNKNOWN
def int_to_hex(val, bits):
return hex((int(val) + (1 << bits)) % (1 << bits))
class Callref:
MAX = 0x7fffffff
MIN = -0x80000000
BITS = 32
def int_to_hex(val):
return int_to_hex(val, Callref.BITS)
def hex_to_int(hexstr):
val = int(hexstr, 16)
if val > Callref.MAX:
val = Callref.MIN + (val & Callref.MAX)
return val
class Parse:
def __init__(self, output, mask_values=False):
self.diagram = Diagram()
self.output = output
self.linenr = 0
self.rules = []
self.rules_hit = {}
self.seen_udtrace_mncc = False
self.callrefs_mo_mt = {}
self.mask_values = mask_values
self.masked_values = {}
for member in dir(self):
if not member.startswith('rule_'):
continue
func = getattr(self, member)
if not callable(func):
continue
docstr = func.__doc__
if not docstr:
continue
re_str = docstr.splitlines()[0]
self.rules.append(Rule(name=member, re_str=re_str, handler=func))
self.rules_hit[member] = 0
def error(self, *msg):
error('line %d: ' % self.linenr, *msg)
def start(self):
self.diagram.root_attrs = {'hscale': '3'}
for name, descr in (
('moms', 'MS,BSS (MO)\\nUE,hNodeB (MO)'),
#('moue', 'UE,hNodeB (MO)'),
('momgw', 'MGW for MSC (MO)'),
('momsc', 'MSC (MO)'),
('mncc', 'MNCC'),
('mtmsc', 'MSC (MT)'),
('mtmgw', 'MGW for MSC (MT)'),
('mtms', 'BSS,MS (MT)\\nhNodeB,UE (MT)'),
#('mtue', 'hNodeB,UE (MT)'),
):
self.diagram.entities.append(Entity(name, descr))
def end(self):
self.diagram.resolve_unknown_mo_mt()
self.output.render(self.diagram)
def mask_value(self, name, val):
if not self.mask_values:
return val
if not val:
return val
name_dict = self.masked_values.get(name)
if not name_dict:
name_dict = {}
self.masked_values[name] = name_dict
masked_val = name_dict.get(val)
if masked_val is None:
masked_val = '%s-%d' % (name, len(name_dict) + 1)
name_dict[val] = masked_val
return masked_val
def add_line(self, line):
self.linenr += 1
if line.endswith('\n'):
line = line[:-1]
if line.endswith('\r'):
line = line[:-1]
self.interpret(line)
def interpret(self, line):
m = re_source_file_last.match(line)
if m:
line = m.group(1)
for rule in self.rules:
if rule.match(line):
self.rules_hit[rule.name] = self.rules_hit.get(rule.name, 0) + 1
break
RE_DTAP_NAME = re.compile('.*GSM48_MT_([^_]+)_(.+)')
def rule_paging(self, m):
r'.*ran_peer\(([^:]+):.* Paging for ([^ ]+) on ([^ ]+)'
ran_type, subscr, cell = m.groups()
self.diagram.add_line(Arrow(MT, ms_from_ran(ran_type), '<', MSC, 'Paging'))
return True
RE_IMSI = re.compile('IMSI-([0-9]+)')
RE_TMSI = re.compile('TMSI-0x([0-9a-fA-F]+)')
def rule_dtap(self, m):
r'.*msc_a\(([^)]*):([^:]+):([^:]+)\).* (Dispatching 04.08 message|Sending DTAP): (.+)$'
subscr, ran_conn, l3type, rx_tx, dtap = m.groups()
tx = (rx_tx == 'Sending DTAP')
m = self.RE_DTAP_NAME.match(dtap)
if m:
dtap = '%s %s' % m.groups()
if 'IMSI_DETACH_IND' in dtap:
# detecting IMSI Detach separately, because this log line does not contain the IMSI.
# By using the rule_imsi_detach(), we can accurately put it on the MO/MT side.
return True
if l3type == 'NONE' and not tx and dtap.endswith('PAG_RESP'):
e = MT
else:
e = mo_mt_from_l3type(l3type)
imsi = None
for m in Parse.RE_IMSI.finditer(subscr):
imsi = m.group(1)
tmsi = None
for m in Parse.RE_TMSI.finditer(subscr):
tmsi = m.group(1)
self.diagram.add_line(Arrow(e, ms_from_ran(ran_conn), '<' if tx else '>', MSC, dtap,
ran_conn=ran_conn, imsi=imsi, tmsi=tmsi))
return True
def rule_imsi_detach(self, m):
r'.*IMSI DETACH for IMSI-([0-9]+):.*'
imsi = m.group(1)
e = MO_MT_UNKNOWN
self.diagram.add_line(Arrow(e, MS_UE_UNKNOWN, '>', MSC, 'IMSI Detach', imsi=imsi))
return True
def rule_mgcp_tx(self, m):
r'.*mgw-endp\([^)]*:([^:]+):([^:]+)\).* (rtpbridge[^ ]+) .* RTP_TO_(RAN|CN)( CI=([^:]+)|): ([^ :]+).*: Sending'
ran, l3type, endp, rtp_to, cond_ci, ci, verb = m.groups()
e = mo_mt_from_l3type(l3type)
if '*' not in endp:
endp = self.mask_value('EP', endp)
ci = self.mask_value('CI', ci)
ci_str = ''
if ci:
ci_str = ' %s' % ci
self.diagram.add_line(Arrow(e, MGW, '<', MSC, 'for %s: %s\\n%s%s' % (rtp_to, verb, endp, ci_str)))
return True
def rule_mgcp_rx(self, m):
r'.*mgw-endp\(([^)]+):([^:)]+):([^:)]+)\).* (rtpbridge[^ ]+) .* RTP_TO_(RAN|CN)( CI=([^:]+)|).*: received successful response to ([^:]+): RTP=[^:]+:([0-9.:]+)'
subscr, ran_conn, l3type, endp, rtp_to, cond_ci, ci, verb, rtp = m.groups()
e = mo_mt_from_l3type(l3type)
endp = self.mask_value('EP', endp)
ci = self.mask_value('CI', ci)
ci_str = ''
if ci:
ci_str = ' %s' % ci
rtp = self.mask_value('IP:port', rtp)
self.diagram.add_line(Arrow(e, MGW, '>', MSC, 'for %s: %s OK\\n%s%s %s' % (rtp_to, verb, endp, ci_str, rtp)))
return True
def rule_ran_tx(self, m):
r'.*msc_a\(([^)]+):([^:)]+):([^:)]+)\).* RAN encode: ([^: ]+): (.+)$'
subscr, ran_conn, l3type, ran_type, msg_type = m.groups()
if msg_type in ('DTAP', 'DirectTransfer'):
# will get DTAP details from rule_dtap() instead, not from BSSMAP logging
return True
if msg_type.startswith('Tx'):
# skip 'Tx RANAP SECURITY MODE COMMAND to RNC, ik 47...'
return True
if '=' in msg_type:
# skip 'RAB Assignment: rab_id=1, rtp=192.168.178.66:50008, use_x213_nsap=1'
return True
e = mo_mt_from_l3type(l3type)
imsi = None
for m in Parse.RE_IMSI.finditer(subscr):
imsi = m.group(1)
tmsi = None
for m in Parse.RE_TMSI.finditer(subscr):
tmsi = m.group(1)
self.diagram.add_line(Arrow(e, ms_from_ran(ran_conn), '<', MSC, '(%s) %s' % (ran_type, msg_type),
ran_conn=ran_conn, imsi=imsi, tmsi=tmsi))
return True
def rule_ran_rx(self, m):
r'.*msc_a\(([^)]+):([^:)]+):([^:)]+)\).* RAN decode: ([^: ]+) (.+)$'
subscr, ran_conn, l3type, ran_type, msg_type = m.groups()
if msg_type in ('DTAP', 'DirectTransfer', 'DirectTransfer RAN PDU'):
# will get DTAP details from rule_dtap() instead, not from BSSMAP logging
return True
e = mo_mt_from_l3type(l3type)
imsi = None
for m in Parse.RE_IMSI.finditer(subscr):
imsi = m.group(1)
tmsi = None
for m in Parse.RE_TMSI.finditer(subscr):
tmsi = m.group(1)
self.diagram.add_line(Arrow(e, ms_from_ran(ran_type), '>', MSC, '(%s) %s' % (ran_type, msg_type),
ran_conn=ran_conn, imsi=imsi, tmsi=tmsi))
return True
def rule_cc_state(self, m):
r'.*trans\(CC[^) ]* [^ )]+:([^:)]+) callref-([^ ]+) [^)]+\) new state ([^ ]+) -> ([^ ]+)'
l3type, callref_hex, from_state, to_state = m.groups()
e = mo_mt_from_l3type(l3type)
self.callrefs_mo_mt[callref_hex] = e
self.diagram.add_line(Arrow(e, MSC, '<>', '.', 'CC state:\\n%s' % to_state))
return True
def rule_log_mncc_no_rtp(self, m):
r'.*trans\(CC[^) ]* [^ )]+:([^:)]+) callref-([^ ]+) [^)]+\) (tx|rx) (MNCC_[^ ]*)$'
l3type, callref_hex, tx_rx, mncc_msg = m.groups()
if self.seen_udtrace_mncc:
# If no udtrace is present, take the MNCC logging.
# But if there is udtrace logging available, we should not duplicate those MNCC lines.
return True
tx = (tx_rx == 'tx')
try:
e = self.callrefs_mo_mt.get(callref_hex, MT)
except:
e = MT
self.diagram.add_line(Arrow(e, MSC, '>' if tx else '<', 'mncc', mncc_msg))
return True
def rule_log_mncc_with_rtp(self, m):
r'.*trans\(CC[^) ]* [^ )]+:([^:)]+) callref-([^ ]+) [^)]+\) (tx|rx) (MNCC_[^ ]*) \(RTP=([^){]+)(|{.*})\)$'
l3type, callref_hex, tx_rx, mncc_msg, rtp, codec = m.groups()
if self.seen_udtrace_mncc:
# If no udtrace is present, take the MNCC logging.
# But if there is udtrace logging available, we should not duplicate those MNCC lines.
return True
tx = (tx_rx == 'tx')
try:
e = self.callrefs_mo_mt.get(callref_hex, MT)
except:
e = MT
rtp = self.mask_value('IP:port', rtp)
self.diagram.add_line(Arrow(e, MSC, '>' if tx else '<', 'mncc', f'{mncc_msg}\\n{rtp}'))
return True
RE_MNCC_RTP = re.compile(' ip := ([^, ]+), rtp_port := ([0-9]+),')
RE_MNCC_CALLREF = re.compile(' callref := ([^ ,]+), ')
# detecting MNCC with udtrace has the advantage that we also get an indication whether RTP information is
# present
def rule_udtrace_mncc(self, m):
r'.*(write|recv).* (Tx|Rx): \{ msg_type := ([^ ]+) .* u := \{ (.*) \} \}$'
write_recv, tx_rx, msg_type, u = m.groups()
self.seen_udtrace_mncc = True
tx = (tx_rx == 'Tx')
callref_intstr = None
for m in Parse.RE_MNCC_CALLREF.finditer(u):
callref_intstr = m.group(1)
if not callref_intstr:
# log only MNCC that has a callref
return True
try:
e = self.callrefs_mo_mt.get(Callref.int_to_hex(callref_intstr), MT)
except:
e = MT
descr = msg_type
for m in Parse.RE_MNCC_RTP.finditer(u):
ip_str, port_str = m.groups()
try:
if int(ip_str) == 0 or int(port_str) == 0:
break
except:
break
ip_hex = int_to_hex(ip_str, 32)
ip = []
ip_val = int(ip_hex, 16)
for byte in range(4):
ip.insert(0, (ip_val & (0xff << (8*byte))) >> (8*byte))
rtp_info = '%s:%s' % ('.'.join(str(b) for b in ip), port_str)
rtp_info = self.mask_value('IP:port', rtp_info)
descr = '%s\\n%s' % (descr, rtp_info)
break
self.diagram.add_line(Arrow(e, MSC, '>' if tx else '<', 'mncc', descr))
return True
def rule_cc_timer(self, m):
r'.*trans\(CC.*IMSI-([0-9]+):.*\) (starting|stopping pending) (guard timer|timer T[0-9]+)( with ([0-9]+) seconds|)'
imsi, start_stop, t, with_cond, s = m.groups()
start = (start_stop == 'starting')
e = MO_MT_UNKNOWN
if start:
self.diagram.add_line(Arrow(e, MSC, '[]', '.', 'CC starts %s (%ss)' % (t, s), imsi=imsi))
else:
self.diagram.add_line(Arrow(e, MSC, '[]', '.', 'CC stops %s' % (t), imsi=imsi))
return True
def translate(inf, outf, cmdline):
if cmdline.output_format == 'mscgen':
output = OutputMscgen(outf, cmdline.start_with_re)
else:
output = OutputLadder(outf, cmdline.start_with_re)
parse = Parse(output, cmdline.mask_values)
parse.start()
while inf.readable():
line = inf.readline()
if not line:
break;
parse.add_line(line)
parse.end()
if cmdline.verbose:
for name, count in parse.rules_hit.items():
print(f" {name}: {count}")
def open_output(inf, cmdline):
if cmdline.output_file == '-':
translate(inf, sys.stdout, cmdline)
else:
with tempfile.NamedTemporaryFile(dir=os.path.dirname(cmdline.output_file), mode='w', encoding='utf-8') as tmp_out:
translate(inf, tmp_out, cmdline)
if os.path.exists(cmdline.output_file):
os.unlink(cmdline.output_file)
os.link(tmp_out.name, cmdline.output_file)
def open_input(cmdline):
if cmdline.input_file == '-':
open_output(sys.stdin, cmdline)
else:
with open(cmdline.input_file, 'r') as f:
open_output(f, cmdline)
def main(cmdline):
open_input(cmdline)
if __name__ == '__main__':
parser = argparse.ArgumentParser(description=doc)
parser.add_argument('-i', '--input-file', dest='input_file', default="-",
help='Read from this file, or stdin if "-"')
parser.add_argument('-o', '--output-file', dest='output_file', default="-",
help='Write to this file, or stdout if "-"')
parser.add_argument('-t', '--output-format', dest='output_format', default="mscgen",
choices=('mscgen','ladder'),
help='Pick output format: mscgen format or libosmocore/contrib/ladder_to_msc.py format')
parser.add_argument('-m', '--mask-values', dest='mask_values', action='store_true',
help='Do not output specific values like IP address, port, endpoint CI, instead just indicate that a value is'
' present. This makes the output reproducible across various logs.')
parser.add_argument('-s', '--start-with', dest='start_with_re', default=None,
help='Skip until the first message with this label (regex), e.g. -s "CC SETUP"')
parser.add_argument('-v', '--verbose', dest='verbose', action='store_true',
help='show some debug info, like which regex rules were hit and which were not.')
cmdline = parser.parse_args()
main(cmdline)
# vim: shiftwidth=8 noexpandtab tabstop=8 autoindent nocindent

View File

@ -0,0 +1,124 @@
# Generated by osmo-msc.git/doc/sequence_charts/msc_log_to_ladder.py
msc {
hscale="3";
moms[label="MS,BSS (MO)\nUE,hNodeB (MO)"],momgw[label="MGW for MSC (MO)"],momsc[label="MSC (MO)"],mncc[label="MNCC"],mtmsc[label="MSC (MT)"],mtmgw[label="MGW for MSC (MT)"],mtms[label="BSS,MS (MT)\nhNodeB,UE (MT)"];
moms =>> momsc [label="(BSSMAP) Complete Layer 3 Information"];
moms =>> momsc [label="MM CM_SERV_REQ"];
moms <<= momsc [label="MM AUTH_REQ"];
moms =>> momsc [label="MM AUTH_RESP"];
moms <<= momsc [label="(BSSMAP) CIPHER_MODE_COMMAND"];
moms =>> momsc [label="(BSSMAP) Ciphering Mode Complete"];
moms <<= momsc [label="(BSSMAP) COMMON_ID"];
moms =>> momsc [label="RR CIPH_M_COMPL"];
moms =>> momsc [label="CC SETUP"];
momsc note momsc [label="CC starts guard timer (180s)"];
momsc abox momsc [label="CC state:\nINITIATED"];
momgw <<= momsc [label="for CN: CRCX\nrtpbridge/*@msc"];
momgw =>> momsc [label="for CN: CRCX OK\nEP-1 CI-1 IP:port-1"];
momsc =>> mncc [label="MNCC_SETUP_IND\nIP:port-1"];
momgw <<= momsc [label="for RAN: CRCX\nEP-1"];
momsc <<= mncc [label="MNCC_RTP_CREATE"];
momgw =>> momsc [label="for RAN: CRCX OK\nEP-1 CI-2 IP:port-2"];
moms <<= momsc [label="(BSSMAP) ASSIGNMENT_COMMAND"];
moms =>> momsc [label="(BSSMAP) Assignment Complete"];
momgw <<= momsc [label="for RAN: MDCX\nEP-1 CI-2"];
momsc =>> mncc [label="MNCC_RTP_CREATE\nIP:port-1"];
momsc <<= mncc [label="MNCC_CALL_PROC_REQ"];
momsc note momsc [label="CC stops guard timer"];
momsc note momsc [label="CC starts guard timer (180s)"];
momsc abox momsc [label="CC state:\nMO_CALL_PROC"];
moms <<= momsc [label="CC CALL_PROC"];
mtmsc <<= mncc [label="MNCC_SETUP_REQ\nIP:port-1"];
mtms <<= mtmsc [label="Paging"];
momgw =>> momsc [label="for RAN: MDCX OK\nEP-1 CI-2 IP:port-2"];
mtms =>> mtmsc [label="(BSSMAP) Complete Layer 3 Information"];
mtms =>> mtmsc [label="RR PAG_RESP"];
mtms <<= mtmsc [label="MM AUTH_REQ"];
mtms =>> mtmsc [label="MM AUTH_RESP"];
mtms <<= mtmsc [label="(BSSMAP) CIPHER_MODE_COMMAND"];
mtms =>> mtmsc [label="(BSSMAP) Ciphering Mode Complete"];
mtms <<= mtmsc [label="(BSSMAP) COMMON_ID"];
mtmsc note mtmsc [label="CC starts timer T303 (30s)"];
mtmsc abox mtmsc [label="CC state:\nCALL_PRESENT"];
mtms <<= mtmsc [label="CC SETUP"];
mtms =>> mtmsc [label="RR CIPH_M_COMPL"];
mtms =>> mtmsc [label="CC CALL_CONF"];
mtmsc note mtmsc [label="CC stops timer T303"];
mtmsc note mtmsc [label="CC starts timer T310 (30s)"];
mtmgw <<= mtmsc [label="for CN: CRCX\nrtpbridge/*@msc"];
mtmsc abox mtmsc [label="CC state:\nMO_TERM_CALL_CONF"];
mtmsc =>> mncc [label="MNCC_CALL_CONF_IND"];
mtmsc <<= mncc [label="MNCC_RTP_CREATE"];
mtmgw =>> mtmsc [label="for CN: CRCX OK\nEP-2 CI-3 IP:port-3"];
mtmgw <<= mtmsc [label="for RAN: CRCX\nEP-2"];
mtmgw =>> mtmsc [label="for RAN: CRCX OK\nEP-2 CI-4 IP:port-4"];
mtms <<= mtmsc [label="(BSSMAP) ASSIGNMENT_COMMAND"];
mtms =>> mtmsc [label="(BSSMAP) Assignment Complete"];
mtmgw <<= mtmsc [label="for RAN: MDCX\nEP-2 CI-4"];
mtmsc =>> mncc [label="MNCC_RTP_CREATE\nIP:port-3"];
mtmgw =>> mtmsc [label="for RAN: MDCX OK\nEP-2 CI-4 IP:port-4"];
mtms =>> mtmsc [label="CC ALERTING"];
mtmsc note mtmsc [label="CC stops timer T310"];
mtmsc note mtmsc [label="CC starts timer T301 (180s)"];
mtmsc abox mtmsc [label="CC state:\nCALL_RECEIVED"];
mtmsc =>> mncc [label="MNCC_ALERT_IND\nIP:port-3"];
momsc <<= mncc [label="MNCC_ALERT_REQ"];
momsc note momsc [label="CC stops guard timer"];
momsc note momsc [label="CC starts guard timer (180s)"];
momsc abox momsc [label="CC state:\nCALL_DELIVERED"];
moms <<= momsc [label="CC ALERTING"];
mtms =>> mtmsc [label="CC CONNECT"];
mtmsc note mtmsc [label="CC stops timer T301"];
mtmsc abox mtmsc [label="CC state:\nCONNECT_REQUEST"];
mtmsc =>> mncc [label="MNCC_SETUP_CNF\nIP:port-3"];
mtmsc <<= mncc [label="MNCC_RTP_CONNECT\nIP:port-1"];
mtmgw <<= mtmsc [label="for CN: MDCX\nEP-2 CI-3"];
mtmsc <<= mncc [label="MNCC_SETUP_COMPL_REQ"];
mtmsc note mtmsc [label="CC starts guard timer (180s)"];
mtmsc abox mtmsc [label="CC state:\nACTIVE"];
mtmsc note mtmsc [label="CC stops guard timer"];
mtms <<= mtmsc [label="CC CONNECT_ACK"];
momsc <<= mncc [label="MNCC_RTP_CONNECT\nIP:port-3"];
momgw <<= momsc [label="for CN: MDCX\nEP-1 CI-1"];
momsc <<= mncc [label="MNCC_SETUP_RSP"];
momsc note momsc [label="CC stops guard timer"];
momsc note momsc [label="CC starts guard timer (180s)"];
momsc note momsc [label="CC starts timer T313 (30s)"];
momsc abox momsc [label="CC state:\nCONNECT_IND"];
moms <<= momsc [label="CC CONNECT"];
mtmgw =>> mtmsc [label="for CN: MDCX OK\nEP-2 CI-3 IP:port-3"];
momgw =>> momsc [label="for CN: MDCX OK\nEP-1 CI-1 IP:port-1"];
moms =>> momsc [label="CC CONNECT_ACK"];
momsc note momsc [label="CC stops timer T313"];
momsc abox momsc [label="CC state:\nACTIVE"];
momsc note momsc [label="CC stops guard timer"];
momsc =>> mncc [label="MNCC_SETUP_COMPL_IND"];
moms =>> momsc [label="CC DISCONNECT"];
momsc abox momsc [label="CC state:\nDISCONNECT_IND"];
momsc =>> mncc [label="MNCC_DISC_IND"];
momsc <<= mncc [label="MNCC_REL_REQ"];
momsc note momsc [label="CC starts guard timer (180s)"];
momsc note momsc [label="CC starts timer T308 (10s)"];
momsc abox momsc [label="CC state:\nRELEASE_REQ"];
moms <<= momsc [label="CC RELEASE"];
mtmsc <<= mncc [label="MNCC_DISC_REQ"];
mtmsc note mtmsc [label="CC starts guard timer (180s)"];
mtmsc note mtmsc [label="CC starts timer T306 (30s)"];
mtmsc abox mtmsc [label="CC state:\nDISCONNECT_IND"];
mtms <<= mtmsc [label="CC DISCONNECT"];
mtms =>> mtmsc [label="CC RELEASE"];
mtmsc note mtmsc [label="CC stops timer T306"];
mtms <<= mtmsc [label="CC RELEASE_COMPL"];
mtmsc =>> mncc [label="MNCC_REL_IND"];
mtmsc abox mtmsc [label="CC state:\nNULL"];
mtmsc note mtmsc [label="CC stops guard timer"];
mtms <<= mtmsc [label="(BSSMAP) CLEAR_COMMAND"];
mtms =>> mtmsc [label="(BSSMAP) Clear Complete"];
moms =>> momsc [label="CC RELEASE_COMPL"];
momsc note momsc [label="CC stops timer T308"];
momsc =>> mncc [label="MNCC_REL_CNF"];
momsc abox momsc [label="CC state:\nNULL"];
momsc note momsc [label="CC stops guard timer"];
moms <<= momsc [label="(BSSMAP) CLEAR_COMMAND"];
moms =>> momsc [label="(BSSMAP) Clear Complete"];
}

View File

@ -0,0 +1,129 @@
# Generated by osmo-msc.git/doc/sequence_charts/msc_log_to_ladder.py
msc {
hscale="3";
moms[label="MS,BSS (MO)\nUE,hNodeB (MO)"],momgw[label="MGW for MSC (MO)"],momsc[label="MSC (MO)"],mncc[label="MNCC"],mtmsc[label="MSC (MT)"],mtmgw[label="MGW for MSC (MT)"],mtms[label="BSS,MS (MT)\nhNodeB,UE (MT)"];
moms =>> momsc [label="(BSSMAP) Complete Layer 3 Information"];
moms =>> momsc [label="MM CM_SERV_REQ"];
moms <<= momsc [label="MM AUTH_REQ"];
moms =>> momsc [label="MM AUTH_RESP"];
moms <<= momsc [label="(BSSMAP) CIPHER_MODE_COMMAND"];
moms =>> momsc [label="(BSSMAP) Ciphering Mode Complete"];
moms <<= momsc [label="(BSSMAP) COMMON_ID"];
moms =>> momsc [label="RR CIPH_M_COMPL"];
moms =>> momsc [label="CC SETUP"];
momsc note momsc [label="CC starts guard timer (180s)"];
momsc abox momsc [label="CC state:\nINITIATED"];
momgw <<= momsc [label="for CN: CRCX\nrtpbridge/*@msc"];
momgw =>> momsc [label="for CN: CRCX OK\nEP-1 CI-1 IP:port-1"];
momsc =>> mncc [label="MNCC_SETUP_IND\nIP:port-1"];
momsc <<= mncc [label="MNCC_CALL_PROC_REQ"];
momsc note momsc [label="CC stops guard timer"];
momsc note momsc [label="CC starts guard timer (180s)"];
momsc abox momsc [label="CC state:\nMO_CALL_PROC"];
moms <<= momsc [label="CC CALL_PROC"];
momsc <<= mncc [label="MNCC_LCHAN_MODIFY"];
momsc note momsc [label="CC stops guard timer"];
momsc note momsc [label="CC starts guard timer (180s)"];
mtmsc <<= mncc [label="MNCC_SETUP_REQ\nIP:port-1"];
mtms <<= mtmsc [label="Paging"];
momgw <<= momsc [label="for RAN: CRCX\nEP-1"];
momgw =>> momsc [label="for RAN: CRCX OK\nEP-1 CI-2 IP:port-2"];
moms <<= momsc [label="(BSSMAP) ASSIGNMENT_COMMAND"];
mtms =>> mtmsc [label="(BSSMAP) Complete Layer 3 Information"];
mtms =>> mtmsc [label="RR PAG_RESP"];
mtms <<= mtmsc [label="MM AUTH_REQ"];
moms =>> momsc [label="(BSSMAP) Assignment Complete"];
momgw <<= momsc [label="for RAN: MDCX\nEP-1 CI-2"];
momsc =>> mncc [label="MNCC_RTP_CREATE\nIP:port-1"];
momgw =>> momsc [label="for RAN: MDCX OK\nEP-1 CI-2 IP:port-2"];
mtms =>> mtmsc [label="MM AUTH_RESP"];
mtms <<= mtmsc [label="(BSSMAP) CIPHER_MODE_COMMAND"];
mtms =>> mtmsc [label="(BSSMAP) Ciphering Mode Complete"];
mtms <<= mtmsc [label="(BSSMAP) COMMON_ID"];
mtmsc note mtmsc [label="CC starts timer T303 (30s)"];
mtmsc abox mtmsc [label="CC state:\nCALL_PRESENT"];
mtms <<= mtmsc [label="CC SETUP"];
mtms =>> mtmsc [label="RR CIPH_M_COMPL"];
mtms =>> mtmsc [label="CC CALL_CONF"];
mtmsc note mtmsc [label="CC stops timer T303"];
mtmsc note mtmsc [label="CC starts timer T310 (30s)"];
mtmgw <<= mtmsc [label="for CN: CRCX\nrtpbridge/*@msc"];
mtmsc abox mtmsc [label="CC state:\nMO_TERM_CALL_CONF"];
mtmsc =>> mncc [label="MNCC_CALL_CONF_IND"];
mtmsc <<= mncc [label="MNCC_LCHAN_MODIFY"];
mtmsc note mtmsc [label="CC starts guard timer (180s)"];
mtmgw =>> mtmsc [label="for CN: CRCX OK\nEP-2 CI-3 IP:port-3"];
mtmgw <<= mtmsc [label="for RAN: CRCX\nEP-2"];
mtmgw =>> mtmsc [label="for RAN: CRCX OK\nEP-2 CI-4 IP:port-4"];
mtms <<= mtmsc [label="(BSSMAP) ASSIGNMENT_COMMAND"];
mtms =>> mtmsc [label="(BSSMAP) Assignment Complete"];
mtmgw <<= mtmsc [label="for RAN: MDCX\nEP-2 CI-4"];
mtmsc =>> mncc [label="MNCC_RTP_CREATE\nIP:port-3"];
mtmgw =>> mtmsc [label="for RAN: MDCX OK\nEP-2 CI-4 IP:port-4"];
mtms =>> mtmsc [label="CC ALERTING"];
mtmsc note mtmsc [label="CC stops timer T310"];
mtmsc note mtmsc [label="CC starts timer T301 (180s)"];
mtmsc abox mtmsc [label="CC state:\nCALL_RECEIVED"];
mtmsc =>> mncc [label="MNCC_ALERT_IND\nIP:port-3"];
momsc <<= mncc [label="MNCC_ALERT_REQ\nIP:port-3"];
momsc note momsc [label="CC stops guard timer"];
momsc note momsc [label="CC starts guard timer (180s)"];
momsc abox momsc [label="CC state:\nCALL_DELIVERED"];
momgw <<= momsc [label="for CN: MDCX\nEP-1 CI-1"];
moms <<= momsc [label="CC ALERTING"];
momgw =>> momsc [label="for CN: MDCX OK\nEP-1 CI-1 IP:port-1"];
mtms =>> mtmsc [label="CC CONNECT"];
mtmsc note mtmsc [label="CC stops timer T301"];
mtmsc abox mtmsc [label="CC state:\nCONNECT_REQUEST"];
mtmsc =>> mncc [label="MNCC_SETUP_CNF\nIP:port-3"];
mtmsc <<= mncc [label="MNCC_SETUP_COMPL_REQ"];
mtmsc note mtmsc [label="CC stops guard timer"];
mtmsc note mtmsc [label="CC starts guard timer (180s)"];
mtmsc abox mtmsc [label="CC state:\nACTIVE"];
mtmsc note mtmsc [label="CC stops guard timer"];
mtms <<= mtmsc [label="CC CONNECT_ACK"];
momsc <<= mncc [label="MNCC_SETUP_RSP\nIP:port-3"];
momsc note momsc [label="CC stops guard timer"];
momsc note momsc [label="CC starts guard timer (180s)"];
momsc note momsc [label="CC starts timer T313 (30s)"];
momsc abox momsc [label="CC state:\nCONNECT_IND"];
moms <<= momsc [label="CC CONNECT"];
mtmgw <<= mtmsc [label="for CN: MDCX\nEP-2 CI-3"];
mtmgw =>> mtmsc [label="for CN: MDCX OK\nEP-2 CI-3 IP:port-3"];
moms =>> momsc [label="CC CONNECT_ACK"];
momsc note momsc [label="CC stops timer T313"];
momsc abox momsc [label="CC state:\nACTIVE"];
momsc note momsc [label="CC stops guard timer"];
momsc =>> mncc [label="MNCC_SETUP_COMPL_IND"];
moms =>> momsc [label="CC DISCONNECT"];
momsc abox momsc [label="CC state:\nDISCONNECT_IND"];
momsc =>> mncc [label="MNCC_DISC_IND"];
momsc <<= mncc [label="MNCC_REL_REQ"];
momsc note momsc [label="CC starts guard timer (180s)"];
momsc note momsc [label="CC starts timer T308 (10s)"];
momsc abox momsc [label="CC state:\nRELEASE_REQ"];
moms <<= momsc [label="CC RELEASE"];
mtmsc <<= mncc [label="MNCC_DISC_REQ"];
mtmsc note mtmsc [label="CC starts guard timer (180s)"];
mtmsc note mtmsc [label="CC starts timer T306 (30s)"];
mtmsc abox mtmsc [label="CC state:\nDISCONNECT_IND"];
mtms <<= mtmsc [label="CC DISCONNECT"];
mtms =>> mtmsc [label="CC RELEASE"];
mtmsc note mtmsc [label="CC stops timer T306"];
mtms <<= mtmsc [label="CC RELEASE_COMPL"];
mtmsc =>> mncc [label="MNCC_REL_IND"];
momsc <<= mncc [label="MNCC_REL_REQ"];
momsc note momsc [label="CC stops guard timer"];
momsc note momsc [label="CC starts guard timer (180s)"];
mtmsc abox mtmsc [label="CC state:\nNULL"];
mtmsc note mtmsc [label="CC stops guard timer"];
mtms <<= mtmsc [label="(BSSMAP) CLEAR_COMMAND"];
mtms =>> mtmsc [label="(BSSMAP) Clear Complete"];
moms =>> momsc [label="CC RELEASE_COMPL"];
momsc note momsc [label="CC stops timer T308"];
momsc =>> mncc [label="MNCC_REL_CNF"];
momsc abox momsc [label="CC state:\nNULL"];
momsc note momsc [label="CC stops guard timer"];
moms <<= momsc [label="(BSSMAP) CLEAR_COMMAND"];
moms =>> momsc [label="(BSSMAP) Clear Complete"];
}

151
git-version-gen Executable file
View File

@ -0,0 +1,151 @@
#!/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
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:

View File

@ -1,3 +1,3 @@
SUBDIRS = openbsc
noinst_HEADERS = mISDNif.h compat_af_isdn.h
SUBDIRS = \
osmocom \
$(NULL)

View File

@ -1,541 +0,0 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = include
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/bscconfig.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
HEADERS = $(noinst_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
distdir
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
COVERAGE_CFLAGS = @COVERAGE_CFLAGS@
COVERAGE_LDFLAGS = @COVERAGE_LDFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GPRS_LIBGTP = @GPRS_LIBGTP@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBOSMOCORE_CFLAGS = @LIBOSMOCORE_CFLAGS@
LIBOSMOCORE_LIBS = @LIBOSMOCORE_LIBS@
LIBOSMOSCCP_CFLAGS = @LIBOSMOSCCP_CFLAGS@
LIBOSMOSCCP_LIBS = @LIBOSMOSCCP_LIBS@
LIBOSMOVTY_CFLAGS = @LIBOSMOVTY_CFLAGS@
LIBOSMOVTY_LIBS = @LIBOSMOVTY_LIBS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
SYMBOL_VISIBILITY = @SYMBOL_VISIBILITY@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = openbsc
noinst_HEADERS = mISDNif.h compat_af_isdn.h
all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu include/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
all-am: Makefile $(HEADERS)
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am:
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
install-am install-strip tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am check check-am clean clean-generic ctags \
ctags-recursive distclean distclean-generic distclean-tags \
distdir dvi dvi-am html html-am info info-am install \
install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
installdirs-am maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
tags-recursive uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -1,39 +0,0 @@
#ifdef MISDN_OLD_AF_COMPATIBILITY
#undef AF_ISDN
#undef PF_ISDN
extern int AF_ISDN;
#define PF_ISDN AF_ISDN
int AF_ISDN;
#endif
extern void init_af_isdn(void);
#ifdef AF_COMPATIBILITY_FUNC
#ifdef MISDN_OLD_AF_COMPATIBILITY
void init_af_isdn(void)
{
int s;
/* test for new value */
AF_ISDN = 34;
s = socket(AF_ISDN, SOCK_RAW, ISDN_P_BASE);
if (s >= 0) {
close(s);
return;
}
AF_ISDN = 27;
s = socket(AF_ISDN, SOCK_RAW, ISDN_P_BASE);
if (s >= 0) {
close(s);
return;
}
}
#else
void init_af_isdn(void)
{
}
#endif
#endif

View File

@ -1,387 +0,0 @@
/*
*
* Author Karsten Keil <kkeil@novell.com>
*
* Copyright 2008 by Karsten Keil <kkeil@novell.com>
*
* This code is free software; you can redistribute it and/or modify
* it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE
* version 2.1 as published by the Free Software Foundation.
*
* This code 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 LESSER GENERAL PUBLIC LICENSE for more details.
*
*/
#ifndef mISDNIF_H
#define mISDNIF_H
#include <stdarg.h>
#ifdef linux
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/socket.h>
#else
#include <sys/types.h>
#include <sys/errno.h>
#include <sys/socket.h>
#endif
/*
* ABI Version 32 bit
*
* <8 bit> Major version
* - changed if any interface become backwards incompatible
*
* <8 bit> Minor version
* - changed if any interface is extended but backwards compatible
*
* <16 bit> Release number
* - should be incremented on every checkin
*/
#define MISDN_MAJOR_VERSION 1
#define MISDN_MINOR_VERSION 1
#define MISDN_RELEASE 20
/* primitives for information exchange
* generell format
* <16 bit 0 >
* <8 bit command>
* BIT 8 = 1 LAYER private
* BIT 7 = 1 answer
* BIT 6 = 1 DATA
* <8 bit target layer mask>
*
* Layer = 00 is reserved for general commands
Layer = 01 L2 -> HW
Layer = 02 HW -> L2
Layer = 04 L3 -> L2
Layer = 08 L2 -> L3
* Layer = FF is reserved for broadcast commands
*/
#define MISDN_CMDMASK 0xff00
#define MISDN_LAYERMASK 0x00ff
/* generell commands */
#define OPEN_CHANNEL 0x0100
#define CLOSE_CHANNEL 0x0200
#define CONTROL_CHANNEL 0x0300
#define CHECK_DATA 0x0400
/* layer 2 -> layer 1 */
#define PH_ACTIVATE_REQ 0x0101
#define PH_DEACTIVATE_REQ 0x0201
#define PH_DATA_REQ 0x2001
#define MPH_ACTIVATE_REQ 0x0501
#define MPH_DEACTIVATE_REQ 0x0601
#define MPH_INFORMATION_REQ 0x0701
#define PH_CONTROL_REQ 0x0801
/* layer 1 -> layer 2 */
#define PH_ACTIVATE_IND 0x0102
#define PH_ACTIVATE_CNF 0x4102
#define PH_DEACTIVATE_IND 0x0202
#define PH_DEACTIVATE_CNF 0x4202
#define PH_DATA_IND 0x2002
#define PH_DATA_E_IND 0x3002
#define MPH_ACTIVATE_IND 0x0502
#define MPH_DEACTIVATE_IND 0x0602
#define MPH_INFORMATION_IND 0x0702
#define PH_DATA_CNF 0x6002
#define PH_CONTROL_IND 0x0802
#define PH_CONTROL_CNF 0x4802
/* layer 3 -> layer 2 */
#define DL_ESTABLISH_REQ 0x1004
#define DL_RELEASE_REQ 0x1104
#define DL_DATA_REQ 0x3004
#define DL_UNITDATA_REQ 0x3104
#define DL_INFORMATION_REQ 0x0004
/* layer 2 -> layer 3 */
#define DL_ESTABLISH_IND 0x1008
#define DL_ESTABLISH_CNF 0x5008
#define DL_RELEASE_IND 0x1108
#define DL_RELEASE_CNF 0x5108
#define DL_DATA_IND 0x3008
#define DL_UNITDATA_IND 0x3108
#define DL_INFORMATION_IND 0x0008
/* intern layer 2 managment */
#define MDL_ASSIGN_REQ 0x1804
#define MDL_ASSIGN_IND 0x1904
#define MDL_REMOVE_REQ 0x1A04
#define MDL_REMOVE_IND 0x1B04
#define MDL_STATUS_UP_IND 0x1C04
#define MDL_STATUS_DOWN_IND 0x1D04
#define MDL_STATUS_UI_IND 0x1E04
#define MDL_ERROR_IND 0x1F04
#define MDL_ERROR_RSP 0x5F04
/* DL_INFORMATION_IND types */
#define DL_INFO_L2_CONNECT 0x0001
#define DL_INFO_L2_REMOVED 0x0002
/* PH_CONTROL types */
/* TOUCH TONE IS 0x20XX XX "0"..."9", "A","B","C","D","*","#" */
#define DTMF_TONE_VAL 0x2000
#define DTMF_TONE_MASK 0x007F
#define DTMF_TONE_START 0x2100
#define DTMF_TONE_STOP 0x2200
#define DTMF_HFC_COEF 0x4000
#define DSP_CONF_JOIN 0x2403
#define DSP_CONF_SPLIT 0x2404
#define DSP_RECEIVE_OFF 0x2405
#define DSP_RECEIVE_ON 0x2406
#define DSP_ECHO_ON 0x2407
#define DSP_ECHO_OFF 0x2408
#define DSP_MIX_ON 0x2409
#define DSP_MIX_OFF 0x240a
#define DSP_DELAY 0x240b
#define DSP_JITTER 0x240c
#define DSP_TXDATA_ON 0x240d
#define DSP_TXDATA_OFF 0x240e
#define DSP_TX_DEJITTER 0x240f
#define DSP_TX_DEJ_OFF 0x2410
#define DSP_TONE_PATT_ON 0x2411
#define DSP_TONE_PATT_OFF 0x2412
#define DSP_VOL_CHANGE_TX 0x2413
#define DSP_VOL_CHANGE_RX 0x2414
#define DSP_BF_ENABLE_KEY 0x2415
#define DSP_BF_DISABLE 0x2416
#define DSP_BF_ACCEPT 0x2416
#define DSP_BF_REJECT 0x2417
#define DSP_PIPELINE_CFG 0x2418
#define HFC_VOL_CHANGE_TX 0x2601
#define HFC_VOL_CHANGE_RX 0x2602
#define HFC_SPL_LOOP_ON 0x2603
#define HFC_SPL_LOOP_OFF 0x2604
/* DSP_TONE_PATT_ON parameter */
#define TONE_OFF 0x0000
#define TONE_GERMAN_DIALTONE 0x0001
#define TONE_GERMAN_OLDDIALTONE 0x0002
#define TONE_AMERICAN_DIALTONE 0x0003
#define TONE_GERMAN_DIALPBX 0x0004
#define TONE_GERMAN_OLDDIALPBX 0x0005
#define TONE_AMERICAN_DIALPBX 0x0006
#define TONE_GERMAN_RINGING 0x0007
#define TONE_GERMAN_OLDRINGING 0x0008
#define TONE_AMERICAN_RINGPBX 0x000b
#define TONE_GERMAN_RINGPBX 0x000c
#define TONE_GERMAN_OLDRINGPBX 0x000d
#define TONE_AMERICAN_RINGING 0x000e
#define TONE_GERMAN_BUSY 0x000f
#define TONE_GERMAN_OLDBUSY 0x0010
#define TONE_AMERICAN_BUSY 0x0011
#define TONE_GERMAN_HANGUP 0x0012
#define TONE_GERMAN_OLDHANGUP 0x0013
#define TONE_AMERICAN_HANGUP 0x0014
#define TONE_SPECIAL_INFO 0x0015
#define TONE_GERMAN_GASSENBESETZT 0x0016
#define TONE_GERMAN_AUFSCHALTTON 0x0016
/* MPH_INFORMATION_IND */
#define L1_SIGNAL_LOS_OFF 0x0010
#define L1_SIGNAL_LOS_ON 0x0011
#define L1_SIGNAL_AIS_OFF 0x0012
#define L1_SIGNAL_AIS_ON 0x0013
#define L1_SIGNAL_RDI_OFF 0x0014
#define L1_SIGNAL_RDI_ON 0x0015
#define L1_SIGNAL_SLIP_RX 0x0020
#define L1_SIGNAL_SLIP_TX 0x0021
/*
* protocol ids
* D channel 1-31
* B channel 33 - 63
*/
#define ISDN_P_NONE 0
#define ISDN_P_BASE 0
#define ISDN_P_TE_S0 0x01
#define ISDN_P_NT_S0 0x02
#define ISDN_P_TE_E1 0x03
#define ISDN_P_NT_E1 0x04
#define ISDN_P_TE_UP0 0x05
#define ISDN_P_NT_UP0 0x06
#define IS_ISDN_P_TE(p) ((p == ISDN_P_TE_S0) || (p == ISDN_P_TE_E1) || \
(p == ISDN_P_TE_UP0) || (p == ISDN_P_LAPD_TE))
#define IS_ISDN_P_NT(p) ((p == ISDN_P_NT_S0) || (p == ISDN_P_NT_E1) || \
(p == ISDN_P_NT_UP0) || (p == ISDN_P_LAPD_NT))
#define IS_ISDN_P_S0(p) ((p == ISDN_P_TE_S0) || (p == ISDN_P_NT_S0))
#define IS_ISDN_P_E1(p) ((p == ISDN_P_TE_E1) || (p == ISDN_P_NT_E1))
#define IS_ISDN_P_UP0(p) ((p == ISDN_P_TE_UP0) || (p == ISDN_P_NT_UP0))
#define ISDN_P_LAPD_TE 0x10
#define ISDN_P_LAPD_NT 0x11
#define ISDN_P_B_MASK 0x1f
#define ISDN_P_B_START 0x20
#define ISDN_P_B_RAW 0x21
#define ISDN_P_B_HDLC 0x22
#define ISDN_P_B_X75SLP 0x23
#define ISDN_P_B_L2DTMF 0x24
#define ISDN_P_B_L2DSP 0x25
#define ISDN_P_B_L2DSPHDLC 0x26
#define OPTION_L2_PMX 1
#define OPTION_L2_PTP 2
#define OPTION_L2_FIXEDTEI 3
#define OPTION_L2_CLEANUP 4
/* should be in sync with linux/kobject.h:KOBJ_NAME_LEN */
#define MISDN_MAX_IDLEN 20
struct mISDNhead {
unsigned int prim;
unsigned int id;
} __attribute__((packed));
#define MISDN_HEADER_LEN sizeof(struct mISDNhead)
#define MAX_DATA_SIZE 2048
#define MAX_DATA_MEM (MAX_DATA_SIZE + MISDN_HEADER_LEN)
#define MAX_DFRAME_LEN 260
#define MISDN_ID_ADDR_MASK 0xFFFF
#define MISDN_ID_TEI_MASK 0xFF00
#define MISDN_ID_SAPI_MASK 0x00FF
#define MISDN_ID_TEI_ANY 0x7F00
#define MISDN_ID_ANY 0xFFFF
#define MISDN_ID_NONE 0xFFFE
#define GROUP_TEI 127
#define TEI_SAPI 63
#define CTRL_SAPI 0
#define MISDN_MAX_CHANNEL 127
#define MISDN_CHMAP_SIZE ((MISDN_MAX_CHANNEL + 1) >> 3)
#define SOL_MISDN 0
struct sockaddr_mISDN {
sa_family_t family;
unsigned char dev;
unsigned char channel;
unsigned char sapi;
unsigned char tei;
};
struct mISDNversion {
unsigned char major;
unsigned char minor;
unsigned short release;
};
#define MAX_DEVICE_ID 63
struct mISDN_devinfo {
u_int id;
u_int Dprotocols;
u_int Bprotocols;
u_int protocol;
u_char channelmap[MISDN_CHMAP_SIZE];
u_int nrbchan;
char name[MISDN_MAX_IDLEN];
};
struct mISDN_devrename {
u_int id;
char name[MISDN_MAX_IDLEN];
};
struct ph_info_ch {
int32_t protocol;
int64_t Flags;
};
struct ph_info_dch {
struct ph_info_ch ch;
int16_t state;
int16_t num_bch;
};
struct ph_info {
struct ph_info_dch dch;
struct ph_info_ch bch[];
};
/* timer device ioctl */
#define IMADDTIMER _IOR('I', 64, int)
#define IMDELTIMER _IOR('I', 65, int)
/* socket ioctls */
#define IMGETVERSION _IOR('I', 66, int)
#define IMGETCOUNT _IOR('I', 67, int)
#define IMGETDEVINFO _IOR('I', 68, int)
#define IMCTRLREQ _IOR('I', 69, int)
#define IMCLEAR_L2 _IOR('I', 70, int)
#define IMSETDEVNAME _IOR('I', 71, struct mISDN_devrename)
static inline int
test_channelmap(u_int nr, u_char *map)
{
if (nr <= MISDN_MAX_CHANNEL)
return map[nr >> 3] & (1 << (nr & 7));
else
return 0;
}
static inline void
set_channelmap(u_int nr, u_char *map)
{
map[nr >> 3] |= (1 << (nr & 7));
}
static inline void
clear_channelmap(u_int nr, u_char *map)
{
map[nr >> 3] &= ~(1 << (nr & 7));
}
/* CONTROL_CHANNEL parameters */
#define MISDN_CTRL_GETOP 0x0000
#define MISDN_CTRL_LOOP 0x0001
#define MISDN_CTRL_CONNECT 0x0002
#define MISDN_CTRL_DISCONNECT 0x0004
#define MISDN_CTRL_PCMCONNECT 0x0010
#define MISDN_CTRL_PCMDISCONNECT 0x0020
#define MISDN_CTRL_SETPEER 0x0040
#define MISDN_CTRL_UNSETPEER 0x0080
#define MISDN_CTRL_RX_OFF 0x0100
#define MISDN_CTRL_FILL_EMPTY 0x0200
#define MISDN_CTRL_GETPEER 0x0400
#define MISDN_CTRL_HW_FEATURES_OP 0x2000
#define MISDN_CTRL_HW_FEATURES 0x2001
#define MISDN_CTRL_HFC_OP 0x4000
#define MISDN_CTRL_HFC_PCM_CONN 0x4001
#define MISDN_CTRL_HFC_PCM_DISC 0x4002
#define MISDN_CTRL_HFC_CONF_JOIN 0x4003
#define MISDN_CTRL_HFC_CONF_SPLIT 0x4004
#define MISDN_CTRL_HFC_RECEIVE_OFF 0x4005
#define MISDN_CTRL_HFC_RECEIVE_ON 0x4006
#define MISDN_CTRL_HFC_ECHOCAN_ON 0x4007
#define MISDN_CTRL_HFC_ECHOCAN_OFF 0x4008
/* socket options */
#define MISDN_TIME_STAMP 0x0001
struct mISDN_ctrl_req {
int op;
int channel;
int p1;
int p2;
};
/* muxer options */
#define MISDN_OPT_ALL 1
#define MISDN_OPT_TEIMGR 2
#endif /* mISDNIF_H */

View File

@ -1,17 +0,0 @@
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 \
subchan_demux.h trau_frame.h e1_input.h trau_mux.h \
ipaccess.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 \
crc24.h gprs_bssgp.h gprs_llc.h gprs_ns.h gprs_gmm.h \
gb_proxy.h gprs_sgsn.h gsm_04_08_gprs.h sgsn.h \
gprs_ns_frgre.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
openbsc_HEADERS = gsm_04_08.h meas_rep.h bsc_api.h
openbscdir = $(includedir)/openbsc

View File

@ -1,449 +0,0 @@
# Makefile.in generated by automake 1.11.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
# Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = include/openbsc
DIST_COMMON = $(noinst_HEADERS) $(openbsc_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/bscconfig.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
SOURCES =
DIST_SOURCES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(openbscdir)"
HEADERS = $(noinst_HEADERS) $(openbsc_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
COVERAGE_CFLAGS = @COVERAGE_CFLAGS@
COVERAGE_LDFLAGS = @COVERAGE_LDFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GPRS_LIBGTP = @GPRS_LIBGTP@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBOSMOCORE_CFLAGS = @LIBOSMOCORE_CFLAGS@
LIBOSMOCORE_LIBS = @LIBOSMOCORE_LIBS@
LIBOSMOSCCP_CFLAGS = @LIBOSMOSCCP_CFLAGS@
LIBOSMOSCCP_LIBS = @LIBOSMOSCCP_LIBS@
LIBOSMOVTY_CFLAGS = @LIBOSMOVTY_CFLAGS@
LIBOSMOVTY_LIBS = @LIBOSMOVTY_LIBS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
SYMBOL_VISIBILITY = @SYMBOL_VISIBILITY@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
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 \
subchan_demux.h trau_frame.h e1_input.h trau_mux.h \
ipaccess.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 \
crc24.h gprs_bssgp.h gprs_llc.h gprs_ns.h gprs_gmm.h \
gb_proxy.h gprs_sgsn.h gsm_04_08_gprs.h sgsn.h \
gprs_ns_frgre.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
openbsc_HEADERS = gsm_04_08.h meas_rep.h bsc_api.h
openbscdir = $(includedir)/openbsc
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/openbsc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu include/openbsc/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-openbscHEADERS: $(openbsc_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(openbscdir)" || $(MKDIR_P) "$(DESTDIR)$(openbscdir)"
@list='$(openbsc_HEADERS)'; test -n "$(openbscdir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(openbscdir)'"; \
$(INSTALL_HEADER) $$files "$(DESTDIR)$(openbscdir)" || exit $$?; \
done
uninstall-openbscHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(openbsc_HEADERS)'; test -n "$(openbscdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(openbscdir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(openbscdir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(openbscdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-openbscHEADERS
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-openbscHEADERS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
ctags distclean distclean-generic distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man \
install-openbscHEADERS install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
uninstall uninstall-am uninstall-openbscHEADERS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -1,172 +0,0 @@
/* GSM Network Management messages on the A-bis interface
* 3GPP TS 12.21 version 8.0.0 Release 1999 / ETSI TS 100 623 V8.0.0 */
/* (C) 2008-2009 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/>.
*
*/
#ifndef _NM_H
#define _NM_H
#include <sys/types.h>
#include <osmocore/tlv.h>
#include <osmocore/protocol/gsm_12_21.h>
struct cell_global_id {
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
* and already parsed... */
struct ipac_bcch_info {
struct llist_head list;
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;
u_int16_t frame_offset;
u_int32_t frame_nr_offset;
u_int8_t bsic;
struct cell_global_id cgi;
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];
};
extern const struct value_string abis_nm_adm_state_names[];
extern const struct value_string abis_nm_obj_class_names[];
extern const struct tlv_definition nm_att_tlvdef;
/* PUBLIC */
struct msgb;
struct abis_nm_cfg {
/* callback for unidirectional reports */
int (*report_cb)(struct msgb *,
struct abis_om_fom_hdr *);
/* callback for software activate requests from BTS */
int (*sw_act_req)(struct msgb *);
};
extern int abis_nm_rcvmsg(struct msgb *msg);
int abis_nm_tlv_parse(struct tlv_parsed *tp, struct gsm_bts *bts, const u_int8_t *buf, int len);
int abis_nm_rx(struct msgb *msg);
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,
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,
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,
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, 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, 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, struct msgb *msg);
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,
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, 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, 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, u_int8_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,
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, u_int8_t bport);
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, 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_trx *trx, 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, 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,
u_int32_t ip, u_int16_t port, u_int8_t stream);
void abis_nm_ipaccess_cgi(u_int8_t *buf, struct gsm_bts *bts);
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 */
const char *nm_opstate_name(u_int8_t os);
const char *nm_avail_name(u_int8_t avail);
int nm_is_running(struct gsm_nm_state *s);
int abis_nm_vty_init(void);
void abis_nm_clear_queue(struct gsm_bts *bts);
#endif /* _NM_H */

View File

@ -1,78 +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,
};
struct abis_om2k_mo {
uint8_t class;
uint8_t bts;
uint8_t assoc_so;
uint8_t inst;
} __attribute__ ((packed));
struct om2k_is_conn_grp {
uint16_t icp1;
uint16_t icp2;
uint8_t cont_idx;
} __attribute__ ((packed));
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, struct om2k_is_conn_grp *cg,
unsigned int num_cg);
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 */

View File

@ -1,99 +0,0 @@
/* GSM Radio Signalling Link messages on the A-bis interface
* 3GPP TS 08.58 version 8.6.0 Release 1999 / ETSI TS 100 596 V8.6.0 */
/* (C) 2008 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/>.
*
*/
#ifndef _RSL_H
#define _RSL_H
#include <osmocore/protocol/gsm_08_58.h>
#include <osmocore/msgb.h>
struct gsm_bts;
struct gsm_lchan;
struct gsm_subscriber;
struct gsm_bts_trx_ts;
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,
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, u_int8_t paging_group, u_int8_t len,
u_int8_t *ms_ident, u_int8_t chan_needed);
int rsl_imm_assign_cmd(struct gsm_bts *bts, u_int8_t len, u_int8_t *val);
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 */
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, 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 abis_rsl_rcvmsg(struct msgb *msg);
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, u_int8_t reason);
int rsl_lchan_set_state(struct gsm_lchan *lchan, int);
/* to be provided by external code */
int abis_rsl_sendmsg(struct msgb *msg);
int rsl_deact_sacch(struct gsm_lchan *lchan);
int rsl_lchan_rll_release(struct gsm_lchan *lchan, u_int8_t link_id);
/* 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_number_of_paging_subchannels(struct gsm_bts *bts);
int rsl_sacch_info_modify(struct gsm_lchan *lchan, u_int8_t type,
const u_int8_t *data, int len);
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,
uint8_t cb_command, const uint8_t *data, int len);
#endif /* RSL_MT_H */

View File

@ -1,17 +0,0 @@
#ifndef _AUTH_H
#define _AUTH_H
struct gsm_auth_tuple;
struct gsm_subscriber;
enum auth_action {
AUTH_NOT_AVAIL = 0, /* No auth tuple available */
AUTH_DO_AUTH_THAN_CIPH = 1, /* Firsth authenticate, then cipher */
AUTH_DO_CIPH = 2, /* Only ciphering */
AUTH_DO_AUTH = 3, /* Only authentication, no ciphering */
};
int auth_get_tuple_for_subscr(struct gsm_auth_tuple *atuple,
struct gsm_subscriber *subscr, int key_seq);
#endif /* _AUTH_H */

View File

@ -1,37 +0,0 @@
/* GSM 08.08 like API for OpenBSC */
#ifndef OPENBSC_BSC_API_H
#define OPENBSC_BSC_API_H
#include "gsm_data.h"
#define BSC_API_CONN_POL_ACCEPT 0
#define BSC_API_CONN_POL_REJECT 1
struct bsc_api {
void (*sapi_n_reject)(struct gsm_subscriber_connection *conn, int dlci);
void (*cipher_mode_compl)(struct gsm_subscriber_connection *conn,
struct msgb *msg, uint8_t chosen_encr);
int (*compl_l3)(struct gsm_subscriber_connection *conn,
struct msgb *msg, uint16_t chosen_channel);
void (*dtap)(struct gsm_subscriber_connection *conn, uint8_t link_id,
struct msgb *msg);
void (*assign_compl)(struct gsm_subscriber_connection *conn,
uint8_t rr_cause, uint8_t chosen_channel,
uint8_t encr_alg_id, uint8_t speech_mode);
void (*assign_fail)(struct gsm_subscriber_connection *conn,
uint8_t cause, uint8_t *rr_cause);
int (*clear_request)(struct gsm_subscriber_connection *conn,
uint32_t cause);
};
int bsc_api_init(struct gsm_network *network, struct bsc_api *api);
int gsm0808_submit_dtap(struct gsm_subscriber_connection *conn, struct msgb *msg, int link_id, int allow_sach);
int gsm0808_assign_req(struct gsm_subscriber_connection *conn, int chan_mode, int full_rate);
int gsm0808_cipher_mode(struct gsm_subscriber_connection *conn, int cipher,
const uint8_t *key, int len, int include_imeisv);
int gsm0808_page(struct gsm_bts *bts, unsigned int page_group,
unsigned int mi_len, uint8_t *mi, int chan_type);
int gsm0808_clear(struct gsm_subscriber_connection *conn);
#endif

View File

@ -1,51 +0,0 @@
/* Routines to talk to the MSC using the IPA Protocol */
/*
* (C) 2010 by Holger Hans Peter Freyther <zecke@selfish.org>
* (C) 2010 by On-Waves
* 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/>.
*
*/
#ifndef BSC_MSC_H
#define BSC_MSC_H
#include <osmocore/write_queue.h>
#include <osmocore/timer.h>
struct bsc_msc_connection {
struct write_queue write_queue;
int is_connected;
int is_authenticated;
int first_contact;
const char *ip;
int port;
int prio;
void (*connection_loss) (struct bsc_msc_connection *);
void (*connected) (struct bsc_msc_connection *);
struct timer_list reconnect_timer;
struct timer_list timeout_timer;
};
struct bsc_msc_connection *bsc_msc_create(const char *ip, int port, int prio);
int bsc_msc_connect(struct bsc_msc_connection *);
void bsc_msc_schedule_connect(struct bsc_msc_connection *);
void bsc_msc_lost(struct bsc_msc_connection *);
struct msgb *bsc_msc_id_get_resp(const char *token);
#endif

View File

@ -1,355 +0,0 @@
/*
* (C) 2010 by Holger Hans Peter Freyther <zecke@selfish.org>
* (C) 2010 by On-Waves
* 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/>.
*
*/
#ifndef BSC_NAT_H
#define BSC_NAT_H
#include "mgcp.h"
#include <sys/types.h>
#include <osmocore/select.h>
#include <osmocore/msgb.h>
#include <osmocore/msgfile.h>
#include <osmocore/timer.h>
#include <osmocore/write_queue.h>
#include <osmocore/rate_ctr.h>
#include <osmocore/statistics.h>
#include <osmocore/protocol/gsm_04_08.h>
#include <regex.h>
#define DIR_BSC 1
#define DIR_MSC 2
struct sccp_source_reference;
struct sccp_connections;
struct bsc_nat_parsed;
struct bsc_nat;
struct bsc_nat_ussd_con;
enum {
NAT_CON_TYPE_NONE,
NAT_CON_TYPE_LU,
NAT_CON_TYPE_CM_SERV_REQ,
NAT_CON_TYPE_PAG_RESP,
NAT_CON_TYPE_SSA,
NAT_CON_TYPE_LOCAL_REJECT,
NAT_CON_TYPE_OTHER,
};
/*
* Per BSC data structure
*/
struct bsc_connection {
struct llist_head list_entry;
/* do we know anything about this BSC? */
int authenticated;
/* the fd we use to communicate */
struct write_queue write_queue;
/* the BSS associated */
struct bsc_config *cfg;
/* a timeout node */
struct timer_list id_timeout;
/* pong timeout */
struct timer_list ping_timeout;
struct timer_list pong_timeout;
/* mgcp related code */
char *_endpoint_status;
int number_multiplexes;
int max_endpoints;
int last_endpoint;
/* a back pointer */
struct bsc_nat *nat;
};
/**
* Stats per BSC
*/
struct bsc_config_stats {
struct rate_ctr_group *ctrg;
};
enum bsc_cfg_ctr {
BCFG_CTR_SCCP_CONN,
BCFG_CTR_SCCP_CALLS,
BCFG_CTR_NET_RECONN,
BCFG_CTR_DROPPED_SCCP,
BCFG_CTR_DROPPED_CALLS,
BCFG_CTR_REJECTED_CR,
BCFG_CTR_REJECTED_MSG,
BCFG_CTR_ILL_PACKET,
BCFG_CTR_CON_TYPE_LU,
BCFG_CTR_CON_CMSERV_RQ,
BCFG_CTR_CON_PAG_RESP,
BCFG_CTR_CON_SSA,
BCFG_CTR_CON_OTHER,
};
/**
* One BSC entry in the config
*/
struct bsc_config {
struct llist_head entry;
char *token;
int nr;
char *description;
/* imsi white and blacklist */
char *acc_lst_name;
int forbid_paging;
/* audio handling */
int max_endpoints;
/* backpointer */
struct bsc_nat *nat;
struct bsc_config_stats stats;
struct llist_head lac_list;
};
struct bsc_lac_entry {
struct llist_head entry;
uint16_t lac;
};
/**
* BSCs point of view of endpoints
*/
struct bsc_endpoint {
/* the operation that is carried out */
int transaction_state;
/* the pending transaction id */
char *transaction_id;
/* the bsc we are talking to */
struct bsc_connection *bsc;
};
/**
* Statistic for the nat.
*/
struct bsc_nat_statistics {
struct {
struct counter *conn;
struct counter *calls;
} sccp;
struct {
struct counter *reconn;
struct counter *auth_fail;
} bsc;
struct {
struct counter *reconn;
} msc;
struct {
struct counter *reconn;
} ussd;
};
enum bsc_nat_acc_ctr {
ACC_LIST_BSC_FILTER,
ACC_LIST_NAT_FILTER,
};
struct bsc_nat_acc_lst {
struct llist_head list;
/* counter */
struct rate_ctr_group *stats;
/* the name of the list */
const char *name;
struct llist_head fltr_list;
};
struct bsc_nat_acc_lst_entry {
struct llist_head list;
/* the filter */
char *imsi_allow;
regex_t imsi_allow_re;
char *imsi_deny;
regex_t imsi_deny_re;
};
/**
* the structure of the "nat" network
*/
struct bsc_nat {
/* active SCCP connections that need patching */
struct llist_head sccp_connections;
/* active BSC connections that need patching */
struct llist_head bsc_connections;
/* access lists */
struct llist_head access_lists;
/* known BSC's */
struct llist_head bsc_configs;
int num_bsc;
int bsc_ip_dscp;
/* MGCP config */
struct mgcp_config *mgcp_cfg;
uint8_t mgcp_msg[4096];
int mgcp_length;
/* msc things */
char *msc_ip;
int msc_port;
struct bsc_msc_connection *msc_con;
char *token;
/* timeouts */
int auth_timeout;
int ping_timeout;
int pong_timeout;
struct bsc_endpoint *bsc_endpoints;
/* filter */
char *acc_lst_name;
/* number rewriting */
char *num_rewr_name;
struct msg_entries *num_rewr;
/* USSD messages we want to match */
char *ussd_lst_name;
char *ussd_query;
char *ussd_token;
char *ussd_local;
struct bsc_fd ussd_listen;
struct bsc_nat_ussd_con *ussd_con;
/* statistics */
struct bsc_nat_statistics stats;
};
/* create and init the structures */
struct bsc_config *bsc_config_alloc(struct bsc_nat *nat, const char *token);
struct bsc_config *bsc_config_num(struct bsc_nat *nat, int num);
void bsc_config_free(struct bsc_config *);
void bsc_config_add_lac(struct bsc_config *cfg, int lac);
void bsc_config_del_lac(struct bsc_config *cfg, int lac);
int bsc_config_handles_lac(struct bsc_config *cfg, int lac);
struct bsc_nat *bsc_nat_alloc(void);
struct bsc_connection *bsc_connection_alloc(struct bsc_nat *nat);
void bsc_nat_set_msc_ip(struct bsc_nat *bsc, const char *ip);
void sccp_connection_destroy(struct sccp_connections *);
void bsc_close_connection(struct bsc_connection *);
const char *bsc_con_type_to_string(int type);
/**
* parse the given message into the above structure
*/
struct bsc_nat_parsed *bsc_nat_parse(struct msgb *msg);
/**
* filter based on IP Access header in both directions
*/
int bsc_nat_filter_ipa(int direction, struct msgb *msg, struct bsc_nat_parsed *parsed);
int bsc_nat_vty_init(struct bsc_nat *nat);
struct bsc_connection *bsc_nat_find_bsc(struct bsc_nat *nat, struct msgb *msg, int *_lac);
/**
* Content filtering.
*/
int bsc_nat_filter_sccp_cr(struct bsc_connection *bsc, struct msgb *msg,
struct bsc_nat_parsed *, int *con_type, char **imsi);
int bsc_nat_filter_dt(struct bsc_connection *bsc, struct msgb *msg,
struct sccp_connections *con, struct bsc_nat_parsed *parsed);
/**
* SCCP patching and handling
*/
struct sccp_connections *create_sccp_src_ref(struct bsc_connection *bsc, struct bsc_nat_parsed *parsed);
int update_sccp_src_ref(struct sccp_connections *sccp, struct bsc_nat_parsed *parsed);
void remove_sccp_src_ref(struct bsc_connection *bsc, struct msgb *msg, struct bsc_nat_parsed *parsed);
struct sccp_connections *patch_sccp_src_ref_to_bsc(struct msgb *, struct bsc_nat_parsed *, struct bsc_nat *);
struct sccp_connections *patch_sccp_src_ref_to_msc(struct msgb *, struct bsc_nat_parsed *, struct bsc_connection *);
struct sccp_connections *bsc_nat_find_con_by_bsc(struct bsc_nat *, struct sccp_source_reference *);
/**
* MGCP/Audio handling
*/
int bsc_mgcp_nr_multiplexes(int max_endpoints);
int bsc_write_mgcp(struct bsc_connection *bsc, const uint8_t *data, unsigned int length);
int bsc_mgcp_assign_patch(struct sccp_connections *, struct msgb *msg);
void bsc_mgcp_init(struct sccp_connections *);
void bsc_mgcp_dlcx(struct sccp_connections *);
void bsc_mgcp_free_endpoints(struct bsc_nat *nat);
int bsc_mgcp_nat_init(struct bsc_nat *nat);
struct sccp_connections *bsc_mgcp_find_con(struct bsc_nat *, int endpoint_number);
struct msgb *bsc_mgcp_rewrite(char *input, int length, int endp, const char *ip, int port);
void bsc_mgcp_forward(struct bsc_connection *bsc, struct msgb *msg);
void bsc_mgcp_clear_endpoints_for(struct bsc_connection *bsc);
int bsc_mgcp_parse_response(const char *str, int *code, char transaction[60]);
uint32_t bsc_mgcp_extract_ci(const char *resp);
int bsc_write(struct bsc_connection *bsc, struct msgb *msg, int id);
int bsc_do_write(struct write_queue *queue, struct msgb *msg, int id);
int bsc_write_msg(struct write_queue *queue, struct msgb *msg);
int bsc_write_cb(struct bsc_fd *bfd, struct msgb *msg);
/* IMSI allow/deny handling */
void bsc_parse_reg(void *ctx, regex_t *reg, char **imsi, int argc, const char **argv);
struct bsc_nat_acc_lst *bsc_nat_acc_lst_find(struct bsc_nat *nat, const char *name);
struct bsc_nat_acc_lst *bsc_nat_acc_lst_get(struct bsc_nat *nat, const char *name);
void bsc_nat_acc_lst_delete(struct bsc_nat_acc_lst *lst);
struct bsc_nat_acc_lst_entry *bsc_nat_acc_lst_entry_create(struct bsc_nat_acc_lst *);
int bsc_nat_lst_check_allow(struct bsc_nat_acc_lst *lst, const char *imsi);
int bsc_nat_msc_is_connected(struct bsc_nat *nat);
int bsc_conn_type_to_ctr(struct sccp_connections *conn);
struct gsm48_hdr *bsc_unpack_dtap(struct bsc_nat_parsed *parsed, struct msgb *msg, uint32_t *len);
/** USSD filtering */
int bsc_ussd_init(struct bsc_nat *nat);
int bsc_check_ussd(struct sccp_connections *con, struct bsc_nat_parsed *parsed, struct msgb *msg);
int bsc_close_ussd_connections(struct bsc_nat *nat);
struct msgb *bsc_nat_rewrite_setup(struct bsc_nat *nat, struct msgb *msg, struct bsc_nat_parsed *, const char *imsi);
#endif

View File

@ -1,95 +0,0 @@
/* NAT utilities using SCCP types */
/*
* (C) 2010 by Holger Hans Peter Freyther <zecke@selfish.org>
* (C) 2010 by On-Waves
* 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/>.
*
*/
#ifndef BSC_NAT_SCCP_H
#define BSC_NAT_SCCP_H
#include <sys/types.h>
#include <osmocom/sccp/sccp_types.h>
/*
* For the NAT we will need to analyze and later patch
* the received message. This would require us to parse
* the IPA and SCCP header twice. Instead of doing this
* we will have one analyze structure and have the patching
* and filter operate on the same structure.
*/
struct bsc_nat_parsed {
/* ip access prototype */
int ipa_proto;
/* source local reference */
struct sccp_source_reference *src_local_ref;
/* destination local reference */
struct sccp_source_reference *dest_local_ref;
/* called ssn number */
int called_ssn;
/* calling ssn number */
int calling_ssn;
/* sccp message type */
int sccp_type;
/* bssap type, e.g. 0 for BSS Management */
int bssap;
/* the gsm0808 message type */
int gsm_type;
};
/*
* Per SCCP source local reference patch table. It needs to
* be updated on new SCCP connections, connection confirm and reject,
* and on the loss of the BSC connection.
*/
struct sccp_connections {
struct llist_head list_entry;
struct bsc_connection *bsc;
struct bsc_msc_connection *msc_con;
struct sccp_source_reference real_ref;
struct sccp_source_reference patched_ref;
struct sccp_source_reference remote_ref;
int has_remote_ref;
/* status */
int con_type;
int con_local;
int imsi_checked;
char *imsi;
/*
* audio handling. Remember if we have ever send a CRCX,
* remember the endpoint used by the MSC and BSC.
*/
int msc_endp;
int bsc_endp;
/* timeout handling */
struct timespec creation_time;
};
#endif

View File

@ -1,19 +0,0 @@
#ifndef _BSC_RLL_H
#define _BSC_RLL_H
#include <openbsc/gsm_data.h>
enum bsc_rllr_ind {
BSC_RLLR_IND_EST_CONF,
BSC_RLLR_IND_REL_IND,
BSC_RLLR_IND_ERR_IND,
BSC_RLLR_IND_TIMEOUT,
};
int rll_establish(struct gsm_lchan *lchan, u_int8_t link_id,
void (*cb)(struct gsm_lchan *, u_int8_t, void *,
enum bsc_rllr_ind),
void *data);
void rll_indication(struct gsm_lchan *lchan, u_int8_t link_id, u_int8_t type);
#endif /* _BSC_RLL_H */

View File

@ -1,65 +0,0 @@
/* Management functions to allocate/release struct gsm_lchan */
/* (C) 2008 by Harald Welte <laforge@gnumonks.org>
* (C) 2009 by Holger Hans Peter Freyther <zecke@selfish.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/>.
*
*/
#ifndef _CHAN_ALLOC_H
#define _CHAN_ALLOC_H
#include "gsm_data.h"
struct gsm_subscriber_connection;
/* Special allocator for C0 of BTS */
struct gsm_bts_trx_ts *ts_c0_alloc(struct gsm_bts *bts,
enum gsm_phys_chan_config pchan);
/* Regular physical channel allocator */
struct gsm_bts_trx_ts *ts_alloc(struct gsm_bts *bts,
enum gsm_phys_chan_config pchan);
/* Regular physical channel (TS) */
void ts_free(struct gsm_bts_trx_ts *ts);
/* Find an allocated channel for a specified subscriber */
struct gsm_subscriber_connection *connection_for_subscr(struct gsm_subscriber *subscr);
/* Allocate a logical channel (SDCCH, TCH, ...) */
struct gsm_lchan *lchan_alloc(struct gsm_bts *bts, enum gsm_chan_t type, int allow_bigger);
/* Free a logical channel (SDCCH, TCH, ...) */
void lchan_free(struct gsm_lchan *lchan);
void lchan_reset(struct gsm_lchan *lchan);
/* Release the given lchan */
int lchan_release(struct gsm_lchan *lchan, int sach_deact, int reason);
struct load_counter {
unsigned int total;
unsigned int used;
};
struct pchan_load {
struct load_counter pchan[GSM_PCHAN_UNKNOWN];
};
void bts_chan_load(struct pchan_load *cl, const struct gsm_bts *bts);
void network_chan_load(struct pchan_load *pl, struct gsm_network *net);
int trx_is_usable(struct gsm_bts_trx *trx);
#endif /* _CHAN_ALLOC_H */

View File

@ -1,8 +0,0 @@
#ifndef _CRC24_H
#define _CRC24_H
#define INIT_CRC24 0xffffff
u_int32_t crc24_calc(u_int32_t fcs, u_int8_t *cp, unsigned int len);
#endif

View File

@ -1,83 +0,0 @@
/* (C) 2008 by Jan Luebbe <jluebbe@debian.org>
* (C) 2009 by Holger Hans Peter Freyther <zecke@selfish.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/>.
*
*/
#ifndef _DB_H
#define _DB_H
#include <sys/types.h>
struct gsm_equipment;
struct gsm_network;
struct gsm_auth_info;
struct gsm_auth_tuple;
struct gsm_sms;
struct gsm_subscriber;
enum gsm_subscriber_field;
/* one time initialisation */
int db_init(const char *name);
int db_prepare();
int db_fini();
/* subscriber management */
struct gsm_subscriber *db_create_subscriber(struct gsm_network *net,
char *imsi);
struct gsm_subscriber *db_get_subscriber(struct gsm_network *net,
enum gsm_subscriber_field field,
const char *subscr);
int db_sync_subscriber(struct gsm_subscriber *subscriber);
int db_subscriber_alloc_tmsi(struct gsm_subscriber *subscriber);
int db_subscriber_alloc_exten(struct gsm_subscriber *subscriber);
int db_subscriber_alloc_token(struct gsm_subscriber *subscriber, u_int32_t* token);
int db_subscriber_assoc_imei(struct gsm_subscriber *subscriber, char *imei);
int db_sync_equipment(struct gsm_equipment *equip);
int db_subscriber_update(struct gsm_subscriber *subscriber);
/* auth info */
int db_get_authinfo_for_subscr(struct gsm_auth_info *ainfo,
struct gsm_subscriber *subscr);
int db_sync_authinfo_for_subscr(struct gsm_auth_info *ainfo,
struct gsm_subscriber *subscr);
int db_get_lastauthtuple_for_subscr(struct gsm_auth_tuple *atuple,
struct gsm_subscriber *subscr);
int db_sync_lastauthtuple_for_subscr(struct gsm_auth_tuple *atuple,
struct gsm_subscriber *subscr);
/* SMS store-and-forward */
int db_sms_store(struct gsm_sms *sms);
struct gsm_sms *db_sms_get(struct gsm_network *net, unsigned long long id);
struct gsm_sms *db_sms_get_unsent(struct gsm_network *net, unsigned long long min_id);
struct gsm_sms *db_sms_get_unsent_by_subscr(struct gsm_network *net, unsigned long long min_subscr_id, unsigned int failed);
struct gsm_sms *db_sms_get_unsent_for_subscr(struct gsm_subscriber *subscr);
int db_sms_mark_sent(struct gsm_sms *sms);
int db_sms_inc_deliver_attempts(struct gsm_sms *sms);
/* APDU blob storage */
int db_apdu_blob_store(struct gsm_subscriber *subscr,
u_int8_t apdu_id_flags, u_int8_t len,
u_int8_t *apdu);
/* Statistics counter storage */
struct counter;
int db_store_counter(struct counter *ctr);
struct rate_ctr_group;
int db_store_rate_ctr_group(struct rate_ctr_group *ctrg);
#endif /* _DB_H */

View File

@ -1,70 +0,0 @@
#ifndef _DEBUG_H
#define _DEBUG_H
#include <stdio.h>
#include <osmocore/linuxlist.h>
#define DEBUG
#include <osmocore/logging.h>
/* Debug Areas of the code */
enum {
DRLL,
DCC,
DMM,
DRR,
DRSL,
DNM,
DMNCC,
DSMS,
DPAG,
DMEAS,
DMI,
DMIB,
DMUX,
DINP,
DSCCP,
DMSC,
DMGCP,
DHO,
DDB,
DREF,
DGPRS,
DNS,
DBSSGP,
DLLC,
DSNDCP,
DNAT,
Debug_LastEntry,
};
/* context */
#define BSC_CTX_LCHAN 0
#define BSC_CTX_SUBSCR 1
#define BSC_CTX_BTS 2
#define BSC_CTX_SCCP 3
#define BSC_CTX_NSVC 4
#define BSC_CTX_BVC 5
/* target */
enum {
//DEBUG_FILTER_ALL = 1 << 0,
LOG_FILTER_IMSI = 1 << 1,
LOG_FILTER_NSVC = 1 << 2,
LOG_FILTER_BVC = 1 << 3,
};
/* we don't need a header dependency for this... */
struct gprs_nsvc;
struct bssgp_bvc_ctx;
void log_set_imsi_filter(struct log_target *target, const char *imsi);
void log_set_nsvc_filter(struct log_target *target,
struct gprs_nsvc *nsvc);
void log_set_bvc_filter(struct log_target *target,
struct bssgp_bvc_ctx *bctx);
extern const struct log_info log_info;
#endif /* _DEBUG_H */

View File

@ -1,187 +0,0 @@
#ifndef _E1_INPUT_H
#define _E1_INPUT_H
#include <stdlib.h>
#include <netinet/in.h>
#include <osmocore/linuxlist.h>
#include <openbsc/gsm_data.h>
#include <osmocore/msgb.h>
#include <osmocore/select.h>
#include <openbsc/subchan_demux.h>
#define NUM_E1_TS 32
enum e1inp_sign_type {
E1INP_SIGN_NONE,
E1INP_SIGN_OML,
E1INP_SIGN_RSL,
};
const char *e1inp_signtype_name(enum e1inp_sign_type tp);
struct e1inp_ts;
struct e1inp_sign_link {
/* list of signalling links */
struct llist_head list;
/* to which timeslot do we belong? */
struct e1inp_ts *ts;
enum e1inp_sign_type type;
/* trx for msg->trx of received msgs */
struct gsm_bts_trx *trx;
/* msgb queue of to-be-transmitted msgs */
struct llist_head tx_list;
/* SAPI and TEI on the E1 TS */
u_int8_t sapi;
u_int8_t tei;
union {
struct {
u_int8_t channel;
} misdn;
} driver;
};
enum e1inp_ts_type {
E1INP_TS_TYPE_NONE,
E1INP_TS_TYPE_SIGN,
E1INP_TS_TYPE_TRAU,
};
const char *e1inp_tstype_name(enum e1inp_ts_type tp);
/* A timeslot in the E1 interface */
struct e1inp_ts {
enum e1inp_ts_type type;
int num;
/* to which line do we belong ? */
struct e1inp_line *line;
union {
struct {
/* list of all signalling links on this TS */
struct llist_head sign_links;
/* delay for the queue */
int delay;
/* timer when to dequeue next frame */
struct timer_list tx_timer;
} sign;
struct {
/* subchannel demuxer for frames from E1 */
struct subch_demux demux;
/* subchannel muxer for frames to E1 */
struct subch_mux mux;
} trau;
};
union {
struct {
/* mISDN driver has one fd for each ts */
struct bsc_fd fd;
} misdn;
struct {
/* ip.access driver has one fd for each ts */
struct bsc_fd fd;
} ipaccess;
struct {
/* DAHDI driver has one fd for each ts */
struct bsc_fd fd;
struct lapd_instance *lapd;
} dahdi;
} driver;
};
struct e1inp_driver {
struct llist_head list;
const char *name;
int (*want_write)(struct e1inp_ts *ts);
int (*line_update)(struct e1inp_line *line);
int default_delay;
};
struct e1inp_line {
struct llist_head list;
unsigned int num;
const char *name;
/* array of timestlots */
struct e1inp_ts ts[NUM_E1_TS];
struct e1inp_driver *driver;
void *driver_data;
};
/* register a driver with the E1 core */
int e1inp_driver_register(struct e1inp_driver *drv);
/* fine a previously registered driver */
struct e1inp_driver *e1inp_driver_find(const char *name);
/* register a line with the E1 core */
int e1inp_line_register(struct e1inp_line *line);
/* get a line by its ID */
struct e1inp_line *e1inp_line_get(u_int8_t e1_nr);
/* create a line in the E1 input core */
struct e1inp_line *e1inp_line_create(u_int8_t e1_nr, const char *driver_name);
/* find a sign_link for given TEI and SAPI in a TS */
struct e1inp_sign_link *
e1inp_lookup_sign_link(struct e1inp_ts *ts, u_int8_t tei,
u_int8_t sapi);
/* create a new signalling link in a E1 timeslot */
struct e1inp_sign_link *
e1inp_sign_link_create(struct e1inp_ts *ts, enum e1inp_sign_type type,
struct gsm_bts_trx *trx, u_int8_t tei,
u_int8_t sapi);
/* configure and initialize one e1inp_ts */
int e1inp_ts_config(struct e1inp_ts *ts, struct e1inp_line *line,
enum e1inp_ts_type type);
/* Call from the Stack: configuration of this TS has changed */
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,
u_int8_t tei, u_int8_t sapi);
/* called by driver if it wants to transmit on a given TS */
struct msgb *e1inp_tx_ts(struct e1inp_ts *e1i_ts,
struct e1inp_sign_link **sign_link);
/* called by driver in case some kind of link state event */
int e1inp_event(struct e1inp_ts *ts, int evt, u_int8_t tei, u_int8_t sapi);
/* Write LAPD frames to the fd. */
void e1_set_pcap_fd(int fd);
/* called by TRAU muxer to obtain the destination mux entity */
struct subch_mux *e1inp_get_mux(u_int8_t e1_nr, u_int8_t ts_nr);
void e1inp_sign_link_destroy(struct e1inp_sign_link *link);
int e1inp_line_update(struct e1inp_line *line);
/* e1_config.c */
int e1_reconfig_ts(struct gsm_bts_trx_ts *ts);
int e1_reconfig_trx(struct gsm_bts_trx *trx);
int e1_reconfig_bts(struct gsm_bts *bts);
int ia_config_connect(struct gsm_bts *bts, struct sockaddr_in *sin);
int ipaccess_setup(struct gsm_network *gsmnet);
extern struct llist_head e1inp_driver_list;
extern struct llist_head e1inp_line_list;
int e1inp_vty_init(void);
void e1inp_init(void);
int _abis_nm_sendmsg(struct msgb *msg, int to_trx_oml);
#endif /* _E1_INPUT_H */

View File

@ -1,39 +0,0 @@
#ifndef _GB_PROXY_H
#define _GB_PROXY_H
#include <sys/types.h>
#include <osmocore/msgb.h>
#include <openbsc/gprs_ns.h>
#include <osmocom/vty/command.h>
struct gbproxy_config {
/* parsed from config file */
u_int16_t nsip_sgsn_nsei;
/* misc */
struct gprs_ns_inst *nsi;
};
extern struct gbproxy_config gbcfg;
extern struct cmd_element show_gbproxy_cmd;
/* gb_proxy_vty .c */
int gbproxy_vty_init(void);
int gbproxy_parse_config(const char *config_file, struct gbproxy_config *cfg);
/* gb_proxy.c */
/* Main input function for Gb proxy */
int gbprox_rcvmsg(struct msgb *msg, struct gprs_nsvc *nsvc, uint16_t ns_bvci);
int gbprox_signal(unsigned int subsys, unsigned int signal,
void *handler_data, void *signal_data);
/* Reset all persistent NS-VC's */
int gbprox_reset_persistent_nsvcs(struct gprs_ns_inst *nsi);
#endif

View File

@ -1,232 +0,0 @@
#ifndef _GPRS_BSSGP_H
#define _GPRS_BSSGP_H
#include <stdint.h>
/* Section 5.4.1 */
#define BVCI_SIGNALLING 0x0000
#define BVCI_PTM 0x0001
/* Section 11.3.26 / Table 11.27 */
enum bssgp_pdu_type {
/* PDUs between RL and BSSGP SAPs */
BSSGP_PDUT_DL_UNITDATA = 0x00,
BSSGP_PDUT_UL_UNITDATA = 0x01,
BSSGP_PDUT_RA_CAPABILITY = 0x02,
BSSGP_PDUT_PTM_UNITDATA = 0x03,
/* PDUs between GMM SAPs */
BSSGP_PDUT_PAGING_PS = 0x06,
BSSGP_PDUT_PAGING_CS = 0x07,
BSSGP_PDUT_RA_CAPA_UDPATE = 0x08,
BSSGP_PDUT_RA_CAPA_UPDATE_ACK = 0x09,
BSSGP_PDUT_RADIO_STATUS = 0x0a,
BSSGP_PDUT_SUSPEND = 0x0b,
BSSGP_PDUT_SUSPEND_ACK = 0x0c,
BSSGP_PDUT_SUSPEND_NACK = 0x0d,
BSSGP_PDUT_RESUME = 0x0e,
BSSGP_PDUT_RESUME_ACK = 0x0f,
BSSGP_PDUT_RESUME_NACK = 0x10,
/* PDus between NM SAPs */
BSSGP_PDUT_BVC_BLOCK = 0x20,
BSSGP_PDUT_BVC_BLOCK_ACK = 0x21,
BSSGP_PDUT_BVC_RESET = 0x22,
BSSGP_PDUT_BVC_RESET_ACK = 0x23,
BSSGP_PDUT_BVC_UNBLOCK = 0x24,
BSSGP_PDUT_BVC_UNBLOCK_ACK = 0x25,
BSSGP_PDUT_FLOW_CONTROL_BVC = 0x26,
BSSGP_PDUT_FLOW_CONTROL_BVC_ACK = 0x27,
BSSGP_PDUT_FLOW_CONTROL_MS = 0x28,
BSSGP_PDUT_FLOW_CONTROL_MS_ACK = 0x29,
BSSGP_PDUT_FLUSH_LL = 0x2a,
BSSGP_PDUT_FLUSH_LL_ACK = 0x2b,
BSSGP_PDUT_LLC_DISCARD = 0x2c,
BSSGP_PDUT_SGSN_INVOKE_TRACE = 0x40,
BSSGP_PDUT_STATUS = 0x41,
/* PDUs between PFM SAP's */
BSSGP_PDUT_DOWNLOAD_BSS_PFC = 0x50,
BSSGP_PDUT_CREATE_BSS_PFC = 0x51,
BSSGP_PDUT_CREATE_BSS_PFC_ACK = 0x52,
BSSGP_PDUT_CREATE_BSS_PFC_NACK = 0x53,
BSSGP_PDUT_MODIFY_BSS_PFC = 0x54,
BSSGP_PDUT_MODIFY_BSS_PFC_ACK = 0x55,
BSSGP_PDUT_DELETE_BSS_PFC = 0x56,
BSSGP_PDUT_DELETE_BSS_PFC_ACK = 0x57,
};
/* Section 10.2.1 and 10.2.2 */
struct bssgp_ud_hdr {
uint8_t pdu_type;
uint32_t tlli;
uint8_t qos_profile[3];
uint8_t data[0]; /* TLV's */
} __attribute__((packed));
struct bssgp_normal_hdr {
uint8_t pdu_type;
uint8_t data[0]; /* TLV's */
};
enum bssgp_iei_type {
BSSGP_IE_ALIGNMENT = 0x00,
BSSGP_IE_BMAX_DEFAULT_MS = 0x01,
BSSGP_IE_BSS_AREA_ID = 0x02,
BSSGP_IE_BUCKET_LEAK_RATE = 0x03,
BSSGP_IE_BVCI = 0x04,
BSSGP_IE_BVC_BUCKET_SIZE = 0x05,
BSSGP_IE_BVC_MEASUREMENT = 0x06,
BSSGP_IE_CAUSE = 0x07,
BSSGP_IE_CELL_ID = 0x08,
BSSGP_IE_CHAN_NEEDED = 0x09,
BSSGP_IE_DRX_PARAMS = 0x0a,
BSSGP_IE_EMLPP_PRIO = 0x0b,
BSSGP_IE_FLUSH_ACTION = 0x0c,
BSSGP_IE_IMSI = 0x0d,
BSSGP_IE_LLC_PDU = 0x0e,
BSSGP_IE_LLC_FRAMES_DISCARDED = 0x0f,
BSSGP_IE_LOCATION_AREA = 0x10,
BSSGP_IE_MOBILE_ID = 0x11,
BSSGP_IE_MS_BUCKET_SIZE = 0x12,
BSSGP_IE_MS_RADIO_ACCESS_CAP = 0x13,
BSSGP_IE_OMC_ID = 0x14,
BSSGP_IE_PDU_IN_ERROR = 0x15,
BSSGP_IE_PDU_LIFETIME = 0x16,
BSSGP_IE_PRIORITY = 0x17,
BSSGP_IE_QOS_PROFILE = 0x18,
BSSGP_IE_RADIO_CAUSE = 0x19,
BSSGP_IE_RA_CAP_UPD_CAUSE = 0x1a,
BSSGP_IE_ROUTEING_AREA = 0x1b,
BSSGP_IE_R_DEFAULT_MS = 0x1c,
BSSGP_IE_SUSPEND_REF_NR = 0x1d,
BSSGP_IE_TAG = 0x1e,
BSSGP_IE_TLLI = 0x1f,
BSSGP_IE_TMSI = 0x20,
BSSGP_IE_TRACE_REFERENC = 0x21,
BSSGP_IE_TRACE_TYPE = 0x22,
BSSGP_IE_TRANSACTION_ID = 0x23,
BSSGP_IE_TRIGGER_ID = 0x24,
BSSGP_IE_NUM_OCT_AFF = 0x25,
BSSGP_IE_LSA_ID_LIST = 0x26,
BSSGP_IE_LSA_INFORMATION = 0x27,
BSSGP_IE_PACKET_FLOW_ID = 0x28,
BSSGP_IE_PACKET_FLOW_TIMER = 0x29,
BSSGP_IE_AGG_BSS_QOS_PROFILE = 0x3a,
BSSGP_IE_FEATURE_BITMAP = 0x3b,
BSSGP_IE_BUCKET_FULL_RATIO = 0x3c,
BSSGP_IE_SERVICE_UTRAN_CCO = 0x3d,
};
/* Section 11.3.8 / Table 11.10: Cause coding */
enum gprs_bssgp_cause {
BSSGP_CAUSE_PROC_OVERLOAD = 0x00,
BSSGP_CAUSE_EQUIP_FAIL = 0x01,
BSSGP_CAUSE_TRASIT_NET_FAIL = 0x02,
BSSGP_CAUSE_CAPA_GREATER_0KPBS = 0x03,
BSSGP_CAUSE_UNKNOWN_MS = 0x04,
BSSGP_CAUSE_UNKNOWN_BVCI = 0x05,
BSSGP_CAUSE_CELL_TRAF_CONG = 0x06,
BSSGP_CAUSE_SGSN_CONG = 0x07,
BSSGP_CAUSE_OML_INTERV = 0x08,
BSSGP_CAUSE_BVCI_BLOCKED = 0x09,
BSSGP_CAUSE_PFC_CREATE_FAIL = 0x0a,
BSSGP_CAUSE_SEM_INCORR_PDU = 0x20,
BSSGP_CAUSE_INV_MAND_INF = 0x21,
BSSGP_CAUSE_MISSING_MAND_IE = 0x22,
BSSGP_CAUSE_MISSING_COND_IE = 0x23,
BSSGP_CAUSE_UNEXP_COND_IE = 0x24,
BSSGP_CAUSE_COND_IE_ERR = 0x25,
BSSGP_CAUSE_PDU_INCOMP_STATE = 0x26,
BSSGP_CAUSE_PROTO_ERR_UNSPEC = 0x27,
BSSGP_CAUSE_PDU_INCOMP_FEAT = 0x28,
};
/* Our implementation */
/* gprs_bssgp_util.c */
extern struct gprs_ns_inst *bssgp_nsi;
struct msgb *bssgp_msgb_alloc(void);
const char *bssgp_cause_str(enum gprs_bssgp_cause cause);
/* Transmit a simple response such as BLOCK/UNBLOCK/RESET ACK/NACK */
int bssgp_tx_simple_bvci(uint8_t pdu_type, uint16_t nsei,
uint16_t bvci, uint16_t ns_bvci);
/* Chapter 10.4.14: Status */
int bssgp_tx_status(uint8_t cause, uint16_t *bvci, struct msgb *orig_msg);
/* gprs_bssgp.c */
#define BVC_S_BLOCKED 0x0001
/* The per-BTS context that we keep on the SGSN side of the BSSGP link */
struct bssgp_bvc_ctx {
struct llist_head list;
/* parsed RA ID and Cell ID of the remote BTS */
struct gprs_ra_id ra_id;
uint16_t cell_id;
/* NSEI and BVCI of underlying Gb link. Together they
* uniquely identify a link to a BTS (5.4.4) */
uint16_t bvci;
uint16_t nsei;
uint32_t state;
struct rate_ctr_group *ctrg;
/* we might want to add this as a shortcut later, avoiding the NSVC
* lookup for every packet, similar to a routing cache */
//struct gprs_nsvc *nsvc;
};
extern struct llist_head bssgp_bvc_ctxts;
/* Find a BTS Context based on parsed RA ID and Cell ID */
struct bssgp_bvc_ctx *btsctx_by_raid_cid(const struct gprs_ra_id *raid, uint16_t cid);
/* Find a BTS context based on BVCI+NSEI tuple */
struct bssgp_bvc_ctx *btsctx_by_bvci_nsei(uint16_t bvci, uint16_t nsei);
#include <osmocore/tlv.h>
/* BSSGP-UL-UNITDATA.ind */
int gprs_bssgp_rcvmsg(struct msgb *msg);
/* BSSGP-DL-UNITDATA.req */
struct sgsn_mm_ctx;
int gprs_bssgp_tx_dl_ud(struct msgb *msg, struct sgsn_mm_ctx *mmctx);
uint16_t bssgp_parse_cell_id(struct gprs_ra_id *raid, const uint8_t *buf);
/* Wrapper around TLV parser to parse BSSGP IEs */
static inline int bssgp_tlv_parse(struct tlv_parsed *tp, uint8_t *buf, int len)
{
return tlv_parse(tp, &tvlv_att_def, buf, len, 0, 0);
}
enum bssgp_paging_mode {
BSSGP_PAGING_PS,
BSSGP_PAGING_CS,
};
enum bssgp_paging_scope {
BSSGP_PAGING_BSS_AREA, /* all cells in BSS */
BSSGP_PAGING_LOCATION_AREA, /* all cells in LA */
BSSGP_PAGING_ROUTEING_AREA, /* all cells in RA */
BSSGP_PAGING_BVCI, /* one cell */
};
struct bssgp_paging_info {
enum bssgp_paging_mode mode;
enum bssgp_paging_scope scope;
struct gprs_ra_id raid;
uint16_t bvci;
const char *imsi;
uint32_t *ptmsi;
uint16_t drx_params;
uint8_t qos[3];
};
/* Send a single GMM-PAGING.req to a given NSEI/NS-BVCI */
int gprs_bssgp_tx_paging(uint16_t nsei, uint16_t ns_bvci,
struct bssgp_paging_info *pinfo);
/* gprs_bssgp_vty.c */
int gprs_bssgp_vty_init(void);
#endif /* _GPRS_BSSGP_H */

View File

@ -1,19 +0,0 @@
#ifndef _GPRS_GMM_H
#define _GPRS_GMM_H
#include <osmocore/msgb.h>
#include <openbsc/gprs_sgsn.h>
int gsm48_tx_gsm_deact_pdp_req(struct sgsn_pdp_ctx *pdp, uint8_t sm_cause);
int gsm48_tx_gsm_act_pdp_rej(struct sgsn_mm_ctx *mm, uint8_t tid,
uint8_t cause, uint8_t pco_len, uint8_t *pco_v);
int gsm48_tx_gsm_act_pdp_acc(struct sgsn_pdp_ctx *pdp);
int gsm48_tx_gsm_deact_pdp_acc(struct sgsn_pdp_ctx *pdp);
int gsm0408_gprs_rcvmsg(struct msgb *msg, struct gprs_llc_llme *llme);
int gprs_gmm_rx_suspend(struct gprs_ra_id *raid, uint32_t tlli);
int gprs_gmm_rx_resume(struct gprs_ra_id *raid, uint32_t tlli,
uint8_t suspend_ref);
#endif /* _GPRS_GMM_H */

View File

@ -1,167 +0,0 @@
#ifndef _GPRS_LLC_H
#define _GPRS_LLC_H
#include <stdint.h>
#include <openbsc/gprs_sgsn.h>
/* Section 4.7 LLC Layer Structure */
enum gprs_llc_sapi {
GPRS_SAPI_GMM = 1,
GPRS_SAPI_TOM2 = 2,
GPRS_SAPI_SNDCP3 = 3,
GPRS_SAPI_SNDCP5 = 5,
GPRS_SAPI_SMS = 7,
GPRS_SAPI_TOM8 = 8,
GPRS_SAPI_SNDCP9 = 9,
GPRS_SAPI_SNDCP11 = 11,
};
/* Section 6.4 Commands and Responses */
enum gprs_llc_u_cmd {
GPRS_LLC_U_DM_RESP = 0x01,
GPRS_LLC_U_DISC_CMD = 0x04,
GPRS_LLC_U_UA_RESP = 0x06,
GPRS_LLC_U_SABM_CMD = 0x07,
GPRS_LLC_U_FRMR_RESP = 0x08,
GPRS_LLC_U_XID = 0x0b,
GPRS_LLC_U_NULL_CMD = 0x00,
};
/* TS 04.64 Section 7.1.2 Table 7: LLC layer primitives (GMM/SNDCP/SMS/TOM) */
/* TS 04.65 Section 5.1.2 Table 2: Service primitives used by SNDCP */
enum gprs_llc_primitive {
/* GMM <-> LLME */
LLGMM_ASSIGN_REQ, /* GMM tells us new TLLI: TLLI old, TLLI new, Kc, CiphAlg */
LLGMM_RESET_REQ, /* GMM tells us to perform XID negotiation: TLLI */
LLGMM_RESET_CNF, /* LLC informs GMM that XID has completed: TLLI */
LLGMM_SUSPEND_REQ, /* GMM tells us MS has suspended: TLLI, Page */
LLGMM_RESUME_REQ, /* GMM tells us MS has resumed: TLLI */
LLGMM_PAGE_IND, /* LLC asks GMM to page MS: TLLI */
LLGMM_IOV_REQ, /* GMM tells us to perform XID: TLLI */
LLGMM_STATUS_IND, /* LLC informs GMM about error: TLLI, Cause */
/* LLE <-> (GMM/SNDCP/SMS/TOM) */
LL_RESET_IND, /* TLLI */
LL_ESTABLISH_REQ, /* TLLI, XID Req */
LL_ESTABLISH_IND, /* TLLI, XID Req, N201-I, N201-U */
LL_ESTABLISH_RESP, /* TLLI, XID Negotiated */
LL_ESTABLISH_CONF, /* TLLI, XID Neg, N201-i, N201-U */
LL_RELEASE_REQ, /* TLLI, Local */
LL_RELEASE_IND, /* TLLI, Cause */
LL_RELEASE_CONF, /* TLLI */
LL_XID_REQ, /* TLLI, XID Requested */
LL_XID_IND, /* TLLI, XID Req, N201-I, N201-U */
LL_XID_RESP, /* TLLI, XID Negotiated */
LL_XID_CONF, /* TLLI, XID Neg, N201-I, N201-U */
LL_DATA_REQ, /* TLLI, SN-PDU, Ref, QoS, Radio Prio, Ciph */
LL_DATA_IND, /* TLLI, SN-PDU */
LL_DATA_CONF, /* TLLI, Ref */
LL_UNITDATA_REQ, /* TLLI, SN-PDU, Ref, QoS, Radio Prio, Ciph */
LL_UNITDATA_IND, /* TLLI, SN-PDU */
LL_STATUS_IND, /* TLLI, Cause */
};
/* Section 4.5.2 Logical Link States + Annex C.2 */
enum gprs_llc_lle_state {
GPRS_LLES_UNASSIGNED = 1, /* No TLLI yet */
GPRS_LLES_ASSIGNED_ADM = 2, /* TLLI assigned */
GPRS_LLES_LOCAL_EST = 3, /* Local Establishment */
GPRS_LLES_REMOTE_EST = 4, /* Remote Establishment */
GPRS_LLES_ABM = 5,
GPRS_LLES_LOCAL_REL = 6, /* Local Release */
GPRS_LLES_TIMER_REC = 7, /* Timer Recovery */
};
enum gprs_llc_llme_state {
GPRS_LLMS_UNASSIGNED = 1, /* No TLLI yet */
GPRS_LLMS_ASSIGNED = 2, /* TLLI assigned */
};
/* Section 8.9.9 LLC layer parameter default values */
struct gprs_llc_params {
uint16_t iov_i_exp;
uint16_t t200_201;
uint16_t n200;
uint16_t n201_u;
uint16_t n201_i;
uint16_t mD;
uint16_t mU;
uint16_t kD;
uint16_t kU;
};
/* Section 4.7.1: Logical Link Entity: One per DLCI (TLLI + SAPI) */
struct gprs_llc_lle {
struct llist_head list;
uint32_t sapi;
struct gprs_llc_llme *llme;
enum gprs_llc_lle_state state;
struct timer_list t200;
struct timer_list t201; /* wait for acknowledgement */
uint16_t v_sent;
uint16_t v_ack;
uint16_t v_recv;
uint16_t vu_send;
uint16_t vu_recv;
/* Overflow Counter for ABM */
uint32_t oc_i_send;
uint32_t oc_i_recv;
/* Overflow Counter for unconfirmed transfer */
uint32_t oc_ui_send;
uint32_t oc_ui_recv;
unsigned int retrans_ctr;
struct gprs_llc_params params;
};
#define NUM_SAPIS 16
struct gprs_llc_llme {
struct llist_head list;
enum gprs_llc_llme_state state;
uint32_t tlli;
uint32_t old_tlli;
/* Crypto parameters */
enum gprs_ciph_algo algo;
uint8_t kc[8];
/* over which BSSGP BTS ctx do we need to transmit */
uint16_t bvci;
uint16_t nsei;
struct gprs_llc_lle lle[NUM_SAPIS];
int suspended;
};
extern struct llist_head gprs_llc_llmes;
/* BSSGP-UL-UNITDATA.ind */
int gprs_llc_rcvmsg(struct msgb *msg, struct tlv_parsed *tv);
/* LL-UNITDATA.req */
int gprs_llc_tx_ui(struct msgb *msg, uint8_t sapi, int command,
void *mmctx);
/* 04.64 Chapter 7.2.1.1 LLGMM-ASSIGN */
int gprs_llgmm_assign(struct gprs_llc_llme *llme,
uint32_t old_tlli, uint32_t new_tlli,
enum gprs_ciph_algo alg, const uint8_t *kc);
int gprs_llgmm_suspend(struct gprs_llc_llme *llme);
int gprs_llgmm_resume(struct gprs_llc_llme *llme);
void gprs_llgmm_reset_state(struct gprs_llc_llme *llme);
int gprs_llc_init(const char *cipher_plugin_path);
int gprs_llc_vty_init(void);
#endif

View File

@ -1,232 +0,0 @@
#ifndef _GPRS_NS_H
#define _GPRS_NS_H
#include <stdint.h>
/* GPRS Networks Service (NS) messages on the Gb interface
* 3GPP TS 08.16 version 8.0.1 Release 1999 / ETSI TS 101 299 V8.0.1 (2002-05)
* 3GPP TS 48.016 version 6.5.0 Release 6 / ETSI TS 148 016 V6.5.0 (2005-11) */
struct gprs_ns_hdr {
uint8_t pdu_type;
uint8_t data[0];
} __attribute__((packed));
/* TS 08.16, Section 10.3.7, Table 14 */
enum ns_pdu_type {
NS_PDUT_UNITDATA = 0x00,
NS_PDUT_RESET = 0x02,
NS_PDUT_RESET_ACK = 0x03,
NS_PDUT_BLOCK = 0x04,
NS_PDUT_BLOCK_ACK = 0x05,
NS_PDUT_UNBLOCK = 0x06,
NS_PDUT_UNBLOCK_ACK = 0x07,
NS_PDUT_STATUS = 0x08,
NS_PDUT_ALIVE = 0x0a,
NS_PDUT_ALIVE_ACK = 0x0b,
/* TS 48.016 Section 10.3.7, Table 10.3.7.1 */
SNS_PDUT_ACK = 0x0c,
SNS_PDUT_ADD = 0x0d,
SNS_PDUT_CHANGE_WEIGHT = 0x0e,
SNS_PDUT_CONFIG = 0x0f,
SNS_PDUT_CONFIG_ACK = 0x10,
SNS_PDUT_DELETE = 0x11,
SNS_PDUT_SIZE = 0x12,
SNS_PDUT_SIZE_ACK = 0x13,
};
/* TS 08.16, Section 10.3, Table 12 */
enum ns_ctrl_ie {
NS_IE_CAUSE = 0x00,
NS_IE_VCI = 0x01,
NS_IE_PDU = 0x02,
NS_IE_BVCI = 0x03,
NS_IE_NSEI = 0x04,
/* TS 48.016 Section 10.3, Table 10.3.1 */
NS_IE_IPv4_LIST = 0x05,
NS_IE_IPv6_LIST = 0x06,
NS_IE_MAX_NR_NSVC = 0x07,
NS_IE_IPv4_EP_NR = 0x08,
NS_IE_IPv6_EP_NR = 0x09,
NS_IE_RESET_FLAG = 0x0a,
NS_IE_IP_ADDR = 0x0b,
};
/* TS 08.16, Section 10.3.2, Table 13 */
enum ns_cause {
NS_CAUSE_TRANSIT_FAIL = 0x00,
NS_CAUSE_OM_INTERVENTION = 0x01,
NS_CAUSE_EQUIP_FAIL = 0x02,
NS_CAUSE_NSVC_BLOCKED = 0x03,
NS_CAUSE_NSVC_UNKNOWN = 0x04,
NS_CAUSE_BVCI_UNKNOWN = 0x05,
NS_CAUSE_SEM_INCORR_PDU = 0x08,
NS_CAUSE_PDU_INCOMP_PSTATE = 0x0a,
NS_CAUSE_PROTO_ERR_UNSPEC = 0x0b,
NS_CAUSE_INVAL_ESSENT_IE = 0x0c,
NS_CAUSE_MISSING_ESSENT_IE = 0x0d,
/* TS 48.016 Section 10.3.2, Table 10.3.2.1 */
NS_CAUSE_INVAL_NR_IPv4_EP = 0x0e,
NS_CAUSE_INVAL_NR_IPv6_EP = 0x0f,
NS_CAUSE_INVAL_NR_NS_VC = 0x10,
NS_CAUSE_INVAL_WEIGH = 0x11,
NS_CAUSE_UNKN_IP_EP = 0x12,
NS_CAUSE_UNKN_IP_ADDR = 0x13,
NS_CAUSE_UNKN_IP_TEST_FAILED = 0x14,
};
/* Our Implementation */
#include <netinet/in.h>
#include <osmocore/linuxlist.h>
#include <osmocore/msgb.h>
#include <osmocore/timer.h>
#include <osmocore/select.h>
#define NS_TIMERS_COUNT 7
#define NS_TIMERS "(tns-block|tns-block-retries|tns-reset|tns-reset-retries|tns-test|tns-alive|tns-alive-retries)"
#define NS_TIMERS_HELP \
"(un)blocking Timer (Tns-block) timeout\n" \
"(un)blocking Timer (Tns-block) number of retries\n" \
"Reset Timer (Tns-reset) timeout\n" \
"Reset Timer (Tns-reset) number of retries\n" \
"Test Timer (Tns-test) timeout\n" \
enum ns_timeout {
NS_TOUT_TNS_BLOCK,
NS_TOUT_TNS_BLOCK_RETRIES,
NS_TOUT_TNS_RESET,
NS_TOUT_TNS_RESET_RETRIES,
NS_TOUT_TNS_TEST,
NS_TOUT_TNS_ALIVE,
NS_TOUT_TNS_ALIVE_RETRIES,
};
#define NSE_S_BLOCKED 0x0001
#define NSE_S_ALIVE 0x0002
enum gprs_ns_ll {
GPRS_NS_LL_UDP,
GPRS_NS_LL_E1,
GPRS_NS_LL_FR_GRE,
};
enum gprs_ns_evt {
GPRS_NS_EVT_UNIT_DATA,
};
struct gprs_nsvc;
typedef int gprs_ns_cb_t(enum gprs_ns_evt event, struct gprs_nsvc *nsvc,
struct msgb *msg, uint16_t bvci);
/* An instance of the NS protocol stack */
struct gprs_ns_inst {
/* callback to the user for incoming UNIT DATA IND */
gprs_ns_cb_t *cb;
/* linked lists of all NSVC in this instance */
struct llist_head gprs_nsvcs;
/* a NSVC object that's needed to deal with packets for unknown NSVC */
struct gprs_nsvc *unknown_nsvc;
uint16_t timeout[NS_TIMERS_COUNT];
/* NS-over-IP specific bits */
struct {
struct bsc_fd fd;
uint32_t local_ip;
uint16_t local_port;
} nsip;
/* NS-over-FR-over-GRE-over-IP specific bits */
struct {
struct bsc_fd fd;
uint32_t local_ip;
int enabled:1;
} frgre;
};
enum nsvc_timer_mode {
/* standard timers */
NSVC_TIMER_TNS_TEST,
NSVC_TIMER_TNS_ALIVE,
NSVC_TIMER_TNS_RESET,
_NSVC_TIMER_NR,
};
struct gprs_nsvc {
struct llist_head list;
struct gprs_ns_inst *nsi;
uint16_t nsei; /* end-to-end significance */
uint16_t nsvci; /* uniquely identifies NS-VC at SGSN */
uint32_t state;
uint32_t remote_state;
struct timer_list timer;
enum nsvc_timer_mode timer_mode;
int alive_retries;
unsigned int remote_end_is_sgsn:1;
unsigned int persistent:1;
struct rate_ctr_group *ctrg;
/* which link-layer are we based on? */
enum gprs_ns_ll ll;
union {
struct {
struct sockaddr_in bts_addr;
} ip;
struct {
struct sockaddr_in bts_addr;
} frgre;
};
};
/* Create a new NS protocol instance */
struct gprs_ns_inst *gprs_ns_instantiate(gprs_ns_cb_t *cb);
/* Destroy a NS protocol instance */
void gprs_ns_destroy(struct gprs_ns_inst *nsi);
/* Listen for incoming GPRS packets via NS/UDP */
int gprs_ns_nsip_listen(struct gprs_ns_inst *nsi);
struct sockaddr_in;
/* main function for higher layers (BSSGP) to send NS messages */
int gprs_ns_sendmsg(struct gprs_ns_inst *nsi, struct msgb *msg);
int gprs_ns_tx_reset(struct gprs_nsvc *nsvc, uint8_t cause);
int gprs_ns_tx_block(struct gprs_nsvc *nsvc, uint8_t cause);
int gprs_ns_tx_unblock(struct gprs_nsvc *nsvc);
/* Listen for incoming GPRS packets via NS/FR/GRE */
int gprs_ns_frgre_listen(struct gprs_ns_inst *nsi);
/* Establish a connection (from the BSS) to the SGSN */
struct gprs_nsvc *nsip_connect(struct gprs_ns_inst *nsi,
struct sockaddr_in *dest, uint16_t nsei,
uint16_t nsvci);
struct gprs_nsvc *nsvc_create(struct gprs_ns_inst *nsi, uint16_t nsvci);
void nsvc_delete(struct gprs_nsvc *nsvc);
struct gprs_nsvc *nsvc_by_nsei(struct gprs_ns_inst *nsi, uint16_t nsei);
struct gprs_nsvc *nsvc_by_nsvci(struct gprs_ns_inst *nsi, uint16_t nsvci);
/* Initiate a RESET procedure (including timer start, ...)*/
void gprs_nsvc_reset(struct gprs_nsvc *nsvc, uint8_t cause);
/* Add NS-specific VTY stuff */
int gprs_ns_vty_init(struct gprs_ns_inst *nsi);
#define NS_ALLOC_SIZE 2048
#define NS_ALLOC_HEADROOM 20
static inline struct msgb *gprs_ns_msgb_alloc(void)
{
return msgb_alloc_headroom(NS_ALLOC_SIZE, NS_ALLOC_HEADROOM, "GPRS/NS");
}
#endif

View File

@ -1,6 +0,0 @@
#ifndef _GPRS_NS_FRGRE_H
#define _GPRS_NS_FRGRE_H
int gprs_ns_frgre_sendmsg(struct gprs_nsvc *nsvc, struct msgb *msg);
#endif

View File

@ -1,221 +0,0 @@
#ifndef _GPRS_SGSN_H
#define _GPRS_SGSN_H
#include <stdint.h>
#include <netinet/in.h>
#include <osmocore/gsm48.h>
#include <osmocom/crypt/gprs_cipher.h>
#define GSM_IMSI_LENGTH 17
#define GSM_IMEI_LENGTH 17
#define GSM_EXTENSION_LENGTH 15
struct gprs_llc_lle;
/* TS 04.08 4.1.3.3 GMM mobility management states on the network side */
enum gprs_mm_state {
GMM_DEREGISTERED, /* 4.1.3.3.1.1 */
GMM_COMMON_PROC_INIT, /* 4.1.3.3.1.2 */
GMM_REGISTERED_NORMAL, /* 4.1.3.3.2.1 */
GMM_REGISTERED_SUSPENDED, /* 4.1.3.3.2.2 */
GMM_DEREGISTERED_INIT, /* 4.1.3.3.1.4 */
};
enum gprs_mm_ctr {
GMM_CTR_PKTS_SIG_IN,
GMM_CTR_PKTS_SIG_OUT,
GMM_CTR_PKTS_UDATA_IN,
GMM_CTR_PKTS_UDATA_OUT,
GMM_CTR_BYTES_UDATA_IN,
GMM_CTR_BYTES_UDATA_OUT,
GMM_CTR_PDP_CTX_ACT,
GMM_CTR_SUSPEND,
GMM_CTR_PAGING_PS,
GMM_CTR_PAGING_CS,
GMM_CTR_RA_UPDATE,
};
enum gprs_pdp_ctx {
PDP_CTR_PKTS_UDATA_IN,
PDP_CTR_PKTS_UDATA_OUT,
PDP_CTR_BYTES_UDATA_IN,
PDP_CTR_BYTES_UDATA_OUT,
};
enum gprs_t3350_mode {
GMM_T3350_MODE_ATT,
GMM_T3350_MODE_RAU,
GMM_T3350_MODE_PTMSI_REALL,
};
#define MS_RADIO_ACCESS_CAPA_MAX_LENGTH 255
#define MS_NETWORK_CAPA_MAX_LENGTH 32
/* According to TS 03.60, Table 5: SGSN MM and PDP Contexts */
/* Extended by 3GPP TS 23.060, Table 6: SGSN MM and PDP Contexts */
struct sgsn_mm_ctx {
struct llist_head list;
char imsi[GSM_IMSI_LENGTH];
enum gprs_mm_state mm_state;
uint32_t p_tmsi;
uint32_t p_tmsi_old; /* old P-TMSI before new is confirmed */
uint32_t p_tmsi_sig;
char imei[GSM_IMEI_LENGTH];
/* Opt: Software Version Numbber / TS 23.195 */
char msisdn[GSM_EXTENSION_LENGTH];
struct gprs_ra_id ra;
uint16_t cell_id;
uint32_t cell_id_age;
uint16_t sac; /* Iu: Service Area Code */
uint32_t sac_age;/* Iu: Service Area Code age */
/* VLR number */
uint32_t new_sgsn_addr;
/* Authentication Triplets */
/* Kc */
/* Iu: CK, IK, KSI */
/* CKSN */
enum gprs_ciph_algo ciph_algo;
struct {
uint8_t buf[MS_RADIO_ACCESS_CAPA_MAX_LENGTH]; /* 10.5.5.12a */
uint8_t len;
} ms_radio_access_capa;
struct {
uint8_t buf[MS_NETWORK_CAPA_MAX_LENGTH]; /* 10.5.5.12 */
uint8_t len;
} ms_network_capa;
uint16_t drx_parms;
int mnrg; /* MS reported to HLR? */
int ngaf; /* MS reported to MSC/VLR? */
int ppf; /* paging for GPRS + non-GPRS? */
/* SMS Parameters */
int recovery;
uint8_t radio_prio_sms;
struct llist_head pdp_list;
/* Additional bits not present in the GSM TS */
struct gprs_llc_llme *llme;
uint32_t tlli;
uint32_t tlli_new;
uint16_t nsei;
uint16_t bvci;
struct rate_ctr_group *ctrg;
struct timer_list timer;
unsigned int T; /* Txxxx number */
unsigned int num_T_exp; /* number of consecutive T expirations */
enum gprs_t3350_mode t3350_mode;
uint8_t t3370_id_type;
};
/* look-up a SGSN MM context based on TLLI + RAI */
struct sgsn_mm_ctx *sgsn_mm_ctx_by_tlli(uint32_t tlli,
const struct gprs_ra_id *raid);
struct sgsn_mm_ctx *sgsn_mm_ctx_by_ptmsi(uint32_t tmsi);
struct sgsn_mm_ctx *sgsn_mm_ctx_by_imsi(const char *imsi);
/* Allocate a new SGSN MM context */
struct sgsn_mm_ctx *sgsn_mm_ctx_alloc(uint32_t tlli,
const struct gprs_ra_id *raid);
void sgsn_mm_ctx_free(struct sgsn_mm_ctx *mm);
enum pdp_ctx_state {
PDP_STATE_NONE,
PDP_STATE_CR_REQ,
PDP_STATE_CR_CONF,
/* 04.08 / Figure 6.2 / 6.1.2.2 */
PDP_STATE_INACT_PEND,
PDP_STATE_INACTIVE = PDP_STATE_NONE,
};
enum pdp_type {
PDP_TYPE_NONE,
PDP_TYPE_ETSI_PPP,
PDP_TYPE_IANA_IPv4,
PDP_TYPE_IANA_IPv6,
};
struct sgsn_pdp_ctx {
struct llist_head list; /* list_head for mmctx->pdp_list */
struct llist_head g_list; /* list_head for global list */
struct sgsn_mm_ctx *mm; /* back pointer to MM CTX */
struct sgsn_ggsn_ctx *ggsn; /* which GGSN serves this PDP */
struct rate_ctr_group *ctrg;
//unsigned int id;
struct pdp_t *lib; /* pointer to libgtp PDP ctx */
enum pdp_ctx_state state;
enum pdp_type type;
uint32_t address;
char *apn_subscribed;
//char *apn_used;
uint16_t nsapi; /* SNDCP */
uint16_t sapi; /* LLC */
uint8_t ti; /* transaction identifier */
int vplmn_allowed;
uint32_t qos_profile_subscr;
//uint32_t qos_profile_req;
//uint32_t qos_profile_neg;
uint8_t radio_prio;
uint32_t tx_npdu_nr;
uint32_t rx_npdu_nr;
uint32_t tx_gtp_snd;
uint32_t rx_gtp_snu;
//uint32_t charging_id;
int reordering_reqd;
struct timer_list timer;
unsigned int T; /* Txxxx number */
unsigned int num_T_exp; /* number of consecutive T expirations */
};
/* look up PDP context by MM context and NSAPI */
struct sgsn_pdp_ctx *sgsn_pdp_ctx_by_nsapi(const struct sgsn_mm_ctx *mm,
uint8_t nsapi);
/* look up PDP context by MM context and transaction ID */
struct sgsn_pdp_ctx *sgsn_pdp_ctx_by_tid(const struct sgsn_mm_ctx *mm,
uint8_t tid);
struct sgsn_pdp_ctx *sgsn_pdp_ctx_alloc(struct sgsn_mm_ctx *mm,
uint8_t nsapi);
void sgsn_pdp_ctx_free(struct sgsn_pdp_ctx *pdp);
struct sgsn_ggsn_ctx {
struct llist_head list;
uint32_t id;
unsigned int gtp_version;
struct in_addr remote_addr;
int remote_restart_ctr;
struct gsn_t *gsn;
};
struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_alloc(uint32_t id);
struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_by_id(uint32_t id);
struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_by_addr(struct in_addr *addr);
struct sgsn_ggsn_ctx *sgsn_ggsn_ctx_find_alloc(uint32_t id);
struct apn_ctx {
struct llist_head list;
struct sgsn_ggsn_ctx *ggsn;
char *name;
char *description;
};
extern struct llist_head sgsn_mm_ctxts;
extern struct llist_head sgsn_ggsn_ctxts;
extern struct llist_head sgsn_apn_ctxts;
extern struct llist_head sgsn_pdp_ctxts;
uint32_t sgsn_alloc_ptmsi(void);
/* High-level function to be called in case a GGSN has disappeared or
* ottherwise lost state (recovery procedure) */
int drop_all_pdp_for_ggsn(struct sgsn_ggsn_ctx *ggsn);
#endif /* _GPRS_SGSN_H */

View File

@ -1,70 +0,0 @@
#ifndef _GSM_04_08_H
#define _GSM_04_08_H
#include <openbsc/meas_rep.h>
#include <osmocore/protocol/gsm_04_08.h>
#include <osmocore/gsm48.h>
struct msgb;
struct gsm_bts;
struct gsm_subscriber;
struct gsm_network;
struct gsm_trans;
struct gsm_subscriber_connection;
#define GSM48_ALLOC_SIZE 2048
#define GSM48_ALLOC_HEADROOM 256
static inline struct msgb *gsm48_msgb_alloc(void)
{
return msgb_alloc_headroom(GSM48_ALLOC_SIZE, GSM48_ALLOC_HEADROOM,
"GSM 04.08");
}
/* config options controlling the behaviour of the lower leves */
void gsm0408_allow_everyone(int allow);
void gsm0408_clear_request(struct gsm_subscriber_connection *conn, uint32_t cause);
void gsm0408_clear_all_trans(struct gsm_network *net, int protocol);
int gsm0408_dispatch(struct gsm_subscriber_connection *conn, struct msgb *msg);
int gsm0408_rcvmsg(struct msgb *msg, u_int8_t link_id);
int gsm0408_new_conn(struct gsm_subscriber_connection *conn);
enum gsm_chan_t get_ctype_by_chreq(struct gsm_network *bts, u_int8_t ra);
enum gsm_chreq_reason_t get_reason_by_chreq(u_int8_t ra, int neci);
void gsm_net_update_ctype(struct gsm_network *net);
int gsm48_tx_mm_info(struct gsm_subscriber_connection *conn);
int gsm48_tx_mm_auth_req(struct gsm_subscriber_connection *conn, u_int8_t *rand, int key_seq);
int gsm48_tx_mm_auth_rej(struct gsm_subscriber_connection *conn);
int gsm48_send_rr_release(struct gsm_lchan *lchan);
int gsm48_send_rr_ciph_mode(struct gsm_lchan *lchan, int want_imeisv);
int gsm48_send_rr_app_info(struct gsm_subscriber_connection *conn, u_int8_t apdu_id,
u_int8_t apdu_len, const u_int8_t *apdu);
int gsm48_send_rr_ass_cmd(struct gsm_lchan *dest_lchan, struct gsm_lchan *lchan, u_int8_t power_class);
int gsm48_send_ho_cmd(struct gsm_lchan *old_lchan, struct gsm_lchan *new_lchan,
u_int8_t power_command, u_int8_t ho_ref);
int mncc_tx_to_cc(struct gsm_network *net, int msg_type, void *arg);
/* convert a ASCII phone number to call-control BCD */
int encode_bcd_number(u_int8_t *bcd_lv, u_int8_t max_len,
int h_len, const char *input);
int decode_bcd_number(char *output, int output_len, const u_int8_t *bcd_lv,
int h_len);
int send_siemens_mrpci(struct gsm_lchan *lchan, u_int8_t *classmark2_lv);
int gsm48_extract_mi(uint8_t *classmark2, int length, char *mi_string, uint8_t *mi_type);
int gsm48_paging_extract_mi(struct gsm48_pag_resp *pag, int length, char *mi_string, u_int8_t *mi_type);
int gsm48_handle_paging_resp(struct gsm_subscriber_connection *conn, struct msgb *msg, struct gsm_subscriber *subscr);
int gsm48_lchan_modify(struct gsm_lchan *lchan, u_int8_t lchan_mode);
int gsm48_rx_rr_modif_ack(struct msgb *msg);
int gsm48_parse_meas_rep(struct gsm_meas_rep *rep, struct msgb *msg);
struct msgb *gsm48_create_mm_serv_rej(enum gsm48_reject_value value);
struct msgb *gsm48_create_loc_upd_rej(uint8_t cause);
void gsm48_lchan2chan_desc(struct gsm48_chan_desc *cd,
const struct gsm_lchan *lchan);
#endif

View File

@ -1,383 +0,0 @@
#ifndef _GSM48_GPRS_H
#define _GSM48_GPRS_H
#include <stdint.h>
#include <osmocore/protocol/gsm_04_08.h>
/* Table 10.4 / 10.4a, GPRS Mobility Management (GMM) */
#define GSM48_MT_GMM_ATTACH_REQ 0x01
#define GSM48_MT_GMM_ATTACH_ACK 0x02
#define GSM48_MT_GMM_ATTACH_COMPL 0x03
#define GSM48_MT_GMM_ATTACH_REJ 0x04
#define GSM48_MT_GMM_DETACH_REQ 0x05
#define GSM48_MT_GMM_DETACH_ACK 0x06
#define GSM48_MT_GMM_RA_UPD_REQ 0x08
#define GSM48_MT_GMM_RA_UPD_ACK 0x09
#define GSM48_MT_GMM_RA_UPD_COMPL 0x0a
#define GSM48_MT_GMM_RA_UPD_REJ 0x0b
#define GSM48_MT_GMM_PTMSI_REALL_CMD 0x10
#define GSM48_MT_GMM_PTMSI_REALL_COMPL 0x11
#define GSM48_MT_GMM_AUTH_CIPH_REQ 0x12
#define GSM48_MT_GMM_AUTH_CIPH_RESP 0x13
#define GSM48_MT_GMM_AUTH_CIPH_REJ 0x14
#define GSM48_MT_GMM_ID_REQ 0x15
#define GSM48_MT_GMM_ID_RESP 0x16
#define GSM48_MT_GMM_STATUS 0x20
#define GSM48_MT_GMM_INFO 0x21
/* Table 10.4a, GPRS Session Management (GSM) */
#define GSM48_MT_GSM_ACT_PDP_REQ 0x41
#define GSM48_MT_GSM_ACT_PDP_ACK 0x42
#define GSM48_MT_GSM_ACT_PDP_REJ 0x43
#define GSM48_MT_GSM_REQ_PDP_ACT 0x44
#define GSM48_MT_GSM_REQ_PDP_ACT_REJ 0x45
#define GSM48_MT_GSM_DEACT_PDP_REQ 0x46
#define GSM48_MT_GSM_DEACT_PDP_ACK 0x47
#define GSM48_MT_GSM_ACT_AA_PDP_REQ 0x50
#define GSM48_MT_GSM_ACT_AA_PDP_ACK 0x51
#define GSM48_MT_GSM_ACT_AA_PDP_REJ 0x52
#define GSM48_MT_GSM_DEACT_AA_PDP_REQ 0x53
#define GSM48_MT_GSM_DEACT_AA_PDP_ACK 0x54
#define GSM48_MT_GSM_STATUS 0x55
/* Chapter 10.5.5.2 / Table 10.5.135 */
#define GPRS_ATT_T_ATTACH 1
#define GPRS_ATT_T_ATT_WHILE_IMSI 2
#define GPRS_ATT_T_COMBINED 3
/* Chapter 10.5.5.5 / Table 10.5.138 */
#define GPRS_DET_T_MO_GPRS 1
#define GPRS_DET_T_MO_IMSI 2
#define GPRS_DET_T_MO_COMBINED 3
/* Network to MS direction */
#define GPRS_DET_T_MT_REATT_REQ 1
#define GPRS_DET_T_MT_REATT_NOTREQ 2
#define GPRS_DET_T_MT_IMSI 3
/* Chapter 10.5.5.18 / Table 105.150 */
#define GPRS_UPD_T_RA 0
#define GPRS_UPD_T_RA_LA 1
#define GPRS_UPD_T_RA_LA_IMSI_ATT 2
#define GPRS_UPD_T_PERIODIC 3
enum gsm48_gprs_ie_mm {
GSM48_IE_GMM_CIPH_CKSN = 0x08, /* 10.5.1.2 */
GSM48_IE_GMM_TIMER_READY = 0x17, /* 10.5.7.3 */
GSM48_IE_GMM_ALLOC_PTMSI = 0x18, /* 10.5.1.4 */
GSM48_IE_GMM_PTMSI_SIG = 0x19, /* 10.5.5.8 */
GSM48_IE_GMM_AUTH_RAND = 0x21, /* 10.5.3.1 */
GSM48_IE_GMM_AUTH_SRES = 0x22, /* 10.5.3.2 */
GSM48_IE_GMM_IMEISV = 0x23, /* 10.5.1.4 */
GSM48_IE_GMM_DRX_PARAM = 0x27, /* 10.5.5.6 */
GSM48_IE_GMM_MS_NET_CAPA = 0x31, /* 10.5.5.12 */
GSM48_IE_GMM_PDP_CTX_STATUS = 0x32, /* 10.5.7.1 */
GSM48_IE_GMM_PS_LCS_CAPA = 0x33, /* 10.5.5.22 */
GSM48_IE_GMM_GMM_MBMS_CTX_ST = 0x35, /* 10.5.7.6 */
};
enum gsm48_gprs_ie_sm {
GSM48_IE_GSM_APN = 0x28, /* 10.5.6.1 */
GSM48_IE_GSM_PROTO_CONF_OPT = 0x27, /* 10.5.6.3 */
GSM48_IE_GSM_PDP_ADDR = 0x2b, /* 10.5.6.4 */
GSM48_IE_GSM_AA_TMR = 0x29, /* 10.5.7.3 */
GSM48_IE_GSM_NAME_FULL = 0x43, /* 10.5.3.5a */
GSM48_IE_GSM_NAME_SHORT = 0x45, /* 10.5.3.5a */
GSM48_IE_GSM_TIMEZONE = 0x46, /* 10.5.3.8 */
GSM48_IE_GSM_UTC_AND_TZ = 0x47, /* 10.5.3.9 */
GSM48_IE_GSM_LSA_ID = 0x48, /* 10.5.3.11 */
/* Fake IEs that are not present on the Layer3 air interface,
* but which we use to simplify internal APIs */
OSMO_IE_GSM_REQ_QOS = 0xfd,
OSMO_IE_GSM_REQ_PDP_ADDR = 0xfe,
};
/* Chapter 9.4.15 / Table 9.4.15 */
struct gsm48_ra_upd_ack {
uint8_t force_stby:4, /* 10.5.5.7 */
upd_result:4; /* 10.5.5.17 */
uint8_t ra_upd_timer; /* 10.5.7.3 */
struct gsm48_ra_id ra_id; /* 10.5.5.15 */
uint8_t data[0];
} __attribute__((packed));
/* Chapter 10.5.7.3 */
enum gsm48_gprs_tmr_unit {
GPRS_TMR_2SECONDS = 0 << 5,
GPRS_TMR_MINUTE = 1 << 5,
GPRS_TMR_6MINUTE = 2 << 5,
GPRS_TMR_DEACTIVATED = 3 << 5,
};
/* Chapter 9.4.2 / Table 9.4.2 */
struct gsm48_attach_ack {
uint8_t att_result:4, /* 10.5.5.7 */
force_stby:4; /* 10.5.5.1 */
uint8_t ra_upd_timer; /* 10.5.7.3 */
uint8_t radio_prio; /* 10.5.7.2 */
struct gsm48_ra_id ra_id; /* 10.5.5.15 */
uint8_t data[0];
} __attribute__((packed));
/* Chapter 9.4.9 / Table 9.4.9 */
struct gsm48_auth_ciph_req {
uint8_t ciph_alg:4, /* 10.5.5.3 */
imeisv_req:4; /* 10.5.5.10 */
uint8_t force_stby:4, /* 10.5.5.7 */
ac_ref_nr:4; /* 10.5.5.19 */
uint8_t data[0];
} __attribute__((packed));
/* optional: TV RAND, TV CKSN */
struct gsm48_auth_ciph_resp {
uint8_t ac_ref_nr:4,
spare:4;
uint8_t data[0];
} __attribute__((packed));
/* Chapter 9.5.1 / Table 9.5.1 */
struct gsm48_act_pdp_ctx_req {
uint8_t req_nsapi;
uint8_t req_llc_sapi;
uint8_t data[0];
} __attribute__((packed));
/* Chapter 10.5.5.14 / Table 10.5.147 */
enum gsm48_gmm_cause {
GMM_CAUSE_IMSI_UNKNOWN = 0x02,
GMM_CAUSE_ILLEGAL_MS = 0x03,
GMM_CAUSE_ILLEGAL_ME = 0x06,
GMM_CAUSE_GPRS_NOTALLOWED = 0x07,
GMM_CAUSE_GPRS_OTHER_NOTALLOWED = 0x08,
GMM_CAUSE_MS_ID_NOT_DERIVED = 0x09,
GMM_CAUSE_IMPL_DETACHED = 0x0a,
GMM_CAUSE_PLMN_NOTALLOWED = 0x0b,
GMM_CAUSE_LA_NOTALLOWED = 0x0c,
GMM_CAUSE_ROAMING_NOTALLOWED = 0x0d,
GMM_CAUSE_NO_GPRS_PLMN = 0x0e,
GMM_CAUSE_MSC_TEMP_NOTREACH = 0x10,
GMM_CAUSE_NET_FAIL = 0x11,
GMM_CAUSE_CONGESTION = 0x16,
GMM_CAUSE_SEM_INCORR_MSG = 0x5f,
GMM_CAUSE_INV_MAND_INFO = 0x60,
GMM_CAUSE_MSGT_NOTEXIST_NOTIMPL = 0x61,
GMM_CAUSE_MSGT_INCOMP_P_STATE = 0x62,
GMM_CAUSE_IE_NOTEXIST_NOTIMPL = 0x63,
GMM_CAUSE_COND_IE_ERR = 0x64,
GMM_CAUSE_MSG_INCOMP_P_STATE = 0x65,
GMM_CAUSE_PROTO_ERR_UNSPEC = 0x6f,
};
/* Chapter 10.4.6.6 / Table 10.5.157 */
enum gsm48_gsm_cause {
GSM_CAUSE_INSUFF_RSRC = 0x1a,
GSM_CAUSE_MISSING_APN = 0x1b,
GSM_CAUSE_UNKNOWN_PDP = 0x1c,
GSM_CAUSE_AUTH_FAILED = 0x1d,
GSM_CAUSE_ACT_REJ_GGSN = 0x1e,
GSM_CAUSE_ACT_REJ_UNSPEC = 0x1f,
GSM_CAUSE_SERV_OPT_NOTSUPP = 0x20,
GSM_CAUSE_REQ_SERV_OPT_NOTSUB = 0x21,
GSM_CAUSE_SERV_OPT_TEMP_OOO = 0x22,
GSM_CAUSE_NSAPI_IN_USE = 0x23,
GSM_CAUSE_DEACT_REGULAR = 0x24,
GSM_CAUSE_QOS_NOT_ACCEPTED = 0x25,
GSM_CAUSE_NET_FAIL = 0x26,
GSM_CAUSE_REACT_RQD = 0x27,
GSM_CAUSE_FEATURE_NOTSUPP = 0x28,
GSM_CAUSE_INVALID_TRANS_ID = 0x51,
GSM_CAUSE_SEM_INCORR_MSG = 0x5f,
GSM_CAUSE_INV_MAND_INFO = 0x60,
GSM_CAUSE_MSGT_NOTEXIST_NOTIMPL = 0x61,
GSM_CAUSE_MSGT_INCOMP_P_STATE = 0x62,
GSM_CAUSE_IE_NOTEXIST_NOTIMPL = 0x63,
GSM_CAUSE_COND_IE_ERR = 0x64,
GSM_CAUSE_MSG_INCOMP_P_STATE = 0x65,
GSM_CAUSE_PROTO_ERR_UNSPEC = 0x6f,
};
/* Section 6.1.2.2: Session management states on the network side */
enum gsm48_pdp_state {
PDP_S_INACTIVE,
PDP_S_ACTIVE_PENDING,
PDP_S_ACTIVE,
PDP_S_INACTIVE_PENDING,
PDP_S_MODIFY_PENDING,
};
/* Table 10.5.155/3GPP TS 24.008 */
enum gsm48_pdp_type_org {
PDP_TYPE_ORG_ETSI = 0x00,
PDP_TYPE_ORG_IETF = 0x01,
};
enum gsm48_pdp_type_nr {
PDP_TYPE_N_ETSI_RESERVED = 0x00,
PDP_TYPE_N_ETSI_PPP = 0x01,
PDP_TYPE_N_IETF_IPv4 = 0x21,
PDP_TYPE_N_IETF_IPv6 = 0x57,
};
/* Figure 10.5.138/24.008 / Chapter 10.5.6.5 */
enum gsm48_qos_reliab_class {
GSM48_QOS_RC_LLC_ACK_RLC_ACK_DATA_PROT = 2,
GSM48_QOS_RC_LLC_UN_RLC_ACK_DATA_PROT = 3,
GSM48_QOS_RC_LLC_UN_RLC_UN_PROT_DATA = 4,
GSM48_QOS_RC_LLC_UN_RLC_UN_DATA_UN = 5,
};
/* Figure 10.5.138/24.008 / Chapter 10.5.6.5 */
enum gsm48_qos_preced_class {
GSM48_QOS_PC_HIGH = 1,
GSM48_QOS_PC_NORMAL = 2,
GSM48_QOS_PC_LOW = 3,
};
/* Figure 10.5.138/24.008 / Chapter 10.5.6.5 */
enum gsm48_qos_peak_tput {
GSM48_QOS_PEAK_TPUT_1000bps = 1,
GSM48_QOS_PEAK_TPUT_2000bps = 2,
GSM48_QOS_PEAK_TPUT_4000bps = 3,
GSM48_QOS_PEAK_TPUT_8000bps = 4,
GSM48_QOS_PEAK_TPUT_16000bps = 5,
GSM48_QOS_PEAK_TPUT_32000bps = 6,
GSM48_QOS_PEAK_TPUT_64000bps = 7,
GSM48_QOS_PEAK_TPUT_128000bps = 8,
GSM48_QOS_PEAK_TPUT_256000bps = 9,
};
/* Figure 10.5.138/24.008 / Chapter 10.5.6.5 */
enum gsm48_qos_mean_tput {
GSM48_QOS_MEAN_TPUT_100bph = 1,
GSM48_QOS_MEAN_TPUT_200bph = 2,
GSM48_QOS_MEAN_TPUT_500bph = 3,
GSM48_QOS_MEAN_TPUT_1000bph = 4,
GSM48_QOS_MEAN_TPUT_2000bph = 5,
GSM48_QOS_MEAN_TPUT_5000bph = 6,
GSM48_QOS_MEAN_TPUT_10000bph = 7,
GSM48_QOS_MEAN_TPUT_20000bph = 8,
GSM48_QOS_MEAN_TPUT_50000bph = 9,
GSM48_QOS_MEAN_TPUT_100kbph = 10,
GSM48_QOS_MEAN_TPUT_200kbph = 11,
GSM48_QOS_MEAN_TPUT_500kbph = 0xc,
GSM48_QOS_MEAN_TPUT_1Mbph = 0xd,
GSM48_QOS_MEAN_TPUT_2Mbph = 0xe,
GSM48_QOS_MEAN_TPUT_5Mbph = 0xf,
GSM48_QOS_MEAN_TPUT_10Mbph = 0x10,
GSM48_QOS_MEAN_TPUT_20Mbph = 0x11,
GSM48_QOS_MEAN_TPUT_50Mbph = 0x12,
GSM48_QOS_MEAN_TPUT_BEST_EFFORT = 0x1f,
};
/* Figure 10.5.138/24.008 / Chapter 10.5.6.5 */
enum gsm48_qos_err_sdu {
GSM48_QOS_ERRSDU_NODETECT = 1,
GSM48_QOS_ERRSDU_YES = 2,
GSM48_QOS_ERRSDU_NO = 3,
};
/* Figure 10.5.138/24.008 / Chapter 10.5.6.5 */
enum gsm48_qos_deliv_order {
GSM48_QOS_DO_ORDERED = 1,
GSM48_QOS_DO_UNORDERED = 2,
};
/* Figure 10.5.138/24.008 / Chapter 10.5.6.5 */
enum gsm48_qos_traf_class {
GSM48_QOS_TC_CONVERSATIONAL = 1,
GSM48_QOS_TC_STREAMING = 2,
GSM48_QOS_TC_INTERACTIVE = 3,
GSM48_QOS_TC_BACKGROUND = 4,
};
/* Figure 10.5.138/24.008 / Chapter 10.5.6.5 */
enum gsm48_qos_max_sdu_size {
/* values below in 10 octet granularity */
GSM48_QOS_MAXSDU_1502 = 0x97,
GSM48_QOS_MAXSDU_1510 = 0x98,
GSM48_QOS_MAXSDU_1520 = 0x99,
};
/* Figure 10.5.138/24.008 / Chapter 10.5.6.5 */
enum gsm48_qos_max_bitrate {
GSM48_QOS_MBRATE_1k = 0x01,
GSM48_QOS_MBRATE_63k = 0x3f,
GSM48_QOS_MBRATE_64k = 0x40,
GSM48_QOS_MBRATE_568k = 0x7f,
GSM48_QOS_MBRATE_576k = 0x80,
GSM48_QOS_MBRATE_8640k = 0xfe,
GSM48_QOS_MBRATE_0k = 0xff,
};
/* Figure 10.5.138/24.008 / Chapter 10.5.6.5 */
enum gsm48_qos_resid_ber {
GSM48_QOS_RBER_5e_2 = 0x01,
GSM48_QOS_RBER_1e_2 = 0x02,
GSM48_QOS_RBER_5e_3 = 0x03,
GSM48_QOS_RBER_4e_3 = 0x04,
GSM48_QOS_RBER_1e_3 = 0x05,
GSM48_QOS_RBER_1e_4 = 0x06,
GSM48_QOS_RBER_1e_5 = 0x07,
GSM48_QOS_RBER_1e_6 = 0x08,
GSM48_QOS_RBER_6e_8 = 0x09,
};
/* Figure 10.5.138/24.008 / Chapter 10.5.6.5 */
enum gsm48_qos_sdu_err {
GSM48_QOS_SERR_1e_2 = 0x01,
GSM48_QOS_SERR_7e_2 = 0x02,
GSM48_QOS_SERR_1e_3 = 0x03,
GSM48_QOS_SERR_1e_4 = 0x04,
GSM48_QOS_SERR_1e_5 = 0x05,
GSM48_QOS_SERR_1e_6 = 0x06,
GSM48_QOS_SERR_1e_1 = 0x07,
};
/* Figure 10.5.138/24.008 / Chapter 10.5.6.5 */
struct gsm48_qos {
/* octet 3 */
uint8_t reliab_class:3;
uint8_t delay_class:3;
uint8_t spare:2;
/* octet 4 */
uint8_t preced_class:3;
uint8_t spare2:1;
uint8_t peak_tput:4;
/* octet 5 */
uint8_t mean_tput:5;
uint8_t spare3:3;
/* octet 6 */
uint8_t deliv_err_sdu:3;
uint8_t deliv_order:2;
uint8_t traf_class:3;
/* octet 7 */
uint8_t max_sdu_size;
/* octet 8 */
uint8_t max_bitrate_up;
/* octet 9 */
uint8_t max_bitrate_down;
/* octet 10 */
uint8_t sdu_err_ratio:4;
uint8_t resid_ber:4;
/* octet 11 */
uint8_t handling_prio:2;
uint8_t xfer_delay:6;
/* octet 12 */
uint8_t guar_bitrate_up;
/* octet 13 */
uint8_t guar_bitrate_down;
/* octet 14 */
uint8_t src_stats_desc:4;
uint8_t sig_ind:1;
uint8_t spare5:3;
/* octet 15 */
uint8_t max_bitrate_down_ext;
/* octet 16 */
uint8_t guar_bitrate_down_ext;
};
int gprs_tlli_type(uint32_t tlli);
#endif /* _GSM48_GPRS_H */

View File

@ -1,40 +0,0 @@
#ifndef _GSM_04_11_H
#define _GSM_04_11_H
#include <osmocore/protocol/gsm_04_11.h>
#define UM_SAPI_SMS 3 /* See GSM 04.05/04.06 */
/* SMS deliver PDU */
struct sms_deliver {
u_int8_t mti:2; /* message type indicator */
u_int8_t mms:1; /* more messages to send */
u_int8_t rp:1; /* reply path */
u_int8_t udhi:1; /* user data header indicator */
u_int8_t sri:1; /* status report indication */
u_int8_t *orig_addr; /* originating address */
u_int8_t pid; /* protocol identifier */
u_int8_t dcs; /* data coding scheme */
/* service centre time stamp */
u_int8_t ud_len; /* user data length */
u_int8_t *user_data; /* user data */
u_int8_t msg_ref; /* message reference */
u_int8_t *smsc;
};
struct msgb;
int gsm0411_rcv_sms(struct gsm_subscriber_connection *conn, struct msgb *msg);
struct gsm_sms *sms_alloc(void);
void sms_free(struct gsm_sms *sms);
struct gsm_sms *sms_from_text(struct gsm_subscriber *receiver, int dcs, const char *text);
void _gsm411_sms_trans_free(struct gsm_trans *trans);
int gsm411_send_sms_subscr(struct gsm_subscriber *subscr,
struct gsm_sms *sms);
int gsm411_send_sms(struct gsm_subscriber_connection *conn,
struct gsm_sms *sms);
void gsm411_sapi_n_reject(struct gsm_subscriber_connection *conn);
#endif

View File

@ -1,20 +0,0 @@
#ifndef _GSM_04_80_H
#define _GSM_04_80_H
#include <osmocore/msgb.h>
#include <osmocore/protocol/gsm_04_80.h>
#include <osmocore/gsm0480.h>
struct gsm_subscriber_connection;
int gsm0480_send_ussd_response(struct gsm_subscriber_connection *conn,
const struct msgb *in_msg, const char* response_text,
const struct ussd_request *req);
int gsm0480_send_ussd_reject(struct gsm_subscriber_connection *conn,
const struct msgb *msg,
const struct ussd_request *request);
int gsm0480_send_ussdNotify(struct gsm_subscriber_connection *conn, int level, const char *text);
int gsm0480_send_releaseComplete(struct gsm_subscriber_connection *conn);
#endif

View File

@ -1,879 +0,0 @@
#ifndef _GSM_DATA_H
#define _GSM_DATA_H
#include <sys/types.h>
struct osmo_msc_data;
struct osmo_bsc_sccp_con;
struct gsm_sms_queue;
enum gsm_phys_chan_config {
GSM_PCHAN_NONE,
GSM_PCHAN_CCCH,
GSM_PCHAN_CCCH_SDCCH4,
GSM_PCHAN_TCH_F,
GSM_PCHAN_TCH_H,
GSM_PCHAN_SDCCH8_SACCH8C,
GSM_PCHAN_PDCH, /* GPRS PDCH */
GSM_PCHAN_TCH_F_PDCH, /* TCH/F if used, PDCH otherwise */
GSM_PCHAN_UNKNOWN,
};
enum gsm_chan_t {
GSM_LCHAN_NONE,
GSM_LCHAN_SDCCH,
GSM_LCHAN_TCH_F,
GSM_LCHAN_TCH_H,
GSM_LCHAN_UNKNOWN,
};
/* RRLP mode of operation */
enum rrlp_mode {
RRLP_MODE_NONE,
RRLP_MODE_MS_BASED,
RRLP_MODE_MS_PREF,
RRLP_MODE_ASS_PREF,
};
/* Channel Request reason */
enum gsm_chreq_reason_t {
GSM_CHREQ_REASON_EMERG,
GSM_CHREQ_REASON_PAG,
GSM_CHREQ_REASON_CALL,
GSM_CHREQ_REASON_LOCATION_UPD,
GSM_CHREQ_REASON_OTHER,
};
#include <osmocore/timer.h>
#include <openbsc/system_information.h>
#include <openbsc/rest_octets.h>
#include <openbsc/mncc.h>
#include <osmocore/tlv.h>
#include <osmocore/bitvec.h>
#include <osmocore/statistics.h>
#include <osmocore/gsm_utils.h>
#include <osmocore/utils.h>
#include <osmocore/rxlev_stat.h>
#include <osmocore/protocol/gsm_08_58.h>
#define TRX_NR_TS 8
#define TS_MAX_LCHAN 8
#define HARDCODED_ARFCN 123
#define HARDCODED_TSC 7
#define HARDCODED_BSIC 0x3f /* NCC = 7 / BCC = 7 */
/* for multi-drop config */
#define HARDCODED_BTS0_TS 1
#define HARDCODED_BTS1_TS 6
#define HARDCODED_BTS2_TS 11
/* reserved according to GSM 03.03 § 2.4 */
#define GSM_RESERVED_TMSI 0xFFFFFFFF
enum gsm_hooks {
GSM_HOOK_NM_SWLOAD,
GSM_HOOK_RR_PAGING,
GSM_HOOK_RR_SECURITY,
};
enum gsm_paging_event {
GSM_PAGING_SUCCEEDED,
GSM_PAGING_EXPIRED,
GSM_PAGING_OOM,
GSM_PAGING_BUSY,
};
enum bts_gprs_mode {
BTS_GPRS_NONE = 0,
BTS_GPRS_GPRS = 1,
BTS_GPRS_EGPRS = 2,
};
#define OBSC_NM_W_ACK_CB(__msgb) (__msgb)->cb[3]
/* the data structure stored in msgb->cb for openbsc apps */
struct openbsc_msgb_cb {
unsigned char *bssgph;
unsigned char *llch;
/* Cell Identifier */
unsigned char *bssgp_cell_id;
/* Identifiers of a BTS, equal to 'struct bssgp_bts_ctx' */
u_int16_t nsei;
u_int16_t bvci;
/* Identifier of a MS (inside BTS), equal to 'struct sgsn_mm_ctx' */
u_int32_t tlli;
} __attribute__((packed));
#define OBSC_MSGB_CB(__msgb) ((struct openbsc_msgb_cb *)&((__msgb)->cb[0]))
#define msgb_tlli(__x) OBSC_MSGB_CB(__x)->tlli
#define msgb_nsei(__x) OBSC_MSGB_CB(__x)->nsei
#define msgb_bvci(__x) OBSC_MSGB_CB(__x)->bvci
#define msgb_gmmh(__x) (__x)->l3h
#define msgb_bssgph(__x) OBSC_MSGB_CB(__x)->bssgph
#define msgb_bssgp_len(__x) ((__x)->tail - (uint8_t *)msgb_bssgph(__x))
#define msgb_bcid(__x) OBSC_MSGB_CB(__x)->bssgp_cell_id
#define msgb_llch(__x) OBSC_MSGB_CB(__x)->llch
#define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3]
enum gsm_security_event {
GSM_SECURITY_NOAVAIL,
GSM_SECURITY_AUTH_FAILED,
GSM_SECURITY_SUCCEEDED,
};
struct msgb;
typedef int gsm_cbfn(unsigned int hooknum,
unsigned int event,
struct msgb *msg,
void *data, void *param);
/* Real authentication information containing Ki */
enum gsm_auth_algo {
AUTH_ALGO_NONE,
AUTH_ALGO_XOR,
AUTH_ALGO_COMP128v1,
};
struct gsm_auth_info {
enum gsm_auth_algo auth_algo;
unsigned int a3a8_ki_len;
u_int8_t a3a8_ki[16];
};
struct gsm_auth_tuple {
int use_count;
int key_seq;
u_int8_t rand[16];
u_int8_t sres[4];
u_int8_t kc[8];
};
#define GSM_KEY_SEQ_INVAL 7 /* GSM 04.08 - 10.5.1.2 */
struct gsm_lchan;
struct gsm_subscriber;
struct gsm_mncc;
struct rtp_socket;
struct bsc_api;
/* Network Management State */
struct gsm_nm_state {
u_int8_t operational;
u_int8_t administrative;
u_int8_t availability;
};
/*
* LOCATION UPDATING REQUEST state
*
* Our current operation is:
* - Get imei/tmsi
* - Accept/Reject according to global policy
*/
struct gsm_loc_updating_operation {
struct timer_list updating_timer;
unsigned int waiting_for_imsi : 1;
unsigned int waiting_for_imei : 1;
unsigned int key_seq : 4;
};
/*
* AUTHENTICATION/CIPHERING state
*/
struct gsm_security_operation {
struct gsm_auth_tuple atuple;
gsm_cbfn *cb;
void *cb_data;
};
/*
* A dummy to keep a connection up for at least
* a couple of seconds to work around MSC issues.
*/
struct gsm_anchor_operation {
struct timer_list timeout;
};
/* Maximum number of neighbor cells whose average we track */
#define MAX_NEIGH_MEAS 10
/* Maximum size of the averaging window for neighbor cells */
#define MAX_WIN_NEIGH_AVG 10
/* processed neighbor measurements for one cell */
struct neigh_meas_proc {
u_int16_t arfcn;
u_int8_t bsic;
u_int8_t rxlev[MAX_WIN_NEIGH_AVG];
unsigned int rxlev_cnt;
u_int8_t last_seen_nr;
};
#define MAX_A5_KEY_LEN (128/8)
#define A38_XOR_MIN_KEY_LEN 12
#define A38_XOR_MAX_KEY_LEN 16
#define A38_COMP128_KEY_LEN 16
#define RSL_ENC_ALG_A5(x) (x+1)
/* is the data link established? who established it? */
#define LCHAN_SAPI_UNUSED 0
#define LCHAN_SAPI_MS 1
#define LCHAN_SAPI_NET 2
/* state of a logical channel */
enum gsm_lchan_state {
LCHAN_S_NONE, /* channel is not active */
LCHAN_S_ACT_REQ, /* channel activatin requested */
LCHAN_S_ACTIVE, /* channel is active and operational */
LCHAN_S_REL_REQ, /* channel release has been requested */
LCHAN_S_REL_ERR, /* channel is in an error state */
LCHAN_S_INACTIVE, /* channel is set inactive */
};
/* the per subscriber data for lchan */
struct gsm_subscriber_connection {
struct llist_head entry;
/* To whom we are allocated at the moment */
struct gsm_subscriber *subscr;
/*
* Operations that have a state and might be pending
*/
struct gsm_loc_updating_operation *loc_operation;
struct gsm_security_operation *sec_operation;
struct gsm_anchor_operation *anch_operation;
/* Are we part of a special "silent" call */
int silent_call;
int put_channel;
/* bsc structures */
struct osmo_bsc_sccp_con *sccp_con;
/* back pointers */
int in_release;
struct gsm_lchan *lchan;
struct gsm_lchan *ho_lchan;
struct gsm_bts *bts;
/* for assignment handling */
struct timer_list T10;
struct gsm_lchan *secondary_lchan;
};
struct gsm_lchan {
/* The TS that we're part of */
struct gsm_bts_trx_ts *ts;
/* The logical subslot number in the TS */
u_int8_t nr;
/* The logical channel type */
enum gsm_chan_t type;
/* RSL channel mode */
enum rsl_cmod_spd rsl_cmode;
/* If TCH, traffic channel mode */
enum gsm48_chan_mode tch_mode;
/* State */
enum gsm_lchan_state state;
/* Power levels for MS and BTS */
u_int8_t bs_power;
u_int8_t ms_power;
/* Encryption information */
struct {
u_int8_t alg_id;
u_int8_t key_len;
u_int8_t key[MAX_A5_KEY_LEN];
} encr;
struct timer_list T3101;
struct timer_list T3111;
struct timer_list error_timer;
/* AMR bits */
struct gsm48_multi_rate_conf mr_conf;
/* Established data link layer services */
u_int8_t sapis[8];
int sach_deact;
int release_reason;
/* GSM Random Access data */
struct gsm48_req_ref *rqd_ref;
uint8_t rqd_ta;
/* cache of last measurement reports on this lchan */
struct gsm_meas_rep meas_rep[6];
int meas_rep_idx;
/* table of neighbor cell measurements */
struct neigh_meas_proc neigh_meas[MAX_NEIGH_MEAS];
struct {
u_int32_t bound_ip;
u_int32_t connect_ip;
u_int16_t bound_port;
u_int16_t connect_port;
u_int16_t conn_id;
u_int8_t rtp_payload;
u_int8_t rtp_payload2;
u_int8_t speech_mode;
struct rtp_socket *rtp_socket;
} abis_ip;
struct gsm_subscriber_connection *conn;
};
struct gsm_e1_subslot {
/* Number of E1 link */
u_int8_t e1_nr;
/* Number of E1 TS inside E1 link */
u_int8_t e1_ts;
/* Sub-slot within the E1 TS, 0xff if full TS */
u_int8_t e1_ts_ss;
};
#define TS_F_PDCH_MODE 0x1000
/* One Timeslot in a TRX */
struct gsm_bts_trx_ts {
struct gsm_bts_trx *trx;
/* number of this timeslot at the TRX */
u_int8_t nr;
enum gsm_phys_chan_config pchan;
unsigned int flags;
struct gsm_nm_state nm_state;
struct tlv_parsed nm_attr;
u_int8_t nm_chan_comb;
struct {
/* Parameters below are configured by VTY */
int enabled;
u_int8_t maio;
u_int8_t hsn;
struct bitvec arfcns;
u_int8_t arfcns_data[1024/8];
/* This is the pre-computed MA for channel assignments */
struct bitvec ma;
u_int8_t ma_len; /* part of ma_data that is used */
u_int8_t ma_data[8]; /* 10.5.2.21: max 8 bytes value part */
} hopping;
/* To which E1 subslot are we connected */
struct gsm_e1_subslot e1_link;
struct gsm_lchan lchan[TS_MAX_LCHAN];
};
/* One TRX in a BTS */
struct gsm_bts_trx {
/* list header in bts->trx_list */
struct llist_head list;
struct gsm_bts *bts;
/* number of this TRX in the BTS */
u_int8_t nr;
/* human readable name / description */
char *description;
/* how do we talk RSL with this TRX? */
struct gsm_e1_subslot rsl_e1_link;
u_int8_t rsl_tei;
struct e1inp_sign_link *rsl_link;
/* Some BTS (specifically Ericsson RBS) have a per-TRX OML Link */
struct e1inp_sign_link *oml_link;
struct gsm_nm_state nm_state;
struct tlv_parsed nm_attr;
struct {
struct gsm_nm_state nm_state;
} bb_transc;
u_int16_t arfcn;
int nominal_power; /* in dBm */
unsigned int max_power_red; /* in actual dB */
union {
struct {
struct {
struct gsm_nm_state nm_state;
} bbsig;
struct {
struct gsm_nm_state nm_state;
} pa;
} bs11;
struct {
unsigned int test_state;
u_int8_t test_nr;
struct rxlev_stats rxlev_stat;
} ipaccess;
};
struct gsm_bts_trx_ts ts[TRX_NR_TS];
};
#define GSM_BTS_SI(bts, i) (void *)(bts->si_buf[i])
enum gsm_bts_type {
GSM_BTS_TYPE_UNKNOWN,
GSM_BTS_TYPE_BS11,
GSM_BTS_TYPE_NANOBTS,
GSM_BTS_TYPE_RBS2000,
GSM_BTS_TYPE_HSL_FEMTO,
};
struct vty;
struct gsm_bts_model {
struct llist_head list;
enum gsm_bts_type type;
const char *name;
int (*oml_rcvmsg)(struct msgb *msg);
void (*config_write_bts)(struct vty *vty, struct gsm_bts *bts);
void (*config_write_trx)(struct vty *vty, struct gsm_bts_trx *trx);
void (*config_write_ts)(struct vty *vty, struct gsm_bts_trx_ts *ts);
struct tlv_definition nm_att_tlvdef;
struct bitvec features;
uint8_t _features_data[128/8];
};
enum gsm_bts_features {
BTS_FEAT_HSCSD,
BTS_FEAT_GPRS,
BTS_FEAT_EGPRS,
BTS_FEAT_ECSD,
BTS_FEAT_HOPPING,
};
/*
* This keeps track of the paging status of one BTS. It
* includes a number of pending requests, a back pointer
* to the gsm_bts, a timer and some more state.
*/
struct gsm_bts_paging_state {
/* pending requests */
struct llist_head pending_requests;
struct gsm_bts *bts;
struct timer_list work_timer;
struct timer_list credit_timer;
/* free chans needed */
int free_chans_need;
/* load */
u_int16_t available_slots;
};
struct gsm_envabtse {
struct gsm_nm_state nm_state;
};
struct gsm_bts_gprs_nsvc {
struct gsm_bts *bts;
/* data read via VTY config file, to configure the BTS
* via OML from BSC */
int id;
u_int16_t nsvci;
u_int16_t local_port; /* on the BTS */
u_int16_t remote_port; /* on the SGSN */
u_int32_t remote_ip; /* on the SGSN */
struct gsm_nm_state nm_state;
};
enum neigh_list_manual_mode {
NL_MODE_AUTOMATIC = 0,
NL_MODE_MANUAL = 1,
NL_MODE_MANUAL_SI5SEP = 2, /* SI2 and SI5 have separate neighbor lists */
};
/* One BTS */
struct gsm_bts {
/* list header in net->bts_list */
struct llist_head list;
struct gsm_network *network;
/* number of ths BTS in network */
u_int8_t nr;
/* human readable name / description */
char *description;
/* Cell Identity */
u_int16_t cell_identity;
/* location area code of this BTS */
u_int16_t location_area_code;
/* Training Sequence Code */
u_int8_t tsc;
/* Base Station Identification Code (BSIC) */
u_int8_t bsic;
/* type of BTS */
enum gsm_bts_type type;
struct gsm_bts_model *model;
enum gsm_band band;
/* should the channel allocator allocate channels from high TRX to TRX0,
* rather than starting from TRX0 and go upwards? */
int chan_alloc_reverse;
/* maximum Tx power that the MS is permitted to use in this cell */
int ms_max_power;
/* how do we talk OML with this TRX? */
struct gsm_e1_subslot oml_e1_link;
u_int8_t oml_tei;
struct e1inp_sign_link *oml_link;
/* Abis network management O&M handle */
struct abis_nm_h *nmh;
struct gsm_nm_state nm_state;
struct tlv_parsed nm_attr;
/* number of this BTS on given E1 link */
u_int8_t bts_nr;
/* paging state and control */
struct gsm_bts_paging_state paging;
/* CCCH is on C0 */
struct gsm_bts_trx *c0;
struct {
struct gsm_nm_state nm_state;
} site_mgr;
enum neigh_list_manual_mode neigh_list_manual_mode;
/* parameters from which we build SYSTEM INFORMATION */
struct {
struct gsm48_rach_control rach_control;
u_int8_t ncc_permitted;
struct gsm48_cell_sel_par cell_sel_par;
struct gsm48_si_selection_params cell_ro_sel_par; /* rest octet */
struct gsm48_cell_options cell_options;
struct gsm48_control_channel_descr chan_desc;
struct bitvec neigh_list;
struct bitvec cell_alloc;
struct bitvec si5_neigh_list;
struct {
/* bitmask large enough for all possible ARFCN's */
u_int8_t neigh_list[1024/8];
u_int8_t cell_alloc[1024/8];
/* If the user wants a different neighbor list in SI5 than in SI2 */
u_int8_t si5_neigh_list[1024/8];
} data;
} si_common;
/* do we use static (user-defined) system information messages? (bitmask) */
uint32_t si_mode_static;
/* bitmask of all SI that are present/valid in si_buf */
uint32_t si_valid;
/* buffers where we put the pre-computed SI */
sysinfo_buf_t si_buf[_MAX_SYSINFO_TYPE];
/* ip.accesss Unit ID's have Site/BTS/TRX layout */
union {
struct {
u_int16_t site_id;
u_int16_t bts_id;
u_int32_t flags;
} ip_access;
struct {
struct {
struct gsm_nm_state nm_state;
} cclk;
struct {
struct gsm_nm_state nm_state;
} rack;
struct gsm_envabtse envabtse[4];
} bs11;
struct {
struct {
struct llist_head conn_groups;
} is;
struct {
struct llist_head conn_groups;
} con;
} rbs2000;
struct {
unsigned long serno;
} hsl;
};
/* Not entirely sure how ip.access specific this is */
struct {
enum bts_gprs_mode mode;
struct {
struct gsm_nm_state nm_state;
u_int16_t nsei;
uint8_t timer[7];
} nse;
struct {
struct gsm_nm_state nm_state;
u_int16_t bvci;
uint8_t timer[11];
} cell;
struct gsm_bts_gprs_nsvc nsvc[2];
u_int8_t rac;
} gprs;
/* RACH NM values */
int rach_b_thresh;
int rach_ldavg_slots;
/* transceivers */
int num_trx;
struct llist_head trx_list;
/* Abis NM queue */
struct llist_head abis_queue;
int abis_nm_pend;
};
/* Some statistics of our network */
struct gsmnet_stats {
struct {
struct counter *total;
struct counter *no_channel;
} chreq;
struct {
struct counter *attempted;
struct counter *no_channel; /* no channel available */
struct counter *timeout; /* T3103 timeout */
struct counter *completed; /* HO COMPL received */
struct counter *failed; /* HO FAIL received */
} handover;
struct {
struct counter *attach;
struct counter *normal;
struct counter *periodic;
struct counter *detach;
} loc_upd_type;
struct {
struct counter *reject;
struct counter *accept;
} loc_upd_resp;
struct {
struct counter *attempted;
struct counter *detached;
struct counter *completed;
struct counter *expired;
} paging;
struct {
struct counter *submitted; /* MO SMS submissions */
struct counter *no_receiver;
struct counter *delivered; /* MT SMS deliveries */
struct counter *rp_err_mem;
struct counter *rp_err_other;
} sms;
struct {
struct counter *mo_setup;
struct counter *mo_connect_ack;
struct counter *mt_setup;
struct counter *mt_connect;
} call;
struct {
struct counter *rf_fail;
struct counter *rll_err;
} chan;
struct {
struct counter *oml_fail;
struct counter *rsl_fail;
} bts;
};
enum gsm_auth_policy {
GSM_AUTH_POLICY_CLOSED, /* only subscribers authorized in DB */
GSM_AUTH_POLICY_ACCEPT_ALL, /* accept everyone, even if not authorized in DB */
GSM_AUTH_POLICY_TOKEN, /* accept first, send token per sms, then revoke authorization */
};
#define GSM_T3101_DEFAULT 10
#define GSM_T3113_DEFAULT 60
struct gsm_network {
/* global parameters */
u_int16_t country_code;
u_int16_t network_code;
char *name_long;
char *name_short;
enum gsm_auth_policy auth_policy;
enum gsm48_reject_value reject_cause;
int a5_encryption;
int neci;
int send_mm_info;
struct {
int active;
/* Window RXLEV averaging */
unsigned int win_rxlev_avg; /* number of SACCH frames */
/* Window RXQUAL averaging */
unsigned int win_rxqual_avg; /* number of SACCH frames */
/* Window RXLEV neighbouring cells averaging */
unsigned int win_rxlev_avg_neigh; /* number of SACCH frames */
/* how often should we check for power budget HO */
unsigned int pwr_interval; /* SACCH frames */
/* how much better does a neighbor cell have to be ? */
unsigned int pwr_hysteresis; /* dBm */
/* maximum distacne before we try a handover */
unsigned int max_distance; /* TA values */
} handover;
struct gsmnet_stats stats;
/* layer 4 */
int (*mncc_recv) (struct gsm_network *net, struct msgb *msg);
struct llist_head upqueue;
struct llist_head trans_list;
struct bsc_api *bsc_api;
unsigned int num_bts;
struct llist_head bts_list;
/* timer values */
int T3101;
int T3103;
int T3105;
int T3107;
int T3109;
int T3111;
int T3113;
int T3115;
int T3117;
int T3119;
int T3122;
int T3141;
/* Radio Resource Location Protocol (TS 04.31) */
struct {
enum rrlp_mode mode;
} rrlp;
/* enable the DTXu and DTXd for this network */
int dtx_enabled;
enum gsm_chan_t ctype_by_chreq[16];
/* Use a TCH for handling requests of type paging any */
int pag_any_tch;
/* MSC data in case we are a true BSC */
struct osmo_msc_data *msc_data;
int hardcoded_rtp_payload;
/* subscriber related features */
int keep_subscr;
struct gsm_sms_queue *sms_queue;
};
#define SMS_HDR_SIZE 128
#define SMS_TEXT_SIZE 256
struct gsm_sms {
unsigned long long id;
struct gsm_subscriber *sender;
struct gsm_subscriber *receiver;
unsigned long validity_minutes;
u_int8_t reply_path_req;
u_int8_t status_rep_req;
u_int8_t ud_hdr_ind;
u_int8_t protocol_id;
u_int8_t data_coding_scheme;
u_int8_t msg_ref;
char dest_addr[20+1]; /* DA LV is 12 bytes max, i.e. 10 bytes
* BCD == 20 bytes string */
u_int8_t user_data_len;
u_int8_t user_data[SMS_TEXT_SIZE];
char text[SMS_TEXT_SIZE];
};
struct gsm_network *gsm_network_init(u_int16_t country_code, u_int16_t network_code,
int (*mncc_recv)(struct gsm_network *, struct msgb *));
struct gsm_bts *gsm_bts_alloc(struct gsm_network *net, enum gsm_bts_type type,
u_int8_t tsc, u_int8_t bsic);
struct gsm_bts_trx *gsm_bts_trx_alloc(struct gsm_bts *bts);
int gsm_set_bts_type(struct gsm_bts *bts, enum gsm_bts_type type);
struct gsm_bts *gsm_bts_num(struct gsm_network *net, int num);
/* Get reference to a neighbor cell on a given BCCH ARFCN */
struct gsm_bts *gsm_bts_neighbor(const struct gsm_bts *bts,
u_int16_t arfcn, u_int8_t bsic);
struct gsm_bts_trx *gsm_bts_trx_num(struct gsm_bts *bts, int num);
const char *gsm_pchan_name(enum gsm_phys_chan_config c);
enum gsm_phys_chan_config gsm_pchan_parse(const char *name);
const char *gsm_lchant_name(enum gsm_chan_t c);
const char *gsm_chreq_name(enum gsm_chreq_reason_t c);
char *gsm_trx_name(struct gsm_bts_trx *trx);
char *gsm_ts_name(struct gsm_bts_trx_ts *ts);
char *gsm_lchan_name(struct gsm_lchan *lchan);
const char *gsm_lchans_name(enum gsm_lchan_state s);
void set_ts_e1link(struct gsm_bts_trx_ts *ts, u_int8_t e1_nr,
u_int8_t e1_ts, u_int8_t e1_ts_ss);
enum gsm_bts_type parse_btstype(const char *arg);
const char *btstype2str(enum gsm_bts_type type);
struct gsm_bts_trx *gsm_bts_trx_by_nr(struct gsm_bts *bts, int nr);
struct gsm_bts *gsm_bts_by_lac(struct gsm_network *net, unsigned int lac,
struct gsm_bts *start_bts);
extern void *tall_bsc_ctx;
extern int ipacc_rtp_direct;
static inline int is_ipaccess_bts(struct gsm_bts *bts)
{
switch (bts->type) {
case GSM_BTS_TYPE_NANOBTS:
return 1;
default:
break;
}
return 0;
}
static inline int is_siemens_bts(struct gsm_bts *bts)
{
switch (bts->type) {
case GSM_BTS_TYPE_BS11:
return 1;
default:
break;
}
return 0;
}
enum gsm_auth_policy gsm_auth_policy_parse(const char *arg);
const char *gsm_auth_policy_name(enum gsm_auth_policy policy);
enum rrlp_mode rrlp_mode_parse(const char *arg);
const char *rrlp_mode_name(enum rrlp_mode mode);
enum bts_gprs_mode bts_gprs_mode_parse(const char *arg);
const char *bts_gprs_mode_name(enum bts_gprs_mode mode);
void gsm_trx_lock_rf(struct gsm_bts_trx *trx, int locked);
int gsm48_ra_id_by_bts(u_int8_t *buf, struct gsm_bts *bts);
void gprs_ra_id_by_bts(struct gprs_ra_id *raid, struct gsm_bts *bts);
struct gsm_meas_rep *lchan_next_meas_rep(struct gsm_lchan *lchan);
int gsm_btsmodel_set_feature(struct gsm_bts_model *model, enum gsm_bts_features feat);
int gsm_bts_has_feature(struct gsm_bts *bts, enum gsm_bts_features feat);
int gsm_bts_model_register(struct gsm_bts_model *model);
struct gsm_subscriber_connection *subscr_con_allocate(struct gsm_lchan *lchan);
void subscr_con_free(struct gsm_subscriber_connection *conn);
#endif

View File

@ -1,107 +0,0 @@
#ifndef _GSM_SUBSCR_H
#define _GSM_SUBSCR_H
#include <sys/types.h>
#include "gsm_data.h"
#include <osmocore/linuxlist.h>
#define GSM_IMEI_LENGTH 17
#define GSM_IMSI_LENGTH 17
#define GSM_NAME_LENGTH 160
#define GSM_EXTENSION_LENGTH 15 /* MSISDN can only be 15 digits length */
#define GSM_MIN_EXTEN 20000
#define GSM_MAX_EXTEN 49999
#define GSM_SUBSCRIBER_FIRST_CONTACT 0x00000001
#define tmsi_from_string(str) strtoul(str, NULL, 10)
struct vty;
struct gsm_equipment {
long long unsigned int id;
char imei[GSM_IMEI_LENGTH];
char name[GSM_NAME_LENGTH];
struct gsm48_classmark1 classmark1;
u_int8_t classmark2_len;
u_int8_t classmark2[3];
u_int8_t classmark3_len;
u_int8_t classmark3[14];
};
struct gsm_subscriber {
struct gsm_network *net;
long long unsigned int id;
char imsi[GSM_IMSI_LENGTH];
u_int32_t tmsi;
u_int16_t lac;
char name[GSM_NAME_LENGTH];
char extension[GSM_EXTENSION_LENGTH];
int authorized;
/* Temporary field which is not stored in the DB/HLR */
u_int32_t flags;
/* Every user can only have one equipment in use at any given
* point in time */
struct gsm_equipment equipment;
/* for internal management */
int use_count;
struct llist_head entry;
/* pending requests */
int in_callback;
struct llist_head requests;
};
enum gsm_subscriber_field {
GSM_SUBSCRIBER_IMSI,
GSM_SUBSCRIBER_TMSI,
GSM_SUBSCRIBER_EXTENSION,
GSM_SUBSCRIBER_ID,
};
enum gsm_subscriber_update_reason {
GSM_SUBSCRIBER_UPDATE_ATTACHED,
GSM_SUBSCRIBER_UPDATE_DETACHED,
GSM_SUBSCRIBER_UPDATE_EQUIPMENT,
};
struct gsm_subscriber *subscr_get(struct gsm_subscriber *subscr);
struct gsm_subscriber *subscr_put(struct gsm_subscriber *subscr);
struct gsm_subscriber *subscr_get_by_tmsi(struct gsm_network *net,
u_int32_t tmsi);
struct gsm_subscriber *subscr_get_by_imsi(struct gsm_network *net,
const char *imsi);
struct gsm_subscriber *subscr_get_by_extension(struct gsm_network *net,
const char *ext);
struct gsm_subscriber *subscr_get_by_id(struct gsm_network *net,
unsigned long long id);
struct gsm_subscriber *subscr_get_or_create(struct gsm_network *net,
const char *imsi);
int subscr_update(struct gsm_subscriber *s, struct gsm_bts *bts, int reason);
void subscr_put_channel(struct gsm_subscriber *subscr);
void subscr_get_channel(struct gsm_subscriber *subscr,
int type, gsm_cbfn *cbfn, void *param);
struct gsm_subscriber *subscr_active_by_tmsi(struct gsm_network *net,
uint32_t tmsi);
struct gsm_subscriber *subscr_active_by_imsi(struct gsm_network *net,
const char *imsi);
int subscr_pending_requests(struct gsm_subscriber *subscr);
int subscr_pending_clear(struct gsm_subscriber *subscr);
int subscr_pending_dump(struct gsm_subscriber *subscr, struct vty *vty);
int subscr_pending_kick(struct gsm_subscriber *subscr);
char *subscr_name(struct gsm_subscriber *subscr);
int subscr_purge_inactive(struct gsm_network *net);
void subscr_update_from_db(struct gsm_subscriber *subscr);
/* internal */
struct gsm_subscriber *subscr_alloc(void);
extern struct llist_head active_subscribers;
#endif /* _GSM_SUBSCR_H */

View File

@ -1,14 +0,0 @@
#ifndef _HANDOVER_H
#define _HANDOVER_H
struct gsm_subscriber_connection;
/* Hand over the specified logical channel to the specified new BTS.
* This is the main entry point for the actual handover algorithm,
* after it has decided it wants to initiate HO to a specific BTS */
int bsc_handover_start(struct gsm_lchan *old_lchan, struct gsm_bts *bts);
/* clear any operation for this connection */
void bsc_clear_handover(struct gsm_subscriber_connection *conn, int free_lchan);
#endif /* _HANDOVER_H */

View File

@ -1,131 +0,0 @@
#ifndef _IPACCESS_H
#define _IPACCESS_H
#include "e1_input.h"
#include "gsm_subscriber.h"
#include <osmocore/linuxlist.h>
#define IPA_TCP_PORT_OML 3002
#define IPA_TCP_PORT_RSL 3003
struct ipaccess_head {
u_int16_t len; /* network byte order */
u_int8_t proto;
u_int8_t data[0];
} __attribute__ ((packed));
struct ipaccess_head_ext {
uint8_t proto;
uint8_t data[0];
} __attribute__ ((packed));
enum ipaccess_proto {
IPAC_PROTO_RSL = 0x00,
IPAC_PROTO_IPACCESS = 0xfe,
IPAC_PROTO_SCCP = 0xfd,
IPAC_PROTO_OML = 0xff,
/* OpenBSC extensions */
IPAC_PROTO_OSMO = 0xee,
IPAC_PROTO_MGCP_OLD = 0xfc,
};
enum ipaccess_msgtype {
IPAC_MSGT_PING = 0x00,
IPAC_MSGT_PONG = 0x01,
IPAC_MSGT_ID_GET = 0x04,
IPAC_MSGT_ID_RESP = 0x05,
IPAC_MSGT_ID_ACK = 0x06,
/* OpenBSC extension */
IPAC_MSGT_SCCP_OLD = 0xff,
};
enum ipaccess_id_tags {
IPAC_IDTAG_SERNR = 0x00,
IPAC_IDTAG_UNITNAME = 0x01,
IPAC_IDTAG_LOCATION1 = 0x02,
IPAC_IDTAG_LOCATION2 = 0x03,
IPAC_IDTAG_EQUIPVERS = 0x04,
IPAC_IDTAG_SWVERSION = 0x05,
IPAC_IDTAG_IPADDR = 0x06,
IPAC_IDTAG_MACADDR = 0x07,
IPAC_IDTAG_UNIT = 0x08,
};
struct ipac_msgt_sccp_state {
uint8_t src_ref[3];
uint8_t dst_ref[3];
uint8_t trans_id;
uint8_t invoke_id;
char imsi[GSM_IMSI_LENGTH];
} __attribute__((packed));
int ipaccess_connect(struct e1inp_line *line, struct sockaddr_in *sa);
/*
* methods for parsing and sending a message
*/
int ipaccess_rcvmsg_base(struct msgb *msg, struct bsc_fd *bfd);
struct msgb *ipaccess_read_msg(struct bsc_fd *bfd, int *error);
void ipaccess_prepend_header(struct msgb *msg, int proto);
int ipaccess_send_id_ack(int fd);
int ipaccess_send_id_req(int fd);
int ipaccess_idtag_parse(struct tlv_parsed *dec, unsigned char *buf, int len);
int ipaccess_drop_oml(struct gsm_bts *bts);
int ipaccess_drop_rsl(struct gsm_bts_trx *trx);
/*
* Firmware specific header
*/
struct sdp_firmware {
char magic[4];
char more_magic[2];
u_int16_t more_more_magic;
u_int32_t header_length;
u_int32_t file_length;
char sw_part[20];
char text1[64];
char time[12];
char date[14];
char text2[10];
char version[20];
u_int16_t table_offset;
/* stuff i don't know */
} __attribute__((packed));
struct sdp_header_entry {
u_int16_t something1;
char text1[64];
char time[12];
char date[14];
char text2[10];
char version[20];
u_int32_t length;
u_int32_t addr1;
u_int32_t addr2;
u_int32_t start;
} __attribute__((packed));
struct sdp_header_item {
struct sdp_header_entry header_entry;
struct llist_head entry;
off_t absolute_offset;
};
struct sdp_header {
struct sdp_firmware firmware_info;
/* for more_magic a list of sdp_header_entry_list */
struct llist_head header_list;
/* the entry of the sdp_header */
struct llist_head entry;
};
int ipaccess_analyze_file(int fd, const unsigned int st_size, const unsigned base_offset, struct llist_head *list);
#endif /* _IPACCESS_H */

Some files were not shown because too many files have changed in this diff Show More