]> git.proxmox.com Git - mirror_frr.git/blob - lib/pw.h
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / lib / pw.h
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* Pseudowire definitions
3 * Copyright (C) 2016 Volta Networks, Inc.
4 */
5
6 #ifndef _FRR_PW_H
7 #define _FRR_PW_H
8
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12
13 /* L2VPN name length. */
14 #define L2VPN_NAME_LEN 32
15
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
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)
31
32 /*
33 * Protocol-specific information about the pseudowire.
34 */
35 union pw_protocol_fields {
36 struct {
37 struct in_addr lsr_id;
38 uint32_t pwid;
39 char vpn_name[L2VPN_NAME_LEN];
40 } ldp;
41 };
42
43 #ifdef __cplusplus
44 }
45 #endif
46
47 #endif /* _FRR_PW_H */