vpp/vpp-api/java/japi/org/openvpp/vppjapi/vppVxlanTunnelDetails.java
Chris Luke 99cb335ac1 VXLAN over IPv6.
Refactors the VXLAN node to work with both IPv4 and IPv6 transports.

There is a discussion thread for this change at
https://lists.fd.io/pipermail/vpp-dev/2016-March/000279.html

Note that this changes the binary configuration API to support both
address families; each address uses the same memory for either address
type and a flag to indicate which is in use. This also includes changes
to the Java API to support both address families.

The CLI and VAT syntax remains unchanged; the code detects whether an
IPv4 or an IPv6 address was given.

Configuration examples:

IPv4 CLI: create vxlan tunnel src 192.168.1.1 dst 192.168.1.2
                vni 10 encap-vrf-id 0 decap-next l2
IPv6 CLI: create vxlan tunnel src 2620:124:9000::1 dst 2620:124:9000::2
                vni 16 encap-vrf-id 0 decap-next l2

IPv4 VAT: vxlan_add_del_tunnel src 192.168.1.1 dst 192.168.1.2
                vni 10 encap-vrf-id 0 decap-next l2
IPv6 VAT: vxlan_add_del_tunnel src 2620:124:9000::1 dst 2620:124:9000::2
                vni 16 encap-vrf-id 0 decap-next l2

TODO: The encap path is not as optimal as it could be.

Change-Id: I87be8bf0501e0c9cd7e401be4542bb599f1b6e47
Signed-off-by: Chris Luke <chrisy@flirble.org>
2016-04-28 15:13:01 -04:00

36 lines
1.2 KiB
Java

/*
* Copyright (c) 2015 Cisco and/or its affiliates.
* 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.
*/
package org.openvpp.vppjapi;
public final class vppVxlanTunnelDetails {
public final byte[] srcAddress;
public final byte[] dstAddress;
public final int encapVrfId;
public final int vni;
public final int decapNextIndex;
public final boolean isIpv6;
public vppVxlanTunnelDetails(byte[] srcAddress, byte[] dstAddress,
int encapVrfId, int vni, int decapNextIndex, boolean isIpv6) {
this.srcAddress = srcAddress;
this.dstAddress = dstAddress;
this.encapVrfId = encapVrfId;
this.vni = vni;
this.decapNextIndex = decapNextIndex;
this.isIpv6 = isIpv6;
}
}