initial checkin of osmo-remsim

This adds some initial code, particularly the ASN.1 definition of the
RSPRO protocol, related makefile to build it using ffasn1c, and our
usual autoconf infrastructure to build it.

Change-Id: Ibaa993b59e9a65a0242b0f42b27d9cd29f8e1878
laforge/bankd-fsm-mistake 0.0
Harald Welte 2018-08-13 18:32:36 +02:00
commit 3aa901da56
89 changed files with 6270 additions and 0 deletions

29
.gitignore vendored Normal file
View File

@ -0,0 +1,29 @@
*.o
*.lo
*.la
*.a
*.so
*~
.*.swp
.deps
.version
.tarball-version
autom4te.cache
aclocal.m4
config.guess
config.log
config.status
config.sub
configure
compile
depcomp
install-sh
libtool
ltmain.sh
missing
Makefile.in
Makefile
Makefile.am.sample
tags
m4
gen_rspro.stamp

15
Makefile.am Normal file
View File

@ -0,0 +1,15 @@
AUTOMAKE_OPTIONS = foreign dist-bzip2
SUBDIRS = src include
EXTRA_DIST = asn1 .version README.md
pkgcofigdir = $(libdir)/pkgconfig
@RELMAKE@
BUILT_SOURCES = $(top_srcdir)/.version
$(top_srcdir)/.version:
echo $(VERSION) > $@-t && mv $@-t $@
dist-hook:
echo $(VERSION) > $(distdir)/.tarball-version

4
README.md Normal file
View File

@ -0,0 +1,4 @@
osmo-remsim - Osmocom remote SIM software suite
===============================================
TBD

275
asn1/RSPRO.asn Normal file
View File

