Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-SMF
Commits
36f6b3e5
Commit
36f6b3e5
authored
Jul 27, 2020
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'cpp_check' into 'develop'
CPP check See merge request oai/cn5g/oai-cn5g-smf!18
parents
481e3d88
352409cd
Changes
50
Show whitespace changes
Inline
Side-by-side
Showing
50 changed files
with
165 additions
and
212 deletions
+165
-212
src/common/3gpp_29.500.h
src/common/3gpp_29.500.h
+3
-2
src/common/3gpp_29.502.h
src/common/3gpp_29.502.h
+2
-2
src/common/3gpp_29.503.h
src/common/3gpp_29.503.h
+2
-2
src/common/3gpp_29.571.h
src/common/3gpp_29.571.h
+2
-2
src/common/amf.h
src/common/amf.h
+2
-2
src/common/dynamic_memory_check.h
src/common/dynamic_memory_check.h
+2
-2
src/common/logger.cpp
src/common/logger.cpp
+0
-48
src/common/nas/3gpp_24.007.h
src/common/nas/3gpp_24.007.h
+3
-2
src/common/nas/3gpp_33.401.h
src/common/nas/3gpp_33.401.h
+2
-2
src/common/nas/3gpp_36.401.h
src/common/nas/3gpp_36.401.h
+3
-2
src/common/nas/common_types.h
src/common/nas/common_types.h
+3
-2
src/common/nas/security_types.h
src/common/nas/security_types.h
+3
-2
src/common/smf.h
src/common/smf.h
+2
-2
src/common/utils/TLVDecoder.c
src/common/utils/TLVDecoder.c
+2
-2
src/common/utils/TLVDecoder.h
src/common/utils/TLVDecoder.h
+2
-2
src/common/utils/TLVEncoder.c
src/common/utils/TLVEncoder.c
+4
-4
src/common/utils/TLVEncoder.h
src/common/utils/TLVEncoder.h
+2
-2
src/common/utils/asn1_conversions.h
src/common/utils/asn1_conversions.h
+3
-2
src/common/utils/assertions.h
src/common/utils/assertions.h
+3
-2
src/common/utils/backtrace.c
src/common/utils/backtrace.c
+4
-3
src/common/utils/epc.cpp
src/common/utils/epc.cpp
+11
-5
src/common/utils/if.hpp
src/common/utils/if.hpp
+3
-2
src/common/utils/mime_parser.cpp
src/common/utils/mime_parser.cpp
+10
-4
src/common/utils/mime_parser.hpp
src/common/utils/mime_parser.hpp
+2
-2
src/nas/nas_message.c
src/nas/nas_message.c
+6
-30
src/nas/security/kdf.c
src/nas/security/kdf.c
+4
-4
src/nas/security/key_nas_deriver.c
src/nas/security/key_nas_deriver.c
+4
-4
src/nas/security/key_nas_encryption.c
src/nas/security/key_nas_encryption.c
+4
-4
src/nas/security/nas_stream_nea1.c
src/nas/security/nas_stream_nea1.c
+4
-4
src/nas/security/nas_stream_nea2.c
src/nas/security/nas_stream_nea2.c
+4
-4
src/nas/security/nas_stream_nia1.c
src/nas/security/nas_stream_nia1.c
+4
-26
src/nas/security/nas_stream_nia2.c
src/nas/security/nas_stream_nia2.c
+4
-4
src/nas/security/rijndael.c
src/nas/security/rijndael.c
+4
-4
src/nas/security/rijndael.h
src/nas/security/rijndael.h
+4
-4
src/nas/security/secu_defs.h
src/nas/security/secu_defs.h
+4
-4
src/nas/security/snow3g.c
src/nas/security/snow3g.c
+4
-4
src/nas/security/snow3g.h
src/nas/security/snow3g.h
+4
-4
src/nas/securityDef.h
src/nas/securityDef.h
+4
-4
src/nas/sm/sm_msg.c
src/nas/sm/sm_msg.c
+2
-0
src/pfcp/3gpp_29.244.cpp
src/pfcp/3gpp_29.244.cpp
+1
-0
src/pfcp/3gpp_29.244.hpp
src/pfcp/3gpp_29.244.hpp
+10
-0
src/pfcp/msg_pfcp.hpp
src/pfcp/msg_pfcp.hpp
+2
-2
src/smf_app/smf_config.hpp
src/smf_app/smf_config.hpp
+6
-0
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+2
-0
src/smf_app/smf_context.hpp
src/smf_app/smf_context.hpp
+1
-0
src/smf_app/smf_n1_n2.cpp
src/smf_app/smf_n1_n2.cpp
+1
-0
src/smf_app/smf_pfcp_association.hpp
src/smf_app/smf_pfcp_association.hpp
+1
-0
src/test/amf_client/amf-client.cpp
src/test/amf_client/amf-client.cpp
+4
-4
src/test/smf_client/model/AccessType.cpp
src/test/smf_client/model/AccessType.cpp
+1
-0
src/udp/udp.hpp
src/udp/udp.hpp
+1
-0
No files found.
src/common/3gpp_29.500.h
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
@@ -19,6 +19,7 @@
* contact@openairinterface.org
*/
#ifndef FILE_3GPP_29_500_SMF_SEEN
#define FILE_3GPP_29_500_SMF_SEEN
...
...
src/common/3gpp_29.502.h
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/common/3gpp_29.503.h
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/common/3gpp_29.571.h
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/common/amf.h
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/common/dynamic_memory_check.h
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/common/logger.cpp
View file @
36f6b3e5
...
...
@@ -96,15 +96,6 @@ void _Logger::trace(const char *format, ...) {
#endif
}
void
_Logger
::
trace
(
const
std
::
string
&
format
,
...)
{
#if TRACE_IS_ON
va_list
args
;
va_start
(
args
,
format
);
log
(
_ltTrace
,
format
.
c_str
(),
args
);
va_end
(
args
);
#endif
}
void
_Logger
::
debug
(
const
char
*
format
,
...)
{
#if DEBUG_IS_ON
va_list
args
;
...
...
@@ -114,15 +105,6 @@ void _Logger::debug(const char *format, ...) {
#endif
}
void
_Logger
::
debug
(
const
std
::
string
&
format
,
...)
{
#if DEBUG_IS_ON
va_list
args
;
va_start
(
args
,
format
);
log
(
_ltDebug
,
format
.
c_str
(),
args
);
va_end
(
args
);
#endif
}
void
_Logger
::
info
(
const
char
*
format
,
...)
{
#if INFO_IS_ON
va_list
args
;
...
...
@@ -132,15 +114,6 @@ void _Logger::info(const char *format, ...) {
#endif
}
void
_Logger
::
info
(
const
std
::
string
&
format
,
...)
{
#if INFO_IS_ON
va_list
args
;
va_start
(
args
,
format
);
log
(
_ltInfo
,
format
.
c_str
(),
args
);
va_end
(
args
);
#endif
}
void
_Logger
::
startup
(
const
char
*
format
,
...)
{
va_list
args
;
va_start
(
args
,
format
);
...
...
@@ -148,13 +121,6 @@ void _Logger::startup(const char *format, ...) {
va_end
(
args
);
}
void
_Logger
::
startup
(
const
std
::
string
&
format
,
...)
{
va_list
args
;
va_start
(
args
,
format
);
log
(
_ltStartup
,
format
.
c_str
(),
args
);
va_end
(
args
);
}
void
_Logger
::
warn
(
const
char
*
format
,
...)
{
va_list
args
;
va_start
(
args
,
format
);
...
...
@@ -162,13 +128,6 @@ void _Logger::warn(const char *format, ...) {
va_end
(
args
);
}
void
_Logger
::
warn
(
const
std
::
string
&
format
,
...)
{
va_list
args
;
va_start
(
args
,
format
);
log
(
_ltWarn
,
format
.
c_str
(),
args
);
va_end
(
args
);
}
void
_Logger
::
error
(
const
char
*
format
,
...)
{
va_list
args
;
va_start
(
args
,
format
);
...
...
@@ -176,13 +135,6 @@ void _Logger::error(const char *format, ...) {
va_end
(
args
);
}
void
_Logger
::
error
(
const
std
::
string
&
format
,
...)
{
va_list
args
;
va_start
(
args
,
format
);
log
(
_ltError
,
format
.
c_str
(),
args
);
va_end
(
args
);
}
void
_Logger
::
log
(
_LogType
lt
,
const
char
*
format
,
va_list
&
args
)
{
char
buffer
[
2048
];
...
...
src/common/nas/3gpp_24.007.h
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
@@ -18,6 +18,7 @@
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef FILE_3GPP_24_007_SEEN
#define FILE_3GPP_24_007_SEEN
...
...
src/common/nas/3gpp_33.401.h
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/common/nas/3gpp_36.401.h
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
@@ -19,6 +19,7 @@
* contact@openairinterface.org
*/
/*! \file 3gpp_36.401.h
\brief
\author Lionel Gauthier
...
...
src/common/nas/common_types.h
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
@@ -19,6 +19,7 @@
* contact@openairinterface.org
*/
#ifndef FILE_COMMON_TYPES_SEEN
#define FILE_COMMON_TYPES_SEEN
...
...
src/common/nas/security_types.h
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
@@ -19,6 +19,7 @@
* contact@openairinterface.org
*/
/*! \file security_types.h
\brief
\author Sebastien ROUX, Lionel Gauthier
...
...
src/common/smf.h
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/common/utils/TLVDecoder.c
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/common/utils/TLVDecoder.h
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/common/utils/TLVEncoder.c
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/common/utils/TLVEncoder.h
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/common/utils/asn1_conversions.h
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
@@ -19,6 +19,7 @@
* contact@openairinterface.org
*/
/*! \file asn1_conversions.h
\brief
\author Sebastien ROUX, Lionel Gauthier
...
...
src/common/utils/assertions.h
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
@@ -19,6 +19,7 @@
* contact@openairinterface.org
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
...
...
src/common/utils/backtrace.c
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
@@ -19,6 +19,7 @@
* contact@openairinterface.org
*/
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
...
...
@@ -42,7 +43,7 @@ display_backtrace (
size
=
backtrace
(
array
,
10
);
strings
=
backtrace_symbols
(
array
,
size
);
printf
(
"Obtained %z
d
stack frames.
\n
"
,
size
);
printf
(
"Obtained %z
u
stack frames.
\n
"
,
size
);
for
(
i
=
0
;
i
<
size
;
i
++
)
printf
(
"%s
\n
"
,
strings
[
i
]);
...
...
src/common/utils/epc.cpp
View file @
36f6b3e5
/*
* 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.
* 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.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.apache.org/licenses/LICENSE-2.0
*
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 <stdlib.h>
#include <iostream>
...
...
src/common/utils/if.hpp
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
@@ -19,6 +19,7 @@
* contact@openairinterface.org
*/
/*! \file get_gateway_netlink.h
\brief
\author Lionel Gauthier
...
...
src/common/utils/mime_parser.cpp
View file @
36f6b3e5
/* From https://gist.github.com/javiermon/6272065#file-gateway_netlink-c */
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* 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.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.apache.org/licenses/LICENSE-2.0
*
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 "mime_parser.hpp"
...
...
src/common/utils/mime_parser.hpp
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/nas/nas_message.c
View file @
36f6b3e5
...
...
@@ -106,7 +106,6 @@ int nas_message_encode(unsigned char *buffer, const nas_message_t *const msg,
*/
int
size
=
_nas_message_header_encode
(
buffer
,
&
msg
->
header
,
length
);
if
(
size
<
0
)
{
//OAILOG_FUNC_RETURN (LOG_NAS, TLV_BUFFER_TOO_SHORT);
return
TLV_BUFFER_TOO_SHORT
;
}
else
if
(
size
>
2
)
{
/*
...
...
@@ -196,7 +195,7 @@ int nas_message_encode(unsigned char *buffer, const nas_message_t *const msg,
int
nas_message_decode
(
const
unsigned
char
*
const
buffer
,
nas_message_t
*
msg
,
size_t
length
,
void
*
security
,
nas_message_decode_status_t
*
status
)
{
//OAILOG_FUNC_IN (LOG_NAS);
fivegmm_security_context_t
*
fivegmm_security_context
=
(
fivegmm_security_context_t
*
)
security
;
int
bytes
=
0
;
...
...
@@ -212,12 +211,10 @@ int nas_message_decode(const unsigned char *const buffer, nas_message_t *msg,
}
size
=
_nas_message_header_decode
(
buffer
,
&
msg
->
header
,
length
,
status
,
&
is_sr
);
//OAILOG_DEBUG(LOG_NAS, "return header size(%d)\n",size);
//OAILOG_DEBUG (LOG_NAS, "_nas_message_header_decode returned size %d\n", size);
if
(
size
<
0
)
{
return
TLV_BUFFER_TOO_SHORT
;
//OAILOG_FUNC_RETURN (LOG_NAS, TLV_BUFFER_TOO_SHORT);
}
if
(
size
>
1
)
{
// found security header
...
...
@@ -288,7 +285,6 @@ int nas_message_decode(const unsigned char *const buffer, nas_message_t *msg,
}
//return bytes;
//OAILOG_FUNC_RETURN (LOG_NAS, bytes);
return
RETURNok
;
}
...
...
@@ -325,7 +321,6 @@ static int _nas_message_header_encode(
* Encode the first octet of the header (security header type or EPS bearer
* * * * identity, and protocol discriminator)
*/
//ENCODE_U8 (buffer, *(uint8_t *) (header), size);
ENCODE_U8
(
buffer
,
header
->
extended_protocol_discriminator
,
size
);
//Security header type associated with a spare half octet;
...
...
@@ -347,7 +342,6 @@ static int _nas_message_header_encode(
* The buffer is not big enough to contain security header
*/
//OAILOG_WARNING(LOG_NAS, "NET-API - The size of the header (%u) " "exceeds the buffer length (%lu)\n", NAS_MESSAGE_SECURITY_HEADER_SIZE, length);
//OAILOG_FUNC_RETURN (LOG_NAS, RETURNerror);
return
RETURNerror
;
}
...
...
@@ -365,8 +359,6 @@ static int _nas_message_header_encode(
#endif
}
return
size
;
//OAILOG_STREAM_HEX(OAILOG_LEVEL_DEBUG, LOG_NAS, "encode nas header Incoming NAS message: ", buffer, size)
//OAILOG_FUNC_RETURN (LOG_NAS, size);
}
/****************************************************************************
...
...
@@ -390,7 +382,7 @@ static int _nas_message_header_encode(
static
int
_nas_message_protected_encode
(
unsigned
char
*
buffer
,
const
nas_message_security_protected_t
*
msg
,
size_t
length
,
void
*
security
)
{
//OAILOG_FUNC_IN (LOG_NAS);
fivegmm_security_context_t
*
fivegmm_security_context
=
(
fivegmm_security_context_t
*
)
security
;
int
bytes
=
TLV_BUFFER_TOO_SHORT
;
...
...
@@ -424,7 +416,6 @@ static int _nas_message_protected_encode(
free_wrapper
((
void
**
)
&
plain_msg
);
}
return
bytes
;
//OAILOG_FUNC_RETURN (LOG_NAS, bytes);
}
/****************************************************************************
...
...
@@ -448,7 +439,7 @@ static int _nas_message_protected_encode(
static
int
_nas_message_plain_encode
(
unsigned
char
*
buffer
,
const
nas_message_security_header_t
*
header
,
const
nas_message_plain_t
*
msg
,
size_t
length
)
{
//OAILOG_FUNC_IN (LOG_NAS);
int
bytes
=
TLV_PROTOCOL_NOT_SUPPORTED
;
if
(
header
->
extended_protocol_discriminator
...
...
@@ -471,7 +462,6 @@ static int _nas_message_plain_encode(
//OAILOG_WARNING(LOG_NAS, "NET-API - Extended Protocol discriminator 0x%x is " "not supported\n", header->extended_protocol_discriminator);
}
return
bytes
;
//OAILOG_FUNC_RETURN (LOG_NAS, bytes);
}
/****************************************************************************
...
...
@@ -599,7 +589,6 @@ static int _nas_message_encrypt(
}
break
;
}
//OAILOG_FUNC_RETURN (LOG_NAS, length);
return
length
;
}
...
...
@@ -625,11 +614,10 @@ static int _nas_message_encrypt(
static
uint32_t
_nas_message_get_mac
(
const
unsigned
char
*
const
buffer
,
size_t
const
length
,
int
const
direction
,
fivegmm_security_context_t
*
const
fivegmm_security_context
)
{
//OAILOG_FUNC_IN (LOG_NAS);
if
(
!
fivegmm_security_context
)
{
//OAILOG_DEBUG (LOG_NAS, "No security context set for integrity protection algorithm\n");
//OAILOG_FUNC_RETURN (LOG_NAS, 0)
;
return
0
;
}
switch
(
fivegmm_security_context
->
selected_algorithms
.
integrity
)
{
...
...
@@ -667,7 +655,6 @@ static uint32_t _nas_message_get_mac(
//OAILOG_DEBUG (LOG_NAS, "NAS_SECURITY_ALGORITHMS_EIA1 returned MAC %x.%x.%x.%x(%u) for length %lu direction %d, count %d\n",
// mac[0], mac[1], mac[2], mac[3], *((uint32_t *) & mac), length, direction, count);
mac32
=
(
uint32_t
*
)
&
mac
;
//OAILOG_FUNC_RETURN (LOG_NAS, ntohl (*mac32));
return
ntohl
(
*
mac32
);
}
break
;
...
...
@@ -718,7 +705,6 @@ static uint32_t _nas_message_get_mac(
//OAILOG_ERROR(LOG_NAS, "Unknown integrity protection algorithm %d\n", fivegmm_security_context->selected_algorithms.integrity);
break
;
}
//OAILOG_FUNC_RETURN (LOG_NAS, 0);
return
0
;
}
...
...
@@ -727,7 +713,7 @@ static int _nas_message_header_decode(
nas_message_security_header_t
*
const
header
,
const
size_t
length
,
nas_message_decode_status_t
*
const
status
,
bool
*
const
is_sr
)
{
//OAILOG_FUNC_IN (LOG_NAS);
int
size
=
0
;
/*
...
...
@@ -735,7 +721,6 @@ static int _nas_message_header_decode(
*/
DECODE_U8
(
buffer
,
header
->
extended_protocol_discriminator
,
size
);
//OAILOG_DEBUG(LOG_NAS,"security header type(%x)\n",header->security_header_type&0x0f);
*
is_sr
=
false
;
if
(
header
->
extended_protocol_discriminator
==
EPD_5GS_MOBILITY_MANAGEMENT_MESSAGES
)
{
...
...
@@ -770,7 +755,6 @@ static int _nas_message_header_decode(
* The buffer is not big enough to contain security header
*/
//OAILOG_WARNING(LOG_NAS, "NET-API - The size of the header (%u) " "exceeds the buffer length (%lu)\n", NAS_MESSAGE_SECURITY_HEADER_SIZE, length);
//OAILOG_FUNC_RETURN (LOG_NAS, RETURNerror);
return
RETURNerror
;
}
// Decode the message authentication code
...
...
@@ -781,7 +765,6 @@ static int _nas_message_header_decode(
}
}
}
//OAILOG_FUNC_RETURN (LOG_NAS, size);
return
size
;
}
...
...
@@ -790,7 +773,6 @@ static int _nas_message_protected_decode(
nas_message_plain_t
*
msg
,
size_t
length
,
fivegmm_security_context_t
*
const
fivegmm_security_context
,
nas_message_decode_status_t
*
const
status
)
{
//OAILOG_FUNC_IN (LOG_NAS);
int
bytes
=
TLV_BUFFER_TOO_SHORT
;
unsigned
char
*
const
plain_msg
=
(
unsigned
char
*
)
calloc
(
1
,
length
);
...
...
@@ -809,7 +791,6 @@ static int _nas_message_protected_decode(
free_wrapper
((
void
**
)
&
plain_msg
);
}
return
bytes
;
//OAILOG_FUNC_RETURN (LOG_NAS, bytes);
}
static
int
_nas_message_decrypt
(
...
...
@@ -821,7 +802,6 @@ static int _nas_message_decrypt(
uint32_t
count
=
0
;
uint8_t
direction
=
0
;
//OAILOG_FUNC_IN (LOG_NAS);
int
size
=
0
;
nas_message_security_header_t
header
=
{
0
};
#if TEST_MAC_ENCRYPT_DECRYPT__
...
...
@@ -927,7 +907,6 @@ static int _nas_message_decrypt(
* Decode the first octet (security header type or EPS bearer identity,
* * * * and protocol discriminator)
*/
//DECODE_U8 (dest, *(uint8_t *) (&header), size);
DECODE_U8
(
dest
,
header
.
extended_protocol_discriminator
,
size
);
DECODE_U8
(
dest
+
size
,
header
.
security_header_type
,
size
);
//OAILOG_FUNC_RETURN (LOG_NAS, header.extended_protocol_discriminator);
...
...
@@ -940,7 +919,6 @@ static int _nas_message_decrypt(
* Decode the first octet (security header type or EPS bearer identity,
* * * * and protocol discriminator)
*/
//DECODE_U8 (dest, *(uint8_t *) (&header), size);
DECODE_U8
(
dest
,
header
.
extended_protocol_discriminator
,
size
)
;
DECODE_U8
(
dest
+
size
,
header
.
security_header_type
,
size
)
...
...
@@ -955,7 +933,6 @@ static int _nas_message_decrypt(
* Decode the first octet (security header type or EPS bearer identity,
* * * * and protocol discriminator)
*/
//DECODE_U8 (dest, *(uint8_t *) (&header), size);
DECODE_U8
(
dest
,
header
.
extended_protocol_discriminator
,
size
)
;
DECODE_U8
(
dest
+
size
,
header
.
security_header_type
,
size
)
...
...
@@ -980,7 +957,7 @@ static int _nas_message_decrypt(
static
int
_nas_message_plain_decode
(
const
unsigned
char
*
buffer
,
const
nas_message_security_header_t
*
header
,
nas_message_plain_t
*
msg
,
size_t
length
)
{
//OAILOG_FUNC_IN (LOG_NAS);
int
bytes
=
TLV_PROTOCOL_NOT_SUPPORTED
;
if
(
header
->
extended_protocol_discriminator
==
EPD_5GS_MOBILITY_MANAGEMENT_MESSAGES
)
{
...
...
@@ -997,5 +974,4 @@ static int _nas_message_plain_decode(
}
return
bytes
;
//OAILOG_FUNC_RETURN (LOG_NAS, bytes);
}
src/nas/security/kdf.c
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/nas/security/key_nas_deriver.c
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/nas/security/key_nas_encryption.c
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/nas/security/nas_stream_nea1.c
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/nas/security/nas_stream_nea2.c
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/nas/security/nas_stream_nia1.c
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
@@ -187,38 +187,18 @@ nas_stream_encrypt_nia1 (
IV
[
2
]
=
((((
uint32_t
)
stream_cipher
->
bearer
)
&
0x0000001F
)
<<
27
);
IV
[
1
]
=
(
uint32_t
)
(
stream_cipher
->
count
)
^
((
uint32_t
)
(
stream_cipher
->
direction
)
<<
31
);
IV
[
0
]
=
((((
uint32_t
)
stream_cipher
->
bearer
)
&
0x0000001F
)
<<
27
)
^
((
uint32_t
)
(
stream_cipher
->
direction
&
0x00000001
)
<<
15
);
//printf ("K:\n");
//hexprint(K, 16);
//printf ("K[0]:%08X\n",K[0]);
//printf ("K[1]:%08X\n",K[1]);
//printf ("K[2]:%08X\n",K[2]);
//printf ("K[3]:%08X\n",K[3]);
//printf ("IV:\n");
//hexprint(IV, 16);
//printf ("IV[0]:%08X\n",IV[0]);
//printf ("IV[1]:%08X\n",IV[1]);
//printf ("IV[2]:%08X\n",IV[2]);
//printf ("IV[3]:%08X\n",IV[3]);
z
[
0
]
=
z
[
1
]
=
z
[
2
]
=
z
[
3
]
=
z
[
4
]
=
0
;
/*
* Run SNOW 3G to produce 5 keystream words z_1, z_2, z_3, z_4 and z_5.
*/
snow3g_initialize
(
K
,
IV
,
&
snow_3g_context
);
snow3g_generate_key_stream
(
5
,
z
,
&
snow_3g_context
);
//printf ("z[0]:%08X\n",z[0]);
//printf ("z[1]:%08X\n",z[1]);
//printf ("z[2]:%08X\n",z[2]);
//printf ("z[3]:%08X\n",z[3]);
//printf ("z[4]:%08X\n",z[4]);
P
=
((
uint64_t
)
z
[
0
]
<<
32
)
|
(
uint64_t
)
z
[
1
];
Q
=
((
uint64_t
)
z
[
2
]
<<
32
)
|
(
uint64_t
)
z
[
3
];
//printf ("P:%16lX\n",P);
//printf ("Q:%16lX\n",Q);
/*
* Calculation
*/
D
=
ceil
(
stream_cipher
->
blength
/
64
.
0
)
+
1
;
//printf ("D:%d\n",D);
EVAL
=
0
;
c
=
0x1b
;
...
...
@@ -228,7 +208,6 @@ nas_stream_encrypt_nia1 (
for
(
i
=
0
;
i
<
D
-
2
;
i
++
)
{
V
=
EVAL
^
((
uint64_t
)
hton_int32
(
message
[
2
*
i
])
<<
32
|
(
uint64_t
)
hton_int32
(
message
[
2
*
i
+
1
]));
EVAL
=
MUL64
(
V
,
P
,
c
);
//printf ("Mi: %16X %16X\tEVAL: %16lX\n",hton_int32(message[2*i]),hton_int32(message[2*i+1]), EVAL);
}
/*
...
...
@@ -258,7 +237,6 @@ nas_stream_encrypt_nia1 (
*/
EVAL
=
MUL64
(
EVAL
,
Q
,
c
);
MAC_I
=
(
uint32_t
)
(
EVAL
>>
32
)
^
z
[
4
];
//printf ("MAC_I:%16X\n",MAC_I);
MAC_I
=
hton_int32
(
MAC_I
);
memcpy
((
void
*
)
out
,
&
MAC_I
,
4
);
return
0
;
...
...
src/nas/security/nas_stream_nia2.c
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/nas/security/rijndael.c
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/nas/security/rijndael.h
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/nas/security/secu_defs.h
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/nas/security/snow3g.c
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/nas/security/snow3g.h
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/nas/securityDef.h
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/nas/sm/sm_msg.c
View file @
36f6b3e5
...
...
@@ -171,6 +171,7 @@ int fivegsm_msg_encode(SM_msg *msg, uint8_t *buffer, uint32_t len) {
if
(
header_result
<
0
)
{
//OAILOG_ERROR (LOG_NAS, "ESM-MSG - Failed to encode ESM message header (%d)\n", header_result);
//OAILOG_FUNC_RETURN (LOG_NAS, header_result);
return
header_result
;
}
buffer
+=
header_result
;
...
...
@@ -251,6 +252,7 @@ int fivegsm_msg_encode(SM_msg *msg, uint8_t *buffer, uint32_t len) {
if
(
encode_result
<
0
)
{
//OAILOG_ERROR (LOG_NAS, "SM-MSG - Failed to encode L3 ESM message 0x%x ""(%d)\n", msg->header.message_type, encode_result);
return
encode_result
;
}
// OAILOG_FUNC_RETURN (LOG_NAS, header_result + encode_result);
return
header_result
+
encode_result
;
...
...
src/pfcp/3gpp_29.244.cpp
View file @
36f6b3e5
...
...
@@ -1191,6 +1191,7 @@ pfcp_msg::pfcp_msg(const pfcp_session_modification_response& pfcp_ies) : pfcp_ms
//------------------------------------------------------------------------------
pfcp_msg
::
pfcp_msg
(
const
pfcp_session_deletion_request
&
pfcp_ies
)
:
pfcp_msg_header
()
{
ies
=
{};
remote_port
=
0
;
set_message_type
(
PFCP_SESSION_DELETION_REQUEST
);
// NO IEs !
}
...
...
src/pfcp/3gpp_29.244.hpp
View file @
36f6b3e5
...
...
@@ -4009,6 +4009,7 @@ public:
}
//--------
explicit
pfcp_urr_id_ie
(
const
pfcp_tlv
&
t
)
:
pfcp_ie
(
t
)
{
urr_id
=
0
;
};
//--------
void
to_core_type
(
pfcp
::
urr_id_t
&
b
)
{
...
...
@@ -4155,6 +4156,11 @@ public:
}
//--------
explicit
pfcp_outer_header_creation_ie
(
const
pfcp_tlv
&
t
)
:
pfcp_ie
(
t
)
{
outer_header_creation_description
=
{};
teid
=
{};
ipv4_address
=
{};
ipv6_address
=
{};
port_number
=
{};
};
//--------
void
to_core_type
(
pfcp
::
outer_header_creation_t
&
b
)
{
...
...
@@ -4750,6 +4756,7 @@ public:
}
//--------
explicit
pfcp_outer_header_removal_ie
(
const
pfcp_tlv
&
t
)
:
pfcp_ie
(
t
)
{
outer_header_removal_description
=
0
;
};
//--------
void
to_core_type
(
pfcp
::
outer_header_removal_t
&
b
)
{
...
...
@@ -5335,6 +5342,7 @@ public:
}
//--------
explicit
pfcp_far_id_ie
(
const
pfcp_tlv
&
t
)
:
pfcp_ie
(
t
)
{
far_id
=
0
;
};
//--------
void
to_core_type
(
pfcp
::
far_id_t
&
b
)
{
...
...
@@ -5380,6 +5388,7 @@ public:
}
//--------
explicit
pfcp_qer_id_ie
(
const
pfcp_tlv
&
t
)
:
pfcp_ie
(
t
)
{
qer_id
=
0
;
};
//--------
void
to_core_type
(
pfcp
::
qer_id_t
&
b
)
{
...
...
@@ -5918,6 +5927,7 @@ public:
}
//--------
explicit
pfcp_user_plane_inactivity_timer_ie
(
const
pfcp_tlv
&
t
)
:
pfcp_ie
(
t
)
{
user_plane_inactivity_timer
=
0
;
};
//--------
void
to_core_type
(
pfcp
::
user_plane_inactivity_timer_t
&
b
)
{
...
...
src/pfcp/msg_pfcp.hpp
View file @
36f6b3e5
...
...
@@ -3,11 +3,11 @@
* 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
Apache License, Version 2.0
(the "License"); you may not use this file
* 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.
apache.org/licenses/LICENSE-2.0
* 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,
...
...
src/smf_app/smf_config.hpp
View file @
36f6b3e5
...
...
@@ -286,6 +286,12 @@ class smf_config {
local_configuration
=
false
;
num_session_management_subscription
=
0
;
test_upf_cfg
=
{};
for
(
int
i
=
0
;
i
<
SMF_NUM_SESSION_MANAGEMENT_SUBSCRIPTION_MAX
;
i
++
)
{
session_management_subscription
[
i
]
=
{};
}
sbi_http2_port
=
0
;
}
;
...
...
src/smf_app/smf_context.cpp
View file @
36f6b3e5
...
...
@@ -1795,6 +1795,8 @@ void smf_context::handle_pdu_session_update_sm_context_request(
smf_app_inst
->
trigger_http_response
(
http_status_code_e
::
HTTP_STATUS_CODE_500_INTERNAL_SERVER_ERROR
,
smreq
->
pid
,
N11_SESSION_UPDATE_SM_CONTEXT_RESPONSE
);
free_wrapper
((
void
**
)
&
qos_flow_description
);
return
;
}
...
...
src/smf_app/smf_context.hpp
View file @
36f6b3e5
...
...
@@ -79,6 +79,7 @@ class smf_qos_flow {
far_id_dl
=
{
};
released
=
false
;
qos_profile
=
{
};
cause_value
=
0
;
}
/*
...
...
src/smf_app/smf_n1_n2.cpp
View file @
36f6b3e5
...
...
@@ -702,6 +702,7 @@ bool smf_n1_n2::create_n2_sm_information(pdu_session_msg &msg,
it
->
first
);
if
(
qos_flows
.
empty
())
{
free_wrapper
((
void
**
)
&
ngap_IEs
);
return
false
;
}
//TODO: support only 1 qos flow
...
...
src/smf_app/smf_pfcp_association.hpp
View file @
36f6b3e5
...
...
@@ -85,6 +85,7 @@ class pfcp_association {
num_retries_timer_heartbeat
=
0
;
trxn_id_heartbeat
=
0
;
timer_association
=
ITTI_INVALID_TIMER_ID
;
is_restore_sessions_pending
=
false
;
}
pfcp_association
(
const
pfcp
::
node_id_t
&
ni
,
pfcp
::
recovery_time_stamp_t
&
rts
,
pfcp
::
up_function_features_s
&
uff
)
...
...
src/test/amf_client/amf-client.cpp
View file @
36f6b3e5
...
...
@@ -1666,11 +1666,11 @@ int main(int argc, char *argv[]) {
uint8_t
context_id
=
1
;
uint8_t
pid
=
1
;
//
test_all_procedures_for_one_session(pid, context_id, smf_ip_address,
//
http_version, port);
test_all_procedures_for_one_session
(
pid
,
context_id
,
smf_ip_address
,
http_version
,
port
);
//test_session_establishment_multiple_threads(smf_ip_address, http_version, port);
test_all_procedures_for_multiple_threads
(
smf_ip_address
,
http_version
,
port
);
//
test_all_procedures_for_multiple_threads(smf_ip_address, http_version,
//
port);
return
0
;
}
src/test/smf_client/model/AccessType.cpp
View file @
36f6b3e5
...
...
@@ -21,6 +21,7 @@ namespace model {
AccessType
::
AccessType
()
{
m_value
=
eAccessType
::
AccessType_3GPP_ACCESS
;
}
AccessType
::~
AccessType
()
...
...
src/udp/udp.hpp
View file @
36f6b3e5
...
...
@@ -77,6 +77,7 @@ public:
udp_server
(
const
struct
in6_addr
&
address
,
const
uint16_t
port_num
)
:
app_
(
nullptr
),
port_
(
port_num
)
{
recv_buffer_
[
0
]
=
0
;
socket_
=
create_socket
(
address
,
port_
);
if
(
socket_
>
0
)
{
Logger
::
udp
().
debug
(
"udp_server::udp_server(%s:%d)"
,
conv
::
toString
(
address
).
c_str
(),
port_
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment