Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nox with of1.3 support #31

Open
wants to merge 2 commits into
base: verity
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
NOX with OF1.3 supported.
Use libopenflow which is migrated form ovs2.0(https://github.com/frankiezhu/libofproto).

---------------------------------------------------------------------------
NOX Network Control Platform
-----------------------------------
Copyright (C) 2008-2009 Nicira Networks
Expand Down
2 changes: 2 additions & 0 deletions boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,5 @@ echo "AC_OUTPUT " >> configure.ac
# Bootstrap configure system from .ac/.am files
autoreconf --install -I `pwd`/m4 --force

./configure --enable-ndebug && make -C ./src/coreapps/openflow/libofp

5 changes: 3 additions & 2 deletions configure.ac.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.68])
AC_PREREQ([2.64])
AC_INIT([nox],[0.9.2~APPS_ID~beta],[[email protected]])

AC_USE_SYSTEM_EXTENSIONS
Expand All @@ -20,6 +20,7 @@ AH_BOTTOM([/* NOX 0.9.1~APPS_ID~beta. */
AM_INIT_AUTOMAKE([tar-ustar -Wno-portability])

# Checks for programs.
CXXFLAGS="-g -O0"
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
Expand Down Expand Up @@ -77,7 +78,7 @@ AX_BOOST_SYSTEM
AX_BOOST_THREAD

# Checks for Intel TBB library
AX_TBB([], AC_MSG_ERROR([cannot find the Intel TBB library]))
#AX_TBB([], AC_MSG_ERROR([cannot find the Intel TBB library]))

# Doxygen configuration
DX_HTML_FEATURE(ON)
Expand Down
Binary file added nox.info
Binary file not shown.
6 changes: 4 additions & 2 deletions src/Make.vars
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ AM_CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\"
AM_CPPFLAGS += -include $(top_builddir)/config.h

# Include paths.
AM_CPPFLAGS += -I $(top_srcdir)/src/include

AM_CPPFLAGS += -I $(top_srcdir)/src/include \
-I$(top_srcdir)/src/coreapps/openflow/libofp \
-I$(top_srcdir)/src/coreapps/openflow/libofp/include \
-I$(top_srcdir)/src/coreapps/openflow/libofp/lib
# GNU C library definitions.
AM_CPPFLAGS += -D_GNU_SOURCE=1
if NDEBUG
Expand Down
6 changes: 6 additions & 0 deletions src/builtin/component.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ Component::post(const Event& event) const
event_dispatcher->post(event);
}

unique_ptr<boost::asio::deadline_timer>
Component::post_callback(const Component::Callback& callback, const timeval& duration)
{
return event_dispatcher->post(callback, duration);
}

void
Component::register_event(const Event_name& name) const
{
Expand Down
4 changes: 4 additions & 0 deletions src/builtin/event-dispatcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ Event_dispatcher::dispatch(const Event& event) const
}
}
}
else
{
VLOG_WARN(lg, "Event no found: %s", event.get_name().c_str());
}
}

Disposition
Expand Down
7 changes: 2 additions & 5 deletions src/coreapps/openflow/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,15 @@ openflow_manager_la_SOURCES = \
openflow-datapath-join-event.hh \
openflow-datapath-leave-event.hh \
openflow-event.hh \
openflow-1.0.hh \
openflow-inl-1.0.hh \
openflow-defs-1.0.hh \
openflow-1.0.cc
openflow-event.cc

openflow_manager_la_LDFLAGS = \
$(AM_LDFLAGS) -module \
-version-info $(OPENFLOW_MANAGER_VERSION)

openflow_manager_la_DEPENDENCIES =

openflow_manager_la_LIBADD =
openflow_manager_la_LIBADD = ./libofp.a -lpthread -lssl -lrt -lm

NOX_RUNTIMEFILES = meta.json