@ -0,0 +1,275 @@
----------------------------------------------------------------------
-- RSPRO - Remote SIM Protocol, part of Osmocom Remote SIM Suite
-- (C) 2018 by Harald Welte <laforge@gnumonks.org>
----------------------------------------------------------------------
RSPRO {} DEFINITIONS
IMPLICIT TAGS
::=
BEGIN
EXPORTS
RsproPDU
;
----------------------------------------------------------------------
-- Elementary Data Types
----------------------------------------------------------------------
-- Some random ID the requestor can chose and which the client echos back in a response.
-- This allows multiple outstanding commands in flight and matching of responses to requests.
OperationTag ::= INTEGER(0..2147483647)
-- Unique identifier of a given SIM bank
BankId ::= INTEGER(0..1023)
-- Unique identifier of a given client (modem)
ClientId ::= INTEGER(0..1023)
ComponentType ::= ENUMERATED {
-- client: Modems / Phones
remsimClient (0),
-- server: Coordination
remsimServer (1),
-- bank daemon: SIM cards
remsimBankd (2)
}
ComponentName ::= IA5String (SIZE (1..32))
ComponentIdentity ::= SEQUENCE {
type ComponentType,
name ComponentName,
software [0] ComponentName,
swVersion [1] ComponentName,
hwManufacturer [2] ComponentName OPTIONAL,
hwModel [3] ComponentName OPTIONAL,
hwSerialNr [4] ComponentName OPTIONAL,
hwVersion [5] ComponentName OPTIONAL,
fwVersion [6] ComponentName OPTIONAL,
...
}
-- IP address / port details
Ipv4Address ::= OCTET STRING (SIZE (4))
Ipv6Address ::= OCTET STRING (SIZE (16))
IpAddress ::= CHOICE {
ipv4 [0] Ipv4Address,
ipv6 [1] Ipv6Address
}
PortNumber ::= INTEGER (0..65535)
IpPort ::= SEQUENCE {
ip IpAddress,
port PortNumber
}
-- Result of a given operation
ResultCode ::= ENUMERATED {
ok (0),
-- client / bank / slot ID not accepted
illegalClientId (1),
illegalBankId (2),
illegalSlotId (3),
-- no card is present in given slot
cardNotPresent (100),
-- card is present but unresponsive in given slot
cardUnresponsive (101),
-- unrecoverable transmission errors detected
cardTransmissionError (102),
...
}
-- Slot number within a SIM bank or a client.
SlotNumber ::= INTEGER(0..1023)
-- Slot identity on client (modem) side
ClientSlot ::= SEQUENCE {
clientId ClientId,
slotNr SlotNumber,
...
}
-- Slot identity on SIM bank side
BankSlot ::= SEQUENCE {
bankId BankId,
slotNr SlotNumber,
...
}
ATR ::= OCTET STRING (SIZE (1..55))
-- flags related to a TPDU in either of the two directions
TpduFlags ::= SEQUENCE {
-- indicates a TPDU header is present in this message
tpduHeaderPresent BOOLEAN,
-- indicates last part of transmission in this direction
finalPart BOOLEAN,
-- indicates a PB is present and we should continue with TX
procByteContinueTx BOOLEAN,
-- indicates a PB is present and we should continue with RX
procByteContinueRx BOOLEAN,
...
}
--- physical state of a given slot
SlotPhysStatus ::= SEQUENCE {
-- is RST activated by the modem?
resetActive [0] BOOLEAN,
-- is VCC applied by the modem?
vccPresent [1] BOOLEAN OPTIONAL,
-- is CLK applied by the modem?
clkActive [2] BOOLEAN OPTIONAL, -- not all hardware supports this
-- is card presence signalled to the modem?
cardPresent [3] BOOLEAN OPTIONAL,
...
}
----------------------------------------------------------------------
-- Messages
----------------------------------------------------------------------
-- SIM Bank connects to central server
ConnectBankReq ::= SEQUENCE {
-- identity of the bank that is connecting to the server
identity ComponentIdentity,
-- bank number, pre-configured on bank side
bankId BankId,
numberOfSlots SlotNumber,
...
}
ConnectBankRes ::= SEQUENCE {
-- identity of the server to which the bank is connecting
identity ComponentIdentity,
result ResultCode,
...
}
ConnectClientReq ::= SEQUENCE {
-- identity of the bank that is connecting to the server
identity ComponentIdentity,
...
}
ConnectClientRes ::= SEQUENCE {
-- identity of the bnak to which the client is connecting
identity ComponentIdentity,
result ResultCode,
...
}
-- create a mapping between a given Bank:Slot <-> Client:Slot
CreateMappingReq ::= SEQUENCE {
client ClientSlot,
bank BankSlot,
...
}
CreateMappingRes ::= SEQUENCE {
result ResultCode,
...
}
-- remove a mapping between a given Bank:Slot <-> Client:Slot
RemoveMappingReq ::= SEQUENCE {
client ClientSlot,
bank BankSlot,
...
}
RemoveMappingRes ::= SEQUENCE {
result ResultCode,
...
}
ConfigClientReq ::= SEQUENCE {
-- server-allocated assignment of a client ID
clientId ClientId,
-- bank to which the client shall connect
bankd IpPort,
...
}
ConfigClientRes ::= SEQUENCE {
result ResultCode,
...
}
-- configure the ATR which the card emulator (client) shall send to the modem
SetAtrReq ::= SEQUENCE {
slot ClientSlot,
atr ATR,
...
}
SetAtrRes ::= SEQUENCE {
result ResultCode,
...
}
-- TPDU in Modem -> Card direction
TpduModemToCard ::= SEQUENCE {
-- we include fully-qualified bank and client slots for easier debugging
fromClientSlot ClientSlot,
toBankSlot BankSlot,
flags TpduFlags,
data OCTET STRING,
...
}
-- TPDU in Card -> Modem direction
TpduCardToModem ::= SEQUENCE {
-- we include fully-qualified bank and client slots for easier debugging
fromBankSlot BankSlot,
toClientSlot ClientSlot,
flags TpduFlags,
data OCTET STRING,
...
}
-- indciation about the current status of a client (modem side)
ClientSlotStatusInd ::= SEQUENCE {
fromClientSlot ClientSlot,
toBankSlot BankSlot,
slotPhysStatus SlotPhysStatus,
...
}
-- indciation about the current status of a bank (modem side)
BankSlotStatusInd ::= SEQUENCE {
fromBankSlot BankSlot,
toClientSlot ClientSlot,
slotPhysStatus SlotPhysStatus,
...
}
----------------------------------------------------------------------
-- PDU
----------------------------------------------------------------------
RsproPDUchoice ::= CHOICE {
-- configuration + management
connectBankReq [0] ConnectBankReq,
connectBankRes [1] ConnectBankRes,
connectClientReq [2] ConnectClientReq,
connectClientRes [3] ConnectClientRes,
createMappingReq [4] CreateMappingReq,
createMappingRes [5] CreateMappingRes,
removeMappingReq [6] RemoveMappingReq,
removeMappingRes [7] RemoveMappingRes,
configClientReq [8] ConfigClientReq,
configClientRes [9] ConfigClientRes,
-- APDUs etc.
setAtrReq [10] SetAtrReq,
setAtrRes [11] SetAtrRes,
tpduModemToCard [12] TpduModemToCard,
tpduCardToModem [13] TpduCardToModem,
clientSlotStatusInd [14] ClientSlotStatusInd,
bankSlotStatusInd [15] BankSlotStatusInd,
...
}
RsproPDU ::= SEQUENCE {
version [0] INTEGER(0..32) DEFAULT 1,
tag [1] OperationTag,
msg [2] RsproPDUchoice
}
END

