blob: 0e5a06f806f49e72c44360b48e59b4503b910caf [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Christopher Ferrisba8d4f42014-09-03 19:56:49 -07007#ifndef _UAPI_MPLS_H
8#define _UAPI_MPLS_H
9#include <linux/types.h>
10#include <asm/byteorder.h>
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070011struct mpls_label {
Tao Baod7db5942015-01-28 10:07:51 -080012 __be32 entry;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070013};
14#define MPLS_LS_LABEL_MASK 0xFFFFF000
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070015#define MPLS_LS_LABEL_SHIFT 12
16#define MPLS_LS_TC_MASK 0x00000E00
17#define MPLS_LS_TC_SHIFT 9
18#define MPLS_LS_S_MASK 0x00000100
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070019#define MPLS_LS_S_SHIFT 8
20#define MPLS_LS_TTL_MASK 0x000000FF
21#define MPLS_LS_TTL_SHIFT 0
Christopher Ferris05d08e92016-02-04 13:16:38 -080022#define MPLS_LABEL_IPV4NULL 0
Christopher Ferris05d08e92016-02-04 13:16:38 -080023#define MPLS_LABEL_RTALERT 1
24#define MPLS_LABEL_IPV6NULL 2
25#define MPLS_LABEL_IMPLNULL 3
26#define MPLS_LABEL_ENTROPY 7
Christopher Ferris05d08e92016-02-04 13:16:38 -080027#define MPLS_LABEL_GAL 13
28#define MPLS_LABEL_OAMALERT 14
29#define MPLS_LABEL_EXTENSION 15
30#define MPLS_LABEL_FIRST_UNRESERVED 16
Christopher Ferris525ce912017-07-26 13:12:53 -070031enum {
32 MPLS_STATS_UNSPEC,
33 MPLS_STATS_LINK,
34 __MPLS_STATS_MAX,
35};
36#define MPLS_STATS_MAX (__MPLS_STATS_MAX - 1)
37struct mpls_link_stats {
38 __u64 rx_packets;
39 __u64 tx_packets;
40 __u64 rx_bytes;
41 __u64 tx_bytes;
42 __u64 rx_errors;
43 __u64 tx_errors;
44 __u64 rx_dropped;
45 __u64 tx_dropped;
46 __u64 rx_noroute;
47};
Christopher Ferris05d08e92016-02-04 13:16:38 -080048#endif