[ovs-dev] [PATCH] datapath-windows: Move and Rename files

Samuel Ghinet sghinet at cloudbasesolutions.com
Wed Aug 6 11:00:28 UTC 2014


Move and rename files:

1. Remove "Ovs" prefixes. There is no reason to have them.
2. Create directories and Visual Studio filters to represent them:
* Core:        anything that is "generic", that might be used anywhere in code, etc.
* Hyper-v:    functionality for Hyper-V Switch, Hyper-V Nics, Hyper-V Ports, OIDs
* OpenFlow: the kernel part of the OpenFlow implementation: Datapath, Flows, Ports, Actions.
* Protocol:    net protocols: ethernet, ip checksuming, tcp, etc.
* Transfer:    functionalities for NBLs, NB, ingress path, tunneling
* Winetlink:    IOCTLs, packet queuing to userspace, windows netlink protocol.

Also changed the "#include"-s in the files to acomodate this change.



---
 .../ovsext/{OvsAtomic.h => Core/Atomic.h}          |   0
 .../ovsext/{OvsDebug.c => Core/Debug.c}            |   2 +-
 .../ovsext/{OvsDebug.h => Core/Debug.h}            |   0
 .../ovsext/{OvsDriver.c => Core/Driver.c}          |   6 +-
 .../ovsext/{OvsIpHelper.c => Core/IpHelper.c}      |   8 +-
 .../ovsext/{OvsIpHelper.h => Core/IpHelper.h}      |   0
 .../ovsext/{OvsJhash.c => Core/Jhash.c}            |   0
 .../ovsext/{OvsJhash.h => Core/Jhash.h}            |   0
 .../ovsext/{OvsTypes.h => Core/Types.h}            |   0
 datapath-windows/ovsext/{OvsUtil.c => Core/Util.c} |   2 +-
 datapath-windows/ovsext/{OvsUtil.h => Core/Util.h} |   0
 .../ovsext/{OvsOid.c => Hyper-V/Oid.c}             |  20 +--
 .../ovsext/{OvsOid.h => Hyper-V/Oid.h}             |   0
 .../ovsext/{OvsSwitch.c => Hyper-V/Switch.c}       |  18 +--
 .../ovsext/{OvsSwitch.h => Hyper-V/Switch.h}       |   4 +-
 .../ovsext/{OvsActions.c => OpenFlow/Actions.c}    |  22 +--
 .../ovsext/{OvsFlow.c => OpenFlow/Flow.c}          |  12 +-
 .../ovsext/{OvsFlow.h => OpenFlow/Flow.h}          |   6 +-
 .../{OvsPacketParser.c => OpenFlow/PacketParser.c} |   2 +-
 .../{OvsPacketParser.h => OpenFlow/PacketParser.h} |   2 +-
 .../{include/OvsPub.h => ovsext/OpenFlow/Pub.h}    |   8 +-
 .../ovsext/{OvsVport.c => OpenFlow/Vport.c}        |  22 +--
 .../ovsext/{OvsVport.h => OpenFlow/Vport.h}        |   2 +-
 .../ovsext/{OvsChecksum.c => Protocol/Checksum.c}  |   8 +-
 .../ovsext/{OvsChecksum.h => Protocol/Checksum.h}  |   0
 .../ovsext/{OvsEth.h => Protocol/Ethernet.h}       |   0
 .../ovsext/{OvsNetProto.h => Protocol/NetProto.h}  |   2 +-
 .../{OvsBufferMgmt.c => Transfer/BufferMgmt.c}     |  12 +-
 .../{OvsBufferMgmt.h => Transfer/BufferMgmt.h}     |   0
 .../ovsext/{OvsPacketIO.c => Transfer/PacketIO.c}  |  20 +--
 .../ovsext/{OvsPacketIO.h => Transfer/PacketIO.h}  |   0
 .../ovsext/{OvsTunnel.c => Transfer/Tunnel.c}      |  21 +--
 .../ovsext/{OvsTunnel.h => Transfer/Tunnel.h}      |   0
 .../{OvsTunnelFilter.c => Transfer/TunnelFilter.c} |  12 +-
 .../{OvsTunnelIntf.h => Transfer/TunnelIntf.h}     |   0
 .../ovsext/{OvsVxlan.c => Transfer/Vxlan.c}        |  28 ++--
 .../ovsext/{OvsVxlan.h => Transfer/Vxlan.h}        |   2 +-
 .../ovsext/{OvsEvent.c => Winetlink/Event.c}       |  10 +-
 .../ovsext/{OvsEvent.h => Winetlink/Event.h}       |   0
 .../ovsext/{OvsIoctl.c => Winetlink/Ioctl.c}       |  22 +--
 .../ovsext/{OvsIoctl.h => Winetlink/Ioctl.h}       |   0
 .../OvsNetlink.h => ovsext/Winetlink/Netlink.h}    |   0
 .../ovsext/{OvsUser.c => Winetlink/User.c}         |  23 +--
 .../ovsext/{OvsUser.h => Winetlink/User.h}         |   0
 datapath-windows/ovsext/ovsext.vcxproj             |  88 +++++------
 datapath-windows/ovsext/ovsext.vcxproj.filters     | 168 +++++++++++++++++++++
 datapath-windows/ovsext/precomp.h                  |   9 +-
 datapath/linux/compat/include/linux/openvswitch.h  |   2 +
 48 files changed, 374 insertions(+), 189 deletions(-)
 rename datapath-windows/ovsext/{OvsAtomic.h => Core/Atomic.h} (100%)
 rename datapath-windows/ovsext/{OvsDebug.c => Core/Debug.c} (98%)
 rename datapath-windows/ovsext/{OvsDebug.h => Core/Debug.h} (100%)
 rename datapath-windows/ovsext/{OvsDriver.c => Core/Driver.c} (98%)
 rename datapath-windows/ovsext/{OvsIpHelper.c => Core/IpHelper.c} (99%)
 rename datapath-windows/ovsext/{OvsIpHelper.h => Core/IpHelper.h} (100%)
 rename datapath-windows/ovsext/{OvsJhash.c => Core/Jhash.c} (100%)
 rename datapath-windows/ovsext/{OvsJhash.h => Core/Jhash.h} (100%)
 rename datapath-windows/ovsext/{OvsTypes.h => Core/Types.h} (100%)
 rename datapath-windows/ovsext/{OvsUtil.c => Core/Util.c} (98%)
 rename datapath-windows/ovsext/{OvsUtil.h => Core/Util.h} (100%)
 rename datapath-windows/ovsext/{OvsOid.c => Hyper-V/Oid.c} (99%)
 rename datapath-windows/ovsext/{OvsOid.h => Hyper-V/Oid.h} (100%)
 rename datapath-windows/ovsext/{OvsSwitch.c => Hyper-V/Switch.c} (98%)
 rename datapath-windows/ovsext/{OvsSwitch.h => Hyper-V/Switch.h} (98%)
 rename datapath-windows/ovsext/{OvsActions.c => OpenFlow/Actions.c} (99%)
 rename datapath-windows/ovsext/{OvsFlow.c => OpenFlow/Flow.c} (99%)
 rename datapath-windows/ovsext/{OvsFlow.h => OpenFlow/Flow.h} (97%)
 rename datapath-windows/ovsext/{OvsPacketParser.c => OpenFlow/PacketParser.c} (99%)
 rename datapath-windows/ovsext/{OvsPacketParser.h => OpenFlow/PacketParser.h} (99%)
 rename datapath-windows/{include/OvsPub.h => ovsext/OpenFlow/Pub.h} (99%)
 rename datapath-windows/ovsext/{OvsVport.c => OpenFlow/Vport.c} (99%)
 rename datapath-windows/ovsext/{OvsVport.h => OpenFlow/Vport.h} (99%)
 rename datapath-windows/ovsext/{OvsChecksum.c => Protocol/Checksum.c} (99%)
 rename datapath-windows/ovsext/{OvsChecksum.h => Protocol/Checksum.h} (100%)
 rename datapath-windows/ovsext/{OvsEth.h => Protocol/Ethernet.h} (100%)
 rename datapath-windows/ovsext/{OvsNetProto.h => Protocol/NetProto.h} (99%)
 rename datapath-windows/ovsext/{OvsBufferMgmt.c => Transfer/BufferMgmt.c} (99%)
 rename datapath-windows/ovsext/{OvsBufferMgmt.h => Transfer/BufferMgmt.h} (100%)
 rename datapath-windows/ovsext/{OvsPacketIO.c => Transfer/PacketIO.c} (98%)
 rename datapath-windows/ovsext/{OvsPacketIO.h => Transfer/PacketIO.h} (100%)
 rename datapath-windows/ovsext/{OvsTunnel.c => Transfer/Tunnel.c} (97%)
 rename datapath-windows/ovsext/{OvsTunnel.h => Transfer/Tunnel.h} (100%)
 rename datapath-windows/ovsext/{OvsTunnelFilter.c => Transfer/TunnelFilter.c} (98%)
 rename datapath-windows/ovsext/{OvsTunnelIntf.h => Transfer/TunnelIntf.h} (100%)
 rename datapath-windows/ovsext/{OvsVxlan.c => Transfer/Vxlan.c} (97%)
 rename datapath-windows/ovsext/{OvsVxlan.h => Transfer/Vxlan.h} (98%)
 rename datapath-windows/ovsext/{OvsEvent.c => Winetlink/Event.c} (99%)
 rename datapath-windows/ovsext/{OvsEvent.h => Winetlink/Event.h} (100%)
 rename datapath-windows/ovsext/{OvsIoctl.c => Winetlink/Ioctl.c} (98%)
 rename datapath-windows/ovsext/{OvsIoctl.h => Winetlink/Ioctl.h} (100%)
 rename datapath-windows/{include/OvsNetlink.h => ovsext/Winetlink/Netlink.h} (100%)
 rename datapath-windows/ovsext/{OvsUser.c => Winetlink/User.c} (98%)
 rename datapath-windows/ovsext/{OvsUser.h => Winetlink/User.h} (100%)
 create mode 100644 datapath-windows/ovsext/ovsext.vcxproj.filters

