2 * Copyright (c) 2014 VMware, Inc.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
21 typedef struct _OVS_VXLAN_VPORT {
30 } OVS_VXLAN_VPORT, *POVS_VXLAN_VPORT;
33 typedef struct VXLANHdr {
36 /* Packet needs replication to multicast group (used for multicast proxy). */
37 UINT32 locallyReplicate:1;
38 /* Instance ID flag, must be set to 1. */
50 NTSTATUS OvsInitVxlanTunnel(POVS_VPORT_ENTRY vport,
53 VOID OvsCleanupVxlanTunnel(POVS_VPORT_ENTRY vport);
55 NDIS_STATUS OvsSlowPathDecapVxlan(const PNET_BUFFER_LIST packet,
56 OvsIPv4TunnelKey *tunnelKey);
58 NDIS_STATUS OvsEncapVxlan(PNET_BUFFER_LIST curNbl,
59 OvsIPv4TunnelKey *tunKey,
60 POVS_SWITCH_CONTEXT switchContext,
62 POVS_PACKET_HDR_INFO layers,
63 PNET_BUFFER_LIST *newNbl);
65 NDIS_STATUS OvsDoDecapVxlan(POVS_SWITCH_CONTEXT switchContext,
66 PNET_BUFFER_LIST curNbl,
67 OvsIPv4TunnelKey *tunKey,
68 PNET_BUFFER_LIST *newNbl);
70 static __inline UINT32
71 OvsGetVxlanTunHdrSize(VOID)
73 /* XXX: Can L2 include VLAN at all? */
74 return sizeof (EthHdr) + sizeof (IPHdr) + sizeof (UDPHdr) +
78 #define VXLAN_UDP_PORT 4789
79 #define VXLAN_UDP_PORT_NBO 0xB512
81 #endif /* __VXLAN_H_ */