linux/include/uapi/linux/mpls.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
#ifndef _UAPI_MPLS_H
#define _UAPI_MPLS_H

#include <linux/types.h>
#include <asm/byteorder.h>

/* Reference: RFC 5462, RFC 3032
 *
 *  0                   1                   2                   3
 *  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 * |                Label                  | TC  |S|       TTL     |
 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 *
 *	Label:  Label Value, 20 bits
 *	TC:     Traffic Class field, 3 bits
 *	S:      Bottom of Stack, 1 bit
 *	TTL:    Time to Live, 8 bits
 */

struct mpls_label {};

#define MPLS_LS_LABEL_MASK
#define MPLS_LS_LABEL_SHIFT
#define MPLS_LS_TC_MASK
#define MPLS_LS_TC_SHIFT
#define MPLS_LS_S_MASK
#define MPLS_LS_S_SHIFT
#define MPLS_LS_TTL_MASK
#define MPLS_LS_TTL_SHIFT

/* Reserved labels */
#define MPLS_LABEL_IPV4NULL
#define MPLS_LABEL_RTALERT
#define MPLS_LABEL_IPV6NULL
#define MPLS_LABEL_IMPLNULL
#define MPLS_LABEL_ENTROPY
#define MPLS_LABEL_GAL
#define MPLS_LABEL_OAMALERT
#define MPLS_LABEL_EXTENSION

#define MPLS_LABEL_FIRST_UNRESERVED

/* These are embedded into IFLA_STATS_AF_SPEC:
 * [IFLA_STATS_AF_SPEC]
 * -> [AF_MPLS]
 *    -> [MPLS_STATS_xxx]
 *
 * Attributes:
 * [MPLS_STATS_LINK] = {
 *     struct mpls_link_stats
 * }
 */
enum {};

#define MPLS_STATS_MAX

struct mpls_link_stats {};

#endif /* _UAPI_MPLS_H */