diff --git a/datapath-windows/ovsext/OvsAtomic.h b/datapath-windows/ovsext/Core/Atomic.h
similarity index 100%
rename from datapath-windows/ovsext/OvsAtomic.h
rename to datapath-windows/ovsext/Core/Atomic.h
diff --git a/datapath-windows/ovsext/OvsDebug.c b/datapath-windows/ovsext/Core/Debug.c
similarity index 98%
rename from datapath-windows/ovsext/OvsDebug.c
rename to datapath-windows/ovsext/Core/Debug.c
index 8610008..a96d38d 100644
--- a/datapath-windows/ovsext/OvsDebug.c
+++ b/datapath-windows/ovsext/Core/Debug.c
@@ -16,7 +16,7 @@

 #include "precomp.h"

-#include "OvsDebug.h"
+#include "Debug.h"
 #ifdef DBG
 #define OVS_DBG_DEFAULT  OVS_DBG_INFO
 #else
diff --git a/datapath-windows/ovsext/OvsDebug.h b/datapath-windows/ovsext/Core/Debug.h
similarity index 100%
rename from datapath-windows/ovsext/OvsDebug.h
rename to datapath-windows/ovsext/Core/Debug.h
diff --git a/datapath-windows/ovsext/OvsDriver.c b/datapath-windows/ovsext/Core/Driver.c
similarity index 98%
rename from datapath-windows/ovsext/OvsDriver.c
rename to datapath-windows/ovsext/Core/Driver.c
index 7b57fbd..b8f0db8 100644
--- a/datapath-windows/ovsext/OvsDriver.c
+++ b/datapath-windows/ovsext/Core/Driver.c
@@ -15,14 +15,14 @@
  */

 #include "precomp.h"
-#include "OvsSwitch.h"
-#include "OvsIoctl.h"
+#include "Hyper-V\Switch.h"
+#include "Winetlink\Ioctl.h"

 #ifdef OVS_DBG_MOD
 #undef OVS_DBG_MOD
 #endif
 #define OVS_DBG_MOD OVS_DBG_DRIVER
-#include "OvsDebug.h"
+#include "Core\Debug.h"

 /* Global handles. XXX: Some of them need not be global. */
 /*
diff --git a/datapath-windows/ovsext/OvsIpHelper.c b/datapath-windows/ovsext/Core/IpHelper.c
similarity index 99%
rename from datapath-windows/ovsext/OvsIpHelper.c
rename to datapath-windows/ovsext/Core/IpHelper.c
index cd2625a..689166e 100644
--- a/datapath-windows/ovsext/OvsIpHelper.c
+++ b/datapath-windows/ovsext/Core/IpHelper.c
@@ -15,15 +15,15 @@
  */

 #include "precomp.h"
-#include "OvsIpHelper.h"
-#include "OvsSwitch.h"
-#include "OvsJhash.h"
+#include "Core\IpHelper.h"
+#include "Core\Jhash.h"
+#include "Hyper-V\Switch.h"

 #ifdef OVS_DBG_MOD
 #undef OVS_DBG_MOD
 #endif
 #define OVS_DBG_MOD OVS_DBG_IPHELPER
-#include "OvsDebug.h"
+#include "Core\Debug.h"

 /*
  * Fow now, we assume only one internal adapter
diff --git a/datapath-windows/ovsext/OvsIpHelper.h b/datapath-windows/ovsext/Core/IpHelper.h
similarity index 100%
rename from datapath-windows/ovsext/OvsIpHelper.h
rename to datapath-windows/ovsext/Core/IpHelper.h
diff --git a/datapath-windows/ovsext/OvsJhash.c b/datapath-windows/ovsext/Core/Jhash.c
similarity index 100%
rename from datapath-windows/ovsext/OvsJhash.c
rename to datapath-windows/ovsext/Core/Jhash.c
diff --git a/datapath-windows/ovsext/OvsJhash.h b/datapath-windows/ovsext/Core/Jhash.h
similarity index 100%
rename from datapath-windows/ovsext/OvsJhash.h
rename to datapath-windows/ovsext/Core/Jhash.h
diff --git a/datapath-windows/ovsext/OvsTypes.h b/datapath-windows/ovsext/Core/Types.h
similarity index 100%
rename from datapath-windows/ovsext/OvsTypes.h
rename to datapath-windows/ovsext/Core/Types.h
diff --git a/datapath-windows/ovsext/OvsUtil.c b/datapath-windows/ovsext/Core/Util.c
similarity index 98%
rename from datapath-windows/ovsext/OvsUtil.c
rename to datapath-windows/ovsext/Core/Util.c
index e70f9a1..ff9cd28 100644
--- a/datapath-windows/ovsext/OvsUtil.c
+++ b/datapath-windows/ovsext/Core/Util.c
@@ -20,7 +20,7 @@
 #endif
 #define OVS_DBG_MOD OVS_DBG_OTHERS

-#include "OvsDebug.h"
+#include "Core\Debug.h"

 extern NDIS_HANDLE gOvsExtDriverHandle;

diff --git a/datapath-windows/ovsext/OvsUtil.h b/datapath-windows/ovsext/Core/Util.h
similarity index 100%
rename from datapath-windows/ovsext/OvsUtil.h
rename to datapath-windows/ovsext/Core/Util.h
diff --git a/datapath-windows/ovsext/OvsOid.c b/datapath-windows/ovsext/Hyper-V/Oid.c
similarity index 99%
rename from datapath-windows/ovsext/OvsOid.c
rename to datapath-windows/ovsext/Hyper-V/Oid.c
index 487191a..4ac805c 100644
--- a/datapath-windows/ovsext/OvsOid.c
+++ b/datapath-windows/ovsext/Hyper-V/Oid.c
@@ -15,15 +15,15 @@
  */

 #include "precomp.h"
