Rename library

This commit is contained in:
Sukchan Lee 2019-06-11 18:28:25 +09:00
parent 7bc245028a
commit a32465ed07
136 changed files with 348 additions and 383 deletions

View File

@ -1127,8 +1127,8 @@ ASN_MODULE_CFLAGS=
pkglib_LTLIBRARIES=libasn1c.la
libasn1c_la_SOURCES= \
$(ASN_MODULE_SRCS) $(ASN_MODULE_HDRS) \
s1ap_asn1c.h s1ap_message.h \
s1ap_decoder.c s1ap_encoder.c s1ap_free.c \
s1ap-asn1c.h s1ap-message.h \
s1ap-decoder.c s1ap-encoder.c s1ap-free.c \
$(NULL)
libasn1c_la_DEPENDENCIES = \

View File

@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "s1ap_message.h"
#include "s1ap-message.h"
#undef OGS_LOG_DOMAIN
#define OGS_LOG_DOMAIN __base_s1ap_domain

View File

@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "s1ap_message.h"
#include "s1ap-message.h"
#undef OGS_LOG_DOMAIN
#define OGS_LOG_DOMAIN __base_s1ap_domain

View File

@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "s1ap_message.h"
#include "s1ap-message.h"
#undef OGS_LOG_DOMAIN
#define OGS_LOG_DOMAIN __base_s1ap_domain

View File

@ -23,7 +23,7 @@
#include "ogs-core.h"
#include "base/types.h"
#include "base/context.h"
#include "s1ap_asn1c.h"
#include "s1ap-asn1c.h"
#ifdef __cplusplus
extern "C" {

View File

@ -18,17 +18,17 @@
pkglib_LTLIBRARIES = libfd.la
libfd_la_SOURCES = \
fd_message.h fd_logger.h fd_lib.h \
libapp_sip.c fd_message.c fd_logger.c fd_config.c fd_init.c \
fd-message.h fd-logger.h fd-lib.h \
libapp_sip.c fd-message.c fd-logger.c fd-config.c fd-init.c \
\
s6a/s6a_dict.h s6a/s6a_message.h \
s6a/dict_init.c \
s6a/s6a-dict.h s6a/s6a-message.h \
s6a/dict-init.c \
\
gx/gx_dict.h gx/gx_message.h \
gx/dict_init.c gx/gx_message.c \
gx/gx-dict.h gx/gx-message.h \
gx/dict-init.c gx/gx-message.c \
\
rx/rx_dict.h rx/rx_message.h \
rx/dict_init.c rx/rx_message.c \
rx/rx-dict.h rx/rx-message.h \
rx/dict-init.c rx/rx-message.c \
$(NULL)
libfd_la_DEPENDENCIES = \

View File

@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "fd_lib.h"
#include "fd-lib.h"
#undef OGS_LOG_DOMAIN
#define OGS_LOG_DOMAIN __base_fd_domain

View File

@ -16,8 +16,9 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "fd_logger.h"
#include "fd_lib.h"
#include "fd-logger.h"
#include "fd-lib.h"
#undef OGS_LOG_DOMAIN
#define OGS_LOG_DOMAIN __base_fd_domain

View File

@ -17,8 +17,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __FD_LIB_H__
#define __FD_LIB_H__
#ifndef FD_LIB_H
#define FD_LIB_H
#include "ogs-core.h"
@ -27,12 +27,12 @@
#include "base/context.h"
#include "fd_message.h"
#include "fd_logger.h"
#include "fd-message.h"
#include "fd-logger.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif
/* This is default diameter configuration if there is no config file
* The Configuration : No TLS, Only TCP */
@ -81,6 +81,6 @@ int fd_avp_search_avp ( struct avp * groupedavp,
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif /* ! __FD_LIB_H__ */
#endif /* FD_LIB_H */

View File

@ -19,7 +19,7 @@
#include "ogs-core.h"
#include "base/context.h"
#include "fd_logger.h"
#include "fd-logger.h"
#undef OGS_LOG_DOMAIN
#define OGS_LOG_DOMAIN __base_fd_domain

View File

@ -17,8 +17,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __FD_LOGGER_H__
#define __FD_LOGGER_H__
#ifndef FD_LOGGER_H
#define FD_LOGGER_H
#include "ogs-core.h"
@ -27,7 +27,7 @@
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif
struct fd_logger_t {
@ -65,6 +65,6 @@ void fd_logger_unregister();
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif /* ! __FD_LOGGER_H__ */
#endif /* FD_LOGGER_H */

View File

@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "fd_message.h"
#include "fd-message.h"
#define CHECK_dict_search( _type, _criteria, _what, _result ) \
CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) );

View File

@ -17,15 +17,15 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __FD_MESSAGE_H__
#define __FD_MESSAGE_H__
#ifndef FD_MESSAGE_H
#define FD_MESSAGE_H
#include "freeDiameter/freeDiameter-host.h"
#include "freeDiameter/libfdcore.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif
#define FD_AVP_CODE_FRAME_IP_ADDRESS 8
#define FD_AVP_CODE_FRAME_IPV6_PREFIX 97
@ -73,6 +73,6 @@ int fd_message_vendor_specific_appid_set(struct msg *msg, uint32_t app_id);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif /* ! __FD_MESSAGE_H__ */
#endif /* FD_MESSAGE_H */

View File

@ -18,7 +18,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "gx_dict.h"
#include "gx-dict.h"
#define CHECK_dict_search( _type, _criteria, _what, _result ) \
CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) );

