update it

This commit is contained in:
Sukchan Lee 2017-03-22 16:59:34 +09:00
parent 6ecdb4cb08
commit 636444980e
5 changed files with 5 additions and 51 deletions

View File

@ -6,8 +6,7 @@ SUBDIRS = lib src test
bin_PROGRAMS = cellwired
dist_cellwired_SOURCES = main.c symtbl.h
nodist_cellwired_SOURCES = symtbl.c
dist_cellwired_SOURCES = main.c
cellwired_LDADD = \
$(top_srcdir)/src/libcellwire.la
@ -28,16 +27,3 @@ MAINTAINERCLEANFILES = \
.cscope.out .cscope.out.in .cscope.files .cscope.out.po \
Makefile.in
MOSTLYCLEANFILES = core *.stackdump
EXTRA_DIST = symtbl.sh
NM_TMP_FILE = nm.tmp
.INTERMEDIATE: symtbl.c
symtbl.c: $(bsd_DEPENDENCIES)
@for las in $<; do \
lib=`echo $$las | sed -e "s|\(.*\)/lib\([^/].*\)\.la|\1/.libs/lib\2.a|g"`; \
echo $$lib; \
nm $$lib >> $(NM_TMP_FILE); \
done; \
$(top_srcdir)/symtbl.sh $(NM_TMP_FILE) $@; \
rm -f $(NM_TMP_FILE)

2
README
View File

@ -12,6 +12,8 @@ The implemntation consists in several components:
- lib/s6a : the freeDiameter wrapper for S6A
- lib/gtp : the GTPv2-C/GTP-U message encoding/decoding library
- src/mme : the heart of MME protocol stack
- src/hss : the heart of HSS protocol stack

5
main.c
View File

@ -12,12 +12,11 @@
/* Server */
#include "cellwire.h"
extern char g_compile_time[];
static char *compile_time = __DATE__ " " __TIME__;
static void show_version()
{
printf("CellWire daemon v%s - %s\n",
PACKAGE_VERSION, g_compile_time);
printf("CellWire daemon v%s - %s\n", PACKAGE_VERSION, compile_time);
}
static void show_help()

View File

@ -1,14 +0,0 @@
#include "core.h"
#define ST_BSS 1
#define ST_COMMON 2
#define ST_DATA 3
#define ST_TEXT 4
typedef struct {
int sym_type;
void *sym_addr;
char *sym_name;
} symbol_tbl_t;
extern symbol_tbl_t st[];

View File

@ -1,19 +0,0 @@
#!/bin/sh
SYMTBL_TMP="symtbl.tmp"
grep -e " B " -e " C " -e " D " -e " T " $1 | grep -v "\." > $SYMTBL_TMP
echo '/* Symbol table generated automatically by symtbl.sh */' > $2
echo '#include "symtbl.h"' >> $2
awk '/ [BCD] / { print "extern int "$3";"}' $SYMTBL_TMP >> $2
awk '/ T / { print "extern int "$3"();"}' $SYMTBL_TMP >> $2
echo "symbol_tbl_t st[] = {" >> $2
awk '/ B / { print "{ST_BSS,(void*)&"$3",\""$3"\"}," }' $SYMTBL_TMP >> $2
awk '/ C / { print "{ST_COMMON,(void*)&"$3",\""$3"\"}," }' $SYMTBL_TMP >> $2
awk '/ D / { print "{ST_DATA,(void*)&"$3",\""$3"\"}," }' $SYMTBL_TMP >> $2
awk '/ T / { print "{ST_TEXT,(void*)&"$3",\""$3"\"}," }' $SYMTBL_TMP >> $2
echo "{0,NULL,NULL}};" >> $2
echo "char g_compile_time[] = __DATE__ \" \" __TIME__;" >> $2
rm -f $SYMTBL_TMP