Commit b9f7f002 authored by Sebastien Decugis's avatar Sebastien Decugis
Browse files

Fix names to proper case for freeDiameter

parent d4982a45
# This file is the source for generating the Makefile for the project, using cmake tool (cmake.org)
# Name of the project, and language
PROJECT("FreeDiameter" C)
PROJECT("freeDiameter" 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/freediameter)
SUBDIRS(include/freeDiameter)
# 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(libfreediameter)
SUBDIRS(freediameter)
SUBDIRS(libfreeDiameter)
SUBDIRS(freeDiameter)
# Do we build the extensions?
OPTION(IGNORE_ALL_EXTENSIONS "Ignore the extensions completly?")
......
......@@ -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/freediameter.conf
You can change the default configuration file pathname:
DEFAULT_CONF_FILE:STRING=/path/to/some/freeDiameter.conf
The FreeDiameter daemon implements the Diameter base protocol.
Loadable extensions add the logic of Diameter applications or advanced use of the daemon.
The freeDiameter 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.
FreeDiameter was previously known as the "waaad" project (WIDE AAA Daemon)
freeDiameter 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.
......
# The subproject name
Project("freediameterd" C)
Project("freeDiameterd" 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
fd.h
fD.h
dict_base_proto.c
)
# Building the executable
ADD_EXECUTABLE(freediameterd ${FD_COMMON_SRC} main.c)
ADD_EXECUTABLE(freeDiameterd ${FD_COMMON_SRC} main.c)
# The link command
LINK_DIRECTORIES(${CURRENT_BINARY_DIR}/../libfreediameter)
TARGET_LINK_LIBRARIES(freediameterd libfreediameter ${FD_LIBS})
LINK_DIRECTORIES(${CURRENT_BINARY_DIR}/../libfreeDiameter)
TARGET_LINK_LIBRARIES(freeDiameterd libfreeDiameter ${FD_LIBS})
# The unary tests directory
OPTION(SKIP_TESTS "Skip compilation of the tests?" OFF)
......
......@@ -36,7 +36,7 @@
/* Diameter Base protocol definitions.
*/
#include "fd.h"
#include "fD.h"
#include <netinet/in.h>
#include <sys/socket.h>
......
......@@ -33,13 +33,13 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
*********************************************************************************************************/
/* This file contains the definitions for internal use in the freediameter daemon */
/* This file contains the definitions for internal use in the freeDiameter daemon */
#ifndef _FD_H
#define _FD_H
#include <freediameter/freediameter-host.h>
#include <freediameter/freediameter.h>
#include <freeDiameter/freeDiameter-host.h>
#include <freeDiameter/freeDiameter.h>
/* Create all the dictionary objects defined in the Diameter base RFC. */
int fd_dict_base_protocol(struct dictionary * dict);
......
......@@ -33,7 +33,7 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
*********************************************************************************************************/
#include "fd.h"
#include "fD.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, "FreeDiameter daemon initialized.");
TRACE_DEBUG(INFO, "freeDiameter daemon initialized.");
return 0;
}
# Test directory
PROJECT("libfreediameter tests" C)
PROJECT("libfreeDiameter 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(fdcore STATIC ${TEST_COMMON_SRC})
# Create an archive with the daemon common files (all but main)
ADD_LIBRARY(fDcore STATIC ${TEST_COMMON_SRC})
#############################
# Compile each test
FOREACH( TEST ${TEST_LIST} )
ADD_EXECUTABLE(${TEST} ${TEST}.c tests.h)
TARGET_LINK_LIBRARIES(${TEST} libfreediameter fdcore ${FD_LIBS})
TARGET_LINK_LIBRARIES(${TEST} libfreeDiameter fDcore ${FD_LIBS})
ADD_TEST(${TEST} ${EXECUTABLE_OUTPUT_PATH}/${TEST})
ENDFOREACH( TEST )
......@@ -35,7 +35,7 @@
#include "tests.h"
/* Structure for testing threashold 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 */
......
......@@ -41,7 +41,7 @@
#ifndef _TESTS_H
#define _TESTS_H
#include "fd.h"
#include "fD.h"
#include <pthread.h>
#include <errno.h>
......
#CMake configuration for freediameter include directory
#CMake configuration for freeDiameter include directory
Project("FreeDiameter include directory" C)
Project("freeDiameter 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 "freediameter.conf")
SET(DEFAULT_CONF_FILE "freeDiameter.conf")
ENDIF (NOT DEFAULT_CONF_FILE)
##########################
# Generate the host.h file
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/freediameter-host.h.in ${CMAKE_CURRENT_BINARY_DIR}/freediameter-host.h)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/freeDiameter-host.h.in ${CMAKE_CURRENT_BINARY_DIR}/freeDiameter-host.h)
# Save the FD_LIBS for parent scope
SET(FD_LIBS ${FD_LIBS} PARENT_SCOPE)
......@@ -37,7 +37,7 @@
#define _FREEDIAMETER_H
#include <freediameter/libfreediameter.h>
#include <freeDiameter/libfreeDiameter.h>
/* The global dictionary */
......
......@@ -33,23 +33,20 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
*********************************************************************************************************/
/* This file contains the definitions of functions and types used by the libfreediameter library.
/* This file contains the definitions of functions and types used by the libfreeDiameter library.
*
* This library is meant to be used by both the freediameter daemon and its extensions.
* This library is meant to be used by both the freeDiameter 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 'freediameter-host.h' before this file."
#error "You must include 'freeDiameter-host.h' before this file."
#endif /* FD_IS_CONFIG */
#include <pthread.h>
......
# Name of the subproject
Project("libfreediameter" C)
Project("libfreeDiameter" 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
libfd.h
libfD.h
init.c
log.c
lists.c
......@@ -15,11 +15,11 @@ SET(LFD_SRC
)
# Build as a shared library
ADD_LIBRARY(libfreediameter SHARED ${LFD_SRC})
ADD_LIBRARY(libfreeDiameter SHARED ${LFD_SRC})
# Avoid the liblib name
SET_TARGET_PROPERTIES(libfreediameter PROPERTIES OUTPUT_NAME "freediameter")
SET_TARGET_PROPERTIES(libfreeDiameter PROPERTIES OUTPUT_NAME "freeDiameter")
# The library itself needs other libraries
TARGET_LINK_LIBRARIES(libfreediameter ${FD_LIBS})
TARGET_LINK_LIBRARIES(libfreeDiameter ${FD_LIBS})
......@@ -33,7 +33,7 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
*********************************************************************************************************/
#include "libfd.h"
#include "libfD.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 libfreediameter. */
/* These are the functions exported outside libfreeDiameter. */
/* Get the data associated to an object */
int fd_dict_gettype ( struct dict_object * object, enum dict_object_type * type)
......
......@@ -33,7 +33,7 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
*********************************************************************************************************/
#include "libfd.h"
#include "libfD.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 libfreediameter library: %s\n", strerror(ret) );
fprintf(stderr, "Error initializing the libfreeDiameter library: %s\n", strerror(ret) );
return ret;
}
......
......@@ -33,18 +33,17 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
*********************************************************************************************************/
/* This file contains the definitions for internal use in the libfreediameter library */
/* This file contains the definitions for internal use in the libfreeDiameter library */
#ifndef _LIBFD_H
#define _LIBFD_H
#include <freediameter/freediameter-host.h>
#include <freediameter/libfreediameter.h>
#include <freeDiameter/freeDiameter-host.h>
#include <freeDiameter/libfreeDiameter.h>
/* Internal to the library */
extern const char * type_base_name[];
void fd_msg_eteid_init(void);
#endif /* _LIBFD_H */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment