Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
oai
freediameter
Commits
b9f7f002
Commit
b9f7f002
authored
Aug 31, 2009
by
Sebastien Decugis
Browse files
Fix names to proper case for freeDiameter
parent
d4982a45
Changes
24
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
b9f7f002
# This file is the source for generating the Makefile for the project, using cmake tool (cmake.org)
# Name of the project, and language
PROJECT
(
"
F
reeDiameter"
C
)
PROJECT
(
"
f
reeDiameter"
C
)
# Some subfolders may have tests
ENABLE_TESTING
()
...
...
@@ -18,7 +18,7 @@ ADD_DEFINITIONS(-D_GNU_SOURCE)
# Location for the include files
INCLUDE_DIRECTORIES
(
include
)
INCLUDE_DIRECTORIES
(
${
CMAKE_CURRENT_BINARY_DIR
}
/include
)
SUBDIRS
(
include/free
d
iameter
)
SUBDIRS
(
include/free
D
iameter
)
# some subfolders use yacc and lex parsers
SET
(
BISON_GENERATE_DEFINES TRUE
)
...
...
@@ -33,8 +33,8 @@ ENDIF( NOT BISON_EXECUTABLE OR NOT FLEX_EXECUTABLE )
# how to do the check with cmake???
# Location for the source code
SUBDIRS
(
libfree
d
iameter
)
SUBDIRS
(
free
d
iameter
)
SUBDIRS
(
libfree
D
iameter
)
SUBDIRS
(
free
D
iameter
)
# Do we build the extensions?
OPTION
(
IGNORE_ALL_EXTENSIONS
"Ignore the extensions completly?"
)
...
...
INSTALL
View file @
b9f7f002
...
...
@@ -12,10 +12,10 @@ cmake -DNO_TESTS:BOOL=OFF ../
make
make tests
Note: instead of passing options on the command line, you can
edit the CCmakeCache.txt file
or
use a CMake front-end (for example cmake-gui)
Note: instead of passing options on the command line, you can
use a CMake front-end (for example cmake-gui)
or
edit the CCmakeCache.txt file directly.
Note that there are dependencies on
some
external tools that may not be enforced by the configure script.
Note that there are dependencies on external tools that may not be enforced by the configure script.
On Ubuntu Intrepid, the following packages were required (aptitude install ...):
gcc make flex bison libsctp1 libsctp-dev cmake
...
...
@@ -27,13 +27,13 @@ Then the cmake command had to look like:
make install has not been tested yet and will probably not behave as expected!
You can also configure which extensions to build with CMake:
NoExtensions
:BOOL=OFF (or the following are ignored)
IGNORE_ALL_EXTENSIONS
:BOOL=OFF (or the following are ignored)
BUILD_APP_TEST:BOOL=ON
BUILD_RT_ANY:BOOL=ON
BUILD_RT_DEBUG:BOOL=ON
BUILD_RT_DEFAULT:BOOL=ON
BUILD_SAMPLE:BOOL=ON
You can change the default configuration file name:
DEFAULT_CONF_FILE:STRING=/path/to/some/free
d
iameter.conf
You can change the default configuration file
path
name:
DEFAULT_CONF_FILE:STRING=/path/to/some/free
D
iameter.conf
README
View file @
b9f7f002
The
F
reeDiameter daemon implements the Diameter base protocol.
Loadable extensions add the logic of Diameter applications
or
advanced use of the daemon.
The
f
reeDiameter daemon implements the Diameter base protocol.
Loadable extensions add the logic of Diameter applications
and
advanced use of the daemon.
See http://aaa.koganei.wide.ad.jp/ for more information on the project.
F
reeDiameter was previously known as the "waaad" project (WIDE AAA Daemon)
f
reeDiameter was previously known as the "waaad" project (WIDE AAA Daemon)
This
version
is not related to the "freediameter" project from Sun
, which seems abandoned
.
This
project
is not related to the "freediameter" project from Sun
on sourceforge
.
Author: Sebastien Decugis.
...
...
free
d
iameter/CMakeLists.txt
→
free
D
iameter/CMakeLists.txt
View file @
b9f7f002
# The subproject name
Project
(
"free
d
iameterd"
C
)
Project
(
"free
D
iameterd"
C
)
SET
(
PROJECT_VERSION 0.1
)
SET
(
PROJECT_COPYRIGHT
"Copyright (c) 2008-2009, WIDE Project (www.wide.ad.jp) and NICT (www.nict.go.jp)"
)
# List of source files
SET
(
FD_COMMON_SRC
f
d
.h
f
D
.h
dict_base_proto.c
)
# Building the executable
ADD_EXECUTABLE
(
free
d
iameterd
${
FD_COMMON_SRC
}
main.c
)
ADD_EXECUTABLE
(
free
D
iameterd
${
FD_COMMON_SRC
}
main.c
)
# The link command
LINK_DIRECTORIES
(
${
CURRENT_BINARY_DIR
}
/../libfree
d
iameter
)
TARGET_LINK_LIBRARIES
(
free
d
iameterd libfree
d
iameter
${
FD_LIBS
}
)
LINK_DIRECTORIES
(
${
CURRENT_BINARY_DIR
}
/../libfree
D
iameter
)
TARGET_LINK_LIBRARIES
(
free
D
iameterd libfree
D
iameter
${
FD_LIBS
}
)
# The unary tests directory
OPTION
(
SKIP_TESTS
"Skip compilation of the tests?"
OFF
)
...
...
free
d
iameter/dict_base_proto.c
→
free
D
iameter/dict_base_proto.c
View file @
b9f7f002
...
...
@@ -36,7 +36,7 @@
/* Diameter Base protocol definitions.
*/
#include "f
d
.h"
#include "f
D
.h"
#include <netinet/in.h>
#include <sys/socket.h>
...
...
free
d
iameter/f
d
.h
→
free
D
iameter/f
D
.h
View file @
b9f7f002
...
...
@@ -33,13 +33,13 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
*********************************************************************************************************/
/* This file contains the definitions for internal use in the free
d
iameter daemon */
/* This file contains the definitions for internal use in the free
D
iameter daemon */
#ifndef _FD_H
#define _FD_H
#include <free
d
iameter/free
d
iameter-host.h>
#include <free
d
iameter/free
d
iameter.h>
#include <free
D
iameter/free
D
iameter-host.h>
#include <free
D
iameter/free
D
iameter.h>
/* Create all the dictionary objects defined in the Diameter base RFC. */
int
fd_dict_base_protocol
(
struct
dictionary
*
dict
);
...
...
free
d
iameter/main.c
→
free
D
iameter/main.c
View file @
b9f7f002
...
...
@@ -33,7 +33,7 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
*********************************************************************************************************/
#include "f
d
.h"
#include "f
D
.h"
/* Entry point */
int
main
(
int
argc
,
char
*
argv
[])
...
...
@@ -53,7 +53,7 @@ int main(int argc, char * argv[])
/* For debug */
fd_dict_dump
(
fd_g_dict
);
TRACE_DEBUG
(
INFO
,
"
F
reeDiameter daemon initialized."
);
TRACE_DEBUG
(
INFO
,
"
f
reeDiameter daemon initialized."
);
return
0
;
}
free
d
iameter/tests/CMakeLists.txt
→
free
D
iameter/tests/CMakeLists.txt
View file @
b9f7f002
# Test directory
PROJECT
(
"libfree
d
iameter tests"
C
)
PROJECT
(
"libfree
D
iameter tests"
C
)
# give the possibility to configure the timeout duration for the tests
OPTION
(
TEST_TIMEOUT
"Timeout for the tests, in seconds (default: 5)?"
)
...
...
@@ -34,14 +34,14 @@ ENDFOREACH(SRC_FILE)
# SET(TEST_COMMON_SRC ${TEST_COMMON_SRC} "${CMAKE_CURRENT_BINARY_DIR}/../${SRC_FILE}")
# ENDFOREACH(SRC_FILE)
# Create an archive with the daemon common files
ADD_LIBRARY
(
f
d
core STATIC
${
TEST_COMMON_SRC
}
)
# Create an archive with the daemon common files
(all but main)
ADD_LIBRARY
(
f
D
core STATIC
${
TEST_COMMON_SRC
}
)
#############################
# Compile each test
FOREACH
(
TEST
${
TEST_LIST
}
)
ADD_EXECUTABLE
(
${
TEST
}
${
TEST
}
.c tests.h
)
TARGET_LINK_LIBRARIES
(
${
TEST
}
libfree
d
iameter f
d
core
${
FD_LIBS
}
)
TARGET_LINK_LIBRARIES
(
${
TEST
}
libfree
D
iameter f
D
core
${
FD_LIBS
}
)
ADD_TEST
(
${
TEST
}
${
EXECUTABLE_OUTPUT_PATH
}
/
${
TEST
}
)
ENDFOREACH
(
TEST
)
free
d
iameter/tests/testdict.c
→
free
D
iameter/tests/testdict.c
View file @
b9f7f002
File moved
free
d
iameter/tests/testmesg.c
→
free
D
iameter/tests/testmesg.c
View file @
b9f7f002
File moved
free
d
iameter/tests/testmq.c
→
free
D
iameter/tests/testmq.c
View file @
b9f7f002
...
...
@@ -35,7 +35,7 @@
#include "tests.h"
/* Structure for testing thre
a
shold function */
/* Structure for testing threshold function */
static
struct
thrh_test
{
struct
mqueue
*
queue
;
/* pointer to the queue */
int
h_calls
;
/* number of calls of h_cb */
...
...
free
d
iameter/tests/tests.h
→
free
D
iameter/tests/tests.h
View file @
b9f7f002
...
...
@@ -41,7 +41,7 @@
#ifndef _TESTS_H
#define _TESTS_H
#include "f
d
.h"
#include "f
D
.h"
#include <pthread.h>
#include <errno.h>
...
...
include/free
d
iameter/CMakeLists.txt
→
include/free
D
iameter/CMakeLists.txt
View file @
b9f7f002
#CMake configuration for free
d
iameter include directory
#CMake configuration for free
D
iameter include directory
Project
(
"
F
reeDiameter include directory"
C
)
Project
(
"
f
reeDiameter include directory"
C
)
########################
# Configurable parameters
...
...
@@ -73,12 +73,12 @@ CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H)
# The default configuration file name
IF
(
NOT DEFAULT_CONF_FILE
)
SET
(
DEFAULT_CONF_FILE
"free
d
iameter.conf"
)
SET
(
DEFAULT_CONF_FILE
"free
D
iameter.conf"
)
ENDIF
(
NOT DEFAULT_CONF_FILE
)
##########################
# Generate the host.h file
CONFIGURE_FILE
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/free
d
iameter-host.h.in
${
CMAKE_CURRENT_BINARY_DIR
}
/free
d
iameter-host.h
)
CONFIGURE_FILE
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/free
D
iameter-host.h.in
${
CMAKE_CURRENT_BINARY_DIR
}
/free
D
iameter-host.h
)
# Save the FD_LIBS for parent scope
SET
(
FD_LIBS
${
FD_LIBS
}
PARENT_SCOPE
)
include/free
d
iameter/free
d
iameter-host.h.in
→
include/free
D
iameter/free
D
iameter-host.h.in
View file @
b9f7f002
File moved
include/free
d
iameter/free
d
iameter.h
→
include/free
D
iameter/free
D
iameter.h
View file @
b9f7f002
...
...
@@ -37,7 +37,7 @@
#define _FREEDIAMETER_H
#include <free
d
iameter/libfree
d
iameter.h>
#include <free
D
iameter/libfree
D
iameter.h>
/* The global dictionary */
...
...
include/free
d
iameter/libfree
d
iameter.h
→
include/free
D
iameter/libfree
D
iameter.h
View file @
b9f7f002
...
...
@@ -33,23 +33,20 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
*********************************************************************************************************/
/* This file contains the definitions of functions and types used by the libfree
d
iameter library.
/* This file contains the definitions of functions and types used by the libfree
D
iameter library.
*
* This library is meant to be used by both the free
d
iameter daemon and its extensions.
* This library is meant to be used by both the free
D
iameter daemon and its extensions.
*
* It provides the tools to manipulate Diameter messages and related data.
*
* This file should always be included as #include <freediameter/libfreediameter.h>
* Note that this library does not store any state. The daemon must pass the pointer to
* the dictionary and other global objects to all extensions that use the libfreediameter
* library.
* This file should always be included as #include <freeDiameter/libfreeDiameter.h>
*/
#ifndef _LIBFREEDIAMETER_H
#define _LIBFREEDIAMETER_H
#ifndef FD_IS_CONFIG
#error "You must include 'free
d
iameter-host.h' before this file."
#error "You must include 'free
D
iameter-host.h' before this file."
#endif
/* FD_IS_CONFIG */
#include <pthread.h>
...
...
libfree
d
iameter/CMakeLists.txt
→
libfree
D
iameter/CMakeLists.txt
View file @
b9f7f002
# Name of the subproject
Project
(
"libfree
d
iameter"
C
)
Project
(
"libfree
D
iameter"
C
)
SET
(
PROJECT_COPYRIGHT
"Copyright (c) 2008-2009, WIDE Project (www.wide.ad.jp) and NICT (www.nict.go.jp)"
)
# List of source files for the library
SET
(
LFD_SRC
libf
d
.h
libf
D
.h
init.c
log.c
lists.c
...
...
@@ -15,11 +15,11 @@ SET(LFD_SRC
)
# Build as a shared library
ADD_LIBRARY
(
libfree
d
iameter SHARED
${
LFD_SRC
}
)
ADD_LIBRARY
(
libfree
D
iameter SHARED
${
LFD_SRC
}
)
# Avoid the liblib name
SET_TARGET_PROPERTIES
(
libfree
d
iameter PROPERTIES OUTPUT_NAME
"free
d
iameter"
)
SET_TARGET_PROPERTIES
(
libfree
D
iameter PROPERTIES OUTPUT_NAME
"free
D
iameter"
)
# The library itself needs other libraries
TARGET_LINK_LIBRARIES
(
libfree
d
iameter
${
FD_LIBS
}
)
TARGET_LINK_LIBRARIES
(
libfree
D
iameter
${
FD_LIBS
}
)
libfree
d
iameter/dictionary.c
→
libfree
D
iameter/dictionary.c
View file @
b9f7f002
...
...
@@ -33,7 +33,7 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
*********************************************************************************************************/
#include "libf
d
.h"
#include "libf
D
.h"
/* Names of the base types */
const
char
*
type_base_name
[]
=
{
/* must keep in sync with dict_avp_basetype */
...
...
@@ -1289,7 +1289,7 @@ void fd_dict_dump(struct dictionary * dict)
/*******************************************************************************************************/
/*******************************************************************************************************/
/* These are the functions exported outside libfree
d
iameter. */
/* These are the functions exported outside libfree
D
iameter. */
/* Get the data associated to an object */
int
fd_dict_gettype
(
struct
dict_object
*
object
,
enum
dict_object_type
*
type
)
...
...
libfree
d
iameter/init.c
→
libfree
D
iameter/init.c
View file @
b9f7f002
...
...
@@ -33,7 +33,7 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
*********************************************************************************************************/
#include "libf
d
.h"
#include "libf
D
.h"
int
fd_lib_init
(
void
)
{
...
...
@@ -42,7 +42,7 @@ int fd_lib_init(void)
/* Create the thread key that contains thread name for debug messages */
ret
=
pthread_key_create
(
&
fd_log_thname
,
free
);
if
(
ret
!=
0
)
{
fprintf
(
stderr
,
"Error initializing the libfree
d
iameter library: %s
\n
"
,
strerror
(
ret
)
);
fprintf
(
stderr
,
"Error initializing the libfree
D
iameter library: %s
\n
"
,
strerror
(
ret
)
);
return
ret
;
}
...
...
libfree
d
iameter/libf
d
.h
→
libfree
D
iameter/libf
D
.h
View file @
b9f7f002
...
...
@@ -33,18 +33,17 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
*********************************************************************************************************/
/* This file contains the definitions for internal use in the libfree
d
iameter library */
/* This file contains the definitions for internal use in the libfree
D
iameter library */
#ifndef _LIBFD_H
#define _LIBFD_H
#include <free
d
iameter/free
d
iameter-host.h>
#include <free
d
iameter/libfree
d
iameter.h>
#include <free
D
iameter/free
D
iameter-host.h>
#include <free
D
iameter/libfree
D
iameter.h>
/* Internal to the library */
extern
const
char
*
type_base_name
[];
void
fd_msg_eteid_init
(
void
);
#endif
/* _LIBFD_H */
Prev
1
2
Next
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