From e10113bb3fc49e29cb8c142f0d2e75ef962b813b Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 11 May 2009 10:36:32 -0700 Subject: [PATCH] Rename the project to OpenVSwitch and change version number to 0.90.0. The Debian packages have not been renamed yet, since they need plenty of other work at the moment too. --- INSTALL | 329 +++++------------- MISSING | 10 - README | 102 ++---- acinclude.m4 | 84 ++--- boot.sh | 12 +- configure.ac | 42 +-- controller/automake.mk | 2 +- controller/controller.8.in | 6 +- controller/controller.c | 12 +- datapath/Modules.mk | 8 +- datapath/actions.c | 4 +- datapath/brc_procfs.c | 2 +- datapath/brc_sysfs_dp.c | 2 +- datapath/brc_sysfs_if.c | 2 +- datapath/brcompat.c | 9 +- datapath/datapath.c | 32 +- datapath/datapath.h | 2 +- datapath/dp_dev.c | 2 +- datapath/flow.c | 4 +- datapath/flow.h | 2 +- datapath/linux-2.6/.gitignore | 2 +- datapath/linux-2.6/Modules.mk | 6 +- .../linux-2.6/compat-2.6/genetlink-brcompat.c | 8 +- ...ink-openflow.c => genetlink-openvswitch.c} | 0 datapath/snat.c | 2 +- debian/.gitignore | 58 +-- debian/automake.mk | 72 ++-- debian/changelog | 4 +- debian/commands/reconfigure | 2 +- debian/control.in | 109 +++--- debian/control.modules.in | 21 +- debian/ofp-switch-setup.8 | 41 --- debian/openflow-common.dirs | 1 - debian/openflow-common.install | 3 - debian/openflow-controller.README.Debian | 10 - debian/openflow-controller.dirs | 1 - debian/openflow-datapath-source.dirs | 1 - debian/openflow-datapath-source.install | 6 - debian/openflow-pki-server.apache2 | 1 - debian/openflow-pki-server.install | 1 - debian/openflow-switch-config.install | 1 - debian/openflow-switch-config.manpages | 1 - debian/openflow-switch.README.Debian | 18 - debian/openflow-switch.dirs | 2 - debian/openflow-switch.install | 6 - debian/openflow-switch.manpages | 4 - debian/openvswitch-common.dirs | 1 + debian/openvswitch-common.install | 3 + ...n.manpages => openvswitch-common.manpages} | 2 +- debian/openvswitch-controller.README.Debian | 12 + ...default => openvswitch-controller.default} | 6 +- debian/openvswitch-controller.dirs | 1 + ...oller.init => openvswitch-controller.init} | 16 +- ...install => openvswitch-controller.install} | 0 ...npages => openvswitch-controller.manpages} | 0 ...stinst => openvswitch-controller.postinst} | 8 +- ...tapath-module-_KVERS_.postinst.modules.in} | 2 +- ...openvswitch-datapath-source.README.Debian} | 18 +- ... => openvswitch-datapath-source.copyright} | 0 debian/openvswitch-datapath-source.dirs | 1 + debian/openvswitch-datapath-source.install | 6 + debian/openvswitch-pki-server.apache2 | 1 + ...erver.dirs => openvswitch-pki-server.dirs} | 0 debian/openvswitch-pki-server.install | 1 + ...stinst => openvswitch-pki-server.postinst} | 0 ...-pki.postinst => openvswitch-pki.postinst} | 6 +- ...ig.dirs => openvswitch-switch-config.dirs} | 0 debian/openvswitch-switch-config.install | 1 + debian/openvswitch-switch-config.manpages | 1 + ...es => openvswitch-switch-config.overrides} | 0 ...es => openvswitch-switch-config.templates} | 40 +-- debian/openvswitch-switch.README.Debian | 18 + debian/openvswitch-switch.dirs | 2 + ...ow-switch.init => openvswitch-switch.init} | 46 +-- debian/openvswitch-switch.install | 6 + ...logrotate => openvswitch-switch.logrotate} | 2 +- debian/openvswitch-switch.manpages | 4 + ...h.postinst => openvswitch-switch.postinst} | 6 +- ...witch.postrm => openvswitch-switch.postrm} | 4 +- ...h.template => openvswitch-switch.template} | 20 +- debian/{ofp-switch-setup => ovs-switch-setup} | 44 +-- debian/ovs-switch-setup.8 | 41 +++ debian/po/POTFILES.in | 2 +- debian/po/templates.pot | 142 ++++---- debian/rules | 26 +- include/automake.mk | 1 + include/openflow/automake.mk | 5 +- include/openflow/openflow-netlink.h | 66 ---- include/openvswitch/automake.mk | 4 + .../brcompat-netlink.h | 6 +- .../datapath-protocol.h | 6 +- lib/automake.mk | 16 +- lib/daemon.c | 14 +- lib/dirs.h | 8 +- lib/dpif.c | 27 +- lib/dpif.h | 2 +- lib/fatal-signal.c | 4 +- lib/flow.c | 2 +- lib/flow.h | 2 +- lib/netdev.c | 10 +- lib/odp-util.h | 2 +- lib/ofp-print.c | 10 +- lib/process.c | 8 +- lib/queue.c | 16 +- lib/queue.h | 16 +- lib/random.c | 4 +- lib/rconn.c | 2 +- lib/signals.c | 6 +- lib/timeval.c | 8 +- lib/unixctl.c | 8 +- lib/util.c | 8 +- lib/util.h | 6 +- lib/vconn-ssl.c | 4 +- lib/vconn-tcp.c | 2 +- lib/vlog-modules.def | 2 +- lib/vlog.c | 6 +- m4/{libopenflow.m4 => libopenvswitch.m4} | 60 ++-- secchan/automake.mk | 2 +- secchan/commands/reboot | 2 +- secchan/executer.c | 2 +- secchan/main.c | 52 +-- secchan/netflow.c | 4 +- secchan/ofproto.c | 2 +- secchan/pinsched.c | 14 +- secchan/secchan.8.in | 6 +- tests/automake.mk | 12 +- tests/test-dhcp-client.c | 10 +- tests/test-flows.c | 8 +- tests/test-stp.c | 6 +- utilities/.gitignore | 16 +- utilities/automake.mk | 54 +-- utilities/cfg-mod.8.in | 2 +- utilities/cfg-mod.c | 8 +- utilities/dpctl.8.in | 37 +- utilities/dpctl.c | 86 ++--- utilities/nlmon.c | 10 +- .../{ofp-discover.8.in => ovs-discover.8.in} | 42 +-- utilities/{ofp-discover.c => ovs-discover.c} | 24 +- utilities/{ofp-kill.8.in => ovs-kill.8.in} | 22 +- utilities/{ofp-kill.c => ovs-kill.c} | 8 +- ...{ofp-parse-leaks.in => ovs-parse-leaks.in} | 2 +- utilities/{ofp-pki-cgi.in => ovs-pki-cgi.in} | 0 utilities/{ofp-pki.8.in => ovs-pki.8.in} | 76 ++-- utilities/{ofp-pki.in => ovs-pki.in} | 20 +- utilities/vlogconf.8.in | 8 +- utilities/vlogconf.c | 2 +- vswitchd/automake.mk | 4 +- vswitchd/brcompatd.8.in | 4 +- vswitchd/brcompatd.c | 12 +- vswitchd/bridge.c | 12 +- vswitchd/etc/init.d/vswitch | 8 +- vswitchd/etc/sysconfig/vswitch.example | 2 +- vswitchd/proc-net-compat.c | 2 +- vswitchd/vswitchd.8.in | 25 +- vswitchd/vswitchd.c | 8 +- vswitchd/vswitchd.conf.5.in | 2 +- 156 files changed, 1125 insertions(+), 1370 deletions(-) delete mode 100644 MISSING rename datapath/linux-2.6/compat-2.6/{genetlink-openflow.c => genetlink-openvswitch.c} (100%) delete mode 100644 debian/ofp-switch-setup.8 delete mode 100644 debian/openflow-common.dirs delete mode 100644 debian/openflow-common.install delete mode 100644 debian/openflow-controller.README.Debian delete mode 100644 debian/openflow-controller.dirs delete mode 100644 debian/openflow-datapath-source.dirs delete mode 100644 debian/openflow-datapath-source.install delete mode 100644 debian/openflow-pki-server.apache2 delete mode 100644 debian/openflow-pki-server.install delete mode 100644 debian/openflow-switch-config.install delete mode 100644 debian/openflow-switch-config.manpages delete mode 100644 debian/openflow-switch.README.Debian delete mode 100644 debian/openflow-switch.dirs delete mode 100644 debian/openflow-switch.install delete mode 100644 debian/openflow-switch.manpages create mode 100644 debian/openvswitch-common.dirs create mode 100644 debian/openvswitch-common.install rename debian/{openflow-common.manpages => openvswitch-common.manpages} (50%) create mode 100644 debian/openvswitch-controller.README.Debian rename debian/{openflow-controller.default => openvswitch-controller.default} (86%) create mode 100644 debian/openvswitch-controller.dirs rename debian/{openflow-controller.init => openvswitch-controller.init} (94%) rename debian/{openflow-controller.install => openvswitch-controller.install} (100%) rename debian/{openflow-controller.manpages => openvswitch-controller.manpages} (100%) rename debian/{openflow-controller.postinst => openvswitch-controller.postinst} (84%) rename debian/{openflow-datapath-module-_KVERS_.postinst.modules.in => openvswitch-datapath-module-_KVERS_.postinst.modules.in} (92%) rename debian/{openflow-datapath-source.README.Debian => openvswitch-datapath-source.README.Debian} (57%) rename debian/{openflow-datapath-source.copyright => openvswitch-datapath-source.copyright} (100%) create mode 100644 debian/openvswitch-datapath-source.dirs create mode 100644 debian/openvswitch-datapath-source.install create mode 100644 debian/openvswitch-pki-server.apache2 rename debian/{openflow-pki-server.dirs => openvswitch-pki-server.dirs} (100%) create mode 100644 debian/openvswitch-pki-server.install rename debian/{openflow-pki-server.postinst => openvswitch-pki-server.postinst} (100%) rename debian/{openflow-pki.postinst => openvswitch-pki.postinst} (88%) rename debian/{openflow-switch-config.dirs => openvswitch-switch-config.dirs} (100%) create mode 100644 debian/openvswitch-switch-config.install create mode 100644 debian/openvswitch-switch-config.manpages rename debian/{openflow-switch-config.overrides => openvswitch-switch-config.overrides} (100%) rename debian/{openflow-switch-config.templates => openvswitch-switch-config.templates} (90%) create mode 100644 debian/openvswitch-switch.README.Debian create mode 100644 debian/openvswitch-switch.dirs rename debian/{openflow-switch.init => openvswitch-switch.init} (87%) create mode 100644 debian/openvswitch-switch.install rename debian/{openflow-switch.logrotate => openvswitch-switch.logrotate} (86%) create mode 100644 debian/openvswitch-switch.manpages rename debian/{openflow-switch.postinst => openvswitch-switch.postinst} (89%) rename debian/{openflow-switch.postrm => openvswitch-switch.postrm} (92%) rename debian/{openflow-switch.template => openvswitch-switch.template} (92%) rename debian/{ofp-switch-setup => ovs-switch-setup} (94%) create mode 100644 debian/ovs-switch-setup.8 delete mode 100644 include/openflow/openflow-netlink.h create mode 100644 include/openvswitch/automake.mk rename include/{openflow => openvswitch}/brcompat-netlink.h (96%) rename include/{openflow => openvswitch}/datapath-protocol.h (98%) rename m4/{libopenflow.m4 => libopenvswitch.m4} (84%) rename utilities/{ofp-discover.8.in => ovs-discover.8.in} (74%) rename utilities/{ofp-discover.c => ovs-discover.c} (94%) rename utilities/{ofp-kill.8.in => ovs-kill.8.in} (70%) rename utilities/{ofp-kill.c => ovs-kill.c} (96%) rename utilities/{ofp-parse-leaks.in => ovs-parse-leaks.in} (99%) rename utilities/{ofp-pki-cgi.in => ovs-pki-cgi.in} (100%) rename utilities/{ofp-pki.8.in => ovs-pki.8.in} (84%) rename utilities/{ofp-pki.in => ovs-pki.in} (97%) diff --git a/INSTALL b/INSTALL index fb2dab9b..34f898b7 100644 --- a/INSTALL +++ b/INSTALL @@ -1,29 +1,26 @@ - Installation Instructions for OpenFlow Reference Release + OpenVSwitch Installation Instructions -This document describes how to build, install, and execute the -reference implementation of OpenFlow. Please send any comments to: +This document describes how to build, install, and execute +OpenVSwitch. - +OpenVSwitch implements an Ethernet switch with MAC learning that may +be configured with any of the following features: -Contents -======== + * NIC bonding with automatic fail-over and source MAC-based TX + load balancing ("SLB"). -The OpenFlow reference implementation includes two OpenFlow switch -implementations: + * 802.1Q VLAN support. - - The "kernel-based switch": This divides the switch into a - "datapath" Linux kernel module (openflow_mod.ko) and a - userspace program (secchan). The kernel-based switch is - faster than either of the other two implementations but - requires building and installing a kernel module, which can - sometimes be challenging. + * Port mirroring, with optional VLAN tagging. - - The "userspace datapath-based switch": This divides the - switch into a userspace "datapath" (built as - udatapath/udatapath) and the same userspace program used by - the kernel-based switch (secchan). The userspace - datapath-based switch does not require building a kernel - module, but it is not as fast as the kernel-based switch. + * NetFlow v5 flow logging. + + * Connectivity to an external OpenFlow controller, such as + NOX. + +The current version of this distribution requires a kernel module to +be built and loaded. An (optional) entirely userspace switch is on +the roadmap for future versions. The reference implementation also contains a simple OpenFlow controller (built as controller/controller) and a number of related @@ -43,7 +40,7 @@ There are two principal ways to build and install this distribution: Base Prerequisites ------------------ -Regardless of how it is built, OpenFlow has a common set of +Regardless of how it is built, OpenVSwitch has a common set of prerequisites. To compile the userspace programs in the OpenFlow reference distribution, you will need the following software: @@ -54,42 +51,13 @@ reference distribution, you will need the following software: with version 4.2 or 4.3. - libssl, from OpenSSL (http://www.openssl.org/), is optional but - recommended. libssl is required to establish confidentiality - and authenticity in the connections among OpenFlow switches and - controllers. To enable, configure with --enable-ssl=yes. - -If you are working from a Git tree or snapshot (instead of from a -distribution tarball), or if you modify the OpenFlow build system, you -will also need the following software: - - - Autoconf version 2.60 or later (http://www.gnu.org/software/autoconf). - - - Automake version 1.10 or later (http://www.gnu.org/software/automake). - - - pkg-config (http://pkg-config.freedesktop.org/wiki/). We test - with version 0.22. - -Debian Prerequisites --------------------- - -To build Debian packages from the OpenFlow distribution, you will need -to install a number of Debian packages in addition to the base -prerequisites listed above. These additional prerequisites may be -found listed as "Build-Depends" in debian/control in the source tree. -To check that they are installed, first install the dpkg-dev package, -then run dpkg-checkbuilddeps from the top level of the OpenFlow source -tree. - -To build Debian packages without being root, also install the -"fakeroot" package. + recommended if you plan to connect the OpenVSwitch to an + OpenFlow controller. libssl is required to establish + confidentiality and authenticity in the connections from an + OpenVSwitch to an OpenFlow controller. To enable, configure + with --enable-ssl=yes. -Kernel-Based Switch Prerequisites ---------------------------------- - -The OpenFlow distribution also includes a Linux kernel module that can -be used to achieve higher switching performance. To compile the -kernel module, you must install the following in addition to the -software listed in the "Base Prerequisites" section above: +To compile the kernel module, you must also install the following: - A supported Linux kernel version. Please refer to README for a list of supported versions. @@ -110,16 +78,39 @@ software listed in the "Base Prerequisites" section above: corresponding linux-headers package with the required build infrastructure. +If you are working from a Git tree or snapshot (instead of from a +distribution tarball), or if you modify the OpenVSwitch build system, +you will also need the following software: + + - Autoconf version 2.60 or later (http://www.gnu.org/software/autoconf). + + - Automake version 1.10 or later (http://www.gnu.org/software/automake). + + - pkg-config (http://pkg-config.freedesktop.org/wiki/). We test + with version 0.22. + +Debian Prerequisites +-------------------- + +To build Debian packages from the OpenVSwitch distribution, you will +need to install a number of Debian packages in addition to the base +prerequisites listed above. These additional prerequisites may be +found listed as "Build-Depends" in debian/control in the source tree. +To check that they are installed, first install the dpkg-dev package, +then run dpkg-checkbuilddeps from the top level of the OpenFlow source +tree. + +To build Debian packages without being root, also install the +"fakeroot" package. + Building Conventionally ======================= -This section explains how to build and install the OpenFlow +This section explains how to build and install the OpenVSwitch distribution in the ordinary way using "configure" and "make". 0. Check that you have installed all the prerequisites listed above in - the Base Prerequisites section. If you want to compile the Linux - kernel module, also check that the prequisites listed under - Kernel-Based Switch Prequisites are installed. + the Base Prerequisites section. 1. In the top source directory, configure the package by running the configure script. You can usually invoke configure without any @@ -133,9 +124,19 @@ distribution in the ordinary way using "configure" and "make". % ./configure CC=gcc-4.2 To build the Linux kernel module, so that you can run the - kernel-based switch, add --with-l26 or --with-l24 option, or both, - to the configure script's command line. Refer to Building the - Linux Kernel-Based Switch, below, for more information. + kernel-based switch, pass the location of the kernel build + directory on --with-l26. For example, to build for a running + instance of Linux 2.6: + + % ./configure --with-l26=/lib/modules/`uname -r`/build + + If you wish to build the kernel module for an architecture other + than the architecture of the machine used for the build, you may + specify the kernel architecture string using the KARCH variable + when invoking the configure script. For example, to build for MIPS + with Linux 2.6: + + % ./configure --with-l26=/path/to/linux-2.6 KARCH=mips The configure script accepts a number of other options and honors additional environment variables. For a full list, invoke @@ -147,7 +148,9 @@ distribution in the ordinary way using "configure" and "make". The following binaries will be built: - - Userspace datapath: udatapath/udatapath. + - Virtual switch daemon: vswitchd/vswitchd + + - Bridge compatibility daemon: vswitchd/brcompatd - Secure channel executable: secchan/secchan. @@ -157,8 +160,8 @@ distribution in the ordinary way using "configure" and "make". - Runtime logging configuration utility: utilities/vlogconf. - - Miscellaneous utilities: utilities/ofp-discover, - utilities/ofp-kill. + - Miscellaneous utilities: utilities/ovs-discover, + utilities/ovs-kill. - Tests: various binaries in tests/. @@ -169,7 +172,7 @@ distribution in the ordinary way using "configure" and "make". ext/ezio/ezio-term. - Switch monitoring UI for small text displays: - ext/ezio/ofp-switchui. + ext/ezio/ovs-switchui. If you passed --with-l26 to configure, "make" will also build the following kernel modules: @@ -188,31 +191,8 @@ distribution in the ordinary way using "configure" and "make". have been loaded, run "/sbin/lsmod" and check that openflow_mod is listed. -4. Test the userspace programs, as described under Testing Userspace - Programs below. - -5. If you built the kernel module, test the kernel-based switch, as - described under Testing the Kernel-Based Implementation below. - -Building the Linux Kernel-Based Switch --------------------------------------- - -To build the kernel module, follow the build process described above, -but pass the location of the kernel build directory as an additional -argument to the configure script, as described under step 1 in that -section. Specify the location on --with-l26. For example, to build -for a running instance of Linux 2.6: - - % ./configure --with-l26=/lib/modules/`uname -r`/build - -If you wish to build OpenFlow for an architecture other than the -architecture used for compilation, you may specify the kernel -architecture string using the KARCH variable when invoking the -configure script. For example, to build OpenFlow for MIPS with Linux -2.6: - - % ./configure --with-l24=/path/to/linux-2.6 KARCH=mips - +5. Test the virtuaal switch, as described under Testing the Virtual +Switch below. Building Debian Packages ======================== @@ -286,64 +266,20 @@ Follow these instructions to build Debian packages for OpenFlow. This form of configuration is not supported for the userspace datapath-based switch. - - By running the ofp-switch-setup program. This interactive + - By running the ovs-switch-setup program. This interactive program will walk you through all the steps of configuring an OpenFlow switch, including configuration of SSL certificates. Run it without arguments, as root: - % ofp-switch-setup + % ovs-switch-setup This form of configuration is not supported for the userspace datapath-based switch. -Testing -======= - -The following sets of instructions show how to use the OpenFlow -reference implementation as a switch on a single machine. This can be -used to verify that the distribution built properly. For full -installation instructions, refer to the Installation section below. - -Userspace Datapath ------------------- - -These instructions use the OpenFlow userspace datapath ("udatapath"). - -1. Start the OpenFlow controller running in the background, by running - the "controller" program with a command like the following: - - # controller punix:/var/run/controller.sock & - - This command causes the controller to bind to the specified Unix - domain socket, awaiting connections from OpenFlow switches. See - controller(8) for details. - - The "controller" program does not require any special privilege, so - you do not need to run it as root. - -2. The commands below must run as root, so log in as root, or use a - program such as "su" to become root temporarily. - -3. Create a datapath instance running in the background. The command - below creates a datapath that listens for connections from secchan - on a Unix domain socket located in /var/run and services physical - ports eth1 and eth2: - - # udatapath punix:/var/run/dp0.sock -i eth1,eth2 & - -4. Run secchan to start the secure channel connecting the datapath and - the controller: - - # secchan unix:/var/run/controller.sock unix:/var/run/dp0.sock & - -5. Devices plugged into the network ports specified in step 2 should - now be able to send packets to each other, as if they were plugged - into ports on a conventional Ethernet switch. - Installation ============ -This section explains how to install OpenFlow in a network with one +This section explains how to install OpenVSwitch in a network with one controller and one or more switches, each of which runs on a separate machine. Before you begin, you must decide on one of two ways for each switch to reach the controller over the network: @@ -374,84 +310,10 @@ port 6633 (the default), as shown below. Make sure the machine hosting the controller is reachable by the switch. -Userspace Datapath-Based Setup ------------------------------- - -On a machine that is to host an OpenFlow userspace datapath-based -switch, follow the procedure below. - -0. The commands below must run as root, so log in as root, or use a - program such as "su" to become root temporarily. - -1. Create a datapath instance running in the background. The command - below creates a datapath that listens for connections from secchan - on a Unix domain socket located in /var/run, services physical - ports eth1 and eth2, and creates a TAP network device named "tap0" - for use in in-band control: - - # udatapath punix:/var/run/dp0.sock -i eth1,eth2 --local-port=tap:tap0 & - - (See udatapath(8) for details.) - - If the switch will connect to the controller out-of-band, then the - --local-port option may be omitted, or --no-local-port may be - substituted. - -3. Arrange so that the switch can reach the controller over the - network. - - - If you are using out-of-band control, at this point make sure - that the switch machine can reach the controller over the - network. - - - If you are using in-band control with manual configuration, at - this point the TAP network device created in step 1 is not - bridged to any physical network, so the next step depends on - whether connectivity is required to configure the device's IP - address: - - * If the switch has a static IP address, you may configure - its IP address now, e.g.: - - # ifconfig tap0 192.168.1.1 - - * If the switch does not have a static IP address, e.g. its - IP address is obtained dynamically via DHCP, then proceed - to step 4. The DHCP client will not be able to contact - the DHCP server until the secure channel has started up. - - - If you are using in-band control with controller discovery, no - configuration is required at this point. You may proceed to - step 4. - -4. Run secchan to start the secure channel connecting the datapath to - a remote controller. If the controller is running on host - 192.168.1.2 port 6633 (the default port), the secchan invocation - would look like this: - - # secchan unix:/var/run/dp0.sock tcp:192.168.1.2 - - - If you are using in-band control with controller discovery, omit - the second argument to the secchan command. - - - If you are using out-of-band control, add --out-of-band to the - command line. - -5. If you are using in-band control with manual configuration, and the - switch obtains its IP address dynamically, then you may now obtain - the switch's IP address, e.g. by invoking a DHCP client. The - secure channel will only be able to connect to the controller after - an IP address has been obtained. - -6. The secure channel should connect to the controller within a few - seconds. It may take a little longer if controller discovery is in - use, because the switch must then also obtain its own IP address - and the controller's location via DHCP. - -Testing the Kernel-Based Implementation ---------------------------------------- +Testing the Virtual Switch +-------------------------- -The OpenFlow kernel module must be loaded, as described under +The OpenVSwitch kernel module must be loaded, as described under "Building Conventionally", before it may be used. 0. The commands below must run as root, so log in as root, or use a @@ -463,7 +325,7 @@ The OpenFlow kernel module must be loaded, as described under # dpctl adddp dp0 - (dp0 is the first datapath within a host. openflow_mod supports + (dp0 is the first datapath within a host. openvswitch_mod supports multiple datapaths within the same host, which would be identified as dp1, dp2, etc.) @@ -543,16 +405,16 @@ Configuration Secure operation over SSL ------------------------- -The instructions above set up OpenFlow for operation over a plaintext -TCP connection. Production use of OpenFlow should use SSL[*] to -ensure confidentiality and authenticity of traffic among switches and -controllers. The source must be configured with --enable-ssl=yes to -build with SSL support. +The instructions above set up OpenVSwitch for operation over a +plaintext TCP connection. Production use of OpenVSwitch should use +SSL[*] to ensure confidentiality and authenticity of traffic among +switches and controllers. The source must be configured with +--enable-ssl=yes to build with SSL support. -To use SSL with OpenFlow, you must set up a public-key infrastructure +To use SSL with OpenVSwitch, you must set up a public-key infrastructure (PKI) including a pair of certificate authorities (CAs), one for controllers and one for switches. If you have an established PKI, -OpenFlow can use it directly. Otherwise, refer to "Establishing a +OpenVSwitch can use it directly. Otherwise, refer to "Establishing a Public Key Infrastructure" below. To configure the controller to listen for SSL connections on port 6633 @@ -587,7 +449,7 @@ like: # secchan -v DATAPATH ssl:192.168.1.2 --private-key=sc-privkey.pem \ --certificate=sc-cert.pem --ca-cert=pki/controllerca/cacert.pem -[*] To be specific, OpenFlow uses TLS version 1.0 or later (TLSv1), as +[*] To be specific, OpenVSwitch uses TLS version 1.0 or later (TLSv1), as specified by RFC 2246, which is very similar to SSL version 3.0. TLSv1 was released in January 1999, so all current software and hardware should implement it. @@ -595,13 +457,13 @@ like: Establishing a Public Key Infrastructure ---------------------------------------- -If you do not have a PKI, the ofp-pki script included with OpenFlow +If you do not have a PKI, the ovs-pki script included with OpenVSwitch can help. To create an initial PKI structure, invoke it as: - % ofp-pki init + % ovs-pki init which will create and populate a new PKI directory. The default -location for the PKI directory depends on how the OpenFlow tree was +location for the PKI directory depends on how the OpenVSwitch tree was configured (to see the configured default, look for the --dir option -description in the output of "ofp-pki --help"). +description in the output of "ovs-pki --help"). The pki directory contains two important subdirectories. The controllerca subdirectory contains controller certificate authority @@ -628,10 +490,10 @@ related files, analogous to those in the controllerca subdirectory: no need for switches or controllers to have a copy of it. After you create the initial structure, you can create keys and -certificates for switches and controllers with ofp-pki. To create a +certificates for switches and controllers with ovs-pki. To create a controller private key and certificate in files named ctl-privkey.pem and ctl-cert.pem, for example, you could run: - % ofp-pki req+sign ctl controller + % ovs-pki req+sign ctl controller ctl-privkey.pem and ctl-cert.pem would need to be copied to the controller for its use at runtime (they could then be deleted from their original locations). The --private-key and --certificate @@ -639,7 +501,7 @@ options of controller, respectively, would point to these files. Analogously, to create a switch private key and certificate in files named sc-privkey.pem and sc-cert.pem, for example, you could run: - % ofp-pki req+sign sc switch + % ovs-pki req+sign sc switch sc-privkey.pem and sc-cert.pem would need to be copied to the switch for its use at runtime (they could then be deleted from their original locations). The --private-key and --certificate options, @@ -648,5 +510,4 @@ respectively, of secchan would point to these files. Bug Reporting ------------- -Please report problems to: -info@openflowswitch.org +Please report problems to ovs-bugs@openvswitch.org. diff --git a/MISSING b/MISSING deleted file mode 100644 index c985fe03..00000000 --- a/MISSING +++ /dev/null @@ -1,10 +0,0 @@ -The following features are temporarily missing, pending time to -reimplement them with the new architecture: - -- STP support in secchan (note that this is distinct from STP support - in vswitchd). - -- SNAT support in secchan (but SNAT is still supported in the kernel - datapath). - -- udatapath. diff --git a/README b/README index 90986441..44afd798 100644 --- a/README +++ b/README @@ -1,68 +1,48 @@ - OpenFlow Reference Release + OpenVSwitch -What is OpenFlow? ------------------ +What is OpenVSwitch? +-------------------- -OpenFlow is a flow-based switch specification designed to enable -researchers to run experiments in live networks. OpenFlow is based on a -simple Ethernet flow switch that exposes a standardized interface for -adding and removing flow entries. +OpenVSwitch is an Ethernet switch for virtual servers with the +following features: -An OpenFlow switch consists of three parts: (1) A "flow table" in -which each flow entry is associated with an action telling the switch -how to process the flow, (2) a "secure channel" that connects the switch -to a remote process (a controller), allowing commands and packets to -be sent between the controller and the switch, and (3) an OpenFlow -protocol implementation, providing an open and standard way for a -controller to talk to the switch. + * NIC bonding with automatic fail-over and source MAC-based TX + load balancing ("SLB"). -An OpenFlow switch can thus serve as a simple datapath element that -forwards packets between ports according to flow actions defined by -the controller using OpenFlow commands. Example actions are: + * 802.1Q VLAN support. - - Forward this flow's packets to the given port(s) - - Drop this flow's packets - - Encapsulate and forward this flow's packets to the controller. + * Port mirroring, with optional VLAN tagging. -The OpenFlow switch is defined in detail in the OpenFlow switch -Specification [2]. + * NetFlow v5 flow logging. + + * Connectivity to an external OpenFlow controller, such as + NOX. What's here? ------------ -This distribution includes two reference implementations of an -OpenFlow switch. The first implementation, which is closely tied to -Linux because it is partially implemented in the Linux kernel, has the -following components: +The most important components of this distribution are: - - A Linux kernel module that implements the flow table, in the + - A Linux kernel module for flow-based switching, in the datapath directory. - - secchan, a program that implements the secure channel - component of the reference switch. - - - dpctl, a tool for configuring the datapath and OpenFlow - switches in general. - -The second implementation has the following components: + - vswitchd, a daemon that implements the virtual switch. - - udatapath, which implements the same functionality as the - Linux kernel module in userspace, at a cost in performance. - - - secchan, a program that implements the secure channel - component of the reference switch (the same program used in - the kernel-based implementation). + - dpctl, a tool for configuring the kernel module and + controlling OpenFlow switches. This distribution includes some additional software as well: - - controller, a simple program that connects to any number of - OpenFlow switches, commanding them to act as regular MAC - learning switches. + - secchan, a program that implements a simple OpenFlow switch + (without the special features provided by vswitchd) using + the same kernel module as vswitchd. + + - controller, a simple OpenFlow switch - vlogconf, a utility that can adjust the logging levels of a running secchan or controller. - - ofp-pki, a utility for creating and managing the public-key + - ovs-pki, a utility for creating and managing the public-key infrastructure for OpenFlow switches. - A patch to tcpdump that enables it to parse OpenFlow @@ -74,36 +54,18 @@ is also accompanied by a manpage. Platform support ---------------- -Other than the Linux kernel module and userspace switch -implementation, the software in the OpenFlow distribution should -compile under Unix-like environments such as Linux, FreeBSD, Mac OS X, -and Solaris. Our primary test environment is Debian GNU/Linux. -Please contact us with portability-related bug reports or patches. +Our primary test environment is Debian GNU/Linux. Ports to other +platforms are welcome. Please contact us with portability-related bug +reports or patches. -The Linux kernel module is, of course, Linux-specific, and the dpctl -utility will not be useful without the kernel module. The testing of -the kernel module has focused on version 2.6.18 from Xen and version -2.6.26 from kernel.org. Linux 2.6 releases from 2.6.15 onward should -also work. - -The userspace datapath implementation should be easy to port to -Unix-like systems. The interface to network devices, in netdev.c, is -the code most likely to need changes. So far, only Linux is -supported. We welcome ports to other platforms. +The testing of the kernel module has focused on version 2.6.18 from +Xen and version 2.6.26 from kernel.org. Linux 2.6 releases from +2.6.15 onward should also work. GCC is the expected compiler. -References ----------- - - [1] OpenFlow: Enabling Innovation in College Networks. Whitepaper. - - - [2] OpenFlow Switch Specification. - - Contact ------- -e-mail: info@openflowswitch.org -www: http://openflowswitch.org/ +ovs-bugs@openvswitch.org +http://openvswitch.org/ diff --git a/acinclude.m4 b/acinclude.m4 index 96648845..a1bd67ef 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -32,10 +32,10 @@ # advertising or publicity pertaining to the Software or any # derivatives without specific, written prior permission. -dnl OFP_CHECK_LINUX(OPTION, VERSION, VARIABLE, CONDITIONAL) +dnl OVS_CHECK_LINUX(OPTION, VERSION, VARIABLE, CONDITIONAL) dnl dnl Configure linux kernel source tree -AC_DEFUN([OFP_CHECK_LINUX], [ +AC_DEFUN([OVS_CHECK_LINUX], [ AC_ARG_WITH([$1], [AC_HELP_STRING([--with-$1=/path/to/linux-$2], [Specify the linux $2 kernel sources])], @@ -64,15 +64,15 @@ AC_DEFUN([OFP_CHECK_LINUX], [ ! test -e "$path"/include/linux/autoconf.h; then AC_MSG_ERROR([Linux kernel source in $path is not configured]) fi - m4_if($2, [2.6], [OFP_CHECK_LINUX26_COMPAT]) + m4_if($2, [2.6], [OVS_CHECK_LINUX26_COMPAT]) fi AM_CONDITIONAL($4, test -n "$path") ]) -dnl OFP_GREP_IFELSE(FILE, REGEX, IF-MATCH, IF-NO-MATCH) +dnl OVS_GREP_IFELSE(FILE, REGEX, IF-MATCH, IF-NO-MATCH) dnl dnl Greps FILE for REGEX. If it matches, runs IF-MATCH, otherwise IF-NO-MATCH. -AC_DEFUN([OFP_GREP_IFELSE], [ +AC_DEFUN([OVS_GREP_IFELSE], [ AC_MSG_CHECKING([whether $2 matches in $1]) grep '$2' $1 >/dev/null 2>&1 status=$? @@ -91,14 +91,14 @@ AC_DEFUN([OFP_GREP_IFELSE], [ esac ]) -dnl OFP_DEFINE(NAME) +dnl OVS_DEFINE(NAME) dnl dnl Defines NAME to 1 in kcompat.h. -AC_DEFUN([OFP_DEFINE], [ +AC_DEFUN([OVS_DEFINE], [ echo '#define $1 1' >> datapath/linux-2.6/kcompat.h.new ]) -AC_DEFUN([OFP_CHECK_VETH], [ +AC_DEFUN([OVS_CHECK_VETH], [ AC_MSG_CHECKING([whether to build veth module]) if test "$sublevel" = 18; then AC_MSG_RESULT([yes]) @@ -108,37 +108,37 @@ AC_DEFUN([OFP_CHECK_VETH], [ fi ]) -AC_DEFUN([OFP_CHECK_LOG2_H], [ +AC_DEFUN([OVS_CHECK_LOG2_H], [ AC_MSG_CHECKING([for $KSRC26/include/linux/log2.h]) if test -e $KSRC26/include/linux/log2.h; then AC_MSG_RESULT([yes]) - OFP_DEFINE([HAVE_LOG2_H]) + OVS_DEFINE([HAVE_LOG2_H]) else AC_MSG_RESULT([no]) fi ]) -dnl OFP_CHECK_LINUX26_COMPAT +dnl OVS_CHECK_LINUX26_COMPAT dnl dnl Runs various Autoconf checks on the Linux 2.6 kernel source in dnl the directory in $KSRC26. -AC_DEFUN([OFP_CHECK_LINUX26_COMPAT], [ +AC_DEFUN([OVS_CHECK_LINUX26_COMPAT], [ rm -f datapath/linux-2.6/kcompat.h.new mkdir -p datapath/linux-2.6 : > datapath/linux-2.6/kcompat.h.new - OFP_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_transport_header], - [OFP_DEFINE([HAVE_SKBUFF_HEADER_HELPERS])]) - OFP_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [raw], - [OFP_DEFINE([HAVE_MAC_RAW])]) - OFP_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], + OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_transport_header], + [OVS_DEFINE([HAVE_SKBUFF_HEADER_HELPERS])]) + OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [raw], + [OVS_DEFINE([HAVE_MAC_RAW])]) + OVS_GREP_IFELSE([$KSRC26/include/linux/skbuff.h], [skb_copy_from_linear_data_offset], - [OFP_DEFINE([HAVE_SKB_COPY_FROM_LINEAR_DATA_OFFSET])]) - OFP_GREP_IFELSE([$KSRC26/include/net/netlink.h], [NLA_NUL_STRING], - [OFP_DEFINE([HAVE_NLA_NUL_STRING])]) - OFP_GREP_IFELSE([$KSRC26/include/linux/err.h], [ERR_CAST], - [OFP_DEFINE([HAVE_ERR_CAST])]) - OFP_CHECK_LOG2_H - OFP_CHECK_VETH + [OVS_DEFINE([HAVE_SKB_COPY_FROM_LINEAR_DATA_OFFSET])]) + OVS_GREP_IFELSE([$KSRC26/include/net/netlink.h], [NLA_NUL_STRING], + [OVS_DEFINE([HAVE_NLA_NUL_STRING])]) + OVS_GREP_IFELSE([$KSRC26/include/linux/err.h], [ERR_CAST], + [OVS_DEFINE([HAVE_ERR_CAST])]) + OVS_CHECK_LOG2_H + OVS_CHECK_VETH if cmp -s datapath/linux-2.6/kcompat.h.new \ datapath/linux-2.6/kcompat.h >/dev/null 2>&1; then rm datapath/linux-2.6/kcompat.h.new @@ -148,7 +148,7 @@ AC_DEFUN([OFP_CHECK_LINUX26_COMPAT], [ ]) dnl Checks for net/if_packet.h. -AC_DEFUN([OFP_CHECK_IF_PACKET], +AC_DEFUN([OVS_CHECK_IF_PACKET], [AC_CHECK_HEADER([net/if_packet.h], [HAVE_IF_PACKET=yes], [HAVE_IF_PACKET=no]) @@ -158,11 +158,11 @@ AC_DEFUN([OFP_CHECK_IF_PACKET], [Define to 1 if net/if_packet.h is available.]) fi]) -dnl Enable OpenFlow extension submodule. -AC_DEFUN([OFP_ENABLE_EXT], +dnl Enable OpenVSwitch extension submodule. +AC_DEFUN([OVS_ENABLE_EXT], [AC_ARG_ENABLE([ext], AS_HELP_STRING([--enable-ext], - [use OpenFlow extensions + [use OpenVSwitch extensions (default is yes if "ext" dir exists)])) case "${enable_ext}" in (yes) @@ -186,13 +186,13 @@ AC_DEFUN([OFP_ENABLE_EXT], AC_MSG_ERROR([cannot configure extensions without "ext" directory]) fi AC_DEFINE([HAVE_EXT], [1], - [Whether the OpenFlow extensions submodule is available]) + [Whether the OpenVSwitch extensions submodule is available]) fi AM_CONDITIONAL([HAVE_EXT], [test $HAVE_EXT = yes])]) dnl Checks for dpkg-buildpackage. If this is available then we check dnl that the Debian packaging is functional at "make distcheck" time. -AC_DEFUN([OFP_CHECK_DPKG_BUILDPACKAGE], +AC_DEFUN([OVS_CHECK_DPKG_BUILDPACKAGE], [AC_CHECK_PROG([HAVE_DPKG_BUILDPACKAGE], [dpkg-buildpackage], [yes], [no]) AM_CONDITIONAL([HAVE_DPKG_BUILDPACKAGE], [test $HAVE_DPKG_BUILDPACKAGE = yes])]) @@ -204,28 +204,28 @@ dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. -dnl OFP_CHECK_CC_OPTION([OPTION], [ACTION-IF-ACCEPTED], [ACTION-IF-REJECTED]) +dnl OVS_CHECK_CC_OPTION([OPTION], [ACTION-IF-ACCEPTED], [ACTION-IF-REJECTED]) dnl Check whether the given C compiler OPTION is accepted. dnl If so, execute ACTION-IF-ACCEPTED, otherwise ACTION-IF-REJECTED. -AC_DEFUN([OFP_CHECK_CC_OPTION], +AC_DEFUN([OVS_CHECK_CC_OPTION], [ - m4_define([ofp_cv_name], [ofp_cv_[]m4_translit([$1], [-], [_])])dnl - AC_CACHE_CHECK([whether $CC accepts $1], [ofp_cv_name], - [ofp_save_CFLAGS="$CFLAGS" + m4_define([ovs_cv_name], [ovs_cv_[]m4_translit([$1], [-], [_])])dnl + AC_CACHE_CHECK([whether $CC accepts $1], [ovs_cv_name], + [ovs_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $1" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,)], [ofp_cv_name[]=yes], [ofp_cv_name[]=no]) - CFLAGS="$ofp_save_CFLAGS"]) - if test $ofp_cv_name = yes; then + AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,)], [ovs_cv_name[]=yes], [ovs_cv_name[]=no]) + CFLAGS="$ovs_save_CFLAGS"]) + if test $ovs_cv_name = yes; then m4_if([$2], [], [;], [$2]) else m4_if([$3], [], [:], [$3]) fi ]) -dnl OFP_ENABLE_OPTION([OPTION]) +dnl OVS_ENABLE_OPTION([OPTION]) dnl Check whether the given C compiler OPTION is accepted. dnl If so, add it to CFLAGS. -dnl Example: OFP_ENABLE_OPTION([-Wdeclaration-after-statement]) -AC_DEFUN([OFP_ENABLE_OPTION], - [OFP_CHECK_CC_OPTION([$1], [CFLAGS="$CFLAGS $1"])]) +dnl Example: OVS_ENABLE_OPTION([-Wdeclaration-after-statement]) +AC_DEFUN([OVS_ENABLE_OPTION], + [OVS_CHECK_CC_OPTION([$1], [CFLAGS="$CFLAGS $1"])]) dnl ---------------------------------------------------------------------- diff --git a/boot.sh b/boot.sh index aa15e184..4598d537 100755 --- a/boot.sh +++ b/boot.sh @@ -9,12 +9,12 @@ do (--enable-ext) have_ext=yes ;; (--disable-ext) have_ext=no ;; (--help) cat < ext.mk echo 'm4_include([ext/configure.m4])' > ext.m4 cat debian/control.in ext/debian/control.in > debian/control @@ -32,7 +32,7 @@ if test "$have_ext" = yes; then test -e debian/$d || ln -s ../ext/debian/$d debian/$d done else - echo 'Disabling openflowext...' + echo 'Disabling vswitchext...' echo '# This file intentionally left blank.' > ext.mk echo '# This file intentionally left blank.' > ext.m4 cat debian/control.in > debian/control diff --git a/configure.ac b/configure.ac index 5f382a51..67526c91 100644 --- a/configure.ac +++ b/configure.ac @@ -31,7 +31,7 @@ # derivatives without specific, written prior permission. AC_PREREQ(2.60) -AC_INIT(openflow, 0.8.9~1, info@openflowswitch.org) +AC_INIT(openvswitch, 0.90.0, ovs-bugs@openvswitch.org) NX_BUILDNR AC_CONFIG_SRCDIR([datapath/datapath.c]) AC_CONFIG_MACRO_DIR([m4]) @@ -51,35 +51,35 @@ if test "$PERL" = no; then AC_MSG_ERROR([Perl interpreter not found in $PATH or $PERL.]) fi -OFP_CHECK_LIBOPENFLOW -OFP_CHECK_IF_PACKET +OVS_CHECK_LIBOPENVSWITCH +OVS_CHECK_IF_PACKET AC_SYS_LARGEFILE AC_CHECK_FUNCS([strsignal]) AC_ARG_VAR(KARCH, [Kernel Architecture String]) AC_SUBST(KARCH) -OFP_CHECK_LINUX(l26, 2.6, KSRC26, L26_ENABLED) +OVS_CHECK_LINUX(l26, 2.6, KSRC26, L26_ENABLED) -OFP_CHECK_DPKG_BUILDPACKAGE +OVS_CHECK_DPKG_BUILDPACKAGE -OFP_ENABLE_OPTION([-Wall]) -OFP_ENABLE_OPTION([-Wno-sign-compare]) -OFP_ENABLE_OPTION([-Wpointer-arith]) -OFP_ENABLE_OPTION([-Wdeclaration-after-statement]) -OFP_ENABLE_OPTION([-Wformat-security]) -OFP_ENABLE_OPTION([-Wswitch-enum]) -OFP_ENABLE_OPTION([-Wunused-parameter]) -OFP_ENABLE_OPTION([-Wstrict-aliasing]) -OFP_ENABLE_OPTION([-Wbad-function-cast]) -OFP_ENABLE_OPTION([-Wcast-align]) -OFP_ENABLE_OPTION([-Wstrict-prototypes]) -OFP_ENABLE_OPTION([-Wold-style-definition]) -OFP_ENABLE_OPTION([-Wmissing-prototypes]) -OFP_ENABLE_OPTION([-Wmissing-field-initializers]) -OFP_ENABLE_OPTION([-Wno-override-init]) +OVS_ENABLE_OPTION([-Wall]) +OVS_ENABLE_OPTION([-Wno-sign-compare]) +OVS_ENABLE_OPTION([-Wpointer-arith]) +OVS_ENABLE_OPTION([-Wdeclaration-after-statement]) +OVS_ENABLE_OPTION([-Wformat-security]) +OVS_ENABLE_OPTION([-Wswitch-enum]) +OVS_ENABLE_OPTION([-Wunused-parameter]) +OVS_ENABLE_OPTION([-Wstrict-aliasing]) +OVS_ENABLE_OPTION([-Wbad-function-cast]) +OVS_ENABLE_OPTION([-Wcast-align]) +OVS_ENABLE_OPTION([-Wstrict-prototypes]) +OVS_ENABLE_OPTION([-Wold-style-definition]) +OVS_ENABLE_OPTION([-Wmissing-prototypes]) +OVS_ENABLE_OPTION([-Wmissing-field-initializers]) +OVS_ENABLE_OPTION([-Wno-override-init]) -OFP_ENABLE_EXT +OVS_ENABLE_EXT m4_include([ext.m4]) AC_CONFIG_FILES([Makefile diff --git a/controller/automake.mk b/controller/automake.mk index ff9f627c..80b14da7 100644 --- a/controller/automake.mk +++ b/controller/automake.mk @@ -3,6 +3,6 @@ man_MANS += controller/controller.8 DISTCLEANFILES += controller/controller.8 controller_controller_SOURCES = controller/controller.c -controller_controller_LDADD = lib/libopenflow.a $(FAULT_LIBS) $(SSL_LIBS) +controller_controller_LDADD = lib/libopenvswitch.a $(FAULT_LIBS) $(SSL_LIBS) EXTRA_DIST += controller/controller.8.in diff --git a/controller/controller.8.in b/controller/controller.8.in index 2811d14b..0e29566e 100644 --- a/controller/controller.8.in +++ b/controller/controller.8.in @@ -1,4 +1,4 @@ -.TH controller 8 "March 2009" "OpenFlow" "OpenFlow Manual" +.TH controller 8 "March 2009" "OpenVSwitch" "OpenVSwitch Manual" .ds PN controller .SH NAME @@ -95,9 +95,9 @@ packets being seen. If \fBpermanent\fR is specified, which is not recommended, flows will never expire. The default is 60 seconds. This option affects only flows set up by the OpenFlow controller. In -some configurations, the OpenFlow secure channel can set up some flows +some configurations, the switch can set up some flows on its own. To set the idle time for those flows, pass -\fB--max-idle\fR to \fBsecchan\fR(8). +\fB--max-idle\fR to \fBsecchan\fR (on the switch). This option has no effect when \fB-n\fR (or \fB--noflow\fR) is in use (because the controller does not set up flows in that case). diff --git a/controller/controller.c b/controller/controller.c index fcebf675..d67bc98b 100644 --- a/controller/controller.c +++ b/controller/controller.c @@ -98,7 +98,7 @@ main(int argc, char *argv[]) signal(SIGPIPE, SIG_IGN); if (argc - optind < 1) { - ofp_fatal(0, "at least one vconn argument required; " + ovs_fatal(0, "at least one vconn argument required; " "use --help for usage"); } @@ -111,7 +111,7 @@ main(int argc, char *argv[]) retval = vconn_open(name, OFP_VERSION, &vconn); if (!retval) { if (n_switches >= MAX_SWITCHES) { - ofp_fatal(0, "max %d switch connections", n_switches); + ovs_fatal(0, "max %d switch connections", n_switches); } new_switch(&switches[n_switches++], vconn, name); continue; @@ -120,7 +120,7 @@ main(int argc, char *argv[]) retval = pvconn_open(name, &pvconn); if (!retval) { if (n_listeners >= MAX_LISTENERS) { - ofp_fatal(0, "max %d passive connections", n_listeners); + ovs_fatal(0, "max %d passive connections", n_listeners); } listeners[n_listeners++] = pvconn; } @@ -130,7 +130,7 @@ main(int argc, char *argv[]) } } if (n_switches == 0 && n_listeners == 0) { - ofp_fatal(0, "no active or passive switch connections"); + ovs_fatal(0, "no active or passive switch connections"); } die_if_already_running(); @@ -138,7 +138,7 @@ main(int argc, char *argv[]) retval = unixctl_server_create(NULL, &unixctl); if (retval) { - ofp_fatal(retval, "Could not listen for unixctl connections"); + ovs_fatal(retval, "Could not listen for unixctl connections"); } while (n_switches > 0 || n_listeners > 0) { @@ -286,7 +286,7 @@ parse_options(int argc, char *argv[]) } else { max_idle = atoi(optarg); if (max_idle < 1 || max_idle > 65535) { - ofp_fatal(0, "--max-idle argument must be between 1 and " + ovs_fatal(0, "--max-idle argument must be between 1 and " "65535 or the word 'permanent'"); } } diff --git a/datapath/Modules.mk b/datapath/Modules.mk index 2e320c11..9853f211 100644 --- a/datapath/Modules.mk +++ b/datapath/Modules.mk @@ -1,15 +1,15 @@ -# Some modules should be built and distributed, e.g. openflow. +# Some modules should be built and distributed, e.g. openvswitch. # # Some modules should be distributed but not built, e.g. we do not build # veth if the kernel in question already has it. # # Some modules should be built but not distributed, e.g. third-party # hwtable modules. -both_modules = openflow +both_modules = openvswitch build_modules = $(both_modules) # Modules to build dist_modules = $(both_modules) # Modules to distribute -openflow_sources = \ +openvswitch_sources = \ actions.c \ datapath.c \ dp_dev.c \ @@ -18,7 +18,7 @@ openflow_sources = \ snat.c \ table.c -openflow_headers = \ +openvswitch_headers = \ actions.h \ compat.h \ datapath.h \ diff --git a/datapath/actions.c b/datapath/actions.c index cce1e5c0..9215b11c 100644 --- a/datapath/actions.c +++ b/datapath/actions.c @@ -4,7 +4,7 @@ * Stanford Junior University */ -/* Functions for executing OpenFlow actions. */ +/* Functions for executing flow actions. */ #include #include @@ -18,7 +18,7 @@ #include "datapath.h" #include "dp_dev.h" #include "actions.h" -#include "openflow/datapath-protocol.h" +#include "openvswitch/datapath-protocol.h" #include "snat.h" struct sk_buff * diff --git a/datapath/brc_procfs.c b/datapath/brc_procfs.c index 1489ef81..733e9a94 100644 --- a/datapath/brc_procfs.c +++ b/datapath/brc_procfs.c @@ -4,7 +4,7 @@ #include #include #include -#include "openflow/brcompat-netlink.h" +#include "openvswitch/brcompat-netlink.h" /* This code implements a Generic Netlink command BRC_GENL_C_SET_PROC that can * be used to add, modify, and delete arbitrary files in selected diff --git a/datapath/brc_sysfs_dp.c b/datapath/brc_sysfs_dp.c index 8743938c..38702176 100644 --- a/datapath/brc_sysfs_dp.c +++ b/datapath/brc_sysfs_dp.c @@ -1,7 +1,7 @@ #include /* - * Sysfs attributes of bridge for OpenFlow + * Sysfs attributes of bridge for OpenVSwitch * * This has been shamelessly copied from the kernel sources. */ diff --git a/datapath/brc_sysfs_if.c b/datapath/brc_sysfs_if.c index cf1412ff..9d269d16 100644 --- a/datapath/brc_sysfs_if.c +++ b/datapath/brc_sysfs_if.c @@ -2,7 +2,7 @@ #if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,18) /* - * Sysfs attributes of bridge ports for OpenFlow + * Sysfs attributes of bridge ports for OpenVSwitch * * This has been shamelessly copied from the kernel sources. */ diff --git a/datapath/brcompat.c b/datapath/brcompat.c index 3817ba84..a675d9e9 100644 --- a/datapath/brcompat.c +++ b/datapath/brcompat.c @@ -10,8 +10,7 @@ #include #include "compat.h" -#include "openflow/openflow-netlink.h" -#include "openflow/brcompat-netlink.h" +#include "openvswitch/brcompat-netlink.h" #include "brc_procfs.h" #include "brc_sysfs.h" #include "datapath.h" @@ -494,7 +493,7 @@ __init brc_init(void) int i; int err; - printk("OpenFlow Bridge Compatibility, built "__DATE__" "__TIME__"\n"); + printk("OpenVSwitch Bridge Compatibility, built "__DATE__" "__TIME__"\n"); rcu_read_lock(); for (i=0; i #include -#include "openflow/datapath-protocol.h" +#include "openvswitch/datapath-protocol.h" #include "datapath.h" #include "snat.h" #include "actions.h" @@ -1366,7 +1366,7 @@ get_port_group(struct datapath *dp, struct odp_port_group *upg) return 0; } -static long openflow_ioctl(struct file *f, unsigned int cmd, +static long openvswitch_ioctl(struct file *f, unsigned int cmd, unsigned long argp) { int dp_idx = iminor(f->f_dentry->d_inode); @@ -1511,7 +1511,7 @@ static int dp_has_packet_of_interest(struct datapath *dp, int listeners) return 0; } -ssize_t openflow_read(struct file *f, char __user *buf, size_t nbytes, +ssize_t openvswitch_read(struct file *f, char __user *buf, size_t nbytes, loff_t *ppos) { int listeners = (int) f->private_data; @@ -1566,7 +1566,7 @@ error: return retval; } -static unsigned int openflow_poll(struct file *file, poll_table *wait) +static unsigned int openvswitch_poll(struct file *file, poll_table *wait) { int dp_idx = iminor(file->f_dentry->d_inode); struct datapath *dp = get_dp(dp_idx); @@ -1583,12 +1583,12 @@ static unsigned int openflow_poll(struct file *file, poll_table *wait) return mask; } -const struct file_operations openflow_fops = { - /* XXX .aio_read = openflow_aio_read, */ - .read = openflow_read, - .poll = openflow_poll, - .unlocked_ioctl = openflow_ioctl, - /* XXX .fasync = openflow_fasync, */ +const struct file_operations openvswitch_fops = { + /* XXX .aio_read = openvswitch_aio_read, */ + .read = openvswitch_read, + .poll = openvswitch_poll, + .unlocked_ioctl = openvswitch_ioctl, + /* XXX .fasync = openvswitch_fasync, */ }; static int major; @@ -1597,7 +1597,7 @@ static int __init dp_init(void) { int err; - printk("OpenFlow %s, built "__DATE__" "__TIME__"\n", VERSION BUILDNR); + printk("OpenVSwitch %s, built "__DATE__" "__TIME__"\n", VERSION BUILDNR); err = flow_init(); if (err) @@ -1607,7 +1607,7 @@ static int __init dp_init(void) if (err) goto error_flow_exit; - major = register_chrdev(0, "openflow", &openflow_fops); + major = register_chrdev(0, "openvswitch", &openvswitch_fops); if (err < 0) goto error_unreg_notifier; @@ -1621,12 +1621,12 @@ static int __init dp_init(void) continue; rtnl_unlock(); - printk("openflow: must delete bridges " + printk("openvswitch: must delete bridges " "before loading\n"); err = -EBUSY; goto error_unreg_notifier; } - printk("openflow: hijacking bridge hook\n"); + printk("openvswitch: hijacking bridge hook\n"); } br_handle_frame_hook = dp_frame_hook; rtnl_unlock(); @@ -1643,7 +1643,7 @@ error: static void dp_cleanup(void) { - unregister_chrdev(major, "openflow"); + unregister_chrdev(major, "openvswitch"); unregister_netdevice_notifier(&dp_device_notifier); flow_exit(); br_handle_frame_hook = NULL; @@ -1652,5 +1652,5 @@ static void dp_cleanup(void) module_init(dp_init); module_exit(dp_cleanup); -MODULE_DESCRIPTION("OpenFlow switching datapath"); +MODULE_DESCRIPTION("OpenVSwitch switching datapath"); MODULE_LICENSE("GPL"); diff --git a/datapath/datapath.h b/datapath/datapath.h index 08485b28..30f6e5fc 100644 --- a/datapath/datapath.h +++ b/datapath/datapath.h @@ -1,4 +1,4 @@ -/* Interface exported by OpenFlow module. */ +/* Interface exported by openvswitch_mod. */ #ifndef DATAPATH_H #define DATAPATH_H 1 diff --git a/datapath/dp_dev.c b/datapath/dp_dev.c index d450996b..ca878cba 100644 --- a/datapath/dp_dev.c +++ b/datapath/dp_dev.c @@ -122,7 +122,7 @@ static int dp_dev_stop(struct net_device *netdev) static void dp_getinfo(struct net_device *netdev, struct ethtool_drvinfo *info) { struct dp_dev *dp_dev = dp_dev_priv(netdev); - strcpy(info->driver, "openflow"); + strcpy(info->driver, "openvswitch"); sprintf(info->bus_info, "%d", dp_dev->dp->dp_idx); } diff --git a/datapath/flow.c b/datapath/flow.c index 8a531e03..347bc7ae 100644 --- a/datapath/flow.c +++ b/datapath/flow.c @@ -64,9 +64,9 @@ static inline int icmphdr_ok(struct sk_buff *skb) #define TCP_FLAGS_OFFSET 13 #define TCP_FLAG_MASK 0x3f -static inline struct ofp_tcphdr *ofp_tcp_hdr(const struct sk_buff *skb) +static inline struct ovs_tcphdr *ovs_tcp_hdr(const struct sk_buff *skb) { - return (struct ofp_tcphdr *)skb_transport_header(skb); + return (struct ovs_tcphdr *)skb_transport_header(skb); } void flow_used(struct sw_flow *flow, struct sk_buff *skb) diff --git a/datapath/flow.h b/datapath/flow.h index 5d3fd260..55efede1 100644 --- a/datapath/flow.h +++ b/datapath/flow.h @@ -7,7 +7,7 @@ #include #include -#include "openflow/datapath-protocol.h" +#include "openvswitch/datapath-protocol.h" struct sk_buff; diff --git a/datapath/linux-2.6/.gitignore b/datapath/linux-2.6/.gitignore index 486ba1d1..1f540d5d 100644 --- a/datapath/linux-2.6/.gitignore +++ b/datapath/linux-2.6/.gitignore @@ -10,7 +10,7 @@ /dp_notify.c /flow.c /genetlink-brcompat.c -/genetlink-openflow.c +/genetlink-openvswitch.c /kcompat.h /linux-2.6 /modules.order diff --git a/datapath/linux-2.6/Modules.mk b/datapath/linux-2.6/Modules.mk index c8af7580..bbc4c72f 100644 --- a/datapath/linux-2.6/Modules.mk +++ b/datapath/linux-2.6/Modules.mk @@ -1,7 +1,7 @@ -openflow_sources += \ - linux-2.6/compat-2.6/genetlink-openflow.c \ +openvswitch_sources += \ + linux-2.6/compat-2.6/genetlink-openvswitch.c \ linux-2.6/compat-2.6/random32.c -openflow_headers += \ +openvswitch_headers += \ linux-2.6/compat-2.6/compat26.h \ linux-2.6/compat-2.6/include/asm-generic/bug.h \ linux-2.6/compat-2.6/include/linux/dmi.h \ diff --git a/datapath/linux-2.6/compat-2.6/genetlink-brcompat.c b/datapath/linux-2.6/compat-2.6/genetlink-brcompat.c index f30996ce..c43b3ce4 100644 --- a/datapath/linux-2.6/compat-2.6/genetlink-brcompat.c +++ b/datapath/linux-2.6/compat-2.6/genetlink-brcompat.c @@ -4,10 +4,10 @@ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) /* We fix grp->id to 32 so that it doesn't collide with any of the multicast - * groups selected by openflow_mod, which uses groups 16 through 31. Collision - * isn't fatal--multicast listeners should check that the family is the one - * that they want and discard others--but it wastes time and memory to receive - * unwanted messages. */ + * groups selected by openvswitch_mod, which uses groups 16 through 31. + * Collision isn't fatal--multicast listeners should check that the family is + * the one that they want and discard others--but it wastes time and memory to + * receive unwanted messages. */ int genl_register_mc_group(struct genl_family *family, struct genl_multicast_group *grp) { diff --git a/datapath/linux-2.6/compat-2.6/genetlink-openflow.c b/datapath/linux-2.6/compat-2.6/genetlink-openvswitch.c similarity index 100% rename from datapath/linux-2.6/compat-2.6/genetlink-openflow.c rename to datapath/linux-2.6/compat-2.6/genetlink-openvswitch.c diff --git a/datapath/snat.c b/datapath/snat.c index 17da5173..48a01de3 100644 --- a/datapath/snat.c +++ b/datapath/snat.c @@ -260,7 +260,7 @@ snat_pre_route_finish(struct sk_buff *skb) } spin_unlock_irqrestore(&p->lock, flags); - /* Pass the translated packet as input to the OpenFlow stack, which + /* Pass the translated packet as input to the openvswitch stack, which * consumes it. */ skb_push(skb, ETH_HLEN); skb_reset_mac_header(skb); diff --git a/debian/.gitignore b/debian/.gitignore index 4d6f69f9..ece9bd0c 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -5,33 +5,33 @@ /corekeeper /files /nicira-switch -/openflow -/openflow-common -/openflow-common.copyright -/openflow-controller -/openflow-datapath-source -/openflow-dbg -/openflow-monitor -/openflow-monitor.copyright -/openflow-monitor.default -/openflow-monitor.dirs -/openflow-monitor.init -/openflow-monitor.install -/openflow-pki -/openflow-pki-server -/openflow-switch -/openflow-switch-config -/openflow-switch.copyright -/openflow-switchui -/openflow-switchui.copyright -/openflow-switchui.default -/openflow-switchui.dirs -/openflow-switchui.init -/openflow-switchui.install -/openflow-wdt -/openflow-wdt.copyright -/openflow-wdt.default -/openflow-wdt.dirs -/openflow-wdt.init -/openflow-wdt.install +/openvswitch +/openvswitch-common +/openvswitch-common.copyright +/openvswitch-controller +/openvswitch-datapath-source +/openvswitch-dbg +/openvswitch-monitor +/openvswitch-monitor.copyright +/openvswitch-monitor.default +/openvswitch-monitor.dirs +/openvswitch-monitor.init +/openvswitch-monitor.install +/openvswitch-pki +/openvswitch-pki-server +/openvswitch-switch +/openvswitch-switch-config +/openvswitch-switch.copyright +/openvswitch-switchui +/openvswitch-switchui.copyright +/openvswitch-switchui.default +/openvswitch-switchui.dirs +/openvswitch-switchui.init +/openvswitch-switchui.install +/openvswitch-wdt +/openvswitch-wdt.copyright +/openvswitch-wdt.default +/openvswitch-wdt.dirs +/openvswitch-wdt.init +/openvswitch-wdt.install /rules.ext diff --git a/debian/automake.mk b/debian/automake.mk index fda8a7aa..ef0b0cb6 100644 --- a/debian/automake.mk +++ b/debian/automake.mk @@ -9,42 +9,42 @@ EXTRA_DIST += \ debian/corekeeper.cron.daily \ debian/corekeeper.init \ debian/dirs \ - debian/ofp-switch-setup \ - debian/ofp-switch-setup.8 \ - debian/openflow-common.dirs \ - debian/openflow-common.install \ - debian/openflow-common.manpages \ - debian/openflow-controller.README.Debian \ - debian/openflow-controller.default \ - debian/openflow-controller.dirs \ - debian/openflow-controller.init \ - debian/openflow-controller.install \ - debian/openflow-controller.manpages \ - debian/openflow-controller.postinst \ - debian/openflow-datapath-module-_KVERS_.postinst.modules.in \ - debian/openflow-datapath-source.README.Debian \ - debian/openflow-datapath-source.copyright \ - debian/openflow-datapath-source.dirs \ - debian/openflow-datapath-source.install \ - debian/openflow-pki-server.apache2 \ - debian/openflow-pki-server.dirs \ - debian/openflow-pki-server.install \ - debian/openflow-pki-server.postinst \ - debian/openflow-pki.postinst \ - debian/openflow-switch-config.dirs \ - debian/openflow-switch-config.install \ - debian/openflow-switch-config.manpages \ - debian/openflow-switch-config.overrides \ - debian/openflow-switch-config.templates \ - debian/openflow-switch.README.Debian \ - debian/openflow-switch.dirs \ - debian/openflow-switch.init \ - debian/openflow-switch.install \ - debian/openflow-switch.logrotate \ - debian/openflow-switch.manpages \ - debian/openflow-switch.postinst \ - debian/openflow-switch.postrm \ - debian/openflow-switch.template \ + debian/ovs-switch-setup \ + debian/ovs-switch-setup.8 \ + debian/openvswitch-common.dirs \ + debian/openvswitch-common.install \ + debian/openvswitch-common.manpages \ + debian/openvswitch-controller.README.Debian \ + debian/openvswitch-controller.default \ + debian/openvswitch-controller.dirs \ + debian/openvswitch-controller.init \ + debian/openvswitch-controller.install \ + debian/openvswitch-controller.manpages \ + debian/openvswitch-controller.postinst \ + debian/openvswitch-datapath-module-_KVERS_.postinst.modules.in \ + debian/openvswitch-datapath-source.README.Debian \ + debian/openvswitch-datapath-source.copyright \ + debian/openvswitch-datapath-source.dirs \ + debian/openvswitch-datapath-source.install \ + debian/openvswitch-pki-server.apache2 \ + debian/openvswitch-pki-server.dirs \ + debian/openvswitch-pki-server.install \ + debian/openvswitch-pki-server.postinst \ + debian/openvswitch-pki.postinst \ + debian/openvswitch-switch-config.dirs \ + debian/openvswitch-switch-config.install \ + debian/openvswitch-switch-config.manpages \ + debian/openvswitch-switch-config.overrides \ + debian/openvswitch-switch-config.templates \ + debian/openvswitch-switch.README.Debian \ + debian/openvswitch-switch.dirs \ + debian/openvswitch-switch.init \ + debian/openvswitch-switch.install \ + debian/openvswitch-switch.logrotate \ + debian/openvswitch-switch.manpages \ + debian/openvswitch-switch.postinst \ + debian/openvswitch-switch.postrm \ + debian/openvswitch-switch.template \ debian/po/POTFILES.in \ debian/po/templates.pot \ debian/rules diff --git a/debian/changelog b/debian/changelog index ad26b6cd..e988e1fe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ -openflow (0.8.1) unstable; urgency=low +openvswitch (0.90.0) unstable; urgency=low * Development version. - -- OpenFlow team Mon, 19 Nov 2007 14:57:52 -0800 + -- OpenVSwitch developers Mon, 19 Nov 2007 14:57:52 -0800 diff --git a/debian/commands/reconfigure b/debian/commands/reconfigure index a9610524..dc493a18 100755 --- a/debian/commands/reconfigure +++ b/debian/commands/reconfigure @@ -4,7 +4,7 @@ use POSIX; use strict; use warnings; -my $default = '/etc/default/openflow-switch'; +my $default = '/etc/default/openvswitch-switch'; my (%config) = load_config($default); if (@ARGV) { diff --git a/debian/control.in b/debian/control.in index c5da704c..a2750a6d 100644 --- a/debian/control.in +++ b/debian/control.in @@ -1,80 +1,87 @@ -Source: openflow +Source: openvswitch Section: net Priority: extra -Maintainer: OpenFlow Team +Maintainer: OpenVSwitch developers Build-Depends: debhelper (>= 5), autoconf (>= 2.60), automake1.10, libssl-dev, pkg-config (>= 0.21), po-debconf, bzip2, openssl, libncurses5-dev, libpcre3-dev Standards-Version: 3.7.3 -Package: openflow-datapath-source +Package: openvswitch-datapath-source Architecture: all Depends: module-assistant, bzip2, debhelper (>= 5.0.37) -Suggests: openflow-switch -Description: Source code for OpenFlow datapath Linux module - This package provides the OpenFlow datapath module source code that - is needed by the kernel-based OpenFlow switch. The kernel module can - be built from it using module-assistant or make-kpkg. README.Debian - in this package provides further instructions. +Suggests: openvswitch-switch +Description: Source code for OpenVSwitch datapath Linux module + This package provides the OpenVSwitch datapath module source code + that is needed by openvswitch-switch. The kernel module can be built + from it using module-assistant or make-kpkg. README.Debian in this + package provides further instructions. . - OpenFlow is a protocol for flow-based control over network switching. + OpenVSwitch is a software-based Ethernet switch targeted at virtual + servers. -Package: openflow-common +Package: openvswitch-common Architecture: any Depends: ${shlibs:Depends}, openssl -Description: OpenFlow common components - openflow-common provides components required by both openflow-switch - and openflow-controller. +Description: OpenVSwitch common components + openvswitch-common provides components required by both openvswitch-switch + and openvswitch-controller. . - OpenFlow is a protocol for flow-based control over network switching. + OpenVSwitch is a software-based Ethernet switch targeted at virtual + servers. -Package: openflow-switch +Package: openvswitch-switch Architecture: any -Suggests: openflow-datapath-module -Depends: ${shlibs:Depends}, ${misc:Depends}, openflow-common, dhcp3-client, module-init-tools, dmidecode, procps, debianutils -Description: OpenFlow switch implementations - openflow-switch provides the userspace components and utilities for - the OpenFlow kernel-based switch. +Suggests: openvswitch-datapath-module +Depends: ${shlibs:Depends}, ${misc:Depends}, openvswitch-common, dhcp3-client, module-init-tools, dmidecode, procps, debianutils +Description: OpenVSwitch switch implementations + openvswitch-switch provides the userspace components and utilities for + the Openvswitch kernel-based switch. . - OpenFlow is a protocol for flow-based control over network switching. + OpenVSwitch is a software-based Ethernet switch targeted at virtual + servers. -Package: openflow-switch-config +Package: openvswitch-switch-config Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, openflow-switch, libwww-perl, libdigest-sha1-perl -Description: OpenFlow switch implementations - openflow-switch-config provides a utility for interactively configuring - the OpenFlow switch provided in the openflow-switch package. +Depends: ${shlibs:Depends}, ${misc:Depends}, openvswitch-switch, libwww-perl, libdigest-sha1-perl +Description: OpenVSwitch switch implementations + openvswitch-switch-config provides a utility for interactively configuring + the OpenVSwitch switch provided in the openvswitch-switch package. . - OpenFlow is a protocol for flow-based control over network switching. + OpenVSwitch is a software-based Ethernet switch targeted at virtual + servers. -Package: openflow-pki +Package: openvswitch-pki Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, openflow-common -Description: OpenFlow public key infrastructure - openflow-pki provides PKI (public key infrastructure) support for - OpenFlow switches and controllers, reducing the risk of - man-in-the-middle attacks on the OpenFlow network infrastructure. +Depends: ${shlibs:Depends}, ${misc:Depends}, openvswitch-common +Description: OpenVSwitch public key infrastructure + openvswitch-pki provides PKI (public key infrastructure) support for + OpenVSwitch switches and controllers, reducing the risk of + man-in-the-middle attacks on the Openvswitch network infrastructure. . - OpenFlow is a protocol for flow-based control over network switching. + OpenVSwitch is a software-based Ethernet switch targeted at virtual + servers. -Package: openflow-pki-server +Package: openvswitch-pki-server Architecture: all -Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, openflow-pki, apache2 -Description: OpenFlow public key infrastructure (HTTP server support) - openflow-pki-server provides HTTP access to the OpenFlow PKI (public +Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, openvswitch-pki, apache2 +Description: OpenVSwitch public key infrastructure (HTTP server support) + openvswitch-pki-server provides HTTP access to the OpenVSwitch PKI (public key infrastructure) maintained on the local machine by the - openflow-pki package. This HTTP access is needed for secure and - convenient OpenFlow switch setup using the ofp-switch-setup program - in the openflow-switch package. + openvswitch-pki package. This HTTP access is needed for secure and + convenient OpenFlow switch setup using the ovs-switch-setup program + in the openvswitch-switch package. . - OpenFlow is a protocol for flow-based control over network switching. + OpenVSwitch is a software-based Ethernet switch targeted at virtual + servers. -Package: openflow-controller +Package: openvswitch-controller Architecture: any -Depends: ${shlibs:Depends}, openflow-common, openflow-pki -Description: OpenFlow controller implementation - The OpenFlow controller enables OpenFlow switches that connect to it +Depends: ${shlibs:Depends}, openvswitch-common, openvswitch-pki +Description: OpenVSwitch controller implementation + The OpenVSwitch controller enables OpenFlow switches that connect to it to act as MAC-learning Ethernet switches. . - OpenFlow is a protocol for flow-based control over network switching. + OpenVSwitch is a software-based Ethernet switch targeted at virtual + servers. Package: corekeeper Architecture: all @@ -83,11 +90,11 @@ Description: Core file centralizer and reaper The corekeeper package configures the system to dump all core files to /var/log/core. It also deletes core files older than 7 days. -Package: openflow-dbg +Package: openvswitch-dbg Architecture: any Depends: ${shlibs:Depends} -Description: Debug symbols for OpenFlow packages - This package contains the debug symbols for all the other openflow-* +Description: Debug symbols for OpenVSwitch packages + This package contains the debug symbols for all the other openvswitch-* packages. Install it to debug one of them or to examine a core dump produced by one of them. diff --git a/debian/control.modules.in b/debian/control.modules.in index cc149cac..cc163299 100644 --- a/debian/control.modules.in +++ b/debian/control.modules.in @@ -1,19 +1,20 @@ -Source: openflow +Source: openvswitch Section: net Priority: extra -Maintainer: OpenFlow Team +Maintainer: OpenVSwitch developers Build-Depends: debhelper (>= 5.0.37) Standards-Version: 3.7.3 -Package: openflow-datapath-module-_KVERS_ +Package: openvswitch-datapath-module-_KVERS_ Architecture: any -Recommends: kernel-image-_KVERS_, openflow-switch -Provides: openflow-datapath-module -Description: OpenFlow Linux datapath kernel module - This package contains the OpenFlow loadable datapath kernel modules for +Recommends: kernel-image-_KVERS_, openvswitch-switch +Provides: openvswitch-datapath-module +Description: OpenVSwitch Linux datapath kernel module + This package contains the OpenVSwitch loadable datapath kernel modules for the kernel-image-_KVERS_ package. . If you compiled a custom kernel, you will most likely need to compile - a custom version of this module as well. The openflow-datapath-source - package has been provided for this purpose. Refer to README.Debian - provided in that package for further instructions. + a custom version of this module as well. The + openvswitch-datapath-source package has been provided for this + purpose. Refer to README.Debian provided in that package for further + instructions. diff --git a/debian/ofp-switch-setup.8 b/debian/ofp-switch-setup.8 deleted file mode 100644 index 50904cfb..00000000 --- a/debian/ofp-switch-setup.8 +++ /dev/null @@ -1,41 +0,0 @@ -.TH ofp-switch-setup 8 "June 2008" "OpenFlow" "OpenFlow Manual" - -.SH NAME -ofp\-switch\-setup \- interactive setup for OpenFlow switch - -.SH SYNOPSIS -.B ofp\-switch\-setup - -.SH DESCRIPTION -The \fBofp\-switch\-setup\fR program is an interactive program that -assists the system administrator in configuring an OpenFlow switch, -including the underlying public key infrastructure (PKI). - -.SH OPTIONS -ofp\-switch\-setup does not accept any command-line options. - -.SH FILES -.IP /etc/default/openflow-switch -Main configuration file for OpenFlow switch. - -.IP /etc/openflow-switch/cacert.pem -Default location of CA certificate for OpenFlow controllers. - -.IP /etc/openflow-switch/of0-cert.pem -Default location of certificate for the OpenFlow switch's private key. - -.IP /etc/openflow-switch/of0-privkey.pem -Default location of the OpenFlow switch's private key. This file -should be readable only by \fBroot\fR. - -.IP /etc/openflow-switch/of0-req.pem -Default location of certificate request for the OpenFlow switch's -certificate. This file is not used after the signed certificate -(typically \fB/etc/openflow-switch/of0-cert.pem\fR, above) has been -obtained from the OpenFlow PKI server. - -.SH "SEE ALSO" - -.BR ofp-pki (8), -.BR dpctl (8), -.BR secchan (8) diff --git a/debian/openflow-common.dirs b/debian/openflow-common.dirs deleted file mode 100644 index 527fe313..00000000 --- a/debian/openflow-common.dirs +++ /dev/null @@ -1 +0,0 @@ -var/log/openflow diff --git a/debian/openflow-common.install b/debian/openflow-common.install deleted file mode 100644 index eed7413e..00000000 --- a/debian/openflow-common.install +++ /dev/null @@ -1,3 +0,0 @@ -_debian/utilities/ofp-parse-leaks usr/bin -_debian/utilities/ofp-pki usr/sbin -_debian/utilities/vlogconf usr/sbin diff --git a/debian/openflow-controller.README.Debian b/debian/openflow-controller.README.Debian deleted file mode 100644 index 19d5cb9b..00000000 --- a/debian/openflow-controller.README.Debian +++ /dev/null @@ -1,10 +0,0 @@ -README.Debian for openflow-controller -------------------------------------- - -* To (re)configure the controller, edit /etc/default/openflow-controller - and run "/etc/init.d/openflow-controller restart". - -* To enable OpenFlow switches to automatically discover the location - of the controller, you must install and configure a DHCP server. - The secchan(8) manpage (found in the openflow-switch package) gives - a working example configuration file for the ISC DHCP server. diff --git a/debian/openflow-controller.dirs b/debian/openflow-controller.dirs deleted file mode 100644 index 0a19a9fc..00000000 --- a/debian/openflow-controller.dirs +++ /dev/null @@ -1 +0,0 @@ -etc/openflow-controller diff --git a/debian/openflow-datapath-source.dirs b/debian/openflow-datapath-source.dirs deleted file mode 100644 index 4ddf234a..00000000 --- a/debian/openflow-datapath-source.dirs +++ /dev/null @@ -1 +0,0 @@ -usr/src/modules/openflow-datapath/debian diff --git a/debian/openflow-datapath-source.install b/debian/openflow-datapath-source.install deleted file mode 100644 index a74f13dc..00000000 --- a/debian/openflow-datapath-source.install +++ /dev/null @@ -1,6 +0,0 @@ -debian/changelog usr/src/modules/openflow-datapath/debian -debian/control usr/src/modules/openflow-datapath/debian -debian/compat usr/src/modules/openflow-datapath/debian -debian/*.modules.in usr/src/modules/openflow-datapath/debian -debian/rules usr/src/modules/openflow-datapath/debian -_debian/openflow.tar.gz usr/src/modules/openflow-datapath diff --git a/debian/openflow-pki-server.apache2 b/debian/openflow-pki-server.apache2 deleted file mode 100644 index a341c508..00000000 --- a/debian/openflow-pki-server.apache2 +++ /dev/null @@ -1 +0,0 @@ -Alias /openflow/pki/ /usr/share/openflow/pki/ diff --git a/debian/openflow-pki-server.install b/debian/openflow-pki-server.install deleted file mode 100644 index cd530ca4..00000000 --- a/debian/openflow-pki-server.install +++ /dev/null @@ -1 +0,0 @@ -_debian/utilities/ofp-pki-cgi usr/lib/cgi-bin diff --git a/debian/openflow-switch-config.install b/debian/openflow-switch-config.install deleted file mode 100644 index 75c50083..00000000 --- a/debian/openflow-switch-config.install +++ /dev/null @@ -1 +0,0 @@ -debian/ofp-switch-setup usr/sbin diff --git a/debian/openflow-switch-config.manpages b/debian/openflow-switch-config.manpages deleted file mode 100644 index e176dad9..00000000 --- a/debian/openflow-switch-config.manpages +++ /dev/null @@ -1 +0,0 @@ -debian/ofp-switch-setup.8 diff --git a/debian/openflow-switch.README.Debian b/debian/openflow-switch.README.Debian deleted file mode 100644 index d9a931c1..00000000 --- a/debian/openflow-switch.README.Debian +++ /dev/null @@ -1,18 +0,0 @@ -README.Debian for openflow-switch ---------------------------------- - -* The switch must be configured before it can be used. To configure - it interactively, install the openflow-switch-config package and run - the ofp-switch-setup program. Alternatively, edit - /etc/default/openflow-switch by hand, then start the switch manually - with "/etc/init.d/openflow-switch start". - -* To use the Linux kernel-based switch implementation, you will need - to build and install the OpenFlow kernel module. To do so, install - the openflow-datapath-source package, then follow the instructions - given in /usr/share/doc/openflow-datapath-source/README.Debian - -* This package does not yet support the userspace datapath-based - switch implementation. - - -- Ben Pfaff , Tue, 6 Jan 2009 13:52:33 -0800 diff --git a/debian/openflow-switch.dirs b/debian/openflow-switch.dirs deleted file mode 100644 index a53002ff..00000000 --- a/debian/openflow-switch.dirs +++ /dev/null @@ -1,2 +0,0 @@ -/etc/openflow-switch -/usr/share/openflow/switch diff --git a/debian/openflow-switch.install b/debian/openflow-switch.install deleted file mode 100644 index e3254fc8..00000000 --- a/debian/openflow-switch.install +++ /dev/null @@ -1,6 +0,0 @@ -_debian/secchan/secchan usr/sbin -_debian/utilities/dpctl usr/sbin -_debian/utilities/ofp-discover usr/sbin -_debian/utilities/ofp-kill usr/sbin -debian/openflow/usr/share/openflow/commands/* usr/share/openflow/commands -debian/commands/* usr/share/openflow/commands diff --git a/debian/openflow-switch.manpages b/debian/openflow-switch.manpages deleted file mode 100644 index 51bcc1d6..00000000 --- a/debian/openflow-switch.manpages +++ /dev/null @@ -1,4 +0,0 @@ -_debian/secchan/secchan.8 -_debian/utilities/ofp-discover.8 -_debian/utilities/ofp-kill.8 -_debian/utilities/dpctl.8 diff --git a/debian/openvswitch-common.dirs b/debian/openvswitch-common.dirs new file mode 100644 index 00000000..be9ed2f0 --- /dev/null +++ b/debian/openvswitch-common.dirs @@ -0,0 +1 @@ +var/log/openvswitch diff --git a/debian/openvswitch-common.install b/debian/openvswitch-common.install new file mode 100644 index 00000000..6dd50e37 --- /dev/null +++ b/debian/openvswitch-common.install @@ -0,0 +1,3 @@ +_debian/utilities/ovs-parse-leaks usr/bin +_debian/utilities/ovs-pki usr/sbin +_debian/utilities/vlogconf usr/sbin diff --git a/debian/openflow-common.manpages b/debian/openvswitch-common.manpages similarity index 50% rename from debian/openflow-common.manpages rename to debian/openvswitch-common.manpages index fbb88201..4994a1e3 100644 --- a/debian/openflow-common.manpages +++ b/debian/openvswitch-common.manpages @@ -1,2 +1,2 @@ _debian/utilities/vlogconf.8 -_debian/utilities/ofp-pki.8 +_debian/utilities/ovs-pki.8 diff --git a/debian/openvswitch-controller.README.Debian b/debian/openvswitch-controller.README.Debian new file mode 100644 index 00000000..18819a79 --- /dev/null +++ b/debian/openvswitch-controller.README.Debian @@ -0,0 +1,12 @@ +README.Debian for openvswitch-controller +------------------------------------- + +* To (re)configure the controller, edit /etc/default/openvswitch-controller + and run "/etc/init.d/openvswitch-controller restart". + +* To enable OpenFlow switches to automatically discover the location + of the controller, you must install and configure a DHCP server. + The secchan(8) manpage (found in the openvswitch-switch package) gives + a working example configuration file for the ISC DHCP server. + + -- Ben Pfaff , Mon, 11 May 2009 13:26:38 -0700 diff --git a/debian/openflow-controller.default b/debian/openvswitch-controller.default similarity index 86% rename from debian/openflow-controller.default rename to debian/openvswitch-controller.default index 647ebb04..1d9f9261 100644 --- a/debian/openflow-controller.default +++ b/debian/openvswitch-controller.default @@ -15,15 +15,15 @@ LISTEN="pssl:" # PRIVKEY: Name of file containing controller's private key. # Required if SSL enabled. -PRIVKEY=/etc/openflow-controller/privkey.pem +PRIVKEY=/etc/openvswitch-controller/privkey.pem # CERT: Name of file containing certificate for private key. # Required if SSL enabled. -CERT=/etc/openflow-controller/cert.pem +CERT=/etc/openvswitch-controller/cert.pem # CACERT: Name of file containing switch CA certificate. # Required if SSL enabled. -CACERT=/etc/openflow-controller/cacert.pem +CACERT=/etc/openvswitch-controller/cacert.pem # Additional options to pass to controller, e.g. "--hub" DAEMON_OPTS="" diff --git a/debian/openvswitch-controller.dirs b/debian/openvswitch-controller.dirs new file mode 100644 index 00000000..4ada77c6 --- /dev/null +++ b/debian/openvswitch-controller.dirs @@ -0,0 +1 @@ +etc/openvswitch-controller diff --git a/debian/openflow-controller.init b/debian/openvswitch-controller.init similarity index 94% rename from debian/openflow-controller.init rename to debian/openvswitch-controller.init index 121fd76b..c4716a92 100755 --- a/debian/openflow-controller.init +++ b/debian/openvswitch-controller.init @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2007 Javier Fernandez-Sanguino +# Copyright (c) 2007, 2009 Javier Fernandez-Sanguino # # This is free software; you may redistribute it and/or modify # it under the terms of the GNU General Public License as @@ -18,14 +18,14 @@ # Suite 330, Boston, MA 02111-1307 USA # ### BEGIN INIT INFO -# Provides: openflow-controller +# Provides: openvswitch-controller # Required-Start: $network $local_fs # Required-Stop: # Should-Start: $named # Should-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 -# Short-Description: OpenFlow controller +# Short-Description: OpenVSwitch controller ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin @@ -33,7 +33,7 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/controller # Introduce the server's location here NAME=controller # Introduce the short server's name here DESC=controller # Introduce a short description here -LOGDIR=/var/log/openflow # Log directory to use +LOGDIR=/var/log/openvswitch # Log directory to use PIDFILE=/var/run/$NAME.pid @@ -55,7 +55,7 @@ LOGFILE=$LOGDIR/$NAME.log # Server logfile # is set start-stop-daemon will chuid the server # Include defaults if available -default=/etc/default/openflow-controller +default=/etc/default/openvswitch-controller if [ -f $default ] ; then . $default fi @@ -108,9 +108,9 @@ start_server() { SSL_OPTS= case $LISTEN in *ssl*) - : ${PRIVKEY:=/etc/openflow-controller/privkey.pem} - : ${CERT:=/etc/openflow-controller/cert.pem} - : ${CACERT:=/etc/openflow-controller/cacert.pem} + : ${PRIVKEY:=/etc/openvswitch-controller/privkey.pem} + : ${CERT:=/etc/openvswitch-controller/cert.pem} + : ${CACERT:=/etc/openvswitch-controller/cacert.pem} if test ! -e "$PRIVKEY" || test ! -e "$CERT" || test ! -e "$CACERT"; then if test ! -e "$PRIVKEY"; then diff --git a/debian/openflow-controller.install b/debian/openvswitch-controller.install similarity index 100% rename from debian/openflow-controller.install rename to debian/openvswitch-controller.install diff --git a/debian/openflow-controller.manpages b/debian/openvswitch-controller.manpages similarity index 100% rename from debian/openflow-controller.manpages rename to debian/openvswitch-controller.manpages diff --git a/debian/openflow-controller.postinst b/debian/openvswitch-controller.postinst similarity index 84% rename from debian/openflow-controller.postinst rename to debian/openvswitch-controller.postinst index 93e39116..51acfb1a 100755 --- a/debian/openflow-controller.postinst +++ b/debian/openvswitch-controller.postinst @@ -1,5 +1,5 @@ #!/bin/sh -# postinst script for openflow-controller +# postinst script for openvswitch-controller # # see: dh_installdeb(1) @@ -20,14 +20,14 @@ set -e case "$1" in configure) - cd /etc/openflow-controller + cd /etc/openvswitch-controller if ! test -e cacert.pem; then - ln -s /usr/share/openflow/pki/switchca/cacert.pem cacert.pem + ln -s /usr/share/openvswitch/pki/switchca/cacert.pem cacert.pem fi if ! test -e privkey.pem || ! test -e cert.pem; then oldumask=$(umask) umask 077 - ofp-pki req+sign tmp controller >/dev/null + ovs-pki req+sign tmp controller >/dev/null mv tmp-privkey.pem privkey.pem mv tmp-cert.pem cert.pem mv tmp-req.pem req.pem diff --git a/debian/openflow-datapath-module-_KVERS_.postinst.modules.in b/debian/openvswitch-datapath-module-_KVERS_.postinst.modules.in similarity index 92% rename from debian/openflow-datapath-module-_KVERS_.postinst.modules.in rename to debian/openvswitch-datapath-module-_KVERS_.postinst.modules.in index 6974e13a..02683008 100755 --- a/debian/openflow-datapath-module-_KVERS_.postinst.modules.in +++ b/debian/openvswitch-datapath-module-_KVERS_.postinst.modules.in @@ -15,7 +15,7 @@ depmod -a # # (Ideally we'd only want to do this if this package corresponds to the # running kernel, but I don't know a reliable way to check.) -INIT=/etc/init.d/openflow-switch +INIT=/etc/init.d/openvswitch-switch if test -x $INIT && $INIT status; then $INIT restart || true fi diff --git a/debian/openflow-datapath-source.README.Debian b/debian/openvswitch-datapath-source.README.Debian similarity index 57% rename from debian/openflow-datapath-source.README.Debian rename to debian/openvswitch-datapath-source.README.Debian index 59965df9..171aa9bd 100644 --- a/debian/openflow-datapath-source.README.Debian +++ b/debian/openvswitch-datapath-source.README.Debian @@ -1,13 +1,13 @@ -OpenFlow for Debian -------------------- +OpenVSwitch for Debian +---------------------- * How do I build this module the Debian way? - Building with module-assistant: - $ module-assistant auto-install openflow + $ module-assistant auto-install openvswitch or - $ m-a a-i openflow + $ m-a a-i openvswitch If kernel source or headers are in a non-standard directory, add the option -k /path/to/kernel/source with the correct path. @@ -15,17 +15,17 @@ OpenFlow for Debian - Building with make-kpkg $ cd /usr/src/ - $ tar jxvf openflow.tar.bz2 + $ tar jxvf openvswitch.tar.bz2 $ cd /usr/src/kernel-source-2.6.9 - $ make-kpkg --added-modules=openflow modules + $ make-kpkg --added-modules=openvswitch modules - Building without make-kpkg $ cd /usr/src/ - $ tar jxvf openflow.tar.bz2 - $ cd modules/openflow + $ tar jxvf openvswitch.tar.bz2 + $ cd modules/openvswitch $ fakeroot debian/rules kdist_image If you run this as root, fakeroot is not needed. - -- OpenFlow Team , Thu, 12 Jun 2008 16:42:38 -0700 + -- Ben Pfaff , Mon, 11 May 2009 13:27:50 -0700 diff --git a/debian/openflow-datapath-source.copyright b/debian/openvswitch-datapath-source.copyright similarity index 100% rename from debian/openflow-datapath-source.copyright rename to debian/openvswitch-datapath-source.copyright diff --git a/debian/openvswitch-datapath-source.dirs b/debian/openvswitch-datapath-source.dirs new file mode 100644 index 00000000..e5a7d6b0 --- /dev/null +++ b/debian/openvswitch-datapath-source.dirs @@ -0,0 +1 @@ +usr/src/modules/openvswitch-datapath/debian diff --git a/debian/openvswitch-datapath-source.install b/debian/openvswitch-datapath-source.install new file mode 100644 index 00000000..d1acc894 --- /dev/null +++ b/debian/openvswitch-datapath-source.install @@ -0,0 +1,6 @@ +debian/changelog usr/src/modules/openvswitch-datapath/debian +debian/control usr/src/modules/openvswitch-datapath/debian +debian/compat usr/src/modules/openvswitch-datapath/debian +debian/*.modules.in usr/src/modules/openvswitch-datapath/debian +debian/rules usr/src/modules/openvswitch-datapath/debian +_debian/openvswitch.tar.gz usr/src/modules/openvswitch-datapath diff --git a/debian/openvswitch-pki-server.apache2 b/debian/openvswitch-pki-server.apache2 new file mode 100644 index 00000000..d0bc8ba9 --- /dev/null +++ b/debian/openvswitch-pki-server.apache2 @@ -0,0 +1 @@ +Alias /openvswitch/pki/ /usr/share/openvswitch/pki/ diff --git a/debian/openflow-pki-server.dirs b/debian/openvswitch-pki-server.dirs similarity index 100% rename from debian/openflow-pki-server.dirs rename to debian/openvswitch-pki-server.dirs diff --git a/debian/openvswitch-pki-server.install b/debian/openvswitch-pki-server.install new file mode 100644 index 00000000..5af75da0 --- /dev/null +++ b/debian/openvswitch-pki-server.install @@ -0,0 +1 @@ +_debian/utilities/ovs-pki-cgi usr/lib/cgi-bin diff --git a/debian/openflow-pki-server.postinst b/debian/openvswitch-pki-server.postinst similarity index 100% rename from debian/openflow-pki-server.postinst rename to debian/openvswitch-pki-server.postinst diff --git a/debian/openflow-pki.postinst b/debian/openvswitch-pki.postinst similarity index 88% rename from debian/openflow-pki.postinst rename to debian/openvswitch-pki.postinst index 5cf6515d..a75a314f 100755 --- a/debian/openflow-pki.postinst +++ b/debian/openvswitch-pki.postinst @@ -1,5 +1,5 @@ #!/bin/sh -# postinst script for openflow +# postinst script for openvswitch # # see: dh_installdeb(1) @@ -20,8 +20,8 @@ set -e case "$1" in configure) # Create certificate authorities. - if test ! -d /usr/share/openflow/pki; then - ofp-pki init + if test ! -d /usr/share/openvswitch/pki; then + ovs-pki init fi ;; diff --git a/debian/openflow-switch-config.dirs b/debian/openvswitch-switch-config.dirs similarity index 100% rename from debian/openflow-switch-config.dirs rename to debian/openvswitch-switch-config.dirs diff --git a/debian/openvswitch-switch-config.install b/debian/openvswitch-switch-config.install new file mode 100644 index 00000000..c8cbf17f --- /dev/null +++ b/debian/openvswitch-switch-config.install @@ -0,0 +1 @@ +debian/ovs-switch-setup usr/sbin diff --git a/debian/openvswitch-switch-config.manpages b/debian/openvswitch-switch-config.manpages new file mode 100644 index 00000000..0e122793 --- /dev/null +++ b/debian/openvswitch-switch-config.manpages @@ -0,0 +1 @@ +debian/ovs-switch-setup.8 diff --git a/debian/openflow-switch-config.overrides b/debian/openvswitch-switch-config.overrides similarity index 100% rename from debian/openflow-switch-config.overrides rename to debian/openvswitch-switch-config.overrides diff --git a/debian/openflow-switch-config.templates b/debian/openvswitch-switch-config.templates similarity index 90% rename from debian/openflow-switch-config.templates rename to debian/openvswitch-switch-config.templates index 78761097..24bf0352 100644 --- a/debian/openflow-switch-config.templates +++ b/debian/openvswitch-switch-config.templates @@ -1,4 +1,4 @@ -Template: openflow-switch/netdevs +Template: openvswitch-switch/netdevs Type: multiselect _Choices: ${choices} _Description: OpenFlow switch network devices: @@ -13,13 +13,13 @@ _Description: OpenFlow switch network devices: OpenFlow switch takes over network devices at a low level: they become part of the switch and cannot be used for other purposes. -Template: openflow-switch/no-netdevs +Template: openvswitch-switch/no-netdevs Type: error _Description: No network devices were selected. No network devices were selected for inclusion in the OpenFlow switch. The switch will be disabled. -Template: openflow-switch/configured-netdevs +Template: openvswitch-switch/configured-netdevs Type: note _Description: Some Network Devices Have IP or IPv6 Addresses The following network devices selected to be part of the OpenFlow switch @@ -35,7 +35,7 @@ _Description: Some Network Devices Have IP or IPv6 Addresses If this is an unintentional mistake, move back and fix the selection, or de-configure the IP or IPv6 from these network devices. -Template: openflow-switch/mode +Template: openvswitch-switch/mode Type: select _Choices: discovery, in-band, out-of-band Default: discovery @@ -58,7 +58,7 @@ _Description: Switch-to-controller access method: be configured on a network device other than one of those selected as an OpenFlow switch netdev in the previous question. -Template: openflow-switch/discover +Template: openvswitch-switch/discover Type: note _Description: Preparing to discover controller. The setup program will now attempt to discover the OpenFlow controller. @@ -67,7 +67,7 @@ _Description: Preparing to discover controller. See secchan(8) for instructions on how to configure a DHCP server for controller discovery. -Template: openflow-switch/discovery-failure +Template: openvswitch-switch/discovery-failure Type: error _Description: Controller discovery failed. The controller's location could not be determined automatically. @@ -76,7 +76,7 @@ _Description: Controller discovery failed. secchan(8) for instructions on how to configure a DHCP server for controller discovery. -Template: openflow-switch/discovery-success +Template: openvswitch-switch/discovery-success Type: boolean Default: true _Description: Use discovered settings? @@ -88,7 +88,7 @@ _Description: Use discovered settings? . Please verify that these settings are correct. -Template: openflow-switch/switch-ip +Template: openvswitch-switch/switch-ip Type: string Default: dhcp _Description: Switch IP address: @@ -103,13 +103,13 @@ _Description: Switch IP address: allows the switch to contact the DHCP server before it connects to the OpenFlow controller. -Template: openflow-switch/switch-ip-error +Template: openvswitch-switch/switch-ip-error Type: error _Description: The switch IP address is invalid. The switch IP address must specified as "dhcp" or a valid IP address in dotted-octet form (e.g. "1.2.3.4"). -Template: openflow-switch/controller-vconn +Template: openvswitch-switch/controller-vconn Type: string _Description: Controller location: Specify how the OpenFlow switch should connect to the OpenFlow controller. @@ -117,19 +117,19 @@ _Description: Controller location: over SSL (recommended for security) or "tcp:HOST[:PORT]" to connect over cleartext TCP. -Template: openflow-switch/controller-vconn-error +Template: openvswitch-switch/controller-vconn-error Type: error _Description: The controller location is invalid. The controller location must be specifed as "ssl:HOST[:PORT]" to connect to the controller over SSL (recommended for security) or "tcp:HOST[:PORT]" to connect over cleartext TCP. -Template: openflow-switch/pki-uri +Template: openvswitch-switch/pki-uri Type: string _Description: OpenFlow PKI server host name or URL: Specify a URL to the OpenFlow public key infrastructure (PKI). If a host name or IP address is specified in place of a URL, then - http:///openflow/pki/ will be used, + http:///openvswitch/pki/ will be used, where is the specified host name or IP address. . The OpenFlow PKI is usually on the same machine as the OpenFlow @@ -138,7 +138,7 @@ _Description: OpenFlow PKI server host name or URL: The setup process will connect to the OpenFlow PKI server over HTTP, using the system's configured default HTTP proxy (if any). -Template: openflow-switch/fetch-cacert-failed +Template: openvswitch-switch/fetch-cacert-failed Type: error _Description: The switch CA certificate could not be retrieved. Retrieval of ${url} failed, with the following status: "${error}". @@ -148,7 +148,7 @@ _Description: The switch CA certificate could not be retrieved. proxy, also make sure that the HTTP proxy is available and that the PKI server can be reached through it. -Template: openflow-switch/verify-controller-ca +Template: openvswitch-switch/verify-controller-ca Type: select _Choices: yes, no Default: yes @@ -161,7 +161,7 @@ _Description: Is ${fingerprint} the controller CA's fingerprint? If a man-in-the-middle attack is not a concern, there is no need to verify the fingerprint. Simply answer "yes". -Template: openflow-switch/send-cert-req +Template: openvswitch-switch/send-cert-req Type: select _Choices: yes, no Default: yes @@ -180,7 +180,7 @@ _Description: Send certificate request to switch CA? Unless the request has already been sent to the switch CA, manual sending of the request and signing will be necessary. -Template: openflow-switch/send-cert-req-failed +Template: openvswitch-switch/send-cert-req-failed Type: error _Description: The certificate request could not be sent. Posting to ${url} failed, with the following status: "${error}". @@ -188,7 +188,7 @@ _Description: The certificate request could not be sent. Ensure that the OpenFlow PKI server is correctly configured and available at ${pki-uri}. -Template: openflow-switch/fetch-switch-cert +Template: openvswitch-switch/fetch-switch-cert Type: select _Choices: yes, no _Description: Fetch signed switch certificate from PKI server? @@ -210,7 +210,7 @@ _Description: Fetch signed switch certificate from PKI server? process must be restarted later, when the switch certificate request has been signed. -Template: openflow-switch/fetch-switch-cert-failed +Template: openvswitch-switch/fetch-switch-cert-failed Type: error _Description: Signed switch certificate could not be retrieved. The signed switch certificate could not be retrieved from the switch @@ -221,7 +221,7 @@ _Description: Signed switch certificate could not be retrieved. the certificate request at ${pki-uri}, then trying to fetch the signed switch certificate again. -Template: openflow-switch/complete +Template: openvswitch-switch/complete Type: note _Description: OpenFlow Switch Setup Finished Setup of this OpenFlow switch is finished. Complete the setup procedure diff --git a/debian/openvswitch-switch.README.Debian b/debian/openvswitch-switch.README.Debian new file mode 100644 index 00000000..7c5e08d8 --- /dev/null +++ b/debian/openvswitch-switch.README.Debian @@ -0,0 +1,18 @@ +README.Debian for openvswitch-switch +--------------------------------- + +* The switch must be configured before it can be used. To configure + it interactively, install the openvswitch-switch-config package and run + the ovs-switch-setup program. Alternatively, edit + /etc/default/openvswitch-switch by hand, then start the switch manually + with "/etc/init.d/openvswitch-switch start". + +* To use the Linux kernel-based switch implementation, you will need + to build and install the OpenVSwitch kernel module. To do so, install + the openvswitch-datapath-source package, then follow the instructions + given in /usr/share/doc/openvswitch-datapath-source/README.Debian + +* This package does not yet support the userspace datapath-based + switch implementation. + + -- Ben Pfaff , Mon, 11 May 2009 13:29:43 -0700 diff --git a/debian/openvswitch-switch.dirs b/debian/openvswitch-switch.dirs new file mode 100644 index 00000000..b4a52873 --- /dev/null +++ b/debian/openvswitch-switch.dirs @@ -0,0 +1,2 @@ +/etc/openvswitch-switch +/usr/share/openvswitch/switch diff --git a/debian/openflow-switch.init b/debian/openvswitch-switch.init similarity index 87% rename from debian/openflow-switch.init rename to debian/openvswitch-switch.init index 72f4bdf5..45a87d25 100755 --- a/debian/openflow-switch.init +++ b/debian/openvswitch-switch.init @@ -1,21 +1,21 @@ #! /bin/sh # -# /etc/init.d/openflow-switch +# /etc/init.d/openvswitch-switch # # Written by Miquel van Smoorenburg . # Modified for Debian by Ian Murdock . # Further changes by Javier Fernandez-Sanguino -# Modified for openflow-switch. +# Modified for openvswitch-switch. # # Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl # ### BEGIN INIT INFO -# Provides: openflow-switch +# Provides: openvswitch-switch # Required-Start: $network $named $remote_fs $syslog # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 -# Short-Description: OpenFlow switch +# Short-Description: OpenVSwitch switch ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin @@ -27,7 +27,7 @@ test -x $DAEMON || exit 0 NICIRA_OUI="002320" -LOGDIR=/var/log/openflow +LOGDIR=/var/log/openvswitch PIDFILE=/var/run/$NAME.pid DHCLIENT_PIDFILE=/var/run/dhclient.of0.pid DODTIME=1 # Time to wait for the server to die, in seconds @@ -49,7 +49,7 @@ unset COMMANDS unset DAEMON_OPTS unset CORE_LIMIT unset DATAPATH_ID -default=/etc/default/openflow-switch +default=/etc/default/openvswitch-switch if [ -f $default ] ; then . $default fi @@ -146,7 +146,7 @@ configure_ssl() { if test ! -e "$CACERT" && test "$CACERT_MODE" != bootstrap; then echo "$CACERT: CA certificate missing (and CA certificate bootstrapping not enabled)" >&2 fi - echo "Run ofp-switch-setup (in the openflow-switch-config package) or edit /etc/default/openflow-switch to configure" >&2 + echo "Run ovs-switch-setup (in the openvswitch-switch-config package) or edit /etc/default/openvswitch-switch to configure" >&2 if test "$MODE" = discovery; then echo "You may also delete or rename $PRIVKEY to disable SSL requirement" >&2 fi @@ -188,7 +188,7 @@ case "$1" in start) if test -z "$NETDEVS"; then echo "$default: No network devices configured, switch disabled" >&2 - echo "Run ofp-switch-setup (in the openflow-switch-config package) or edit /etc/default/openflow-switch to configure" >&2 + echo "Run ovs-switch-setup (in the openvswitch-switch-config package) or edit /etc/default/openvswitch-switch to configure" >&2 exit 0 fi if test "$MODE" = discovery; then @@ -196,17 +196,17 @@ case "$1" in elif test "$MODE" = in-band || test "$MODE" = out-of-band; then if test -z "$CONTROLLER"; then echo "$default: No controller configured and not configured for discovery, switch disabled" >&2 - echo "Run ofp-switch-setup (in the openflow-switch-config package) or edit /etc/default/openflow-switch to configure" >&2 + echo "Run ovs-switch-setup (in the openvswitch-switch-config package) or edit /etc/default/openvswitch-switch to configure" >&2 exit 0 fi else echo "$default: MODE must set to 'discovery', 'in-band', or 'out-of-band'" >&2 - echo "Run ofp-switch-setup (in the openflow-switch-config package) or edit /etc/default/openflow-switch to configure" >&2 + echo "Run ovs-switch-setup (in the openvswitch-switch-config package) or edit /etc/default/openvswitch-switch to configure" >&2 exit 1 fi - : ${PRIVKEY:=/etc/openflow-switch/of0-privkey.pem} - : ${CERT:=/etc/openflow-switch/of0-cert.pem} - : ${CACERT:=/etc/openflow-switch/cacert.pem} + : ${PRIVKEY:=/etc/openvswitch-switch/of0-privkey.pem} + : ${CERT:=/etc/openvswitch-switch/of0-cert.pem} + : ${CACERT:=/etc/openvswitch-switch/cacert.pem} case $CONTROLLER in '') # Discovery mode. @@ -221,7 +221,7 @@ case "$1" in ;; *) echo "$default: CONTROLLER must be in the form 'ssl:HOST[:PORT]' or 'tcp:HOST[:PORT]' when not in discovery mode" >&2 - echo "Run ofp-switch-setup (in the openflow-switch-config package) or edit /etc/default/openflow-switch to configure" >&2 + echo "Run ovs-switch-setup (in the openvswitch-switch-config package) or edit /etc/default/openvswitch-switch to configure" >&2 exit 1 esac case $DISCONNECTED_MODE in @@ -243,20 +243,20 @@ case "$1" in echo "$default: --rate-limit may now be set with RATE_LIMIT" >&2 esac - echo -n "Loading openflow_mod: " - if grep -q '^openflow_mod$' /proc/modules; then + echo -n "Loading openvswitch_mod: " + if grep -q '^openvswitch_mod$' /proc/modules; then echo "already loaded, nothing to do." - elif modprobe openflow_mod; then + elif modprobe openvswitch_mod; then echo "success." else echo "ERROR." - echo "openflow_mod has probably not been built for this kernel." - if ! test -d /usr/share/doc/openflow-datapath-source; then - echo "Install the openflow-datapath-source package, then read" - echo "/usr/share/doc/openflow-datapath-source/README.Debian" + echo "openvswitch_mod has probably not been built for this kernel." + if ! test -d /usr/share/doc/openvswitch-datapath-source; then + echo "Install the openvswitch-datapath-source package, then read" + echo "/usr/share/doc/openvswitch-datapath-source/README.Debian" else echo "For instructions, read" - echo "/usr/share/doc/openflow-datapath-source/README.Debian" + echo "/usr/share/doc/openvswitch-datapath-source/README.Debian" fi exit 1 fi @@ -386,7 +386,7 @@ case "$1" in echo "$NAME." check_op "Deleting datapath" dpctl deldp of0 - check_op "Unloading kernel module" modprobe -r openflow_mod + check_op "Unloading kernel module" modprobe -r openvswitch_mod ;; force-stop) echo -n "Forcefully stopping $DESC: " diff --git a/debian/openvswitch-switch.install b/debian/openvswitch-switch.install new file mode 100644 index 00000000..a43c9c60 --- /dev/null +++ b/debian/openvswitch-switch.install @@ -0,0 +1,6 @@ +_debian/secchan/secchan usr/sbin +_debian/utilities/dpctl usr/sbin +_debian/utilities/ovs-discover usr/sbin +_debian/utilities/ovs-kill usr/sbin +debian/openvswitch/usr/share/openvswitch/commands/* usr/share/openvswitch/commands +debian/commands/* usr/share/openvswitch/commands diff --git a/debian/openflow-switch.logrotate b/debian/openvswitch-switch.logrotate similarity index 86% rename from debian/openflow-switch.logrotate rename to debian/openvswitch-switch.logrotate index b2136907..5c253088 100644 --- a/debian/openflow-switch.logrotate +++ b/debian/openvswitch-switch.logrotate @@ -1,4 +1,4 @@ -/var/log/openflow/secchan.log { +/var/log/openvswitch/secchan.log { daily compress create 640 root adm diff --git a/debian/openvswitch-switch.manpages b/debian/openvswitch-switch.manpages new file mode 100644 index 00000000..80bfd9fd --- /dev/null +++ b/debian/openvswitch-switch.manpages @@ -0,0 +1,4 @@ +_debian/secchan/secchan.8 +_debian/utilities/ovs-discover.8 +_debian/utilities/ovs-kill.8 +_debian/utilities/dpctl.8 diff --git a/debian/openflow-switch.postinst b/debian/openvswitch-switch.postinst similarity index 89% rename from debian/openflow-switch.postinst rename to debian/openvswitch-switch.postinst index 4f96db3a..74b52ba9 100755 --- a/debian/openflow-switch.postinst +++ b/debian/openvswitch-switch.postinst @@ -1,5 +1,5 @@ #!/bin/sh -# postinst script for openflow-switch +# postinst script for openvswitch-switch # # see: dh_installdeb(1) @@ -20,8 +20,8 @@ set -e case "$1" in configure) - DEFAULT=/etc/default/openflow-switch - TEMPLATE=/usr/share/openflow/switch/default.template + DEFAULT=/etc/default/openvswitch-switch + TEMPLATE=/usr/share/openvswitch/switch/default.template if ! test -e $DEFAULT; then cp $TEMPLATE $DEFAULT else diff --git a/debian/openflow-switch.postrm b/debian/openvswitch-switch.postrm similarity index 92% rename from debian/openflow-switch.postrm rename to debian/openvswitch-switch.postrm index 20bab0e0..19e8ebe4 100755 --- a/debian/openflow-switch.postrm +++ b/debian/openvswitch-switch.postrm @@ -1,5 +1,5 @@ #!/bin/sh -# postrm script for openflow-switch +# postrm script for openvswitch-switch # # see: dh_installdeb(1) @@ -21,7 +21,7 @@ set -e case "$1" in purge) - rm -f /etc/default/openflow-switch + rm -f /etc/default/openvswitch-switch ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) diff --git a/debian/openflow-switch.template b/debian/openvswitch-switch.template similarity index 92% rename from debian/openflow-switch.template rename to debian/openvswitch-switch.template index 1cc9a4f4..704a3bbd 100644 --- a/debian/openflow-switch.template +++ b/debian/openvswitch-switch.template @@ -3,9 +3,9 @@ # To configure the secure channel, fill in the following properly and # uncomment them. Afterward, the secure channel will come up # automatically at boot time. It can be started immediately with -# /etc/init.d/openflow-switch start -# Alternatively, use the ofp-switch-setup program (from the -# openflow-switch-config package) to do everything automatically. +# /etc/init.d/openvswitch-switch start +# Alternatively, use the ovs-switch-setup program (from the +# openvswitch-switch-config package) to do everything automatically. # NETDEVS: Which network devices should the OpenFlow switch include? # @@ -17,7 +17,7 @@ # The network devices that you select should not be configured with IP # or IPv6 addresses, even if the switch contacts the controller over # one of the selected network devices. This is because a running -# OpenFlow switch takes over network devices at a low level: they +# OpenVSwitch switch takes over network devices at a low level: they # become part of the switch and cannot be used for other purposes. #NETDEVS="" @@ -37,7 +37,7 @@ # * out-of-band: OpenFlow traffic uses a network separate from the # data traffic that it controls. If this is the case, the control # network must already be configured on a network device other than -# one of those selected as an OpenFlow switch port in the previous +# one of those selected as an OpenVSwitch switch port in the previous # question. # # Set MODE to 'discovery', 'in-band', or 'out-of-band' for these @@ -77,15 +77,15 @@ SWITCH_IP=dhcp # PRIVKEY: Name of file containing switch's private key. # Required if SSL enabled. -#PRIVKEY=/etc/openflow-switch/of0-privkey.pem +#PRIVKEY=/etc/openvswitch-switch/of0-privkey.pem # CERT: Name of file containing certificate for private key. # Required if SSL enabled. -#CERT=/etc/openflow-switch/of0-cert.pem +#CERT=/etc/openvswitch-switch/of0-cert.pem # CACERT: Name of file containing controller CA certificate. # Required if SSL enabled. -#CACERT=/etc/openflow-switch/cacert.pem +#CACERT=/etc/openvswitch-switch/cacert.pem # CACERT_MODE: Two modes are available: # @@ -103,9 +103,9 @@ SWITCH_IP=dhcp # MGMT_VCONNS: List of vconns (space-separated) on which secchan # should listen for management connections from dpctl, etc. -# openflow-switchui by default connects to +# openvswitch-switchui by default connects to # unix:/var/run/secchan.mgmt, so do not disable this if you want to -# use openflow-switchui. +# use openvswitch-switchui. MGMT_VCONNS="punix:/var/run/secchan.mgmt" # COMMANDS: Access control list for the commands that can be executed diff --git a/debian/ofp-switch-setup b/debian/ovs-switch-setup similarity index 94% rename from debian/ofp-switch-setup rename to debian/ovs-switch-setup index 5a999ab4..39a9dc96 100755 --- a/debian/ofp-switch-setup +++ b/debian/ovs-switch-setup @@ -11,28 +11,28 @@ use warnings; # XXX should support configuring SWITCH_NETMASK and SWITCH_GATEWAY # when the mode is in-band. -my $debconf_owner = 'openflow-switch'; +my $debconf_owner = 'openvswitch-switch'; -my $default = '/etc/default/openflow-switch'; -my $template = '/usr/share/openflow/switch/default.template'; -my $etc = '/etc/openflow-switch'; +my $default = '/etc/default/openvswitch-switch'; +my $template = '/usr/share/openvswitch/switch/default.template'; +my $etc = '/etc/openvswitch-switch'; my $rundir = '/var/run'; my $privkey_file = "$etc/of0-privkey.pem"; my $req_file = "$etc/of0-req.pem"; my $cert_file = "$etc/of0-cert.pem"; my $cacert_file = "$etc/cacert.pem"; -my $ofp_discover_pidfile = "$rundir/ofp-discover.pid"; +my $ovs_discover_pidfile = "$rundir/ovs-discover.pid"; my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; -system("/etc/init.d/openflow-switch stop 1>&2"); -kill_ofp_discover(); +system("/etc/init.d/openvswitch-switch stop 1>&2"); +kill_ovs_discover(); version('2.0'); capb('backup'); -title('OpenFlow Switch Setup'); +title('OpenVSwitch Switch Setup'); my (%netdevs) = find_netdevs(); db_subst('netdevs', 'choices', @@ -115,11 +115,11 @@ my (@states) = print STDERR "Please wait up to 30 seconds for discovery...\n"; # Make sure that there's no running discovery process. - kill_ofp_discover(); + kill_ovs_discover(); # Do discovery. %options = (); - open(DISCOVER, '-|', 'ofp-discover --timeout=30 --pidfile ' + open(DISCOVER, '-|', 'ovs-discover --timeout=30 --pidfile ' . join(' ', netdev_names())); while () { chomp; @@ -138,15 +138,15 @@ my (@states) = } # Check results. - my $vconn = $options{'ofp-controller-vconn'}; - my $pki_uri = $options{'ofp-pki-uri'}; + my $vconn = $options{'ovs-controller-vconn'}; + my $pki_uri = $options{'ovs-pki-uri'}; return 'next' if (defined($vconn) && is_valid_vconn($vconn) && (!is_ssl_vconn($vconn) || defined($pki_uri))); # Try again? - kill_ofp_discover(); + kill_ovs_discover(); db_input('discovery-failure'); db_go(); } @@ -154,8 +154,8 @@ my (@states) = sub { return 'skip' if db_get('mode') ne 'discovery'; - my $vconn = $options{'ofp-controller-vconn'}; - my $pki_uri = $options{'ofp-pki-uri'}; + my $vconn = $options{'ovs-controller-vconn'}; + my $pki_uri = $options{'ovs-pki-uri'}; db_subst('discovery-success', 'controller-vconn', $vconn); db_subst('discovery-success', 'pki-uri', is_ssl_vconn($vconn) ? $pki_uri : "no PKI in use"); @@ -202,7 +202,7 @@ my (@states) = if (! -e $privkey_file) { my $old_umask = umask(077); - run_cmd("ofp-pki req $etc/of0 >&2 2>/dev/null"); + run_cmd("ovs-pki req $etc/of0 >&2 2>/dev/null"); chmod(0644, $req_file) or die "$req_file: chmod: $!\n"; umask($old_umask); } @@ -261,7 +261,7 @@ my (@states) = my $pki_uri = db_get('pki-uri'); my ($pki_base_uri) = $pki_uri =~ m%^([^/]+://[^/]+)/%; - my $url = "$pki_base_uri/cgi-bin/ofp-pki-cgi"; + my $url = "$pki_base_uri/cgi-bin/ovs-pki-cgi"; my $response = $ua->post($url, {'type' => 'switch', 'req' => $req}); return 'next' if $response->is_success; @@ -355,8 +355,8 @@ $config{CACERT} = $cacert_file; save_config($default, %config); dup2(2, 1); # Get stdout back. -kill_ofp_discover(); -system("/etc/init.d/openflow-switch start"); +kill_ovs_discover(); +system("/etc/init.d/openvswitch-switch start"); sub ssl_enabled { return is_ssl_vconn(db_get('controller-vconn')); @@ -591,13 +591,13 @@ sub save_config { sub pki_host_to_uri { my ($pki_host) = @_; - return "http://$pki_host/openflow/pki"; + return "http://$pki_host/openvswitch/pki"; } -sub kill_ofp_discover { +sub kill_ovs_discover { # Delegate this to a subprocess because there is no portable way # to invoke fcntl(F_GETLK) from Perl. - system("ofp-kill --force $ofp_discover_pidfile"); + system("ovs-kill --force $ovs_discover_pidfile"); } sub netdev_names { diff --git a/debian/ovs-switch-setup.8 b/debian/ovs-switch-setup.8 new file mode 100644 index 00000000..f369587c --- /dev/null +++ b/debian/ovs-switch-setup.8 @@ -0,0 +1,41 @@ +.TH ovs-switch-setup 8 "June 2008" "OpenVSwitch" "OpenVSwitch Manual" + +.SH NAME +ovs\-switch\-setup \- interactive setup for OpenVSwitch switch + +.SH SYNOPSIS +.B ovs\-switch\-setup + +.SH DESCRIPTION +The \fBovs\-switch\-setup\fR program is an interactive program that +assists the system administrator in configuring an OpenVSwitch switch, +including the underlying public key infrastructure (PKI). + +.SH OPTIONS +ovs\-switch\-setup does not accept any command-line options. + +.SH FILES +.IP /etc/default/openvswitch-switch +Main configuration file for OpenVSwitch switch. + +.IP /etc/openvswitch-switch/cacert.pem +Default location of CA certificate for OpenFlow controllers. + +.IP /etc/openvswitch-switch/of0-cert.pem +Default location of certificate for the OpenVSwitch switch's private key. + +.IP /etc/openvswitch-switch/of0-privkey.pem +Default location of the OpenVSwitch switch's private key. This file +should be readable only by \fBroot\fR. + +.IP /etc/openvswitch-switch/of0-req.pem +Default location of certificate request for the OpenVSwitch switch's +certificate. This file is not used after the signed certificate +(typically \fB/etc/openvswitch-switch/of0-cert.pem\fR, above) has been +obtained from the OpenFlow PKI server. + +.SH "SEE ALSO" + +.BR ovs-pki (8), +.BR dpctl (8), +.BR secchan (8) diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in index e3ea07e3..865bf94c 100644 --- a/debian/po/POTFILES.in +++ b/debian/po/POTFILES.in @@ -1 +1 @@ -[type: gettext/rfc822deb] openflow-switch-config.templates +[type: gettext/rfc822deb] openvswitch-switch-config.templates diff --git a/debian/po/templates.pot b/debian/po/templates.pot index 443a1ce0..119e5587 100644 --- a/debian/po/templates.pot +++ b/debian/po/templates.pot @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: openflow-dev@lists.stanford.edu\n" -"POT-Creation-Date: 2008-10-31 10:13-0700\n" +"Report-Msgid-Bugs-To: ovs-dev@openvswitch.org\n" +"POT-Creation-Date: 2009-05-11 13:38-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,19 +18,19 @@ msgstr "" #. Type: multiselect #. Choices -#: ../openflow-switch-config.templates:1001 +#: ../openvswitch-switch-config.templates:1001 msgid "${choices}" msgstr "" #. Type: multiselect #. Description -#: ../openflow-switch-config.templates:1002 +#: ../openvswitch-switch-config.templates:1002 msgid "OpenFlow switch network devices:" msgstr "" #. Type: multiselect #. Description -#: ../openflow-switch-config.templates:1002 +#: ../openvswitch-switch-config.templates:1002 msgid "" "Choose the network devices that should become part of the OpenFlow switch. " "At least two devices must be selected for this machine to be a useful " @@ -40,7 +40,7 @@ msgstr "" #. Type: multiselect #. Description -#: ../openflow-switch-config.templates:1002 +#: ../openvswitch-switch-config.templates:1002 msgid "" "The network devices that you select should not be configured with IP or IPv6 " "addresses, even if the switch contacts the controller over one of the " @@ -51,13 +51,13 @@ msgstr "" #. Type: error #. Description -#: ../openflow-switch-config.templates:2001 +#: ../openvswitch-switch-config.templates:2001 msgid "No network devices were selected." msgstr "" #. Type: error #. Description -#: ../openflow-switch-config.templates:2001 +#: ../openvswitch-switch-config.templates:2001 msgid "" "No network devices were selected for inclusion in the OpenFlow switch. The " "switch will be disabled." @@ -65,13 +65,13 @@ msgstr "" #. Type: note #. Description -#: ../openflow-switch-config.templates:3001 +#: ../openvswitch-switch-config.templates:3001 msgid "Some Network Devices Have IP or IPv6 Addresses" msgstr "" #. Type: note #. Description -#: ../openflow-switch-config.templates:3001 +#: ../openvswitch-switch-config.templates:3001 msgid "" "The following network devices selected to be part of the OpenFlow switch " "have IP or IPv6 addresses configured:" @@ -79,13 +79,13 @@ msgstr "" #. Type: note #. Description -#: ../openflow-switch-config.templates:3001 +#: ../openvswitch-switch-config.templates:3001 msgid "${configured-netdevs}" msgstr "" #. Type: note #. Description -#: ../openflow-switch-config.templates:3001 +#: ../openvswitch-switch-config.templates:3001 msgid "" "This is usually a mistake, even if the switch contacts the controller over " "one of the selected network devices. This is because a running OpenFlow " @@ -95,7 +95,7 @@ msgstr "" #. Type: note #. Description -#: ../openflow-switch-config.templates:3001 +#: ../openvswitch-switch-config.templates:3001 msgid "" "If this is an unintentional mistake, move back and fix the selection, or de-" "configure the IP or IPv6 from these network devices." @@ -103,19 +103,19 @@ msgstr "" #. Type: select #. Choices -#: ../openflow-switch-config.templates:4001 +#: ../openvswitch-switch-config.templates:4001 msgid "discovery, in-band, out-of-band" msgstr "" #. Type: select #. Description -#: ../openflow-switch-config.templates:4002 +#: ../openvswitch-switch-config.templates:4002 msgid "Switch-to-controller access method:" msgstr "" #. Type: select #. Description -#: ../openflow-switch-config.templates:4002 +#: ../openvswitch-switch-config.templates:4002 msgid "" "The OpenFlow switch must be able to contact the OpenFlow controller over the " "network. It can do so in one of three ways:" @@ -123,7 +123,7 @@ msgstr "" #. Type: select #. Description -#: ../openflow-switch-config.templates:4002 +#: ../openvswitch-switch-config.templates:4002 msgid "" "discovery: A single network is used for OpenFlow traffic and other data " "traffic; that is, the switch contacts the controller over one of the network " @@ -135,14 +135,14 @@ msgstr "" #. Type: select #. Description -#: ../openflow-switch-config.templates:4002 +#: ../openvswitch-switch-config.templates:4002 msgid "" "in-band: As above, but the location of the controller is manually configured." msgstr "" #. Type: select #. Description -#: ../openflow-switch-config.templates:4002 +#: ../openvswitch-switch-config.templates:4002 msgid "" "out-of-band: OpenFlow traffic uses a network separate from the data traffic " "that it controls. If this is the case, the control network must already be " @@ -152,13 +152,13 @@ msgstr "" #. Type: note #. Description -#: ../openflow-switch-config.templates:5001 +#: ../openvswitch-switch-config.templates:5001 msgid "Preparing to discover controller." msgstr "" #. Type: note #. Description -#: ../openflow-switch-config.templates:5001 +#: ../openvswitch-switch-config.templates:5001 msgid "" "The setup program will now attempt to discover the OpenFlow controller. " "Controller discovery may take up to 30 seconds. Please be patient." @@ -166,7 +166,7 @@ msgstr "" #. Type: note #. Description -#: ../openflow-switch-config.templates:5001 +#: ../openvswitch-switch-config.templates:5001 msgid "" "See secchan(8) for instructions on how to configure a DHCP server for " "controller discovery." @@ -174,19 +174,19 @@ msgstr "" #. Type: error #. Description -#: ../openflow-switch-config.templates:6001 +#: ../openvswitch-switch-config.templates:6001 msgid "Controller discovery failed." msgstr "" #. Type: error #. Description -#: ../openflow-switch-config.templates:6001 +#: ../openvswitch-switch-config.templates:6001 msgid "The controller's location could not be determined automatically." msgstr "" #. Type: error #. Description -#: ../openflow-switch-config.templates:6001 +#: ../openvswitch-switch-config.templates:6001 msgid "" "Ensure that the OpenFlow DHCP server is properly configured. See secchan(8) " "for instructions on how to configure a DHCP server for controller discovery." @@ -194,43 +194,43 @@ msgstr "" #. Type: boolean #. Description -#: ../openflow-switch-config.templates:7001 +#: ../openvswitch-switch-config.templates:7001 msgid "Use discovered settings?" msgstr "" #. Type: boolean #. Description -#: ../openflow-switch-config.templates:7001 +#: ../openvswitch-switch-config.templates:7001 msgid "Controller discovery obtained the following settings:" msgstr "" #. Type: boolean #. Description -#: ../openflow-switch-config.templates:7001 +#: ../openvswitch-switch-config.templates:7001 msgid "Controller location: ${controller-vconn}" msgstr "" #. Type: boolean #. Description -#: ../openflow-switch-config.templates:7001 +#: ../openvswitch-switch-config.templates:7001 msgid "PKI URL: ${pki-uri}" msgstr "" #. Type: boolean #. Description -#: ../openflow-switch-config.templates:7001 +#: ../openvswitch-switch-config.templates:7001 msgid "Please verify that these settings are correct." msgstr "" #. Type: string #. Description -#: ../openflow-switch-config.templates:8001 +#: ../openvswitch-switch-config.templates:8001 msgid "Switch IP address:" msgstr "" #. Type: string #. Description -#: ../openflow-switch-config.templates:8001 +#: ../openvswitch-switch-config.templates:8001 msgid "" "For in-band communication with the controller, the OpenFlow switch must be " "able to determine its own IP address. Its IP address may be configured " @@ -239,13 +239,13 @@ msgstr "" #. Type: string #. Description -#: ../openflow-switch-config.templates:8001 +#: ../openvswitch-switch-config.templates:8001 msgid "For static configuration, specify the switch's IP address as a string." msgstr "" #. Type: string #. Description -#: ../openflow-switch-config.templates:8001 +#: ../openvswitch-switch-config.templates:8001 msgid "" "For dynamic configuration with DHCP (the most common case), specify \"dhcp" "\". Configuration with DHCP will only work reliably if the network topology " @@ -255,13 +255,13 @@ msgstr "" #. Type: error #. Description -#: ../openflow-switch-config.templates:9001 +#: ../openvswitch-switch-config.templates:9001 msgid "The switch IP address is invalid." msgstr "" #. Type: error #. Description -#: ../openflow-switch-config.templates:9001 +#: ../openvswitch-switch-config.templates:9001 msgid "" "The switch IP address must specified as \"dhcp\" or a valid IP address in " "dotted-octet form (e.g. \"1.2.3.4\")." @@ -269,13 +269,13 @@ msgstr "" #. Type: string #. Description -#: ../openflow-switch-config.templates:10001 +#: ../openvswitch-switch-config.templates:10001 msgid "Controller location:" msgstr "" #. Type: string #. Description -#: ../openflow-switch-config.templates:10001 +#: ../openvswitch-switch-config.templates:10001 msgid "" "Specify how the OpenFlow switch should connect to the OpenFlow controller. " "The value should be in form \"ssl:HOST[:PORT]\" to connect to the controller " @@ -285,13 +285,13 @@ msgstr "" #. Type: error #. Description -#: ../openflow-switch-config.templates:11001 +#: ../openvswitch-switch-config.templates:11001 msgid "The controller location is invalid." msgstr "" #. Type: error #. Description -#: ../openflow-switch-config.templates:11001 +#: ../openvswitch-switch-config.templates:11001 msgid "" "The controller location must be specifed as \"ssl:HOST[:PORT]\" to connect " "to the controller over SSL (recommended for security) or \"tcp:HOST[:PORT]\" " @@ -300,30 +300,30 @@ msgstr "" #. Type: string #. Description -#: ../openflow-switch-config.templates:12001 +#: ../openvswitch-switch-config.templates:12001 msgid "OpenFlow PKI server host name or URL:" msgstr "" #. Type: string #. Description -#: ../openflow-switch-config.templates:12001 +#: ../openvswitch-switch-config.templates:12001 msgid "" "Specify a URL to the OpenFlow public key infrastructure (PKI). If a host " "name or IP address is specified in place of a URL, then http:///" -"openflow/pki/ will be used, where is the specified host name or IP " +"openvswitch/pki/ will be used, where is the specified host name or IP " "address." msgstr "" #. Type: string #. Description -#: ../openflow-switch-config.templates:12001 +#: ../openvswitch-switch-config.templates:12001 msgid "" "The OpenFlow PKI is usually on the same machine as the OpenFlow controller." msgstr "" #. Type: string #. Description -#: ../openflow-switch-config.templates:12001 +#: ../openvswitch-switch-config.templates:12001 msgid "" "The setup process will connect to the OpenFlow PKI server over HTTP, using " "the system's configured default HTTP proxy (if any)." @@ -331,19 +331,19 @@ msgstr "" #. Type: error #. Description -#: ../openflow-switch-config.templates:13001 +#: ../openvswitch-switch-config.templates:13001 msgid "The switch CA certificate could not be retrieved." msgstr "" #. Type: error #. Description -#: ../openflow-switch-config.templates:13001 +#: ../openvswitch-switch-config.templates:13001 msgid "Retrieval of ${url} failed, with the following status: \"${error}\"." msgstr "" #. Type: error #. Description -#: ../openflow-switch-config.templates:13001 +#: ../openvswitch-switch-config.templates:13001 msgid "" "Ensure that the OpenFlow PKI server is correctly configured and available at " "${pki-uri}. If the system is configured to use an HTTP proxy, also make " @@ -357,21 +357,21 @@ msgstr "" #. Choices #. Type: select #. Choices -#: ../openflow-switch-config.templates:14001 -#: ../openflow-switch-config.templates:15001 -#: ../openflow-switch-config.templates:17001 +#: ../openvswitch-switch-config.templates:14001 +#: ../openvswitch-switch-config.templates:15001 +#: ../openvswitch-switch-config.templates:17001 msgid "yes, no" msgstr "" #. Type: select #. Description -#: ../openflow-switch-config.templates:14002 +#: ../openvswitch-switch-config.templates:14002 msgid "Is ${fingerprint} the controller CA's fingerprint?" msgstr "" #. Type: select #. Description -#: ../openflow-switch-config.templates:14002 +#: ../openvswitch-switch-config.templates:14002 msgid "" "If a man-in-the-middle attack is possible in your network environment, check " "that the controller CA's fingerprint is really ${fingerprint}. Answer \"yes" @@ -380,7 +380,7 @@ msgstr "" #. Type: select #. Description -#: ../openflow-switch-config.templates:14002 +#: ../openvswitch-switch-config.templates:14002 msgid "" "If a man-in-the-middle attack is not a concern, there is no need to verify " "the fingerprint. Simply answer \"yes\"." @@ -388,13 +388,13 @@ msgstr "" #. Type: select #. Description -#: ../openflow-switch-config.templates:15002 +#: ../openvswitch-switch-config.templates:15002 msgid "Send certificate request to switch CA?" msgstr "" #. Type: select #. Description -#: ../openflow-switch-config.templates:15002 +#: ../openvswitch-switch-config.templates:15002 msgid "" "Before it can connect to the controller over SSL, the OpenFlow switch's key " "must be signed by the switch certificate authority (CA) located on the " @@ -404,7 +404,7 @@ msgstr "" #. Type: select #. Description -#: ../openflow-switch-config.templates:15002 +#: ../openvswitch-switch-config.templates:15002 msgid "" "Answer \"yes\" to send a signing request to the switch CA now. This is " "ordinarily the correct choice. There is no harm in sending a given signing " @@ -413,7 +413,7 @@ msgstr "" #. Type: select #. Description -#: ../openflow-switch-config.templates:15002 +#: ../openvswitch-switch-config.templates:15002 msgid "" "Answer \"no\" to skip sending a signing request to the switch CA. Unless the " "request has already been sent to the switch CA, manual sending of the " @@ -422,19 +422,19 @@ msgstr "" #. Type: error #. Description -#: ../openflow-switch-config.templates:16001 +#: ../openvswitch-switch-config.templates:16001 msgid "The certificate request could not be sent." msgstr "" #. Type: error #. Description -#: ../openflow-switch-config.templates:16001 +#: ../openvswitch-switch-config.templates:16001 msgid "Posting to ${url} failed, with the following status: \"${error}\"." msgstr "" #. Type: error #. Description -#: ../openflow-switch-config.templates:16001 +#: ../openvswitch-switch-config.templates:16001 msgid "" "Ensure that the OpenFlow PKI server is correctly configured and available at " "${pki-uri}." @@ -442,13 +442,13 @@ msgstr "" #. Type: select #. Description -#: ../openflow-switch-config.templates:17002 +#: ../openvswitch-switch-config.templates:17002 msgid "Fetch signed switch certificate from PKI server?" msgstr "" #. Type: select #. Description -#: ../openflow-switch-config.templates:17002 +#: ../openvswitch-switch-config.templates:17002 msgid "" "Before it can connect to the controller over SSL, the OpenFlow switch's key " "must be signed by the switch certificate authority (CA) located on the " @@ -458,7 +458,7 @@ msgstr "" #. Type: select #. Description -#: ../openflow-switch-config.templates:17002 +#: ../openvswitch-switch-config.templates:17002 msgid "" "At this point, a signing request has been sent to the switch CA (or sending " "a request has been manually skipped), but the signed certificate has not yet " @@ -468,7 +468,7 @@ msgstr "" #. Type: select #. Description -#: ../openflow-switch-config.templates:17002 +#: ../openvswitch-switch-config.templates:17002 msgid "" "Answer \"yes\" to attempt to retrieve the signed switch certificate from the " "switch CA. If the switch certificate request has been signed at the PKI " @@ -477,7 +477,7 @@ msgstr "" #. Type: select #. Description -#: ../openflow-switch-config.templates:17002 +#: ../openvswitch-switch-config.templates:17002 msgid "" "Answer \"no\" to postpone switch configuration. The configuration process " "must be restarted later, when the switch certificate request has been signed." @@ -485,13 +485,13 @@ msgstr "" #. Type: error #. Description -#: ../openflow-switch-config.templates:18001 +#: ../openvswitch-switch-config.templates:18001 msgid "Signed switch certificate could not be retrieved." msgstr "" #. Type: error #. Description -#: ../openflow-switch-config.templates:18001 +#: ../openvswitch-switch-config.templates:18001 msgid "" "The signed switch certificate could not be retrieved from the switch CA: " "retrieval of ${url} failed, with the following status: \"${error}\"." @@ -499,7 +499,7 @@ msgstr "" #. Type: error #. Description -#: ../openflow-switch-config.templates:18001 +#: ../openvswitch-switch-config.templates:18001 msgid "" "This probably indicates that the switch's certificate request has not yet " "been signed. If this is the problem, it may be fixed by signing the " @@ -509,13 +509,13 @@ msgstr "" #. Type: note #. Description -#: ../openflow-switch-config.templates:19001 +#: ../openvswitch-switch-config.templates:19001 msgid "OpenFlow Switch Setup Finished" msgstr "" #. Type: note #. Description -#: ../openflow-switch-config.templates:19001 +#: ../openvswitch-switch-config.templates:19001 msgid "" "Setup of this OpenFlow switch is finished. Complete the setup procedure to " "enable the switch." diff --git a/debian/rules b/debian/rules index 9348a005..1eea4a26 100755 --- a/debian/rules +++ b/debian/rules @@ -17,7 +17,7 @@ export DH_OPTIONS # prefix of the target package name -PACKAGE=openflow-datapath-module +PACKAGE=openvswitch-datapath-module # modifieable for experiments or debugging m-a MA_DIR ?= /usr/share/modass # load generic variable handling @@ -56,7 +56,7 @@ build-arch-stamp: configure-stamp build-indep: build-indep-stamp build-indep-stamp: configure-stamp - $(MAKE) -C _debian dist distdir=openflow + $(MAKE) -C _debian dist distdir=openvswitch $(ext_build_indep) touch $@ @@ -72,7 +72,7 @@ clean: kdist_clean: dh_clean - rm -rf openflow + rm -rf openvswitch kdist_config: prep-deb-files @@ -81,11 +81,11 @@ binary-modules: prep-deb-files dh_testdir dh_testroot dh_clean -k - tar xzf openflow.tar.gz - cd openflow && ./configure --with-l26=$(KSRC) $(DATAPATH_CONFIGURE_OPTS) --with-build-number=$(BUILD_NUMBER) - cd openflow && $(MAKE) -C datapath/linux-2.6 + tar xzf openvswitch.tar.gz + cd openvswitch && ./configure --with-l26=$(KSRC) $(DATAPATH_CONFIGURE_OPTS) --with-build-number=$(BUILD_NUMBER) + cd openvswitch && $(MAKE) -C datapath/linux-2.6 install -d -m755 $(DSTDIR) - install -m644 openflow/datapath/linux-2.6/*_mod.ko $(DSTDIR)/ + install -m644 openvswitch/datapath/linux-2.6/*_mod.ko $(DSTDIR)/ dh_installdocs dh_installchangelogs dh_compress @@ -102,8 +102,8 @@ install-indep: build-indep dh_clean -k -i dh_installdirs -i dh_install -i - cd debian/openflow-datapath-source/usr/src && tar -c modules | bzip2 -9 > openflow-datapath.tar.bz2 && rm -rf modules - install -m644 debian/openflow-pki-server.apache2 debian/openflow-pki-server/etc/apache2/sites-available/openflow-pki + cd debian/openvswitch-datapath-source/usr/src && tar -c modules | bzip2 -9 > openvswitch-datapath.tar.bz2 && rm -rf modules + install -m644 debian/openvswitch-pki-server.apache2 debian/openvswitch-pki-server/etc/apache2/sites-available/openvswitch-pki install -m1777 -d debian/corekeeper/var/log/core $(ext_install_indep) @@ -112,9 +112,9 @@ install-arch: build-arch dh_testroot dh_clean -k -s dh_installdirs -s - $(MAKE) -C _debian DESTDIR=$(CURDIR)/debian/openflow install - cp debian/openflow-switch-config.overrides debian/openflow-switch-config/usr/share/lintian/overrides/openflow-switch-config - cp debian/openflow-switch.template debian/openflow-switch/usr/share/openflow/switch/default.template + $(MAKE) -C _debian DESTDIR=$(CURDIR)/debian/openvswitch install + cp debian/openvswitch-switch-config.overrides debian/openvswitch-switch-config/usr/share/lintian/overrides/openvswitch-switch-config + cp debian/openvswitch-switch.template debian/openvswitch-switch/usr/share/openvswitch/switch/default.template dh_install -s $(ext_install_arch) @@ -133,7 +133,7 @@ binary-common: dh_installcron dh_installman dh_link - dh_strip --dbg-package=openflow-dbg + dh_strip --dbg-package=openvswitch-dbg dh_compress dh_fixperms -X var/log/core dh_perl diff --git a/include/automake.mk b/include/automake.mk index 581c1085..a1316c4a 100644 --- a/include/automake.mk +++ b/include/automake.mk @@ -1 +1,2 @@ include include/openflow/automake.mk +include include/openvswitch/automake.mk diff --git a/include/openflow/automake.mk b/include/openflow/automake.mk index 5fe485c9..d4731550 100644 --- a/include/openflow/automake.mk +++ b/include/openflow/automake.mk @@ -1,7 +1,4 @@ noinst_HEADERS += \ - include/openflow/brcompat-netlink.h \ - include/openflow/datapath-protocol.h \ include/openflow/openflow-mgmt.h \ include/openflow/nicira-ext.h \ - include/openflow/openflow.h \ - include/openflow/openflow-netlink.h + include/openflow/openflow.h diff --git a/include/openflow/openflow-netlink.h b/include/openflow/openflow-netlink.h deleted file mode 100644 index 18b2b139..00000000 --- a/include/openflow/openflow-netlink.h +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford - * Junior University - * - * We are making the OpenFlow specification and associated documentation - * (Software) available for public use and benefit with the expectation - * that others will use, modify and enhance the Software and contribute - * those enhancements back to the community. However, since we would - * like to make the Software available for broadest use, with as few - * restrictions as possible permission is hereby granted, free of - * charge, to any person obtaining a copy of this Software to deal in - * the Software under the copyrights without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * The name and trademarks of copyright holder(s) may NOT be used in - * advertising or publicity pertaining to the Software or any - * derivatives without specific, written prior permission. - */ - -#ifndef OPENFLOW_OPENFLOW_NETLINK_H -#define OPENFLOW_OPENFLOW_NETLINK_H 1 - -#define DP_GENL_FAMILY_NAME "OpenFlow" - -/* Attributes that can be attached to the datapath's netlink messages. */ -enum { - DP_GENL_A_UNSPEC, - DP_GENL_A_DP_IDX, /* Datapath device index. */ - DP_GENL_A_PORTNAME, /* Device name for datapath port. */ - DP_GENL_A_MC_GROUP, /* Generic netlink multicast group. */ - DP_GENL_A_OPENFLOW, /* OpenFlow packet. */ - DP_GENL_A_DP_NAME, /* Datapath device name. */ - - __DP_GENL_A_MAX, - DP_GENL_A_MAX = __DP_GENL_A_MAX - 1 -}; - -/* Commands that can be executed on the datapath's netlink interface. */ -enum dp_genl_command { - DP_GENL_C_UNSPEC, - DP_GENL_C_ADD_DP, /* Create datapath. */ - DP_GENL_C_DEL_DP, /* Destroy datapath. */ - DP_GENL_C_QUERY_DP, /* Get multicast group for datapath. */ - DP_GENL_C_ADD_PORT, /* Add port to datapath. */ - DP_GENL_C_DEL_PORT, /* Remove port from datapath. */ - DP_GENL_C_OPENFLOW, /* Encapsulated OpenFlow protocol. */ - - __DP_GENL_C_MAX, - DP_GENL_C_MAX = __DP_GENL_C_MAX - 1 -}; - -#endif /* openflow/openflow-netlink.h */ diff --git a/include/openvswitch/automake.mk b/include/openvswitch/automake.mk new file mode 100644 index 00000000..889a21f5 --- /dev/null +++ b/include/openvswitch/automake.mk @@ -0,0 +1,4 @@ +noinst_HEADERS += \ + include/openvswitch/brcompat-netlink.h \ + include/openvswitch/datapath-protocol.h + diff --git a/include/openflow/brcompat-netlink.h b/include/openvswitch/brcompat-netlink.h similarity index 96% rename from include/openflow/brcompat-netlink.h rename to include/openvswitch/brcompat-netlink.h index 1f10f2dc..457f865d 100644 --- a/include/openflow/brcompat-netlink.h +++ b/include/openvswitch/brcompat-netlink.h @@ -31,8 +31,8 @@ * derivatives without specific, written prior permission. */ -#ifndef OPENFLOW_BRCOMPAT_NETLINK_H -#define OPENFLOW_BRCOMPAT_NETLINK_H 1 +#ifndef OPENVSWITCH_BRCOMPAT_NETLINK_H +#define OPENVSWITCH_BRCOMPAT_NETLINK_H 1 #define BRC_GENL_FAMILY_NAME "brcompat" @@ -70,4 +70,4 @@ enum brc_genl_command { __BRC_GENL_C_MAX, BRC_GENL_C_MAX = __BRC_GENL_C_MAX - 1 }; -#endif /* openflow/brcompat-netlink.h */ +#endif /* openvswitch/brcompat-netlink.h */ diff --git a/include/openflow/datapath-protocol.h b/include/openvswitch/datapath-protocol.h similarity index 98% rename from include/openflow/datapath-protocol.h rename to include/openvswitch/datapath-protocol.h index cf5075ec..e2bbaa9f 100644 --- a/include/openflow/datapath-protocol.h +++ b/include/openvswitch/datapath-protocol.h @@ -33,8 +33,8 @@ /* Protocol between secchan and datapath. */ -#ifndef OPENFLOW_DATAPATH_PROTOCOL_H -#define OPENFLOW_DATAPATH_PROTOCOL_H 1 +#ifndef OPENVSWITCH_DATAPATH_PROTOCOL_H +#define OPENVSWITCH_DATAPATH_PROTOCOL_H 1 #ifdef __KERNEL__ #include @@ -336,4 +336,4 @@ struct odp_snat_config { __u16 reserved; }; -#endif /* openflow/datapath-protocol.h */ +#endif /* openvswitch/datapath-protocol.h */ diff --git a/lib/automake.mk b/lib/automake.mk index e76881aa..853ef0aa 100644 --- a/lib/automake.mk +++ b/lib/automake.mk @@ -1,6 +1,6 @@ -noinst_LIBRARIES += lib/libopenflow.a +noinst_LIBRARIES += lib/libopenvswitch.a -lib_libopenflow_a_SOURCES = \ +lib_libopenvswitch_a_SOURCES = \ lib/backtrace.c \ lib/backtrace.h \ lib/bitmap.c \ @@ -109,7 +109,7 @@ lib_libopenflow_a_SOURCES = \ lib/xtoxll.h if HAVE_NETLINK -lib_libopenflow_a_SOURCES += \ +lib_libopenvswitch_a_SOURCES += \ lib/dpif.c \ lib/dpif.h \ lib/netlink-protocol.h \ @@ -118,9 +118,9 @@ lib_libopenflow_a_SOURCES += \ endif if HAVE_OPENSSL -lib_libopenflow_a_SOURCES += \ +lib_libopenvswitch_a_SOURCES += \ lib/vconn-ssl.c -nodist_lib_libopenflow_a_SOURCES = lib/dhparams.c +nodist_lib_libopenvswitch_a_SOURCES = lib/dhparams.c lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem (echo '#include "lib/dhparams.h"' && \ openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \ @@ -147,9 +147,9 @@ EXTRA_DIST += \ CLEANFILES += lib/dirs.c lib/dirs.c: Makefile ($(ro_c) && \ - echo 'const char ofp_pkgdatadir[] = "$(pkgdatadir$)";' && \ - echo 'const char ofp_rundir[] = "@RUNDIR@";' && \ - echo 'const char ofp_logdir[] = "@LOGDIR@";') > lib/dirs.c.tmp + echo 'const char ovs_pkgdatadir[] = "$(pkgdatadir$)";' && \ + echo 'const char ovs_rundir[] = "@RUNDIR@";' && \ + echo 'const char ovs_logdir[] = "@LOGDIR@";') > lib/dirs.c.tmp mv lib/dirs.c.tmp lib/dirs.c install-data-local: diff --git a/lib/daemon.c b/lib/daemon.c index 83465493..038ec17f 100644 --- a/lib/daemon.c +++ b/lib/daemon.c @@ -59,9 +59,9 @@ static bool force; char * make_pidfile_name(const char *name) { - return (!name ? xasprintf("%s/%s.pid", ofp_rundir, program_name) + return (!name ? xasprintf("%s/%s.pid", ovs_rundir, program_name) : *name == '/' ? xstrdup(name) - : xasprintf("%s/%s", ofp_rundir, name)); + : xasprintf("%s/%s", ovs_rundir, name)); } /* Sets up a following call to daemonize() to create a pidfile named 'name'. @@ -135,7 +135,7 @@ die_if_already_running(void) pid_t pid = already_running(); if (pid) { if (!force) { - ofp_fatal(0, "%s: already running as pid %ld", + ovs_fatal(0, "%s: already running as pid %ld", get_pidfile(), (long int) pid); } else { VLOG_WARN("%s: %s already running as pid %ld", @@ -206,7 +206,7 @@ daemonize(void) char c = 0; int fds[2]; if (pipe(fds) < 0) { - ofp_fatal(errno, "pipe failed"); + ovs_fatal(errno, "pipe failed"); } switch (fork()) { @@ -215,7 +215,7 @@ daemonize(void) close(fds[1]); fatal_signal_fork(); if (read(fds[0], &c, 1) != 1) { - ofp_fatal(errno, "daemon child failed to signal startup"); + ovs_fatal(errno, "daemon child failed to signal startup"); } exit(0); @@ -231,7 +231,7 @@ daemonize(void) case -1: /* Error. */ - ofp_fatal(errno, "could not fork"); + ovs_fatal(errno, "could not fork"); break; } } else { @@ -247,7 +247,7 @@ daemon_usage(void) " -D, --detach run in background as daemon\n" " -P, --pidfile[=FILE] create pidfile (default: %s/%s.pid)\n" " -f, --force with -P, start even if already running\n", - ofp_rundir, program_name); + ovs_rundir, program_name); } /* Opens and reads a PID from 'pidfile'. Returns the nonnegative PID if diff --git a/lib/dirs.h b/lib/dirs.h index f5de08ad..c45054f5 100644 --- a/lib/dirs.h +++ b/lib/dirs.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -34,8 +34,8 @@ #ifndef DIRS_H #define DIRS_H 1 -extern const char ofp_pkgdatadir[]; /* /usr/local/share/openflow */ -extern const char ofp_rundir[]; /* /usr/local/var/run */ -extern const char ofp_logdir[]; /* /usr/local/var/log */ +extern const char ovs_pkgdatadir[]; /* /usr/local/share/openvswitch */ +extern const char ovs_rundir[]; /* /usr/local/var/run */ +extern const char ovs_logdir[]; /* /usr/local/var/log */ #endif /* dirs.h */ diff --git a/lib/dpif.c b/lib/dpif.c index f30b0bba..de49e832 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -78,7 +78,7 @@ static int get_minor_from_name(const char *name, unsigned int *minor); static int name_to_minor(const char *name, unsigned int *minor); static int lookup_minor(const char *name, unsigned int *minor); static int open_by_minor(unsigned int minor, struct dpif *); -static int make_openflow_device(unsigned int minor, char **fnp); +static int make_openvswitch_device(unsigned int minor, char **fnp); static void check_rw_odp_flow(struct odp_flow *); int @@ -844,7 +844,7 @@ dpifmon_wait(struct dpifmon *mon) nl_sock_wait(mon->sock, POLLIN); } -static int get_openflow_major(void); +static int get_openvswitch_major(void); static int get_major(const char *target, int default_major); static int @@ -875,14 +875,15 @@ lookup_minor(const char *name, unsigned int *minor) goto error_close_sock; } - if (strcmp(drvinfo.driver, "openflow")) { - VLOG_WARN("%s is not an openflow device", name); + if (strcmp(drvinfo.driver, "openvswitch")) { + VLOG_WARN("%s is not an openvswitch device", name); error = EOPNOTSUPP; goto error_close_sock; } if (!isdigit(drvinfo.bus_info[0])) { - VLOG_WARN("%s ethtool info does not contain an openflow minor", name); + VLOG_WARN("%s ethtool info does not contain an openvswitch minor", + name); error = EPROTOTYPE; goto error_close_sock; } @@ -898,9 +899,9 @@ error: } static int -make_openflow_device(unsigned int minor, char **fnp) +make_openvswitch_device(unsigned int minor, char **fnp) { - dev_t dev = makedev(get_openflow_major(), minor); + dev_t dev = makedev(get_openvswitch_major(), minor); const char dirname[] = "/dev/net"; struct stat s; char fn[128]; @@ -958,14 +959,14 @@ success: static int -get_openflow_major(void) +get_openvswitch_major(void) { - static unsigned int openflow_major; - if (!openflow_major) { + static unsigned int openvswitch_major; + if (!openvswitch_major) { enum { DEFAULT_MAJOR = 248 }; - openflow_major = get_major("openflow", DEFAULT_MAJOR); + openvswitch_major = get_major("openvswitch", DEFAULT_MAJOR); } - return openflow_major; + return openvswitch_major; } static int @@ -1045,7 +1046,7 @@ open_by_minor(unsigned int minor, struct dpif *dpif) dpif->minor = -1; dpif->fd = -1; - error = make_openflow_device(minor, &fn); + error = make_openvswitch_device(minor, &fn); if (error) { return error; } diff --git a/lib/dpif.h b/lib/dpif.h index 3e96e536..a540deff 100644 --- a/lib/dpif.h +++ b/lib/dpif.h @@ -39,7 +39,7 @@ * generalize to multiple types of local datapaths, but the implementation only * supports the openflow kernel module. */ -#include "openflow/datapath-protocol.h" +#include "openvswitch/datapath-protocol.h" #include #include #include diff --git a/lib/fatal-signal.c b/lib/fatal-signal.c index 0bfa35bc..852fa6d7 100644 --- a/lib/fatal-signal.c +++ b/lib/fatal-signal.c @@ -108,11 +108,11 @@ fatal_signal_block(void) sigaddset(&fatal_signal_set, sig_nr); if (sigaction(sig_nr, NULL, &old_sa)) { - ofp_fatal(errno, "sigaction"); + ovs_fatal(errno, "sigaction"); } if (old_sa.sa_handler == SIG_DFL && signal(sig_nr, fatal_signal_handler) == SIG_ERR) { - ofp_fatal(errno, "signal"); + ovs_fatal(errno, "signal"); } } atexit(atexit_handler); diff --git a/lib/flow.c b/lib/flow.c index d2545d5f..b9f20ca7 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -41,8 +41,8 @@ #include "dynamic-string.h" #include "hash.h" #include "ofpbuf.h" -#include "openflow/datapath-protocol.h" #include "openflow/openflow.h" +#include "openvswitch/datapath-protocol.h" #include "packets.h" #include "vlog.h" diff --git a/lib/flow.h b/lib/flow.h index 59d6f36e..caefa870 100644 --- a/lib/flow.h +++ b/lib/flow.h @@ -39,8 +39,8 @@ #include #include "openflow/openflow.h" #include "hash.h" -#include "openflow/datapath-protocol.h" #include "openflow/openflow.h" +#include "openvswitch/datapath-protocol.h" #include "util.h" struct ds; diff --git a/lib/netdev.c b/lib/netdev.c index 0935efa2..9768abee 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -372,7 +372,7 @@ netdev_open_tap(const char *name, struct netdev **netdevp) tap_fd = open(tap_dev, O_RDWR); if (tap_fd < 0) { - ofp_error(errno, "opening \"%s\" failed", tap_dev); + ovs_error(errno, "opening \"%s\" failed", tap_dev); return errno; } @@ -383,14 +383,14 @@ netdev_open_tap(const char *name, struct netdev **netdevp) } if (ioctl(tap_fd, TUNSETIFF, &ifr) < 0) { int error = errno; - ofp_error(error, "ioctl(TUNSETIFF) on \"%s\" failed", tap_dev); + ovs_error(error, "ioctl(TUNSETIFF) on \"%s\" failed", tap_dev); close(tap_fd); return error; } error = set_nonblocking(tap_fd); if (error) { - ofp_error(error, "set_nonblocking on \"%s\" failed", tap_dev); + ovs_error(error, "set_nonblocking on \"%s\" failed", tap_dev); close(tap_fd); return error; } @@ -1387,12 +1387,12 @@ init_netdev(void) af_inet_sock = socket(AF_INET, SOCK_DGRAM, 0); if (af_inet_sock < 0) { - ofp_fatal(errno, "socket(AF_INET)"); + ovs_fatal(errno, "socket(AF_INET)"); } error = nl_sock_create(NETLINK_ROUTE, 0, 0, 0, &rtnl_sock); if (error) { - ofp_fatal(error, "socket(AF_NETLINK, NETLINK_ROUTE)"); + ovs_fatal(error, "socket(AF_NETLINK, NETLINK_ROUTE)"); } /* Decide on the netdev_get_stats() implementation to use. Netlink is diff --git a/lib/odp-util.h b/lib/odp-util.h index 16b85cd2..e84bb4d8 100644 --- a/lib/odp-util.h +++ b/lib/odp-util.h @@ -36,8 +36,8 @@ #include #include -#include "openflow/datapath-protocol.h" #include "openflow/openflow.h" +#include "openvswitch/datapath-protocol.h" struct ds; diff --git a/lib/ofp-print.c b/lib/ofp-print.c index 1883049d..3b78feeb 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -82,14 +82,14 @@ ofp_packet_to_string(const void *data, size_t len, size_t total_len UNUSED) pcap = tmpfile(); if (!pcap) { - ofp_error(errno, "tmpfile"); + ovs_error(errno, "tmpfile"); return xstrdup(""); } pcap_write_header(pcap); pcap_write(pcap, &buf); fflush(pcap); if (ferror(pcap)) { - ofp_error(errno, "error writing temporary file"); + ovs_error(errno, "error writing temporary file"); } rewind(pcap); @@ -98,7 +98,7 @@ ofp_packet_to_string(const void *data, size_t len, size_t total_len UNUSED) tcpdump = popen(command, "r"); fclose(pcap); if (!tcpdump) { - ofp_error(errno, "exec(\"%s\")", command); + ovs_error(errno, "exec(\"%s\")", command); return xstrdup(""); } @@ -109,9 +109,9 @@ ofp_packet_to_string(const void *data, size_t len, size_t total_len UNUSED) status = pclose(tcpdump); if (WIFEXITED(status)) { if (WEXITSTATUS(status)) - ofp_error(0, "tcpdump exited with status %d", WEXITSTATUS(status)); + ovs_error(0, "tcpdump exited with status %d", WEXITSTATUS(status)); } else if (WIFSIGNALED(status)) { - ofp_error(0, "tcpdump exited with signal %d", WTERMSIG(status)); + ovs_error(0, "tcpdump exited with signal %d", WTERMSIG(status)); } return ds_cstr(&ds); } diff --git a/lib/process.c b/lib/process.c index 755ad2e1..13d03fc7 100644 --- a/lib/process.c +++ b/lib/process.c @@ -92,7 +92,7 @@ process_init(void) /* Create notification pipe. */ if (pipe(fds)) { - ofp_fatal(errno, "could not create pipe"); + ovs_fatal(errno, "could not create pipe"); } set_nonblocking(fds[0]); set_nonblocking(fds[1]); @@ -103,7 +103,7 @@ process_init(void) sigemptyset(&sa.sa_mask); sa.sa_flags = SA_NOCLDSTOP | SA_RESTART; if (sigaction(SIGCHLD, &sa, NULL)) { - ofp_fatal(errno, "sigaction(SIGCHLD) failed"); + ovs_fatal(errno, "sigaction(SIGCHLD) failed"); } } @@ -421,7 +421,7 @@ block_sigchld(sigset_t *oldsigs) sigemptyset(&sigchld); sigaddset(&sigchld, SIGCHLD); if (sigprocmask(SIG_BLOCK, &sigchld, oldsigs)) { - ofp_fatal(errno, "sigprocmask"); + ovs_fatal(errno, "sigprocmask"); } } @@ -429,6 +429,6 @@ static void unblock_sigchld(const sigset_t *oldsigs) { if (sigprocmask(SIG_SETMASK, oldsigs, NULL)) { - ofp_fatal(errno, "sigprocmask"); + ovs_fatal(errno, "sigprocmask"); } } diff --git a/lib/queue.c b/lib/queue.c index 33e50067..525b1c90 100644 --- a/lib/queue.c +++ b/lib/queue.c @@ -38,11 +38,11 @@ #include "leak-checker.h" #include "ofpbuf.h" -static void check_queue(struct ofp_queue *q); +static void check_queue(struct ovs_queue *q); /* Initializes 'q' as an empty packet queue. */ void -queue_init(struct ofp_queue *q) +queue_init(struct ovs_queue *q) { q->n = 0; q->head = NULL; @@ -51,7 +51,7 @@ queue_init(struct ofp_queue *q) /* Destroys 'q' and all of the packets that it contains. */ void -queue_destroy(struct ofp_queue *q) +queue_destroy(struct ovs_queue *q) { struct ofpbuf *cur, *next; for (cur = q->head; cur != NULL; cur = next) { @@ -62,7 +62,7 @@ queue_destroy(struct ofp_queue *q) /* Removes and destroys all of the packets in 'q', rendering it empty. */ void -queue_clear(struct ofp_queue *q) +queue_clear(struct ovs_queue *q) { queue_destroy(q); queue_init(q); @@ -75,7 +75,7 @@ queue_clear(struct ofp_queue *q) * passed to a function for possible consumption (and destruction) and only * dropped from the queue if that function actually accepts it. */ void -queue_advance_head(struct ofp_queue *q, struct ofpbuf *next) +queue_advance_head(struct ovs_queue *q, struct ofpbuf *next) { assert(q->n); assert(q->head); @@ -88,7 +88,7 @@ queue_advance_head(struct ofp_queue *q, struct ofpbuf *next) /* Appends 'b' to the tail of 'q'. */ void -queue_push_tail(struct ofp_queue *q, struct ofpbuf *b) +queue_push_tail(struct ovs_queue *q, struct ofpbuf *b) { check_queue(q); leak_checker_claim(b); @@ -108,7 +108,7 @@ queue_push_tail(struct ofp_queue *q, struct ofpbuf *b) * it. The caller must free the buffer (with ofpbuf_delete()) when it is no * longer needed. */ struct ofpbuf * -queue_pop_head(struct ofp_queue *q) +queue_pop_head(struct ovs_queue *q) { struct ofpbuf *head = q->head; queue_advance_head(q, head->next); @@ -117,7 +117,7 @@ queue_pop_head(struct ofp_queue *q) /* Checks the internal integrity of 'q'. For use in debugging. */ static void -check_queue(struct ofp_queue *q UNUSED) +check_queue(struct ovs_queue *q UNUSED) { #if 0 struct ofpbuf *iter; diff --git a/lib/queue.h b/lib/queue.h index 8221c447..4d1e0aef 100644 --- a/lib/queue.h +++ b/lib/queue.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -35,17 +35,17 @@ #define QUEUE_H 1 /* Packet queue. */ -struct ofp_queue { +struct ovs_queue { int n; /* Number of queued packets. */ struct ofpbuf *head; /* First queued packet, null if n == 0. */ struct ofpbuf *tail; /* Last queued packet, null if n == 0. */ }; -void queue_init(struct ofp_queue *); -void queue_destroy(struct ofp_queue *); -void queue_clear(struct ofp_queue *); -void queue_advance_head(struct ofp_queue *, struct ofpbuf *next); -void queue_push_tail(struct ofp_queue *, struct ofpbuf *); -struct ofpbuf *queue_pop_head(struct ofp_queue *); +void queue_init(struct ovs_queue *); +void queue_destroy(struct ovs_queue *); +void queue_clear(struct ovs_queue *); +void queue_advance_head(struct ovs_queue *, struct ofpbuf *next); +void queue_push_tail(struct ovs_queue *, struct ofpbuf *); +struct ofpbuf *queue_pop_head(struct ovs_queue *); #endif /* queue.h */ diff --git a/lib/random.c b/lib/random.c index 14be87e5..f1275aaa 100644 --- a/lib/random.c +++ b/lib/random.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -48,7 +48,7 @@ random_init(void) struct timeval tv; inited = true; if (gettimeofday(&tv, NULL) < 0) { - ofp_fatal(errno, "gettimeofday"); + ovs_fatal(errno, "gettimeofday"); } srand(tv.tv_sec ^ tv.tv_usec); } diff --git a/lib/rconn.c b/lib/rconn.c index b0453422..9564007a 100644 --- a/lib/rconn.c +++ b/lib/rconn.c @@ -84,7 +84,7 @@ struct rconn { char *name; bool reliable; - struct ofp_queue txq; + struct ovs_queue txq; int backoff; int max_backoff; diff --git a/lib/signals.c b/lib/signals.c index 93327b1f..c47ebd0f 100644 --- a/lib/signals.c +++ b/lib/signals.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -75,7 +75,7 @@ signal_init(void) if (!inited) { inited = true; if (pipe(fds)) { - ofp_fatal(errno, "could not create pipe"); + ovs_fatal(errno, "could not create pipe"); } set_nonblocking(fds[0]); set_nonblocking(fds[1]); @@ -100,7 +100,7 @@ signal_register(int signr) sigemptyset(&sa.sa_mask); sa.sa_flags = SA_RESTART; if (sigaction(signr, &sa, NULL)) { - ofp_fatal(errno, "sigaction(%d) failed", signr); + ovs_fatal(errno, "sigaction(%d) failed", signr); } /* Return structure. */ diff --git a/lib/timeval.c b/lib/timeval.c index 0755e0d2..84384f71 100644 --- a/lib/timeval.c +++ b/lib/timeval.c @@ -86,7 +86,7 @@ time_init(void) sigemptyset(&sa.sa_mask); sa.sa_flags = SA_RESTART; if (sigaction(SIGALRM, &sa, NULL)) { - ofp_fatal(errno, "sigaction(SIGALRM) failed"); + ovs_fatal(errno, "sigaction(SIGALRM) failed"); } /* Set up periodic timer. */ @@ -94,7 +94,7 @@ time_init(void) itimer.it_interval.tv_usec = TIME_UPDATE_INTERVAL * 1000; itimer.it_value = itimer.it_interval; if (setitimer(ITIMER_REAL, &itimer, NULL)) { - ofp_fatal(errno, "setitimer failed"); + ovs_fatal(errno, "setitimer failed"); } } @@ -234,7 +234,7 @@ block_sigalrm(sigset_t *oldsigs) sigemptyset(&sigalrm); sigaddset(&sigalrm, SIGALRM); if (sigprocmask(SIG_BLOCK, &sigalrm, oldsigs)) { - ofp_fatal(errno, "sigprocmask"); + ovs_fatal(errno, "sigprocmask"); } } @@ -242,7 +242,7 @@ static void unblock_sigalrm(const sigset_t *oldsigs) { if (sigprocmask(SIG_SETMASK, oldsigs, NULL)) { - ofp_fatal(errno, "sigprocmask"); + ovs_fatal(errno, "sigprocmask"); } } diff --git a/lib/unixctl.c b/lib/unixctl.c index 4bf1c7a4..269d5493 100644 --- a/lib/unixctl.c +++ b/lib/unixctl.c @@ -204,10 +204,10 @@ unixctl_server_create(const char *path, struct unixctl_server **serverp) if (path[0] == '/') { server->path = xstrdup(path); } else { - server->path = xasprintf("%s/%s", ofp_rundir, path); + server->path = xasprintf("%s/%s", ovs_rundir, path); } } else { - server->path = xasprintf("%s/%s.%ld.ctl", ofp_rundir, + server->path = xasprintf("%s/%s.%ld.ctl", ovs_rundir, program_name, (long int) getpid()); } @@ -464,7 +464,7 @@ unixctl_server_destroy(struct unixctl_server *server) /* Connects to a Vlog server socket. 'path' should be the name of a Vlog * server socket. If it does not start with '/', it will be prefixed with - * ofp_rundir (e.g. /var/run). + * ovs_rundir (e.g. /var/run). * * Returns 0 if successful, otherwise a positive errno value. If successful, * sets '*clientp' to the new unixctl_client, otherwise to NULL. */ @@ -481,7 +481,7 @@ unixctl_client_create(const char *path, struct unixctl_client **clientp) if (path[0] == '/') { client->connect_path = xstrdup(path); } else { - client->connect_path = xasprintf("%s/%s", ofp_rundir, path); + client->connect_path = xasprintf("%s/%s", ovs_rundir, path); } client->bind_path = xasprintf("/tmp/vlog.%ld.%d", (long int) getpid(), counter++); diff --git a/lib/util.c b/lib/util.c index d39a9318..0c9d87bc 100644 --- a/lib/util.c +++ b/lib/util.c @@ -45,7 +45,7 @@ const char *program_name; void out_of_memory(void) { - ofp_fatal(0, "virtual memory exhausted"); + ovs_fatal(0, "virtual memory exhausted"); } void * @@ -154,7 +154,7 @@ strlcpy(char *dst, const char *src, size_t size) } void -ofp_fatal(int err_no, const char *format, ...) +ovs_fatal(int err_no, const char *format, ...) { va_list args; @@ -170,7 +170,7 @@ ofp_fatal(int err_no, const char *format, ...) } void -ofp_error(int err_no, const char *format, ...) +ovs_error(int err_no, const char *format, ...) { int save_errno = errno; va_list args; @@ -199,7 +199,7 @@ void set_program_name(const char *argv0) * byte in 'buf'. If 'ascii' is true then the corresponding ASCII characters * are also rendered alongside. */ void -ofp_hex_dump(FILE *stream, const void *buf_, size_t size, +ovs_hex_dump(FILE *stream, const void *buf_, size_t size, uintptr_t ofs, bool ascii) { const uint8_t *buf = buf_; diff --git a/lib/util.h b/lib/util.h index cf6cd6b1..ec657927 100644 --- a/lib/util.h +++ b/lib/util.h @@ -112,10 +112,10 @@ void *x2nrealloc(void *p, size_t *n, size_t s); void strlcpy(char *dst, const char *src, size_t size); #endif -void ofp_fatal(int err_no, const char *format, ...) +void ovs_fatal(int err_no, const char *format, ...) PRINTF_FORMAT(2, 3) NO_RETURN; -void ofp_error(int err_no, const char *format, ...) PRINTF_FORMAT(2, 3); -void ofp_hex_dump(FILE *, const void *, size_t, uintptr_t offset, bool ascii); +void ovs_error(int err_no, const char *format, ...) PRINTF_FORMAT(2, 3); +void ovs_hex_dump(FILE *, const void *, size_t, uintptr_t offset, bool ascii); bool str_to_int(const char *, int base, int *); bool str_to_long(const char *, int base, long *); diff --git a/lib/vconn-ssl.c b/lib/vconn-ssl.c index 9318f705..77841d7d 100644 --- a/lib/vconn-ssl.c +++ b/lib/vconn-ssl.c @@ -303,7 +303,7 @@ ssl_open(const char *name, char *suffix, struct vconn **vconnp) host_name = strtok_r(suffix, "::", &save_ptr); port_string = strtok_r(NULL, "::", &save_ptr); if (!host_name) { - ofp_error(0, "%s: bad peer name format", name); + ovs_error(0, "%s: bad peer name format", name); return EAFNOSUPPORT; } @@ -1002,7 +1002,7 @@ tmp_dh_callback(SSL *ssl UNUSED, int is_export UNUSED, int keylength) if (!dh->dh) { dh->dh = dh->constructor(); if (!dh->dh) { - ofp_fatal(ENOMEM, "out of memory constructing " + ovs_fatal(ENOMEM, "out of memory constructing " "Diffie-Hellman parameters"); } } diff --git a/lib/vconn-tcp.c b/lib/vconn-tcp.c index ed6072ab..a3b32bff 100644 --- a/lib/vconn-tcp.c +++ b/lib/vconn-tcp.c @@ -88,7 +88,7 @@ tcp_open(const char *name, char *suffix, struct vconn **vconnp) host_name = strtok_r(suffix, "::", &save_ptr); port_string = strtok_r(NULL, "::", &save_ptr); if (!host_name) { - ofp_error(0, "%s: bad peer name format", name); + ovs_error(0, "%s: bad peer name format", name); return EAFNOSUPPORT; } diff --git a/lib/vlog-modules.def b/lib/vlog-modules.def index f0f52f5b..33a7d106 100644 --- a/lib/vlog-modules.def +++ b/lib/vlog-modules.def @@ -27,7 +27,7 @@ VLOG_MODULE(mgmt) VLOG_MODULE(netdev) VLOG_MODULE(netflow) VLOG_MODULE(netlink) -VLOG_MODULE(ofp_discover) +VLOG_MODULE(ovs_discover) VLOG_MODULE(ofproto) VLOG_MODULE(pktbuf) VLOG_MODULE(pcap) diff --git a/lib/vlog.c b/lib/vlog.c index c6452ad6..8c7e38c1 100644 --- a/lib/vlog.c +++ b/lib/vlog.c @@ -288,7 +288,7 @@ vlog_set_log_file(const char *file_name) old_log_file_name = log_file_name; log_file_name = (file_name ? xstrdup(file_name) - : xasprintf("%s/%s.log", ofp_logdir, program_name)); + : xasprintf("%s/%s.log", ovs_logdir, program_name)); free(old_log_file_name); file_name = NULL; /* Might have been freed. */ @@ -394,7 +394,7 @@ vlog_set_verbosity(const char *arg) if (arg) { char *msg = vlog_set_levels_from_string(arg); if (msg) { - ofp_fatal(0, "processing \"%s\": %s", arg, msg); + ovs_fatal(0, "processing \"%s\": %s", arg, msg); } } else { vlog_set_levels(VLM_ANY_MODULE, VLF_ANY_FACILITY, VLL_DBG); @@ -724,5 +724,5 @@ vlog_usage(void) " -v, --verbose set maximum verbosity level\n" " --log-file[=FILE] enable logging to specified FILE\n" " (default: %s/%s.log)\n", - ofp_logdir, program_name); + ovs_logdir, program_name); } diff --git a/m4/libopenflow.m4 b/m4/libopenvswitch.m4 similarity index 84% rename from m4/libopenflow.m4 rename to m4/libopenvswitch.m4 index e0023f1b..2a603f4a 100644 --- a/m4/libopenflow.m4 +++ b/m4/libopenvswitch.m4 @@ -33,7 +33,7 @@ # derivatives without specific, written prior permission. dnl Checks for --enable-ndebug and defines NDEBUG if it is specified. -AC_DEFUN([OFP_CHECK_NDEBUG], +AC_DEFUN([OVS_CHECK_NDEBUG], [AC_ARG_ENABLE( [ndebug], [AC_HELP_STRING([--enable-ndebug], @@ -47,7 +47,7 @@ AC_DEFUN([OFP_CHECK_NDEBUG], AM_CONDITIONAL([NDEBUG], [test x$ndebug = xtrue])]) dnl Checks for Netlink support. -AC_DEFUN([OFP_CHECK_NETLINK], +AC_DEFUN([OVS_CHECK_NETLINK], [AC_CHECK_HEADER([linux/netlink.h], [HAVE_NETLINK=yes], [HAVE_NETLINK=no], @@ -61,7 +61,7 @@ AC_DEFUN([OFP_CHECK_NETLINK], fi]) dnl Checks for OpenSSL, if --enable-ssl is passed in. -AC_DEFUN([OFP_CHECK_OPENSSL], +AC_DEFUN([OVS_CHECK_OPENSSL], [AC_ARG_ENABLE( [ssl], [AC_HELP_STRING([--enable-ssl], @@ -83,7 +83,7 @@ AC_DEFUN([OFP_CHECK_OPENSSL], $SSL_PKG_ERRORS - OpenFlow will not support SSL connections.])]) + OpenFlow connections over SSL will not be supported.])]) fi AM_CONDITIONAL([HAVE_OPENSSL], [test "$HAVE_OPENSSL" = yes]) @@ -92,7 +92,7 @@ AC_DEFUN([OFP_CHECK_OPENSSL], fi]) dnl Checks for --enable-snat and defines SUPPORT_SNAT if it is specified. -AC_DEFUN([OFP_CHECK_SNAT], +AC_DEFUN([OVS_CHECK_SNAT], [AC_ARG_ENABLE( [snat], [AC_HELP_STRING([--enable-snat], @@ -111,27 +111,27 @@ AC_DEFUN([OFP_CHECK_SNAT], fi]) dnl Checks for libraries needed by lib/fault.c. -AC_DEFUN([OFP_CHECK_FAULT_LIBS], +AC_DEFUN([OVS_CHECK_FAULT_LIBS], [AC_CHECK_LIB([dl], [dladdr], [FAULT_LIBS=-ldl]) AC_SUBST([FAULT_LIBS])]) dnl Checks for libraries needed by lib/socket-util.c. -AC_DEFUN([OFP_CHECK_SOCKET_LIBS], +AC_DEFUN([OVS_CHECK_SOCKET_LIBS], [AC_CHECK_LIB([socket], [connect]) AC_SEARCH_LIBS([gethostbyname], [resolv], [RESOLVER_LIBS=-lresolv])]) dnl Checks for the directory in which to store the PKI. -AC_DEFUN([OFP_CHECK_PKIDIR], +AC_DEFUN([OVS_CHECK_PKIDIR], [AC_ARG_WITH( [pkidir], AC_HELP_STRING([--with-pkidir=DIR], - [PKI hierarchy directory [[DATADIR/openflow/pki]]]), + [PKI hierarchy directory [[DATADIR/openvswitch/pki]]]), [PKIDIR=$withval], [PKIDIR='${pkgdatadir}/pki']) AC_SUBST([PKIDIR])]) dnl Checks for the directory in which to store pidfiles. -AC_DEFUN([OFP_CHECK_RUNDIR], +AC_DEFUN([OVS_CHECK_RUNDIR], [AC_ARG_WITH( [rundir], AC_HELP_STRING([--with-rundir=DIR], @@ -141,7 +141,7 @@ AC_DEFUN([OFP_CHECK_RUNDIR], AC_SUBST([RUNDIR])]) dnl Checks for the directory in which to store logs. -AC_DEFUN([OFP_CHECK_LOGDIR], +AC_DEFUN([OVS_CHECK_LOGDIR], [AC_ARG_WITH( [logdir], AC_HELP_STRING([--with-logdir=DIR], @@ -151,10 +151,10 @@ AC_DEFUN([OFP_CHECK_LOGDIR], AC_SUBST([LOGDIR])]) dnl Checks for __malloc_hook, etc., supported by glibc. -AC_DEFUN([OFP_CHECK_MALLOC_HOOKS], +AC_DEFUN([OVS_CHECK_MALLOC_HOOKS], [AC_CACHE_CHECK( [whether libc supports hooks for malloc and related functions], - [ofp_cv_malloc_hooks], + [ovs_cv_malloc_hooks], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [#include @@ -162,33 +162,33 @@ AC_DEFUN([OFP_CHECK_MALLOC_HOOKS], [(void) __malloc_hook; (void) __realloc_hook; (void) __free_hook;])], - [ofp_cv_malloc_hooks=yes], - [ofp_cv_malloc_hooks=no])]) - if test $ofp_cv_malloc_hooks = yes; then + [ovs_cv_malloc_hooks=yes], + [ovs_cv_malloc_hooks=no])]) + if test $ovs_cv_malloc_hooks = yes; then AC_DEFINE([HAVE_MALLOC_HOOKS], [1], [Define to 1 if you have __malloc_hook, __realloc_hook, and __free_hook in .]) fi]) dnl Checks for valgrind/valgrind.h. -AC_DEFUN([OFP_CHECK_VALGRIND], +AC_DEFUN([OVS_CHECK_VALGRIND], [AC_CHECK_HEADERS([valgrind/valgrind.h])]) dnl Runs the checks required to include the headers in include/ and -dnl link against lib/libopenflow.a. -AC_DEFUN([OFP_CHECK_LIBOPENFLOW], +dnl link against lib/libopenvswitch.a. +AC_DEFUN([OVS_CHECK_LIBOPENVSWITCH], [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([AC_C_BIGENDIAN]) - AC_REQUIRE([OFP_CHECK_NDEBUG]) - AC_REQUIRE([OFP_CHECK_NETLINK]) - AC_REQUIRE([OFP_CHECK_OPENSSL]) - AC_REQUIRE([OFP_CHECK_SNAT]) - AC_REQUIRE([OFP_CHECK_FAULT_LIBS]) - AC_REQUIRE([OFP_CHECK_SOCKET_LIBS]) - AC_REQUIRE([OFP_CHECK_PKIDIR]) - AC_REQUIRE([OFP_CHECK_RUNDIR]) - AC_REQUIRE([OFP_CHECK_LOGDIR]) - AC_REQUIRE([OFP_CHECK_MALLOC_HOOKS]) - AC_REQUIRE([OFP_CHECK_VALGRIND]) + AC_REQUIRE([OVS_CHECK_NDEBUG]) + AC_REQUIRE([OVS_CHECK_NETLINK]) + AC_REQUIRE([OVS_CHECK_OPENSSL]) + AC_REQUIRE([OVS_CHECK_SNAT]) + AC_REQUIRE([OVS_CHECK_FAULT_LIBS]) + AC_REQUIRE([OVS_CHECK_SOCKET_LIBS]) + AC_REQUIRE([OVS_CHECK_PKIDIR]) + AC_REQUIRE([OVS_CHECK_RUNDIR]) + AC_REQUIRE([OVS_CHECK_LOGDIR]) + AC_REQUIRE([OVS_CHECK_MALLOC_HOOKS]) + AC_REQUIRE([OVS_CHECK_VALGRIND]) AC_CHECK_FUNCS([strlcpy])]) diff --git a/secchan/automake.mk b/secchan/automake.mk index d3e4e819..cf24b353 100644 --- a/secchan/automake.mk +++ b/secchan/automake.mk @@ -4,7 +4,7 @@ man_MANS += secchan/secchan.8 secchan_secchan_SOURCES = secchan/main.c secchan_secchan_LDADD = \ secchan/libsecchan.a \ - lib/libopenflow.a \ + lib/libopenvswitch.a \ $(FAULT_LIBS) \ $(SSL_LIBS) diff --git a/secchan/commands/reboot b/secchan/commands/reboot index 4d5145cd..42fd10c1 100755 --- a/secchan/commands/reboot +++ b/secchan/commands/reboot @@ -1,3 +1,3 @@ #! /bin/sh -ofp-kill --force --signal=USR1 ofp-switchui.pid +ovs-kill --force --signal=USR1 ovs-switchui.pid reboot diff --git a/secchan/executer.c b/secchan/executer.c index 5f39c0f5..a1d2bade 100644 --- a/secchan/executer.c +++ b/secchan/executer.c @@ -499,7 +499,7 @@ executer_create(const char *command_acl, const char *command_dir, e->command_acl = xstrdup(command_acl); e->command_dir = (command_dir ? xstrdup(command_dir) - : xasprintf("%s/commands", ofp_pkgdatadir)); + : xasprintf("%s/commands", ovs_pkgdatadir)); e->n_children = 0; *executerp = e; return 0; diff --git a/secchan/main.c b/secchan/main.c index 334e3196..dc046819 100644 --- a/secchan/main.c +++ b/secchan/main.c @@ -149,25 +149,25 @@ main(int argc, char *argv[]) /* Start listening for vlogconf requests. */ error = unixctl_server_create(NULL, &unixctl); if (error) { - ofp_fatal(error, "Could not listen for unixctl connections"); + ovs_fatal(error, "Could not listen for unixctl connections"); } - VLOG_INFO("OpenFlow reference implementation version %s", VERSION BUILDNR); + VLOG_INFO("OpenVSwitch version %s", VERSION BUILDNR); VLOG_INFO("OpenFlow protocol version 0x%02x", OFP_VERSION); /* Start OpenFlow processing. */ error = ofproto_create(s.dp_name, NULL, NULL, &ofproto); if (error) { - ofp_fatal(error, "could not initialize openflow switch"); + ovs_fatal(error, "could not initialize openflow switch"); } error = ofproto_set_in_band(ofproto, s.in_band); if (error) { - ofp_fatal(error, "failed to configure in-band control"); + ovs_fatal(error, "failed to configure in-band control"); } error = ofproto_set_discovery(ofproto, s.discovery, s.accept_controller_re, s.update_resolv_conf); if (error) { - ofp_fatal(error, "failed to configure controller discovery"); + ovs_fatal(error, "failed to configure controller discovery"); } if (s.datapath_id) { ofproto_set_datapath_id(ofproto, s.datapath_id); @@ -178,16 +178,16 @@ main(int argc, char *argv[]) ofproto_set_desc(ofproto, s.mfr_desc, s.hw_desc, s.sw_desc, s.serial_desc); error = ofproto_set_listeners(ofproto, &s.listeners); if (error) { - ofp_fatal(error, "failed to configure management connections"); + ovs_fatal(error, "failed to configure management connections"); } error = ofproto_set_snoops(ofproto, &s.snoops); if (error) { - ofp_fatal(error, + ovs_fatal(error, "failed to configure controller snooping connections"); } error = ofproto_set_netflow(ofproto, &s.netflow); if (error) { - ofp_fatal(error, "failed to configure NetFlow collectors"); + ovs_fatal(error, "failed to configure NetFlow collectors"); } ofproto_set_failure(ofproto, s.fail_mode == FAIL_OPEN); ofproto_set_probe_interval(ofproto, s.probe_interval); @@ -195,24 +195,24 @@ main(int argc, char *argv[]) ofproto_set_rate_limit(ofproto, s.rate_limit, s.burst_limit); error = ofproto_set_stp(ofproto, s.enable_stp); if (error) { - ofp_fatal(error, "failed to configure STP"); + ovs_fatal(error, "failed to configure STP"); } error = ofproto_set_remote_execution(ofproto, s.command_acl, s.command_dir); if (error) { - ofp_fatal(error, "failed to configure remote command execution"); + ovs_fatal(error, "failed to configure remote command execution"); } if (!s.discovery) { error = ofproto_set_controller(ofproto, s.controller_name); if (error) { - ofp_fatal(error, "failed to configure controller"); + ovs_fatal(error, "failed to configure controller"); } } while (ofproto_is_alive(ofproto)) { error = ofproto_run(ofproto); if (error) { - ofp_fatal(error, "unrecoverable datapath error"); + ovs_fatal(error, "unrecoverable datapath error"); } unixctl_server_run(unixctl); @@ -331,12 +331,12 @@ parse_options(int argc, char *argv[], struct ofsettings *s) case OPT_DATAPATH_ID: if (strlen(optarg) != 12 || strspn(optarg, "0123456789abcdefABCDEF") != 12) { - ofp_fatal(0, "argument to --datapath-id must be " + ovs_fatal(0, "argument to --datapath-id must be " "exactly 12 hex digits"); } s->datapath_id = strtoll(optarg, NULL, 16); if (!s->datapath_id) { - ofp_fatal(0, "argument to --datapath-id must be nonzero"); + ovs_fatal(0, "argument to --datapath-id must be nonzero"); } break; @@ -370,7 +370,7 @@ parse_options(int argc, char *argv[], struct ofsettings *s) } else if (!strcmp(optarg, "closed")) { s->fail_mode = FAIL_CLOSED; } else { - ofp_fatal(0, "-f or --fail argument must be \"open\" " + ovs_fatal(0, "-f or --fail argument must be \"open\" " "or \"closed\""); } break; @@ -378,7 +378,7 @@ parse_options(int argc, char *argv[], struct ofsettings *s) case OPT_INACTIVITY_PROBE: s->probe_interval = atoi(optarg); if (s->probe_interval < 5) { - ofp_fatal(0, "--inactivity-probe argument must be at least 5"); + ovs_fatal(0, "--inactivity-probe argument must be at least 5"); } break; @@ -388,7 +388,7 @@ parse_options(int argc, char *argv[], struct ofsettings *s) } else { s->max_idle = atoi(optarg); if (s->max_idle < 1 || s->max_idle > 65535) { - ofp_fatal(0, "--max-idle argument must be between 1 and " + ovs_fatal(0, "--max-idle argument must be between 1 and " "65535 or the word 'permanent'"); } } @@ -397,7 +397,7 @@ parse_options(int argc, char *argv[], struct ofsettings *s) case OPT_MAX_BACKOFF: s->max_backoff = atoi(optarg); if (s->max_backoff < 1) { - ofp_fatal(0, "--max-backoff argument must be at least 1"); + ovs_fatal(0, "--max-backoff argument must be at least 1"); } else if (s->max_backoff > 3600) { s->max_backoff = 3600; } @@ -407,7 +407,7 @@ parse_options(int argc, char *argv[], struct ofsettings *s) if (optarg) { s->rate_limit = atoi(optarg); if (s->rate_limit < 1) { - ofp_fatal(0, "--rate-limit argument must be at least 1"); + ovs_fatal(0, "--rate-limit argument must be at least 1"); } } else { s->rate_limit = 1000; @@ -417,7 +417,7 @@ parse_options(int argc, char *argv[], struct ofsettings *s) case OPT_BURST_LIMIT: s->burst_limit = atoi(optarg); if (s->burst_limit < 1) { - ofp_fatal(0, "--burst-limit argument must be at least 1"); + ovs_fatal(0, "--burst-limit argument must be at least 1"); } break; @@ -454,12 +454,12 @@ parse_options(int argc, char *argv[], struct ofsettings *s) case OPT_MGMT_ID: if (strlen(optarg) != 12 || strspn(optarg, "0123456789abcdefABCDEF") != 12) { - ofp_fatal(0, "argument to --mgmt-id must be " + ovs_fatal(0, "argument to --mgmt-id must be " "exactly 12 hex digits"); } s->mgmt_id = strtoll(optarg, NULL, 16); if (!s->mgmt_id) { - ofp_fatal(0, "argument to --mgmt-id must be nonzero"); + ovs_fatal(0, "argument to --mgmt-id must be nonzero"); } break; @@ -505,7 +505,7 @@ parse_options(int argc, char *argv[], struct ofsettings *s) argc -= optind; argv += optind; if (argc < 1 || argc > 2) { - ofp_fatal(0, "need one or two non-option arguments; " + ovs_fatal(0, "need one or two non-option arguments; " "use --help for usage"); } @@ -521,7 +521,7 @@ parse_options(int argc, char *argv[], struct ofsettings *s) /* Mode of operation. */ s->discovery = s->controller_name == NULL; if (s->discovery && !s->in_band) { - ofp_fatal(0, "Cannot perform discovery with out-of-band control"); + ovs_fatal(0, "Cannot perform discovery with out-of-band control"); } /* Rate limiting. */ @@ -533,7 +533,7 @@ parse_options(int argc, char *argv[], struct ofsettings *s) static void usage(void) { - printf("%s: secure channel, a relay for OpenFlow messages.\n" + printf("%s: an OpenFlow switch implementation.\n" "usage: %s [OPTIONS] DATAPATH [CONTROLLER]\n" "DATAPATH is a local datapath (e.g. \"dp0\").\n" "CONTROLLER is an active OpenFlow connection method; if it is\n" @@ -574,7 +574,7 @@ usage(void) "\nRemote command execution options:\n" " --command-acl=[!]GLOB[,[!]GLOB...] set allowed/denied commands\n" " --command-dir=DIR set command dir (default: %s/commands)\n", - ofp_pkgdatadir); + ovs_pkgdatadir); daemon_usage(); vlog_usage(); printf("\nOther options:\n" diff --git a/secchan/netflow.c b/secchan/netflow.c index f2edd58b..99285a0e 100644 --- a/secchan/netflow.c +++ b/secchan/netflow.c @@ -133,11 +133,11 @@ open_collector(char *dst) host_name = strtok_r(dst, "::", &save_ptr); port_string = strtok_r(NULL, "::", &save_ptr); if (!host_name) { - ofp_error(0, "%s: bad peer name format", dst); + ovs_error(0, "%s: bad peer name format", dst); return -EAFNOSUPPORT; } if (!port_string) { - ofp_error(0, "%s: bad port format", dst); + ovs_error(0, "%s: bad port format", dst); return -EAFNOSUPPORT; } diff --git a/secchan/ofproto.c b/secchan/ofproto.c index b3bc065b..7a582478 100644 --- a/secchan/ofproto.c +++ b/secchan/ofproto.c @@ -52,10 +52,10 @@ #include "odp-util.h" #include "ofp-print.h" #include "ofpbuf.h" -#include "openflow/datapath-protocol.h" #include "openflow/nicira-ext.h" #include "openflow/openflow.h" #include "openflow/openflow-mgmt.h" +#include "openvswitch/datapath-protocol.h" #include "packets.h" #include "pinsched.h" #include "pktbuf.h" diff --git a/secchan/pinsched.c b/secchan/pinsched.c index 124aab42..9aa048d2 100644 --- a/secchan/pinsched.c +++ b/secchan/pinsched.c @@ -52,7 +52,7 @@ struct pinsched { int burst_limit; /* Maximum token bucket size, in packets. */ /* One queue per physical port. */ - struct port_array queues; /* Array of "struct ofp_queue *". */ + struct port_array queues; /* Array of "struct ovs_queue *". */ int n_queued; /* Sum over queues[*].n. */ unsigned int last_tx_port; /* Last port checked in round-robin. */ @@ -78,7 +78,7 @@ struct pinsched { }; static struct ofpbuf * -dequeue_packet(struct pinsched *ps, struct ofp_queue *q, +dequeue_packet(struct pinsched *ps, struct ovs_queue *q, unsigned int port_no) { struct ofpbuf *packet = queue_pop_head(q); @@ -94,11 +94,11 @@ dequeue_packet(struct pinsched *ps, struct ofp_queue *q, static void drop_packet(struct pinsched *ps) { - struct ofp_queue *longest; /* Queue currently selected as longest. */ + struct ovs_queue *longest; /* Queue currently selected as longest. */ int n_longest; /* # of queues of same length as 'longest'. */ unsigned int longest_port_no; unsigned int port_no; - struct ofp_queue *q; + struct ovs_queue *q; ps->n_queue_dropped++; @@ -129,7 +129,7 @@ drop_packet(struct pinsched *ps) static struct ofpbuf * get_tx_packet(struct pinsched *ps) { - struct ofp_queue *q = port_array_next(&ps->queues, &ps->last_tx_port); + struct ovs_queue *q = port_array_next(&ps->queues, &ps->last_tx_port); if (!q) { q = port_array_first(&ps->queues, &ps->last_tx_port); } @@ -175,7 +175,7 @@ pinsched_send(struct pinsched *ps, uint16_t port_no, cb(packet, aux); } else { /* Otherwise queue it up for the periodic callback to drain out. */ - struct ofp_queue *q; + struct ovs_queue *q; /* We are called with a buffer obtained from dpif_recv() that has much * more allocated space than actual content most of the time. Since @@ -268,7 +268,7 @@ void pinsched_destroy(struct pinsched *ps) { if (ps) { - struct ofp_queue *queue; + struct ovs_queue *queue; unsigned int port_no; PORT_ARRAY_FOR_EACH (queue, &ps->queues, port_no) { diff --git a/secchan/secchan.8.in b/secchan/secchan.8.in index 0bf1293a..1e8ffd82 100644 --- a/secchan/secchan.8.in +++ b/secchan/secchan.8.in @@ -1,4 +1,4 @@ -.TH secchan 8 "March 2009" "OpenFlow" "OpenFlow Manual" +.TH secchan 8 "March 2009" "OpenVSwitch" "OpenVSwitch Manual" .ds PN secchan .SH NAME @@ -462,9 +462,9 @@ require the controller to send the CA certificate, but .SH "SEE ALSO" .BR dpctl (8), -.BR ofp-discover (8), +.BR ovs-discover (8), .BR controller (8), -.BR ofp-pki (8), +.BR ovs-pki (8), .BR udatapath (8), .BR vlogconf (8), .BR vswitchd.conf (5) diff --git a/tests/automake.mk b/tests/automake.mk index 78b8c6ac..dd208fc5 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -1,23 +1,23 @@ TESTS += tests/test-classifier noinst_PROGRAMS += tests/test-classifier tests_test_classifier_SOURCES = tests/test-classifier.c -tests_test_classifier_LDADD = lib/libopenflow.a +tests_test_classifier_LDADD = lib/libopenvswitch.a TESTS += tests/test-flows.sh noinst_PROGRAMS += tests/test-flows tests_test_flows_SOURCES = tests/test-flows.c -tests_test_flows_LDADD = lib/libopenflow.a +tests_test_flows_LDADD = lib/libopenvswitch.a dist_check_SCRIPTS = tests/test-flows.sh tests/flowgen.pl TESTS += tests/test-hmap noinst_PROGRAMS += tests/test-hmap tests_test_hmap_SOURCES = tests/test-hmap.c -tests_test_hmap_LDADD = lib/libopenflow.a +tests_test_hmap_LDADD = lib/libopenvswitch.a TESTS += tests/test-list noinst_PROGRAMS += tests/test-list tests_test_list_SOURCES = tests/test-list.c -tests_test_list_LDADD = lib/libopenflow.a +tests_test_list_LDADD = lib/libopenvswitch.a TESTS += tests/test-type-props noinst_PROGRAMS += tests/test-type-props @@ -25,14 +25,14 @@ tests_test_type_props_SOURCES = tests/test-type-props.c noinst_PROGRAMS += tests/test-dhcp-client tests_test_dhcp_client_SOURCES = tests/test-dhcp-client.c -tests_test_dhcp_client_LDADD = lib/libopenflow.a $(FAULT_LIBS) +tests_test_dhcp_client_LDADD = lib/libopenvswitch.a $(FAULT_LIBS) TESTS += tests/test-stp.sh EXTRA_DIST += tests/test-stp.sh noinst_PROGRAMS += tests/test-stp tests_test_stp_SOURCES = tests/test-stp.c -tests_test_stp_LDADD = lib/libopenflow.a +tests_test_stp_LDADD = lib/libopenvswitch.a stp_files = \ tests/test-stp-ieee802.1d-1998 \ tests/test-stp-ieee802.1d-2004-fig17.4 \ diff --git a/tests/test-dhcp-client.c b/tests/test-dhcp-client.c index f8a1f427..459fc9ab 100644 --- a/tests/test-dhcp-client.c +++ b/tests/test-dhcp-client.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -75,13 +75,13 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; if (argc != 1) { - ofp_fatal(0, "exactly one non-option argument required; " + ovs_fatal(0, "exactly one non-option argument required; " "use --help for help"); } error = dhclient_create(argv[0], modify_dhcp_request, NULL, NULL, &cli); if (error) { - ofp_fatal(error, "dhclient_create failed"); + ovs_fatal(error, "dhclient_create failed"); } dhclient_init(cli, request_ip.s_addr); fatal_signal_add_hook(release, cli, true); @@ -149,7 +149,7 @@ parse_options(int argc, char *argv[]) switch (c) { case OPT_REQUEST_IP: if (!inet_aton(optarg, &request_ip)) { - ofp_fatal(0, + ovs_fatal(0, "--request-ip argument is not a valid IP address"); } break; @@ -187,7 +187,7 @@ parse_options(int argc, char *argv[]) static void usage(void) { - printf("%s: standalone program for testing OpenFlow DHCP client.\n" + printf("%s: standalone program for testing OpenVSwitch DHCP client.\n" "usage: %s [OPTIONS] NETDEV\n" "where NETDEV is a network device (e.g. eth0).\n" "\nDHCP options:\n" diff --git a/tests/test-flows.c b/tests/test-flows.c index 89895e41..663c5a6d 100644 --- a/tests/test-flows.c +++ b/tests/test-flows.c @@ -29,12 +29,12 @@ main(int argc UNUSED, char *argv[]) flows = stdin; pcap = fdopen(3, "rb"); if (!pcap) { - ofp_fatal(errno, "failed to open fd 3 for reading"); + ovs_fatal(errno, "failed to open fd 3 for reading"); } retval = pcap_read_header(pcap); if (retval) { - ofp_fatal(retval > 0 ? retval : 0, "reading pcap header failed"); + ovs_fatal(retval > 0 ? retval : 0, "reading pcap header failed"); } while (fread(&expected_match, sizeof expected_match, 1, flows)) { @@ -46,9 +46,9 @@ main(int argc UNUSED, char *argv[]) retval = pcap_read(pcap, &packet); if (retval == EOF) { - ofp_fatal(0, "unexpected end of file reading pcap file"); + ovs_fatal(0, "unexpected end of file reading pcap file"); } else if (retval) { - ofp_fatal(retval, "error reading pcap file"); + ovs_fatal(retval, "error reading pcap file"); } flow_extract(packet, 1, &flow); diff --git a/tests/test-stp.c b/tests/test-stp.c index ddb7db7e..4f5165a1 100644 --- a/tests/test-stp.c +++ b/tests/test-stp.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -454,13 +454,13 @@ main(int argc, char *argv[]) int i; if (argc != 2) { - ofp_fatal(0, "usage: test-stp INPUT.STP\n"); + ovs_fatal(0, "usage: test-stp INPUT.STP\n"); } file_name = argv[1]; input_file = fopen(file_name, "r"); if (!input_file) { - ofp_fatal(errno, "error opening \"%s\"", file_name); + ovs_fatal(errno, "error opening \"%s\"", file_name); } tc = new_test_case(); diff --git a/utilities/.gitignore b/utilities/.gitignore index 534ef34d..7d824f90 100644 --- a/utilities/.gitignore +++ b/utilities/.gitignore @@ -5,13 +5,13 @@ /dpctl /dpctl.8 /nlmon -/ofp-discover -/ofp-discover.8 -/ofp-kill -/ofp-kill.8 -/ofp-parse-leaks -/ofp-pki -/ofp-pki-cgi -/ofp-pki.8 +/ovs-discover +/ovs-discover.8 +/ovs-kill +/ovs-kill.8 +/ovs-parse-leaks +/ovs-pki +/ovs-pki-cgi +/ovs-pki.8 /vlogconf /vlogconf.8 diff --git a/utilities/automake.mk b/utilities/automake.mk index aa8e9f87..45d694c9 100644 --- a/utilities/automake.mk +++ b/utilities/automake.mk @@ -2,55 +2,55 @@ bin_PROGRAMS += \ utilities/vlogconf \ utilities/cfg-mod \ utilities/dpctl \ - utilities/ofp-discover \ - utilities/ofp-kill + utilities/ovs-discover \ + utilities/ovs-kill noinst_PROGRAMS += utilities/nlmon -bin_SCRIPTS += utilities/ofp-pki -noinst_SCRIPTS += utilities/ofp-pki-cgi utilities/ofp-parse-leaks +bin_SCRIPTS += utilities/ovs-pki +noinst_SCRIPTS += utilities/ovs-pki-cgi utilities/ovs-parse-leaks EXTRA_DIST += \ utilities/cfg-mod.8.in \ utilities/dpctl.8.in \ - utilities/ofp-discover.8.in \ - utilities/ofp-kill.8.in \ - utilities/ofp-parse-leaks.in \ - utilities/ofp-pki-cgi.in \ - utilities/ofp-pki.8.in \ - utilities/ofp-pki.in \ + utilities/ovs-discover.8.in \ + utilities/ovs-kill.8.in \ + utilities/ovs-parse-leaks.in \ + utilities/ovs-pki-cgi.in \ + utilities/ovs-pki.8.in \ + utilities/ovs-pki.in \ utilities/vlogconf.8.in DISTCLEANFILES += \ utilities/cfg-mod.8 \ utilities/dpctl.8 \ - utilities/ofp-discover.8 \ - utilities/ofp-kill.8 \ - utilities/ofp-parse-leaks \ - utilities/ofp-pki \ - utilities/ofp-pki.8 \ - utilities/ofp-pki-cgi \ + utilities/ovs-discover.8 \ + utilities/ovs-kill.8 \ + utilities/ovs-parse-leaks \ + utilities/ovs-pki \ + utilities/ovs-pki.8 \ + utilities/ovs-pki-cgi \ utilities/vlogconf.8 man_MANS += \ utilities/cfg-mod.8 \ utilities/dpctl.8 \ - utilities/ofp-discover.8 \ - utilities/ofp-kill.8 \ - utilities/ofp-pki.8 \ + utilities/ovs-discover.8 \ + utilities/ovs-kill.8 \ + utilities/ovs-pki.8 \ utilities/vlogconf.8 utilities_cfg_mod_SOURCES = utilities/cfg-mod.c -utilities_cfg_mod_LDADD = lib/libopenflow.a +utilities_cfg_mod_LDADD = lib/libopenvswitch.a utilities_dpctl_SOURCES = utilities/dpctl.c -utilities_dpctl_LDADD = lib/libopenflow.a $(FAULT_LIBS) $(SSL_LIBS) +utilities_dpctl_LDADD = lib/libopenvswitch.a $(FAULT_LIBS) $(SSL_LIBS) utilities_vlogconf_SOURCES = utilities/vlogconf.c -utilities_vlogconf_LDADD = lib/libopenflow.a +utilities_vlogconf_LDADD = lib/libopenvswitch.a -utilities_ofp_discover_SOURCES = utilities/ofp-discover.c -utilities_ofp_discover_LDADD = lib/libopenflow.a +utilities_ovs_discover_SOURCES = utilities/ovs-discover.c +utilities_ovs_discover_LDADD = lib/libopenvswitch.a -utilities_ofp_kill_SOURCES = utilities/ofp-kill.c -utilities_ofp_kill_LDADD = lib/libopenflow.a +utilities_ovs_kill_SOURCES = utilities/ovs-kill.c +utilities_ovs_kill_LDADD = lib/libopenvswitch.a utilities_nlmon_SOURCES = utilities/nlmon.c -utilities_nlmon_LDADD = lib/libopenflow.a +utilities_nlmon_LDADD = lib/libopenvswitch.a diff --git a/utilities/cfg-mod.8.in b/utilities/cfg-mod.8.in index 1cb8d6d9..f97727d7 100644 --- a/utilities/cfg-mod.8.in +++ b/utilities/cfg-mod.8.in @@ -1,4 +1,4 @@ -.TH cfg-mod 8 "April 2009" "OpenFlow" "OpenFlow Manual" +.TH cfg-mod 8 "April 2009" "OpenVSwitch" "OpenVSwitch Manual" .ds PN cfg-mod . .SH NAME diff --git a/utilities/cfg-mod.c b/utilities/cfg-mod.c index 5cb1767a..0e3de885 100644 --- a/utilities/cfg-mod.c +++ b/utilities/cfg-mod.c @@ -62,13 +62,13 @@ open_config(char *config_file) error = cfg_set_file(config_file); if (error) { - ofp_fatal(error, "failed to add configuration file \"%s\"", + ovs_fatal(error, "failed to add configuration file \"%s\"", config_file); } error = cfg_lock(NULL, 0); if (error) { - ofp_fatal(error, "could not lock configuration file\n"); + ovs_fatal(error, "could not lock configuration file\n"); } } @@ -119,7 +119,7 @@ int main(int argc, char *argv[]) if ((option > UCHAR_MAX || !strchr("Fh?", option)) && config_set == false) { - ofp_fatal(0, "no config file specified (use --help for help)"); + ovs_fatal(0, "no config file specified (use --help for help)"); } switch (option) { @@ -166,7 +166,7 @@ int main(int argc, char *argv[]) free(short_options); if (optind != argc) { - ofp_fatal(0, "non-option arguments not accepted " + ovs_fatal(0, "non-option arguments not accepted " "(use --help for help)"); } diff --git a/utilities/dpctl.8.in b/utilities/dpctl.8.in index 9397ee60..4c6b6882 100644 --- a/utilities/dpctl.8.in +++ b/utilities/dpctl.8.in @@ -1,8 +1,8 @@ -.TH dpctl 8 "March 2009" "OpenFlow" "OpenFlow Manual" +.TH dpctl 8 "March 2009" "OpenVSwitch" "OpenVSwitch Manual" .ds PN dpctl .SH NAME -dpctl \- administer OpenFlow switches and datapaths +dpctl \- administer OpenVSwitch datapaths and OpenFlow switches .SH SYNOPSIS .B dpctl @@ -11,18 +11,18 @@ dpctl \- administer OpenFlow switches and datapaths .SH DESCRIPTION The .B dpctl -program is a command line tool primarily for monitoring and -administering OpenFlow switches. It is able to show the current state -of a switch, including features, configuration, and table entries. +program is a command line tool for monitoring and administering +OpenVSwitch datapaths and OpenFlow switches. .B dpctl -can also add, delete, and modify OpenFlow reference implementation -datapaths. +can add, delete, and modify OpenVSwitch datapaths. It can also show +the current state of an OpenFlow switch, including features, +configuration, and table entries. -.SS "Datapath Commands" +.SS "OpenVSwitch Datapath Commands" -The \fBdpctl\fR program can create, modify, and delete datapaths -supported by the OpenFlow reference implementation. A -single machine may host up to 256 datapaths (numbered 0 to 255). +The \fBdpctl\fR program can create, modify, and delete OpenVSwitch +datapaths. A single machine may host up to 256 datapaths (numbered 0 +to 255). A newly created datapath is associated with only one network device, a virtual network device sometimes called the datapath's ``local port''. @@ -104,17 +104,16 @@ about all configured datapaths. Prints to the console all flow entries in datapath \fIdp\fR's flow table. -This command is primarily useful for debugging the OpenFlow reference -implementation. The flow table entries that it displays are not +This command is primarily useful for debugging OpenVSwitch. The flow +table entries that it displays are not OpenFlow flow entries. Instead, they are different and considerably -simpler flows maintained by the datapaths used by the OpenFlow -reference implementation. +simpler flows maintained by the OpenVSwitch kernel module. .IP "\fBdp-del-flows \fIdp\fR" Deletes all flow entries from datapath \fIdp\fR's flow table. -This command is primarily useful for debugging the OpenFlow reference -implementation. As discussed in \fBdp-dump-flows\fR, these entries are +This command is primarily useful for debugging OpenVSwitch. As +discussed in \fBdp-dump-flows\fR, these entries are not OpenFlow flow entries. By deleting them, the process that set them up may be confused about their disappearance. @@ -125,8 +124,8 @@ that \fBsecchan\fR or \fBvswitch\fR is controlling: group 0 contains all ports except those disabled by STP, and group 1 contains all ports. Additional groups might be used in the future. -This command is primarily useful for debugging the OpenFlow reference -implementation. OpenFlow does not have a concept of port groups. +This command is primarily useful for debugging OpenVSwitch. OpenFlow +does not have a concept of port groups. .SS "OpenFlow Switch Management Commands" diff --git a/utilities/dpctl.c b/utilities/dpctl.c index 62dba7ab..6247af71 100644 --- a/utilities/dpctl.c +++ b/utilities/dpctl.c @@ -108,30 +108,30 @@ int main(int argc, char *argv[]) argc -= optind; argv += optind; if (argc < 1) - ofp_fatal(0, "missing command name; use --help for help"); + ovs_fatal(0, "missing command name; use --help for help"); for (p = all_commands; p->name != NULL; p++) { if (!strcmp(p->name, argv[0])) { int n_arg = argc - 1; if (n_arg < p->min_args) - ofp_fatal(0, "'%s' command requires at least %d arguments", + ovs_fatal(0, "'%s' command requires at least %d arguments", p->name, p->min_args); else if (n_arg > p->max_args) - ofp_fatal(0, "'%s' command takes at most %d arguments", + ovs_fatal(0, "'%s' command takes at most %d arguments", p->name, p->max_args); else { p->handler(&s, argc, argv); if (ferror(stdout)) { - ofp_fatal(0, "write to stdout failed"); + ovs_fatal(0, "write to stdout failed"); } if (ferror(stderr)) { - ofp_fatal(0, "write to stderr failed"); + ovs_fatal(0, "write to stderr failed"); } exit(0); } } } - ofp_fatal(0, "unknown command '%s'; use --help for help", argv[0]); + ovs_fatal(0, "unknown command '%s'; use --help for help", argv[0]); return 0; } @@ -169,7 +169,7 @@ parse_options(int argc, char *argv[], struct settings *s) case 't': timeout = strtoul(optarg, NULL, 10); if (timeout <= 0) { - ofp_fatal(0, "value %s on -t or --timeout is not at least 1", + ovs_fatal(0, "value %s on -t or --timeout is not at least 1", optarg); } else { time_alarm(timeout); @@ -207,9 +207,9 @@ parse_options(int argc, char *argv[], struct settings *s) static void usage(void) { - printf("%s: OpenFlow switch management utility\n" + printf("%s: OpenVSwitch datapath and OpenFlow switch management utility\n" "usage: %s [OPTIONS] COMMAND [ARG...]\n" - "\nFor datapaths:\n" + "\nFor OpenVSwitch datapaths:\n" " adddp DP [IFACE...] add new datapath DP (with IFACES)\n" " deldp DP delete local datapath DP\n" " addif DP IFACE... add each IFACE as a port on DP\n" @@ -369,7 +369,7 @@ get_free_port(struct dpif *dpif) next_portno: ; } - ofp_fatal(0, "no free datapath ports"); + ovs_fatal(0, "no free datapath ports"); } static void @@ -388,7 +388,7 @@ do_add_port(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) devname = strtok_r(argv[i], "@@", &save_ptr); if (!devname) { - ofp_error(0, "%s is not a valid network device name", argv[i]); + ovs_error(0, "%s is not a valid network device name", argv[i]); continue; } @@ -402,7 +402,7 @@ do_add_port(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) error = dpif_port_add(&dpif, devname, port); if (error) { - ofp_error(error, "adding %s as port %"PRIu16" of %s failed", + ovs_error(error, "adding %s as port %"PRIu16" of %s failed", devname, port, argv[1]); failure = true; } @@ -429,7 +429,7 @@ get_port_number(struct dpif *dpif, const char *name, uint16_t *port) } } free(ports); - ofp_error(0, "no port named %s", name); + ovs_error(0, "no port named %s", name); return false; } @@ -455,7 +455,7 @@ do_del_port(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) error = dpif_port_del(&dpif, port); if (error) { - ofp_error(error, "deleting port %s from %s failed", name, argv[1]); + ovs_error(error, "deleting port %s from %s failed", name, argv[1]); failure = true; } } @@ -510,7 +510,7 @@ do_dp_show(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) if (!error) { show_dpif(&dpif); } else { - ofp_error(error, "opening datapath %s failed", name); + ovs_error(error, "opening datapath %s failed", name); failure = true; } } @@ -526,7 +526,7 @@ do_dp_show(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) if (!error) { show_dpif(&dpif); } else if (error != ENODEV) { - ofp_error(error, "opening datapath %s failed", name); + ovs_error(error, "opening datapath %s failed", name); failure = true; } } @@ -635,12 +635,12 @@ open_vconn(const char *name, struct vconn **vconnp) VLOG_INFO("datapath %s is named %s", name, dpif_name); } - socket_name = xasprintf("%s/%s.mgmt", ofp_rundir, dpif_name); + socket_name = xasprintf("%s/%s.mgmt", ovs_rundir, dpif_name); if (stat(socket_name, &s)) { - ofp_fatal(errno, "cannot connect to %s: stat failed on %s", + ovs_fatal(errno, "cannot connect to %s: stat failed on %s", name, socket_name); } else if (!S_ISSOCK(s.st_mode)) { - ofp_fatal(0, "cannot connect to %s: %s is not a socket", + ovs_fatal(0, "cannot connect to %s: %s is not a socket", name, socket_name); } @@ -651,7 +651,7 @@ open_vconn(const char *name, struct vconn **vconnp) free(socket_name); free(vconn_name); } else { - ofp_fatal(0, "%s is not a valid connection method", name); + ovs_fatal(0, "%s is not a valid connection method", name); } } @@ -759,14 +759,14 @@ do_status(const struct settings *s UNUSED, int argc, char *argv[]) vconn_close(vconn); if (b->size < sizeof *reply) { - ofp_fatal(0, "short reply (%zu bytes)", b->size); + ovs_fatal(0, "short reply (%zu bytes)", b->size); } reply = b->data; if (reply->header.type != OFPT_VENDOR || reply->vendor != ntohl(NX_VENDOR_ID) || reply->subtype != ntohl(NXT_STATUS_REPLY)) { ofp_print(stderr, b->data, b->size, 2); - ofp_fatal(0, "bad reply"); + ovs_fatal(0, "bad reply"); } fwrite(reply + 1, b->size - sizeof *reply, 1, stdout); @@ -794,7 +794,7 @@ str_to_u32(const char *str) errno = 0; value = strtoul(str, &tail, 0); if (errno == EINVAL || errno == ERANGE || *tail) { - ofp_fatal(0, "invalid numeric format %s", str); + ovs_fatal(0, "invalid numeric format %s", str); } return value; } @@ -804,7 +804,7 @@ str_to_mac(const char *str, uint8_t mac[6]) { if (sscanf(str, "%"SCNx8":%"SCNx8":%"SCNx8":%"SCNx8":%"SCNx8":%"SCNx8, &mac[0], &mac[1], &mac[2], &mac[3], &mac[4], &mac[5]) != 6) { - ofp_fatal(0, "invalid mac address %s", str); + ovs_fatal(0, "invalid mac address %s", str); } } @@ -820,7 +820,7 @@ str_to_ip(const char *str_, uint32_t *ip) name = strtok_r(str, "//", &save_ptr); retval = name ? lookup_ip(name, &in_addr) : EINVAL; if (retval) { - ofp_fatal(0, "%s: could not convert to IP address", str); + ovs_fatal(0, "%s: could not convert to IP address", str); } *ip = in_addr.s_addr; @@ -843,14 +843,14 @@ str_to_ip(const char *str_, uint32_t *ip) /* Verify that the rest of the bits are 1-bits. */ for (; i < 32; i++) { if (!(nm & (1u << i))) { - ofp_fatal(0, "%s: %s is not a valid netmask", + ovs_fatal(0, "%s: %s is not a valid netmask", str, netmask); } } } else { int prefix = atoi(netmask); if (prefix <= 0 || prefix > 32) { - ofp_fatal(0, "%s: network prefix bits not between 1 and 32", + ovs_fatal(0, "%s: network prefix bits not between 1 and 32", str); } n_wild = 32 - prefix; @@ -933,7 +933,7 @@ str_to_action(char *str, struct ofpbuf *b) uint16_t port; if (drop) { - ofp_fatal(0, "Drop actions must not be followed by other actions"); + ovs_fatal(0, "Drop actions must not be followed by other actions"); } /* Arguments are separated by colons */ @@ -966,7 +966,7 @@ str_to_action(char *str, struct ofpbuf *b) * an action. */ drop = true; if (n_actions) { - ofp_fatal(0, "Drop actions must not be preceded by other " + ovs_fatal(0, "Drop actions must not be preceded by other " "actions"); } #ifdef SUPPORT_SNAT @@ -974,7 +974,7 @@ str_to_action(char *str, struct ofpbuf *b) struct nx_action_snat *sa; if (str_to_u32(arg) > OFPP_MAX) { - ofp_fatal(0, "Invalid nat port: %s\n", arg); + ovs_fatal(0, "Invalid nat port: %s\n", arg); } sa = put_action(b, sizeof *sa, OFPAT_VENDOR); @@ -996,7 +996,7 @@ str_to_action(char *str, struct ofpbuf *b) } else if (strspn(act, "0123456789") == strlen(act)) { put_output_action(b, str_to_u32(act)); } else { - ofp_fatal(0, "Unknown action: %s", act); + ovs_fatal(0, "Unknown action: %s", act); } } } @@ -1095,13 +1095,13 @@ str_to_flow(char *string, struct ofp_match *match, struct ofpbuf *actions, if (actions) { char *act_str = strstr(string, "action"); if (!act_str) { - ofp_fatal(0, "must specify an action"); + ovs_fatal(0, "must specify an action"); } *(act_str-1) = '\0'; act_str = strchr(act_str, '='); if (!act_str) { - ofp_fatal(0, "must specify an action"); + ovs_fatal(0, "must specify an action"); } act_str++; @@ -1127,7 +1127,7 @@ str_to_flow(char *string, struct ofp_match *match, struct ofpbuf *actions, value = strtok_r(NULL, ", \t\r\n", &save_ptr); if (!value) { - ofp_fatal(0, "field %s missing value", name); + ovs_fatal(0, "field %s missing value", name); } if (table_idx && !strcmp(name, "table")) { @@ -1162,7 +1162,7 @@ str_to_flow(char *string, struct ofp_match *match, struct ofpbuf *actions, } } } else { - ofp_fatal(0, "unknown keyword %s", name); + ovs_fatal(0, "unknown keyword %s", name); } } } @@ -1292,7 +1292,7 @@ do_add_flows(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) file = fopen(argv[2], "r"); if (file == NULL) { - ofp_fatal(errno, "%s: open", argv[2]); + ovs_fatal(errno, "%s: open", argv[2]); } open_vconn(argv[1], &vconn); @@ -1435,7 +1435,7 @@ do_probe(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) open_vconn(argv[1], &vconn); run(vconn_transact(vconn, request, &reply), "talking to %s", argv[1]); if (reply->size != sizeof(struct ofp_header)) { - ofp_fatal(0, "reply does not match request"); + ovs_fatal(0, "reply does not match request"); } ofpbuf_delete(reply); vconn_close(vconn); @@ -1486,7 +1486,7 @@ do_mod_port(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) } } if (port_idx == n_ports) { - ofp_fatal(0, "couldn't find monitored port: %s", argv[2]); + ovs_fatal(0, "couldn't find monitored port: %s", argv[2]); } opm = make_openflow(sizeof(struct ofp_port_mod), OFPT_PORT_MOD, &request); @@ -1512,7 +1512,7 @@ do_mod_port(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) opm->mask |= htonl(OFPPC_NO_FLOOD); opm->config |= htonl(OFPPC_NO_FLOOD); } else { - ofp_fatal(0, "unknown mod-port command '%s'", argv[3]); + ovs_fatal(0, "unknown mod-port command '%s'", argv[3]); } send_openflow_buffer(vconn, request); @@ -1531,7 +1531,7 @@ do_ping(const struct settings *s UNUSED, int argc, char *argv[]) payload = argc > 2 ? atoi(argv[2]) : 64; if (payload > max_payload) { - ofp_fatal(0, "payload must be between 0 and %zu bytes", max_payload); + ovs_fatal(0, "payload must be between 0 and %zu bytes", max_payload); } open_vconn(argv[1], &vconn); @@ -1581,7 +1581,7 @@ do_benchmark(const struct settings *s UNUSED, int argc UNUSED, char *argv[]) payload_size = atoi(argv[2]); if (payload_size > max_payload) { - ofp_fatal(0, "payload must be between 0 and %zu bytes", max_payload); + ovs_fatal(0, "payload must be between 0 and %zu bytes", max_payload); } message_size = sizeof(struct ofp_header) + payload_size; @@ -1641,14 +1641,14 @@ do_execute(const struct settings *s UNUSED, int argc, char *argv[]) run(vconn_recv_xid(vconn, xid, &reply), "recv_xid"); if (reply->size < sizeof *ncr) { - ofp_fatal(0, "reply is too short (%zu bytes < %zu bytes)", + ovs_fatal(0, "reply is too short (%zu bytes < %zu bytes)", reply->size, sizeof *ncr); } ncr = reply->data; if (ncr->nxh.header.type != OFPT_VENDOR || ncr->nxh.vendor != htonl(NX_VENDOR_ID) || ncr->nxh.subtype != htonl(NXT_COMMAND_REPLY)) { - ofp_fatal(0, "reply is invalid"); + ovs_fatal(0, "reply is invalid"); } status = ntohl(ncr->status); diff --git a/utilities/nlmon.c b/utilities/nlmon.c index 78801b7e..eb1be60a 100644 --- a/utilities/nlmon.c +++ b/utilities/nlmon.c @@ -32,7 +32,7 @@ main(int argc UNUSED, char *argv[]) error = nl_sock_create(NETLINK_ROUTE, RTNLGRP_LINK, 0, 0, &sock); if (error) { - ofp_fatal(error, "could not create rtnetlink socket"); + ovs_fatal(error, "could not create rtnetlink socket"); } for (;;) { @@ -42,9 +42,9 @@ main(int argc UNUSED, char *argv[]) if (error == EAGAIN) { /* Nothing to do. */ } else if (error == ENOBUFS) { - ofp_error(0, "network monitor socket overflowed"); + ovs_error(0, "network monitor socket overflowed"); } else if (error) { - ofp_fatal(error, "error on network monitor socket"); + ovs_fatal(error, "error on network monitor socket"); } else { struct nlattr *attrs[ARRAY_SIZE(rtnlgrp_link_policy)]; struct nlmsghdr *nlh; @@ -53,7 +53,7 @@ main(int argc UNUSED, char *argv[]) nlh = ofpbuf_at(buf, 0, NLMSG_HDRLEN); iim = ofpbuf_at(buf, NLMSG_HDRLEN, sizeof *iim); if (!iim) { - ofp_error(0, "received bad rtnl message (no ifinfomsg)"); + ovs_error(0, "received bad rtnl message (no ifinfomsg)"); ofpbuf_delete(buf); continue; } @@ -61,7 +61,7 @@ main(int argc UNUSED, char *argv[]) if (!nl_policy_parse(buf, NLMSG_HDRLEN + sizeof(struct ifinfomsg), rtnlgrp_link_policy, attrs, ARRAY_SIZE(rtnlgrp_link_policy))) { - ofp_error(0, "received bad rtnl message (policy)"); + ovs_error(0, "received bad rtnl message (policy)"); ofpbuf_delete(buf); continue; } diff --git a/utilities/ofp-discover.8.in b/utilities/ovs-discover.8.in similarity index 74% rename from utilities/ofp-discover.8.in rename to utilities/ovs-discover.8.in index 671248a6..12a950e8 100644 --- a/utilities/ofp-discover.8.in +++ b/utilities/ovs-discover.8.in @@ -1,15 +1,15 @@ -.TH ofp\-discover 8 "May 2008" "OpenFlow" "OpenFlow Manual" -.ds PN ofp\-discover +.TH ovs\-discover 8 "May 2008" "OpenVSwitch" "OpenVSwitch Manual" +.ds PN ovs\-discover .SH NAME -ofp\-discover \- controller discovery utility +ovs\-discover \- controller discovery utility .SH SYNOPSIS -.B ofp\-discover +.B ovs\-discover [\fIoptions\fR] \fInetdev\fR [\fInetdev\fR...] .SH DESCRIPTION -The \fBofp\-discover\fR program attempts to discover the location of +The \fBovs\-discover\fR program attempts to discover the location of an OpenFlow controller on one of the network devices listed on the command line. It repeatedly broadcasts a DHCP request with vendor class identifier \fBOpenFlow\fR on each network device until it @@ -19,7 +19,7 @@ vendor-specific option with code 1 whose contents are a string specifying the location of the controller in the same format used on the \fBsecchan\fR command line (e.g. \fBssl:192.168.0.1\fR). -When \fBofp\-discover\fR receives an acceptable response, it prints +When \fBovs\-discover\fR receives an acceptable response, it prints the details of the response on \fBstdout\fR. Then, by default, it configures the network device on which the response was received with the received IP address, netmask, and default gateway, and detaches @@ -28,7 +28,7 @@ itself to the background. .SH OPTIONS .TP \fB--accept-vconn=\fIregex\fR -By default, \fBofp\-discover\fR accepts any controller location +By default, \fBovs\-discover\fR accepts any controller location advertised over DHCP. With this option, only controllers whose names match POSIX extended regular expression \fIregex\fR will be accepted. Specifying \fBssl:.*\fR for \fIregex\fR, for example, would cause only @@ -39,11 +39,11 @@ controller location string, as if it begins with \fB^\fR. .TP \fB--exit-without-bind\fR -By default, \fBofp\-discover\fR binds the network device that receives +By default, \fBovs\-discover\fR binds the network device that receives the first acceptable response to the IP address received over DHCP. With this option, the configuration of the network device is not changed at all, except to bring it up if it is initially down, and -\fBofp\-discover\fR will exit immediately after it receives an +\fBovs\-discover\fR will exit immediately after it receives an acceptable DHCP response. This option is mutually exclusive with \fB--exit-after-bind\fR and @@ -52,9 +52,9 @@ This option is mutually exclusive with \fB--exit-after-bind\fR and .TP \fB--exit-after-bind\fR By default, after it receives an acceptable DHCP response, -\fBofp\-discover\fR detaches itself from the foreground session and +\fBovs\-discover\fR detaches itself from the foreground session and runs in the background maintaining the DHCP lease as necessary. With -this option, \fBofp\-discover\fR will exit immediately after it +this option, \fBovs\-discover\fR will exit immediately after it receives an acceptable DHCP response and configures the network device with the received IP address. The address obtained via DHCP could therefore be used past the expiration of its lease. @@ -64,10 +64,10 @@ This option is mutually exclusive with \fB--exit-without-bind\fR and .TP \fB--no-detach\fR -By default, \fBofp\-discover\fR runs in the foreground until it obtains +By default, \fBovs\-discover\fR runs in the foreground until it obtains an acceptable DHCP response, then it detaches itself from the foreground session and run as a background process. This option -prevents \fBofp\-discover\fR from detaching, causing it to run in the +prevents \fBovs\-discover\fR from detaching, causing it to run in the foreground even after it obtains a DHCP response. This option is mutually exclusive with \fB--exit-without-bind\fR and @@ -75,12 +75,12 @@ This option is mutually exclusive with \fB--exit-without-bind\fR and .TP \fB-P\fR[\fIpidfile\fR], \fB--pidfile\fR[\fB=\fIpidfile\fR] -Causes a file (by default, \fBofp\-discover.pid\fR) to be created indicating +Causes a file (by default, \fBovs\-discover.pid\fR) to be created indicating the PID of the running process. If \fIpidfile\fR is not specified, or if it does not begin with \fB/\fR, then it is created in \fB@RUNDIR@\fR. -The \fIpidfile\fR is created when \fBofp\-discover\fR detaches, so +The \fIpidfile\fR is created when \fBovs\-discover\fR detaches, so this this option has no effect when one of \fB--exit-without-bind\fR, \fB--exit-after-bind\fR, or \fB--no-detach\fR is also given. @@ -100,19 +100,19 @@ effect. .SH BUGS If the network devices specified on the command line have been added -to an OpenFlow switch with \fBdpctl addif\fR, then controller -discovery will fail because \fBofp\-discover\fR will not be able to +to an OpenVSwitch datapath with \fBdpctl addif\fR, then controller +discovery will fail because \fBovs\-discover\fR will not be able to see DHCP responses, even though tools such as \fBtcpdump\fR(8) and \fBwireshark\fR(1) can see them on the wire. This is because of the structure of the Linux kernel networking stack, which hands packets first to programs that listen for all arriving packets, then to -OpenFlow, then to programs that listen for a specific kind of packet. -OpenFlow consumes all the packets handed to it, so tools like +OpenVSwitch, then to programs that listen for a specific kind of packet. +OpenVSwitch consumes all the packets handed to it, so tools like \fBtcpdump\fR that look at all packets will see packets arriving on -OpenFlow interfaces, but \fRofp\-discover\fR, which listens only for +OpenVSwitch interfaces, but \fRovs\-discover\fR, which listens only for arriving IP packets, will not. .SH "SEE ALSO" .BR secchan (8), -.BR ofp-pki (8) +.BR ovs-pki (8) diff --git a/utilities/ofp-discover.c b/utilities/ovs-discover.c similarity index 94% rename from utilities/ofp-discover.c rename to utilities/ovs-discover.c index 48627a34..82c8aae1 100644 --- a/utilities/ofp-discover.c +++ b/utilities/ovs-discover.c @@ -52,7 +52,7 @@ #include "util.h" #include "vlog.h" -#define THIS_MODULE VLM_ofp_discover +#define THIS_MODULE VLM_ovs_discover struct iface { const char *name; @@ -100,7 +100,7 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; if (argc < 1) { - ofp_fatal(0, "need at least one non-option argument; " + ovs_fatal(0, "need at least one non-option argument; " "use --help for usage"); } @@ -112,7 +112,7 @@ main(int argc, char *argv[]) } } if (!n_ifaces) { - ofp_fatal(0, "failed to initialize any DHCP clients"); + ovs_fatal(0, "failed to initialize any DHCP clients"); } for (i = 0; i < n_ifaces; i++) { @@ -127,12 +127,12 @@ main(int argc, char *argv[]) size_t length = regerror(retval, &accept_controller_regex, NULL, 0); char *buffer = xmalloc(length); regerror(retval, &accept_controller_regex, buffer, length); - ofp_fatal(0, "%s: %s", accept_controller_re, buffer); + ovs_fatal(0, "%s: %s", accept_controller_re, buffer); } retval = unixctl_server_create(NULL, &unixctl); if (retval) { - ofp_fatal(retval, "Could not listen for unixctl connections"); + ovs_fatal(retval, "Could not listen for unixctl connections"); } die_if_already_running(); @@ -234,12 +234,12 @@ iface_init(struct iface *iface, const char *netdev_name) retval = netdev_open(iface->name, NETDEV_ETH_TYPE_NONE, &netdev); if (retval) { - ofp_error(retval, "Could not open %s device", iface->name); + ovs_error(retval, "Could not open %s device", iface->name); return false; } retval = netdev_turn_flags_on(netdev, NETDEV_UP, true); if (retval) { - ofp_error(retval, "Could not bring %s device up", iface->name); + ovs_error(retval, "Could not bring %s device up", iface->name); return false; } netdev_close(netdev); @@ -248,7 +248,7 @@ iface_init(struct iface *iface, const char *netdev_name) retval = dhclient_create(iface->name, modify_dhcp_request, validate_dhcp_offer, NULL, &iface->dhcp); if (retval) { - ofp_error(retval, "%s: failed to initialize DHCP client", iface->name); + ovs_error(retval, "%s: failed to initialize DHCP client", iface->name); return false; } @@ -356,7 +356,7 @@ parse_options(int argc, char *argv[]) case 't': timeout = strtoul(optarg, NULL, 10); if (timeout <= 0) { - ofp_fatal(0, "value %s on -t or --timeout is not at least 1", + ovs_fatal(0, "value %s on -t or --timeout is not at least 1", optarg); } else { time_alarm(timeout); @@ -386,7 +386,7 @@ parse_options(int argc, char *argv[]) free(short_options); if ((exit_without_bind + exit_after_bind + !detach_after_bind) > 1) { - ofp_fatal(0, "--exit-without-bind, --exit-after-bind, and --no-detach " + ovs_fatal(0, "--exit-without-bind, --exit-after-bind, and --no-detach " "are mutually exclusive"); } if (detach_after_bind) { @@ -401,7 +401,7 @@ usage(void) "usage: %s [OPTIONS] NETDEV [NETDEV...]\n" "where each NETDEV is a network device on which to perform\n" "controller discovery.\n" - "\nOrdinarily, ofp-discover runs in the foreground until it\n" + "\nOrdinarily, ovs-discover runs in the foreground until it\n" "obtains an IP address and discovers an OpenFlow controller via\n" "DHCP, then it prints information about the controller to stdout\n" "and detaches to the background to maintain the IP address lease.\n" @@ -418,6 +418,6 @@ usage(void) " -f, --force with -P, start even if already running\n" " -h, --help display this help message\n" " -V, --version display version information\n", - ofp_rundir, program_name); + ovs_rundir, program_name); exit(EXIT_SUCCESS); } diff --git a/utilities/ofp-kill.8.in b/utilities/ovs-kill.8.in similarity index 70% rename from utilities/ofp-kill.8.in rename to utilities/ovs-kill.8.in index 691e210f..447c676c 100644 --- a/utilities/ofp-kill.8.in +++ b/utilities/ovs-kill.8.in @@ -1,15 +1,15 @@ -.TH ofp\-kill 8 "May 2008" "OpenFlow" "OpenFlow Manual" -.ds PN ofp\-kill +.TH ovs\-kill 8 "May 2008" "OpenVSwitch" "OpenVSwitch Manual" +.ds PN ovs\-kill .SH NAME -ofp\-kill \- kills processes given their pidfiles +ovs\-kill \- kills processes given their pidfiles .SH SYNOPSIS -.B ofp\-kill +.B ovs\-kill [\fIoptions\fR] \fIpidfile\fR [\fIpidfile\fR...] .SH DESCRIPTION -The \fBofp\-kill\fR program reads each \fIpidfile\fR specified on the +The \fBovs\-kill\fR program reads each \fIpidfile\fR specified on the command line and sends a signal to the program associated with it, if any. It reads one line of text from \fIpidfile\fR, which must contain the PID of the process to kill as a text string. It then uses @@ -19,7 +19,7 @@ owns a lock on \fIpidfile\fR before it sends the signal. A \fIpidfile\fR whose name begins with \fB/\fR is used literally. Otherwise, \fB@RUNDIR@/\fR is prefixed. -This program exists for use by \fBofp\-switch\-setup\fR, which cannot +This program exists for use by \fBovs\-switch\-setup\fR, which cannot easily implement its functionality since Perl has no portable interface to \fBfcntl\fR-based file locking. @@ -32,19 +32,19 @@ By default, \fBSIGTERM\fR is sent. .TP \fB-f\fR, \fB\-\^\-force\fR -Causes \fBofp\-kill\fR to ignore all errors without printing a message +Causes \fBovs\-kill\fR to ignore all errors without printing a message to \fBstderr\fR, and to exit with return code 0. .so lib/common.man .SH "EXIT CODE" -Without \fB-f\fR or \fB\-\^\-force\fR, \fBofp\-kill\fR exits with +Without \fB-f\fR or \fB\-\^\-force\fR, \fBovs\-kill\fR exits with status 0 if at least one \fIpidfile\fR was given and the process represented by every \fIpidfile\fR was signaled successfully, otherwise with status 1. -With \fB-f\fR or \fB\-\^\-force\fR, \fBofp\-kill\fR always exits with +With \fB-f\fR or \fB\-\^\-force\fR, \fBovs\-kill\fR always exits with status 0. .SH BUGS @@ -52,9 +52,9 @@ status 0. There is a race between verifying the lock on \fIpidfile\fR and actually killing the process. -\fBofp\-kill\fR does not wait for the signaled processes to die before +\fBovs\-kill\fR does not wait for the signaled processes to die before exiting. .SH "SEE ALSO" -.BR ofp\-switch\-setup (8) +.BR ovs\-switch\-setup (8) diff --git a/utilities/ofp-kill.c b/utilities/ovs-kill.c similarity index 96% rename from utilities/ofp-kill.c rename to utilities/ovs-kill.c index 0ad04343..153e431d 100644 --- a/utilities/ofp-kill.c +++ b/utilities/ovs-kill.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2008 The Board of Trustees of The Leland Stanford +/* Copyright (c) 2008, 2009 The Board of Trustees of The Leland Stanford * Junior University * * We are making the OpenFlow specification and associated documentation @@ -71,7 +71,7 @@ main(int argc, char *argv[]) argv += optind; if (argc < 1) { if (!force) { - ofp_fatal(0, "need at least one non-option argument; " + ovs_fatal(0, "need at least one non-option argument; " "use --help for usage"); } } @@ -169,7 +169,7 @@ parse_options(int argc, char *argv[]) goto got_name; } } - ofp_fatal(0, "unknown signal \"%s\"", optarg); + ovs_fatal(0, "unknown signal \"%s\"", optarg); got_name: ; } break; @@ -201,7 +201,7 @@ usage(void) { printf("%s: kills a program using a pidfile\n" "usage: %s [OPTIONS] PIDFILE [PIDFILE...]\n" - "where each PIDFILE is a pidfile created by an OpenFlow daemon.\n" + "where PIDFILE is a pidfile created by an OpenVSwitch daemon.\n" "\nOptions:\n" " -s, --signal=NUMBER|NAME signal to send (default: TERM)\n" " -f, --force ignore errors\n" diff --git a/utilities/ofp-parse-leaks.in b/utilities/ovs-parse-leaks.in similarity index 99% rename from utilities/ofp-parse-leaks.in rename to utilities/ovs-parse-leaks.in index 059c8509..31f7eaa8 100755 --- a/utilities/ofp-parse-leaks.in +++ b/utilities/ovs-parse-leaks.in @@ -7,7 +7,7 @@ if (grep($_ eq '--help', @ARGV)) { print < #include -#include "openflow/brcompat-netlink.h" #include "cfg.h" #include "command-line.h" #include "daemon.h" @@ -44,6 +43,7 @@ #include "netdev.h" #include "netlink.h" #include "ofpbuf.h" +#include "openvswitch/brcompat-netlink.h" #include "poll-loop.h" #include "process.h" #include "signals.h" @@ -579,17 +579,17 @@ main(int argc, char *argv[]) retval = unixctl_server_create(NULL, &unixctl); if (retval) { - ofp_fatal(retval, "could not listen for vlog connections"); + ovs_fatal(retval, "could not listen for vlog connections"); } if (brc_open(&brc_sock)) { - ofp_fatal(0, "could not open brcompat socket. Check " + ovs_fatal(0, "could not open brcompat socket. Check " "\"brcompat\" kernel module."); } if (prune_timeout) { if (nl_sock_create(NETLINK_ROUTE, RTNLGRP_LINK, 0, 0, &rtnl_sock)) { - ofp_fatal(0, "could not create rtnetlink socket"); + ovs_fatal(0, "could not create rtnetlink socket"); } } @@ -702,14 +702,14 @@ parse_options(int argc, char *argv[]) argv += optind; if (argc != 1) { - ofp_fatal(0, "config file is only non-option argument; " + ovs_fatal(0, "config file is only non-option argument; " "use --help for usage"); } config_file = argv[0]; error = cfg_set_file(config_file); if (error) { - ofp_fatal(error, "failed to add configuration file \"%s\"", + ovs_fatal(error, "failed to add configuration file \"%s\"", config_file); } } diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 410d28f3..24c74769 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -777,8 +776,7 @@ bridge_create(const char *name) error = ofproto_create(name, &bridge_ofhooks, br, &br->ofproto); if (error) { - VLOG_ERR("failed to create OpenFlow switch %s: %s", - name, strerror(error)); + VLOG_ERR("failed to create switch %s: %s", name, strerror(error)); dpif_delete(&br->dpif); dpif_close(&br->dpif); free(br); @@ -1108,7 +1106,7 @@ bridge_reconfigure_one(struct bridge *br) cfg_get_all_strings(&listeners, "bridge.%s.openflow.listeners", br->name); if (!listeners.n) { svec_add_nocopy(&listeners, xasprintf("punix:%s/%s.mgmt", - ofp_rundir, br->name)); + ovs_rundir, br->name)); } else if (listeners.n == 1 && !strcmp(listeners.names[0], "none")) { svec_clear(&listeners); } @@ -1129,7 +1127,7 @@ bridge_reconfigure_one(struct bridge *br) cfg_get_all_strings(&snoops, "bridge.%s.openflow.snoops", br->name); if (!snoops.n) { svec_add_nocopy(&snoops, xasprintf("punix:%s/%s.snoop", - ofp_rundir, br->name)); + ovs_rundir, br->name)); } else if (snoops.n == 1 && !strcmp(snoops.names[0], "none")) { svec_clear(&snoops); } @@ -1390,8 +1388,8 @@ swap_dst(struct dst *p, struct dst *q) /* Moves all the dsts with vlan == 'vlan' to the front of the 'n_dsts' in * 'dsts'. (This may help performance by reducing the number of VLAN changes - * that we push over OpenFlow. We could in fact fully sort the array by vlan, - * but in most cases there are at most two different vlan tags so that's + * that we push to the datapath. We could in fact fully sort the array by + * vlan, but in most cases there are at most two different vlan tags so that's * possibly overkill.) */ static void partition_dsts(struct dst *dsts, size_t n_dsts, int vlan) diff --git a/vswitchd/etc/init.d/vswitch b/vswitchd/etc/init.d/vswitch index 737ec8c4..bee066c5 100755 --- a/vswitchd/etc/init.d/vswitch +++ b/vswitchd/etc/init.d/vswitch @@ -131,8 +131,8 @@ function remove_all_dp { } function insert_modules_if_required { - if ! lsmod | grep -q "openflow_mod"; then - action "Inserting openflow module" insmod $VSWITCH_BASE/kernel_modules/openflow_mod.ko + if ! lsmod | grep -q "openvswitch_mod"; then + action "Inserting openvswitch module" insmod $VSWITCH_BASE/kernel_modules/openvswitch_mod.ko fi if [ -n "$BRCOMPATD_PIDFILE" ] && ! lsmod | grep -q "brcompat_mod"; then action "Inserting brcompat module" insmod $VSWITCH_BASE/kernel_modules/brcompat_mod.ko @@ -143,8 +143,8 @@ function remove_modules { if lsmod | grep -q "brcompat_mod"; then action "Removing brcompat module" rmmod brcompat_mod.ko fi - if lsmod | grep -q "openflow_mod"; then - action "Removing openflow module" rmmod openflow_mod.ko + if lsmod | grep -q "openvswitch_mod"; then + action "Removing openvswitch module" rmmod openvswitch_mod.ko fi } diff --git a/vswitchd/etc/sysconfig/vswitch.example b/vswitchd/etc/sysconfig/vswitch.example index 4fd57598..6600d151 100644 --- a/vswitchd/etc/sysconfig/vswitch.example +++ b/vswitchd/etc/sysconfig/vswitch.example @@ -1,7 +1,7 @@ ### Configuration options for vswitch # VSWITCH_BASE: Root directory where vswitch binaries are installed -# VSWITCH_BASE=/root/vswitch/openflow/build +# VSWITCH_BASE=/root/vswitch/openvswitch/build # ENABLE_BRCOMPAT: If 'y' than emulate linux bridging interfaces # using the brcompat kernel module and brcompatd daemon diff --git a/vswitchd/proc-net-compat.c b/vswitchd/proc-net-compat.c index 9b564785..cd4324a7 100644 --- a/vswitchd/proc-net-compat.c +++ b/vswitchd/proc-net-compat.c @@ -27,7 +27,7 @@ #include "netlink-protocol.h" #include "netlink.h" #include "ofpbuf.h" -#include "openflow/brcompat-netlink.h" +#include "openvswitch/brcompat-netlink.h" #include "hmap.h" #include "shash.h" #include "svec.h" diff --git a/vswitchd/vswitchd.8.in b/vswitchd/vswitchd.8.in index 4a2b4953..e85a7f14 100644 --- a/vswitchd/vswitchd.8.in +++ b/vswitchd/vswitchd.8.in @@ -1,23 +1,23 @@ -.TH vswitchd 8 "March 2009" "OpenFlow" "OpenFlow Manual" +.TH vswitchd 8 "March 2009" "OpenVSwitch" "OpenVSwitch Manual" .ds PN vswitchd . .SH NAME -vswitchd \- OpenFlow-based virtual switch daemon +vswitchd \- virtual switch daemon . .SH SYNOPSIS .B vswitchd \fIconfig\fR . .SH DESCRIPTION -A daemon that manages and controls any number of OpenFlow-based -virtual switches on the local machine. +A daemon that manages and controls any number of virtual switches on +the local machine. .PP The mandatory \fIconfig\fR argument specifies a configuration file. For a description of \fBvswitchd\fR configuration syntax, see \fBvswitchd.conf\fR(5). .PP At startup or upon receipt of a \fBSIGHUP\fR signal, \fBvswitchd\fR -reads the configuration file. It sets up OpenFlow datapaths and then +reads the configuration file. It sets up OpenVSwitch datapaths and then operates switching across each bridge described in its configuration files. If a logfile was specified on the command line it will also be opened or reopened. @@ -50,19 +50,18 @@ Connectivity to an external OpenFlow controller, such as NOX. .PP Only a single instance of \fBvswitchd\fR is intended to run at a time. A single \fBvswitchd\fR can manage any number of virtual switches, up -to the maximum number of datapaths supported by the OpenFlow -implementation. +to the maximum number of supported OpenVSwitch datapaths. .PP -\fBvswitchd\fR does all the necessary management of OpenFlow datapaths +\fBvswitchd\fR does all the necessary management of OpenVSwitch datapaths itself. Thus, external tools, such \fBdpctl\fR(8), are not needed for managing datapaths in conjunction with \fBvswitchd\fR, and their use to modify datapaths when \fBvswitchd\fR is running can interfere with its operation. (\fBdpctl\fR may still be useful for diagnostics.) .PP -An OpenFlow datapath kernel module must be loaded for \fBvswitchd\fR +An OpenVSwitch datapath kernel module must be loaded for \fBvswitchd\fR to be useful. Please refer to the \fBINSTALL\fR file included in the -OpenFlow source distribution for instructions on how to build and load -the OpenFlow kernel module. +OpenVSwitch distribution for instructions on how to build and load +the OpenVSwitch kernel module. .PP .SH OPTIONS .IP "\fB--fake-proc-net\fR" @@ -79,7 +78,7 @@ to be loaded. . .SH "BUGS" . -Only OpenFlow kernel-based datapaths are currently supported. In the +Only OpenVSwitch kernel-based datapaths are currently supported. In the future, this restriction may be lifted. .PP Only Linux 2.6.\fIx\fR is currently supported. @@ -88,4 +87,4 @@ Only Linux 2.6.\fIx\fR is currently supported. .BR vswitchd.conf (5), .BR brcompatd (8), .BR vlogconf (8), -\fBINSTALL\fR in the OpenFlow distribution. +\fBINSTALL\fR in the OpenVSwitch distribution. diff --git a/vswitchd/vswitchd.c b/vswitchd/vswitchd.c index e10ee3a2..abd54356 100644 --- a/vswitchd/vswitchd.c +++ b/vswitchd/vswitchd.c @@ -87,7 +87,7 @@ main(int argc, char *argv[]) retval = unixctl_server_create(NULL, &unixctl); if (retval) { - ofp_fatal(retval, "could not listen for control connections"); + ovs_fatal(retval, "could not listen for control connections"); } unixctl_command_register("vswitchd/reload", reload); @@ -196,7 +196,7 @@ parse_options(int argc, char *argv[]) case OPT_FAKE_PROC_NET: error = proc_net_compat_init(); if (error) { - ofp_fatal(error, "failed to initialize /proc/net " + ovs_fatal(error, "failed to initialize /proc/net " "compatibility"); } break; @@ -225,14 +225,14 @@ parse_options(int argc, char *argv[]) argv += optind; if (argc != 1) { - ofp_fatal(0, "config file is only non-option argument; " + ovs_fatal(0, "config file is only non-option argument; " "use --help for usage"); } config_file = argv[0]; error = cfg_set_file(config_file); if (error) { - ofp_fatal(error, "failed to add configuration file \"%s\"", + ovs_fatal(error, "failed to add configuration file \"%s\"", config_file); } } diff --git a/vswitchd/vswitchd.conf.5.in b/vswitchd/vswitchd.conf.5.in index a6fc8c96..e9103c7f 100644 --- a/vswitchd/vswitchd.conf.5.in +++ b/vswitchd/vswitchd.conf.5.in @@ -16,7 +16,7 @@ . RE . PP .. -.TH vswitchd.conf 5 "April 2009" "OpenFlow" "OpenFlow Manual" +.TH vswitchd.conf 5 "April 2009" "OpenVSwitch" "OpenVSwitch Manual" . .SH NAME vswitchd.conf \- configuration file for \fBvswitchd\fR -- 2.30.2