/*
 * Copyright (c) 2015-2016 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.
 */

vl_api_version 1.0.0

/** \brief Create netmap
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param netmap_if_name - interface name
    @param hw_addr - interface MAC
    @param use_random_hw_addr - use random generated MAC
    @param is_pipe - is pipe
    @param is_master - 0=slave, 1=master
*/
autoreply define netmap_create
{
  u32 client_index;
  u32 context;

  u8 netmap_if_name[64];
  u8 hw_addr[6];
  u8 use_random_hw_addr;
  u8 is_pipe;
  u8 is_master;
};

/** \brief Delete netmap
    @param client_index - opaque cookie to identify the sender
    @param context - sender context, to match reply w/ request
    @param netmap_if_name - interface name
*/
autoreply define netmap_delete
{
  u32 client_index;
  u32 context;

  u8 netmap_if_name[64];
};

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