Expand Down
4 changes: 4 additions & 0 deletions src/coreapps/openflow/libofp/include/automake.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include include/linux/automake.mk
include include/openflow/automake.mk
include include/openvswitch/automake.mk
include include/sparse/automake.mk
254 changes: 254 additions & 0 deletions src/coreapps/openflow/libofp/include/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */

/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */

/* If the C compiler is GCC 4.7 or later, define to the return value of
__atomic_always_lock_free(1, 0). If the C compiler is not GCC or is an
older version of GCC, the value does not matter. */
#define ATOMIC_ALWAYS_LOCK_FREE_1B unsupported

/* If the C compiler is GCC 4.7 or later, define to the return value of
__atomic_always_lock_free(2, 0). If the C compiler is not GCC or is an
older version of GCC, the value does not matter. */
#define ATOMIC_ALWAYS_LOCK_FREE_2B unsupported

/* If the C compiler is GCC 4.7 or later, define to the return value of
__atomic_always_lock_free(4, 0). If the C compiler is not GCC or is an
older version of GCC, the value does not matter. */
#define ATOMIC_ALWAYS_LOCK_FREE_4B unsupported

/* If the C compiler is GCC 4.7 or later, define to the return value of
__atomic_always_lock_free(8, 0). If the C compiler is not GCC or is an
older version of GCC, the value does not matter. */
#define ATOMIC_ALWAYS_LOCK_FREE_8B unsupported

/* Define to 1 to enable time caching, to 0 to disable time caching, or leave
undefined to use the default (as one should ordinarily do). */
/* #undef CACHE_TIME */

/* Define to 1 if building on ESX. */
/* #undef ESX */

/* Define to 1 if you have backtrace(3). */
#define HAVE_BACKTRACE 1

/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
don't. */
#define HAVE_DECL_STRERROR_R 1

/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
don't. */
#define HAVE_DECL_SYS_SIGLIST 1

/* Define to 1 if the C compiler and linker supports the GCC 4.0+ atomic
built-ins. */
#define HAVE_GCC4_ATOMICS 1

/* Define to 1 if you have the `getloadavg' function. */
#define HAVE_GETLOADAVG 1

/* Define to 1 if you have the `getmntent_r' function. */
#define HAVE_GETMNTENT_R 1

/* Define to 1 if pthread_setname_np() is available and takes 2 parameters
(like glibc). */
#define HAVE_GLIBC_PTHREAD_SETNAME_NP 1

/* Define to 1 if net/if_dl.h is available. */
/* #undef HAVE_IF_DL */

/* Define to 1 if net/if_packet.h is available. */
#define HAVE_IF_PACKET 1

/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define to 1 if you have the `socket' library (-lsocket). */
/* #undef HAVE_LIBSOCKET */

/* Define to 1 if you have the <linux/if_ether.h> header file. */
#define HAVE_LINUX_IF_ETHER_H 1

/* Define to 1 if you have the <linux/types.h> header file. */
#define HAVE_LINUX_TYPES_H 1

/* Define to 1 if you have __malloc_hook, __realloc_hook, and __free_hook in
<malloc.h>. */
#define HAVE_MALLOC_HOOKS 1

/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

/* Define to 1 if you have the `mlockall' function. */
#define HAVE_MLOCKALL 1

/* Define to 1 if you have the <mntent.h> header file. */
#define HAVE_MNTENT_H 1

/* Define to 1 if pthread_setname_np() is available and takes 3 parameters
(like NetBSD). */
/* #undef HAVE_NETBSD_PTHREAD_SETNAME_NP */

/* Define to 1 if Netlink protocol is available. */
#define HAVE_NETLINK 1

/* Define to 1 if you have the <net/if_mib.h> header file. */
/* #undef HAVE_NET_IF_MIB_H */

/* Define to 1 if OpenSSL is installed. */
#define HAVE_OPENSSL 1

/* Define to 1 if you have the `pthread_set_name_np' function. */
/* #undef HAVE_PTHREAD_SET_NAME_NP */

/* Define to 1 if you have the `statvfs' function. */
#define HAVE_STATVFS 1

