/* Hey Emacs use -*- mode: C -*- */
/*
 * Copyright (c) 2015-2019 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.
 */

option version = "2.0.0";

import "vnet/ip/ip_types.api";

/** \brief A GRE tunnel type
*/
enum gre_tunnel_type
{
  GRE_API_TUNNEL_TYPE_L3 = 0,
  GRE_API_TUNNEL_TYPE_TEB,
  GRE_API_TUNNEL_TYPE_ERSPAN,
};

/** \brief A GRE tunnel
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param tunnel_type - 0: L3, 1: TEB, 2: ERSPAN
    @param instance - optional unique custom device instance, else ~0.
    @param src - Source IP address
    @param dst - Destination IP address, can be multicast
    @param outer_fib_id - Encap FIB table ID
    @param session_id - session for ERSPAN tunnel, range 0-1023
    @param sw_if_index - ignored on create/delete, present in details.
*/
typedef gre_tunnel
{
  u32 client_index;
  u32 context;
  u8 is_add;
  u8 is_ipv6;
  u16 session_id;
  vl_api_gre_tunnel_type_t type;
  u32 instance;
  u32 outer_fib_id;
  u32 sw_if_index;
  vl_api_address_t src;
  vl_api_address_t dst;
};

define gre_tunnel_add_del
{
  u32 client_index;
  u32 context;
  u8 is_add;
  vl_api_gre_tunnel_t tunnel;
};

define gre_tunnel_add_del_reply
{
  u32 context;
  i32 retval;
  u32 sw_if_index;
};

define gre_tunnel_dump
{
  u32 client_index;
  u32 context;
  u32 sw_if_index;
};

define gre_tunnel_details
{
  u32 context;
  vl_api_gre_tunnel_t tunnel;
};

/*
 * Local Variables:
 * eval: (c-set-style "gnu")
 * End:
 */