86
configure.ac Normal file
View File

@ -0,0 +1,86 @@
AC_INIT([osmo-remsim],
m4_esyscmd([./git-version-gen .tarball-version]),
[simtrace@lists.osmocom.org])
dnl *This* is the root dir, even if an install-sh exists in ../ or ../../
AC_CONFIG_AUX_DIR([.])
LT_INIT
AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip 1.9 tar-ustar])
dnl tar-ustar: some asn1 filenames surpass the 99 char limit of tar, so we need
dnl to make tar allow longer filenames.
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_MKDIR_P
AC_PROG_CC
AC_PROG_INSTALL
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(OSMOCORE, libosmocore >= 0.11.0)
PKG_CHECK_MODULES(ASN1C, libasn1c >= 0.9.30)
AC_CONFIG_MACRO_DIR([m4])
dnl checks for header files
AC_HEADER_STDC
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
CFLAGS="$CFLAGS -Wall"
CPPFLAGS="$CPPFLAGS -Wall"
AC_MSG_RESULT([CFLAGS="$CFLAGS"])
AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"])
AC_OUTPUT(
Makefile
src/Makefile
src/rspro/Makefile
include/Makefile
include/osmocom/Makefile
include/osmocom/rspro/Makefile
)

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:

1
include/Makefile.am Normal file
View File

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

View File

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

View File