/* Define to 1 if you have the <stdatomic.h> header file. */
/* #undef HAVE_STDATOMIC_H */

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

/* Define to 1 if you have the `strerror_r' function. */
#define HAVE_STRERROR_R 1

/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1

/* Define to 1 if you have the `strnlen' function. */
#define HAVE_STRNLEN 1

/* Define if strtok_r macro segfaults on some inputs */
/* #undef HAVE_STRTOK_R_BUG */

/* Define to 1 if `struct ifreq' is a member of `ifr_flagshigh'. */
/* #undef HAVE_STRUCT_IFREQ_IFR_FLAGSHIGH */

/* Define to 1 if `struct stat' is a member of `st_mtimensec'. */
/* #undef HAVE_STRUCT_STAT_ST_MTIMENSEC */

/* Define to 1 if `struct stat' is a member of `st_mtim.tv_nsec'. */
#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1

/* Define to 1 if you have the <sys/statvfs.h> header file. */
#define HAVE_SYS_STATVFS_H 1

/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1

/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1

/* Define to 1 if the C compiler and linker supports the C11 thread_local
matcro defined in <threads.h>. */
/* #undef HAVE_THREAD_LOCAL */

/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1

/* Define to 1 if you have the <valgrind/valgrind.h> header file. */
/* #undef HAVE_VALGRIND_VALGRIND_H */

/* Define to 1 if the C compiler and linker supports the GCC __thread
extenions. */
#define HAVE___THREAD 1

/* System uses the linux datapath module. */
#define LINUX_DATAPATH 1

/* Define to 1 if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */

/* Name of package */
#define PACKAGE "openvswitch"

/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "[email protected]"

/* Define to the full name of this package. */
#define PACKAGE_NAME "openvswitch"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "openvswitch 2.0.0"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "openvswitch"

/* Define to the home page for this package. */
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "2.0.0"

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Define to 1 if strerror_r returns char *. */
#define STRERROR_R_CHAR_P 1

/* Define to 1 if the compiler support putting variables into sections with
user-defined names and the linker automatically defines __start_SECNAME and
__stop_SECNAME symbols that designate the start and end of the section. */
#define USE_LINKER_SECTIONS 1

/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
# define _ALL_SOURCE 1
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# define _POSIX_PTHREAD_SEMANTICS 1
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# define _TANDEM_SOURCE 1
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
# define __EXTENSIONS__ 1
#endif


/* Version number of package */
#define VERSION "2.0.0"

/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#if defined AC_APPLE_UNIVERSAL_BUILD
# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
# endif
#else
# ifndef WORDS_BIGENDIAN
/* # undef WORDS_BIGENDIAN */
# endif
#endif

/* Number of bits in a file offset, on hosts where this is settable. */
/* #undef _FILE_OFFSET_BITS */

/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */

/* Define to 1 if on MINIX. */
/* #undef _MINIX */

/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
/* #undef _POSIX_1_SOURCE */

/* Define to 1 if you need to in order for `stat' and other things to work. */
/* #undef _POSIX_SOURCE */
4 changes: 4 additions & 0 deletions src/coreapps/openflow/libofp/include/linux/automake.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
noinst_HEADERS += \
include/linux/if_ether.h \
include/linux/openvswitch.h \
include/linux/types.h
31 changes: 31 additions & 0 deletions src/coreapps/openflow/libofp/include/linux/if_ether.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright (c) 2013 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef LINUX_IF_ETHER_H
#define LINUX_IF_ETHER_H 1

/* On Linux, this header file just includes <linux/if_ether.h>.
*
* On other platforms, this header file implements just enough of
* <linux/if_ether.h> to allow <linux/openvswitch.h> to work. */

#if defined(HAVE_LINUX_IF_ETHER_H) || defined(__KERNEL__)
#include_next <linux/if_ether.h>
#else /* no <linux/if_ether.h> */
#define ETH_ALEN 6 /* Octets in one ethernet addr */
#endif

#endif /* <linux/if_ether.h> */
Loading