initial code for diameter gx
This commit is contained in:
parent
bcf27666a8
commit
4587288f5d
|
@ -2,11 +2,13 @@ Prerequisite
|
|||
============
|
||||
|
||||
sudo apt-get install git cscope gdb
|
||||
sudo apt-get install bison flex
|
||||
sudo apt-get install autoconf libtool m4 pkg-config
|
||||
sudo apt-get install libsctp-dev
|
||||
sudo apt-get install freediameter-dev
|
||||
sudo apt-get install mongodb
|
||||
sudo apt-get install libmongoc-1.0
|
||||
sudo apt-get install libxml2
|
||||
|
||||
|
||||
Build from Git
|
||||
|
|
|
@ -65,6 +65,8 @@ AC_PROG_CC
|
|||
AC_PROG_CPP
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_AWK
|
||||
AC_PROG_YACC
|
||||
AC_PROG_LEX
|
||||
AM_PROG_AR
|
||||
|
||||
dnl libtool
|
||||
|
@ -292,6 +294,8 @@ AC_CHECK_LIB([gnutls], [gnutls_global_init], [LIBS="${LIBS} -lgnutls"])
|
|||
|
||||
PKG_CHECK_MODULES([MONGOC], libmongoc-1.0 >= 1.6.3)
|
||||
LIBS="$LIBS $MONGOC_LIBS"
|
||||
PKG_CHECK_MODULES([LIBXML2], libxml-2.0 >= 2.9.1)
|
||||
LIBS="$LIBS $LIBXML2_LIBS"
|
||||
|
||||
#####################
|
||||
#### Conclusion. ####
|
||||
|
@ -311,6 +315,7 @@ AC_CONFIG_FILES([lib/base/Makefile])
|
|||
AC_CONFIG_FILES([lib/s1ap/asn1c/Makefile])
|
||||
AC_CONFIG_FILES([lib/s1ap/Makefile])
|
||||
AC_CONFIG_FILES([lib/nas/Makefile])
|
||||
AC_CONFIG_FILES([lib/fd/gx/Makefile])
|
||||
AC_CONFIG_FILES([lib/fd/s6a/Makefile])
|
||||
AC_CONFIG_FILES([lib/fd/Makefile])
|
||||
AC_CONFIG_FILES([lib/gtp/Makefile])
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
SUBDIRS = s6a
|
||||
SUBDIRS = gx s6a
|
||||
|
||||
noinst_LTLIBRARIES = libfd.la
|
||||
|
||||
|
@ -10,17 +10,8 @@ libfd_la_SOURCES = \
|
|||
nodist_libfd_la_SOURCES = \
|
||||
libapp_sip.c fd_context.c fd_message.c fd_logger.c fd_init.c
|
||||
|
||||
libfd_la_DEPENDENCIES = \
|
||||
$(top_srcdir)/lib/base/libbase.la \
|
||||
$(top_srcdir)/lib/fd/s6a/libfds6a.la
|
||||
|
||||
libfd_la_LIBADD = \
|
||||
$(top_srcdir)/lib/base/libbase.la \
|
||||
$(top_srcdir)/lib/fd/s6a/libfds6a.la
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/lib/core/include \
|
||||
-I$(top_srcdir)/lib/fd/s6a
|
||||
-I$(top_srcdir)/lib/core/include
|
||||
|
||||
AM_CFLAGS = \
|
||||
-Wall -Werror
|
||||
|
|
|
@ -5,8 +5,6 @@
|
|||
#include "core_signal.h"
|
||||
#include "core_semaphore.h"
|
||||
|
||||
#include "s6a_lib.h"
|
||||
|
||||
#include "fd_context.h"
|
||||
#include "fd_logger.h"
|
||||
#include "fd_lib.h"
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
noinst_LTLIBRARIES = libfdgx.la
|
||||
|
||||
AM_YFLAGS = -p dict_lxml -d
|
||||
AM_LFLAGS = -p -Cem -Pdict_lxml
|
||||
|
||||
nodist_libfdgx_la_SOURCES = \
|
||||
dict_lxml.tab.y lex.dict_lxml.l dict_lxml.c dict_lxml_xml.c
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/lib/fd/gx \
|
||||
-I$(top_srcdir)/lib/fd/include \
|
||||
@LIBXML2_CFLAGS@
|
||||
|
||||
AM_CFLAGS = \
|
||||
-Wall -Werror
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
MOSTLYCLEANFILES = *.stackdump
|
||||
|
||||
EXTRA_DIST = .libs $(noinst_LTLIBRARIES)
|
|
@ -0,0 +1,54 @@
|
|||
/*********************************************************************************************************
|
||||
* Software License Agreement (BSD License) *
|
||||
* Author: Sebastien Decugis <sdecugis@freediameter.net> *
|
||||
* *
|
||||
* Copyright (c) 2011, WIDE Project and NICT *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* Redistribution and use of this software in source and binary forms, with or without modification, are *
|
||||
* permitted provided that the following conditions are met: *
|
||||
* *
|
||||
* * Redistributions of source code must retain the above *
|
||||
* copyright notice, this list of conditions and the *
|
||||
* following disclaimer. *
|
||||
* *
|
||||
* * Redistributions in binary form must reproduce the above *
|
||||
* copyright notice, this list of conditions and the *
|
||||
* following disclaimer in the documentation and/or other *
|
||||
* materials provided with the distribution. *
|
||||
* *
|
||||
* * Neither the name of the WIDE Project or NICT nor the *
|
||||
* names of its contributors may be used to endorse or *
|
||||
* promote products derived from this software without *
|
||||
* specific prior written permission of WIDE Project and *
|
||||
* NICT. *
|
||||
* *
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED *
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR *
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT *
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS *
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR *
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF *
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
|
||||
*********************************************************************************************************/
|
||||
|
||||
/*
|
||||
* Legacy XML dictionary files support for freeDiameter.
|
||||
*/
|
||||
|
||||
#include "dict_lxml.h"
|
||||
|
||||
/* entry point */
|
||||
static int dict_lxml_entry(char * conffile)
|
||||
{
|
||||
TRACE_ENTRY("%p", conffile);
|
||||
|
||||
/* Parse the configuration file -- everything happens there */
|
||||
CHECK_FCT( dict_lxml_handle(conffile) );
|
||||
|
||||
/* We're done */
|
||||
return 0;
|
||||
}
|
||||
|
||||
EXTENSION_ENTRY("dict_legacy_xml", dict_lxml_entry);
|
|
@ -0,0 +1,48 @@
|
|||
/*********************************************************************************************************
|
||||
* Software License Agreement (BSD License) *
|
||||
* Author: Sebastien Decugis <sdecugis@freediameter.net> *
|
||||
* *
|
||||
* Copyright (c) 2011, WIDE Project and NICT *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* Redistribution and use of this software in source and binary forms, with or without modification, are *
|
||||
* permitted provided that the following conditions are met: *
|
||||
* *
|
||||
* * Redistributions of source code must retain the above *
|
||||
* copyright notice, this list of conditions and the *
|
||||
* following disclaimer. *
|
||||
* *
|
||||
* * Redistributions in binary form must reproduce the above *
|
||||
* copyright notice, this list of conditions and the *
|
||||
* following disclaimer in the documentation and/or other *
|
||||
* materials provided with the distribution. *
|
||||
* *
|
||||
* * Neither the name of the WIDE Project or NICT nor the *
|
||||
* names of its contributors may be used to endorse or *
|
||||
* promote products derived from this software without *
|
||||
* specific prior written permission of WIDE Project and *
|
||||
* NICT. *
|
||||
* *
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED *
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR *
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT *
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS *
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR *
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF *
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
|
||||
*********************************************************************************************************/
|
||||
|
||||
/* Header file for the dict_legacy_xml extension.
|
||||
*
|
||||
* See the dict_legacy_xml.conf.sample file for the format of the configuration file.
|
||||
*/
|
||||
|
||||
/* FreeDiameter's common include file */
|
||||
#include <freeDiameter/extension.h>
|
||||
|
||||
/* Parse the configuration file */
|
||||
int dict_lxml_handle(char * conffile);
|
||||
|
||||
/* Parse an XML file and return the number of dictionary objects or -1 on error */
|
||||
int dict_lxml_parse(char * xmlfilename);
|
|
@ -0,0 +1,141 @@
|
|||
/*********************************************************************************************************
|
||||
* Software License Agreement (BSD License) *
|
||||
* Author: Sebastien Decugis <sdecugis@freediameter.net> *
|
||||
* *
|
||||
* Copyright (c) 2013, WIDE Project and NICT *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* Redistribution and use of this software in source and binary forms, with or without modification, are *
|
||||
* permitted provided that the following conditions are met: *
|
||||
* *
|
||||
* * Redistributions of source code must retain the above *
|
||||
* copyright notice, this list of conditions and the *
|
||||
* following disclaimer. *
|
||||
* *
|
||||
* * Redistributions in binary form must reproduce the above *
|
||||
* copyright notice, this list of conditions and the *
|
||||
* following disclaimer in the documentation and/or other *
|
||||
* materials provided with the distribution. *
|
||||
* *
|
||||
* * Neither the name of the WIDE Project or NICT nor the *
|
||||
* names of its contributors may be used to endorse or *
|
||||
* promote products derived from this software without *
|
||||
* specific prior written permission of WIDE Project and *
|
||||
* NICT. *
|
||||
* *
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED *
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR *
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT *
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS *
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR *
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF *
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
|
||||
*********************************************************************************************************/
|
||||
|
||||
/* Yacc extension's configuration parser.
|
||||
* See doc/dict_legacy_xml.conf.sample for configuration file format
|
||||
*/
|
||||
|
||||
/* For development only : */
|
||||
%debug
|
||||
%error-verbose
|
||||
|
||||
/* The parser receives the configuration file filename as parameter */
|
||||
%parse-param {char * conffile}
|
||||
|
||||
/* Keep track of location */
|
||||
%locations
|
||||
%pure-parser
|
||||
|
||||
%{
|
||||
#include "dict_lxml.h"
|
||||
#include "dict_lxml.tab.h" /* bison is not smart enough to define the YYLTYPE before including this code, so... */
|
||||
|
||||
/* Forward declaration */
|
||||
int yyparse(char * conffile);
|
||||
|
||||
static int nb_files = 0;
|
||||
static int nb_dict = 0;
|
||||
|
||||
/* Parse the configuration file */
|
||||
int dict_lxml_handle(char * conffile)
|
||||
{
|
||||
extern FILE * dict_lxmlin;
|
||||
int ret;
|
||||
|
||||
TRACE_ENTRY("%p", conffile);
|
||||
|
||||
TRACE_DEBUG (FULL, "Parsing configuration file: %s...", conffile);
|
||||
|
||||
dict_lxmlin = fopen(conffile, "r");
|
||||
if (dict_lxmlin == NULL) {
|
||||
ret = errno;
|
||||
fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret));
|
||||
TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file.");
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = yyparse(conffile);
|
||||
|
||||
fclose(dict_lxmlin);
|
||||
|
||||
if (ret != 0) {
|
||||
TRACE_DEBUG (INFO, "Unable to parse the configuration file.");
|
||||
return EINVAL;
|
||||
} else {
|
||||
TRACE_DEBUG(FULL, "%d XML dictionary files parsed successfully, %d dictionary objects added.", nb_files, nb_dict);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* The Lex parser prototype */
|
||||
int dict_lxmllex(YYSTYPE *lvalp, YYLTYPE *llocp);
|
||||
|
||||
/* Function to report the errors */
|
||||
void yyerror (YYLTYPE *ploc, char * conffile, char const *s)
|
||||
{
|
||||
TRACE_DEBUG(INFO, "Error in configuration parsing");
|
||||
|
||||
if (ploc->first_line != ploc->last_line)
|
||||
fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
|
||||
else if (ploc->first_column != ploc->last_column)
|
||||
fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
|
||||
else
|
||||
fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s);
|
||||
}
|
||||
|
||||
%}
|
||||
|
||||
/* Values returned by lex for token */
|
||||
%union {
|
||||
char *string; /* The string is allocated by strdup in lex.*/
|
||||
}
|
||||
|
||||
/* In case of error in the lexical analysis */
|
||||
%token LEX_ERROR
|
||||
|
||||
/* A (de)quoted string (malloc'd in lex parser; it must be freed after use) */
|
||||
%token <string> QSTRING
|
||||
|
||||
/* -------------------------------------- */
|
||||
%%
|
||||
|
||||
/* The grammar definition */
|
||||
conffile: /* empty grammar is OK */
|
||||
| conffile xmlfile
|
||||
;
|
||||
|
||||
/* a RULE entry */
|
||||
xmlfile: QSTRING ';'
|
||||
{
|
||||
int ret = dict_lxml_parse($1);
|
||||
if (ret < 0) {
|
||||
yyerror (&yylloc, conffile, "An error occurred while parsing a file, aborting...");
|
||||
YYERROR;
|
||||
}
|
||||
nb_files++;
|
||||
nb_dict += ret;
|
||||
}
|
||||
;
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,98 @@
|
|||
/*********************************************************************************************************
|
||||
* Software License Agreement (BSD License) *
|
||||
* Author: Sebastien Decugis <sdecugis@freediameter.net> *
|
||||
* *
|
||||
* Copyright (c) 2013, WIDE Project and NICT *
|
||||
* All rights reserved. *
|
||||
* *
|
||||
* Redistribution and use of this software in source and binary forms, with or without modification, are *
|
||||
* permitted provided that the following conditions are met: *
|
||||
* *
|
||||
* * Redistributions of source code must retain the above *
|
||||
* copyright notice, this list of conditions and the *
|
||||
* following disclaimer. *
|
||||
* *
|
||||
* * Redistributions in binary form must reproduce the above *
|
||||
* copyright notice, this list of conditions and the *
|
||||
* following disclaimer in the documentation and/or other *
|
||||
* materials provided with the distribution. *
|
||||
* *
|
||||
* * Neither the name of the WIDE Project or NICT nor the *
|
||||
* names of its contributors may be used to endorse or *
|
||||
* promote products derived from this software without *
|
||||
* specific prior written permission of WIDE Project and *
|
||||
* NICT. *
|
||||
* *
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED *
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR *
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT *
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS *
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR *
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF *
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
|
||||
*********************************************************************************************************/
|
||||
|
||||
/* Tokenizer
|
||||
*
|
||||
*/
|
||||
|
||||
%{
|
||||
#include "dict_lxml.h"
|
||||
/* Include yacc tokens definitions */
|
||||
#include "dict_lxml.tab.h"
|
||||
|
||||
/* Update the column information */
|
||||
#define YY_USER_ACTION { \
|
||||
yylloc->first_column = yylloc->last_column + 1; \
|
||||
yylloc->last_column = yylloc->first_column + yyleng - 1; \
|
||||
}
|
||||
|
||||
/* Avoid warning with newer flex */
|
||||
#define YY_NO_INPUT
|
||||
|
||||
%}
|
||||
|
||||
qstring \"[^\"\n]*\"
|
||||
|
||||
|
||||
%option bison-bridge bison-locations
|
||||
%option noyywrap
|
||||
%option nounput
|
||||
|
||||
%%
|
||||
|
||||
/* Update the line count */
|
||||
\n {
|
||||
yylloc->first_line++;
|
||||
yylloc->last_line++;
|
||||
yylloc->last_column=0;
|
||||
}
|
||||
|
||||
/* Eat all spaces but not new lines */
|
||||
([[:space:]]{-}[\n])+ ;
|
||||
/* Eat all comments */
|
||||
#.*$ ;
|
||||
|
||||
/* Recognize quoted strings */
|
||||
{qstring} {
|
||||
/* Match a quoted string. */
|
||||
CHECK_MALLOC_DO( yylval->string = strdup(yytext+1),
|
||||
{
|
||||
TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s", yytext, strerror(errno));
|
||||
return LEX_ERROR; /* trig an error in yacc parser */
|
||||
} );
|
||||
yylval->string[strlen(yytext) - 2] = '\0';
|
||||
return QSTRING;
|
||||
}
|
||||
|
||||
/* Valid single characters for yyparse */
|
||||
[;] { return yytext[0]; }
|
||||
|
||||
/* Unrecognized sequence, if it did not match any previous pattern */
|
||||
[^[:space:]\";\n]+ {
|
||||
fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext);
|
||||
return LEX_ERROR;
|
||||
}
|
||||
|
||||
%%
|
|
@ -0,0 +1,41 @@
|
|||
# libfdxml.la - a libtool library file
|
||||
# Generated by libtool (GNU libtool) 2.4.6
|
||||
#
|
||||
# Please DO NOT delete this file!
|
||||
# It is necessary for linking the library.
|
||||
|
||||
# The name that we can dlopen(3).
|
||||
dlname=''
|
||||
|
||||
# Names of this library.
|
||||
library_names=''
|
||||
|
||||
# The name of the static archive.
|
||||
old_library='libfdxml.a'
|
||||
|
||||
# Linker flags that cannot go in dependency_libs.
|
||||
inherited_linker_flags=' -framework Security -framework CoreFoundation'
|
||||
|
||||
# Libraries that this one depends upon.
|
||||
dependency_libs=' -lpthread -lsctp -lfdcore -lfdproto -lgnutls -L/usr/local/Cellar/mongo-c-driver/1.6.3/lib -lmongoc-1.0 -lsasl2 -lbson-1.0 -lxml2'
|
||||
|
||||
# Names of additional weak libraries provided by this library
|
||||
weak_library_names=''
|
||||
|
||||
# Version information for libfdxml.
|
||||
current=
|
||||
age=
|
||||
revision=
|
||||
|
||||
# Is this an already installed library?
|
||||
installed=no
|
||||
|
||||
# Should we warn about portability when linking against -modules?
|
||||
shouldnotlink=no
|
||||
|
||||
# Files to dlopen/dlpreopen
|
||||
dlopen=''
|
||||
dlpreopen=''
|
||||
|
||||
# Directory that this library needs to be installed in:
|
||||
libdir=''
|
|
@ -10,7 +10,7 @@ nodist_libfds6a_la_SOURCES = \
|
|||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/lib/fd/s6a \
|
||||
-I$(top_srcdir)/lib/fd
|
||||
-I$(top_srcdir)/lib/fd/include
|
||||
|
||||
AM_CFLAGS = \
|
||||
-Wall -Werror
|
||||
|
|
|
@ -10,48 +10,58 @@ COMMON_INCLUDES = app.h
|
|||
libmme_la_SOURCES = $(COMMON_INCLUDES)
|
||||
nodist_libmme_la_SOURCES = mme.c $(COMMON_SOURCES)
|
||||
libmme_la_DEPENDENCIES = \
|
||||
$(top_srcdir)/lib/base/libbase.la \
|
||||
$(top_srcdir)/lib/logger/liblogger.la \
|
||||
$(top_srcdir)/src/mme/libmme.la
|
||||
libmme_la_LIBADD = \
|
||||
$(top_srcdir)/lib/base/libbase.la \
|
||||
$(top_srcdir)/lib/logger/liblogger.la \
|
||||
$(top_srcdir)/src/mme/libmme.la
|
||||
|
||||
libhss_la_SOURCES = $(COMMON_INCLUDES)
|
||||
nodist_libhss_la_SOURCES = hss.c $(COMMON_SOURCES)
|
||||
libhss_la_DEPENDENCIES = \
|
||||
$(top_srcdir)/lib/base/libbase.la \
|
||||
$(top_srcdir)/lib/logger/liblogger.la \
|
||||
$(top_srcdir)/src/hss/libhss.la
|
||||
libhss_la_LIBADD = \
|
||||
$(top_srcdir)/lib/base/libbase.la \
|
||||
$(top_srcdir)/lib/logger/liblogger.la \
|
||||
$(top_srcdir)/src/hss/libhss.la
|
||||
|
||||
libsgw_la_SOURCES = $(COMMON_INCLUDES)
|
||||
nodist_libsgw_la_SOURCES = sgw.c $(COMMON_SOURCES)
|
||||
libsgw_la_DEPENDENCIES = \
|
||||
$(top_srcdir)/lib/base/libbase.la \
|
||||
$(top_srcdir)/lib/logger/liblogger.la \
|
||||
$(top_srcdir)/src/sgw/libsgw.la
|
||||
libsgw_la_LIBADD = \
|
||||
$(top_srcdir)/lib/base/libbase.la \
|
||||
$(top_srcdir)/lib/logger/liblogger.la \
|
||||
$(top_srcdir)/src/sgw/libsgw.la
|
||||
|
||||
libpgw_la_SOURCES = $(COMMON_INCLUDES)
|
||||
nodist_libpgw_la_SOURCES = pgw.c $(COMMON_SOURCES)
|
||||
libpgw_la_DEPENDENCIES = \
|
||||
$(top_srcdir)/lib/base/libbase.la \
|
||||
$(top_srcdir)/lib/logger/liblogger.la \
|
||||
$(top_srcdir)/src/pgw/libpgw.la
|
||||
libpgw_la_LIBADD = \
|
||||
$(top_srcdir)/lib/base/libbase.la \
|
||||
$(top_srcdir)/lib/logger/liblogger.la \
|
||||
$(top_srcdir)/src/pgw/libpgw.la
|
||||
|
||||
libepc_la_SOURCES = $(COMMON_INCLUDES)
|
||||
nodist_libepc_la_SOURCES = epc.c $(COMMON_SOURCES)
|
||||
libepc_la_DEPENDENCIES = \
|
||||
$(top_srcdir)/lib/base/libbase.la \
|
||||
$(top_srcdir)/lib/logger/liblogger.la \
|
||||
$(top_srcdir)/src/mme/libmme.la \
|
||||
$(top_srcdir)/src/hss/libhss.la \
|
||||
$(top_srcdir)/src/sgw/libsgw.la \
|
||||
$(top_srcdir)/src/pgw/libpgw.la
|
||||
libepc_la_LIBADD = \
|
||||
$(top_srcdir)/lib/base/libbase.la \
|
||||
$(top_srcdir)/lib/logger/liblogger.la \
|
||||
$(top_srcdir)/src/mme/libmme.la \
|
||||
$(top_srcdir)/src/hss/libhss.la \
|
||||
|
|
|
@ -10,10 +10,12 @@ nodist_libhss_la_SOURCES = \
|
|||
|
||||
libhss_la_DEPENDENCIES = \
|
||||
$(top_srcdir)/lib/core/src/libcore.la \
|
||||
$(top_srcdir)/lib/fd/s6a/libfds6a.la \
|
||||
$(top_srcdir)/lib/fd/libfd.la
|
||||
|
||||
libhss_la_LIBADD = \
|
||||
$(top_srcdir)/lib/core/src/libcore.la \
|
||||
$(top_srcdir)/lib/fd/s6a/libfds6a.la \
|
||||
$(top_srcdir)/lib/fd/libfd.la
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
|
|
|
@ -28,6 +28,7 @@ libmme_la_DEPENDENCIES = \
|
|||
$(top_srcdir)/lib/core/src/libcore.la \
|
||||
$(top_srcdir)/lib/s1ap/libs1ap.la \
|
||||
$(top_srcdir)/lib/nas/libnas.la \
|
||||
$(top_srcdir)/lib/fd/s6a/libfds6a.la \
|
||||
$(top_srcdir)/lib/fd/libfd.la \
|
||||
$(top_srcdir)/lib/gtp/libgtp.la
|
||||
|
||||
|
@ -35,6 +36,7 @@ libmme_la_LIBADD = \
|
|||
$(top_srcdir)/lib/core/src/libcore.la \
|
||||
$(top_srcdir)/lib/s1ap/libs1ap.la \
|
||||
$(top_srcdir)/lib/nas/libnas.la \
|
||||
$(top_srcdir)/lib/fd/s6a/libfds6a.la \
|
||||
$(top_srcdir)/lib/fd/libfd.la \
|
||||
$(top_srcdir)/lib/gtp/libgtp.la
|
||||
|
||||
|
|
|
@ -266,9 +266,6 @@ typedef struct _mme_sess_t {
|
|||
list_t bearer_list;
|
||||
|
||||
/* Related Context */
|
||||
#define MME_SESSION_SELECT_SGW(sess) \
|
||||
((sess) && ((sess)->sgw = mme_sgw_first()))
|
||||
|
||||
mme_sgw_t *sgw;
|
||||
mme_ue_t *mme_ue;
|
||||
|
||||
|
|
|
@ -19,7 +19,8 @@ void mme_s11_handle_create_session_request(mme_sess_t *sess)
|
|||
pkbuf_t *pkbuf = NULL;
|
||||
|
||||
/* FIXME : SGW Selection */
|
||||
MME_SESSION_SELECT_SGW(sess);
|
||||
d_assert(sess, return, "Null param");
|
||||
sess->sgw = mme_sgw_first();
|
||||
|
||||
rv = mme_s11_build_create_session_request(&pkbuf, sess);
|
||||
d_assert(rv == CORE_OK, return,
|
||||
|
|
Loading…
Reference in New Issue