View File

@ -17,15 +17,15 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __GX_DICT_H__
#define __GX_DICT_H__
#ifndef GX_DICT_H
#define GX_DICT_H
#include "freeDiameter/freeDiameter-host.h"
#include "freeDiameter/libfdcore.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif
#define GX_APPLICATION_ID 16777238
@ -130,6 +130,6 @@ int gx_dict_init(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif /* __GX_DICT_H__ */
#endif /* GX_DICT_H */

View File

@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "gx_message.h"
#include "gx-message.h"
void gx_message_free(gx_message_t *gx_message)
{

View File

@ -17,12 +17,12 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __GX_MESSAGE_H__
#define __GX_MESSAGE_H__
#ifndef GX_MESSAGE_H
#define GX_MESSAGE_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif
#include "base/types.h"
@ -59,6 +59,6 @@ void gx_message_free(gx_message_t *gx_message);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif /* __GX_MESSAGE_H__ */
#endif /* GX_MESSAGE_H */

View File

@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "rx_dict.h"
#include "rx-dict.h"
#define CHECK_dict_search( _type, _criteria, _what, _result ) \
CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) );

View File

@ -17,15 +17,15 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __RX_DICT_H__
#define __RX_DICT_H__
#ifndef RX_DICT_H
#define RX_DICT_H
#include "freeDiameter/freeDiameter-host.h"
#include "freeDiameter/libfdcore.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif
#define RX_APPLICATION_ID 16777236
@ -126,6 +126,6 @@ int rx_dict_init(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif /* __RX_DICT_H__ */
#endif /* RX_DICT_H */

View File

@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "rx_message.h"
#include "rx-message.h"
void rx_message_free(rx_message_t *rx_message)
{

View File

@ -17,12 +17,12 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __RX_MESSAGE_H__
#define __RX_MESSAGE_H__
#ifndef RX_MESSAGE_H
#define RX_MESSAGE_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif
#include "base/types.h"
@ -85,6 +85,6 @@ void rx_message_free(rx_message_t *rx_message);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif /* __RX_MESSAGE_H__ */
#endif /* RX_MESSAGE_H */

View File

@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "s6a_dict.h"
#include "s6a-dict.h"
#define CHECK_dict_search( _type, _criteria, _what, _result ) \
CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) );

View File