-#include "OvsIoctl.h"
-#include "OvsSwitch.h"
-#include "OvsVport.h"
-#include "OvsNetProto.h"
-#include "OvsUser.h"
-#include "OvsFlow.h"
-#include "OvsEvent.h"
-#include "OvsUser.h"
-#include "OvsOid.h"
+
+#include "OpenFlow\Flow.h"
+#include "OpenFlow\Vport.h"
+#include "Protocol\NetProto.h"
+#include "Hyper-V\Oid.h"
+#include "Hyper-V\Switch.h"
+#include "Winetlink\Event.h"
+#include "Winetlink\Ioctl.h"
+#include "Winetlink\User.h"

 /* Due to an imported header file */
 #pragma warning( disable:4505 )
@@ -32,7 +32,7 @@
 #undef OVS_DBG_MOD
 #endif
 #define OVS_DBG_MOD OVS_DBG_DISPATCH
-#include "OvsDebug.h"
+#include "Core\Debug.h"

 typedef struct _OVS_OID_CONTEXT {
     NDIS_EVENT oidComplete;
diff --git a/datapath-windows/ovsext/OvsOid.h b/datapath-windows/ovsext/Hyper-V/Oid.h
similarity index 100%
rename from datapath-windows/ovsext/OvsOid.h
rename to datapath-windows/ovsext/Hyper-V/Oid.h
diff --git a/datapath-windows/ovsext/OvsSwitch.c b/datapath-windows/ovsext/Hyper-V/Switch.c
similarity index 98%
rename from datapath-windows/ovsext/OvsSwitch.c
rename to datapath-windows/ovsext/Hyper-V/Switch.c
index 97ce2ae..e92c386 100644
--- a/datapath-windows/ovsext/OvsSwitch.c
+++ b/datapath-windows/ovsext/Hyper-V/Switch.c
@@ -21,20 +21,20 @@

 #include "precomp.h"

-#include "OvsIoctl.h"
-#include "OvsSwitch.h"
-#include "OvsVport.h"
-#include "OvsEvent.h"
-#include "OvsFlow.h"
-#include "OvsIpHelper.h"
-#include "OvsTunnelIntf.h"
-#include "OvsOid.h"
+#include "Core\IpHelper.h"
+#include "Hyper-V\Oid.h"
+#include "Hyper-V\Switch.h"
+#include "OpenFlow\Flow.h"
+#include "OpenFlow\Vport.h"
+#include "Transfer\TunnelIntf.h"
+#include "Winetlink\Event.h"
+#include "Winetlink\Ioctl.h"

 #ifdef OVS_DBG_MOD
 #undef OVS_DBG_MOD
 #endif
 #define OVS_DBG_MOD OVS_DBG_SWITCH
-#include "OvsDebug.h"
+#include "Core\Debug.h"

 POVS_SWITCH_CONTEXT gOvsSwitchContext;
 BOOLEAN gOvsInAttach;
diff --git a/datapath-windows/ovsext/OvsSwitch.h b/datapath-windows/ovsext/Hyper-V/Switch.h
similarity index 98%
rename from datapath-windows/ovsext/OvsSwitch.h
rename to datapath-windows/ovsext/Hyper-V/Switch.h
index d49fe9b..d80d744 100644
--- a/datapath-windows/ovsext/OvsSwitch.h
+++ b/datapath-windows/ovsext/Hyper-V/Switch.h
@@ -21,8 +21,8 @@
 #ifndef __OVS_SWITCH_H_
 #define __OVS_SWITCH_H_ 1

-#include "OvsNetProto.h"
-#include "OvsBufferMgmt.h"
+#include "Protocol\NetProto.h"
+#include "Transfer\BufferMgmt.h"
 #define OVS_MAX_VPORT_ARRAY_SIZE 1024

 #define OVS_VPORT_MASK (OVS_MAX_VPORT_ARRAY_SIZE - 1)
diff --git a/datapath-windows/ovsext/OvsActions.c b/datapath-windows/ovsext/OpenFlow/Actions.c
similarity index 99%
rename from datapath-windows/ovsext/OvsActions.c
rename to datapath-windows/ovsext/OpenFlow/Actions.c
index 4a2c117..8fb645f 100644
--- a/datapath-windows/ovsext/OvsActions.c
+++ b/datapath-windows/ovsext/OpenFlow/Actions.c
@@ -16,23 +16,23 @@

 #include "precomp.h"

-#include "OvsIoctl.h"
-#include "OvsSwitch.h"
-#include "OvsVport.h"
-#include "OvsEvent.h"
-#include "OvsUser.h"
-#include "OvsNetProto.h"
-#include "OvsFlow.h"
-#include "OvsVxlan.h"
-#include "OvsChecksum.h"
-#include "OvsPacketIO.h"
+#include "Hyper-V\Switch.h"
+#include "OpenFlow\Flow.h"
+#include "OpenFlow\Vport.h"
+#include "Protocol\Checksum.h"
+#include "Protocol\NetProto.h"
+#include "Transfer\PacketIO.h"
+#include "Transfer\Vxlan.h"
+#include "Winetlink\Event.h"
+#include "Winetlink\Ioctl.h"
+#include "Winetlink\User.h"


 #ifdef OVS_DBG_MOD
 #undef OVS_DBG_MOD
 #endif
 #define OVS_DBG_MOD OVS_DBG_ACTION
-#include "OvsDebug.h"
+#include "Core\Debug.h"

 typedef struct _OVS_ACTION_STATS {
     UINT64 rxVxlan;
diff --git a/datapath-windows/ovsext/OvsFlow.c b/datapath-windows/ovsext/OpenFlow/Flow.c
similarity index 99%
rename from datapath-windows/ovsext/OvsFlow.c
rename to datapath-windows/ovsext/OpenFlow/Flow.c
index daa64e0..8d6a895 100644
--- a/datapath-windows/ovsext/OvsFlow.c
+++ b/datapath-windows/ovsext/OpenFlow/Flow.c
@@ -15,17 +15,17 @@
  */

 #include "precomp.h"
-#include "OvsNetProto.h"
-#include "OvsUtil.h"
-#include "OvsJhash.h"
-#include "OvsFlow.h"
-#include "OvsPacketParser.h"
+#include "Core\Util.h"
+#include "Core\Jhash.h"
+#include "OpenFlow\Flow.h"
+#include "OpenFlow\PacketParser.h"
+#include "Protocol\NetProto.h"

 #ifdef OVS_DBG_MOD
 #undef OVS_DBG_MOD
 #endif
 #define OVS_DBG_MOD OVS_DBG_FLOW
-#include "OvsDebug.h"
+#include "Core\Debug.h"

 #pragma warning( push )
 #pragma warning( disable:4127 )
diff --git a/datapath-windows/ovsext/OvsFlow.h b/datapath-windows/ovsext/OpenFlow/Flow.h
similarity index 97%
rename from datapath-windows/ovsext/OvsFlow.h
rename to datapath-windows/ovsext/OpenFlow/Flow.h
index 93368b3..3300dea 100644
--- a/datapath-windows/ovsext/OvsFlow.h
+++ b/datapath-windows/ovsext/OpenFlow/Flow.h
@@ -18,9 +18,9 @@
 #define __OVS_FLOW_H_ 1

 #include "precomp.h"
-#include "OvsSwitch.h"
-#include "OvsUser.h"
-#include "OvsNetProto.h"
+#include "Protocol\NetProto.h"
+#include "Hyper-V\Switch.h"
+#include "Winetlink\User.h"

 typedef struct _OvsFlow {
     LIST_ENTRY ListEntry;            // In Datapath's flowTable.
diff --git a/datapath-windows/ovsext/OvsPacketParser.c b/datapath-windows/ovsext/OpenFlow/PacketParser.c
similarity index 99%
rename from datapath-windows/ovsext/OvsPacketParser.c
rename to datapath-windows/ovsext/OpenFlow/PacketParser.c
index 0a93435..2c955e1 100644
--- a/datapath-windows/ovsext/OvsPacketParser.c
+++ b/datapath-windows/ovsext/OpenFlow/PacketParser.c
@@ -14,7 +14,7 @@
  * limitations under the License.
  */

-#include "OvsPacketParser.h"
+#include "PacketParser.h"

 //XXX consider moving to NdisGetDataBuffer.
 const VOID *
diff --git a/datapath-windows/ovsext/OvsPacketParser.h b/datapath-windows/ovsext/OpenFlow/PacketParser.h
similarity index 99%
rename from datapath-windows/ovsext/OvsPacketParser.h
rename to datapath-windows/ovsext/OpenFlow/PacketParser.h
index ab3c613..9386982 100644
--- a/datapath-windows/ovsext/OvsPacketParser.h
+++ b/datapath-windows/ovsext/OpenFlow/PacketParser.h
@@ -18,7 +18,7 @@
 #define __OVS_PACKET_PARSER_H_ 1

 #include "precomp.h"
-#include "OvsNetProto.h"
+#include "Protocol\NetProto.h"

 const VOID* OvsGetPacketBytes(const NET_BUFFER_LIST *_pNB, UINT32 len,
                               UINT32 SrcOffset, VOID *storage);
diff --git a/datapath-windows/include/OvsPub.h b/datapath-windows/ovsext/OpenFlow/Pub.h
similarity index 99%
rename from datapath-windows/include/OvsPub.h
rename to datapath-windows/ovsext/OpenFlow/Pub.h
index 1282996..b6d4d3e 100644
--- a/datapath-windows/include/OvsPub.h
+++ b/datapath-windows/ovsext/OpenFlow/Pub.h
@@ -22,7 +22,7 @@
       typedef char AssertOnCompileFailed[(EXPR) ? 1: -1]
 #define BUILD_ASSERT_DECL(EXPR) BUILD_ASSERT(EXPR)

-#include "OvsNetlink.h"
+#include "Winetlink\Netlink.h"

 #define OVS_DRIVER_MAJOR_VER 1
 #define OVS_DRIVER_MINOR_VER 0
@@ -365,6 +365,12 @@ typedef struct OvsFlowStats {
     uint8_t tcpFlags;
 } OvsFlowStats;

+struct nlattr
+{
+    UINT16 len;
+    UINT16 type;
+};
+
 typedef struct OvsFlowInfo {
     OvsFlowKey key;
     struct OvsFlowStats stats;
diff --git a/datapath-windows/ovsext/OvsVport.c b/datapath-windows/ovsext/OpenFlow/Vport.c
similarity index 99%
rename from datapath-windows/ovsext/OvsVport.c
rename to datapath-windows/ovsext/OpenFlow/Vport.c
index 35bdaea..033ad39 100644
--- a/datapath-windows/ovsext/OvsVport.c
+++ b/datapath-windows/ovsext/OpenFlow/Vport.c
@@ -15,21 +15,23 @@
  */

 #include "precomp.h"
-#include "OvsIoctl.h"
-#include "OvsJhash.h"
-#include "OvsSwitch.h"
-#include "OvsVport.h"
-#include "OvsEvent.h"
-#include "OvsUser.h"
-#include "OvsVxlan.h"
-#include "OvsIpHelper.h"
-#include "OvsOid.h"
+
+#include "Core\IpHelper.h"
+#include "Core\Jhash.h"
+#include "OpenFlow\Vport.h"
+#include "Transfer\Vxlan.h"
+#include "Hyper-V\Oid.h"
+#include "Hyper-V\Switch.h"
+#include "Winetlink\Event.h"
+#include "Winetlink\Ioctl.h"
+#include "Winetlink\User.h"
+

 #ifdef OVS_DBG_MOD
 #undef OVS_DBG_MOD
 #endif
 #define OVS_DBG_MOD OVS_DBG_VPORT
-#include "OvsDebug.h"
+#include "Core\Debug.h"

 #define VPORT_NIC_ENTER(_nic) \
     OVS_LOG_TRACE("Enter: PortId: %x, NicIndex: %d", _nic->PortId, \
diff --git a/datapath-windows/ovsext/OvsVport.h b/datapath-windows/ovsext/OpenFlow/Vport.h
similarity index 99%
rename from datapath-windows/ovsext/OvsVport.h
rename to datapath-windows/ovsext/OpenFlow/Vport.h
index 8fe23f1..083ef66 100644
--- a/datapath-windows/ovsext/OvsVport.h
+++ b/datapath-windows/ovsext/OpenFlow/Vport.h
@@ -17,7 +17,7 @@
 #ifndef __OVS_VPORT_H_
 #define __OVS_VPORT_H_ 1

-#include "OvsSwitch.h"
+#include "Hyper-V\Switch.h"

 /*
  * A Vport, or Virtual Port, is a port on the OVS. It can be one of the
diff --git a/datapath-windows/ovsext/OvsChecksum.c b/datapath-windows/ovsext/Protocol/Checksum.c
similarity index 99%
rename from datapath-windows/ovsext/OvsChecksum.c
rename to datapath-windows/ovsext/Protocol/Checksum.c
index e192373..38bb43d 100644
--- a/datapath-windows/ovsext/OvsChecksum.c
+++ b/datapath-windows/ovsext/Protocol/Checksum.c
@@ -15,15 +15,15 @@
  */

 #include "precomp.h"
-#include "OvsChecksum.h"
-#include "OvsFlow.h"
+#include "Checksum.h"
+#include "OpenFlow\Flow.h"

 #ifdef OVS_DBG_MOD
 #undef OVS_DBG_MOD
 #endif
 #define OVS_DBG_MOD OVS_DBG_CHECKSUM
-#include "OvsDebug.h"
-#include "OvsPacketParser.h"
+#include "Core\Debug.h"
+#include "OpenFlow\PacketParser.h"

 #ifndef htons
 #define htons(_x) (((UINT16)(_x) >> 8) + (((UINT16)(_x) << 8) & 0xff00))
diff --git a/datapath-windows/ovsext/OvsChecksum.h b/datapath-windows/ovsext/Protocol/Checksum.h
similarity index 100%
rename from datapath-windows/ovsext/OvsChecksum.h
rename to datapath-windows/ovsext/Protocol/Checksum.h
diff --git a/datapath-windows/ovsext/OvsEth.h b/datapath-windows/ovsext/Protocol/Ethernet.h
similarity index 100%
rename from datapath-windows/ovsext/OvsEth.h
rename to datapath-windows/ovsext/Protocol/Ethernet.h
diff --git a/datapath-windows/ovsext/OvsNetProto.h b/datapath-windows/ovsext/Protocol/NetProto.h
similarity index 99%
rename from datapath-windows/ovsext/OvsNetProto.h
rename to datapath-windows/ovsext/Protocol/NetProto.h
index 5e98206..a6194a3 100644
--- a/datapath-windows/ovsext/OvsNetProto.h
+++ b/datapath-windows/ovsext/Protocol/NetProto.h
@@ -18,7 +18,7 @@
 #define __OVS_NET_PROTO_H_ 1

 #include "precomp.h"
-#include "OvsEth.h"
+#include "Protocol\Ethernet.h"

 #define ETH_ADDR_LENGTH    6
 /*
diff --git a/datapath-windows/ovsext/OvsBufferMgmt.c b/datapath-windows/ovsext/Transfer/BufferMgmt.c
similarity index 99%
rename from datapath-windows/ovsext/OvsBufferMgmt.c
rename to datapath-windows/ovsext/Transfer/BufferMgmt.c
index 8aa8060..2c81c8d 100644
--- a/datapath-windows/ovsext/OvsBufferMgmt.c
+++ b/datapath-windows/ovsext/Transfer/BufferMgmt.c
@@ -77,17 +77,17 @@
  */

 #include "precomp.h"
-#include "OvsSwitch.h"
+#include "Hyper-V\Switch.h"

 #ifdef OVS_DBG_MOD
 #undef OVS_DBG_MOD
 #endif
 #define OVS_DBG_MOD OVS_DBG_BUFMGMT
-#include "OvsDebug.h"
-#include "OvsNetProto.h"
-#include "OvsFlow.h"
-#include "OvsChecksum.h"
-#include "OvsPacketParser.h"
+#include "Core\Debug.h"
+#include "OpenFlow\Flow.h"
+#include "OpenFlow\PacketParser.h"
+#include "Protocol\Checksum.h"
+#include "Protocol\NetProto.h"

 /*
  * --------------------------------------------------------------------------
diff --git a/datapath-windows/ovsext/OvsBufferMgmt.h b/datapath-windows/ovsext/Transfer/BufferMgmt.h
similarity index 100%
rename from datapath-windows/ovsext/OvsBufferMgmt.h
rename to datapath-windows/ovsext/Transfer/BufferMgmt.h
diff --git a/datapath-windows/ovsext/OvsPacketIO.c b/datapath-windows/ovsext/Transfer/PacketIO.c
similarity index 98%
rename from datapath-windows/ovsext/OvsPacketIO.c
rename to datapath-windows/ovsext/Transfer/PacketIO.c
index 39e5703..6e3ec27 100644
--- a/datapath-windows/ovsext/OvsPacketIO.c
+++ b/datapath-windows/ovsext/Transfer/PacketIO.c
@@ -20,15 +20,15 @@
  */

 #include "precomp.h"
-#include "OvsIoctl.h"
-#include "OvsSwitch.h"
-#include "OvsVport.h"
-#include "OvsNetProto.h"
-#include "OvsUser.h"
-#include "OvsPacketIO.h"
-#include "OvsFlow.h"
-#include "OvsEvent.h"
-#include "OvsUser.h"
+
+#include "OpenFlow\Flow.h"
+#include "OpenFlow\Vport.h"
+#include "Protocol\NetProto.h"
+#include "Transfer\PacketIO.h"
+#include "Hyper-V\Switch.h"
+#include "Winetlink\Event.h"
+#include "Winetlink\Ioctl.h"
+#include "Winetlink\User.h"

 /* Due to an imported header file */
 #pragma warning( disable:4505 )
@@ -37,7 +37,7 @@
 #undef OVS_DBG_MOD
 #endif
 #define OVS_DBG_MOD OVS_DBG_DISPATCH
-#include "OvsDebug.h"
+#include "Core\Debug.h"

 extern NDIS_STRING ovsExtGuidUC;
 extern NDIS_STRING ovsExtFriendlyNameUC;
diff --git a/datapath-windows/ovsext/OvsPacketIO.h b/datapath-windows/ovsext/Transfer/PacketIO.h
similarity index 100%
rename from datapath-windows/ovsext/OvsPacketIO.h
rename to datapath-windows/ovsext/Transfer/PacketIO.h
diff --git a/datapath-windows/ovsext/OvsTunnel.c b/datapath-windows/ovsext/Transfer/Tunnel.c
similarity index 97%
rename from datapath-windows/ovsext/OvsTunnel.c
rename to datapath-windows/ovsext/Transfer/Tunnel.c
index b5a369a..5b22c58 100644
--- a/datapath-windows/ovsext/OvsTunnel.c
+++ b/datapath-windows/ovsext/Transfer/Tunnel.c
@@ -30,16 +30,17 @@
 #pragma warning( disable:4127 )

 #include <fwpmk.h>
-#include "OvsTunnel.h"
-#include "OvsIoctl.h"
-#include "OvsSwitch.h"
-#include "OvsVport.h"
-#include "OvsEvent.h"
-#include "OvsUser.h"
-#include "OvsVxlan.h"
-#include "OvsPacketIO.h"
-#include "OvsNetProto.h"
-#include "OvsFlow.h"
+#include "Tunnel.h"
+
+#include "OpenFlow\Vport.h"
+#include "Hyper-V\Switch.h"
+#include "Winetlink\Event.h"
+#include "Winetlink\Ioctl.h"
+#include "Winetlink\User.h"
+#include "Transfer\PacketIO.h"
+#include "Transfer\Vxlan.h"
+#include "Protocol\NetProto.h"
+#include "OpenFlow\Flow.h"

 extern POVS_SWITCH_CONTEXT gOvsSwitchContext;

diff --git a/datapath-windows/ovsext/OvsTunnel.h b/datapath-windows/ovsext/Transfer/Tunnel.h
similarity index 100%
rename from datapath-windows/ovsext/OvsTunnel.h
rename to datapath-windows/ovsext/Transfer/Tunnel.h
diff --git a/datapath-windows/ovsext/OvsTunnelFilter.c b/datapath-windows/ovsext/Transfer/TunnelFilter.c
similarity index 98%
rename from datapath-windows/ovsext/OvsTunnelFilter.c
rename to datapath-windows/ovsext/Transfer/TunnelFilter.c
index a1de007..51aa43b 100644
--- a/datapath-windows/ovsext/OvsTunnelFilter.c
+++ b/datapath-windows/ovsext/Transfer/TunnelFilter.c
@@ -29,12 +29,12 @@
 #include <in6addr.h>
 #include <ip2string.h>

-#include "OvsTunnel.h"
-#include "OvsSwitch.h"
-#include "OvsVport.h"
-#include "OvsEvent.h"
-#include "OvsUser.h"
-#include "OvsVxlan.h"
+#include "OpenFlow\Vport.h"
+#include "Hyper-V\Switch.h"
+#include "Transfer\Tunnel.h"
+#include "Transfer\Vxlan.h"
+#include "Winetlink\Event.h"
+#include "Winetlink\User.h"


 #define INITGUID
diff --git a/datapath-windows/ovsext/OvsTunnelIntf.h b/datapath-windows/ovsext/Transfer/TunnelIntf.h
similarity index 100%
rename from datapath-windows/ovsext/OvsTunnelIntf.h
rename to datapath-windows/ovsext/Transfer/TunnelIntf.h
diff --git a/datapath-windows/ovsext/OvsVxlan.c b/datapath-windows/ovsext/Transfer/Vxlan.c
similarity index 97%
rename from datapath-windows/ovsext/OvsVxlan.c
rename to datapath-windows/ovsext/Transfer/Vxlan.c
index 63909ae..5ad77f4 100644
--- a/datapath-windows/ovsext/OvsVxlan.c
+++ b/datapath-windows/ovsext/Transfer/Vxlan.c
@@ -15,19 +15,19 @@
  */

 #include "precomp.h"
-#include "OvsNetProto.h"
-#include "OvsIoctl.h"
-#include "OvsSwitch.h"
-#include "OvsVport.h"
-#include "OvsFlow.h"
-#include "OvsVxlan.h"
-#include "OvsIpHelper.h"
-#include "OvsChecksum.h"
-#include "OvsUser.h"
-#include "OvsPacketIO.h"
-#include "OvsFlow.h"
-#include "OvsPacketParser.h"
-#include "OvsChecksum.h"
+
+#include "Core\IpHelper.h"
+#include "Hyper-V\Switch.h"
+#include "OpenFlow\Flow.h"
+#include "OpenFlow\PacketParser.h"
+#include "OpenFlow\Vport.h"
+#include "Transfer\PacketIO.h"
+#include "Transfer\Vxlan.h"
+#include "Protocol\Checksum.h"
+#include "Protocol\NetProto.h"
+#include "Winetlink\Ioctl.h"
+#include "Winetlink\User.h"
+

 #pragma warning( push )
 #pragma warning( disable:4127 )
@@ -37,7 +37,7 @@
 #undef OVS_DBG_MOD
 #endif
 #define OVS_DBG_MOD OVS_DBG_VXLAN
-#include "OvsDebug.h"
+#include "Core\Debug.h"

 /* Helper macro to check if a VXLAN ID is valid. */
 #define VXLAN_ID_IS_VALID(vxlanID) (0 < (vxlanID) && (vxlanID) <= 0xffffff)
diff --git a/datapath-windows/ovsext/OvsVxlan.h b/datapath-windows/ovsext/Transfer/Vxlan.h
similarity index 98%
rename from datapath-windows/ovsext/OvsVxlan.h
rename to datapath-windows/ovsext/Transfer/Vxlan.h
index 55cfc82..1b129a0 100644
--- a/datapath-windows/ovsext/OvsVxlan.h
+++ b/datapath-windows/ovsext/Transfer/Vxlan.h
@@ -17,7 +17,7 @@
 #ifndef __OVS_VXLAN_H_
 #define __OVS_VXLAN_H_ 1

-#include "OvsNetProto.h"
+#include "Protocol\NetProto.h"
 typedef struct _OVS_VXLAN_VPORT {
     UINT32 dstPort;
     UINT64 inPkts;
diff --git a/datapath-windows/ovsext/OvsEvent.c b/datapath-windows/ovsext/Winetlink/Event.c
similarity index 99%
rename from datapath-windows/ovsext/OvsEvent.c
rename to datapath-windows/ovsext/Winetlink/Event.c
index a75b2bd..14e8c24 100644
--- a/datapath-windows/ovsext/OvsEvent.c
+++ b/datapath-windows/ovsext/Winetlink/Event.c
@@ -16,16 +16,16 @@

 #include "precomp.h"

-#include "OvsIoctl.h"
-#include "OvsSwitch.h"
-#include "OvsVport.h"
-#include "OvsEvent.h"
+#include "OpenFlow\Vport.h"
+#include "Hyper-V\Switch.h"
+#include "Winetlink\Event.h"
+#include "Winetlink\Ioctl.h"

 #ifdef OVS_DBG_MOD
 #undef OVS_DBG_MOD
 #endif
 #define OVS_DBG_MOD OVS_DBG_EVENT
-#include "OvsDebug.h"
+#include "Core\Debug.h"

 LIST_ENTRY ovsEventQueue;
 UINT32 ovsNumEventQueue;
diff --git a/datapath-windows/ovsext/OvsEvent.h b/datapath-windows/ovsext/Winetlink/Event.h
similarity index 100%
rename from datapath-windows/ovsext/OvsEvent.h
rename to datapath-windows/ovsext/Winetlink/Event.h
diff --git a/datapath-windows/ovsext/OvsIoctl.c b/datapath-windows/ovsext/Winetlink/Ioctl.c
similarity index 98%
rename from datapath-windows/ovsext/OvsIoctl.c
rename to datapath-windows/ovsext/Winetlink/Ioctl.c
index 893cbf7..cdde14b 100644
--- a/datapath-windows/ovsext/OvsIoctl.c
+++ b/datapath-windows/ovsext/Winetlink/Ioctl.c
@@ -15,22 +15,22 @@
  */

 #include "precomp.h"
-#include "OvsIoctl.h"
-#include "OvsJhash.h"
-#include "OvsSwitch.h"
-#include "OvsVport.h"
-#include "OvsEvent.h"
-#include "OvsUser.h"
-#include "OvsPacketIO.h"
-#include "OvsNetProto.h"
-#include "OvsFlow.h"
-#include "OvsUser.h"
+
+#include "Core\Jhash.h"
+#include "OpenFlow\Flow.h"
+#include "OpenFlow\Vport.h"
+#include "Protocol\NetProto.h"
+#include "Transfer\PacketIO.h"
+#include "Hyper-V\Switch.h"
+#include "Winetlink\Event.h"
+#include "Winetlink\Ioctl.h"
+#include "Winetlink\User.h"

 #ifdef OVS_DBG_MOD
 #undef OVS_DBG_MOD
 #endif
 #define OVS_DBG_MOD OVS_DBG_IOCTL
-#include "OvsDebug.h"
+#include "Core\Debug.h"

 /* Handles to the device object for communication with userspace. */
 NDIS_HANDLE gOvsDeviceHandle;
diff --git a/datapath-windows/ovsext/OvsIoctl.h b/datapath-windows/ovsext/Winetlink/Ioctl.h
similarity index 100%
rename from datapath-windows/ovsext/OvsIoctl.h
rename to datapath-windows/ovsext/Winetlink/Ioctl.h
diff --git a/datapath-windows/include/OvsNetlink.h b/datapath-windows/ovsext/Winetlink/Netlink.h
similarity index 100%
rename from datapath-windows/include/OvsNetlink.h
rename to datapath-windows/ovsext/Winetlink/Netlink.h
diff --git a/datapath-windows/ovsext/OvsUser.c b/datapath-windows/ovsext/Winetlink/User.c
similarity index 98%
rename from datapath-windows/ovsext/OvsUser.c
rename to datapath-windows/ovsext/Winetlink/User.c
index 8271d52..2fe1acc8 100644
--- a/datapath-windows/ovsext/OvsUser.c
+++ b/datapath-windows/ovsext/Winetlink/User.c
@@ -22,22 +22,23 @@

 #include "precomp.h"

-#include "OvsIoctl.h"
-#include "OvsSwitch.h"
-#include "OvsVport.h"
-#include "OvsEvent.h"
-#include "OvsUser.h"
-#include "OvsPacketIO.h"
-#include "OvsChecksum.h"
-#include "OvsNetProto.h"
-#include "OvsFlow.h"
-#include "OvsTunnelIntf.h"
+#include "Hyper-V\Switch.h"
+#include "OpenFlow\Vport.h"
+#include "OpenFlow\Flow.h"
+#include "Protocol\Checksum.h"
+#include "Protocol\NetProto.h"
+#include "Transfer\PacketIO.h"
+#include "Transfer\TunnelIntf.h"
+#include "Winetlink\Event.h"
+#include "Winetlink\Ioctl.h"
+#include "Winetlink\User.h"
+

 #ifdef OVS_DBG_MOD
 #undef OVS_DBG_MOD
 #endif
 #define OVS_DBG_MOD OVS_DBG_USER
-#include "OvsDebug.h"
+#include "Core\Debug.h"

 OVS_USER_PACKET_QUEUE ovsPacketQueues[OVS_MAX_NUM_PACKET_QUEUES];

diff --git a/datapath-windows/ovsext/OvsUser.h b/datapath-windows/ovsext/Winetlink/User.h
similarity index 100%
rename from datapath-windows/ovsext/OvsUser.h
rename to datapath-windows/ovsext/Winetlink/User.h
diff --git a/datapath-windows/ovsext/ovsext.vcxproj b/datapath-windows/ovsext/ovsext.vcxproj
index 9728f20..bf793f0 100644
--- a/datapath-windows/ovsext/ovsext.vcxproj
+++ b/datapath-windows/ovsext/ovsext.vcxproj
@@ -70,28 +70,32 @@
     <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" />
   </ImportGroup>
   <ItemGroup Label="WrappedTaskItems">
-    <ClInclude Include="OvsAtomic.h" />
-    <ClInclude Include="OvsBufferMgmt.h" />
-    <ClInclude Include="OvsChecksum.h" />
-    <ClInclude Include="OvsDebug.h" />
-    <ClInclude Include="OvsEth.h" />
-    <ClInclude Include="OvsEvent.h" />
-    <ClInclude Include="OvsFlow.h" />
-    <ClInclude Include="OvsIoctl.h" />
-    <ClInclude Include="OvsIpHelper.h" />
-    <ClInclude Include="OvsJhash.h" />
-    <ClInclude Include="OvsNetProto.h" />
-    <ClInclude Include="OvsOid.h" />
-    <ClInclude Include="OvsPacketParser.h" />
-    <ClInclude Include="OvsSwitch.h" />
-    <ClInclude Include="OvsTunnel.h" />
-    <ClInclude Include="OvsTunnelIntf.h" />
-    <ClInclude Include="OvsTypes.h" />
-    <ClInclude Include="OvsUser.h" />
-    <ClInclude Include="OvsUtil.h" />
-    <ClInclude Include="OvsVport.h" />
-    <ClInclude Include="OvsVxlan.h" />
+    <ClInclude Include="..\..\datapath\linux\compat\include\linux\openvswitch.h" />
+    <ClInclude Include="Core\Atomic.h" />
+    <ClInclude Include="Core\Debug.h" />
+    <ClInclude Include="Core\IpHelper.h" />
+    <ClInclude Include="Core\Jhash.h" />
+    <ClInclude Include="Core\Types.h" />
+    <ClInclude Include="Core\Util.h" />
+    <ClInclude Include="Hyper-V\Oid.h" />
+    <ClInclude Include="Hyper-V\Switch.h" />
+    <ClInclude Include="OpenFlow\Flow.h" />
+    <ClInclude Include="OpenFlow\PacketParser.h" />
+    <ClInclude Include="OpenFlow\Pub.h" />
+    <ClInclude Include="OpenFlow\Vport.h" />
     <ClInclude Include="precomp.h" />
+    <ClInclude Include="Protocol\Checksum.h" />
+    <ClInclude Include="Protocol\Ethernet.h" />
+    <ClInclude Include="Protocol\NetProto.h" />
+    <ClInclude Include="Transfer\BufferMgmt.h" />
+    <ClInclude Include="Transfer\PacketIO.h" />
+    <ClInclude Include="Transfer\Tunnel.h" />
+    <ClInclude Include="Transfer\TunnelIntf.h" />
+    <ClInclude Include="Transfer\Vxlan.h" />
+    <ClInclude Include="Winetlink\Event.h" />
+    <ClInclude Include="Winetlink\Ioctl.h" />
+    <ClInclude Include="Winetlink\Netlink.h" />
+    <ClInclude Include="Winetlink\User.h" />
   </ItemGroup>
   <PropertyGroup>
     <TargetName>OVSExt</TargetName>
@@ -117,38 +121,38 @@
       <ExceptionHandling>
       </ExceptionHandling>
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">..\..\datapath\linux\compat\include\linux;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
       <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'">$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
     </ClCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
-    <ClCompile Include="OvsDriver.c" />
-    <ClCompile Include="OvsJhash.c" />
-    <ClCompile Include="OvsOid.c" />
-    <ClCompile Include="OvsPacketIO.c" />
-    <ClCompile Include="OvsPacketParser.c" />
-    <ClCompile Include="OvsBufferMgmt.c" />
-    <ClCompile Include="OvsChecksum.c" />
-    <ClCompile Include="OvsIpHelper.c" />
-    <ClCompile Include="OvsTunnel.c" />
-    <ClCompile Include="OvsTunnelFilter.c" />
-    <ClCompile Include="OvsVxlan.c" />
-    <ClCompile Include="OvsActions.c" />
-    <ClCompile Include="OvsDebug.c" />
-    <ClCompile Include="OvsEvent.c" />
-    <ClCompile Include="OvsFlow.c" />
-    <ClCompile Include="OvsUser.c" />
-    <ClCompile Include="OvsIoctl.c" />
-    <ClCompile Include="OvsSwitch.c" />
-    <ClCompile Include="OvsUtil.c" />
-    <ClCompile Include="OvsVport.c" />
+    <ClCompile Include="Core\Debug.c" />
+    <ClCompile Include="Core\Driver.c" />
+    <ClCompile Include="Core\IpHelper.c" />
+    <ClCompile Include="Core\Jhash.c" />
+    <ClCompile Include="Core\Util.c" />
+    <ClCompile Include="Hyper-V\Oid.c" />
+    <ClCompile Include="Hyper-V\Switch.c" />
+    <ClCompile Include="OpenFlow\Actions.c" />
+    <ClCompile Include="OpenFlow\Flow.c" />
+    <ClCompile Include="OpenFlow\PacketParser.c" />
+    <ClCompile Include="OpenFlow\Vport.c" />
     <ClCompile Include="precompsrc.c">
       <AdditionalIncludeDirectories>;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreCompiledHeaderFile>precomp.h</PreCompiledHeaderFile>
       <PreCompiledHeader>Create</PreCompiledHeader>
       <PreCompiledHeaderOutputFile>$(IntDir)\precomp.h.pch</PreCompiledHeaderOutputFile>
     </ClCompile>
+    <ClCompile Include="Protocol\Checksum.c" />
+    <ClCompile Include="Transfer\BufferMgmt.c" />
+    <ClCompile Include="Transfer\PacketIO.c" />
+    <ClCompile Include="Transfer\Tunnel.c" />
+    <ClCompile Include="Transfer\TunnelFilter.c" />
+    <ClCompile Include="Transfer\Vxlan.c" />
+    <ClCompile Include="Winetlink\Event.c" />
+    <ClCompile Include="Winetlink\Ioctl.c" />
+    <ClCompile Include="Winetlink\User.c" />
     <ResourceCompile Include="ovsext.rc" />
   </ItemGroup>
   <ItemGroup>
diff --git a/datapath-windows/ovsext/ovsext.vcxproj.filters b/datapath-windows/ovsext/ovsext.vcxproj.filters
new file mode 100644
index 0000000..6b77d8f
--- /dev/null
+++ b/datapath-windows/ovsext/ovsext.vcxproj.filters
@@ -0,0 +1,168 @@
+?<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <ClInclude Include="..\..\datapath\linux\compat\include\linux\openvswitch.h" />
+    <ClInclude Include="Core\Atomic.h">
+      <Filter>Core</Filter>
+    </ClInclude>
+    <ClInclude Include="Core\Debug.h">
+      <Filter>Core</Filter>
+    </ClInclude>
+    <ClInclude Include="Core\IpHelper.h">
+      <Filter>Core</Filter>
+    </ClInclude>
+    <ClInclude Include="Core\Jhash.h">
+      <Filter>Core</Filter>
+    </ClInclude>
+    <ClInclude Include="Core\Types.h">
+      <Filter>Core</Filter>
+    </ClInclude>
+    <ClInclude Include="Core\Util.h">
+      <Filter>Core</Filter>
+    </ClInclude>
+    <ClInclude Include="Hyper-V\Oid.h">
+      <Filter>Hyper-V</Filter>
+    </ClInclude>
+    <ClInclude Include="Hyper-V\Switch.h">
+      <Filter>Hyper-V</Filter>
+    </ClInclude>
+    <ClInclude Include="OpenFlow\Flow.h">
+      <Filter>OpenFlow</Filter>
+    </ClInclude>
+    <ClInclude Include="OpenFlow\PacketParser.h">
+      <Filter>OpenFlow</Filter>
+    </ClInclude>
+    <ClInclude Include="OpenFlow\Pub.h">
+      <Filter>OpenFlow</Filter>
+    </ClInclude>
+    <ClInclude Include="OpenFlow\Vport.h">
+      <Filter>OpenFlow</Filter>
+    </ClInclude>
+    <ClInclude Include="Protocol\Checksum.h">
+      <Filter>Protocol</Filter>
+    </ClInclude>
+    <ClInclude Include="Protocol\Ethernet.h">
+      <Filter>Protocol</Filter>
+    </ClInclude>
+    <ClInclude Include="Protocol\NetProto.h">
+      <Filter>Protocol</Filter>
+    </ClInclude>
+    <ClInclude Include="Transfer\BufferMgmt.h">
+      <Filter>Transfer</Filter>
+    </ClInclude>
+    <ClInclude Include="Transfer\PacketIO.h">
+      <Filter>Transfer</Filter>
+    </ClInclude>
+    <ClInclude Include="Transfer\Tunnel.h">
+      <Filter>Transfer</Filter>
+    </ClInclude>
+    <ClInclude Include="Transfer\TunnelIntf.h">
+      <Filter>Transfer</Filter>
+    </ClInclude>
+    <ClInclude Include="Transfer\Vxlan.h">
+      <Filter>Transfer</Filter>
+    </ClInclude>
+    <ClInclude Include="Winetlink\Event.h">
+      <Filter>Winetlink</Filter>
+    </ClInclude>
+    <ClInclude Include="Winetlink\Ioctl.h">
+      <Filter>Winetlink</Filter>
+    </ClInclude>
+    <ClInclude Include="Winetlink\Netlink.h">
+      <Filter>Winetlink</Filter>
+    </ClInclude>
+    <ClInclude Include="Winetlink\User.h">
+      <Filter>Winetlink</Filter>
+    </ClInclude>
+    <ClInclude Include="precomp.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="ovsext.rc" />
+  </ItemGroup>
+  <ItemGroup>
+    <Inf Include="*.inf" />
+  </ItemGroup>
+  <ItemGroup>
+    <Filter Include="Core">
+      <UniqueIdentifier>{3f79f9e1-c9ad-4338-991f-6bc756cc6b74}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Hyper-V">
+      <UniqueIdentifier>{cb3503d3-fc14-4aca-b0f5-21c7276ba801}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="OpenFlow">
+      <UniqueIdentifier>{ffb6f3f0-2aab-4dd4-8798-4dfaf72b4b7a}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Protocol">
+      <UniqueIdentifier>{11144dea-d066-4e12-bb4e-d2de256159a1}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Transfer">
+      <UniqueIdentifier>{3be331c9-dd74-4fde-9270-66b19b00f04f}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Winetlink">
+      <UniqueIdentifier>{1e534fdc-ef52-46c6-bd09-a3e8c692d272}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="Core\Debug.c">
+      <Filter>Core</Filter>
+    </ClCompile>
+    <ClCompile Include="Core\Driver.c">
+      <Filter>Core</Filter>
+    </ClCompile>
+    <ClCompile Include="Core\IpHelper.c">
+      <Filter>Core</Filter>
+    </ClCompile>
+    <ClCompile Include="Core\Jhash.c">
+      <Filter>Core</Filter>
+    </ClCompile>
+    <ClCompile Include="Core\Util.c">
+      <Filter>Core</Filter>
+    </ClCompile>
+    <ClCompile Include="Hyper-V\Oid.c">
+      <Filter>Hyper-V</Filter>
+    </ClCompile>
+    <ClCompile Include="Hyper-V\Switch.c">
+      <Filter>Hyper-V</Filter>
+    </ClCompile>
+    <ClCompile Include="OpenFlow\Actions.c">
+      <Filter>OpenFlow</Filter>
+    </ClCompile>
+    <ClCompile Include="OpenFlow\Flow.c">
+      <Filter>OpenFlow</Filter>
+    </ClCompile>
+    <ClCompile Include="OpenFlow\PacketParser.c">
+      <Filter>OpenFlow</Filter>
+    </ClCompile>
+    <ClCompile Include="OpenFlow\Vport.c">
+      <Filter>OpenFlow</Filter>
+    </ClCompile>
+    <ClCompile Include="Protocol\Checksum.c">
+      <Filter>Protocol</Filter>
+    </ClCompile>
+    <ClCompile Include="Transfer\BufferMgmt.c">
+      <Filter>Transfer</Filter>
+    </ClCompile>
+    <ClCompile Include="Transfer\PacketIO.c">
+      <Filter>Transfer</Filter>
+    </ClCompile>
+    <ClCompile Include="Transfer\Tunnel.c">
+      <Filter>Transfer</Filter>
+    </ClCompile>
+    <ClCompile Include="Transfer\TunnelFilter.c">
+      <Filter>Transfer</Filter>
+    </ClCompile>
+    <ClCompile Include="Transfer\Vxlan.c">
+      <Filter>Transfer</Filter>
+    </ClCompile>
+    <ClCompile Include="Winetlink\Event.c">
+      <Filter>Winetlink</Filter>
+    </ClCompile>
+    <ClCompile Include="Winetlink\Ioctl.c">
+      <Filter>Winetlink</Filter>
+    </ClCompile>
+    <ClCompile Include="Winetlink\User.c">
+      <Filter>Winetlink</Filter>
+    </ClCompile>
+    <ClCompile Include="precompsrc.c" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/datapath-windows/ovsext/precomp.h b/datapath-windows/ovsext/precomp.h
index 45e72de..26a8f97 100644
--- a/datapath-windows/ovsext/precomp.h
+++ b/datapath-windows/ovsext/precomp.h
@@ -21,11 +21,12 @@
 #include <ntstrsafe.h>
 #include <Strsafe.h>

-#include "OvsTypes.h"
-#include "..\include\OvsPub.h"
-#include "OvsUtil.h"
+#include "Core/Types.h"
+#include "Core/Util.h"
+#include "OpenFlow/Pub.h"
 /*
  * Include openvswitch.h from userspace. Changing the location the file from
  * include/linux is pending discussion.
  */
-#include "include\linux\openvswitch.h"
+
+#include "openvswitch.h"
diff --git a/datapath/linux/compat/include/linux/openvswitch.h b/datapath/linux/compat/include/linux/openvswitch.h
index 271a14e..309680f 100644
--- a/datapath/linux/compat/include/linux/openvswitch.h
+++ b/datapath/linux/compat/include/linux/openvswitch.h
@@ -40,8 +40,10 @@
 #ifndef _LINUX_OPENVSWITCH_H
 #define _LINUX_OPENVSWITCH_H 1

+#ifndef _WIN32
 #include <linux/types.h>
 #include <linux/if_ether.h>
+#endif

 /**
  * struct ovs_header - header for OVS Generic Netlink messages.
--
1.8.3.msysgit.0





More information about the dev mailing list