1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! IEEE 802.3ad / IEEE 802.1AX Link Aggregation Control Protocol (LACP) wire frame builder.
//!
//! Synthesizes 110-byte LACP Data Units (LACPDUs) over Ethernet Slow Protocols (`EtherType = 0x8809`)
//! addressed to the Slow Protocols multicast MAC `01:80:C2:00:00:02`. Encodes Subtype `0x01`
//! and Version `0x01`, followed by the 20-byte Actor Information TLV (`Type = 0x01`), 20-byte
//! Partner Information TLV (`Type = 0x02`), 16-byte Collector Information TLV (`Type = 0x03`),
//! 2-byte Terminator TLV (`Type = 0x00`), and 50 bytes of reserved zero padding.
//!
//! Canonical `.fasm` syntax:
//! `a -> b LACP [ACTOR_SYS <mac>] [ACTOR_KEY <u16>] [ACTOR_PORT <u16>] [ACTOR_STATE <u8>] [PARTNER_SYS <mac>] [PARTNER_KEY <u16>] [PARTNER_PORT <u16>] [PARTNER_STATE <u8>]`
use crate*;
use crateWireContext;
use crateCompilerError;
use cratebuild_ethernet_and_l2;
use Vec;
/// Builds an IEEE 802.3ad / 802.1AX Link Aggregation Control Protocol (LACP) wire frame.
///
/// # Errors
/// Returns `CompilerError::BackendError` if construction fails.