Commit 4c100a29 authored by Rohit Gupta's avatar Rohit Gupta

add license to autotest framework + delete files not used in project

parent b481bfd9
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.0 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# \author Navid Nikaein, Rohit Gupta
if [ -s $OPENAIR_DIR/cmake_targets/tools/build_helper ] ; then
source $OPENAIR_DIR/cmake_targets/tools/build_helper
......
#!/usr/bin/python
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.0 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# \author Navid Nikaein, Rohit Gupta
import time
import serial
......
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.0 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# \author Navid Nikaein, Rohit Gupta
#Simple script to retry git clone in case of failure
......
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.0 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# \author Navid Nikaein, Rohit Gupta
#arg0 -> Name of executable
#args[1...N] -> arguments to be passed to executable
......
#!/bin/bash
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.0 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
# \author Navid Nikaein, Rohit Gupta
echo "This script stops exmimo2 as it might be transmitting signal by itself if lte-softmodem terminates incorrectly"
......
PLATFORM = linux-x86-32
NUM_PROC = $(shell echo `cat /proc/cpuinfo | grep processor | wc -l`)
NUM_PROC = 1
LIBS = -L/usr/local/lib -Llib -lSockets -lasn1rrc -lpthread -lssl -lcrypto -lssl -lxml2
#------------------------------------------------
# DIRS
#------------------------------------------------
UPDIR := $(shell /bin/pwd)
BIN_DIR = bin
SRC_DIR = $(UPDIR)/src
COM_DIR = $(SRC_DIR)/com
FOREIGN_DIR = $(SRC_DIR)/foreign
SOCKETS_DIR = $(FOREIGN_DIR)/sockets-2.3.9.4
TCPIP_DIR = $(FOREIGN_DIR)/tcpip
SQL_DIR = $(FOREIGN_DIR)/sql
ASN1_RRC_SPEC_DIR = $(FOREIGN_DIR)/generated_c_asn1_rrc/ASN1_files
RRC_RRM_ASN1_DIR = $(COM_DIR)/asn1
RADIO_RESOURCES_DIR = $(SRC_DIR)/radio_resources
RRC_DIR = ../RRC/LITE
TEST_DIR = $(SRC_DIR)/test
#------------------------------------------------
# INCLUDES
#------------------------------------------------
include Makefile.objs
include Makefile.Defines.$(PLATFORM)
INCLUDE = -I$(SRC_DIR) -I$(SOCKETS_DIR) -I$(SQL_DIR) -I$(COM_DIR) -I$(COM_DIR)/rrc -I$(COM_DIR)/rrm \
-I$(TCPIP_DIR) -I$(RADIO_RESOURCES_DIR) -I$(RRC_RRM_ASN1_DIR) -I$(TEST_DIR)
#------------------------------------------------
# CFLAGS
#------------------------------------------------
CPPFLAGS = $(CFLAGS)
#CPPFLAGS += -fpermissive -std=gnu++98
#------------------------------------------------
# LIBS
#------------------------------------------------
libasn1rrc: libasn1rrc.a
mv libasn1rrc.a lib
libsqlite: libsqlite.a
mv libsqlite.a lib
libSockets: libSockets.a
mv libSockets.a lib
libasn1rrc.a: $(ASN1RRC_OBJS)
ar cru $@ $^
ranlib $@
libSockets.a: $(SOCKETS_OBJS)
ar cru $@ $^
ranlib $@
libsqlite.a: $(SQLITE_OBJS)
ar cru $@ $^
ranlib $@
LDFLAGS += -rdynamic
#------------------------------------------------
# PROGS
#------------------------------------------------
PROGS = rrm_exe test_exe
gen-c-from-asn1:
#-fbless-SIZE
# Allow SIZE() constraint for INTEGER, ENUMERATED, and other types
# for which this constraint is normally prohibited by the stan-
# dard. This is a violation of ASN.1 standard, and the compiler
# may fail to produce a meaningful code.
#-fcompound-names
# Using this option prevents name collisions in the target source
# code by using complex names for target language structures.
# (Name collisions may occur if the ASN.1 module reuses the same
# identifiers in multiple contexts).
#-findirect-choice
# When generating code for a CHOICE type, compile the CHOICE mem-
# bers as indirect pointers instead of declaring them inline. Con-
# sider using this option together with -fno-include-deps to pre-
# vent circular references.
#-fknown-extern-type=<name>
# Pretend the specified type is known. The compiler will assume
# the target language source files for the given type have been
# provided manually.
#-fno-constraints
# Do not generate ASN.1 subtype constraint checking code. This may
# make a shorter executable.
#-fno-include-deps
# Do not generate courtesy #include lines for non-critical type
# dependencies. Helps prevent namespace collisions.
#-funnamed-unions
# Enable unnamed unions in the definitions of target language's
# structures.
#cd $(RRC_RRM_ASN1_DIR);asn1c -gen-PER -fcompound-names -fnative-types -fskeletons-copy $(ASN1_RRC_SPEC_DIR)/EUTRA-RRC-Definitions.asn $(RRC_RRM_ASN1_DIR)/rrc-rrm.asn; cd -
cd $(RRC_RRM_ASN1_DIR);asn1c -gen-PER -fno-include-deps -fcompound-names -fnative-types -fskeletons-copy $(ASN1_RRC_SPEC_DIR)/EUTRA-RRC-Definitions.asn $(RRC_RRM_ASN1_DIR)/rrc-rrm.asn; cd -
libs:
make -j$(NUM_PROC) libasn1rrc libsqlite libSockets
all: libs
make -j$(NUM_PROC) $(PROGS)
rrm: $(RRM_OBJS) lib/libSockets.a lib/libasn1rrc.a
g++ -o $@ $^ $(LIBS)
mv rrm $(BIN_DIR)
rrm_exe: clean_test_objs
make -j$(NUM_PROC) rrm
clean_test_objs:
find $(COM_DIR)/rrc/ -name '*Response.o' -delete -print;
find $(COM_DIR)/rrc/ -name '*Reconfiguration.o' -delete -print;
dummy_rrc: CFLAGS += -DTEST_SCENARIO=1
dummy_rrc: $(TEST_OBJS) lib/libSockets.a lib/libasn1rrc.a
g++ -o $@ $^ $(LIBS)
mv dummy_rrc $(BIN_DIR)
test_exe: clean_test_objs
make -j$(NUM_PROC) dummy_rrc
clean:
find -name '*.o' -delete -print; \
find -name '*.bak' -delete -print; \
find -name '*.d' -delete -print; \
find -name '*~' -delete -print; \
rm -f bin/*; \
rm -f lib/*
cleanrrm:
find src/com/rrc -name '*.o' -delete -print; \
find src/com/rrm -name '*.o' -delete -print; \
find src/com -name 'Message.o' -delete -print; \
find src/radio_resources -name '*.o' -delete -print; \
find src/com -name '*.bak' -delete -print; \
find src/radio_resources -name '*.bak' -delete -print; \
find src/com -name '*.d' -delete -print; \
find src/radio_resources -name '*.d' -delete -print; \
find src/com -name '*~' -delete -print; \
find src/radio_resources -name '*~' -delete -print; \
rm -f bin/*; \
-include *.d
CXX = g++-4.3
CFLAGS += -Wall -g $(INCLUDE) -MD -D_VERSION='"$(VERSION)"'
# turn off optimization if compiling with gcc 2.9.x:
#CFLAGS += -O0
#CFLAGS += -O2
CFLAGS += -DLINUX
#LG TEST REMOVECFLAGS += -fPIC
LIBS += \
-lssl -lcrypto \
-lpthread
LDFLAGSSO = -shared \
-Wl,-lssl \
-Wl,-lcrypto \
-Wl,-lxml2 \
-Wl,-lpthread \
-Wl,-h$(SONAME) \
-Wl,-call_shared
CXX = g++
CFLAGS += -Wall -g $(INCLUDE) -MD -D_VERSION='"$(VERSION)"'
# turn off optimization if compiling with gcc 2.9.x:
#CFLAGS += -O0
CFLAGS += -O2
CFLAGS += -DLINUX -m64
CFLAGS += -fPIC
LIBS += \
-lssl -lcrypto \
-lpthread
OBJS += Semaphore.o
LDFLAGSSO = -shared \
-Wl,-lssl \
-Wl,-lcrypto \
-Wl,-lxml2 \
-Wl,-lpthread \
-Wl,-h$(SONAME) \
-Wl,-call_shared
SUBDIRS = src
EXTRA_DIST = README ChangeLog AUTHORS COPYING INSTALL NEWS
rrm$(EXEEXT):
$(MAKE) -C src $@
default: all
all:
autoreconf -i
clean:
rm -r aclocal.m4 autom4te.cache/ config.* configure depcomp install-sh missing src/config.h.in ltmain.sh INSTALL ; \
find . -name Makefile.in -exec rm '{}' ';'
This diff is collapsed.
###################################
To compile rrm
###################################
cd in this directory
make libs
make rrm_exe
rrm executable is in ./bin
###################################
To compile dummy_rrc
###################################
cd in this directory
make libs
make test_exe
dummy_rrc executable is in ./bin
dnl Process this file with autoconf to produce a configure script.
AC_INIT(Radio Resource Manager, 0.1.0)
AC_CONFIG_SRCDIR(src/rrm.cpp)
AC_CANONICAL_SYSTEM
dnl create an config-header
AC_CONFIG_HEADER(src/config.h)
dnl enable automake-support
AM_INIT_AUTOMAKE([gnu dist-zip tar-ustar dist-bzip2])
AC_DEFINE([OUTPUT_ACCURACY], [2], [defines the number of digits after the comma in output])
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
dnl enable libtool-support
dnl gives a deprecated warning for RANLIB with newer libtools
AC_PROG_RANLIB
AM_PROG_LIBTOOL
dnl Check for enable-features that shall go into config.h
dnl ... for xerces 3.0
PKG_CHECK_MODULES([XERCES], [xerces-c >= 3.0],
[AC_DEFINE([XERCES3_SIZE_t],[XMLSize_t],[Define length for Xerces 3.])],
[AC_DEFINE([XERCES3_SIZE_t],[unsigned int],[Define length for Xerces 2.])])
AM_CONDITIONAL([WITH_VERSION_H], test -f .svn/entries)
if test -f .svn/entries; then
AC_DEFINE([HAVE_VERSION_H], [1], [Define if auto-generated version.h should be used.])
else
AC_DEFINE_UNQUOTED(VERSION_STRING, "$PACKAGE_VERSION", [Defined if auto-generated version.h is unavailable.])
fi
dnl ---------------------------------------------
dnl check for libraries...
dnl - - - - - - - - - - - - - - - - - - - - - - -
dnl ... for xerces
AC_ARG_WITH([xerces], [AS_HELP_STRING([--with-xerces=DIR],[where Xerces-C is installed (libraries in DIR/lib, headers in DIR/include).])])
if test x"$with_xerces" != x; then
if test x"$with_xerces_libraries" = x; then
with_xerces_libraries=$with_xerces/lib
fi
if test x"$with_xerces_includes" = x; then
with_xerces_includes=$with_xerces/include
fi
fi
dnl ... for libs
LIB_XERCES="xerces-c"
AC_ARG_WITH([xerces-libraries], [AS_HELP_STRING([--with-xerces-libraries=DIR],[where the Xerces-C library is installed.])])
if test x"$with_xerces_libraries" = x; then
AC_CHECK_LIB([$LIB_XERCES], [main], [true],
[AC_MSG_ERROR([xerces-lib not found. Specify path with option --with-xerces-libraries=DIR.])])
else
save_ldflags=$LDFLAGS
LDFLAGS="-L$with_xerces_libraries"
export LDFLAGS
AC_CHECK_LIB([$LIB_XERCES], [main], [XERCES_LDFLAGS=$LDFLAGS],
[AC_MSG_ERROR([xerces-lib not found in "$with_xerces_libraries".])])
LDFLAGS=$save_ldflags
AC_SUBST(XERCES_LDFLAGS)
fi
AC_SUBST(LIB_XERCES)
dnl ... for includes
AC_ARG_WITH([xerces-includes], [AS_HELP_STRING([--with-xerces-includes=DIR],[where the Xerces-C includes are.])])
save_cppflags=$CPPFLAGS
if test x"$with_xerces_includes" = x; then
CPPFLAGS="$CPPFLAGS -I/usr/local/include -I/usr/include"
export CPPFLAGS
AC_CHECK_HEADER([xercesc/util/XercesVersion.hpp], [AM_CPPFLAGS="$CPPFLAGS $AM_CPPFLAGS"],
[AC_MSG_ERROR([xerces-includes not found. Specify path with option --with-xerces-includes=DIR.])])
else
CPPFLAGS="-I$with_xerces_includes"
export CPPFLAGS
AC_CHECK_HEADER([xercesc/util/XercesVersion.hpp], [AM_CPPFLAGS="$CPPFLAGS $AM_CPPFLAGS"],
[AC_MSG_ERROR([xerces-includes not found in "$with_xerces_includes".])])
fi
CPPFLAGS=$save_cppflags
AM_CPPFLAGS="-I$PWD/$srcdir/src $AM_CPPFLAGS"
AC_SUBST(AM_CPPFLAGS)
AC_SUBST(AM_CXXFLAGS)
dnl ---------------------------------------------
dnl Checks proposed by autoscan.
dnl Checks for header files.
AC_FUNC_ALLOCA
AC_HEADER_STDC
AC_CHECK_HEADERS([float.h limits.h malloc.h math.h stddef.h stdlib.h string.h sys/time.h unistd.h wchar.h])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
AC_C_VOLATILE
dnl Checks for library functions.
AC_FUNC_ERROR_AT_LINE
AC_FUNC_MALLOC
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_CHECK_FUNCS([floor getcwd gettimeofday memset pow select socket sqrt])
dnl ---------------------------------------------
dnl add here all your Makefiles. These will be created by configure
AC_CONFIG_FILES([
src/Makefile
src/com/Makefile
src/foreign/Makefile
src/foreign/sockets-2.3.9.4/Makefile
src/foreign/sql/Makefile
src/foreign/tcpip/Makefile
src/utils/Makefile
src/utils/options/Makefile
Makefile])
AC_OUTPUT
dnl ---------------------------------------------
dnl Summary
AC_MSG_RESULT()
This diff is collapsed.
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef _MESSAGE_H_
# define _MESSAGE_H_
# include <string>
# include <cstring>
# include "socket_include.h"
# include "storage.h"
# include "platform.h"
#define MESSAGE_DESERIALIZE_BUFFER_SIZE 2048
#define MESSAGE_SERIALIZE_BUFFER_SIZE 2048
class Message
{
public:
typedef std::pair<std::string,int> e_nodeb_internet_address_id_t;
//============ STATUS ======================
static const msg_response_status_t STATUS_CONNECTION_ACCEPTED = 1;
static const msg_response_status_t STATUS_CONNECTION_FAILED = -1;
static const msg_response_status_t STATUS_ADD_USER_SUCCESSFULL = 2;
static const msg_response_status_t STATUS_ADD_USER_FAILED = -2;
static const msg_response_status_t STATUS_REMOVE_USER_SUCCESSFULL = 3;
static const msg_response_status_t STATUS_REMOVE_USER_FAILED = -3;
static const msg_response_status_t STATUS_ADD_RADIO_ACCESS_BEARER_SUCCESSFULL = 4;
static const msg_response_status_t STATUS_ADD_RADIO_ACCESS_BEARER_FAILED = -4;
static const msg_response_status_t STATUS_REMOVE_RADIO_ACCESS_BEARER_SUCCESSFULL = 5;
static const msg_response_status_t STATUS_REMOVE_RADIO_ACCESS_BEARER_FAILED = -5;
//============ MESSAGES ======================
static const msg_type_t MESSAGE_CONNECTION_REQUEST = 0;
static const msg_type_t MESSAGE_CONNECTION_RESPONSE = 1;
static const msg_type_t MESSAGE_CONNECTION_CLOSE = 2;
static const msg_type_t MESSAGE_CONNECTION_CLOSE_ACK = 3;
static const msg_type_t MESSAGE_ADD_USER_REQUEST = 4;
static const msg_type_t MESSAGE_ADD_USER_RESPONSE = 5;
static const msg_type_t MESSAGE_ADD_USER_CONFIRM = 6;
static const msg_type_t MESSAGE_REMOVE_USER_REQUEST = 7;
static const msg_type_t MESSAGE_REMOVE_USER_RESPONSE = 8;
static const msg_type_t MESSAGE_ADD_RADIO_ACCESS_BEARER_REQUEST = 9;
static const msg_type_t MESSAGE_ADD_RADIO_ACCESS_BEARER_RESPONSE = 10;
static const msg_type_t MESSAGE_ADD_RADIO_ACCESS_BEARER_CONFIRM = 11;
static const msg_type_t MESSAGE_REMOVE_RADIO_ACCESS_BEARER_REQUEST = 12;
static const msg_type_t MESSAGE_REMOVE_RADIO_ACCESS_BEARER_RESPONSE = 13;
static const msg_type_t MESSAGE_MEASUREMENT_REQUEST = 14;
static const msg_type_t MESSAGE_L1_MEASUREMENT_RG_INTERNAL_REPORT = 15;
static const msg_type_t MESSAGE_L1_MEASUREMENT_RG_QUALITY_REPORT = 16;
static const msg_type_t MESSAGE_L1_MEASUREMENT_RG_TRAFFIC_VOLUME_REPORT = 17;
static const msg_type_t MESSAGE_L1_MEASUREMENT_RG_PHYSICAL_CHANNEL_DATA_AMP_REPORT = 18;
static const msg_type_t MESSAGE_L1_MEASUREMENT_MT_INTERNAL_REPORT = 19;
static const msg_type_t MESSAGE_L1_MEASUREMENT_MT_QUALITY_REPORT = 20;
static const msg_type_t MESSAGE_L1_MEASUREMENT_MT_TRAFFIC_VOLUME_REPORT = 21;
static const msg_type_t MESSAGE_L1_MEASUREMENT_MT_INTRA_FREQUENCY_REPORT = 22;
static const msg_type_t MESSAGE_UPLINK_PHYSICAL_CHANNEL_CONTROL = 23;
static const msg_type_t MESSAGE_CONFIG_REQUEST = 24;
static const msg_type_t MESSAGE_ACK = 25;
static const msg_type_t MESSAGE_UPDATE_DSCH = 26;
//============ REASONS ======================
static const msg_response_reason_t MSG_RESP_OK = 0;
static const msg_response_reason_t MSG_RESP_PROTOCOL_ERROR = 1;
static const msg_response_reason_t MSG_RESP_RESSOURCES_UNAVAILABLE = 2;
static const msg_response_reason_t MSG_RESP_UNKNOWN_MESSAGE = 128;
static const msg_response_reason_t MSG_RESP_INTERNAL_ERROR = 255;
static uint8_t s_buffer[MESSAGE_DESERIALIZE_BUFFER_SIZE];
Message ();
Message(tcpip::Storage&);
virtual void Serialize () {};
virtual void Forward () {};
virtual void Serialize (char *out_bufferP, size_t* size_dataP) {};
static Message *DeserializeRRCMessage(const char *in_bufferP,size_t size_dataP,struct sockaddr *sa_fromP,socklen_t sa_lenP);
static Message *DeserializeRRMMessage(const char *in_bufferP,size_t size_dataP,struct sockaddr *sa_fromP,socklen_t sa_lenP);
static Message *Deserialize (const char *in_bufferP,size_t size_dataP,struct sockaddr *sa_fromP,socklen_t sa_lenP);
void ParseIpParameters(struct sockaddr *sa_fromP,socklen_t sa_lenP);
msg_length_t GetSerializedMessageSize();
const char* GetSerializedMessageBuffer();
const int GetSrcPort() {
return m_port_src;
};
const char* GetSrcAddress() {
return m_ip_char_src;
};
virtual ~ Message ();
static std::string StatusToString(msg_response_status_t);
static std::string ReasonToString(msg_response_reason_t);
protected:
msg_type_t m_type;
bool m_is_ipv6;
struct sockaddr_in m_sockaddr_in4_src;
struct sockaddr_in6 m_sockaddr_in6_src;
std::string m_ip_str_src;
char* m_ip_char_src;
int m_port_src;
tcpip::Storage m_message_storage;
unsigned char* m_message_buffer;
msg_length_t m_msg_length;
uint8_t m_message_serialize_buffer[MESSAGE_SERIALIZE_BUFFER_SIZE];
//uint8_t m_message_serialize_buffer[MESSAGE_DESERIALIZE_BUFFER_SIZE];
};
# endif
\ No newline at end of file
RRM-RRC-Definitions DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
IMPORTS
DRB-Identity,
PhysCellId,
RadioResourceConfigDedicated,
RRCConnectionReconfiguration-r8-IEs,
RRCConnectionReconfigurationComplete-r8-IEs,
SystemInformation,
SystemInformationBlockType1,
SystemInformationBlockType2 FROM EUTRA-RRC-Definitions;
RRC-RRM-Message ::= SEQUENCE {
message RRC-RRM-MessageType
}
RRC-RRM-MessageType ::= CHOICE {
c1 CHOICE {
rrcSystemConfigurationRequest RRCSystemConfigurationRequest,
rrcAddUserRequest RRCAddUserRequest,
rrcAddUserConfirm RRCAddUserConfirm,
rrcAddDataRadioBearerRequest RRCAddDataRadioBearerRequest,
rrcAddDataRadioBearerConfirm RRCAddDataRadioBearerConfirm,
rrcRemoveUserRequest RRCRemoveUserRequest,
rrcRemoveDataRadioBearerRequest RRCRemoveDataRadioBearerRequest,
rrcRemoveDataRadioBearerConfirm RRCRemoveDataRadioBearerConfirm,
rrcUserReconfigurationComplete RRCUserReconfigurationComplete
},
messageClassExtension SEQUENCE {}
}
RRCSystemConfigurationRequest ::= SEQUENCE {
transactionId TransactionId
}
RRCAddUserRequest ::= SEQUENCE {
transactionId TransactionId,
e-NodeB-Identity E-NodeB-Identity,
c-RNTI OpenAir-C-RNTI
}
RRCAddUserConfirm ::= SEQUENCE {
transactionId TransactionId,
e-NodeB-Identity E-NodeB-Identity,
c-RNTI OpenAir-C-RNTI
}
RRCAddDataRadioBearerRequest ::= SEQUENCE {
transactionId TransactionId,
e-NodeB-Identity E-NodeB-Identity,
c-RNTI OpenAir-C-RNTI,
drb-Identity DRB-Identity,
applicationTrafficClass OpenAir-Application-TrafficClass,
applicationPacketDelay OpenAir-Application-ms-PacketDelay,
guaranted-bit-rate-uplink OpenAir-ApplicationKBitRate,
max-bit-rate-uplink OpenAir-ApplicationKBitRate,
guaranted-bit-rate-downlink OpenAir-ApplicationKBitRate,
max-bit-rate-downlink OpenAir-ApplicationKBitRate
}
RRCAddDataRadioBearerConfirm ::= SEQUENCE {
transactionId TransactionId,
e-NodeB-Identity E-NodeB-Identity,
c-RNTI OpenAir-C-RNTI,
drb-Identity DRB-Identity
}
RRCRemoveUserRequest ::= SEQUENCE {
transactionId TransactionId,
e-NodeB-Identity E-NodeB-Identity,
c-RNTI OpenAir-C-RNTI
}
RRCRemoveDataRadioBearerRequest ::= SEQUENCE {
transactionId TransactionId,
e-NodeB-Identity E-NodeB-Identity,
c-RNTI OpenAir-C-RNTI,
drb-Identity DRB-Identity
}
RRCRemoveDataRadioBearerConfirm ::= SEQUENCE {
transactionId TransactionId,
e-NodeB-Identity E-NodeB-Identity,
c-RNTI OpenAir-C-RNTI,
drb-Identity DRB-Identity
}
RRCUserReconfigurationComplete ::= SEQUENCE {
transactionId TransactionId,
e-NodeB-Identity E-NodeB-Identity,
c-RNTI OpenAir-C-RNTI
}
RRM-RRC-Message ::= SEQUENCE {
message RRM-RRC-MessageType
}
RRM-RRC-MessageType ::= CHOICE {
c1 CHOICE {
rrcSystemConfigurationResponse RRCSystemConfigurationResponse,
rrcAddUserResponse RRCAddUserResponse,
rrcAddDataRadioBearerResponse RRCAddDataRadioBearerResponse,
rrcRemoveUserResponse RRCRemoveUserResponse,
rrcRemoveDataRadioBearerResponse RRCRemoveDataRadioBearerResponse,
rrcUserReconfiguration RRCUserReconfiguration
},
messageClassExtension SEQUENCE {}
}
RRCSystemConfigurationResponse ::= SEQUENCE {
transactionId TransactionId,
rrm-Response-Status OpenAir-RRM-Response-Status,
rrm-Response-Reason OpenAir-RRM-Response-Reason,
e-NodeB-Identity E-NodeB-Identity,
systemInformationBlockType1 SystemInformationBlockType1 OPTIONAL,
systemInformation SystemInformation OPTIONAL
}
RRCAddUserResponse ::= SEQUENCE {
transactionId TransactionId,
rrm-Response-Status OpenAir-RRM-Response-Status,
rrm-Response-Reason OpenAir-RRM-Response-Reason,
e-NodeB-Identity E-NodeB-Identity,
c-RNTI OpenAir-C-RNTI,
radioResourceConfigDedicatedE-NodeB RadioResourceConfigDedicated OPTIONAL,
radioResourceConfigDedicatedMobile RadioResourceConfigDedicated OPTIONAL
}
RRCAddDataRadioBearerResponse ::= SEQUENCE {
transactionId TransactionId,
rrm-Response-Status OpenAir-RRM-Response-Status,
rrm-Response-Reason OpenAir-RRM-Response-Reason,
e-NodeB-Identity E-NodeB-Identity,
c-RNTI OpenAir-C-RNTI,
-- MAY BE USELESS SINCE INCLUDED IN RadioResourceConfigDedicated drb-Identity DRB-Identity,
radioResourceConfigDedicatedE-NodeB RadioResourceConfigDedicated OPTIONAL,
radioResourceConfigDedicatedMobile RadioResourceConfigDedicated OPTIONAL
}
RRCRemoveUserResponse ::= SEQUENCE {
transactionId TransactionId,
rrm-Response-Status OpenAir-RRM-Response-Status,
rrm-Response-Reason OpenAir-RRM-Response-Reason,
e-NodeB-Identity E-NodeB-Identity,
c-RNTI OpenAir-C-RNTI,
radioResourceConfigDedicatedE-NodeB RadioResourceConfigDedicated OPTIONAL,
radioResourceConfigDedicatedMobile RadioResourceConfigDedicated OPTIONAL
}
RRCRemoveDataRadioBearerResponse ::= SEQUENCE {
transactionId TransactionId,
rrm-Response-Status OpenAir-RRM-Response-Status,
rrm-Response-Reason OpenAir-RRM-Response-Reason,
e-NodeB-Identity E-NodeB-Identity,
c-RNTI OpenAir-C-RNTI,
radioResourceConfigDedicatedE-NodeB RadioResourceConfigDedicated OPTIONAL,
radioResourceConfigDedicatedMobile RadioResourceConfigDedicated OPTIONAL
}
RRCUserReconfiguration ::= SEQUENCE {
transactionId TransactionId,
rrm-Response-Status OpenAir-RRM-Response-Status,
rrm-Response-Reason OpenAir-RRM-Response-Reason,
e-NodeB-Identity E-NodeB-Identity,
c-RNTI OpenAir-C-RNTI,
radioResourceConfigDedicatedE-NodeB RadioResourceConfigDedicated OPTIONAL,
radioResourceConfigDedicatedMobile RadioResourceConfigDedicated OPTIONAL
}
E-NodeB-Identity ::= SEQUENCE {
physCellId PhysCellId
}
TransactionId ::= INTEGER (0..255)
OpenAir-C-RNTI ::= INTEGER (0..255)
OpenAir-ApplicationKBitRate ::= INTEGER (0..100000)
OpenAir-Application-ms-PacketDelay ::= INTEGER (0..10000)
OpenAir-Application-TrafficClass ::= INTEGER (0..255)
OpenAir-RRM-Response-Reason ::= ENUMERATED {
ok, protocolError, ressourcesUnavailable, malformedMessage, unknownMessage, internalError }
OpenAir-RRM-Response-Status ::= ENUMERATED {
success, warning, failure }
END
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <stdio.h>
#include "RRC2RRMMessageAddRadioAccessBearerConfirm.h"
#include "RRCMessageHandler.h"
#include "RadioResources.h"
#include "Exceptions.h"
//----------------------------------------------------------------------------
RRC2RRMMessageAddRadioAccessBearerConfirm::RRC2RRMMessageAddRadioAccessBearerConfirm(std::string ip_dest_strP, int port_destP,
cell_id_t cell_idP,
mobile_id_t mobile_idP,
rb_id_t radio_bearer_idP,
transaction_id_t transaction_idP)
//----------------------------------------------------------------------------
{
Message();
m_is_ipv6 = Utility::isipv6(ip_dest_strP);
m_cell_id = cell_idP;
m_mobile_id = mobile_idP;
m_radio_bearer_id = radio_bearer_idP;
m_transaction_id = transaction_idP;
}
//----------------------------------------------------------------------------
RRC2RRMMessageAddRadioAccessBearerConfirm::RRC2RRMMessageAddRadioAccessBearerConfirm(tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP):
Message(in_messageP)
//----------------------------------------------------------------------------
{
ParseIpParameters(sa_fromP, sa_lenP);
/* if (m_is_ipv6) {
printf("[RRM][RRC2RRMMessageAddRadioAccessBearerConfirm] (IPv6) Received %d bytes from: %s:%d\n", msg_lengthP, m_ip_char_src, m_port_src);
} else {
printf("[RRM][RRC2RRMMessageAddRadioAccessBearerConfirm] (IPv4) Received %d bytes from: %s:%d\n", msg_lengthP, m_ip_char_src, m_port_src);
}*/
m_cell_id = m_message_storage.readChar();
m_mobile_id = m_message_storage.readChar();
m_radio_bearer_id = m_message_storage.readChar();
m_transaction_id = m_message_storage.readChar();
printf("----------------------------------------------------------------------------------------------------------\n");
printf("RRC\t-------ADD DATA RADIO BEARER CONFIRM------->\tRRM\n");
printf("----------------------------------------------------------------------------------------------------------\n");
printf("cell id = %d mobile id = %d radio bearer id = %d transaction id = %d \n", m_cell_id, m_mobile_id, m_radio_bearer_id, m_transaction_id);
}
//----------------------------------------------------------------------------
void RRC2RRMMessageAddRadioAccessBearerConfirm::Forward()
//----------------------------------------------------------------------------
{
try {
Transaction* tx = RadioResources::Instance()->Request(*this);
if (tx != NULL) {
delete tx;
}
} catch (std::exception const& e ) {
}
}
//----------------------------------------------------------------------------
void RRC2RRMMessageAddRadioAccessBearerConfirm::Serialize()
//----------------------------------------------------------------------------
{
m_message_storage.reset();
m_message_storage.writeChar(Message::MESSAGE_ADD_RADIO_ACCESS_BEARER_CONFIRM);
m_message_storage.writeShort(7u);
m_message_storage.writeChar(m_cell_id);
m_message_storage.writeChar(m_mobile_id);
m_message_storage.writeChar(m_radio_bearer_id);
m_message_storage.writeChar(m_transaction_id);
}
//----------------------------------------------------------------------------
RRC2RRMMessageAddRadioAccessBearerConfirm::~RRC2RRMMessageAddRadioAccessBearerConfirm()
//----------------------------------------------------------------------------
{
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef _RRC2RRMMESSAGEADDRADIOACCESSBEARERCONFIRM_H
# define _RRC2RRMMESSAGEADDRADIOACCESSBEARERCONFIRM_H
# include "Message.h"
# include "storage.h"
# include "platform.h"
class RRC2RRMMessageAddRadioAccessBearerConfirm: public Message
{
public:
RRC2RRMMessageAddRadioAccessBearerConfirm(std::string ip_dest_strP, int port_destP,
cell_id_t cell_idP,
mobile_id_t mobile_idP,
rb_id_t radio_bearer_idP,
transaction_id_t transaction_idP);
RRC2RRMMessageAddRadioAccessBearerConfirm (tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP);
~RRC2RRMMessageAddRadioAccessBearerConfirm ();
void Serialize ();
void Forward();
const unsigned int GetENodeBId() {
return m_cell_id;
}
const mobile_id_t GetMobileId() {
return m_mobile_id;
}
const rb_id_t GetRadioBearerId() {
return m_radio_bearer_id;
}
const transaction_id_t GetTransactionId() {
return m_transaction_id;
}
private:
cell_id_t m_cell_id;
mobile_id_t m_mobile_id;
rb_id_t m_radio_bearer_id;
transaction_id_t m_transaction_id;
};
#endif
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <stdio.h>
#include "RRC2RRMMessageAddRadioAccessBearerRequest.h"
#include "RRM2RRCMessageAddRadioAccessBearerResponse.h"
#include "RRCMessageHandler.h"
#include "RadioResources.h"
#include "Exceptions.h"
//----------------------------------------------------------------------------
RRC2RRMMessageAddRadioAccessBearerRequest::RRC2RRMMessageAddRadioAccessBearerRequest(std::string ip_dest_strP, int port_destP,
cell_id_t cell_idP,
mobile_id_t mobile_idP,
rb_id_t radio_bearer_idP,
unsigned short traffic_classP,
unsigned short delayP,
unsigned int guaranted_bit_rate_uplinkP,
unsigned int max_bit_rate_uplinkP,
unsigned int guaranted_bit_rate_downlinkP,
unsigned int max_bit_rate_downlinkP,
transaction_id_t transaction_idP)
//----------------------------------------------------------------------------
{
Message();
m_is_ipv6 = Utility::isipv6(ip_dest_strP);
m_cell_id = cell_idP;
m_mobile_id = mobile_idP;
m_radio_bearer_id = radio_bearer_idP;
m_traffic_class = traffic_classP;
m_delay = delayP;
m_guaranted_bit_rate_uplink = guaranted_bit_rate_uplinkP;
m_max_bit_rate_uplink = max_bit_rate_uplinkP;
m_guaranted_bit_rate_downlink = guaranted_bit_rate_downlinkP;
m_max_bit_rate_downlink = max_bit_rate_downlinkP;
m_transaction_id = transaction_idP;
}
//----------------------------------------------------------------------------
RRC2RRMMessageAddRadioAccessBearerRequest::RRC2RRMMessageAddRadioAccessBearerRequest(tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP):
Message(in_messageP)
//----------------------------------------------------------------------------
{
ParseIpParameters(sa_fromP, sa_lenP);
m_cell_id = m_message_storage.readChar();
m_mobile_id = m_message_storage.readChar();
m_radio_bearer_id = m_message_storage.readChar();
m_traffic_class = m_message_storage.readShort();
m_delay = m_message_storage.readShort();
m_guaranted_bit_rate_uplink = m_message_storage.readInt();
m_max_bit_rate_uplink = m_message_storage.readInt();
m_guaranted_bit_rate_downlink = m_message_storage.readInt();
m_max_bit_rate_downlink = m_message_storage.readInt();
m_transaction_id = m_message_storage.readChar();
printf("----------------------------------------------------------------------------------------------------------\n");
printf("RRC\t-------ADD DATA RADIO BEARER REQUEST------->\tRRM\n");
printf("----------------------------------------------------------------------------------------------------------\n");
printf("cell id = %d mobile id = %d radio bearer id = %d transaction id = %d \n", m_cell_id, m_mobile_id, m_radio_bearer_id, m_transaction_id);
}
//----------------------------------------------------------------------------
void RRC2RRMMessageAddRadioAccessBearerRequest::Forward()
//----------------------------------------------------------------------------
{
try {
Transaction* tx = RadioResources::Instance()->Request(*this);
RRM2RRCMessageAddRadioAccessBearerResponse response(Message::STATUS_ADD_RADIO_ACCESS_BEARER_SUCCESSFULL, Message::MSG_RESP_OK, m_cell_id, m_mobile_id, m_radio_bearer_id, m_transaction_id, tx);
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
} catch (mobile_already_connected_error & x ) {
RRM2RRCMessageAddRadioAccessBearerResponse response(Message::STATUS_ADD_RADIO_ACCESS_BEARER_FAILED, Message::MSG_RESP_PROTOCOL_ERROR, m_cell_id, m_mobile_id, m_radio_bearer_id, m_transaction_id);
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
} catch (std::exception const& e ) {
RRM2RRCMessageAddRadioAccessBearerResponse response(Message::STATUS_ADD_RADIO_ACCESS_BEARER_FAILED, Message::MSG_RESP_INTERNAL_ERROR, m_cell_id, m_mobile_id, m_radio_bearer_id, m_transaction_id);
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
}
}
//----------------------------------------------------------------------------
void RRC2RRMMessageAddRadioAccessBearerRequest::Serialize()
//----------------------------------------------------------------------------
{
m_message_storage.reset();
m_message_storage.writeChar(Message::MESSAGE_ADD_RADIO_ACCESS_BEARER_REQUEST);
m_message_storage.writeShort(27u);
m_message_storage.writeChar(m_cell_id);
m_message_storage.writeChar(m_mobile_id);
m_message_storage.writeChar(m_radio_bearer_id);
m_message_storage.writeShort(m_traffic_class);
m_message_storage.writeShort(m_delay);
m_message_storage.writeInt(m_guaranted_bit_rate_uplink);
m_message_storage.writeInt(m_max_bit_rate_uplink);
m_message_storage.writeInt(m_guaranted_bit_rate_downlink);
m_message_storage.writeInt( m_max_bit_rate_downlink);
m_message_storage.writeChar(m_transaction_id);
}
//----------------------------------------------------------------------------
RRC2RRMMessageAddRadioAccessBearerRequest::~RRC2RRMMessageAddRadioAccessBearerRequest()
//----------------------------------------------------------------------------
{
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef _RRC2RRMMESSAGEADDRADIOACCESSBEARERREQUEST_H
# define _RRC2RRMMESSAGEADDRADIOACCESSBEARERREQUEST_H
# include "Message.h"
# include "storage.h"
# include "platform.h"
class RRC2RRMMessageAddRadioAccessBearerRequest: public Message
{
public:
RRC2RRMMessageAddRadioAccessBearerRequest(std::string ip_dest_strP, int port_destP,
cell_id_t cell_idP,
mobile_id_t mobile_idP,
rb_id_t radio_bearer_idP,
unsigned short traffic_classP,
unsigned short delayP,
unsigned int guaranted_bit_rate_uplinkP,
unsigned int max_bit_rate_uplinkP,
unsigned int guaranted_bit_rate_downlinkP,
unsigned int max_bit_rate_downlinkP,
transaction_id_t transaction_idP);
RRC2RRMMessageAddRadioAccessBearerRequest (tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP);
~RRC2RRMMessageAddRadioAccessBearerRequest ();
void Serialize ();
void Forward();
const unsigned int GetENodeBId() {
return m_cell_id;
}
const mobile_id_t GetMobileId() {
return m_mobile_id;
}
const rb_id_t GetRadioBearerId() {
return m_radio_bearer_id;
}
const transaction_id_t GetTransactionId() {
return m_transaction_id;
}
const unsigned short GetTrafficClass() {
return m_traffic_class;
}
const unsigned short GetDelay() {
return m_delay;
}
const unsigned int GetGuarantedBitRateUplink() {
return m_guaranted_bit_rate_uplink;
}
const unsigned int GetMaxBitRateUplink() {
return m_max_bit_rate_uplink;
}
const unsigned int GetGuarantedBitRateDownlink() {
return m_guaranted_bit_rate_downlink;
}
const unsigned int GetMaxBitRateDownlink() {
return m_max_bit_rate_downlink;
}
private:
cell_id_t m_cell_id;
mobile_id_t m_mobile_id;
rb_id_t m_radio_bearer_id;
unsigned short m_traffic_class;
unsigned short m_delay;
unsigned int m_guaranted_bit_rate_uplink;
unsigned int m_max_bit_rate_uplink;
unsigned int m_guaranted_bit_rate_downlink;
unsigned int m_max_bit_rate_downlink;
transaction_id_t m_transaction_id;
};
#endif
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <iostream>
#include <sstream>
#include <exception>
#include <stdexcept>
#include <stdio.h>
//----------------------------------------------------------------------------
#include "RRC2RRMMessageAddUserConfirm.h"
#include "RRM2RRCMessageUserReconfiguration.h"
#include "RRCMessageHandler.h"
#include "RadioResources.h"
#include "Exceptions.h"
//----------------------------------------------------------------------------
RRC2RRMMessageAddUserConfirm::RRC2RRMMessageAddUserConfirm(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRC_RRM_Message_t* asn1_messageP)
//----------------------------------------------------------------------------
{
Message();
ParseIpParameters(sa_fromP, sa_lenP);
m_asn1_message = asn1_messageP;
m_transaction_id = m_asn1_message->message.choice.c1.choice.rrcAddUserConfirm.transactionId;
m_cell_id = m_asn1_message->message.choice.c1.choice.rrcAddUserConfirm.e_NodeB_Identity.physCellId;
m_mobile_id = m_asn1_message->message.choice.c1.choice.rrcAddUserConfirm.c_RNTI;
}
//----------------------------------------------------------------------------
RRC2RRMMessageAddUserConfirm::RRC2RRMMessageAddUserConfirm(std::string ip_dest_strP, int port_destP, cell_id_t cell_idP, mobile_id_t mobile_idP, transaction_id_t transaction_idP)
//----------------------------------------------------------------------------
{
Message();
m_asn1_message = static_cast<RRC_RRM_Message_t*>(CALLOC(1,sizeof(RRC_RRM_Message_t)));
memset(m_asn1_message, 0, sizeof(RRC_RRM_Message_t));
m_asn1_message->message.present = RRC_RRM_MessageType_PR_c1;
m_asn1_message->message.choice.c1.present = RRC_RRM_MessageType__c1_PR_rrcAddUserConfirm;
m_asn1_message->message.choice.c1.choice.rrcAddUserConfirm.transactionId = transaction_idP;
m_asn1_message->message.choice.c1.choice.rrcAddUserConfirm.e_NodeB_Identity.physCellId = cell_idP;
m_asn1_message->message.choice.c1.choice.rrcAddUserConfirm.c_RNTI = mobile_idP;
m_transaction_id = transaction_idP;
m_cell_id = cell_idP;
m_mobile_id = mobile_idP;
m_is_ipv6 = Utility::isipv6(ip_dest_strP);
m_msg_length = 0;
Serialize();
}
//----------------------------------------------------------------------------
void RRC2RRMMessageAddUserConfirm::Forward()
//----------------------------------------------------------------------------
{
try {
RRM2RRCMessageUserReconfiguration* user_reconfiguration = RadioResources::Instance()->Request(*this);
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, user_reconfiguration->GetSerializedMessageBuffer(), user_reconfiguration->GetSerializedMessageSize());
delete user_reconfiguration;
} catch (std::exception const& e ) {
RRM2RRCMessageUserReconfiguration response(OpenAir_RRM_Response_Status_failure, OpenAir_RRM_Response_Reason_internalError, m_cell_id, m_mobile_id, m_transaction_id);
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
}
}
//----------------------------------------------------------------------------
void RRC2RRMMessageAddUserConfirm::Serialize ()
//----------------------------------------------------------------------------
{
if (m_asn1_message != NULL) {
asn_enc_rval_t enc_rval;
memset(&m_message_serialize_buffer[0], 0, MESSAGE_SERIALIZE_BUFFER_SIZE);
enc_rval = uper_encode_to_buffer(&asn_DEF_RRC_RRM_Message,
(void*)m_asn1_message,
&m_message_serialize_buffer[0],
MESSAGE_SERIALIZE_BUFFER_SIZE);
cout << "[RRM][RRC2RRMMessageAddUserConfirm] asn_DEF_RRC_RRM_Message Encoded " << enc_rval.encoded << " bits (" << (enc_rval.encoded+7)/8 << " bytes)" << endl;
m_msg_length = (enc_rval.encoded+7)/8;
if (enc_rval.encoded==-1) {
cerr << "[RRM][RRC2RRMMessageAddUserConfirm] ASN1 : asn_DEF_RRC_RRM_Message encoding FAILED, EXITING" << endl;
throw asn1_encoding_error();
}
}
}
//----------------------------------------------------------------------------
RRC2RRMMessageAddUserConfirm::~RRC2RRMMessageAddUserConfirm()
//----------------------------------------------------------------------------
{
if (m_asn1_message != NULL) {
cout << "[RRM][RRC2RRMMessageAddUserConfirm::~RRC2RRMMessageAddUserConfirm()] free asn1_message start" << endl;
ASN_STRUCT_FREE( asn_DEF_RRC_RRM_Message, m_asn1_message);
cout << "[RRM][RRC2RRMMessageAddUserConfirm::~RRC2RRMMessageAddUserConfirm()] free asn1_message end" << endl;
}
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef _RRC2RRMMESSAGEADDUSERCONFIRM_H
# define _RRC2RRMMESSAGEADDUSERCONFIRM_H
# include "RRC-RRM-Message.h"
# include "Message.h"
# include "platform.h"
class RRC2RRMMessageAddUserConfirm: public Message
{
public:
RRC2RRMMessageAddUserConfirm(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRC_RRM_Message_t* asn1_messageP);
RRC2RRMMessageAddUserConfirm(std::string ip_dest_strP, int port_destP, cell_id_t cell_idP, mobile_id_t mobile_idP, transaction_id_t transaction_idP);
~RRC2RRMMessageAddUserConfirm ();
void Serialize ();
void Forward();
const cell_id_t GetENodeBId() {
return m_cell_id;
}
const mobile_id_t GetMobileId() {
return m_mobile_id;
}
const transaction_id_t GetTransactionId() {
return m_transaction_id;
}
private:
cell_id_t m_cell_id;
mobile_id_t m_mobile_id;
transaction_id_t m_transaction_id;
RRC_RRM_Message_t *m_asn1_message;
};
#endif
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <iostream>
#include <sstream>
#include <exception>
#include <stdexcept>
#include <stdio.h>
//----------------------------------------------------------------------------
#include "RRC2RRMMessageAddUserRequest.h"
#include "RRM2RRCMessageAddUserResponse.h"
#include "RRCMessageHandler.h"
#include "RadioResources.h"
#include "Exceptions.h"
//----------------------------------------------------------------------------
RRC2RRMMessageAddUserRequest::RRC2RRMMessageAddUserRequest(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRC_RRM_Message_t* asn1_messageP)
//----------------------------------------------------------------------------
{
Message();
ParseIpParameters(sa_fromP, sa_lenP);
m_asn1_message = asn1_messageP;
m_transaction_id = m_asn1_message->message.choice.c1.choice.rrcAddUserRequest.transactionId;
m_cell_id = m_asn1_message->message.choice.c1.choice.rrcAddUserRequest.e_NodeB_Identity.physCellId;
m_mobile_id = m_asn1_message->message.choice.c1.choice.rrcAddUserRequest.c_RNTI;
}
//----------------------------------------------------------------------------
RRC2RRMMessageAddUserRequest::RRC2RRMMessageAddUserRequest(std::string ip_dest_strP, int port_destP, cell_id_t cell_idP, mobile_id_t mobile_idP, transaction_id_t transaction_idP)
//----------------------------------------------------------------------------
{
Message();
m_asn1_message = static_cast<RRC_RRM_Message_t*>(CALLOC(1,sizeof(RRC_RRM_Message_t)));
memset(m_asn1_message, 0, sizeof(RRC_RRM_Message_t));
m_asn1_message->message.present = RRC_RRM_MessageType_PR_c1;
m_asn1_message->message.choice.c1.present = RRC_RRM_MessageType__c1_PR_rrcAddUserRequest;
m_asn1_message->message.choice.c1.choice.rrcAddUserRequest.transactionId = transaction_idP;
m_asn1_message->message.choice.c1.choice.rrcAddUserRequest.e_NodeB_Identity.physCellId = cell_idP;
m_asn1_message->message.choice.c1.choice.rrcAddUserRequest.c_RNTI = mobile_idP;
m_transaction_id = transaction_idP;
m_cell_id = cell_idP;
m_mobile_id = mobile_idP;
m_is_ipv6 = Utility::isipv6(ip_dest_strP);
m_msg_length = 0;
Serialize();
}
//----------------------------------------------------------------------------
void RRC2RRMMessageAddUserRequest::Forward()
//----------------------------------------------------------------------------
{
try {
RRM2RRCMessageAddUserResponse* add_user_response = RadioResources::Instance()->Request(*this);
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, add_user_response->GetSerializedMessageBuffer(), add_user_response->GetSerializedMessageSize());
delete add_user_response;
} catch (mobile_already_connected_error & x ) {
RRM2RRCMessageAddUserResponse response(OpenAir_RRM_Response_Status_failure, OpenAir_RRM_Response_Reason_protocolError, m_cell_id, m_mobile_id, m_transaction_id);
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
} catch (std::exception const& e ) {
RRM2RRCMessageAddUserResponse response(OpenAir_RRM_Response_Status_failure, OpenAir_RRM_Response_Reason_internalError, m_cell_id, m_mobile_id, m_transaction_id);
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
}
}
//----------------------------------------------------------------------------
void RRC2RRMMessageAddUserRequest::Serialize ()
//----------------------------------------------------------------------------
{
if (m_asn1_message != NULL) {
asn_enc_rval_t enc_rval;
memset(&m_message_serialize_buffer[0], 0, MESSAGE_SERIALIZE_BUFFER_SIZE);
enc_rval = uper_encode_to_buffer(&asn_DEF_RRC_RRM_Message,
(void*)m_asn1_message,
&m_message_serialize_buffer[0],
MESSAGE_SERIALIZE_BUFFER_SIZE);
printf("[RRM][RRC2RRMMessageConnectionRequest] asn_DEF_RRC_RRM_Message Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
m_msg_length = (enc_rval.encoded+7)/8;
if (enc_rval.encoded==-1) {
printf("[RRM][RRC2RRMMessageConnectionRequest] ASN1 : asn_DEF_RRC_RRM_Message encoding FAILED, EXITING\n");
throw asn1_encoding_error();
}
}
}
//----------------------------------------------------------------------------
RRC2RRMMessageAddUserRequest::~RRC2RRMMessageAddUserRequest()
//----------------------------------------------------------------------------
{
if (m_asn1_message != NULL) {
ASN_STRUCT_FREE( asn_DEF_RRC_RRM_Message, m_asn1_message);
}
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef _RRC2RRMMESSAGEADDUSERREQUEST_H
# define _RRC2RRMMESSAGEADDUSERREQUEST_H
# include "RRC-RRM-Message.h"
# include "Message.h"
# include "platform.h"
class RRC2RRMMessageAddUserRequest: public Message
{
public:
RRC2RRMMessageAddUserRequest(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRC_RRM_Message_t* asn1_messageP);
RRC2RRMMessageAddUserRequest(std::string ip_dest_strP, int port_destP, cell_id_t cell_idP, mobile_id_t mobile_idP, transaction_id_t transaction_idP);
~RRC2RRMMessageAddUserRequest ();
void Serialize ();
void Forward();
const cell_id_t GetENodeBId() {
return m_cell_id;
}
const mobile_id_t GetMobileId() {
return m_mobile_id;
}
const transaction_id_t GetTransactionId() {
return m_transaction_id;
}
private:
cell_id_t m_cell_id;
mobile_id_t m_mobile_id;
transaction_id_t m_transaction_id;
RRC_RRM_Message_t *m_asn1_message;
};
#endif
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <iostream>
#include <sstream>
#include <stdio.h>
#include <string.h>
#include "RRC2RRMMessageConnectionRequest.h"
#include "RRM2RRCMessageConnectionResponse.h"
#include "RRCMessageHandler.h"
#include "RadioResources.h"
#include "Exceptions.h"
#include "Utility.h"
using namespace std;
//----------------------------------------------------------------------------
RRC2RRMMessageConnectionRequest::RRC2RRMMessageConnectionRequest(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRC_RRM_Message_t* asn1_messageP)
//----------------------------------------------------------------------------
{
Message();
ParseIpParameters(sa_fromP, sa_lenP);
cout << "RRC2RRMMessageConnectionRequest(): m_ip_str_src = " << m_ip_str_src.c_str() << endl;
m_asn1_message = asn1_messageP;
m_transaction_id = m_asn1_message->message.choice.c1.choice.rrcSystemConfigurationRequest.transactionId;
}
//----------------------------------------------------------------------------
RRC2RRMMessageConnectionRequest::RRC2RRMMessageConnectionRequest(std::string ip_dest_strP, int port_destP, transaction_id_t transaction_idP)
//----------------------------------------------------------------------------
{
Message();
m_asn1_message = static_cast<RRC_RRM_Message_t*>(CALLOC(1,sizeof(RRC_RRM_Message_t)));
m_asn1_message->message.present = RRC_RRM_MessageType_PR_c1;
m_asn1_message->message.choice.c1.present = RRC_RRM_MessageType__c1_PR_rrcSystemConfigurationRequest;
m_asn1_message->message.choice.c1.choice.rrcSystemConfigurationRequest.transactionId = transaction_idP;
m_transaction_id = transaction_idP;
m_is_ipv6 = Utility::isipv6(ip_dest_strP);
m_msg_length = 0;
Serialize();
}
//----------------------------------------------------------------------------
void RRC2RRMMessageConnectionRequest::Forward()
//----------------------------------------------------------------------------
{
try {
RRM2RRCMessageConnectionResponse* connection_response = RadioResources::Instance()->Request(*this);
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, connection_response->GetSerializedMessageBuffer(), connection_response->GetSerializedMessageSize());
delete connection_response;
} catch (enodeb_already_connected_error & x ) {
RRM2RRCMessageConnectionResponse connection_response(OpenAir_RRM_Response_Status_failure, OpenAir_RRM_Response_Reason_protocolError);
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, connection_response.GetSerializedMessageBuffer(), connection_response.GetSerializedMessageSize());
} catch (std::exception const& e ) {
RRM2RRCMessageConnectionResponse connection_response(OpenAir_RRM_Response_Status_failure, OpenAir_RRM_Response_Reason_internalError);
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, connection_response.GetSerializedMessageBuffer(), connection_response.GetSerializedMessageSize());
}
}
//----------------------------------------------------------------------------
void RRC2RRMMessageConnectionRequest::Serialize()
//----------------------------------------------------------------------------
{
if (m_asn1_message != NULL) {
asn_enc_rval_t enc_rval;
memset(&m_message_serialize_buffer[0], 0, MESSAGE_SERIALIZE_BUFFER_SIZE);
enc_rval = uper_encode_to_buffer(&asn_DEF_RRC_RRM_Message,
(void*)m_asn1_message,
&m_message_serialize_buffer[0],
MESSAGE_SERIALIZE_BUFFER_SIZE);
printf("[RRM][RRC2RRMMessageConnectionRequest] asn_DEF_RRM_RRC_Message Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
m_msg_length = (enc_rval.encoded+7)/8;
if (enc_rval.encoded==-1) {
printf("[RRM][RRC2RRMMessageConnectionRequest] ASN1 : asn_DEF_RRC_RRM_Message encoding FAILED, EXITING\n");
throw asn1_encoding_error();
}
}
}
//----------------------------------------------------------------------------
RRC2RRMMessageConnectionRequest::~RRC2RRMMessageConnectionRequest()
//----------------------------------------------------------------------------
{
if (m_asn1_message != NULL) {
ASN_STRUCT_FREE( asn_DEF_RRC_RRM_Message, m_asn1_message);
}
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef _RRC2RRMMESSAGECONNECTIONREQUEST_H
# define _RRC2RRMMESSAGECONNECTIONREQUEST_H
# include "RRC-RRM-Message.h"
# include "Message.h"
# include "storage.h"
# include "platform.h"
class RRC2RRMMessageConnectionRequest: public Message
{
public:
RRC2RRMMessageConnectionRequest(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRC_RRM_Message_t* asn1_messageP);
RRC2RRMMessageConnectionRequest (std::string ip_dest_strP, int port_destP, transaction_id_t transaction_idP);
~RRC2RRMMessageConnectionRequest ();
void Serialize ();
void Forward();
const transaction_id_t GetTransactionId() {
return m_transaction_id;
}
private:
//cell_id_t m_cell_id;
transaction_id_t m_transaction_id;
RRC_RRM_Message_t *m_asn1_message;
};
#endif
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <iostream>
#include <sstream>
#include <exception>
#include <stdexcept>
#include <stdio.h>
//----------------------------------------------------------------------------
#include "RRC2RRMMessageRemoveRadioAccessBearerRequest.h"
#include "RRM2RRCMessageRemoveRadioAccessBearerResponse.h"
#include "RRCMessageHandler.h"
#include "RadioResources.h"
#include "Exceptions.h"
//----------------------------------------------------------------------------
RRC2RRMMessageRemoveRadioAccessBearerRequest::RRC2RRMMessageRemoveRadioAccessBearerRequest(std::string ip_dest_strP, int port_destP,
cell_id_t cell_idP,
mobile_id_t mobile_idP,
rb_id_t radio_bearer_idP,
transaction_id_t transaction_idP)
//----------------------------------------------------------------------------
{
Message();
m_is_ipv6 = Utility::isipv6(ip_dest_strP);
m_cell_id = cell_idP;
m_mobile_id = mobile_idP;
m_radio_bearer_id = radio_bearer_idP;
m_transaction_id = transaction_idP;
}
//----------------------------------------------------------------------------
RRC2RRMMessageRemoveRadioAccessBearerRequest::RRC2RRMMessageRemoveRadioAccessBearerRequest(tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP):
Message(in_messageP)
//----------------------------------------------------------------------------
{
ParseIpParameters(sa_fromP, sa_lenP);
m_cell_id = m_message_storage.readChar();
m_mobile_id = m_message_storage.readChar();
m_radio_bearer_id = m_message_storage.readChar();
m_transaction_id = m_message_storage.readChar();
printf("----------------------------------------------------------------------------------------------------------\n");
printf("RRC\t-------REMOVE DATA RADIO BEARER REQUEST------->\tRRM\n");
printf("----------------------------------------------------------------------------------------------------------\n");
printf("cell id = %d mobile id = %d radio bearer id = %d transaction id = %d \n", m_cell_id, m_mobile_id, m_radio_bearer_id, m_transaction_id);
}
//----------------------------------------------------------------------------
void RRC2RRMMessageRemoveRadioAccessBearerRequest::Forward()
//----------------------------------------------------------------------------
{
try {
Transaction* tx = RadioResources::Instance()->Request(*this);
RRM2RRCMessageRemoveRadioAccessBearerResponse response(Message::STATUS_REMOVE_RADIO_ACCESS_BEARER_SUCCESSFULL, Message::MSG_RESP_OK, m_cell_id, m_mobile_id, m_radio_bearer_id, m_transaction_id, tx);
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
} catch (mobile_already_connected_error & x ) {
RRM2RRCMessageRemoveRadioAccessBearerResponse response(Message::STATUS_REMOVE_RADIO_ACCESS_BEARER_FAILED, Message::MSG_RESP_PROTOCOL_ERROR, m_cell_id, m_mobile_id, m_radio_bearer_id, m_transaction_id);
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
} catch (std::exception const& e ) {
RRM2RRCMessageRemoveRadioAccessBearerResponse response(Message::STATUS_REMOVE_RADIO_ACCESS_BEARER_FAILED, Message::MSG_RESP_INTERNAL_ERROR, m_cell_id, m_mobile_id, m_radio_bearer_id, m_transaction_id);
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
}
}
//----------------------------------------------------------------------------
void RRC2RRMMessageRemoveRadioAccessBearerRequest::Serialize()
//----------------------------------------------------------------------------
{
m_message_storage.reset();
m_message_storage.writeChar(Message::MESSAGE_REMOVE_RADIO_ACCESS_BEARER_REQUEST);
m_message_storage.writeShort(7u);
m_message_storage.writeChar(m_cell_id);
m_message_storage.writeChar(m_mobile_id);
m_message_storage.writeChar(m_radio_bearer_id);
m_message_storage.writeChar(m_transaction_id);
}
//----------------------------------------------------------------------------
RRC2RRMMessageRemoveRadioAccessBearerRequest::~RRC2RRMMessageRemoveRadioAccessBearerRequest()
//----------------------------------------------------------------------------
{
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef _RRC2RRMMESSAGEREMOVERADIOACCESSBEARERREQUEST_H
# define _RRC2RRMMESSAGEREMOVERADIOACCESSBEARERREQUEST_H
# include "Message.h"
# include "storage.h"
# include "platform.h"
class RRC2RRMMessageRemoveRadioAccessBearerRequest: public Message
{
public:
RRC2RRMMessageRemoveRadioAccessBearerRequest(std::string ip_dest_strP,
int port_destP,
cell_id_t cell_idP,
mobile_id_t mobile_idP,
rb_id_t radio_bearer_idP,
transaction_id_t transaction_idP);
RRC2RRMMessageRemoveRadioAccessBearerRequest (tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP);
~RRC2RRMMessageRemoveRadioAccessBearerRequest ();
void Serialize ();
void Forward();
const unsigned int GetENodeBId() {
return m_cell_id;
}
const mobile_id_t GetMobileId() {
return m_mobile_id;
}
const rb_id_t GetRadioBearerId() {
return m_radio_bearer_id;
}
const transaction_id_t GetTransactionId() {
return m_transaction_id;
}
private:
cell_id_t m_cell_id;
mobile_id_t m_mobile_id;
transaction_id_t m_transaction_id;
rb_id_t m_radio_bearer_id;
unsigned short m_traffic_class;
unsigned short m_delay;
unsigned int m_guaranted_bit_rate_uplink;
unsigned int m_max_bit_rate_uplink;
unsigned int m_guaranted_bit_rate_downlink;
unsigned int m_max_bit_rate_downlink;
};
#endif
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <iostream>
#include <sstream>
#include <exception>
#include <stdexcept>
#include <stdio.h>
//----------------------------------------------------------------------------
#include "RRC2RRMMessageRemoveUserRequest.h"
#include "RRM2RRCMessageRemoveUserResponse.h"
#include "RRCMessageHandler.h"
#include "RadioResources.h"
#include "Exceptions.h"
//----------------------------------------------------------------------------
RRC2RRMMessageRemoveUserRequest::RRC2RRMMessageRemoveUserRequest(std::string ip_dest_strP, int port_destP,
cell_id_t cell_idP,
mobile_id_t mobile_idP,
transaction_id_t transaction_idP)
//----------------------------------------------------------------------------
{
Message();
m_is_ipv6 = Utility::isipv6(ip_dest_strP);
m_cell_id = cell_idP;
m_mobile_id = mobile_idP;
m_transaction_id = transaction_idP;
}
//----------------------------------------------------------------------------
RRC2RRMMessageRemoveUserRequest::RRC2RRMMessageRemoveUserRequest(tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP):
Message(in_messageP)
//----------------------------------------------------------------------------
{
ParseIpParameters(sa_fromP, sa_lenP);
m_cell_id = m_message_storage.readChar();
m_mobile_id = m_message_storage.readChar();
m_transaction_id = m_message_storage.readChar();
printf("----------------------------------------------------------------------------------------------------------\n");
printf("RRC\t-------REMOVE USER REQUEST------->\tRRM\n");
printf("----------------------------------------------------------------------------------------------------------\n");
printf("cell id = %d mobile id = %d transaction id = %d \n", m_cell_id, m_mobile_id, m_transaction_id);
}
//----------------------------------------------------------------------------
void RRC2RRMMessageRemoveUserRequest::Forward()
//----------------------------------------------------------------------------
{
try {
Transaction* tx = RadioResources::Instance()->Request(*this);
RRM2RRCMessageRemoveUserResponse response(Message::STATUS_REMOVE_USER_SUCCESSFULL, Message::MSG_RESP_OK, m_cell_id, m_mobile_id, m_transaction_id, tx);
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
} catch (mobile_already_connected_error & x ) {
RRM2RRCMessageRemoveUserResponse response(Message::STATUS_REMOVE_USER_FAILED, Message::MSG_RESP_PROTOCOL_ERROR, m_cell_id, m_mobile_id, m_transaction_id);
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
} catch (std::exception const& e ) {
RRM2RRCMessageRemoveUserResponse response(Message::STATUS_REMOVE_USER_FAILED, Message::MSG_RESP_INTERNAL_ERROR, m_cell_id, m_mobile_id, m_transaction_id);
RRCMessageHandler::Instance()->Send2Peer(this->m_ip_str_src, this->m_port_src, response.GetSerializedMessageBuffer(), response.GetSerializedMessageSize());
}
}
//----------------------------------------------------------------------------
void RRC2RRMMessageRemoveUserRequest::Serialize()
//----------------------------------------------------------------------------
{
m_message_storage.reset();
m_message_storage.writeChar(Message::MESSAGE_REMOVE_USER_REQUEST);
m_message_storage.writeShort(6u);
m_message_storage.writeChar(m_cell_id);
m_message_storage.writeChar(m_mobile_id);
m_message_storage.writeChar(m_transaction_id);
}
//----------------------------------------------------------------------------
RRC2RRMMessageRemoveUserRequest::~RRC2RRMMessageRemoveUserRequest()
//----------------------------------------------------------------------------
{
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef _RRC2RRMMESSAGEREMOVEUSERREQUEST_H
# define _RRC2RRMMESSAGEREMOVEUSERREQUEST_H
# include "Message.h"
# include "storage.h"
# include "platform.h"
class RRC2RRMMessageRemoveUserRequest: public Message
{
public:
RRC2RRMMessageRemoveUserRequest(std::string ip_dest_strP, int port_destP,
cell_id_t ,
mobile_id_t ,
transaction_id_t );
RRC2RRMMessageRemoveUserRequest (tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP);
~RRC2RRMMessageRemoveUserRequest ();
void Serialize ();
void Forward();
const unsigned int GetENodeBId() {
return 1u;
}
const mobile_id_t GetMobileId() {
return m_mobile_id;
}
const transaction_id_t GetTransactionId() {
return m_transaction_id;
}
protected:
cell_id_t m_cell_id;
mobile_id_t m_mobile_id;
transaction_id_t m_transaction_id;
};
#endif
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <iostream>
#include <sstream>
#include <exception>
#include <stdexcept>
#include <stdio.h>
//----------------------------------------------------------------------------
#include "RRC2RRMMessageUserReconfigurationComplete.h"
#include "RadioResources.h"
#include "Exceptions.h"
#include "Utility.h"
//----------------------------------------------------------------------------
RRC2RRMMessageUserReconfigurationComplete::RRC2RRMMessageUserReconfigurationComplete(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRC_RRM_Message_t* asn1_messageP)
//----------------------------------------------------------------------------
{
Message();
ParseIpParameters(sa_fromP, sa_lenP);
cout << "RRC2RRMMessageUserReconfigurationComplete(): m_ip_str_src = " << m_ip_str_src.c_str() << endl;
m_asn1_message = asn1_messageP;
m_transaction_id = m_asn1_message->message.choice.c1.choice.rrcUserReconfigurationComplete.transactionId;
m_cell_id = m_asn1_message->message.choice.c1.choice.rrcUserReconfigurationComplete.e_NodeB_Identity.physCellId;
m_mobile_id = m_asn1_message->message.choice.c1.choice.rrcUserReconfigurationComplete.c_RNTI;
}
//----------------------------------------------------------------------------
RRC2RRMMessageUserReconfigurationComplete::RRC2RRMMessageUserReconfigurationComplete(std::string ip_dest_strP, int port_destP, cell_id_t cell_idP, mobile_id_t mobile_idP, transaction_id_t transaction_idP)
//----------------------------------------------------------------------------
{
Message();
m_asn1_message = static_cast<RRC_RRM_Message_t*>(CALLOC(1,sizeof(RRC_RRM_Message_t)));
memset(m_asn1_message, 0, sizeof(RRC_RRM_Message_t));
m_asn1_message->message.present = RRC_RRM_MessageType_PR_c1;
m_asn1_message->message.choice.c1.present = RRC_RRM_MessageType__c1_PR_rrcUserReconfigurationComplete;
m_asn1_message->message.choice.c1.choice.rrcUserReconfigurationComplete.transactionId = transaction_idP;
m_asn1_message->message.choice.c1.choice.rrcUserReconfigurationComplete.e_NodeB_Identity.physCellId = cell_idP;
m_asn1_message->message.choice.c1.choice.rrcUserReconfigurationComplete.c_RNTI = mobile_idP;
m_transaction_id = transaction_idP;
m_cell_id = cell_idP;
m_mobile_id = mobile_idP;
m_is_ipv6 = Utility::isipv6(ip_dest_strP);
m_msg_length = 0;
Serialize();
}
//----------------------------------------------------------------------------
void RRC2RRMMessageUserReconfigurationComplete::Forward()
//----------------------------------------------------------------------------
{
try {
RadioResources::Instance()->Request(*this);
} catch (std::exception const& e ) {
}
}
//----------------------------------------------------------------------------
void RRC2RRMMessageUserReconfigurationComplete::Serialize()
//----------------------------------------------------------------------------
{
if (m_asn1_message != NULL) {
//xer_fprint(stdout, &asn_DEF_RRC_RRM_Message, (void*)m_asn1_message);
char errbuf[256];
size_t errlen = sizeof(errbuf);
int ret = asn_check_constraints(&asn_DEF_RRC_RRM_Message, m_asn1_message, errbuf, &errlen);
if (ret) {
fprintf(stderr, "CONSTRAINT VALIDATION FAILED FOR RRM-RRC Message: %s\n", errbuf);
exit (-1);
}
asn_enc_rval_t enc_rval;
memset(&m_message_serialize_buffer[0], 0, MESSAGE_SERIALIZE_BUFFER_SIZE);
enc_rval = uper_encode_to_buffer(&asn_DEF_RRC_RRM_Message,
(void*)m_asn1_message,
&m_message_serialize_buffer[0],
MESSAGE_SERIALIZE_BUFFER_SIZE);
printf("[RRM][RRC2RRMMessageUserReconfigurationComplete] asn_DEF_RRC_RRM_Message Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
m_msg_length = (enc_rval.encoded+7)/8;
if (enc_rval.encoded==-1) {
cerr << "[RRM][RRC2RRMMessageUserReconfigurationComplete] ASN1 : asn_DEF_RRC_RRM_Message encoding FAILED, EXITING" << endl;
cerr << "[RRM][RRC2RRMMessageUserReconfigurationComplete] Cannot encode "<< enc_rval.failed_type->name <<" " << strerror(errno) << endl;
throw asn1_encoding_error();
}
//xer_fprint(stdout, &asn_DEF_RRC_RRM_Message, (void*)m_asn1_message);
}
}
//----------------------------------------------------------------------------
RRC2RRMMessageUserReconfigurationComplete::~RRC2RRMMessageUserReconfigurationComplete()
//----------------------------------------------------------------------------
{
if (m_asn1_message != NULL) {
cout << "[RRM][RRC2RRMMessageUserReconfigurationComplete::~RRC2RRMMessageUserReconfigurationComplete()] free asn1_message start" << endl;
ASN_STRUCT_FREE( asn_DEF_RRC_RRM_Message, m_asn1_message);
m_asn1_message = NULL;
cout << "[RRM][RRC2RRMMessageUserReconfigurationComplete::~RRC2RRMMessageUserReconfigurationComplete()] free asn1_message end " << endl;
}
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef _RRC2RRMMESSAGEUSERRECONFIGURATIONCOMPLETE_H
# define _RRC2RRMMESSAGEUSERRECONFIGURATIONCOMPLETE_H
# include "RRC-RRM-Message.h"
# include "Message.h"
# include "platform.h"
class RRC2RRMMessageUserReconfigurationComplete: public Message
{
public:
RRC2RRMMessageUserReconfigurationComplete(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRC_RRM_Message_t* asn1_messageP);
RRC2RRMMessageUserReconfigurationComplete(std::string ip_dest_strP, int port_destP, cell_id_t cell_idP, mobile_id_t mobile_idP, transaction_id_t transaction_idP);
~RRC2RRMMessageUserReconfigurationComplete ();
void Serialize ();
void Forward();
const cell_id_t GetENodeBId() {
return m_cell_id;
}
mobile_id_t GetMobileId() {
return m_mobile_id;
};
transaction_id_t GetTransactionId() {
return m_transaction_id;
};
protected:
cell_id_t m_cell_id;
mobile_id_t m_mobile_id;
transaction_id_t m_transaction_id;
RRC_RRM_Message_t* m_asn1_message;
};
#endif
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <stdio.h>
#include "RRCMessageHandler.h"
RRCMessageHandler* RRCMessageHandler::s_instance = 0;
//----------------------------------------------------------------------------
void* RRCMessageHandlerThreadLoop(void *arg)
//----------------------------------------------------------------------------
{
return RRCMessageHandler::Instance()->ThreadLoop(arg);
}
//-----------------------------------------------------------------
RRCMessageHandler* RRCMessageHandler::Instance()
//-----------------------------------------------------------------
{
if (RRCMessageHandler::s_instance == 0) {
RRCMessageHandler::s_instance = new RRCMessageHandler;
}
return s_instance;
}
//-----------------------------------------------------------------
RRCMessageHandler::RRCMessageHandler()
//-----------------------------------------------------------------
{
m_socket_handler = new SocketHandler();
m_log = new StdoutLog() ;
m_socket_handler->RegStdLog(m_log);
m_socket = new RRCUdpSocket(*m_socket_handler, 16384, true);
port_t port = 33333;
Ipv6Address ad("0::1", port);
if (m_socket->Bind(ad, 1) == -1) {
printf("Exiting...\n");
exit(-1);
} else {
printf("Ready to receive on port %d\n",port);
}
m_socket_handler->Add(m_socket);
if (pthread_create(&m_thread, NULL, RRCMessageHandlerThreadLoop, (void *) NULL) != 0) {
fprintf(stderr, "\nRRCMessageHandler::RRCMessageHandler() ERROR pthread_create...\n");
} else {
pthread_setname_np( m_thread, "RRCMsgHandler" );
}
}
//----------------------------------------------------------------------------
void* RRCMessageHandler::ThreadLoop(void *arg)
//----------------------------------------------------------------------------
{
m_socket_handler->Select(1,0);
while (m_socket_handler->GetCount() && !*m_quit) {
m_socket_handler->Select(1,0);
}
fprintf(stderr, "\nRRCMessageHandler::ThreadLoop Exiting...\n");
return NULL;
}
//----------------------------------------------------------------------------
void RRCMessageHandler::Join(bool *quitP)
//----------------------------------------------------------------------------
{
m_quit = quitP;
pthread_join(m_thread, NULL);
fprintf(stderr, "\nRRCMessageHandler::Join Done\n");
}
//----------------------------------------------------------------------------
void RRCMessageHandler::NotifyRxData(const char *in_bufferP,size_t size_dataP,struct sockaddr *sa_fromP,socklen_t sa_lenP)
//----------------------------------------------------------------------------
{
Message* message;
do {
//message = Message::Deserialize(in_bufferP, size_dataP, sa_fromP, sa_lenP);
message = Message::DeserializeRRCMessage(in_bufferP, size_dataP, sa_fromP, sa_lenP);
if (message != NULL) {
//fprintf(stderr, "RRCMessageHandler::notifyRxData GOT MESSAGE\n");
message->Forward();
delete message;
message = NULL;
} else {
// TO DO
}
} while (message != NULL);
}
//-----------------------------------------------------------------
void RRCMessageHandler::Send2Peer(Message* messageP)
//-----------------------------------------------------------------
{
Send2Peer(messageP->GetSrcAddress(), messageP->GetSrcPort(), messageP->GetSerializedMessageBuffer(), messageP->GetSerializedMessageSize());
delete messageP;
}
//-----------------------------------------------------------------
void RRCMessageHandler::Send2Peer(std::string ip_dest_strP, int port_destP, const char *in_bufferP, msg_length_t size_dataP)
//-----------------------------------------------------------------
{
std::string lo_bad_address("1");
std::string lo_good_address("0::1");
if (ip_dest_strP.compare(lo_bad_address) != 0) {
m_socket->SendToBuf(ip_dest_strP, port_destP, in_bufferP, size_dataP, 0);
} else {
m_socket->SendToBuf(lo_good_address, port_destP, in_bufferP, size_dataP, 0);
}
}
//-----------------------------------------------------------------
RRCMessageHandler::~RRCMessageHandler()
//-----------------------------------------------------------------
{
if (m_socket_handler != 0)
{
delete m_socket_handler;
}
if (m_log != 0)
{
delete m_log;
}
// m_socket should be closed and deleted by m_socket_handler
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
# ifndef _RRCMESSAGEHANDLER_H
# define _RRCMESSAGEHANDLER_H
# include <pthread.h>
# include "StdoutLog.h"
# include "SocketHandlerEp.h"
# include "RRCUdpSocket.h"
# include "ListenSocket.h"
# include "Message.h"
# include "platform.h"
class RRCMessageHandler
{
public:
static RRCMessageHandler *Instance ();
void NotifyRxData (const char *in_bufferP,size_t size_dataP,struct sockaddr *sa_fromP,socklen_t sa_lenP);
void Send2Peer (Message *);
void Send2Peer(std::string ip_dest_strP, int port_destP, const char *in_bufferP, msg_length_t size_dataP);
void* ThreadLoop(void *arg);
void Join(bool *quitP);
~RRCMessageHandler ();
private:
RRCMessageHandler ();
SocketHandler *m_socket_handler;
RRCUdpSocket *m_socket;
StdoutLog *m_log;
pthread_t m_thread;
bool *m_quit;
static RRCMessageHandler *s_instance;
};
# endif
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <stdio.h>
#include "RRCUdpSocket.h"
#include "RRCMessageHandler.h"
RRCUdpSocket::RRCUdpSocket(ISocketHandler& h,int ibufsz, bool ipv6)
:UdpSocket(h, ibufsz, ipv6)
{
}
void RRCUdpSocket::OnRawData(const char *in_bufferP,size_t size_dataP,struct sockaddr *sa_fromP,socklen_t sa_lenP)
{
RRCMessageHandler::Instance()->NotifyRxData(in_bufferP, size_dataP, sa_fromP, sa_lenP);
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef _RRCUDPSOCKET_H
#define _RRCUDPSOCKET_H
#include "UdpSocket.h"
class RRCUdpSocket : public UdpSocket
{
public:
RRCUdpSocket(ISocketHandler&,int ibufsz, bool ipv6);
void OnRawData(const char *,size_t,struct sockaddr *,socklen_t);
};
#endif // _RRCUDPSOCKET_H
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <iostream>
#include <sstream>
#include <exception>
#include <stdexcept>
#include <stdio.h>
//----------------------------------------------------------------------------
#include "RRM2RRCMessageAddRadioAccessBearerResponse.h"
#include "RadioResources.h"
#include "Exceptions.h"
#include "TestScenario.h"
//----------------------------------------------------------------------------
RRM2RRCMessageAddRadioAccessBearerResponse::RRM2RRCMessageAddRadioAccessBearerResponse(tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP):Message(in_messageP)
//----------------------------------------------------------------------------
{
ParseIpParameters(sa_fromP, sa_lenP);
m_status = m_message_storage.readChar();
m_reason = m_message_storage.readChar();
m_cell_id = m_message_storage.readChar();
m_mobile_id = m_message_storage.readChar();
m_radio_bearer_id= m_message_storage.readChar();
m_transaction_id = m_message_storage.readChar();
m_transaction_result = NULL;
cout << "----------------------------------------------------------------------------------------------------------" << endl;
cout << "RRC\t<-------ADD DATA RADIO BEARER RESPONSE-------\tRRM STATUS: "<< Message::StatusToString(m_status).c_str() << " REASON: "<< Message::ReasonToString(m_reason).c_str() << endl;
cout << "----------------------------------------------------------------------------------------------------------" << endl;
cout << "cell id = " << m_cell_id << " mobile id = " << m_mobile_id << " radio bearer id = "<< m_radio_bearer_id << " transaction id = "<< m_transaction_id << endl;
if ((msg_lengthP - 6) > 0 ) {
m_transaction_result = new Transaction(m_transaction_id, m_message_storage, msg_lengthP - 6);
cout << m_transaction_result->ToString().c_str() << endl;
}
}
//----------------------------------------------------------------------------
RRM2RRCMessageAddRadioAccessBearerResponse::RRM2RRCMessageAddRadioAccessBearerResponse(msg_response_status_t statusP,
msg_response_reason_t reasonP,
cell_id_t cell_idP,
mobile_id_t mobile_idP,
rb_id_t radio_bearer_idP,
transaction_id_t transaction_idP)
//----------------------------------------------------------------------------
{
Message();
m_status = statusP;
m_reason = reasonP;
m_cell_id = cell_idP;
m_mobile_id = mobile_idP;
m_radio_bearer_id = radio_bearer_idP;
m_transaction_id = transaction_idP;
}
//----------------------------------------------------------------------------
RRM2RRCMessageAddRadioAccessBearerResponse::RRM2RRCMessageAddRadioAccessBearerResponse(msg_response_status_t statusP,
msg_response_reason_t reasonP,
cell_id_t cell_idP,
mobile_id_t mobile_idP,
rb_id_t radio_bearer_idP,
transaction_id_t transaction_idP,
Transaction* transactionP)
//----------------------------------------------------------------------------
{
Message();
m_status = statusP;
m_reason = reasonP;
m_cell_id = cell_idP;
m_mobile_id = mobile_idP;
m_radio_bearer_id = radio_bearer_idP;
m_transaction_id = transaction_idP;
m_transaction_result = transactionP;
}
//----------------------------------------------------------------------------
void RRM2RRCMessageAddRadioAccessBearerResponse::Serialize ()
//----------------------------------------------------------------------------
{
//printf("[RRM][RRM2RRCMessageAddRadioAccessBearerResponse] Serialize () status = %d reason = %d cell id = %d mobile id = %d radio bearer id = %d transaction id = %d \n", m_status, m_reason, m_cell_id, m_mobile_id, m_radio_bearer_id, m_transaction_id);
int tx_packet_size = 0;
if (m_transaction_result != NULL) {
tx_packet_size = m_transaction_result->Size();
}
m_message_storage.reset();
m_message_storage.writeChar(Message::MESSAGE_ADD_RADIO_ACCESS_BEARER_RESPONSE);
m_message_storage.writeShort(9u+tx_packet_size);
m_message_storage.writeChar(m_status);
m_message_storage.writeChar(m_reason);
m_message_storage.writeChar(m_cell_id);
m_message_storage.writeChar(m_mobile_id);
m_message_storage.writeChar(m_radio_bearer_id);
m_message_storage.writeChar(m_transaction_id);
if (m_transaction_result != NULL) {
unsigned char packet[tx_packet_size];
m_transaction_result->Serialize(&packet[0]);
m_message_storage.writePacket(&packet[0], tx_packet_size);
}
}
//----------------------------------------------------------------------------
void RRM2RRCMessageAddRadioAccessBearerResponse::Forward()
//----------------------------------------------------------------------------
{
#ifdef TEST_SCENARIO
TestScenario::notifyRxMessage(this);
#endif
}
//----------------------------------------------------------------------------
RRM2RRCMessageAddRadioAccessBearerResponse::~RRM2RRCMessageAddRadioAccessBearerResponse()
//----------------------------------------------------------------------------
{
if (m_transaction_result != NULL) {
delete m_transaction_result;
}
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef _RRM2RRCMESSAGEADDRADIOACCESSBEARERRESPONSE_H
# define _RRM2RRCMESSAGEADDRADIOACCESSBEARERRESPONSE_H
# include "Message.h"
# include "platform.h"
# include "Transaction.h"
class RRM2RRCMessageAddRadioAccessBearerResponse: public Message
{
public:
RRM2RRCMessageAddRadioAccessBearerResponse(tcpip::Storage& in_messageP, msg_length_t msg_lengthP, frame_t msg_frameP, struct sockaddr *sa_fromP, socklen_t sa_lenP);
RRM2RRCMessageAddRadioAccessBearerResponse(msg_response_status_t ,
msg_response_reason_t ,
cell_id_t ,
mobile_id_t ,
rb_id_t ,
transaction_id_t );
RRM2RRCMessageAddRadioAccessBearerResponse(msg_response_status_t ,
msg_response_reason_t ,
cell_id_t ,
mobile_id_t ,
rb_id_t ,
transaction_id_t ,
Transaction*);
~RRM2RRCMessageAddRadioAccessBearerResponse ();
void Serialize ();
void Forward();
msg_response_status_t GetStatus() {
return m_status;
};
msg_response_reason_t GetReason() {
return m_reason;
};
cell_id_t GetENodeBId() {
return m_cell_id;
};
mobile_id_t GetMobileId() {
return m_mobile_id;
};
rb_id_t GetRadioBearerId() {
return m_radio_bearer_id;
};
transaction_id_t GetTransactionId() {
return m_transaction_id;
};
protected:
msg_response_status_t m_status;
msg_response_reason_t m_reason;
cell_id_t m_cell_id;
mobile_id_t m_mobile_id;
rb_id_t m_radio_bearer_id;
transaction_id_t m_transaction_id;
Transaction* m_transaction_result;
};
#endif
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <iostream>
#include <sstream>
#include <stdio.h>
//----------------------------------------------------------------------------
#include "RRM2RRCMessageAddUserResponse.h"
#include "RadioResources.h"
#include "Exceptions.h"
#include "TestScenario.h"
//----------------------------------------------------------------------------
RRM2RRCMessageAddUserResponse::RRM2RRCMessageAddUserResponse(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRM_RRC_Message_t* asn1_messageP)
//----------------------------------------------------------------------------
{
Message();
ParseIpParameters(sa_fromP, sa_lenP);
cout << "RRM2RRCMessageAddUserResponse(): m_ip_str_src = " << m_ip_str_src.c_str() << endl;
m_asn1_message = asn1_messageP;
m_status = m_asn1_message->message.choice.c1.choice.rrcAddUserResponse.rrm_Response_Status;
m_reason = m_asn1_message->message.choice.c1.choice.rrcAddUserResponse.rrm_Response_Reason;
m_transaction_id = m_asn1_message->message.choice.c1.choice.rrcAddUserResponse.transactionId;
m_cell_id = m_asn1_message->message.choice.c1.choice.rrcAddUserResponse.e_NodeB_Identity.physCellId;
m_mobile_id = m_asn1_message->message.choice.c1.choice.rrcAddUserResponse.c_RNTI;
}
//----------------------------------------------------------------------------
RRM2RRCMessageAddUserResponse::RRM2RRCMessageAddUserResponse(transaction_id_t transaction_idP, msg_response_status_t statusP, msg_response_reason_t reasonP, RRM_RRC_Message_t* asn1_messageP)
//----------------------------------------------------------------------------
{
Message();
m_status = statusP;
m_reason = reasonP;
m_transaction_id = transaction_idP;
m_asn1_message = asn1_messageP;
m_asn1_message->message.choice.c1.choice.rrcAddUserResponse.transactionId = transaction_idP;
m_asn1_message->message.choice.c1.choice.rrcAddUserResponse.rrm_Response_Status = statusP;
m_asn1_message->message.choice.c1.choice.rrcAddUserResponse.rrm_Response_Reason = reasonP;
m_cell_id = m_asn1_message->message.choice.c1.choice.rrcAddUserResponse.e_NodeB_Identity.physCellId;
m_mobile_id = m_asn1_message->message.choice.c1.choice.rrcAddUserResponse.c_RNTI;
Serialize();
}
//----------------------------------------------------------------------------
RRM2RRCMessageAddUserResponse::RRM2RRCMessageAddUserResponse(msg_response_status_t statusP, msg_response_reason_t reasonP, cell_id_t cell_idP, mobile_id_t mobile_idP, transaction_id_t transaction_idP)
//----------------------------------------------------------------------------
{
Message();
m_status = statusP;
m_reason = reasonP;
m_cell_id = cell_idP;
m_mobile_id = mobile_idP;
m_transaction_id = transaction_idP;
}
//----------------------------------------------------------------------------
void RRM2RRCMessageAddUserResponse::Forward()
//----------------------------------------------------------------------------
{
#ifdef TEST_SCENARIO
TestScenario::notifyRxMessage(this);
#endif
}
//----------------------------------------------------------------------------
void RRM2RRCMessageAddUserResponse::Serialize()
//----------------------------------------------------------------------------
{
if (m_asn1_message != NULL) {
//xer_fprint(stdout, &asn_DEF_RRM_RRC_Message, (void*)m_asn1_message);
char errbuf[128];
size_t errlen = sizeof(errbuf);
int ret = asn_check_constraints(&asn_DEF_RRM_RRC_Message, m_asn1_message, errbuf, &errlen);
if (ret) {
fprintf(stderr, "CONSTRAINT VALIDATION FAILED FOR RRM-RRC Message: %s\n", errbuf);
exit (-1);
}
asn_enc_rval_t enc_rval;
memset(&m_message_serialize_buffer[0], 0, MESSAGE_SERIALIZE_BUFFER_SIZE);
enc_rval = uper_encode_to_buffer(&asn_DEF_RRM_RRC_Message,
(void*)m_asn1_message,
&m_message_serialize_buffer[0],
MESSAGE_SERIALIZE_BUFFER_SIZE);
printf("[RRM][RRM2RRCMessageAddUserResponse] asn_DEF_RRM_RRC_Message Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
m_msg_length = (enc_rval.encoded+7)/8;
if (enc_rval.encoded==-1) {
printf("[RRM][RRM2RRCMessageAddUserResponse] ASN1 : asn_DEF_RRM_RRC_Message encoding FAILED, EXITING\n");
throw asn1_encoding_error();
}
//xer_fprint(stdout, &asn_DEF_RRM_RRC_Message, (void*)m_asn1_message);
}
}
//----------------------------------------------------------------------------
RRM2RRCMessageAddUserResponse::~RRM2RRCMessageAddUserResponse()
//----------------------------------------------------------------------------
{
if (m_asn1_message != NULL) {
ASN_STRUCT_FREE( asn_DEF_RRM_RRC_Message, m_asn1_message);
}
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef _RRM2RRCMESSAGEADDUSERRESPONSE_H
# define _RRM2RRCMESSAGEADDUSERRESPONSE_H
# include "RRM-RRC-Message.h"
# include "Message.h"
# include "platform.h"
class RRM2RRCMessageAddUserResponse: public Message
{
public:
RRM2RRCMessageAddUserResponse(struct sockaddr *sa_fromP, socklen_t sa_lenP, RRM_RRC_Message_t* asn1_messageP);
RRM2RRCMessageAddUserResponse(transaction_id_t transaction_idP, msg_response_status_t statusP, msg_response_reason_t reasonP, RRM_RRC_Message_t* asn1_messageP);
RRM2RRCMessageAddUserResponse(msg_response_status_t statusP, msg_response_reason_t reasonP, cell_id_t cell_idP, mobile_id_t mobile_idP, transaction_id_t transaction_idP);
~RRM2RRCMessageAddUserResponse ();
void Serialize ();
void Forward();
msg_response_status_t GetStatus() {
return m_status;
};
msg_response_reason_t GetReason() {
return m_reason;
};
const cell_id_t GetENodeBId() {
return m_cell_id;
}
const mobile_id_t GetMobileId() {
return m_mobile_id;
};
const transaction_id_t GetTransactionId() {
return m_transaction_id;
};
protected:
msg_response_status_t m_status;
msg_response_reason_t m_reason;
cell_id_t m_cell_id;
mobile_id_t m_mobile_id;
transaction_id_t m_transaction_id;
RRM_RRC_Message_t* m_asn1_message;
};
#endif
This diff is collapsed.
This diff is collapsed.
noinst_LIBRARIES = libsqlite.a
libsqlite_a_SOURCES = sqlite3.c sqlite3.h
This diff is collapsed.
This diff is collapsed.
noinst_LIBRARIES = libtcpip.a
libtcpip_a_SOURCES = storage.h storage.cpp
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.0 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "DataRadioBearer.h"
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment