Commit 86032f18 authored by Ignacio (Nacho) Solis's avatar Ignacio (Nacho) Solis

Libccnx-transport-rta 1.0 - Initial GitHub release

parents
VERSION
.cproject
.project
*.plist
libccnx*.tar.gz
LongBow
include
lib
.DS_Store
*.o
*.lo
build/
conf.mk
*.dSYM
*.gcda
*.gcno
*.gcov
*.a
*.la
*.swp
.libs
conf.mk
.deps
config.log
config.h
config.status
*.log
*.trs
.dirstamp
Makefile
stamp-h1
transport/common/test/test_keyvalue
transport/transport_rta/test/test_multi_connections
transport/transport_rta/test/rtatest
transport/transport_rta/test/test_bent_pipe
transport/transport_rta/test/test_multi_connections
transport/transport_rta/test/x
transport/transport_rta/test/y
transport/transport_rta/tlv/test/x
transport/transport_rta/tlv/test/y
transport/transport_rta/tlv/test/tlvtest
transport/transport_rta/test/test_fc_vegas
ccnx/api/control/test/test_cpi_Interface
ccnx/api/control/test/test_cpi_InterfaceSet
ccnx/api/control/test/test_cpi_InterfaceIPTunnelList
ccnx/api/control/test/test_cpi_CancelFlow
ccnx/api/control/test/test_cpi_Connection
ccnx/api/control/test/test_cpi_ConnectionList
ccnx/api/control/test/test_cpi_ManageForwarding
ccnx/api/control/test/test_cpi_ManageLinks
ccnx/api/control/test/test_cpi_RouteEntryList
ccnx/api/ccnx_Portal/test/ccnxPortalFactory_keystore
ccnx/api/ccnx_Portal/test/my_keystore
autom4te.cache/
*.xcuserdatad
ccnx/transport/transport_rta/components/test/test_component_Codec_Tlv
ccnx/transport/transport_rta/components/test/test_component_Codec_Tlv_Hmac
ccnx/transport/transport_rta/components/test/test_fc_vegas
ccnx/transport/transport_rta/config/test/test_config_ApiConnector
ccnx/transport/transport_rta/config/test/test_config_Codec_Null
ccnx/transport/transport_rta/config/test/test_config_Codec_Tlv
ccnx/transport/transport_rta/config/test/test_config_FlowControl_Vegas
ccnx/transport/transport_rta/config/test/test_config_Forwarder_Local
ccnx/transport/transport_rta/config/test/test_config_Forwarder_Metis
ccnx/transport/transport_rta/config/test/test_config_InMemoryVerifier
ccnx/transport/transport_rta/config/test/test_config_ProtocolStack
ccnx/transport/transport_rta/config/test/test_config_PublicKeySignerPkcs12Store
ccnx/transport/transport_rta/config/test/test_config_Signer
ccnx/transport/transport_rta/config/test/test_config_SymmetricKeySignerFileStore
ccnx/transport/transport_rta/config/test/test_config_TestingComponent
ccnx/transport/transport_rta/config/test/test_config_Verifier_Enumerated
ccnx/transport/transport_rta/config/test/test_config_Verifier_Null
ccnx/transport/transport_rta/connectors/test/test_connector_Api
ccnx/transport/transport_rta/connectors/test/test_connector_Forwarder_Local
ccnx/transport/transport_rta/connectors/test/test_connector_Forwarder_Metis
ccnx/transport/transport_rta/core/test/test_rta_Commands
ccnx/transport/transport_rta/core/test/test_rta_ConnectionTable
ccnx/transport/transport_rta/core/test/test_rta_Framework
ccnx/transport/transport_rta/core/test/test_rta_Framework_Commands
ccnx/transport/transport_rta/test/test_rta_Transport
*.doctags
libtool
*~
test_ccnx_InterestReturnFacadeV1
test_ccnx_InterestReturn
lcov_report
lcov.info
test_ccnx_InterestReturnImplementation
test_ccnx_InterestPayloadId
cmake_minimum_required(VERSION 3.3)
project(Libccnx-transport)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
if( UNIX )
link_libraries(m)
endif( UNIX )
include( CTest )
include( version )
include( detectCacheSize )
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
link_directories($ENV{CCNX_DEPENDENCIES}/lib)
include_directories($ENV{CCNX_DEPENDENCIES}/include)
set(OPENSSL_ROOT_DIR $ENV{CCNX_DEPENDENCIES})
find_package( LongBow REQUIRED )
include_directories(${LONGBOW_INCLUDE_DIRS})
find_package( LibEvent REQUIRED )
include_directories(${LIBEVENT_INCLUDE_DIRS})
find_package( Libparc REQUIRED )
include_directories(${LIBPARC_INCLUDE_DIRS})
find_package( CCNX_Common REQUIRED )
include_directories(${CCNX_COMMON_INCLUDE_DIRS})
find_package ( Threads REQUIRED )
find_package ( OpenSSL REQUIRED )
include_directories(${PROJECT_BINARY_DIR}/ccnx
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/ccnx/transport/transport_rta
)
find_package( Doxygen )
macro(AddTest testFile)
add_executable(${ARGV0} ${ARGV0}.c)
target_link_libraries(${ARGV0} ${LONGBOW_LIBRARIES})
target_link_libraries(${ARGV0} ${LIBEVENT_LIBRARIES})
target_link_libraries(${ARGV0} ${OPENSSL_LIBRARIES})
target_link_libraries(${ARGV0} ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(${ARGV0} ccnx_transport_rta)
target_link_libraries(${ARGV0} ccnx_api_control)
target_link_libraries(${ARGV0} ccnx_api_notify)
target_link_libraries(${ARGV0} ${CCNX_COMMON_LIBRARIES})
target_link_libraries(${ARGV0} ${LIBPARC_LIBRARIES})
add_test(${ARGV0} ${ARGV0})
endmacro(AddTest)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS} -undefined dynamic_lookup")
message( "-- Set \"-undefined dynamic_lookup\" for shared libraries")
endif()
add_subdirectory(ccnx)
Copyright (c) 2013, 2014, 2015, 2016, Xerox Corporation (Xerox)and Palo Alto
Research Center (PARC)
All rights reserved.
Redistribution and use 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.
* Patent rights are not granted under this agreement. Patent rights are
available under FRAND terms.
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 XEROX or PARC 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.
Libccnx-transport-rta
=======
CCNx Transport RTA Stack
==========
## Introduction ##
This is a CCNx Stack implementation
## Overview ##
For a full CCNx software distribution please look at the CCNx Distillery
https://github.com/PARC/CCNx_Distillery
## Dependencies ##
This library depends on LongBow.
- https://github.com/PARC/LongBow
- https://github.com/PARC/Libparc
## Getting Started ##
Build and install LongBow by executing
```
mkdir build
cd build
cmake ..
make
make install
make test
```
This will create the `include` and `lib` directories containing the necessary files to compile with LongBow.
### Contact ###
Please see http://www.ccnx.org/
### License ###
This software is distributed under the following license:
```
Copyright (c) 2013, 2014, 2015, 2016, Xerox Corporation (Xerox)and Palo Alto
Research Center (PARC)
All rights reserved.
Redistribution and use 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.
* Patent rights are not granted under this agreement. Patent rights are
available under FRAND terms.
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 XEROX or PARC 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.
```
configure_file(config.h.in config.h @ONLY)
add_subdirectory(api)
add_subdirectory(transport)
add_subdirectory(control)
add_subdirectory(notify)
# Define a few configuration variables that we want accessible in the software
set(CCNX_API_CONTROL_HEADERS
ccnxControlAPI_About.h
cpi_Acks.h
cpi_Address.h
cpi_AddressList.h
cpi_CancelFlow.h
cpi_Connection.h
cpi_ConnectionEthernet.h
cpi_ConnectionList.h
cpi_ControlMessage.h
cpi_ControlFacade.h
cpi_Forwarding.h
cpi_Interface.h
cpi_InterfaceSet.h
cpi_InterfaceGeneric.h
cpi_InterfaceEthernet.h
cpi_InterfaceType.h
cpi_InterfaceIPTunnel.h
cpi_InterfaceIPTunnelList.h
cpi_InterfaceLocal.h
cpi_Listener.h
cpi_NameRouteType.h
cpi_ManageLinks.h
cpi_RouteEntry.h
cpi_RouteEntryList.h
cpi_NameRouteProtocolType.h
controlPlaneInterface.h
)
set(CCNX_API_CONTROL_SOURCE_FILES
ccnxControlAPI_About.c
cpi_Acks.c
cpi_Address.c
cpi_AddressList.c
cpi_CancelFlow.c
cpi_Connection.c
cpi_ConnectionEthernet.c
cpi_ConnectionList.c
cpi_ControlMessage.c
cpi_ControlFacade.c
cpi_Forwarding.c
cpi_Interface.c
cpi_InterfaceSet.c
cpi_InterfaceGeneric.c
cpi_InterfaceEthernet.c
cpi_InterfaceIPTunnel.c
cpi_InterfaceIPTunnelList.c
cpi_InterfaceType.c
cpi_Listener.c
cpi_NameRouteType.c
cpi_ManageLinks.c
cpi_NameRouteProtocolType.c
cpi_RouteEntry.c
cpi_RouteEntryList.c
controlPlaneInterface.c
)
add_library(ccnx_api_control STATIC ${CCNX_API_CONTROL_SOURCE_FILES})
add_library(ccnx_api_control.shared SHARED ${CCNX_API_CONTROL_SOURCE_FILES})
set_target_properties(ccnx_api_control.shared PROPERTIES
C_STANDARD 99
SOVERSION 1
VERSION 1.0
OUTPUT_NAME ccnx_api_control )
set(libccnx_api_control_libraries
ccnx_api_control
ccnx_api_control.shared
)
foreach(lib ${libccnx_api_control_libraries})
install(TARGETS ${lib} LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
set_property(TARGET ${lib} PROPERTY C_STANDARD 99)
set_property(TARGET ${lib} PROPERTY INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
endforeach()
install(FILES ${CCNX_API_CONTROL_HEADERS} DESTINATION include/ccnx/api/control )
add_subdirectory(test)
This diff is collapsed.
// DO NOT EDIT THIS FILE. IT IS AUTOMATICALLY GENERATED.
// longbow-generate-about 1.0.20160118.99a4a1be 2016-01-19T04:29:09Z
#include "ccnxControlAPI_About.h"
const char *ccnxControlAPI_What = "@(#)" "CCNx Control API " RELEASE_VERSION " 2016-01-19T05:05:41.828453"
"@(#)" "\tCopyright (c) 2016, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC)\n\tAll rights reserved.";
const char *
ccnxControlAPIAbout_Name(void)
{
return "CCNx Control API";
}
const char *
ccnxControlAPIAbout_Version(void)
{
return RELEASE_VERSION ;
}
const char *
ccnxControlAPIAbout_About(void)
{
return "CCNx Control API " RELEASE_VERSION " 2016-01-19T05:05:41.828453" "\nCopyright (c) 2016, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC)\nAll rights reserved.\n";
}
const char *
ccnxControlAPIAbout_MiniNotice(void)
{
return "Copyright (c) 2016, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC)\nAll rights reserved.\n";
}
const char *
ccnxControlAPIAbout_ShortNotice(void)
{
return "Copyright (c) 2016, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC)\nAll rights reserved.\n \nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n \n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution. \n * Patent rights are not granted under this agreement. Patent rights are\n available under FRAND terms.\n \nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL XEROX or PARC BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n";
}
const char *
ccnxControlAPIAbout_LongNotice(void)
{
return "Copyright (c) 2016, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC)\nAll rights reserved.\n \nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n \n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution. \n * Patent rights are not granted under this agreement. Patent rights are\n available under FRAND terms.\n \nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL XEROX or PARC BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n";
}
// DO NOT EDIT THIS FILE. IT IS AUTOMATICALLY GENERATED.
// longbow-generate-about 1.0.20160118.99a4a1be 2016-01-19T04:29:09Z
#ifndef ccnxControlAPI_About_h
#define ccnxControlAPI_About_h
/**
* Embedded string containing information for the what(1) command.
*
*/
extern const char *ccnxControlAPI_What;
/**
* Return the name as a C string.
*
* @return The name as a C string.
*/
const char *ccnxControlAPIAbout_Name(void);
/**
* Return the version as a C string.
*
* @return The version as a C string.
*/
const char *ccnxControlAPIAbout_Version(void);
/**
* Return the About text as a C string.
*
* @return The About text as a C string.
*/
const char *ccnxControlAPIAbout_About(void);
/**
* Return the minimum copyright notice as a C string.
*
* @return The minimum copyright notice as a C string.
*/
const char *ccnxControlAPIAbout_MiniNotice(void);
/**
* Return the short copyright notice as a C string.
*
* @return The short copyright notice as a C string.
*/
const char *ccnxControlAPIAbout_ShortNotice(void);
/**
* Return the long copyright notice as a C string.
*
* @return The long copyright notice as a C string.
*/
const char *ccnxControlAPIAbout_LongNotice(void);
#endif // ccnxControlAPI_About_h
This diff is collapsed.
This diff is collapsed.
/*
* Copyright (c) 2013-2014, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC)
* All rights reserved.
*
* Redistribution and use 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.
* * Patent rights are not granted under this agreement. Patent rights are
* available under FRAND terms.
*
* 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 XEROX or PARC 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.
*/
/**
* @author Marc Mosko, Palo Alto Research Center (Xerox PARC)
* @copyright 2013-2014, Xerox Corporation (Xerox)and Palo Alto Research Center (PARC). All rights reserved.
*
* Example:
* @code
* <#example#>
* @endcode
*/
/*
* {
* "CPI_ACK" : {
* "SEQUENCE" : <sequence number>,
* "RETURN" : "ACK" or "NACK",
* "REQUEST" : <original request JSON>
* [, "MESSAGE" : <optional message> ]
* }
* ["AUTHENTICATOR" : <TBD proof based on request/response, e.g. a crypto signature>]
* }
*/
#include <config.h>
#include <stdio.h>
#include <strings.h>
#include <LongBow/runtime.h>
#include "controlPlaneInterface.h"
#include "cpi_private.h"
#include "cpi_Acks.h"
struct control_plane_ack {
ControlPlaneInformation cpi_ack;
CpiAckType ack_type;
ControlPlaneInformation cpi_original;
};
static const char *cpiReturn = "RETURN";
static const char *cpiReturnAck = "ACK";
static