@ -0,0 +1,38 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _ATR_H_
#define _ATR_H_
#include <asn_application.h>
/* Including external dependencies */
#include <OCTET_STRING.h>
#ifdef __cplusplus
extern "C" {
#endif
/* ATR */
typedef OCTET_STRING_t ATR_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ATR;
asn_struct_free_f ATR_free;
asn_struct_print_f ATR_print;
asn_constr_check_f ATR_constraint;
ber_type_decoder_f ATR_decode_ber;
der_type_encoder_f ATR_encode_der;
xer_type_decoder_f ATR_decode_xer;
xer_type_encoder_f ATR_encode_xer;
#ifdef __cplusplus
}
#endif
#endif /* _ATR_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,38 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _BankId_H_
#define _BankId_H_
#include <asn_application.h>
/* Including external dependencies */
#include <NativeInteger.h>
#ifdef __cplusplus
extern "C" {
#endif
/* BankId */
typedef long BankId_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_BankId;
asn_struct_free_f BankId_free;
asn_struct_print_f BankId_print;
asn_constr_check_f BankId_constraint;
ber_type_decoder_f BankId_decode_ber;
der_type_encoder_f BankId_encode_der;
xer_type_decoder_f BankId_decode_xer;
xer_type_encoder_f BankId_encode_xer;
#ifdef __cplusplus
}
#endif
#endif /* _BankId_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,43 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _BankSlot_H_
#define _BankSlot_H_
#include <asn_application.h>
/* Including external dependencies */
#include <osmocom/rspro/BankId.h>
#include <osmocom/rspro/SlotNumber.h>
#include <constr_SEQUENCE.h>
#ifdef __cplusplus
extern "C" {
#endif
/* BankSlot */
typedef struct BankSlot {
BankId_t bankId;
SlotNumber_t slotNr;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} BankSlot_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_BankSlot;
#ifdef __cplusplus
}
#endif
#endif /* _BankSlot_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,45 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _BankSlotStatusInd_H_
#define _BankSlotStatusInd_H_
#include <asn_application.h>
/* Including external dependencies */
#include <osmocom/rspro/BankSlot.h>
#include <osmocom/rspro/ClientSlot.h>
#include <osmocom/rspro/SlotPhysStatus.h>
#include <constr_SEQUENCE.h>
#ifdef __cplusplus
extern "C" {
#endif
/* BankSlotStatusInd */
typedef struct BankSlotStatusInd {
BankSlot_t fromBankSlot;
ClientSlot_t toClientSlot;
SlotPhysStatus_t slotPhysStatus;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} BankSlotStatusInd_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_BankSlotStatusInd;
#ifdef __cplusplus
}
#endif
#endif /* _BankSlotStatusInd_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,38 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _ClientId_H_
#define _ClientId_H_
#include <asn_application.h>
/* Including external dependencies */
#include <NativeInteger.h>
#ifdef __cplusplus
extern "C" {
#endif
/* ClientId */
typedef long ClientId_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ClientId;
asn_struct_free_f ClientId_free;
asn_struct_print_f ClientId_print;
asn_constr_check_f ClientId_constraint;
ber_type_decoder_f ClientId_decode_ber;
der_type_encoder_f ClientId_encode_der;
xer_type_decoder_f ClientId_decode_xer;
xer_type_encoder_f ClientId_encode_xer;
#ifdef __cplusplus
}
#endif
#endif /* _ClientId_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,43 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _ClientSlot_H_
#define _ClientSlot_H_
#include <asn_application.h>
/* Including external dependencies */
#include <osmocom/rspro/ClientId.h>
#include <osmocom/rspro/SlotNumber.h>
#include <constr_SEQUENCE.h>
#ifdef __cplusplus
extern "C" {
#endif
/* ClientSlot */
typedef struct ClientSlot {
ClientId_t clientId;
SlotNumber_t slotNr;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ClientSlot_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ClientSlot;
#ifdef __cplusplus
}
#endif
#endif /* _ClientSlot_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,45 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _ClientSlotStatusInd_H_
#define _ClientSlotStatusInd_H_
#include <asn_application.h>
/* Including external dependencies */
#include <osmocom/rspro/ClientSlot.h>
#include <osmocom/rspro/BankSlot.h>
#include <osmocom/rspro/SlotPhysStatus.h>
#include <constr_SEQUENCE.h>
#ifdef __cplusplus
extern "C" {
#endif
/* ClientSlotStatusInd */
typedef struct ClientSlotStatusInd {
ClientSlot_t fromClientSlot;
BankSlot_t toBankSlot;
SlotPhysStatus_t slotPhysStatus;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ClientSlotStatusInd_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ClientSlotStatusInd;
#ifdef __cplusplus
}
#endif
#endif /* _ClientSlotStatusInd_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,50 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _ComponentIdentity_H_
#define _ComponentIdentity_H_
#include <asn_application.h>
/* Including external dependencies */
#include <osmocom/rspro/ComponentType.h>
#include <osmocom/rspro/ComponentName.h>
#include <constr_SEQUENCE.h>
#ifdef __cplusplus
extern "C" {
#endif
/* ComponentIdentity */
typedef struct ComponentIdentity {
ComponentType_t type;
ComponentName_t name;
ComponentName_t software;
ComponentName_t swVersion;
ComponentName_t *hwManufacturer /* OPTIONAL */;
ComponentName_t *hwModel /* OPTIONAL */;
ComponentName_t *hwSerialNr /* OPTIONAL */;
ComponentName_t *hwVersion /* OPTIONAL */;
ComponentName_t *fwVersion /* OPTIONAL */;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ComponentIdentity_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ComponentIdentity;
#ifdef __cplusplus
}
#endif
#endif /* _ComponentIdentity_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,38 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _ComponentName_H_
#define _ComponentName_H_
#include <asn_application.h>
/* Including external dependencies */
#include <IA5String.h>
#ifdef __cplusplus
extern "C" {
#endif
/* ComponentName */
typedef IA5String_t ComponentName_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ComponentName;
asn_struct_free_f ComponentName_free;
asn_struct_print_f ComponentName_print;
asn_constr_check_f ComponentName_constraint;
ber_type_decoder_f ComponentName_decode_ber;
der_type_encoder_f ComponentName_encode_der;
xer_type_decoder_f ComponentName_decode_xer;
xer_type_encoder_f ComponentName_encode_xer;
#ifdef __cplusplus
}
#endif
#endif /* _ComponentName_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,45 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _ComponentType_H_
#define _ComponentType_H_
#include <asn_application.h>
/* Including external dependencies */
#include <NativeEnumerated.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Dependencies */
typedef enum ComponentType {
ComponentType_remsimClient = 0,
ComponentType_remsimServer = 1,
ComponentType_remsimBankd = 2
} e_ComponentType;
/* ComponentType */
typedef long ComponentType_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ComponentType;
asn_struct_free_f ComponentType_free;
asn_struct_print_f ComponentType_print;
asn_constr_check_f ComponentType_constraint;
ber_type_decoder_f ComponentType_decode_ber;
der_type_encoder_f ComponentType_encode_der;
xer_type_decoder_f ComponentType_decode_xer;
xer_type_encoder_f ComponentType_encode_xer;
#ifdef __cplusplus
}
#endif
#endif /* _ComponentType_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,43 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _ConfigClientReq_H_
#define _ConfigClientReq_H_
#include <asn_application.h>
/* Including external dependencies */
#include <osmocom/rspro/ClientId.h>
#include <osmocom/rspro/IpPort.h>
#include <constr_SEQUENCE.h>
#ifdef __cplusplus
extern "C" {
#endif
/* ConfigClientReq */
typedef struct ConfigClientReq {
ClientId_t clientId;
IpPort_t bankd;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ConfigClientReq_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ConfigClientReq;
#ifdef __cplusplus
}
#endif
#endif /* _ConfigClientReq_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,41 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _ConfigClientRes_H_
#define _ConfigClientRes_H_
#include <asn_application.h>
/* Including external dependencies */
#include <osmocom/rspro/ResultCode.h>
#include <constr_SEQUENCE.h>
#ifdef __cplusplus
extern "C" {
#endif
/* ConfigClientRes */
typedef struct ConfigClientRes {
ResultCode_t result;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ConfigClientRes_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ConfigClientRes;
#ifdef __cplusplus
}
#endif
#endif /* _ConfigClientRes_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,45 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _ConnectBankReq_H_
#define _ConnectBankReq_H_
#include <asn_application.h>
/* Including external dependencies */
#include <osmocom/rspro/ComponentIdentity.h>
#include <osmocom/rspro/BankId.h>
#include <osmocom/rspro/SlotNumber.h>
#include <constr_SEQUENCE.h>
#ifdef __cplusplus
extern "C" {
#endif
/* ConnectBankReq */
typedef struct ConnectBankReq {
ComponentIdentity_t identity;
BankId_t bankId;
SlotNumber_t numberOfSlots;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ConnectBankReq_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ConnectBankReq;
#ifdef __cplusplus
}
#endif
#endif /* _ConnectBankReq_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,43 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _ConnectBankRes_H_
#define _ConnectBankRes_H_
#include <asn_application.h>
/* Including external dependencies */
#include <osmocom/rspro/ComponentIdentity.h>
#include <osmocom/rspro/ResultCode.h>
#include <constr_SEQUENCE.h>
#ifdef __cplusplus
extern "C" {
#endif
/* ConnectBankRes */
typedef struct ConnectBankRes {
ComponentIdentity_t identity;
ResultCode_t result;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ConnectBankRes_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ConnectBankRes;
#ifdef __cplusplus
}
#endif
#endif /* _ConnectBankRes_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,41 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _ConnectClientReq_H_
#define _ConnectClientReq_H_
#include <asn_application.h>
/* Including external dependencies */
#include <osmocom/rspro/ComponentIdentity.h>
#include <constr_SEQUENCE.h>
#ifdef __cplusplus
extern "C" {
#endif
/* ConnectClientReq */
typedef struct ConnectClientReq {
ComponentIdentity_t identity;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ConnectClientReq_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ConnectClientReq;
#ifdef __cplusplus
}
#endif
#endif /* _ConnectClientReq_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,43 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _ConnectClientRes_H_
#define _ConnectClientRes_H_
#include <asn_application.h>
/* Including external dependencies */
#include <osmocom/rspro/ComponentIdentity.h>
#include <osmocom/rspro/ResultCode.h>
#include <constr_SEQUENCE.h>
#ifdef __cplusplus
extern "C" {
#endif
/* ConnectClientRes */
typedef struct ConnectClientRes {
ComponentIdentity_t identity;
ResultCode_t result;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} ConnectClientRes_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_ConnectClientRes;
#ifdef __cplusplus
}
#endif
#endif /* _ConnectClientRes_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,43 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _CreateMappingReq_H_
#define _CreateMappingReq_H_
#include <asn_application.h>
/* Including external dependencies */
#include <osmocom/rspro/ClientSlot.h>
#include <osmocom/rspro/BankSlot.h>
#include <constr_SEQUENCE.h>
#ifdef __cplusplus
extern "C" {
#endif
/* CreateMappingReq */
typedef struct CreateMappingReq {
ClientSlot_t client;
BankSlot_t bank;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} CreateMappingReq_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_CreateMappingReq;
#ifdef __cplusplus
}
#endif
#endif /* _CreateMappingReq_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,41 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _CreateMappingRes_H_
#define _CreateMappingRes_H_
#include <asn_application.h>
/* Including external dependencies */
#include <osmocom/rspro/ResultCode.h>
#include <constr_SEQUENCE.h>
#ifdef __cplusplus
extern "C" {
#endif
/* CreateMappingRes */
typedef struct CreateMappingRes {
ResultCode_t result;
/*
* This type is extensible,
* possible extensions are below.
*/
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} CreateMappingRes_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_CreateMappingRes;
#ifdef __cplusplus
}
#endif
#endif /* _CreateMappingRes_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,49 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _IpAddress_H_
#define _IpAddress_H_
#include <asn_application.h>
/* Including external dependencies */
#include <osmocom/rspro/Ipv4Address.h>
#include <osmocom/rspro/Ipv6Address.h>
#include <constr_CHOICE.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Dependencies */
typedef enum IpAddress_PR {
IpAddress_PR_NOTHING, /* No components present */
IpAddress_PR_ipv4,
IpAddress_PR_ipv6
} IpAddress_PR;
/* IpAddress */
typedef struct IpAddress {
IpAddress_PR present;
union IpAddress_u {
Ipv4Address_t ipv4;
Ipv6Address_t ipv6;
} choice;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} IpAddress_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_IpAddress;
#ifdef __cplusplus
}
#endif
#endif /* _IpAddress_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,39 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _IpPort_H_
#define _IpPort_H_
#include <asn_application.h>
/* Including external dependencies */
#include <osmocom/rspro/IpAddress.h>
#include <osmocom/rspro/PortNumber.h>
#include <constr_SEQUENCE.h>
#ifdef __cplusplus
extern "C" {
#endif
/* IpPort */
typedef struct IpPort {
IpAddress_t ip;
PortNumber_t port;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} IpPort_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_IpPort;
#ifdef __cplusplus
}
#endif
#endif /* _IpPort_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,38 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _Ipv4Address_H_
#define _Ipv4Address_H_
#include <asn_application.h>
/* Including external dependencies */
#include <OCTET_STRING.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Ipv4Address */
typedef OCTET_STRING_t Ipv4Address_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_Ipv4Address;
asn_struct_free_f Ipv4Address_free;
asn_struct_print_f Ipv4Address_print;
asn_constr_check_f Ipv4Address_constraint;
ber_type_decoder_f Ipv4Address_decode_ber;
der_type_encoder_f Ipv4Address_encode_der;
xer_type_decoder_f Ipv4Address_decode_xer;
xer_type_encoder_f Ipv4Address_encode_xer;
#ifdef __cplusplus
}
#endif
#endif /* _Ipv4Address_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,38 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _Ipv6Address_H_
#define _Ipv6Address_H_
#include <asn_application.h>
/* Including external dependencies */
#include <OCTET_STRING.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Ipv6Address */
typedef OCTET_STRING_t Ipv6Address_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_Ipv6Address;
asn_struct_free_f Ipv6Address_free;
asn_struct_print_f Ipv6Address_print;
asn_constr_check_f Ipv6Address_constraint;
ber_type_decoder_f Ipv6Address_decode_ber;
der_type_encoder_f Ipv6Address_encode_der;
xer_type_decoder_f Ipv6Address_decode_xer;
xer_type_encoder_f Ipv6Address_encode_xer;
#ifdef __cplusplus
}
#endif
#endif /* _Ipv6Address_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,38 @@
noinst_HEADERS = \
ATR.h \
BankId.h \
BankSlot.h \
BankSlotStatusInd.h \
ClientId.h \
ClientSlot.h \
ClientSlotStatusInd.h \
ComponentIdentity.h \
ComponentName.h \
ComponentType.h \
ConfigClientReq.h \
ConfigClientRes.h \
ConnectBankReq.h \
ConnectBankRes.h \
ConnectClientReq.h \
ConnectClientRes.h \
CreateMappingReq.h \
CreateMappingRes.h \
IpAddress.h \
IpPort.h \
Ipv4Address.h \
Ipv6Address.h \
OperationTag.h \
PortNumber.h \
RemoveMappingReq.h \
RemoveMappingRes.h \
ResultCode.h \
RsproPDU.h \
RsproPDUchoice.h \
SetAtrReq.h \
SetAtrRes.h \
SlotNumber.h \
SlotPhysStatus.h \
TpduCardToModem.h \
TpduFlags.h \
TpduModemToCard.h \
$(NULL)

View File

@ -0,0 +1,38 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _OperationTag_H_
#define _OperationTag_H_
#include <asn_application.h>
/* Including external dependencies */
#include <NativeInteger.h>
#ifdef __cplusplus
extern "C" {
#endif
/* OperationTag */
typedef long OperationTag_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_OperationTag;
asn_struct_free_f OperationTag_free;
asn_struct_print_f OperationTag_print;
asn_constr_check_f OperationTag_constraint;
ber_type_decoder_f OperationTag_decode_ber;
der_type_encoder_f OperationTag_encode_der;
xer_type_decoder_f OperationTag_decode_xer;
xer_type_encoder_f OperationTag_encode_xer;
#ifdef __cplusplus
}
#endif
#endif /* _OperationTag_H_ */
#include <asn_internal.h>

View File

@ -0,0 +1,38 @@
/*
* Generated by asn1c-0.9.28 (http://lionet.info/asn1c)
* From ASN.1 module "RSPRO"
* found in "../../asn1/RSPRO.asn"
*/
#ifndef _PortNumber_H_
#define _PortNumber_H_
#include <asn_application.h>
/* Including external dependencies */
#include <NativeInteger.h>
#ifdef __cplusplus
extern "C" {
#endif
/* PortNumber */
typedef long PortNumber_t;
/* Implementation */
extern asn_TYPE_descriptor_t asn_DEF_PortNumber;
asn_struct_free_f PortNumber_free;
asn_struct_print_f PortNumber_print;