NSIS-ka
A free C++ implementation of NSIS protocols

Changeset 4572


Ignore:
Timestamp:
Oct 18, 2009, 4:13:16 PM (8 years ago)
Author:
stud-lenk
Message:

Sync with trunk

Files:
15 edited
1 copied

Legend:

Unmodified
Added
Removed
  • ntlp/branches/20090723-multicast

  • ntlp/branches/20090723-multicast/gist

    r4245 r4572  
    2020trap handle_sigint SIGINT
    2121
    22 src/gistka --config ${CONFDIR}/nsis-ka.conf $* 2>&1 | tee $LOGDIR/test-`date +"%F-%T"`-`hostname`-$$
     22LOGFILE="$LOGDIR/test-`date +%F-%T`-`hostname`-$$"
     23src/gistka --config ${CONFDIR}/nsis-ka.conf $* 2>&1 | tee $LOGFILE
     24
     25# change ownership of logfiles if this script is called via sudo
     26if [ "$SUDO_UID" != "" ]; then
     27        chown $SUDO_UID:$SUDO_GID $LOGFILE
     28fi
    2329
    2430./flush
  • ntlp/branches/20090723-multicast/testing/testbed-uka-setup

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • protlib/branches/20090723-multicast

  • protlib/branches/20090723-multicast/src/tp_queryencap.cpp

    r4568 r4572  
    10241024              // reset to beginning (including magic number)
    10251025              netmsg->to_start();
     1026              // truncate buffer to total length - UDP header
     1027              netmsg->truncate(ntohs(udp->len) - udp_header_size);
    10261028
    10271029              // create TPMsg and send it to the signaling thread
  • protlib/branches/20090723-multicast/test/old-tests

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • qos-nslp/branches/20090723-multicast

  • qos-nslp/branches/20090723-multicast/Makefile

    r4213 r4572  
    66# ==========================================================
    77#                     
     8# Makefile arguments:
     9# (for protlib)
     10# SCTP_KERN=1    - compile with SCTP support
     11# backwards compatibility
     12# USE_RFC2292=1  - use if glibc does not support RFC3542 yet (e.g., inet6_opt_init())
     13#                     
     14# Copyright (C) 2005-2007, all rights reserved by
     15# - Institute of Telematics, Universitaet Karlsruhe (TH)
     16#
     17# More information and contact:
     18# https://nsis-ka.org
     19#                     
     20# This program is free software; you can redistribute it and/or modify
     21# it under the terms of the GNU General Public License as published by
     22# the Free Software Foundation; version 2 of the License
     23#
     24# This program is distributed in the hope that it will be useful,
     25# but WITHOUT ANY WARRANTY; without even the implied warranty of
     26# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     27# GNU General Public License for more details.
     28#
     29# You should have received a copy of the GNU General Public License along
     30# with this program; if not, write to the Free Software Foundation, Inc.,
     31# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
     32#
    833# (C)opyright, all rights reserved by
    934# - Institute of Telematics, University of Karlsruhe (TH)
    1035# ==========================================================
     36
     37QOS_NSLP_SRC=src
     38QOS_NSLP_INC=include
    1139
    1240DISTDIR?=$(CURDIR)/..
     
    1442
    1543include $(TOPLEVELMAKEINC)
    16 
    17 QOS_NSLP_SRC=src
    18 QOS_NSLP_INC=include
    1944
    2045GISTLIB_DIR=$(NTLP_DIR)
     
    2449MKSUBDIRS       = $(GISTLIB_DIR) $(PROTLIB_SRC) $(FQUEUE_SRC) $(QSPECLIB_DIR) $(QOS_NSLP_SRC)
    2550
     51.PHONY: clean distclean cleandocs docs all qosnslp localclean \
     52        setperms TAGS tags svnprops showfiles
    2653
    27 .PHONY: clean distclean cleandocs docs all qosnslp localclean setperms TAGS tags
     54TAGSFILES       = $(wildcard $(PROTLIB_INC)/*.h) \
     55                  $(wildcard $(PROTLIB_SRC)/*.cpp) \
     56                  $(wildcard $(FQUEUE_INC)/*.h) \
     57                  $(wildcard $(FQUEUE_SRC)/*.c) \
     58                  $(wildcard $(GIST_INC)/*.h) \
     59                  $(wildcard $(GIST_SRC)/*.h) \
     60                  $(wildcard $(GIST_SRC)/pdu/*.h) \
     61                  $(wildcard $(GIST_SRC)/*.cpp) \
     62                  $(wildcard $(GIST_SRC)/pdu/*.cpp) \
     63                  $(wildcard $(QOS_NSLP_INC)/*.h) \
     64                  $(wildcard $(QOS_NSLP_SRC)/*.cpp) \
     65                  $(wildcard $(QSPEC_INC)/*.h) \
     66                  $(wildcard $(QSPEC_SRC)/*.cpp)
    2867
    2968all: qosnslp
     
    4180        for dir in $(MKSUBDIRS); do $(MAKE) -C $$dir  tests ; done
    4281
     82svnprops:
     83        - for file in $(TAGSFILES); do svn propset svn:keywords "Id HeadURL Rev" $$file ; done
     84
     85showfiles:
     86        - @echo $(TAGSFILES)
     87
    4388docs:
    4489        rm -f doxygen.log
     
    4691
    4792cleandocs:
    48         rm -rf doc/
     93        - rm -rf doc/
    4994
    5095localclean:
    51         rm -f *~ *.log
     96        - rm -f *~ *.log TAGS BROWSE depend README
    5297
    5398clean: localclean
     
    59104tags: TAGS ebrowse
    60105
    61 TAGS:
    62         - etags  --language-force=c++ {$(QOS_NSLP_INC),$(PROTLIB_INC),$(FQUEUE_INC)}/*.h {$(QOS_NSLP_SRC),$(PROTLIB_SRC)}/*.cpp $(FQUEUE_SRC)/*.c
     106TAGS:   
     107        -@echo -n "Creating TAGS file..."
     108        -@etags  --language-force=C++ $(TAGSFILES)
     109        -@echo "done."
    63110
    64111ebrowse:
    65         - ebrowse {$(QOS_NSLP_INC),$(PROTLIB_INC),$(FQUEUE_INC)}/*.h {$(QOS_NSLP_SRC),$(PROTLIB_SRC)}/*.cpp $(FQUEUE_SRC)/*.c
     112        -@echo -n "Creating BROWSE file..."
     113        - @ebrowse $(TAGSFILES)
     114        -@echo "done."
    66115
    67116depend:
  • qos-nslp/branches/20090723-multicast/src/Makefile

    r4213 r4572  
    99# - Institute of Telematics, University of Karlsruhe (TH)
    1010# ==========================================================
     11#
     12# The following Makefile variables may be used:
     13#     LOGGING        Enable logging output (default: active)
     14#     DEBUGGING      Enable debugging (default: active)
     15#     OPTIMIZATION   Optimize using the given flags (default: '')
     16#
     17# Don't forget to run "make clean" before changing these variables!
     18# An example for building without debugging but with logging support and
     19# optimization:
     20#
     21#     make DEBUGGING= LOGGING=1 OPTIMIZATION=-O2
     22#
    1123
    1224DISTDIR?=$(CURDIR)/../..
    1325include $(DISTDIR)/Makefile.inc
    1426
    15 # Use make all tests docs to get EVERYTHING
     27DEBUGGING       = 1                     # the undefined value disables debugging
     28LOGGING         = 1                     # the undefined value disables logging
     29OPTIMIZATION    =                       # ie. -O2
    1630
    17 SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
    18 ARCH := $(SUBARCH)
     31ifdef DEBUGGING
     32QOS_CXXFLAGS    += -g -D_DEBUG
     33endif
    1934
    20 export UNAME_MACHINE := "$(ARCH)"
     35ifndef LOGGING
     36QOS_CXXFLAGS    += -D_NO_LOGGING
     37endif
    2138
    22 QOSOPTIONS      = -D_DEBUG -DQOS_NSLP_13 #-D_NO_LOGGING
     39QOS_CXXFLAGS    += $(OPTIMIZATION)
    2340
    24 CFLAGS          = -pedantic -O0 -g -Wno-long-long  -Wno-deprecated -Werror -Wall $(QOSOPTIONS) # development (valgrind)
     41
     42
     43#SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
     44#ARCH := $(SUBARCH)
     45
     46#export UNAME_MACHINE := "$(ARCH)"
     47
     48include ../QOSNSLP-KA-RELEASE
     49
     50CFLAGS          = --pedantic -Wno-long-long -Wall $(QOS_CXXFLAGS) -D QOSNSLP_VSTR=\"$(QOSNSLP_RELEASE)\"
     51#CFLAGS        += -Wno-deprecated -Werror
     52CFLAGS         += -DQOS_NSLP_13
    2553
    2654ifdef USE_FLOWINFO
    27 CFLAGS += $(FLOWINFO_CFLAGS)
     55CFLAGS        += $(FLOWINFO_CFLAGS)
    2856endif
    2957
     
    4674                QoS_NSLP_UDS_API.o TestConsole.o session_id_list.o rsn_list.o qos_nslp_conf.o qosnslp_starter.o
    4775
    48 ifdef QT_DIR
    49 GUI_OPTIONS     = -D_GUI
    50 GUI_QTINC       = $(QT_DIR)/include
    51 GUI_INC         = gui/include
    52 GUI_SRCDIR      = gui/src
    53 GUI_INCLUDE     = -I$(GUI_INC) -I$(GUI_QTINC)
    54 GUI_QTLIBDIR      = $(QT_DIR)/lib
    55 GUI_LIBSEARCH   = -L$(GUI_QTLIBDIR)
    56 CFLAGS          += $(GUI_OPTIONS)
    57 QOSNSLP_OBJS        += $(GUI_SRCDIR)/gui.o
    58 QTLIB           = -lqt
    59 endif
    60 
    6176LIBS            = $(PROTLIB_LIB) $(NTLP_LIB) $(QSPEC_LIB) $(FQUEUE_LIB)
    6277
    63 SHLIBS          = -lrt $(QTLIB)
     78SHLIBS          = -lrt
    6479STATIC_LIBS     = -lipq -lssl $(SCTP_LIBLD)
    6580
    6681INC             = ../include
    67 INCLUDE         = -I$(INC) -I$(NTLP_INC) -I$(QSPEC_INC) -I$(PROTLIB_INC) -I$(FQUEUE_INC) $(SCTP_INCLUDE) $(GUI_INCLUDE)
     82INCLUDE         = -I$(INC) -I$(NTLP_INC) -I$(QSPEC_INC) -I$(PROTLIB_INC) -I$(FQUEUE_INC) $(SCTP_INCLUDE)
    6883LIBDIRS         = -L$(FQUEUE_SRC) -L$(PROTLIB_SRC) -L$(NTLP_SRC) -L$(QSPEC_SRC)
    6984
     
    181196                $(CPP) $(CFLAGS) $(CLINK) $@ $(INCLUDE) $<
    182197
    183 #rule for Qt moc files (to process signals/slots/Q_OBJECT)
    184 moc_%.cpp: %.h
    185            moc $< -o $@
    186 
    187 
    188198### DO NOT DELETE THIS LINE -- make depend depends on it.
    189199-include depend
  • qos-nslp/branches/20090723-multicast/src/QoS_StateModule.cpp

    r4213 r4572  
    20262026    uint32 new_refr_p, new_lifetime;
    20272027    uint32 local_rsn_upstream, rcvd_rsn_upstream;
    2028     rsn* send_rsn = reservemsg->get_rsn();
     2028    rsn* received_rsn = reservemsg->get_rsn();
    20292029    ILog(state_manager::modname, "process_rsn_and_qspec()");
    20302030   
     
    20452045        context->unlock();
    20462046    }
    2047     send_rsn->get(rcvd_rsn_upstream);
     2047    received_rsn->get(rcvd_rsn_upstream);
    20482048    Log(INFO_LOG,LOG_NORMAL,"QOS_STATEMODULE","RSNs: " << local_rsn_upstream << " <= " << rcvd_rsn_upstream);
    20492049   
    20502050    //======================================== process REFRESH_PERIOD ================================================
    2051     char ac[80];
    2052     if (gethostname(ac, sizeof(ac)) == -1) {
    2053         cerr << "Error when getting local host name." << endl;
    2054     }
    20552051    rp* r_p = reservemsg->get_rp();
    20562052    if (r_p) {
     
    21412137            // no QSPEC. Send RESPONSE with RSN because this message must not be forwarded futher as one hop.
    21422138            Log(ERROR_LOG,LOG_NORMAL,state_manager::modname, "no qspec found!");
    2143             send_response_with_rsn(send_rsn, false, local_sid, rcvd_mri, info_spec::transient, info_spec::FullQSPECrequired);
     2139            send_response_with_rsn(received_rsn, false, local_sid, rcvd_mri, info_spec::transient, info_spec::FullQSPECrequired);
    21442140        }
    21452141    }  // end if received rsn > saved rsn
     
    22952291
    22962292        //===================================== process RSN, QSPEC and REFRESH_PERIOD ==================================
    2297         rsn* send_rsn = reservemsg->get_rsn();
    2298         if (send_rsn) {
     2293        rsn* received_rsn = reservemsg->get_rsn();
     2294        if (received_rsn) {
    22992295            function_res = process_rsn_and_qspec(context, reservemsg, rmf_admin, i_am_originator, type == NSLP_Context::QNR,
    23002296                                                 forward, rcvd_sid, rcvd_mri, down);
     
    23162312                }
    23172313                else {
    2318                   send_response_with_rsn(send_rsn, false, rcvd_sid, rcvd_mri,
     2314                  send_response_with_rsn(received_rsn, false, rcvd_sid, rcvd_mri,
    23192315                                         info_spec::transient,
    23202316#ifdef QOS_NSLP_13
     
    23892385            if (type != NSLP_Context::QNI) {
    23902386                if (reservemsg->is_acknowledge_flag()) {
    2391                  send_response_with_rsn(send_rsn, false, rcvd_sid, rcvd_mri, info_spec::success,
     2387                 send_response_with_rsn(received_rsn, false, rcvd_sid, rcvd_mri, info_spec::success,
    23922388#ifdef QOS_NSLP_13
    23932389                     info_spec::Acknowledgement
  • qos-nslp/branches/20090723-multicast/src/qosnslpd.cpp

    r4245 r4572  
    2727#include <unistd.h> // for getopt()
    2828#include <signal.h>
    29 
    3029#include <sstream>
    3130
     31#include <openssl/ssl.h>
     32
     33#include "logfile.h"
     34#include "tp_over_uds.h"
     35#include "gist_conf.h"
    3236#include "ntlp_starter.h"
     37#include "configfile.h"
     38#include "qos_nslp_conf.h"
    3339#include "TestConsole.h"
    3440#include "SignalingAppl.h"
    3541#include "QoS_NSLP_UDS_API.h"
    36 #include "tp_over_uds.h"
    3742#include "qos_nslp.h"
    3843#include "queuemanager.h"
    3944#include "qosnslp_starter.h"
    4045
    41 #include "gist_conf.h"
    42 #include "qos_nslp_conf.h"
    43 #include "configfile.h"
    44 
    45 #include <openssl/ssl.h>
    46 
    4746
    4847using namespace qos_nslp;
    4948using namespace ntlp;
     49using namespace protlib;
     50using namespace protlib::log;
    5051
    5152namespace ntlp {
    52 // configuration class
    53 gistconf gconf;
     53        // configuration class
     54        gistconf gconf;
    5455}
    5556
    5657namespace qos_nslp {
    57 // configuration class
    58 qos_nslp_conf qosnslpconf;
    59 }
    60 
    61 logfile commonlog("", true, true);
     58        // configuration class
     59        qos_nslp_conf qosnslpconf;
     60}
     61
     62logfile commonlog;
    6263qos_nslp::log::logfile& qos_nslp::log::DefaultLog(commonlog);
    6364
  • qos-nslp/branches/20090723-multicast/src/start-qosnslp

    r4245 r4572  
    2626trap handle_sigint SIGINT
    2727
    28 ./qosnslp -c ${CONFDIR}/nsis-ka.conf $* 2>&1 | tee -i $LOGDIR/test-`date +"%F-%T"`-`hostname`-$$
     28LOGFILE="$LOGDIR/test-`date +%F-%T`-`hostname`-$$"
     29./qosnslp -c ${CONFDIR}/nsis-ka.conf $* 2>&1 | tee -i $LOGFILE
     30
     31# change ownership of logfiles if this script is called via sudo
     32if [ "$SUDO_UID" != "" ]; then
     33        chown $SUDO_UID:$SUDO_GID $LOGFILE
     34fi
    2935
    3036./flush
  • qspec/branches/20090723-multicast

  • qspec/branches/20090723-multicast/Makefile

    r3236 r4572  
    2020CLEAN_SUBDIRS =  $(PROTLIB_SRC) src test eval examples doc
    2121
    22 .PHONY: all clean $(CLEAN_SUBDIRS) TAGS
     22.PHONY: all clean distclean $(CLEAN_SUBDIRS) TAGS
    2323
     24TAGSFILES       = $(wildcard $(PROTLIB_INC)/*.h) \
     25                  $(wildcard $(PROTLIB_SRC)/*.cpp) \
     26                  $(wildcard $(FQUEUE_INC)/*.h) \
     27                  $(wildcard $(FQUEUE_SRC)/*.c) \
     28                  $(wildcard $(GIST_INC)/*.h) \
     29                  $(wildcard $(GIST_SRC)/*.h) \
     30                  $(wildcard $(GIST_SRC)/pdu/*.h) \
     31                  $(wildcard $(GIST_SRC)/*.cpp) \
     32                  $(wildcard $(GIST_SRC)/pdu/*.cpp) \
     33                  $(wildcard $(QOS_NSLP_INC)/*.h) \
     34                  $(wildcard $(QOS_NSLP_SRC)/*.cpp) \
     35                  $(wildcard $(QSPEC_INC)/*.h) \
     36                  $(wildcard $(QSPEC_SRC)/*.cpp)
    2437
    2538all: $(PROTLIB_SRC) src eval examples
     
    4659        for dir in $(CLEAN_SUBDIRS); do $(MAKE) -C "$$dir"  clean; done
    4760
     61distclean:
     62        for dir in $(CLEAN_SUBDIRS); do $(MAKE) -C "$$dir"  distclean; done
     63
    4864$(TOPLEVELMAKEINC):
    4965        $(error "Sorry, but this component is not meant to be compiled alone, please use the dist tree of the SVN https://svn.ipv6.tm.uka.de/nsis/dist/")
    5066
    51 TAGS:
    52         etags --language-force=c++ include/*.h src/*.cpp test/*.cpp eval/*.cpp examples/*.cpp $(PROTLIB_INC)/*.h $(PROTLIB_SRC)/*.cpp
     67tags: TAGS ebrowse
     68
     69TAGS:   
     70        -@echo -n "Creating TAGS file..."
     71        -@etags  --language-force=C++ $(TAGSFILES)
     72        -@echo "done."
     73
     74ebrowse:
     75        -@echo -n "Creating BROWSE file..."
     76        - @ebrowse $(TAGSFILES)
     77        -@echo "done."
  • qspec/branches/20090723-multicast/src/Makefile

    r3236 r4572  
    1 #
     1# -----------------------------------*- mode: Makefile; -*--
    22# Makefile - Makefile for QSPEC Template
    3 #
     3# ----------------------------------------------------------
    44# $Id$
    55# $HeadURL$
     6#
     7# ==========================================================
     8#                     
     9# (C)opyright, all rights reserved by
     10# - Institute of Telematics, University of Karlsruhe (TH)
     11# ==========================================================
     12#
     13# The following Makefile variables may be used:
     14#     LOGGING        Enable logging output (default: active)
     15#     DEBUGGING      Enable debugging (default: active)
     16#     OPTIMIZATION   Optimize using the given flags (default: '')
     17#
     18# Don't forget to run "make clean" before changing these variables!
     19# An example for building without debugging but with logging support and
     20# optimization:
     21#
     22#     make DEBUGGING= LOGGING=1 OPTIMIZATION=-O2
    623#
    724# make          run the build process
    825# make clean    delete all generated output
    926#
    10 _QSPEC_LIB = libqspec.a
    1127
    1228DISTDIR?=$(CURDIR)/../..
    1329include $(DISTDIR)/Makefile.inc
    1430
    15 CXX = g++
    16 CXXFLAGS = -ggdb -Wall -pedantic -Wno-long-long -I../include -I$(PROTLIB_INC)
    17 LDFLAGS = $(PROTLIB_LIB)
     31DEBUGGING       = 1                     # the undefined value disables debugging
     32LOGGING         = 1                     # the undefined value disables logging
     33OPTIMIZATION    =                       # ie. -O2
     34
     35ifdef DEBUGGING
     36QSPEC_CXXFLAGS  += -g -D_DEBUG
     37endif
     38
     39ifndef LOGGING
     40QSPEC_CXXFLAGS  += -D_NO_LOGGING
     41endif
     42
     43QSPEC_CXXFLAGS  += $(OPTIMIZATION)
     44
     45CFLAGS          = --pedantic -Wno-long-long -Wall $(QSPEC_CXXFLAGS)
     46#CFLAGS        += -Wno-deprecated -Werror
     47
     48CLINK           = -c -o
     49CC              = gcc
     50CPP             = g++
     51RM              = rm -f
     52
     53TARGETS         = $(QSPECLIB)
     54
     55QSPEC_LLIB      = qspec
     56QSPECLIB        = lib$(QSPEC_LLIB).a
     57QSPECLIB_SHARED = lib$(QSPEC_LLIB).so
     58
     59QSPEC_SRC       = $(wildcard *.cpp)
     60QSPEC_OBJS      = $(patsubst %.cpp, %.o, $(QSPEC_SRC))
     61
     62LIBS            = $(PROTLIB_LIB) $(NTLP_LIB) $(FQUEUE_LIB)
     63
     64INC             = ../include
     65INCLUDE         = -I$(INC) -I$(QSPEC_INC) -I$(PROTLIB_INC) -I$(FQUEUE_INC)
     66LIBDIRS         = -L$(FQUEUE_SRC) -L$(PROTLIB_SRC) -L$(QSPEC_SRC)
     67
     68.PHONY: clean all depend TAGS distclean
    1869
    1970
    20 #
    21 # nothing to change down here
    22 #
     71all:    $(TARGETS)
    2372
    24 SRC = $(wildcard *.cpp)
    25 OBJ = $(patsubst %.cpp, %.o, $(SRC))
    26 DEPS = $(patsubst %.cpp, %.d, $(SRC))
    27 
    28 .PHONY: clean all
    29 
    30 
    31 all: $(_QSPEC_LIB)
    32 
    33 
    34 $(_QSPEC_LIB): $(OBJ)
     73$(QSPECLIB): $(QSPEC_OBJS)
    3574        ar -rsv $@ $?
    3675
    3776clean:
    38         -rm -f $(_QSPEC_LIB) $(OBJ) $(DEPS)
     77        $(RM) $(QSPECLIB) $(QSPEC_OBJS)
     78
     79distclean:      clean
     80                $(RM) $(TARGETS)
    3981
    4082# generate dependencies
    41 %.d: %.cpp
    42         $(CXX) -M $(CXXFLAGS) $< | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' > $@
     83depend:
     84        $(RM) depend
     85        $(CPP) -MM $(QSPEC_SRC) $(INCLUDE) > depend
    4386
    44 # include Makefile dependency snippets for each source file
    45 -include $(SRC:.cpp=.d)
     87TAGS:
     88        etags --language=c++ $(INCLUDE)/*.h *.cpp $(PROTLIB_INC)/*.h $(PROTLIB_SRC)/*.cpp
     89
     90#compile rules
     91%.o:            %.cpp
     92                $(RM) $@
     93                $(CPP) $(CFLAGS) $(CLINK) $@ $(INCLUDE) $<
     94
     95### DO NOT DELETE THIS LINE -- make depend depends on it.
     96-include depend
Note: See TracChangeset for help on using the changeset viewer.