/*******************************************************************************
 * (c) Copyright 2015 Microsemi Corporation.  All rights reserved.
 *
 *
 *
 * SVN $Revision: $
 * SVN $Date: $
 */

#ifndef TUNNEL_H_
#define TUNNEL_H_

#include <api_oam_sdk/common/types/inc/mr_api_types.h>
#include "egl_types.h"

/*
 * @brief Change the active state of the tunnel mode on an interface
 *
 * @param[in] iface The interface this applies to.
 * @param[in] value A boolean. Set True to enable tunneling mode, set to false to disable.
 */
void setTunnelModeActive(iFace_t iface, bool value);

/*
 * @brief Check if the tunnel mode is active on an interface
 *
 * @param[in] iface The interface this applies to.
 */
bool isTunnelModeActive(iFace_t iface);

/*
 * @brief Get the Vlan, prio and DE values for the tunnel tag on an interface
 *
 * @param[in] iface The interface this applies to.
 * @param[out] tunnelVid a pointer to a vidEntry_t struct that will be updated with the Vlan, prio and DE from the tunnel tag.
 */
void getTunnelVid(iFace_t iface, vidEntry_t *tunnelVid);

/*
 * @brief Get the Vlan, prio and DE values for the tunnel tag on an interface
 *
 * @param[in] iface The interface this applies to.
 * @param[out] tunnelVid A vidEntry_t struct with the new values for Vlan, prio and DE for the tunnel tag.
 */
void setTunnelVid(iFace_t iface, vidEntry_t tunnelVid);

/*
 * @brief Returns the Ethertype value for the tunnel tag on an interface
 *
 * @param[in] iface The interface this applies to.
 */
uint16_t getTunnelTagId(iFace_t iface);

/*
 * @brief Set the Tag ID value for the tunnel tag on an interface
 *
 * @param[in] iface The interface this applies to.
 * @param[in] tagId The Tag ID to use in tunnel mode.
 */
void setTunnelTagId(iFace_t iface, uint16_t tagId);

#endif /* TUNNEL_H_ */
