numam-dpdk/lib/librte_net/rte_mpls.h
David Marchand d613fe10b3 net: add rte prefix to MPLS structure
Add 'rte_' prefix to structures:
- rename struct mpls_hdr as struct rte_mpls_hdr.

Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-10-25 19:00:22 +02:00

43 lines
781 B
C

/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2016 6WIND S.A.
*/
#ifndef _RTE_MPLS_H_
#define _RTE_MPLS_H_
/**
* @file
*
* MPLS-related defines
*/
#include <stdint.h>
#include <rte_byteorder.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* MPLS header.
*/
struct rte_mpls_hdr {
uint16_t tag_msb; /**< Label(msb). */
#if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
uint8_t tag_lsb:4; /**< Label(lsb). */
uint8_t tc:3; /**< Traffic class. */
uint8_t bs:1; /**< Bottom of stack. */
#else
uint8_t bs:1; /**< Bottom of stack. */
uint8_t tc:3; /**< Traffic class. */
uint8_t tag_lsb:4; /**< label(lsb) */
#endif
uint8_t ttl; /**< Time to live. */
} __attribute__((__packed__));
#ifdef __cplusplus
}
#endif
#endif /* RTE_MPLS_H_ */