Commit 8386f73a authored by Raphael Defosseux's avatar Raphael Defosseux

[CLEANUP] apply clang-format

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@openairinterface.org>
parent e2412c05
......@@ -41,10 +41,14 @@ The text for `OAI Public License V1.1` is also available under [LICENSE](LICENSE
openair-spgwu-tiny
├── build : Build directory, contains targets and object files generated by compilation of network functions.
│ ├── log : Directory containing build log files.
│ ├── scripts : Directory containing scripts for building network functions
│ ├── scripts : Directory containing scripts for building network functions.
│ └── spgw_u : Directory containing CMakefile.txt and object files generated by compilation of SPGW-U network function.
├── ci-scripts : Directory containing scripts for the CI process
├── ci-scripts : Directory containing scripts for the CI process.
├── docker : Directory containing dockerfiles to create images.
├── docs : Directory containing documentation on the supported feature set.
├── etc : Directory containing the configuration files to be deployed for each network function.
├── openshift : Directory containing YAML files for build within OpenShift context.
├── scripts : Directory containing entrypoint script for container images.
└── src : Source files of network functions.
├── common : Common header files
│   ├── msg : ITTI messages definitions.
......
......@@ -3,9 +3,9 @@
* 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.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (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
*
......@@ -37,15 +37,17 @@
#include <string.h>
class endpoint {
public :
public:
struct sockaddr_storage addr_storage;
socklen_t addr_storage_len;
endpoint() : addr_storage(), addr_storage_len(sizeof(struct sockaddr_storage)) {};
endpoint(const endpoint& e) : addr_storage(e.addr_storage), addr_storage_len(e.addr_storage_len) {};
endpoint(const struct sockaddr_storage& addr, const socklen_t len) : addr_storage(addr), addr_storage_len(len) {};
endpoint(const struct in_addr& addr, const uint16_t port)
{
struct sockaddr_in * addr_in = (struct sockaddr_in *)&addr_storage;
endpoint()
: addr_storage(), addr_storage_len(sizeof(struct sockaddr_storage)){};
endpoint(const endpoint& e)
: addr_storage(e.addr_storage), addr_storage_len(e.addr_storage_len){};
endpoint(const struct sockaddr_storage& addr, const socklen_t len)
: addr_storage(addr), addr_storage_len(len){};
endpoint(const struct in_addr& addr, const uint16_t port) {
struct sockaddr_in* addr_in = (struct sockaddr_in*) &addr_storage;
addr_in->sin_family = AF_INET;
addr_in->sin_port = htons(port);
addr_in->sin_addr.s_addr = addr.s_addr;
......@@ -53,9 +55,8 @@ public :
addr_storage_len = sizeof(struct sockaddr_in);
};
endpoint(const struct in6_addr& addr6, const uint16_t port)
{
struct sockaddr_in6 * addr_in6 = (struct sockaddr_in6 *)&addr_storage;
endpoint(const struct in6_addr& addr6, const uint16_t port) {
struct sockaddr_in6* addr_in6 = (struct sockaddr_in6*) &addr_storage;
addr_in6->sin6_family = AF_INET6;
addr_in6->sin6_port = htons(port);
addr_in6->sin6_flowinfo = 0;
......@@ -65,32 +66,25 @@ public :
addr_storage_len = sizeof(struct sockaddr_in6);
};
uint16_t port() const
{
return ntohs(((struct sockaddr_in *)&addr_storage)->sin_port);
uint16_t port() const {
return ntohs(((struct sockaddr_in*) &addr_storage)->sin_port);
}
sa_family_t family() const
{
return addr_storage.ss_family;
}
sa_family_t family() const { return addr_storage.ss_family; }
std::string toString() const
{
std::string toString() const {
std::string str;
if (addr_storage.ss_family == AF_INET) {
struct sockaddr_in * addr_in = (struct sockaddr_in *)&addr_storage;
struct sockaddr_in* addr_in = (struct sockaddr_in*) &addr_storage;
str.append(conv::toString(addr_in->sin_addr));
str.append(":").append(std::to_string(ntohs(addr_in->sin_port)));
}
else if (addr_storage.ss_family == AF_INET6) {
struct sockaddr_in6 * addr_in6 = (struct sockaddr_in6 *)&addr_storage;
} else if (addr_storage.ss_family == AF_INET6) {
struct sockaddr_in6* addr_in6 = (struct sockaddr_in6*) &addr_storage;
str.append(conv::toString(addr_in6->sin6_addr));
str.append(":").append(std::to_string(ntohs(addr_in6->sin6_port)));
}
return str;
}
};
#endif
This diff is collapsed.
/*
* Copyright (c) 2017 Sprint
*
* Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
*
* 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.
*/
* Copyright (c) 2017 Sprint
*
* Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
*
* 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.
*/
#ifndef __LOGGER_H
#define __LOGGER_H
......@@ -21,130 +21,131 @@
#include <stdexcept>
#include <vector>
//#define SPDLOG_LEVEL_NAMES { "trace", "debug", "info", "warning", "error", "critical", "off" };
#define SPDLOG_LEVEL_NAMES { "trace", "debug", "info ", "start", "warn ", "error", "off " };
//#define SPDLOG_LEVEL_NAMES { "trace", "debug", "info", "warning", "error",
//"critical", "off" };
#define SPDLOG_LEVEL_NAMES \
{"trace", "debug", "info ", "start", "warn ", "error", "off "};
#define SPDLOG_ENABLE_SYSLOG
#include "spdlog/spdlog.h"
class LoggerException : public std::runtime_error
{
public:
explicit LoggerException(const char *m) : std::runtime_error(m) {}
explicit LoggerException(const std::string &m) : std::runtime_error(m) {}
class LoggerException : public std::runtime_error {
public:
explicit LoggerException(const char* m) : std::runtime_error(m) {}
explicit LoggerException(const std::string& m) : std::runtime_error(m) {}
};
class _Logger
{
public:
_Logger( const char *category, std::vector<spdlog::sink_ptr> &sinks, const char *pattern );
void trace( const char *format, ... );
void trace( const std::string &format, ... );
void debug( const char *format, ... );
void debug( const std::string &format, ... );
void info( const char *format, ... );
void info( const std::string &format, ... );
void startup( const char *format, ... );
void startup( const std::string &format, ... );
void warn( const char *format, ... );
void warn( const std::string &format, ... );
void error( const char *format, ... );
void error( const std::string &format, ... );
private:
class _Logger {
public:
_Logger(
const char* category, std::vector<spdlog::sink_ptr>& sinks,
const char* pattern);
void trace(const char* format, ...);
void trace(const std::string& format, ...);
void debug(const char* format, ...);
void debug(const std::string& format, ...);
void info(const char* format, ...);
void info(const std::string& format, ...);
void startup(const char* format, ...);
void startup(const std::string& format, ...);
void warn(const char* format, ...);
void warn(const std::string& format, ...);
void error(const char* format, ...);
void error(const std::string& format, ...);
private:
_Logger();
enum _LogType
{
_ltTrace,
_ltDebug,
_ltInfo,
_ltStartup,
_ltWarn,
_ltError
};
enum _LogType { _ltTrace, _ltDebug, _ltInfo, _ltStartup, _ltWarn, _ltError };
void log( _LogType lt, const char *format, va_list &args );
void log(_LogType lt, const char* format, va_list& args);
spdlog::logger m_log;
};
class Logger
{
public:
static void init( const char *app, const bool log_stdout, const bool log_rot_file ) { singleton()._init( app, log_stdout, log_rot_file ); }
static void init( const std::string &app, const bool log_stdout, const bool log_rot_file ) { init( app.c_str(), log_stdout, log_rot_file ); }
static _Logger &async_cmd() { return *singleton().m_async_cmd; }
static _Logger &enb_s1u() { return *singleton().m_enb_s1u; }
static _Logger &gtpv1_u() { return *singleton().m_gtpv1_u; }
static _Logger &gtpv2_c() { return *singleton().m_gtpv2_c; }
//static _Logger &gx() { return *singleton().m_gx; }
static _Logger &itti() { return *singleton().m_itti; }
static _Logger &mme_s11() { return *singleton().m_mme_s11; }
static _Logger &pgwc_app() { return *singleton().m_pgwc_app; }
//static _Logger &pgwu_app() { return *singleton().m_pgwu_app; }
static _Logger &pgwc_s5s8() { return *singleton().m_pgwc_s5s8; }
static _Logger &pgwc_sx() { return *singleton().m_pgwc_sx; }
//static _Logger &pgwu_sx() { return *singleton().m_pgwu_sx; }
//static _Logger &pgw_udp() { return *singleton().m_pgw_udp; }
static _Logger &sgwc_app() { return *singleton().m_sgwc_app; }
//static _Logger &sgwu_app() { return *singleton().m_sgwu_app; }
//static _Logger &sgwu_sx() { return *singleton().m_sgwu_sx; }
static _Logger &sgwc_s11() { return *singleton().m_sgwc_s11; }
static _Logger &sgwc_s5s8() { return *singleton().m_sgwc_s5s8; }
static _Logger &sgwc_sx() { return *singleton().m_sgwc_sx; }
//static _Logger &sgw_udp() { return *singleton().m_sgw_udp; }
static _Logger &spgwu_app() { return *singleton().m_spgwu_app; }
static _Logger &spgwu_s1u() { return *singleton().m_spgwu_s1u; }
static _Logger &spgwu_sx() { return *singleton().m_spgwu_sx; }
static _Logger &system() { return *singleton().m_system; }
static _Logger &udp() { return *singleton().m_udp; }
static _Logger &pfcp() { return *singleton().m_pfcp; }
static _Logger &pfcp_switch() { return *singleton().m_pfcp_switch; }
private:
static Logger *m_singleton;
static Logger &singleton() { if (!m_singleton) m_singleton = new Logger(); return *m_singleton; }
class Logger {
public:
static void init(
const char* app, const bool log_stdout, const bool log_rot_file) {
singleton()._init(app, log_stdout, log_rot_file);
}
static void init(
const std::string& app, const bool log_stdout, const bool log_rot_file) {
init(app.c_str(), log_stdout, log_rot_file);
}
static _Logger& async_cmd() { return *singleton().m_async_cmd; }
static _Logger& enb_s1u() { return *singleton().m_enb_s1u; }
static _Logger& gtpv1_u() { return *singleton().m_gtpv1_u; }
static _Logger& gtpv2_c() { return *singleton().m_gtpv2_c; }
// static _Logger &gx() { return *singleton().m_gx; }
static _Logger& itti() { return *singleton().m_itti; }
static _Logger& mme_s11() { return *singleton().m_mme_s11; }
static _Logger& pgwc_app() { return *singleton().m_pgwc_app; }
// static _Logger &pgwu_app() { return *singleton().m_pgwu_app; }
static _Logger& pgwc_s5s8() { return *singleton().m_pgwc_s5s8; }
static _Logger& pgwc_sx() { return *singleton().m_pgwc_sx; }
// static _Logger &pgwu_sx() { return *singleton().m_pgwu_sx; }
// static _Logger &pgw_udp() { return *singleton().m_pgw_udp; }
static _Logger& sgwc_app() { return *singleton().m_sgwc_app; }
// static _Logger &sgwu_app() { return *singleton().m_sgwu_app; }
// static _Logger &sgwu_sx() { return *singleton().m_sgwu_sx; }
static _Logger& sgwc_s11() { return *singleton().m_sgwc_s11; }
static _Logger& sgwc_s5s8() { return *singleton().m_sgwc_s5s8; }
static _Logger& sgwc_sx() { return *singleton().m_sgwc_sx; }
// static _Logger &sgw_udp() { return *singleton().m_sgw_udp; }
static _Logger& spgwu_app() { return *singleton().m_spgwu_app; }
static _Logger& spgwu_s1u() { return *singleton().m_spgwu_s1u; }
static _Logger& spgwu_sx() { return *singleton().m_spgwu_sx; }
static _Logger& system() { return *singleton().m_system; }
static _Logger& udp() { return *singleton().m_udp; }
static _Logger& pfcp() { return *singleton().m_pfcp; }
static _Logger& pfcp_switch() { return *singleton().m_pfcp_switch; }
private:
static Logger* m_singleton;
static Logger& singleton() {
if (!m_singleton) m_singleton = new Logger();
return *m_singleton;
}
Logger() {}
~Logger() {}
void _init( const char *app, const bool log_stdout, const bool log_rot_file);
void _init(const char* app, const bool log_stdout, const bool log_rot_file);
std::vector<spdlog::sink_ptr> m_sinks;
std::string m_pattern;
_Logger *m_async_cmd;
_Logger *m_enb_s1u;
_Logger *m_gtpv1_u;
_Logger *m_gtpv2_c;
_Logger* m_async_cmd;
_Logger* m_enb_s1u;
_Logger* m_gtpv1_u;
_Logger* m_gtpv2_c;
//_Logger *m_gx;
_Logger *m_itti;
_Logger *m_mme_s11;
_Logger *m_pgwc_app;
_Logger* m_itti;
_Logger* m_mme_s11;
_Logger* m_pgwc_app;
//_Logger *m_pgwu_app;
_Logger *m_pgwc_s5s8;
_Logger *m_pgwc_sx;
_Logger* m_pgwc_s5s8;
_Logger* m_pgwc_sx;
//_Logger *m_pgwu_sx;
//_Logger *m_pgw_udp;
_Logger *m_sgwc_app;
_Logger* m_sgwc_app;
//_Logger *m_sgwu_app;
//_Logger *m_sgwu_sx;
_Logger *m_sgwc_s11;
_Logger *m_sgwc_s5s8;
_Logger *m_sgwc_sx;
_Logger* m_sgwc_s11;
_Logger* m_sgwc_s5s8;
_Logger* m_sgwc_sx;
//_Logger *m_sgw_udp;
_Logger *m_spgwu_app;
_Logger *m_spgwu_s1u;
_Logger *m_spgwu_sx;
_Logger *m_system;
_Logger *m_udp;
_Logger *m_pfcp;
_Logger *m_pfcp_switch;
_Logger* m_spgwu_app;
_Logger* m_spgwu_s1u;
_Logger* m_spgwu_sx;
_Logger* m_system;
_Logger* m_udp;
_Logger* m_pfcp;
_Logger* m_pfcp_switch;
};
#endif // __LOGGER_H
......@@ -3,9 +3,9 @@
* 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.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (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
*
......@@ -32,17 +32,28 @@
#include "itti_msg.hpp"
class itti_async_shell_cmd : public itti_msg {
public:
itti_async_shell_cmd(const task_id_t origin, const task_id_t destination, const std::string& system_cmd, bool is_abort_on_error, const char * src_file, const int src_line):
itti_msg( ASYNC_SHELL_CMD, origin, destination), system_command(system_cmd), is_abort_on_error(is_abort_on_error), src_file(src_file), src_line(src_line) {}
itti_async_shell_cmd(const itti_async_shell_cmd& i) :
itti_msg(i), system_command(i.system_command), is_abort_on_error(i.is_abort_on_error), src_file(i.src_file), src_line(i.src_line) {}
const char* get_msg_name() {return typeid( itti_msg_ping).name();};
public:
itti_async_shell_cmd(
const task_id_t origin, const task_id_t destination,
const std::string& system_cmd, bool is_abort_on_error,
const char* src_file, const int src_line)
: itti_msg(ASYNC_SHELL_CMD, origin, destination),
system_command(system_cmd),
is_abort_on_error(is_abort_on_error),
src_file(src_file),
src_line(src_line) {}
itti_async_shell_cmd(const itti_async_shell_cmd& i)
: itti_msg(i),
system_command(i.system_command),
is_abort_on_error(i.is_abort_on_error),
src_file(i.src_file),
src_line(i.src_line) {}
const char* get_msg_name() { return typeid(itti_msg_ping).name(); };
std::string system_command;
bool is_abort_on_error;
// debug
std::string src_file;
int src_line;
} ;
};
#endif /* FILE_ITTI_ASYNC_SHELL_CMD_SEEN */
This diff is collapsed.
......@@ -3,9 +3,9 @@
* 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.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (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
*
......@@ -36,137 +36,149 @@
#include <sys/socket.h>
class itti_s1u_msg : public itti_msg {
public:
itti_s1u_msg(const itti_msg_type_t msg_type, const task_id_t orig, const task_id_t dest):
itti_msg(msg_type, orig, dest) {}
public:
itti_s1u_msg(
const itti_msg_type_t msg_type, const task_id_t orig,
const task_id_t dest)
: itti_msg(msg_type, orig, dest) {}
itti_s1u_msg& operator=(itti_s1u_msg other)
{
itti_s1u_msg& operator=(itti_s1u_msg other) {
this->itti_msg::operator=(other);
return *this;
}
itti_s1u_msg(const itti_s1u_msg& i) : itti_msg(i) {}
itti_s1u_msg(const itti_s1u_msg& i, const task_id_t orig, const task_id_t dest) : itti_s1u_msg(i) {
itti_s1u_msg(
const itti_s1u_msg& i, const task_id_t orig, const task_id_t dest)
: itti_s1u_msg(i) {
origin = orig;
destination = dest;
}
};
//------------------------------------------------------------------------------
class itti_s1u_echo_request : public itti_s1u_msg {
public:
itti_s1u_echo_request(const task_id_t orig, const task_id_t dest):
itti_s1u_msg(S1U_ECHO_REQUEST, orig, dest) {
}
explicit itti_s1u_echo_request(const itti_s1u_echo_request& i) : itti_s1u_msg(i) {
public:
itti_s1u_echo_request(const task_id_t orig, const task_id_t dest)
: itti_s1u_msg(S1U_ECHO_REQUEST, orig, dest) {}
explicit itti_s1u_echo_request(const itti_s1u_echo_request& i)
: itti_s1u_msg(i) {
gtp_ies = i.gtp_ies;
}
itti_s1u_echo_request& operator=(itti_s1u_echo_request other)
{
itti_s1u_echo_request& operator=(itti_s1u_echo_request other) {
this->itti_s1u_msg::operator=(other);
std::swap(gtp_ies, other.gtp_ies);
return *this;
}
itti_s1u_echo_request(const itti_s1u_echo_request& i, const task_id_t orig, const task_id_t dest) :
itti_s1u_msg(i, orig, dest) {
itti_s1u_echo_request(
const itti_s1u_echo_request& i, const task_id_t orig,
const task_id_t dest)
: itti_s1u_msg(i, orig, dest) {
gtp_ies = i.gtp_ies;
}
const char* get_msg_name() {return "S1U_ECHO_REQUEST";};
const char* get_msg_name() { return "S1U_ECHO_REQUEST"; };
gtpv1u::gtpv1u_echo_request gtp_ies;
};
//------------------------------------------------------------------------------
class itti_s1u_echo_response : public itti_s1u_msg {
public:
itti_s1u_echo_response(const task_id_t orig, const task_id_t dest):
itti_s1u_msg(S1U_ECHO_RESPONSE, orig, dest) {
}
explicit itti_s1u_echo_response(const itti_s1u_echo_response& i) : itti_s1u_msg(i) {
public:
itti_s1u_echo_response(const task_id_t orig, const task_id_t dest)
: itti_s1u_msg(S1U_ECHO_RESPONSE, orig, dest) {}
explicit itti_s1u_echo_response(const itti_s1u_echo_response& i)
: itti_s1u_msg(i) {
gtp_ies = i.gtp_ies;
}
itti_s1u_echo_response& operator=(itti_s1u_echo_response other)
{
itti_s1u_echo_response& operator=(itti_s1u_echo_response other) {
this->itti_s1u_msg::operator=(other);
std::swap(gtp_ies, other.gtp_ies);
return *this;
}
itti_s1u_echo_response(const itti_s1u_echo_response& i, const task_id_t orig, const task_id_t dest) :
itti_s1u_msg(i, orig, dest) {
itti_s1u_echo_response(
const itti_s1u_echo_response& i, const task_id_t orig,
const task_id_t dest)
: itti_s1u_msg(i, orig, dest) {
gtp_ies = i.gtp_ies;
}
const char* get_msg_name() {return "S1U_ECHO_RESPONSE";};
const char* get_msg_name() { return "S1U_ECHO_RESPONSE"; };
gtpv1u::gtpv1u_echo_response gtp_ies;
};
//------------------------------------------------------------------------------
class itti_s1u_error_indication : public itti_s1u_msg {
public:
itti_s1u_error_indication(const task_id_t orig, const task_id_t dest):
itti_s1u_msg(S1U_ERROR_INDICATION, orig, dest) {
}
explicit itti_s1u_error_indication(const itti_s1u_error_indication& i) : itti_s1u_msg(i) {
public:
itti_s1u_error_indication(const task_id_t orig, const task_id_t dest)
: itti_s1u_msg(S1U_ERROR_INDICATION, orig, dest) {}
explicit itti_s1u_error_indication(const itti_s1u_error_indication& i)
: itti_s1u_msg(i) {
gtp_ies = i.gtp_ies;
}
itti_s1u_error_indication& operator=(itti_s1u_error_indication other)
{
itti_s1u_error_indication& operator=(itti_s1u_error_indication other) {
this->itti_s1u_msg::operator=(other);
std::swap(gtp_ies, other.gtp_ies);
return *this;
}
itti_s1u_error_indication(const itti_s1u_error_indication& i, const task_id_t orig, const task_id_t dest) :
itti_s1u_msg(i, orig, dest) {
itti_s1u_error_indication(
const itti_s1u_error_indication& i, const task_id_t orig,
const task_id_t dest)
: itti_s1u_msg(i, orig, dest) {
gtp_ies = i.gtp_ies;
}
const char* get_msg_name() {return "S1U_ERROR_INDICATION";};
const char* get_msg_name() { return "S1U_ERROR_INDICATION"; };
gtpv1u::gtpv1u_error_indication gtp_ies;
};
//------------------------------------------------------------------------------
class itti_s1u_supported_extension_headers_notification : public itti_s1u_msg {
public:
itti_s1u_supported_extension_headers_notification(const task_id_t orig, const task_id_t dest):
itti_s1u_msg(S1U_SUPPORTED_EXTENSION_HEADERS_NOTIFICATION, orig, dest) {
}
explicit itti_s1u_supported_extension_headers_notification(const itti_s1u_supported_extension_headers_notification& i) : itti_s1u_msg(i) {
public:
itti_s1u_supported_extension_headers_notification(
const task_id_t orig, const task_id_t dest)
: itti_s1u_msg(S1U_SUPPORTED_EXTENSION_HEADERS_NOTIFICATION, orig, dest) {
}
explicit itti_s1u_supported_extension_headers_notification(
const itti_s1u_supported_extension_headers_notification& i)
: itti_s1u_msg(i) {
gtp_ies = i.gtp_ies;
}
itti_s1u_supported_extension_headers_notification& operator=(itti_s1u_supported_extension_headers_notification other)
{
itti_s1u_supported_extension_headers_notification& operator=(
itti_s1u_supported_extension_headers_notification other) {
this->itti_s1u_msg::operator=(other);
std::swap(gtp_ies, other.gtp_ies);
return *this;
}
itti_s1u_supported_extension_headers_notification(const itti_s1u_supported_extension_headers_notification& i, const task_id_t orig, const task_id_t dest) :
itti_s1u_msg(i, orig, dest) {
itti_s1u_supported_extension_headers_notification(
const itti_s1u_supported_extension_headers_notification& i,
const task_id_t orig, const task_id_t dest)
: itti_s1u_msg(i, orig, dest) {
gtp_ies = i.gtp_ies;
}
const char* get_msg_name() {return "S1U_SUPPORTED_EXTENSION_HEADERS_NOTIFICATION";};
const char* get_msg_name() {
return "S1U_SUPPORTED_EXTENSION_HEADERS_NOTIFICATION";
};
gtpv1u::gtpv1u_supported_extension_headers_notification gtp_ies;
};
//------------------------------------------------------------------------------
class itti_s1u_end_marker : public itti_s1u_msg {
public:
itti_s1u_end_marker(const task_id_t orig, const task_id_t dest):
itti_s1u_msg(S1U_END_MARKER, orig, dest) {
}
public:
itti_s1u_end_marker(const task_id_t orig, const task_id_t dest)
: itti_s1u_msg(S1U_END_MARKER, orig, dest) {}
explicit itti_s1u_end_marker(const itti_s1u_end_marker& i) : itti_s1u_msg(i) {
gtp_ies = i.gtp_ies;
}
itti_s1u_end_marker& operator=(itti_s1u_end_marker other)
{
itti_s1u_end_marker& operator=(itti_s1u_end_marker other) {
this->itti_s1u_msg::operator=(other);
std::swap(gtp_ies, other.gtp_ies);
return *this;
}
itti_s1u_end_marker(const itti_s1u_end_marker& i, const task_id_t orig, const task_id_t dest) :
itti_s1u_msg(i, orig, dest) {
itti_s1u_end_marker(
const itti_s1u_end_marker& i, const task_id_t orig, const task_id_t dest)
: itti_s1u_msg(i, orig, dest) {
gtp_ies = i.gtp_ies;
}
const char* get_msg_name() {return "S1U_END_MARKER";};
const char* get_msg_name() { return "S1U_END_MARKER"; };
gtpv1u::gtpv1u_end_marker gtp_ies;
};
......
This diff is collapsed.
......@@ -3,9 +3,9 @@
* 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.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (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
*
......@@ -34,15 +34,18 @@
#include <set>
class itti_sx_restore : public itti_msg {
public:
itti_sx_restore(const task_id_t origin, const task_id_t destination):
itti_msg(RESTORE_SX_SESSIONS, origin, destination), sessions() {}
itti_sx_restore(const itti_sx_restore& i) : itti_msg(i), sessions(i.sessions) {}
itti_sx_restore(const itti_sx_restore& i, const task_id_t orig, const task_id_t dest) : itti_sx_restore(i) {
public:
itti_sx_restore(const task_id_t origin, const task_id_t destination)
: itti_msg(RESTORE_SX_SESSIONS, origin, destination), sessions() {}
itti_sx_restore(const itti_sx_restore& i)
: itti_msg(i), sessions(i.sessions) {}
itti_sx_restore(
const itti_sx_restore& i, const task_id_t orig, const task_id_t dest)
: itti_sx_restore(i) {
origin = orig;
destination = dest;
}
const char* get_msg_name() {return "SX_RESTORE";};
const char* get_msg_name() { return "SX_RESTORE"; };
std::set<pfcp::fseid_t> sessions;
};
......
This diff is collapsed.
......@@ -3,9 +3,9 @@
* 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.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (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
*
......@@ -33,10 +33,10 @@
#include <iostream>
class stream_serializable {
public:
public:
virtual void dump_to(std::ostream& os) = 0;
virtual void load_from(std::istream& is) = 0;
//virtual ~serializable() = 0;
// virtual ~serializable() = 0;
};
#endif /* FILE_SERIALIZABLE_HPP_SEEN */
......@@ -3,9 +3,9 @@
* 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.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (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
*
......@@ -34,8 +34,8 @@
#include <inttypes.h>
//------------------------------------------------------------------------------
void xgpp_conv::paa_to_pfcp_ue_ip_address(const paa_t& paa, pfcp::ue_ip_address_t& ue_ip_address)
{
void xgpp_conv::paa_to_pfcp_ue_ip_address(
const paa_t& paa, pfcp::ue_ip_address_t& ue_ip_address) {
switch (paa.pdn_type.pdn_type) {
case PDN_TYPE_E_IPV4:
ue_ip_address.v4 = 1;
......@@ -52,16 +52,13 @@ void xgpp_conv::paa_to_pfcp_ue_ip_address(const paa_t& paa, pfcp::ue_ip_address_
ue_ip_address.ipv6_address = paa.ipv6_address;
break;
case PDN_TYPE_E_NON_IP:
default:
;
default:;
}
}
//------------------------------------------------------------------------------
void xgpp_conv::pdn_ip_to_pfcp_ue_ip_address(const pdn_type_t& pdn_type,
const struct in_addr& ipv4_address,
const struct in6_addr ipv6_address,
pfcp::ue_ip_address_t& ue_ip_address)
{
void xgpp_conv::pdn_ip_to_pfcp_ue_ip_address(
const pdn_type_t& pdn_type, const struct in_addr& ipv4_address,
const struct in6_addr ipv6_address, pfcp::ue_ip_address_t& ue_ip_address) {
switch (pdn_type.pdn_type) {
case PDN_TYPE_E_IPV4:
ue_ip_address.v4 = 1;
......@@ -78,13 +75,12 @@ void xgpp_conv::pdn_ip_to_pfcp_ue_ip_address(const pdn_type_t& pdn_type,
ue_ip_address.ipv6_address = ipv6_address;
break;
case PDN_TYPE_E_NON_IP:
default:
;
default:;
}
}
//------------------------------------------------------------------------------
void xgpp_conv::pfcp_to_core_fteid(const pfcp::fteid_t& pfteid, fteid_t& fteid)
{
void xgpp_conv::pfcp_to_core_fteid(
const pfcp::fteid_t& pfteid, fteid_t& fteid) {
fteid.v4 = pfteid.v4;
fteid.v6 = pfteid.v6;
fteid.ipv4_address.s_addr = pfteid.ipv4_address.s_addr;
......@@ -92,8 +88,8 @@ void xgpp_conv::pfcp_to_core_fteid(const pfcp::fteid_t& pfteid, fteid_t& fteid)
fteid.teid_gre_key = pfteid.teid;
}
//------------------------------------------------------------------------------
void xgpp_conv::pfcp_from_core_fteid(pfcp::fteid_t& pfteid, const fteid_t& fteid)
{
void xgpp_conv::pfcp_from_core_fteid(
pfcp::fteid_t& pfteid, const fteid_t& fteid) {
pfteid.chid = 0;
pfteid.ch = 0;
pfteid.choose_id = 0;
......@@ -104,8 +100,7 @@ void xgpp_conv::pfcp_from_core_fteid(pfcp::fteid_t& pfteid, const fteid_t& fteid
pfteid.teid = fteid.teid_gre_key;
}
//------------------------------------------------------------------------------
void xgpp_conv::pfcp_cause_to_core_cause(const pfcp::cause_t& pc, cause_t& c)
{
void xgpp_conv::pfcp_cause_to_core_cause(const pfcp::cause_t& pc, cause_t& c) {
switch (pc.cause_value) {
case pfcp::CAUSE_VALUE_REQUEST_ACCEPTED:
c.cause_value = REQUEST_ACCEPTED;
......@@ -136,25 +131,24 @@ void xgpp_conv::pfcp_cause_to_core_cause(const pfcp::cause_t& pc, cause_t& c)
}
//------------------------------------------------------------------------------
bool xgpp_conv::endpoint_to_gtp_u_peer_address(const endpoint& ep, gtp_u_peer_address_t& peer_address)
{
bool xgpp_conv::endpoint_to_gtp_u_peer_address(
const endpoint& ep, gtp_u_peer_address_t& peer_address) {
switch (ep.family()) {
case AF_INET: {
const struct sockaddr_in * const sin = reinterpret_cast<const sockaddr_in* const>(&ep.addr_storage);
const struct sockaddr_in* const sin =
reinterpret_cast<const sockaddr_in* const>(&ep.addr_storage);
peer_address.ipv4_address.s_addr = sin->sin_addr.s_addr;
peer_address.is_v4 = true;
return true;
}
break;
} break;
case AF_INET6: {
const struct sockaddr_in6 * const sin6 = reinterpret_cast<const sockaddr_in6* const>(&ep.addr_storage);
const struct sockaddr_in6* const sin6 =
reinterpret_cast<const sockaddr_in6* const>(&ep.addr_storage);
peer_address.ipv6_address = sin6->sin6_addr;
peer_address.is_v4 = false;
return true;
}
break;
} break;
default:
return false;
}
}
......@@ -3,9 +3,9 @@
* 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.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (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
*
......@@ -35,15 +35,16 @@
namespace xgpp_conv {
void paa_to_pfcp_ue_ip_address(const paa_t& paa, pfcp::ue_ip_address_t& ue_ip_address);
void pdn_ip_to_pfcp_ue_ip_address(const pdn_type_t& pdn_type,
const struct in_addr& ipv4_address,
const struct in6_addr ipv6_address,
pfcp::ue_ip_address_t& ue_ip_address);
void pfcp_to_core_fteid(const pfcp::fteid_t& pfteid, fteid_t& fteid);
void pfcp_from_core_fteid(pfcp::fteid_t& pfteid, const fteid_t& fteid);
void pfcp_cause_to_core_cause(const pfcp::cause_t& pc, cause_t& c);
bool endpoint_to_gtp_u_peer_address(const endpoint& ep, gtp_u_peer_address_t& gpa);
}
void paa_to_pfcp_ue_ip_address(
const paa_t& paa, pfcp::ue_ip_address_t& ue_ip_address);
void pdn_ip_to_pfcp_ue_ip_address(
const pdn_type_t& pdn_type, const struct in_addr& ipv4_address,
const struct in6_addr ipv6_address, pfcp::ue_ip_address_t& ue_ip_address);
void pfcp_to_core_fteid(const pfcp::fteid_t& pfteid, fteid_t& fteid);
void pfcp_from_core_fteid(pfcp::fteid_t& pfteid, const fteid_t& fteid);
void pfcp_cause_to_core_cause(const pfcp::cause_t& pc, cause_t& c);
bool endpoint_to_gtp_u_peer_address(
const endpoint& ep, gtp_u_peer_address_t& gpa);
} // namespace xgpp_conv
#endif /* FILE_3GPP_CONVERSIONS_HPP_SEEN */
......@@ -3,9 +3,9 @@
* 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.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (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
*
......@@ -47,32 +47,37 @@
using namespace util;
extern itti_mw *itti_inst;
void async_cmd_task (void*);
extern itti_mw* itti_inst;
void async_cmd_task(void*);
//------------------------------------------------------------------------------
void async_cmd_task (void* args_p)
{
void async_cmd_task(void* args_p) {
const task_id_t task_id = TASK_ASYNC_SHELL_CMD;
const thread_sched_params* const sched_params = (const util::thread_sched_params* const)args_p;
const thread_sched_params* const sched_params =
(const util::thread_sched_params* const) args_p;
sched_params->apply(task_id, Logger::async_cmd());
itti_inst->notify_task_ready(task_id);
do {
std::shared_ptr<itti_msg> shared_msg = itti_inst->receive_msg(task_id);
auto *msg = shared_msg.get();
auto* msg = shared_msg.get();
switch (msg->msg_type) {
case ASYNC_SHELL_CMD:
if (itti_async_shell_cmd* to = dynamic_cast<itti_async_shell_cmd*>(msg)) {
int rc = system ((const char*)to->system_command.c_str());
if (itti_async_shell_cmd* to =
dynamic_cast<itti_async_shell_cmd*>(msg)) {
int rc = system((const char*) to->system_command.c_str());
if (rc) {
Logger::async_cmd().error( "Failed cmd from %d: %s ", to->origin, (const char*)to->system_command.c_str());
Logger::async_cmd().error(
"Failed cmd from %d: %s ", to->origin,
(const char*) to->system_command.c_str());
if (to->is_abort_on_error) {
Logger::async_cmd().error( "Terminate cause failed cmd %s at %s:%d", to->system_command.c_str(), to->src_file.c_str(), to->src_line);
Logger::async_cmd().error(
"Terminate cause failed cmd %s at %s:%d",
to->system_command.c_str(), to->src_file.c_str(),
to->src_line);
itti_inst->send_terminate_msg(to->origin);
}
}
......@@ -81,13 +86,14 @@ void async_cmd_task (void* args_p)
case TIME_OUT:
if (itti_msg_timeout* to = dynamic_cast<itti_msg_timeout*>(msg)) {
Logger::async_cmd().info( "TIME-OUT event timer id %d", to->timer_id);
Logger::async_cmd().info("TIME-OUT event timer id %d", to->timer_id);
}
break;
case TERMINATE:
if (itti_msg_terminate *terminate = dynamic_cast<itti_msg_terminate*>(msg)) {
Logger::async_cmd().info( "Received terminate message");
if (itti_msg_terminate* terminate =
dynamic_cast<itti_msg_terminate*>(msg)) {
Logger::async_cmd().info("Received terminate message");
return;
}
break;
......@@ -96,35 +102,38 @@ void async_cmd_task (void* args_p)
break;
default:
Logger::sgwc_app().info( "no handler for msg type %d", msg->msg_type);
Logger::sgwc_app().info("no handler for msg type %d", msg->msg_type);
}
} while (true);
}
//------------------------------------------------------------------------------
async_shell_cmd::async_shell_cmd (util::thread_sched_params& sched_params)
{
Logger::async_cmd().startup( "Starting..." );
async_shell_cmd::async_shell_cmd(util::thread_sched_params& sched_params) {
Logger::async_cmd().startup("Starting...");
if (itti_inst->create_task(TASK_ASYNC_SHELL_CMD, async_cmd_task, &sched_params) ) {
Logger::async_cmd().error( "Cannot create task TASK_ASYNC_SHELL_CMD" );
throw std::runtime_error( "Cannot create task TASK_ASYNC_SHELL_CMD" );
if (itti_inst->create_task(
TASK_ASYNC_SHELL_CMD, async_cmd_task, &sched_params)) {
Logger::async_cmd().error("Cannot create task TASK_ASYNC_SHELL_CMD");
throw std::runtime_error("Cannot create task TASK_ASYNC_SHELL_CMD");
}
Logger::async_cmd().startup( "Started" );
Logger::async_cmd().startup("Started");
}
//------------------------------------------------------------------------------
int async_shell_cmd::run_command (const task_id_t sender_itti_task, const bool is_abort_on_error, const char* src_file, const int src_line, const std::string& cmd_str)
{
itti_async_shell_cmd cmd(sender_itti_task, TASK_ASYNC_SHELL_CMD, cmd_str, is_abort_on_error, src_file, src_line);
std::shared_ptr<itti_async_shell_cmd> msg = std::make_shared<itti_async_shell_cmd>(cmd);
int async_shell_cmd::run_command(
const task_id_t sender_itti_task, const bool is_abort_on_error,
const char* src_file, const int src_line, const std::string& cmd_str) {
itti_async_shell_cmd cmd(
sender_itti_task, TASK_ASYNC_SHELL_CMD, cmd_str, is_abort_on_error,
src_file, src_line);
std::shared_ptr<itti_async_shell_cmd> msg =
std::make_shared<itti_async_shell_cmd>(cmd);
int ret = itti_inst->send_msg(msg);
if (RETURNok != ret) {
Logger::async_cmd().error( "Could not send ITTI message to task TASK_ASYNC_SHELL_CMD");
Logger::async_cmd().error(
"Could not send ITTI message to task TASK_ASYNC_SHELL_CMD");
return RETURNerror;
}
return RETURNok;
}
......@@ -3,9 +3,9 @@
* 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.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (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
*
......@@ -20,12 +20,12 @@
*/
/*! \file async_shell_cmd.hpp
\brief We still use some unix commands for convenience, and we did not have to replace them by system calls
\ Instead of calling C system(...) that can take a lot of time (creation of a process, etc), in many cases
\ it doesn't hurt to do this asynchronously, may be we must tweak thread priority, pin it to a CPU, etc (TODO later)
\author Lionel GAUTHIER
\date 2017
\email: lionel.gauthier@eurecom.fr
\brief We still use some unix commands for convenience, and we did not have
to replace them by system calls \ Instead of calling C system(...) that can
take a lot of time (creation of a process, etc), in many cases \ it doesn't
hurt to do this asynchronously, may be we must tweak thread priority, pin it
to a CPU, etc (TODO later) \author Lionel GAUTHIER \date 2017 \email:
lionel.gauthier@eurecom.fr
*/
#ifndef FILE_ASYNC_SHELL_CMD_HPP_SEEN
......@@ -39,19 +39,20 @@
namespace util {
class async_shell_cmd {
private:
private:
std::thread::id thread_id;
std::thread thread;
public:
public:
explicit async_shell_cmd(util::thread_sched_params& sched_params);
~async_shell_cmd() {}
async_shell_cmd(async_shell_cmd const&) = delete;
void operator=(async_shell_cmd const&) = delete;
int run_command (const task_id_t sender_itti_task, const bool is_abort_on_error, const char* src_file, const int src_line, const std::string& cmd_str);
int run_command(
const task_id_t sender_itti_task, const bool is_abort_on_error,
const char* src_file, const int src_line, const std::string& cmd_str);
};
}
} // namespace util
#endif /* FILE_ASYNC_SHELL_CMD_HPP_SEEN */
......@@ -3,9 +3,9 @@
* 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.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (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
*
......@@ -34,33 +34,27 @@
#include <arpa/inet.h>
static const char hex_to_ascii_table[16] = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f',
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f',
};
static const signed char ascii_to_hex_table[0x100] = {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1,
-1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
};
void conv::hexa_to_ascii (
uint8_t * from,
char *to,
size_t length)
{
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8,
9, -1, -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1};
void conv::hexa_to_ascii(uint8_t* from, char* to, size_t length) {
size_t i;
for (i = 0; i < length; i++) {
......@@ -72,83 +66,70 @@ void conv::hexa_to_ascii (
}
}
int conv::ascii_to_hex (
uint8_t * dst,
const char *h)
{
const unsigned char *hex = (const unsigned char *)h;
int conv::ascii_to_hex(uint8_t* dst, const char* h) {
const unsigned char* hex = (const unsigned char*) h;
unsigned i = 0;
for (;;) {
int high,
low;
int high, low;
while (*hex && isspace (*hex))
hex++;
while (*hex && isspace(*hex)) hex++;
if (!*hex)
return 1;
if (!*hex) return 1;
high = ascii_to_hex_table[*hex++];
if (high < 0)
return 0;
if (high < 0) return 0;
while (*hex && isspace (*hex))
hex++;
while (*hex && isspace(*hex)) hex++;
if (!*hex)
return 0;
if (!*hex) return 0;
low = ascii_to_hex_table[*hex++];
if (low < 0)
return 0;
if (low < 0) return 0;
dst[i++] = (high << 4) | low;
}
}
//------------------------------------------------------------------------------
std::string conv::mccToString(const uint8_t digit1, const uint8_t digit2, const uint8_t digit3)
{
std::string conv::mccToString(
const uint8_t digit1, const uint8_t digit2, const uint8_t digit3) {
std::string s = {};
uint16_t mcc16 = digit1*100+digit2*10+digit3;
//s.append(std::to_string(digit1)).append(std::to_string(digit2)).append(std::to_string(digit3));
uint16_t mcc16 = digit1 * 100 + digit2 * 10 + digit3;
// s.append(std::to_string(digit1)).append(std::to_string(digit2)).append(std::to_string(digit3));
s.append(std::to_string(mcc16));
return s;
}
//------------------------------------------------------------------------------
std::string conv::mncToString(const uint8_t digit1, const uint8_t digit2, const uint8_t digit3)
{
std::string conv::mncToString(
const uint8_t digit1, const uint8_t digit2, const uint8_t digit3) {
std::string s = {};
uint16_t mcc16 = 0;
if (digit3 == 0x0F) {
mcc16 = digit1*10+digit2;
mcc16 = digit1 * 10 + digit2;
} else {
mcc16 = digit1*100+digit2*10+digit3;
mcc16 = digit1 * 100 + digit2 * 10 + digit3;
}
s.append(std::to_string(mcc16));
return s;
}
//------------------------------------------------------------------------------
struct in_addr conv::fromString(const std::string addr4)
{
struct in_addr conv::fromString(const std::string addr4) {
unsigned char buf[sizeof(struct in6_addr)] = {};
int s = inet_pton(AF_INET, addr4.c_str(), buf);
struct in_addr * ia = (struct in_addr *)buf;
struct in_addr* ia = (struct in_addr*) buf;
return *ia;
}
//------------------------------------------------------------------------------
std::string conv::toString(const struct in_addr& inaddr)
{
std::string conv::toString(const struct in_addr& inaddr) {
std::string s = {};
char str[INET6_ADDRSTRLEN] = {};
if (inet_ntop(AF_INET, (const void *)&inaddr, str, INET6_ADDRSTRLEN) == NULL) {
if (inet_ntop(AF_INET, (const void*) &inaddr, str, INET6_ADDRSTRLEN) ==
NULL) {
s.append("Error in_addr");
} else {
s.append(str);
......@@ -156,16 +137,14 @@ std::string conv::toString(const struct in_addr& inaddr)
return s;
}
//------------------------------------------------------------------------------
std::string conv::toString(const struct in6_addr& in6addr)
{
std::string conv::toString(const struct in6_addr& in6addr) {
std::string s = {};
char str[INET6_ADDRSTRLEN] = {};
if (inet_ntop(AF_INET6, (const void *)&in6addr, str, INET6_ADDRSTRLEN) == nullptr) {
if (inet_ntop(AF_INET6, (const void*) &in6addr, str, INET6_ADDRSTRLEN) ==
nullptr) {
s.append("Error in6_addr");
} else {
s.append(str);
}
return s;
}
......@@ -3,9 +3,9 @@
* 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.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (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
*
......@@ -32,27 +32,27 @@
#include <string>
#include <netinet/in.h>
/* Used to format an uint32_t containing an ipv4 address */
#define IN_ADDR_FMT "%u.%u.%u.%u"
#define PRI_IN_ADDR(aDDRESS) \
(uint8_t)((aDDRESS.s_addr) & 0x000000ff), \
(uint8_t)(((aDDRESS.s_addr) & 0x0000ff00) >> 8 ), \
(uint8_t)(((aDDRESS.s_addr) & 0x0000ff00) >> 8), \
(uint8_t)(((aDDRESS.s_addr) & 0x00ff0000) >> 16), \
(uint8_t)(((aDDRESS.s_addr) & 0xff000000) >> 24)
#define IPV4_ADDR_DISPLAY_8(aDDRESS) \
(aDDRESS)[0], (aDDRESS)[1], (aDDRESS)[2], (aDDRESS)[3]
class conv {
public:
static void hexa_to_ascii(uint8_t *from, char *to, size_t length);
static int ascii_to_hex(uint8_t *dst, const char *h);
static void hexa_to_ascii(uint8_t* from, char* to, size_t length);
static int ascii_to_hex(uint8_t* dst, const char* h);
static struct in_addr fromString(const std::string addr4);
static std::string toString(const struct in_addr& inaddr);
static std::string toString(const struct in6_addr& in6addr);
static std::string mccToString(const uint8_t digit1, const uint8_t digit2, const uint8_t digit3);
static std::string mncToString(const uint8_t digit1, const uint8_t digit2, const uint8_t digit3);
static std::string mccToString(
const uint8_t digit1, const uint8_t digit2, const uint8_t digit3);
static std::string mncToString(
const uint8_t digit1, const uint8_t digit2, const uint8_t digit3);
};
#endif /* FILE_CONVERSIONS_HPP_SEEN */
This diff is collapsed.
......@@ -11,7 +11,7 @@
* 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.
*/
*/
#include <sys/socket.h>
#include <stdlib.h>
......@@ -23,7 +23,6 @@
#include <unistd.h>
#include <net/if.h>
#include <fstream> // std::ifstream
#include <string>
......@@ -36,39 +35,39 @@
using namespace std;
//------------------------------------------------------------------------------
bool util::get_iface_l2_addr(const std::string& iface, std::string& mac)
{
std::string mac_address_path = fmt::format("/sys/class/net/{}/address", iface);
std::ifstream mac_address_in(mac_address_path.c_str(), ios_base::in | ios_base::binary );
bool util::get_iface_l2_addr(const std::string& iface, std::string& mac) {
std::string mac_address_path =
fmt::format("/sys/class/net/{}/address", iface);
std::ifstream mac_address_in(
mac_address_path.c_str(), ios_base::in | ios_base::binary);
char wb[32];
mac_address_in.get(wb, 32);
mac.assign(wb);
Logger::pfcp_switch().error("Found IFace %s MAC %s", iface.c_str(), mac.c_str());
Logger::pfcp_switch().error(
"Found IFace %s MAC %s", iface.c_str(), mac.c_str());
mac.erase(std::remove(mac.begin(), mac.end(), ':'), mac.end());
return true;
// ifr = {};
// strncpy ((char *) ifr.ifr_name, ifname, IFNAMSIZ);
// if (ioctl(sd, SIOCGIFFLAGS, &ifr) == 0) {
// if (! (ifr.ifr_flags & IFF_LOOPBACK)) { // don't count loopback
// if (ioctl(sd, SIOCGIFHWADDR, &ifr) == 0) {
// memcpy(pdn_mac_address, ifr.ifr_hwaddr.sa_data, 6);
// }
// }
// }
// ifr = {};
// strncpy ((char *) ifr.ifr_name, ifname, IFNAMSIZ);
// if (ioctl(sd, SIOCGIFFLAGS, &ifr) == 0) {
// if (! (ifr.ifr_flags & IFF_LOOPBACK)) { // don't count loopback
// if (ioctl(sd, SIOCGIFHWADDR, &ifr) == 0) {
// memcpy(pdn_mac_address, ifr.ifr_hwaddr.sa_data, 6);
// }
// }
// }
}
//------------------------------------------------------------------------------
bool util::get_gateway_and_iface(std::string& gw, std::string& iface)
{
bool util::get_gateway_and_iface(std::string& gw, std::string& iface) {
int received_bytes = 0, msg_len = 0, route_attribute_len = 0;
int sock = -1, msgseq = 0;
struct nlmsghdr *nlh, *nlmsg;
struct rtmsg *route_entry;
struct rtmsg* route_entry;
// This struct contain route attributes (route type)
struct rtattr *route_attribute;
char gateway_address[INET_ADDRSTRLEN], interface[IF_NAMESIZE+1];
struct rtattr* route_attribute;
char gateway_address[INET_ADDRSTRLEN], interface[IF_NAMESIZE + 1];
char msgbuf[BUFFER_SIZE], buffer[BUFFER_SIZE];
char *ptr = buffer;
char* ptr = buffer;
struct timeval tv;
int rv = RETURNok;
......@@ -83,18 +82,22 @@ bool util::get_gateway_and_iface(std::string& gw, std::string& iface)
memset(buffer, 0, sizeof(buffer));
/* point the header and the msg structure pointers into the buffer */
nlmsg = (struct nlmsghdr *)msgbuf;
nlmsg = (struct nlmsghdr*) msgbuf;
/* Fill in the nlmsg header*/
nlmsg->nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg));
nlmsg->nlmsg_type = RTM_GETROUTE; // Get the routes from kernel routing table .
nlmsg->nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST; // The message is a request for dump.
nlmsg->nlmsg_type =
RTM_GETROUTE; // Get the routes from kernel routing table .
nlmsg->nlmsg_flags =
NLM_F_DUMP | NLM_F_REQUEST; // The message is a request for dump.
nlmsg->nlmsg_seq = msgseq++; // Sequence of the message packet.
nlmsg->nlmsg_pid = getpid(); // PID of process sending the request.
/* 1 Sec Timeout to avoid stall */
tv.tv_sec = 1;
setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, (struct timeval *)&tv, sizeof(struct timeval));
setsockopt(
sock, SOL_SOCKET, SO_RCVTIMEO, (struct timeval*) &tv,
sizeof(struct timeval));
/* send msg */
if (send(sock, nlmsg, nlmsg->nlmsg_len, 0) < 0) {
perror("send failed");
......@@ -109,12 +112,11 @@ bool util::get_gateway_and_iface(std::string& gw, std::string& iface)
return false;
}
nlh = (struct nlmsghdr *) ptr;
nlh = (struct nlmsghdr*) ptr;
/* Check if the header is valid */
if((NLMSG_OK(nlmsg, received_bytes) == 0) ||
(nlmsg->nlmsg_type == NLMSG_ERROR))
{
if ((NLMSG_OK(nlmsg, received_bytes) == 0) ||
(nlmsg->nlmsg_type == NLMSG_ERROR)) {
perror("Error in received packet");
return false;
}
......@@ -128,32 +130,31 @@ bool util::get_gateway_and_iface(std::string& gw, std::string& iface)
}
/* Break if its not a multi part message */
if ((nlmsg->nlmsg_flags & NLM_F_MULTI) == 0)
break;
if ((nlmsg->nlmsg_flags & NLM_F_MULTI) == 0) break;
} while ((nlmsg->nlmsg_seq != msgseq) || (nlmsg->nlmsg_pid != getpid()));
/* parse response */
for ( ; NLMSG_OK(nlh, received_bytes); nlh = NLMSG_NEXT(nlh, received_bytes)) {
for (; NLMSG_OK(nlh, received_bytes); nlh = NLMSG_NEXT(nlh, received_bytes)) {
/* Get the route data */
route_entry = (struct rtmsg *) NLMSG_DATA(nlh);
route_entry = (struct rtmsg*) NLMSG_DATA(nlh);
/* We are just interested in main routing table */
if (route_entry->rtm_table != RT_TABLE_MAIN)
continue;
if (route_entry->rtm_table != RT_TABLE_MAIN) continue;
route_attribute = (struct rtattr *) RTM_RTA(route_entry);
route_attribute = (struct rtattr*) RTM_RTA(route_entry);
route_attribute_len = RTM_PAYLOAD(nlh);
/* Loop through all attributes */
for ( ; RTA_OK(route_attribute, route_attribute_len);
for (; RTA_OK(route_attribute, route_attribute_len);
route_attribute = RTA_NEXT(route_attribute, route_attribute_len)) {
switch(route_attribute->rta_type) {
switch (route_attribute->rta_type) {
case RTA_OIF:
if_indextoname(*(int *)RTA_DATA(route_attribute), interface);
if_indextoname(*(int*) RTA_DATA(route_attribute), interface);
break;
case RTA_GATEWAY:
inet_ntop(AF_INET, RTA_DATA(route_attribute),
gateway_address, sizeof(gateway_address));
inet_ntop(
AF_INET, RTA_DATA(route_attribute), gateway_address,
sizeof(gateway_address));
break;
default:
break;
......@@ -171,4 +172,3 @@ bool util::get_gateway_and_iface(std::string& gw, std::string& iface)
close(sock);
return true;
}
......@@ -31,7 +31,7 @@
#include <string>
namespace util {
bool get_iface_l2_addr(const std::string& iface, std::string& mac);
bool get_gateway_and_iface(std::string& gw, std::string& iface);
}
bool get_iface_l2_addr(const std::string& iface, std::string& mac);
bool get_gateway_and_iface(std::string& gw, std::string& iface);
} // namespace util
#endif /* FILE_GET_GATEWAY_NETLINK_HPP_SEEN */
This diff is collapsed.
......@@ -27,11 +27,14 @@
*/
#ifndef FILE_IF_HPP_SEEN
#define FILE_IF_HPP_SEEN
# include <string>
#include <string>
int get_gateway_and_iface(std::string *gw /*OUT*/, std::string *iface /*OUT*/);
int get_inet_addr_from_iface(const std::string& if_name, struct in_addr& inet_addr);
int get_gateway_and_iface(std::string* gw /*OUT*/, std::string* iface /*OUT*/);
int get_inet_addr_from_iface(
const std::string& if_name, struct in_addr& inet_addr);
int get_mtu_from_iface(const std::string& if_name, uint32_t& mtu);
int get_inet_addr_infos_from_iface(const std::string& if_name, struct in_addr& inet_addr, struct in_addr& inet_netmask, unsigned int& mtu);
int get_inet_addr_infos_from_iface(
const std::string& if_name, struct in_addr& inet_addr,
struct in_addr& inet_netmask, unsigned int& mtu);
#endif /* FILE_IF_HPP_SEEN */
......@@ -3,9 +3,9 @@
* 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.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (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
*
......@@ -38,84 +38,90 @@
#include <sys/types.h>
#include <libgen.h>
int g_fd_pid_file = -1;
__pid_t g_pid = -1;
//------------------------------------------------------------------------------
std::string util::get_exe_absolute_path(const std::string &basepath, const unsigned int instance)
{
std::string util::get_exe_absolute_path(
const std::string& basepath, const unsigned int instance) {
#define MAX_FILE_PATH_LENGTH 255
char pid_file_name[MAX_FILE_PATH_LENGTH+1] = {0};
char *exe_basename = NULL;
char pid_file_name[MAX_FILE_PATH_LENGTH + 1] = {0};
char* exe_basename = NULL;
int rv = 0;
int num_chars = 0;
// get executable name
rv = readlink("/proc/self/exe",pid_file_name, 256);
if ( -1 == rv) {
rv = readlink("/proc/self/exe", pid_file_name, 256);
if (-1 == rv) {
return NULL;
}
pid_file_name[rv] = 0;
exe_basename = basename(pid_file_name);
// Add 6 for the other 5 characters in the path + null terminator + 2 chars for instance.
// Add 6 for the other 5 characters in the path + null terminator + 2 chars
// for instance.
num_chars = basepath.size() + strlen(exe_basename) + 6 + 2;
if (num_chars > MAX_FILE_PATH_LENGTH) {
num_chars = MAX_FILE_PATH_LENGTH;
}
snprintf(pid_file_name, num_chars, "%s/%s%02u.pid", basepath.c_str(), exe_basename, instance);
snprintf(
pid_file_name, num_chars, "%s/%s%02u.pid", basepath.c_str(), exe_basename,
instance);
return std::string(pid_file_name);
}
//------------------------------------------------------------------------------
int util::lockfile(int fd, int lock_type)
{
// lock on fd only, not on file on disk (do not prevent another process from modifying the file)
int util::lockfile(int fd, int lock_type) {
// lock on fd only, not on file on disk (do not prevent another process from
// modifying the file)
return lockf(fd, F_TLOCK, 0);
}
//------------------------------------------------------------------------------
bool util::is_pid_file_lock_success(const char * pid_file_name)
{
bool util::is_pid_file_lock_success(const char* pid_file_name) {
char pid_dec[64] = {0};
g_fd_pid_file = open(pid_file_name,
O_RDWR | O_CREAT,
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); /* Read/write by owner, read by grp, others */
if ( 0 > g_fd_pid_file) {
Logger::sgwc_app().error( "open filename %s failed %d:%s\n", pid_file_name, errno, strerror(errno));
g_fd_pid_file = open(
pid_file_name, O_RDWR | O_CREAT,
S_IRUSR | S_IWUSR | S_IRGRP |
S_IROTH); /* Read/write by owner, read by grp, others */
if (0 > g_fd_pid_file) {
Logger::sgwc_app().error(
"open filename %s failed %d:%s\n", pid_file_name, errno,
strerror(errno));
return false;
}
if ( 0 > util::lockfile(g_fd_pid_file, F_TLOCK)) {
Logger::sgwc_app().error( "lockfile filename %s failed %d:%s\n", pid_file_name, errno, strerror(errno));
if ( EACCES == errno || EAGAIN == errno ) {
if (0 > util::lockfile(g_fd_pid_file, F_TLOCK)) {
Logger::sgwc_app().error(
"lockfile filename %s failed %d:%s\n", pid_file_name, errno,
strerror(errno));
if (EACCES == errno || EAGAIN == errno) {
close(g_fd_pid_file);
}
return false;
}
// fruncate file content
if (ftruncate(g_fd_pid_file, 0)) {
Logger::sgwc_app().error( "truncate %s failed %d:%s\n", pid_file_name, errno, strerror(errno));
Logger::sgwc_app().error(
"truncate %s failed %d:%s\n", pid_file_name, errno, strerror(errno));
close(g_fd_pid_file);
return false;
}
// write PID in file
g_pid = getpid();
snprintf(pid_dec, 64 /* should be big enough */, "%ld", (long)g_pid);
if ((ssize_t)-1 == write(g_fd_pid_file, pid_dec, strlen(pid_dec))) {
Logger::sgwc_app().error( "write PID to filename %s failed %d:%s\n", pid_file_name, errno, strerror(errno));
snprintf(pid_dec, 64 /* should be big enough */, "%ld", (long) g_pid);
if ((ssize_t) -1 == write(g_fd_pid_file, pid_dec, strlen(pid_dec))) {
Logger::sgwc_app().error(
"write PID to filename %s failed %d:%s\n", pid_file_name, errno,
strerror(errno));
return false;
}
return true;
}
//------------------------------------------------------------------------------
void util::pid_file_unlock(void)
{
void util::pid_file_unlock(void) {
util::lockfile(g_fd_pid_file, F_ULOCK);
close(g_fd_pid_file);
g_fd_pid_file = -1;
}
......@@ -3,9 +3,9 @@
* 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.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (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
*
......@@ -39,14 +39,14 @@ namespace util {
*
* @return a string for the exe absolute path.
*/
std::string get_exe_absolute_path(const std::string &base_path, const unsigned int instance);
std::string get_exe_absolute_path(
const std::string& base_path, const unsigned int instance);
bool is_pid_file_lock_success(const char * pid_file_name);
bool is_pid_file_lock_success(const char* pid_file_name);
void pid_file_unlock(void);
int lockfile(int fd, int lock_type);
}
} // namespace util
#endif
This diff is collapsed.
......@@ -3,9 +3,9 @@
* 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.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (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
*
......@@ -32,12 +32,12 @@
namespace util {
std::string string_format( const char *format, ... );
std::string string_format(const char* format, ...);
std::string &ltrim(std::string &s);
std::string& ltrim(std::string& s);
// trim from end
std::string &rtrim(std::string &s);
std::string& rtrim(std::string& s);
// trim from both ends
std::string &trim(std::string &s);
}
std::string& trim(std::string& s);
} // namespace util
#endif
This diff is collapsed.
......@@ -3,9 +3,9 @@
* 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.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
* the OAI Public License, Version 1.1 (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
*
......@@ -35,12 +35,13 @@ namespace util {
class thread_sched_params {
public:
thread_sched_params() : cpu_id(0), sched_policy(SCHED_FIFO), sched_priority(84) {}
thread_sched_params()
: cpu_id(0), sched_policy(SCHED_FIFO), sched_priority(84) {}
int cpu_id;
int sched_policy;
int sched_priority;
void apply(const int task_id, _Logger& logger) const;
};
}
} // namespace util
#endif /* FILE_THREAD_SCHED_HPP_SEEN */
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.
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.
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.
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.
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