summaryrefslogtreecommitdiff
path: root/datapath-windows/ovsext/Flow.h
diff options
context:
space:
mode:
authorSamuel Ghinet <sghinet@cloudbasesolutions.com>2014-08-29 04:06:48 +0000
committerBen Pfaff <blp@nicira.com>2014-08-29 07:55:05 -0700
commitfa1324c92810c6b1e33b7e87caaaf2e6c4041040 (patch)
tree8e06f5d991d755215bb6839a997bc58721b2d754 /datapath-windows/ovsext/Flow.h
parentfd972eb87a888242fb1a8ec2394fa7b3030fbd7d (diff)
downloadopenvswitch-fa1324c92810c6b1e33b7e87caaaf2e6c4041040.tar.gz
datapath-windows: Rename files.
This patch includes the file renaming and accommodations needed for the file renaming to build the forwarding extension for Hyper-V. This patch is also a follow-up for the thread: http://openvswitch.org/pipermail/dev/2014-August/044005.html Signed-off-by: Samuel Ghinet <sghinet@cloudbasesolutions.com> Co-authored-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'datapath-windows/ovsext/Flow.h')
-rw-r--r--datapath-windows/ovsext/Flow.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/datapath-windows/ovsext/Flow.h b/datapath-windows/ovsext/Flow.h
new file mode 100644
index 000000000..3964c5464
--- /dev/null
+++ b/datapath-windows/ovsext/Flow.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2014 VMware, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at:
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __FLOW_H_
+#define __FLOW_H_ 1
+
+#include "precomp.h"
+#include "Switch.h"
+#include "User.h"
+#include "NetProto.h"
+
+typedef struct _OvsFlow {
+ LIST_ENTRY ListEntry; // In Datapath's flowTable.
+ OvsFlowKey key;
+ UINT64 hash;
+ UINT32 actionsLen;
+ UINT8 tcpFlags;
+ UINT64 used;
+ UINT64 packetCount;
+ UINT64 byteCount;
+ UINT32 userActionsLen; // used for flow query
+ UINT32 actionBufferLen; // used for flow reuse
+ NL_ATTR actions[1];
+} OvsFlow;
+
+
+typedef struct _OvsLayers {
+ UINT32 l3Ofs; // IPv4, IPv6, ARP, or other L3 header.
+ UINT32 l4Ofs; // TCP, UDP, ICMP, ICMPv6, or other L4 header.
+ UINT32 l7Ofs; // L4 protocol's payload.
+} OvsLayers;
+
+extern UINT64 ovsUserTimestampDelta;
+extern UINT64 ovsTimeIncrementPerTick;
+
+NDIS_STATUS OvsDeleteFlowTable(OVS_DATAPATH *datapath);
+NDIS_STATUS OvsAllocateFlowTable(OVS_DATAPATH *datapath,
+ POVS_SWITCH_CONTEXT switchContext);
+
+NDIS_STATUS OvsExtractFlow(const NET_BUFFER_LIST *pkt, UINT32 inPort,
+ OvsFlowKey *flow, POVS_PACKET_HDR_INFO layers,
+ OvsIPv4TunnelKey *tunKey);
+OvsFlow *OvsLookupFlow(OVS_DATAPATH *datapath, const OvsFlowKey *key,
+ UINT64 *hash, BOOLEAN hashValid);
+UINT64 OvsHashFlow(const OvsFlowKey *key);
+VOID OvsFlowUsed(OvsFlow *flow, const NET_BUFFER_LIST *pkt,
+ const POVS_PACKET_HDR_INFO layers);
+
+NTSTATUS OvsDumpFlowIoctl(PVOID inputBuffer, UINT32 inputLength,
+ PVOID outputBuffer, UINT32 outputLength,
+ UINT32 *replyLen);
+NTSTATUS OvsPutFlowIoctl(PVOID inputBuffer, UINT32 inputLength,
+ PVOID outputBuffer, UINT32 outputLength,
+ UINT32 *replyLen);
+NTSTATUS OvsGetFlowIoctl(PVOID inputBuffer, UINT32 inputLength,
+ PVOID outputBuffer, UINT32 outputLength,
+ UINT32 *replyLen);
+NTSTATUS OvsFlushFlowIoctl(PVOID inputBuffer, UINT32 inputLength);
+
+/* Flags for tunneling */
+#define OVS_TNL_F_DONT_FRAGMENT (1 << 0)
+#define OVS_TNL_F_CSUM (1 << 1)
+#define OVS_TNL_F_KEY (1 << 2)
+
+#endif /* __FLOW_H_ */