@ -17,15 +17,15 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __S6A_LIB_H__
#define __S6A_LIB_H__
#ifndef S6A_DICT_H
#define S6A_DICT_H
#include "freeDiameter/freeDiameter-host.h"
#include "freeDiameter/libfdcore.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif
#define S6A_APPLICATION_ID 16777251
@ -107,6 +107,6 @@ int s6a_dict_init(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif /* ! __S6A_LIB_H__ */
#endif /* S6A_DICT_H */

View File

@ -17,12 +17,12 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __S6A_MESSAGE_H__
#define __S6A_MESSAGE_H__
#ifndef S6A_MESSAGE_H
#define S6A_MESSAGE_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif
#include "ogs-crypt.h"
@ -93,6 +93,6 @@ typedef struct _s6a_message_t {
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif /* __S6A_MESSAGE_H__ */
#endif /* S6A_MESSAGE_H */

View File

@ -18,10 +18,10 @@
pkglib_LTLIBRARIES = libgtp.la
libgtp_la_SOURCES = \
gtp_tlv.h gtp_message.h gtp_types.h gtp_conv.h \
gtp_node.h gtp_path.h gtp_xact.h \
gtp_tlv.c gtp_message.c gtp_types.c gtp_conv.c \
gtp_node.c gtp_path.c gtp_xact.c \
gtp-tlv.h gtp-message.h gtp-types.h gtp-conv.h \
gtp-node.h gtp-path.h gtp-xact.h \
gtp-tlv.c gtp-message.c gtp-types.c gtp-conv.c \
gtp-node.c gtp-path.c gtp-xact.c \
$(NULL)
libgtp_la_DEPENDENCIES = \

View File

@ -17,9 +17,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "gtp_message.h"
#include "gtp_types.h"
#include "gtp_conv.h"
#include "gtp-message.h"
#include "gtp-types.h"
#include "gtp-conv.h"
void gtp_bearers_in_create_indirect_tunnel_request(
tlv_bearer_context_t *bearers[][GTP_MAX_NUM_OF_INDIRECT_TUNNEL],

View File

@ -17,8 +17,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __GTP_CONV_H__
#define __GTP_CONV_H__
#ifndef GTP_CONV_H
#define GTP_CONV_H
#include "ogs-core.h"
@ -54,5 +54,5 @@ int gtp_ip_to_f_teid(ip_t *ip, gtp_f_teid_t *f_teid, int *len);
}
#endif /* __cplusplus */
#endif /* __GTP_CONV_H__ */
#endif /* GTP_CONV_H */

View File

@ -18,13 +18,13 @@
*/
/*******************************************************************************
* This file had been created by gtp_tlv.py script v0.1.0
* This file had been created by gtp-tlv.py script v0.1.0
* Please do not modify this file but regenerate it via script.
* Created on: 2019-05-28 16:37:12.779763 by acetcom
* Created on: 2019-06-11 17:35:40.953361 by acetcom
* from 29274-d80.docx
******************************************************************************/
#include "gtp_message.h"
#include "gtp-message.h"
tlv_desc_t tlv_desc_imsi_0 =
{

View File

@ -17,9 +17,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "gtp_conv.h"
#include "gtp_node.h"
#include "gtp_xact.h"
#include "gtp-conv.h"
#include "gtp-node.h"
#include "gtp-xact.h"
static OGS_POOL(pool, gtp_node_t);

View File

@ -17,14 +17,14 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __GTP_NODE_H__
#define __GTP_NODE_H__
#ifndef GTP_NODE_H
#define GTP_NODE_H
#include "gtp_types.h"
#include "gtp-types.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif
#define SETUP_GTP_NODE(__cTX, __gNODE) \
do { \
@ -65,6 +65,6 @@ gtp_node_t *gtp_node_find(ogs_list_t *list, gtp_f_teid_t *f_teid);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif /* __GTP_NODE_H__ */
#endif /* GTP_NODE_H */

View File

@ -17,11 +17,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "gtp_message.h"
#include "gtp_conv.h"
#include "gtp_node.h"
#include "gtp-message.h"
#include "gtp-conv.h"
#include "gtp-node.h"
#include "gtp_path.h"
#include "gtp-path.h"
ogs_sock_t *gtp_server(ogs_socknode_t *node)
{

View File

@ -17,14 +17,14 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __GTP_PATH_H__
#define __GTP_PATH_H__
#ifndef GTP_PATH_H
#define GTP_PATH_H
typedef struct gtp_node_s gtp_node_t;
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif
ogs_sock_t *gtp_server(ogs_socknode_t *node);
int gtp_connect(ogs_sock_t *ipv4, ogs_sock_t *ipv6, gtp_node_t *gnode);
@ -39,6 +39,6 @@ ogs_pkbuf_t *gtp_handle_echo_req(ogs_pkbuf_t *pkt);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif /* __GTP_PATH_H__ */
#endif /* GTP_PATH_H */

View File

@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "gtp_tlv.h"
#include "gtp-tlv.h"
tlv_desc_t tlv_desc_more1 = { TLV_MORE, "More", 0, 1, 0, 0, { NULL } };
tlv_desc_t tlv_desc_more2 = { TLV_MORE, "More", 0, 2, 0, 0, { NULL } };

View File

@ -17,8 +17,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __GTP_TLV_H__
#define __GTP_TLV_H__
#ifndef GTP_TLV_H
#define GTP_TLV_H
#include "ogs-core.h"
@ -161,4 +161,4 @@ int tlv_parse_msg(void *msg, tlv_desc_t *desc, ogs_pkbuf_t *pkbuf, int mode);
}
#endif /* __cplusplus */
#endif /* __GTP_TLV_H__ */
#endif /* GTP_TLV_H */

View File

@ -17,8 +17,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "gtp_types.h"
#include "gtp_message.h"
#include "gtp-types.h"
#include "gtp-message.h"
/* 8.13 Protocol Configuration Options (PCO)
* 10.5.6.3 Protocol configuration options in 3GPP TS 24.008 */

View File

@ -17,19 +17,19 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __GTP_TYPES_H__
#define __GTP_TYPES_H__
#ifndef GTP_TYPES_H
#define GTP_TYPES_H
#include "base/types.h"
#include "base/context.h"
#include "gtp_tlv.h"
#include "gtp-tlv.h"
#undef OGS_LOG_DOMAIN
#define OGS_LOG_DOMAIN __base_gtp_domain
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif
/* 8.4 Cause */
#define GTP_CAUSE_LOCAL_DETACH 2
@ -434,7 +434,7 @@ ED2(uint8_t spare:6;,
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif /* __GTP_TYPES_H__ */
#endif /* GTP_TYPES_H */

View File

@ -17,11 +17,11 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "gtp_message.h"
#include "gtp_node.h"
#include "gtp_path.h"
#include "gtp-message.h"
#include "gtp-node.h"
#include "gtp-path.h"
#include "gtp_xact.h"
#include "gtp-xact.h"
#define GTP_MIN_XACT_ID 1
#define GTP_MAX_XACT_ID 0x800000

View File

@ -17,14 +17,14 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __GTP_XACT_H__
#define __GTP_XACT_H__
#ifndef GTP_XACT_H
#define GTP_XACT_H
#include "gtp_message.h"
#include "gtp-message.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif
typedef struct gtp_node_s gtp_node_t;
@ -95,6 +95,6 @@ void gtp_xact_deassociate(gtp_xact_t *xact1, gtp_xact_t *xact2);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif /* __GTP_XACT_H__ */
#endif /* GTP_XACT_H */

View File

@ -13,4 +13,4 @@ user@host ~/Documents/git/nextepc/lib/gtp/support$ \
* Generate TLV support files
user@host ~/Documents/git/nextepc/lib/s1ap/support$ \
python gtp_tlv.py -f 29274-d80.docx -o ..
python gtp-tlv.py -f 29274-d80.docx -o ..

View File

@ -74,14 +74,14 @@ def output_header_to_file(f):
""")
f.write("/*******************************************************************************\n")
f.write(" * This file had been created by gtp_tlv.py script v%s\n" % (version))
f.write(" * This file had been created by gtp-tlv.py script v%s\n" % (version))
f.write(" * Please do not modify this file but regenerate it via script.\n")
f.write(" * Created on: %s by %s\n * from %s\n" % (str(now), getpass.getuser(), filename))
f.write(" ******************************************************************************/\n\n")
def usage():
print "Python generating TLV build/parser for GTPv2-C v%s" % (version)
print "Usage: python gtp_tlv.py [options]"
print "Usage: python gtp-tlv.py [options]"
print "Available options:"
print "-d Enable script debug"
print "-f [file] Input file to parse"
@ -370,16 +370,16 @@ type_list["APN Restriction"]["size"] = 1 # Type : 127
type_list["Selection Mode"]["size"] = 1 # Type : 128
type_list["Node Type"]["size"] = 1 # Type : 128
f = open(outdir + 'gtp_message.h', 'w')
f = open(outdir + 'gtp-message.h', 'w')
output_header_to_file(f)
f.write("""#ifndef __GTP_MESSAGE_H__
#define __GTP_MESSAGE_H__
f.write("""#ifndef GTP_MESSAGE_H
#define GTP_MESSAGE_H
#include "gtp_tlv.h"
#include "gtp-tlv.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif
/* 5.1 General format */
#define GTPV1U_HEADER_LEN 8
@ -523,15 +523,15 @@ int gtp_build_msg(ogs_pkbuf_t **pkbuf, gtp_message_t *gtp_message);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif /* __GTP_MESSAGE_H__ */
#endif /* GTP_MESSAGE_H */
""")
f.close()
f = open(outdir + 'gtp_message.c', 'w')
f = open(outdir + 'gtp-message.c', 'w')
output_header_to_file(f)
f.write("""#include "gtp_message.h"
f.write("""#include "gtp-message.h"
""")

View File

@ -18,8 +18,8 @@
pkglib_LTLIBRARIES = libnas.la
libnas_la_SOURCES = \
nas_message.h nas_ies.h nas_types.h \
nas_decoder.c nas_encoder.c nas_ies.c nas_types.c \
nas-message.h nas-ies.h nas-types.h \
nas-decoder.c nas-encoder.c nas-ies.c nas-types.c \
$(NULL)
libnas_la_DEPENDENCIES = \

View File

@ -18,13 +18,13 @@
*/
/*******************************************************************************
* This file had been created by nas_message.py script v0.1.0
* This file had been created by nas-message.py script v0.1.0
* Please do not modify this file but regenerate it via script.
* Created on: 2019-05-28 16:35:26.465833 by acetcom
* Created on: 2019-06-11 17:27:29.685234 by acetcom
* from 24301-d80.docx
******************************************************************************/
#include "nas_message.h"
#include "nas-message.h"
#undef OGS_LOG_DOMAIN
#define OGS_LOG_DOMAIN __base_nas_domain
@ -2974,21 +2974,3 @@ int nas_esm_decode(nas_message_t *message, ogs_pkbuf_t *pkbuf)
return OGS_OK;
}
#if 0 /* deprecated */
int nas_plain_decode(nas_message_t *message, ogs_pkbuf_t *pkbuf)
{
nas_security_header_t *h = NULL;
ogs_assert(pkbuf);
h = pkbuf->data;
ogs_assert(h);
if (h->protocol_discriminator == NAS_PROTOCOL_DISCRIMINATOR_EMM)
return nas_emm_decode(message, pkbuf);
else if (h->protocol_discriminator == NAS_PROTOCOL_DISCRIMINATOR_ESM)
return nas_esm_decode(message, pkbuf);
ogs_assert_if_reached();
"Invalid Protocol : %d", h->protocol_discriminator);
}
#endif

View File

@ -18,13 +18,13 @@
*/
/*******************************************************************************
* This file had been created by nas_message.py script v0.1.0
* This file had been created by nas-message.py script v0.1.0
* Please do not modify this file but regenerate it via script.
* Created on: 2019-05-28 16:35:26.490638 by acetcom
* Created on: 2019-06-11 17:27:29.711227 by acetcom
* from 24301-d80.docx
******************************************************************************/
#include "nas_message.h"
#include "nas-message.h"
#undef OGS_LOG_DOMAIN
#define OGS_LOG_DOMAIN __base_nas_domain

View File

@ -18,13 +18,13 @@
*/
/*******************************************************************************
* This file had been created by nas_message.py script v0.1.0
* This file had been created by nas-message.py script v0.1.0
* Please do not modify this file but regenerate it via script.
* Created on: 2019-05-28 16:35:26.430346 by acetcom
* Created on: 2019-06-11 17:27:29.648106 by acetcom
* from 24301-d80.docx
******************************************************************************/
#include "nas_ies.h"
#include "nas-ies.h"
#undef OGS_LOG_DOMAIN
#define OGS_LOG_DOMAIN __base_nas_domain

View File

@ -18,20 +18,20 @@
*/
/*******************************************************************************
* This file had been created by nas_message.py script v0.1.0
* This file had been created by nas-message.py script v0.1.0
* Please do not modify this file but regenerate it via script.
* Created on: 2019-05-28 16:35:26.424972 by acetcom
* Created on: 2019-06-11 17:27:29.642367 by acetcom
* from 24301-d80.docx
******************************************************************************/
#ifndef __NAS_IES_H__
#define __NAS_IES_H__
#ifndef NAS_IES_H
#define NAS_IES_H
#include "nas_types.h"
#include "nas-types.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif
int nas_encode_optional_type(ogs_pkbuf_t *pkbuf, uint8_t type);
@ -219,7 +219,7 @@ int nas_encode_pdn_address(ogs_pkbuf_t *pkbuf, nas_pdn_address_t *pdn_address);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif /* __NAS_IES_H__ */
#endif /* NAS_IES_H */

View File

@ -18,20 +18,20 @@
*/
/*******************************************************************************
* This file had been created by nas_message.py script v0.1.0
* This file had been created by nas-message.py script v0.1.0
* Please do not modify this file but regenerate it via script.
* Created on: 2019-05-28 16:35:26.445690 by acetcom
* Created on: 2019-06-11 17:27:29.664161 by acetcom
* from 24301-d80.docx
******************************************************************************/
#ifndef __NAS_MESSAGE_H__
#define __NAS_MESSAGE_H__
#ifndef NAS_MESSAGE_H
#define NAS_MESSAGE_H
#include "nas_ies.h"
#include "nas-ies.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif
/* The Packet Buffer(ogs_pkbuf_t) for NAS message MUST make a HEADROOM.
* When calculating AES_CMAC, we need to use the headroom of the packet. */
@ -1413,6 +1413,6 @@ int nas_plain_encode(
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif /* __NAS_MESSAGE_H__ */
#endif /* NAS_MESSAGE_H */

View File

@ -17,7 +17,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "nas_types.h"
#include "nas-types.h"
#undef OGS_LOG_DOMAIN
#define OGS_LOG_DOMAIN __base_nas_domain

View File

@ -13,4 +13,4 @@ user@host ~/Documents/git/nextepc/lib/gtp/support$ \
* Generate Message support files
user@host ~/Documents/git/nextepc/lib/s1ap/support$ \
python nas_message.py -f 24301-d80.docx -o ..
python nas-message.py -f 24301-d80.docx -o ..

View File

@ -74,14 +74,14 @@ def output_header_to_file(f):
""")
f.write("/*******************************************************************************\n")
f.write(" * This file had been created by nas_message.py script v%s\n" % (version))
f.write(" * This file had been created by nas-message.py script v%s\n" % (version))
f.write(" * Please do not modify this file but regenerate it via script.\n")
f.write(" * Created on: %s by %s\n * from %s\n" % (str(now), getpass.getuser(), filename))
f.write(" ******************************************************************************/\n\n")
def usage():
print "Python generating NAS Message encoder/decoder v%s" % (version)
print "Usage: python nas_message.py [options]"
print "Usage: python nas-message.py [options]"
print "Available options:"
print "-d Enable script debug"
print "-f [file] Input file to parse"
@ -320,7 +320,7 @@ for (k, v) in sorted_msg_list:
type_list[key] = { "reference" : ie["reference"], "presence" : ie["presence"], "format" : ie["format"], "length" : ie["length"], "message" : k, "value" : ie["value"] }
d_info("[Type List]")
typefile = currentdir + "type_list.py"
typefile = currentdir + "type-list.py"
if os.path.isfile(typefile) and os.access(typefile, os.R_OK):
execfile(typefile)
print "Read from " + typefile
@ -328,16 +328,16 @@ if os.path.isfile(typefile) and os.access(typefile, os.R_OK):
tmp = [(k, v["reference"]) for k, v in type_list.items()]
sorted_type_list = sorted(tmp, key=lambda tup: tup[1])
f = open(outdir + 'nas_ies.h', 'w')
f = open(outdir + 'nas-ies.h', 'w')
output_header_to_file(f)
f.write("""#ifndef __NAS_IES_H__
#define __NAS_IES_H__
f.write("""#ifndef NAS_IES_H
#define NAS_IES_H
#include "nas_types.h"
#include "nas-types.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif
int nas_encode_optional_type(ogs_pkbuf_t *pkbuf, uint8_t type);
@ -354,16 +354,16 @@ f.write("\n")
f.write("""#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif /* __NAS_IES_H__ */
#endif /* NAS_IES_H */
""")
f.close()
f = open(outdir + 'nas_ies.c', 'w')
f = open(outdir + 'nas-ies.c', 'w')
output_header_to_file(f)
f.write("""#include "nas_ies.h"
f.write("""#include "nas-ies.h"
#undef OGS_LOG_DOMAIN
#define OGS_LOG_DOMAIN __base_nas_domain
@ -491,16 +491,16 @@ for (k, v) in sorted_type_list:
f.write("}\n\n");
f.close()
f = open(outdir + 'nas_message.h', 'w')
f = open(outdir + 'nas-message.h', 'w')
output_header_to_file(f)
f.write("""#ifndef __NAS_MESSAGE_H__
#define __NAS_MESSAGE_H__
f.write("""#ifndef NAS_MESSAGE_H
#define NAS_MESSAGE_H
#include "nas_ies.h"
#include "nas-ies.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#endif
/* The Packet Buffer(ogs_pkbuf_t) for NAS message MUST make a HEADROOM.
* When calculating AES_CMAC, we need to use the headroom of the packet. */
@ -628,18 +628,18 @@ int nas_plain_encode(
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
#endif /* __NAS_MESSAGE_H__ */
#endif /* NAS_MESSAGE_H */
""")
f.close()
f = open(outdir + 'nas_decoder.c', 'w')
f = open(outdir + 'nas-decoder.c', 'w')
output_header_to_file(f)
f.write("""#include "nas_message.h"
f.write("""#include "nas-message.h"
#undef OGS_LOG_DOMAIN
#define OGS_LOG_DOMAIN __base_nas_domain
@ -799,31 +799,13 @@ f.write(""" default:
return OGS_OK;
}
#if 0 /* deprecated */
int nas_plain_decode(nas_message_t *message, ogs_pkbuf_t *pkbuf)
{
nas_security_header_t *h = NULL;
ogs_assert(pkbuf);
h = pkbuf->data;
ogs_assert(h);
if (h->protocol_discriminator == NAS_PROTOCOL_DISCRIMINATOR_EMM)
return nas_emm_decode(message, pkbuf);
else if (h->protocol_discriminator == NAS_PROTOCOL_DISCRIMINATOR_ESM)
return nas_esm_decode(message, pkbuf);
ogs_assert_if_reached();
"Invalid Protocol : %d", h->protocol_discriminator);
}
#endif
""")
f.close()
f = open(outdir + 'nas_encoder.c', 'w')
f = open(outdir + 'nas-encoder.c', 'w')
output_header_to_file(f)
f.write("""#include "nas_message.h"
f.write("""#include "nas-message.h"
#undef OGS_LOG_DOMAIN
#define OGS_LOG_DOMAIN __base_nas_domain

2
main.c
View File

@ -7,7 +7,7 @@
/* Server */
#include "app/application.h"
#include "app_init.h"
#include "app-init.h"
static char *version = "NextEPC daemon v" PACKAGE_VERSION;

View File

@ -1,7 +1,7 @@
#include "app/context.h"
#include "app/application.h"
#include "app_init.h"
#include "app-init.h"
static ogs_proc_mutex_t *pcrf_sem1 = NULL;
static ogs_proc_mutex_t *pcrf_sem2 = NULL;

View File

@ -1,7 +1,7 @@
#include "app/context.h"
#include "app/application.h"
#include "app_init.h"
#include "app-init.h"
extern int __hss_log_domain;

View File

@ -1,7 +1,7 @@
#include <mongoc.h>
#include <yaml.h>
#include "fd/fd_lib.h"
#include "fd/fd-lib.h"
#include "app/context.h"
#include "hss_context.h"

View File

@ -1,7 +1,7 @@
#ifndef __HSS_CONTEXT_H__
#define __HSS_CONTEXT_H__
#include "fd/s6a/s6a_message.h"
#include "fd/s6a/s6a-message.h"
#ifdef __cplusplus
extern "C" {

View File

@ -1,8 +1,8 @@
#include "ogs-crypt.h"
#include "fd/fd_lib.h"
#include "fd/s6a/s6a_dict.h"
#include "fd/s6a/s6a_message.h"
#include "fd/fd-lib.h"
#include "fd/s6a/s6a-dict.h"
#include "fd/s6a/s6a-message.h"
#include "hss_context.h"
#include "hss_auc.h"

View File

@ -1,7 +1,7 @@
#include "app/context.h"
#include "app/application.h"
#include "app_init.h"
#include "app-init.h"
extern int __mme_log_domain;

View File

@ -1,4 +1,4 @@
#include "nas/nas_message.h"
#include "nas/nas-message.h"
#include "nas_security.h"
#include "mme_kdf.h"

View File

@ -1,4 +1,4 @@
#include "nas/nas_message.h"
#include "nas/nas-message.h"
#include "mme_event.h"

View File

@ -1,7 +1,7 @@
#ifndef __EMM_HANDLER_H__
#define __EMM_HANDLER_H__
#include "nas/nas_message.h"
#include "nas/nas-message.h"
#include "mme_context.h"

View File

@ -1,6 +1,6 @@
#include "nas/nas_message.h"
#include "fd/fd_lib.h"
#include "fd/s6a/s6a_message.h"
#include "nas/nas-message.h"
#include "fd/fd-lib.h"
#include "fd/s6a/s6a-message.h"
#include "mme_event.h"
#include "mme_kdf.h"

View File

@ -1,4 +1,4 @@
#include "nas/nas_message.h"
#include "nas/nas-message.h"
#include "nas_security.h"
#include "esm_build.h"

View File

@ -1,4 +1,4 @@
#include "nas/nas_message.h"
#include "nas/nas-message.h"
#include "mme_context.h"
#include "nas_path.h"

View File

@ -1,7 +1,7 @@
#ifndef __ESM_HANDLER_H__
#define __ESM_HANDLER_H__
#include "nas/nas_message.h"
#include "nas/nas-message.h"
#include "mme_context.h"

View File

@ -1,4 +1,4 @@
#include "nas/nas_message.h"
#include "nas/nas-message.h"
#include "mme_event.h"
#include "mme_sm.h"

View File

@ -3,11 +3,11 @@
#include "ogs-sctp.h"
#include "asn1c/s1ap_message.h"
#include "gtp/gtp_xact.h"
#include "gtp/gtp_node.h"
#include "gtp/gtp_path.h"
#include "fd/fd_lib.h"
#include "asn1c/s1ap-message.h"
#include "gtp/gtp-xact.h"
#include "gtp/gtp-node.h"
#include "gtp/gtp-path.h"
#include "fd/fd-lib.h"
#include "app/context.h"
#include "nas_conv.h"

View File

@ -4,10 +4,10 @@
#include "ogs-crypt.h"
#include "base/types.h"
#include "asn1c/s1ap_message.h"
#include "nas/nas_message.h"
#include "fd/s6a/s6a_message.h"
#include "gtp/gtp_tlv.h"
#include "asn1c/s1ap-message.h"
#include "nas/nas-message.h"
#include "fd/s6a/s6a-message.h"
#include "gtp/gtp-tlv.h"
/* S1AP */
#include "S1AP_Cause.h"

View File

@ -1,6 +1,6 @@
#include "fd/fd_lib.h"
#include "fd/s6a/s6a_dict.h"
#include "fd/s6a/s6a_message.h"
#include "fd/fd-lib.h"
#include "fd/s6a/s6a-dict.h"
#include "fd/s6a/s6a-message.h"
#include "mme_event.h"
#include "mme_fd_path.h"

View File

@ -1,6 +1,6 @@
#include "gtp/gtp_node.h"
#include "gtp/gtp_path.h"
#include "gtp/gtp_xact.h"
#include "gtp/gtp-node.h"
#include "gtp/gtp-path.h"
#include "gtp/gtp-xact.h"
#include "mme_event.h"
#include "mme_gtp_path.h"

View File

@ -1,6 +1,6 @@
#include "ogs-sctp.h"
#include "gtp/gtp_xact.h"
#include "gtp/gtp-xact.h"
#include "app/context.h"
#include "mme_context.h"

View File

@ -1,7 +1,7 @@
#ifndef __MME_KDF_H__
#define __MME_KDF_H__
#include "nas/nas_ies.h"
#include "nas/nas-ies.h"
/* Algorithm Type Distinguishers */
#define MME_KDF_NAS_ENC_ALG 0x01

View File

@ -1,7 +1,7 @@
#include "gtp/gtp_types.h"
#include "gtp/gtp_conv.h"
#include "gtp/gtp_message.h"
#include "gtp/gtp_node.h"
#include "gtp/gtp-types.h"
#include "gtp/gtp-conv.h"
#include "gtp/gtp-message.h"
#include "gtp/gtp-node.h"
#include "mme_context.h"

View File

@ -1,7 +1,7 @@
#ifndef __MME_S11_BUILD_H__
#define __MME_S11_BUILD_H__
#include "gtp/gtp_message.h"
#include "gtp/gtp-message.h"
#ifdef __cplusplus
extern "C" {

View File

@ -1,6 +1,6 @@
#include "gtp/gtp_types.h"
#include "gtp/gtp_conv.h"
#include "gtp/gtp_xact.h"
#include "gtp/gtp-types.h"
#include "gtp/gtp-conv.h"
#include "gtp/gtp-xact.h"
#include "mme_event.h"
#include "mme_sm.h"

View File

@ -1,7 +1,7 @@
#ifndef __MME_S11_HANDLER_H__
#define __MME_S11_HANDLER_H__
#include "gtp/gtp_message.h"
#include "gtp/gtp-message.h"
#include "mme_context.h"

View File

@ -1,4 +1,4 @@
#include "fd/s6a/s6a_message.h"
#include "fd/s6a/s6a-message.h"
#include "nas_path.h"
#include "s1ap-path.h"

View File

@ -1,7 +1,7 @@
#ifndef __MME_S6A_HANDLER_H__
#define __MME_S6A_HANDLER_H__
#include "fd/s6a/s6a_message.h"
#include "fd/s6a/s6a-message.h"
#include "mme_context.h"
#ifdef __cplusplus

View File

@ -1,7 +1,7 @@
#include "asn1c/s1ap_message.h"
#include "nas/nas_message.h"
#include "gtp/gtp_xact.h"
#include "fd/fd_lib.h"
#include "asn1c/s1ap-message.h"
#include "nas/nas-message.h"
#include "gtp/gtp-xact.h"
#include "fd/fd-lib.h"
#include "mme_event.h"
#include "mme_sm.h"

View File

@ -1,7 +1,7 @@
#ifndef __NAS_CONV_H__
#define __NAS_CONV_H__
#include "nas/nas_message.h"
#include "nas/nas-message.h"
#ifdef __cplusplus
extern "C" {

View File

@ -1,4 +1,4 @@
#include "nas/nas_message.h"
#include "nas/nas-message.h"
#include "nas_security.h"
int nas_security_encode(

View File

@ -21,7 +21,7 @@
#define S1AP_PATH_H
#include "mme_context.h"
#include "asn1c/s1ap_message.h"
#include "asn1c/s1ap-message.h"
#ifdef __cplusplus
extern "C" {

View File

@ -1,4 +1,4 @@
#include "fd/s6a/s6a_message.h"
#include "fd/s6a/s6a-message.h"
#include "mme_context.h"

View File

@ -1,7 +1,7 @@
#ifndef __S1AP_BUILD_H__
#define __S1AP_BUILD_H__
#include "asn1c/s1ap_message.h"
#include "asn1c/s1ap-message.h"
#include "mme_context.h"
#include "sbc_message.h"

View File

@ -1,7 +1,7 @@
#ifndef __S1AP_CONV_H__
#define __S1AP_CONV_H__
#include "asn1c/s1ap_message.h"
#include "asn1c/s1ap-message.h"
#ifdef __cplusplus
extern "C" {

View File

@ -1,7 +1,7 @@
#ifndef __S1AP_HANDLER_H__
#define __S1AP_HANDLER_H__
#include "asn1c/s1ap_message.h"
#include "asn1c/s1ap-message.h"
#include "mme_context.h"

View File

@ -1,5 +1,5 @@
#include "nas/nas_message.h"
#include "gtp/gtp_message.h"
#include "nas/nas-message.h"
#include "gtp/gtp-message.h"
#include "s1ap_build.h"
#include "s1ap_handler.h"

View File

@ -1,7 +1,7 @@
#include "app/context.h"
#include "app/application.h"
#include "app_init.h"
#include "app-init.h"
extern int __pcrf_log_domain;

View File

@ -1,7 +1,7 @@
#include <mongoc.h>
#include <yaml.h>
#include "fd/fd_lib.h"
#include "fd/fd-lib.h"
#include "app/context.h"
#include "pcrf_context.h"

View File

@ -1,7 +1,7 @@
#ifndef __PCRF_CONTEXT_H__
#define __PCRF_CONTEXT_H__
#include "fd/gx/gx_message.h"
#include "fd/gx/gx-message.h"
#ifdef __cplusplus
extern "C" {

View File

@ -1,4 +1,4 @@
#include "fd/fd_lib.h"
#include "fd/fd-lib.h"
#include "pcrf_context.h"
#include "pcrf_fd_path.h"

View File

@ -1,8 +1,8 @@
#include "fd/fd_lib.h"
#include "fd/gx/gx_dict.h"
#include "fd/rx/rx_dict.h"
#include "fd/gx/gx_message.h"
#include "fd/rx/rx_message.h"
#include "fd/fd-lib.h"
#include "fd/gx/gx-dict.h"
#include "fd/rx/rx-dict.h"
#include "fd/gx/gx-message.h"
#include "fd/rx/rx-message.h"
#include "pcrf_context.h"
#include "pcrf_fd_path.h"

View File

@ -1,6 +1,6 @@
#include "fd/fd_lib.h"
#include "fd/rx/rx_dict.h"
#include "fd/rx/rx_message.h"
#include "fd/fd-lib.h"
#include "fd/rx/rx-dict.h"
#include "fd/rx/rx-message.h"
#include "pcrf_context.h"
#include "pcrf_fd_path.h"

View File

@ -1,7 +1,7 @@
#include "app/context.h"
#include "app/application.h"
#include "app_init.h"
#include "app-init.h"
extern int __pgw_log_domain;

View File

@ -1,13 +1,13 @@
#include <mongoc.h>
#include <yaml.h>
#include "gtp/gtp_types.h"
#include "gtp/gtp_conv.h"
#include "gtp/gtp_node.h"
#include "gtp/gtp_path.h"
#include "gtp/gtp_xact.h"
#include "gtp/gtp-types.h"
#include "gtp/gtp-conv.h"
#include "gtp/gtp-node.h"
#include "gtp/gtp-path.h"
#include "gtp/gtp-xact.h"
#include "fd/fd_lib.h"
#include "fd/fd-lib.h"
#include "app/context.h"
#include "pgw_context.h"

View File

@ -1,8 +1,8 @@
#ifndef __PGW_CONTEXT_H__
#define __PGW_CONTEXT_H__
#include "gtp/gtp_types.h"
#include "gtp/gtp_message.h"
#include "gtp/gtp-types.h"
#include "gtp/gtp-message.h"
#ifdef __cplusplus
extern "C" {

View File

@ -1,8 +1,8 @@
#include "gtp/gtp_xact.h"
#include "gtp/gtp-xact.h"
#include "fd/fd_lib.h"
#include "fd/gx/gx_dict.h"
#include "fd/gx/gx_message.h"
#include "fd/fd-lib.h"
#include "fd/gx/gx-dict.h"
#include "fd/gx/gx-message.h"
#include "pgw_event.h"
#include "pgw_fd_path.h"

View File

@ -16,8 +16,8 @@
#include <netinet/icmp6.h>
#endif
#include "gtp/gtp_node.h"
#include "gtp/gtp_path.h"
#include "gtp/gtp-node.h"
#include "gtp/gtp-path.h"
#include "app/context.h"
#include "pgw_context.h"

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