]>
Commit | Line | Data |
---|---|---|
acddc0ed | 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
6833ae01 | 2 | /* Pseudowire definitions |
3 | * Copyright (C) 2016 Volta Networks, Inc. | |
6833ae01 | 4 | */ |
5 | ||
6 | #ifndef _FRR_PW_H | |
7 | #define _FRR_PW_H | |
8 | ||
5e244469 RW |
9 | #ifdef __cplusplus |
10 | extern "C" { | |
11 | #endif | |
12 | ||
87b5f1b7 RW |
13 | /* L2VPN name length. */ |
14 | #define L2VPN_NAME_LEN 32 | |
15 | ||
6833ae01 | 16 | /* Pseudowire type - LDP and BGP use the same values. */ |
17 | #define PW_TYPE_ETHERNET_TAGGED 0x0004 /* RFC 4446 */ | |
18 | #define PW_TYPE_ETHERNET 0x0005 /* RFC 4446 */ | |
19 | #define PW_TYPE_WILDCARD 0x7FFF /* RFC 4863, RFC 6668 */ | |
20 | ||
21 | /* Pseudowire flags. */ | |
22 | #define F_PSEUDOWIRE_CWORD 0x01 | |
23 | ||
fd563cc7 KS |
24 | /* Pseudowire status TLV */ |
25 | #define PW_FORWARDING 0 | |
26 | #define PW_NOT_FORWARDING (1 << 0) | |
27 | #define PW_LOCAL_RX_FAULT (1 << 1) | |
28 | #define PW_LOCAL_TX_FAULT (1 << 2) | |
29 | #define PW_PSN_RX_FAULT (1 << 3) | |
30 | #define PW_PSN_TX_FAULT (1 << 4) | |
6833ae01 | 31 | |
32 | /* | |
33 | * Protocol-specific information about the pseudowire. | |
34 | */ | |
35 | union pw_protocol_fields { | |
36 | struct { | |
87b5f1b7 RW |
37 | struct in_addr lsr_id; |
38 | uint32_t pwid; | |
39 | char vpn_name[L2VPN_NAME_LEN]; | |
6833ae01 | 40 | } ldp; |
6833ae01 | 41 | }; |
42 | ||
5e244469 RW |
43 | #ifdef __cplusplus |
44 | } | |
45 | #endif | |
46 | ||
6833ae01 | 47 | #endif /* _FRR_PW_H */ |