# FrameAssembly v3.1.2 — Complete LLM Prompt-Injection Reference (`llms-full.txt`) > **FrameAssembly** (`frameassembly` v3.1.2, MIT License, official website & browser playground: > `https://frameassembly-lang.dev/`, repository: `https://github.com/SteveWinschel/FrameAssembly`) > is a rootless, offline "Packets as Code" Rust compiler and PCAP/PCAPNG-to-`.frasm` decompiler. > It compiles `.frasm` (`text/vnd.frameassembly`) code into classic `.pcap` or nanosecond `.pcapng` > packet captures—and decompiles `.pcap` / `.pcapng` captures back into `.frasm` code—across all > **81 native Layer 2 through Layer 7 protocols**. This file is engineered specifically to be attached or pasted directly into an LLM prompt window so the model can write, review, debug, or refactor any `.frasm` specification with **zero keyword guessing**. Every syntax rule, field modifier, shorthand flag, `` enum value, default port, validation rule, and compilable example below matches the `frameassembly 3.1.2` compiler 1-to-1. --- ## 1. Core `.frasm` v3.1.2 Language Architecture & Invariants ### 1.1 Two-Block Minimal Program Structure (`host` + `compile`) & Optional `flow` A `.frasm` file requires only **two top-level sections** for straightforward captures, with an optional reusable `flow` template section in between: 1. **One or more `host` declarations**: `host { [ip ] [mac ] }` - At least one of `ip` or `mac` is required per host. - `ip` accepts any IPv4 (`10.0.0.1`) or IPv6 (`2001:db8::1`, `fe80::1`) literal (never `/24` CIDR suffixes, `ipv4`, `ipv6`, `mask`, `=`, `:`, or commas). - `mac` accepts colon (`00:1a:2b:3c:4d:5e`), hyphen (`00-1A-2B-3C-4D-5E`), or Cisco dot-quad (`001a.2b3c.4d5e`) hex notation. - **MAC-Only Hosts**: Valid for the 8 pure Layer 2 protocols (`arp`, `vlan`, `qinq`, `lldp`, `stp`, `lacp`, `eapol`, `mpls`). All Layer 3, Layer 4, and Layer 7 protocols require `ip` on both endpoints. - **Automatic Default MACs**: When `mac` is omitted on a unicast `host`, FrameAssembly assigns deterministic MACs in 1-based `host` declaration order: `00:00:00:00:00:01` for the first declared host, `00:00:00:00:00:02` for the second, `00:00:00:00:00:03` for the third, and so on. Multicast IPv4 destinations (`224.0.0.0/4`) derive RFC 1112 MACs (`01:00:5e:xx:xx:xx`), and multicast IPv6 destinations (`ff00::/8`) derive RFC 2464 MACs (`33:33:xx:xx:xx:xx`). Pure L2 control protocols derive IEEE group destination MACs automatically when `dstmac` is omitted (`stp`: `01:80:c2:00:00:00`, `lacp`: `01:80:c2:00:00:02`, `eapol`: `01:80:c2:00:00:03`, `lldp`: `01:80:c2:00:00:0e`, `arp request`: `ff:ff:ff:ff:ff:ff`). 2. **Zero or more optional `flow` templates**: `flow (, [, ...]) { }` - Use `flow` when you want to replay a multi-step exchange across different host pairs (for example, running the same TCP + TLS + HTTP sequence over both IPv4 and IPv6 host pairs) or organize multi-stage topologies cleanly. - Every `flow` declaration must have a parameter list `()` with at least 1 parameter (never `flow name { ... }`). Inside a `flow`, frame endpoints must reference the flow's formal parameters rather than global host names directly. 3. **Exactly one `compile` block**: `compile { }` - `compile` accepts direct inline frame statements (`client -> server icmp echorequest`), flow invocations (`web_check(client, server)`), or a mix of both in execution order. - Each statement executes top-to-bottom and emits **1 Ethernet frame** (`1 statement = 1 frame`). - There is **no `loop` keyword** (`loop` was removed in v2.0.0; repeat flow invocations or frame lines explicitly inside `compile`). Minimal 2-block `.frasm` program (`host` + `compile`): ```frameassembly host workstation { ip 192.168.10.25 } host resolver { ip 192.168.10.53 } compile { workstation -> resolver dns query txid 0x1a2b qname "portal.internal" qtype "A" wait 3ms workstation <- resolver dns response txid 0x1a2b qname "portal.internal" qtype "A" rdata "10.20.30.40" } ``` Reusable parameterized `flow(a, b)` running identically over IPv4 and IPv6 host pairs: ```frameassembly host app_v4 { ip 10.10.1.10 } host db_v4 { ip 10.10.1.20 } host app_v6 { ip 2001:db8:10::10 } host db_v6 { ip 2001:db8:10::20 } flow pg_ping(c, s) { c -> s tcp syn srcport 52100 dstport 5432 win 65535 mss 1460 wait 1ms c <- s tcp syn ack win 65535 mss 1460 wait 1ms c -> s tcp ack wait 1ms c -> s postgres query sql "SELECT 1;" wait 2ms c <- s postgres commandcomplete wait 1ms c <- s postgres readyforquery } compile { pg_ping(app_v4, db_v4) pg_ping(app_v6, db_v6) } ``` ### 1.2 Lexical Rules: Strict-Lowercase Built-In Keywords vs. Flexible User Identifiers - **Strict-Lowercase Built-In Keywords (`[a-z0-9]+`)**: Every built-in keyword, protocol name, modifier, flag, and time unit (`ns`, `us`, `ms`, `s`, `m`) is **strictly lowercase alphanumeric with zero `_` and zero `-`** (`echorequest`, `innervlan`, `clienthello`, `serverhello`, `hosthdr`, `transporthdr`, `sackperm`, `agentip`, `hellotime`, `pkttype`, `shutdownack`, `readholdingregisters`, `routeradvert`, `neighborsolicit`, `accessrequest`, `oidval`, `ipval`). Uppercase or underscored keywords (`TCP`, `echo_request`, `inner_vlan`, `host_hdr`, `sack_perm`) are rejected with self-healing diagnostics (`replace '' with ''`). - **Flexible User Identifiers**: User-defined `host`, `flow`, and parameter names match `[a-zA-Z_][a-zA-Z0-9_]*(-[a-zA-Z0-9_]+)*` (allowing uppercase letters, `_`, and internal `-` such as `fw-dmz-01`, `Core_SW_1`, or `plc-rack-a`, stopping cleanly before `->`). Contextual keywords may also be used as user identifiers or unquoted `str_or_ident` values where unambiguous, though descriptive endpoint names (`client`, `firewall`, `plc1`) are clearest. - **Direction Operators**: - `a -> b ...` sends a frame from source `a` to destination `b`. - `a <- b ...` sends a frame from source `b` back to destination `a` (preserving visual left/right column alignment between initiator `a` and responder `b`). - **Comments & Literals**: - Line comments start with `//` and run to end of line (`#` and `;` are invalid). - Unsigned integers accept decimal (`443`, `65535`) or hex (`0x0800`, `0xdeadbeef`); signed integers (`int` in SNMP `varbind`, `precision` in `ntp`, `etype` in `kerberos`, `msgid` in `ldap`) also accept negative decimal (`-5`, `-20`). - Strings are double-quoted UTF-8 (`"GET / HTTP/1.1\r\n"`, supporting `\r`, `\n`, `\t`, `\\`, `\"`, `\'`, `\xHH`, `\uXXXX`). Single-quoted strings (`'abc'`) are invalid. - Raw hex byte strings (`hexpayload`, `iv`, `icv`, `engineid`) are double-quoted hex octets allowing optional spaces or colons (`"deadbeef"`, `"de:ad:be:ef"`, `"de ad be ef"`). - ASN.1 OIDs (`oid`, `enterprise`, `varbind ...`, `oidval `) accept unquoted dotted numeric trees with at least two arcs (`1.3.6.1.2.1.1.1.0` or `.1.3.6.1.2.1.1.1.0`) or quoted strings (`"1.3.6.1.2.1.1.1.0"`). ### 1.3 Post-Packet `wait` Timing Model (Nanosecond Precision) - **Frame 1 always starts at relative timestamp `0ns` (`0.000000000 s`)**. - `wait ` is a **post-packet delay**: writing `wait 2ms` on frame `k` transmits frame `k` at the current clock timestamp and then advances the capture clock by `2ms` *before* frame `k + 1` is emitted. - When `wait` is **omitted** on frame `k`, the capture clock advances by the **default inter-packet gap of `10ms` (`10,000,000 ns`)** before frame `k + 1`. - Supported units: `ns` (`1` ns), `us` (`1,000` ns), `ms` (`1,000,000` ns), `s` (`1,000,000,000` ns), and `m` (`60,000,000,000` ns). `wait 0ns` emits back-to-back zero-gap bursts. - `wait` on the final emitted packet of a capture has no subsequent packet to delay. ### 1.4 Stateful 4-Tuple TCP Progression & Bidirectional Port Inheritance - **Bidirectional Port Memory**: When `a -> b` sets `srcport 51234 dstport 443` (or uses a protocol default destination port with ephemeral client source port `49152`), subsequent `a <- b` replies automatically swap ports (`srcport 443`, `dstport 51234`) and subsequent `a -> b` packets reuse `51234 -> 443` without repeating `srcport` or `dstport`. - **Shared 4-Tuple TCP `seq` / `acknum` State Machine**: - Raw `tcp` frames and all TCP-based Layer 7 protocols (`http`, `http2`, `grpc`, `websocket`, `tls`, `ssh`, `telnet`, `ftp`, `smtp`, `imap`, `pop3`, `ldap`, `smb`, `mysql`, `postgres`, `redis`, `mqtt`, `amqp`, `whois`, `s7comm`, `opcua`, `bgp`, `openflow`, `tacacs`, plus dual-L4 protocols with default or explicit `transport tcp`) share the **same canonical 4-tuple state**: - Initial sequence number defaults to `1000` per direction when `seq` is omitted. - `syn` and `fin` each advance that direction's next `seq` by `+1`. - TCP payload frames (including every TCP L7 statement, which emits `psh ack` automatically when no explicit TCP flags are written) advance that direction's next `seq` by `+payload_len` and set `acknum` to the peer's latest expected sequence number. - Explicit `seq ` or `acknum ` overrides on a frame transmit that exact header value and re-anchor the connection state for testing retransmissions, sequence gaps, or RST attacks. - **Dynamic L7 Port & Multicast Return-Tuple Rules**: - `dhcp`: IPv4 `discover`/`request`/`release` use UDP `68 -> 67`, while `offer`/`ack` replies use UDP `67 -> 68`; over IPv6 hosts, `solicit`/`request` use UDP `546 -> 547` and `advertise`/`reply` use UDP `547 -> 546`. - `mdns`: Defaults to UDP `5353 -> 5353` and overrides destination IP to `224.0.0.251` (IPv4) or `ff02::fb` (IPv6) with matching RFC multicast destination MAC. - `ptp`: Event messages (`sync`, `delayreq`) use UDP `319`; general messages (`followup`, `delayresp`, `announce`) use UDP `320` (swapping onto `srcport` on `<-` replies). - `radius`: Authentication (`accessrequest`/`accept`/`reject`/`challenge`) uses UDP `1812`; accounting (`accountingrequest`/`accountingresponse`) uses UDP `1813`. - `snmp1` / `snmp2` / `snmp3`: `trap`, `inform`, and `report` default to UDP `162`; `get`, `getnext`, `getbulk`, `set`, and `response` default to UDP `161`. ### 1.5 Cross-Layer Modifiers & Semantic Validation Bounds Any frame statement may combine its protocol modifiers with cross-layer L2/L3/L4 modifiers (unless restricted below). Out-of-range values fail semantic validation at compile time: | Layer | Modifier Syntax | Validated Range / Rules & Default | | :--- | :--- | :--- | | **Universal** | `wait ` | Post-packet gap before next frame (default `10ms`). | | **Universal** | `payload ""` \| `hexpayload ""` | Mutually exclusive raw payload override/trailer. | | **L2** | `srcmac ` \| `dstmac ` | Overrides Ethernet source or destination MAC. | | **L2** | `ethertype ` | `0..=65535` (e.g., `0x0800`, `0x86dd`, `0x88cc`). | | **L2 VLAN** | `vlan <0..4095>` `[pcp <0..7>]` `[dei <0\|1>]` | Wraps any L2/L3/L4/L7 frame in an IEEE 802.1Q tag (`0x8100`). | | **L2 QinQ** | `qinq <0..4095>` `[innervlan <0..4095>]` | Emits outer `0x88a8` S-Tag + inner `0x8100` C-Tag (default inner `1`). | | **L2 MPLS** | `mpls <0..1048575>` `[exp\|tc <0..7>]` `[bos <0\|1>]` `[mplsttl <0..255>]` | Prepends 32-bit MPLS shim (`0x8847`); at most one `mpls` clause per frame. | | **L3 IP** | `ttl <0..255>` | IPv4 TTL or IPv6 Hop Limit (default `64`; `255` on `ndp`/`vrrp`/BGP/OSPF). | | **L3 QoS** | `dscp <0..63>` `[ecn <0..3>]` | IPv4 TOS / IPv6 Traffic Class DiffServ & ECN bits (default `0`). | | **L3 IPv4** | `ipid <0..65535>` `[df]` `[mf]` `[fragoffset <0..8191>]` | IPv4 identification & fragmentation (`df` and `mf` on IPv4; ignored/N/A v6). | | **L3 IPv6** | `flowlabel <0..1048575>` | 20-bit IPv6 Flow Label (silently ignored when flow runs over IPv4 hosts). | | **L4 Ports** | `srcport <0..65535>` `dstport <0..65535>` | Overrides TCP/UDP/SCTP source or destination port. | | **L4 Dual** | `transport ` | Allowed **only** on the 9 dual-L4 protocols (listed below). | | **L4 TCP** | `seq ` `acknum ` `win\|window ` `urgent ` | Allowed **only** on `tcp` and TCP-based L7 frames. | | **L4 TCP** | `syn` `ack` `fin` `rst` `psh` `urg` `ece` `cwr` | Bare TCP flag tokens; rejected on UDP/L2/L3 non-TCP protocols. | | **L4 TCP Opt** | `mss ` `wscale ` `sackperm` `tsval ` `tsecr ` | RFC 7323 TCP options; rejected on non-TCP protocols. | **Strict Validation Rules Enforced by `validate_semantics`**: - **Endpoint IP Family Match**: Source and destination hosts in a frame must both be IPv4, both be IPv6, or (for the 8 L2 protocols only) MAC-only. Mixing IPv4 and IPv6 endpoints is an error. - **Address-Family-Specific Protocols**: `igmp` requires IPv4 hosts; `ndp` and `mld` require IPv6 hosts; all other 70 L3/L4/L7 protocols work identically over IPv4 and IPv6 hosts. - **`transport tcp|udp` Whitelist**: Permitted **exclusively** on the 9 dual-transport protocols: `dns` (default `udp`), `sip` (default `udp`), `syslog` (default `udp`), `kerberos` (default `udp`), `memcached` (default `udp`), `dnp3` (default `tcp`), `modbus` (default `tcp`), `nfs` (default `tcp`), and `ethernetip` (default `tcp`, or `udp` `2222` on `sendunitdata`). Note: use `transporthdr ""` (never `transport`) for the RTSP `Transport:` header! - **Protocol-Specific Checks**: `dns`/`mdns` `qname` enforces RFC 1035 label length `<= 63` octets and total domain length `<= 253`; `snmp3` `engineid` requires valid even-length ASCII hex; `hsrp` `hellotime` requires `0..=255` (`u8`). ### 1.6 CLI, Installation, Output Formats (`.pcap` vs `.pcapng`) & Library APIs - **Recommended Installation**: - Rust / Cargo (**Recommended**): `cargo install frameassembly` (Rust `1.88+`, Edition 2024, MIT). - Browser Playground: `https://frameassembly-lang.dev/` - macOS / Linux script: `curl -fsSL https://raw.githubusercontent.com/SteveWinschel/FrameAssembly/main/install.sh | sh` - Windows PowerShell: `irm https://raw.githubusercontent.com/SteveWinschel/FrameAssembly/main/install.ps1 | iex` - Package managers & IDE: `brew install SteveWinschel/tap-FrameAssembly/frameassembly`, Scoop (`frameassembly`), Debian/Ubuntu `.deb` on GitHub Releases, VS Code extension `SteveWinschel.frameassembly-vscode`, and `npm install frameassembly-wasm`. - **CLI Commands (`v3.1.2` — default root compile + 4 subcommands; no `-o`/`--output` or `compile`)**: - `frameassembly demo.frasm` — Compiles `demo.frasm` to `demo.pcap` (classic libpcap `0xa1b2c3d4`). - `frameassembly demo.frasm out.pcap` — Compiles to classic libpcap `.pcap` (microsecond/classic header compatible with every legacy parser, `tcpdump`, `tcpreplay`, Suricata, and Wireshark). - `frameassembly demo.frasm out.pcapng` — Compiles to nanosecond-precision PCAPNG (`IfTsResol(9)`, `LINKTYPE_ETHERNET`, snaplen `65535`). - `frameassembly show demo.frasm` — Validates syntax/semantics and prints the relative-timestamp packet table to stdout without writing disk files. - `frameassembly reverse capture.pcap [reversed.frasm]` — Decompiles `.pcap` or `.pcapng` back into strict-lowercase `.frasm` code (`host1`, `host2`, ..., verified by self-check oracle). - `frameassembly help [subcommand]` | `frameassembly version` — Displays usage or `3.1.2`. - **Rust & WebAssembly Entrypoints**: - Rust (`frameassembly` crate): `lexer::lex`, `parser::parse_program`, `parser::validation::validate_semantics`, `backend::compile_program`, `backend::generate_pcap`, `reverse::{reverse_pcap_bytes, reverse_pcap_file, reverse_pcap_reader}`. - WebAssembly (`frameassembly-wasm`): `compile_frasm_to_pcap(src)`, `compile_frasm_to_pcapng(src)`, `validate_frasm(src)`, `inspect_frasm(src)`, `reverse_pcap(bytes)`. - **Documentation, Use Cases & Grammar Files**: - Documentation: https://frameassembly-lang.dev/docs (getting started, Layer 2–7 protocol references, topologies & dual-stack, `.frasm` specification, and compiler internals). - Use Cases & Examples: https://frameassembly-lang.dev/use-cases (ready-to-run `.frasm` recipes); repository overview in `README.md`. - Formal Grammars: `grammar.ebnf` (ISO/IEC 14977 EBNF, included in full in Section 4), `frameassembly.gbnf` (`llama.cpp` / `XGrammar`), and `frameassembly.lark` (`Outlines` / `vLLM`). ### 1.7 Anti-Hallucination Guardrail Table (Never Emit Left Column!) | Invalid / Hallucinated Syntax | Valid FrameAssembly `v3.1.2` Syntax | | :--- | :--- | | `HOST a { ip = "10.0.0.1/24", mac: ... }` | `host a { ip 10.0.0.1 mac 00:11:22:33:44:55 }` | | `flow ping { from a to b icmp }` | `flow ping(a, b) { a -> b icmp }` (or 2-block `compile`) | | `loop 5 { ping(a, b) }` or `compile` bare | `compile { ping(a, b) }` (no `loop` keyword) | | `wait 5ms` on its own line or `+5ms a -> b` | `a -> b icmp echorequest wait 5ms` (inline post-packet) | | `echo_request`, `inner_vlan`, `sack_perm` | `echorequest`, `innervlan`, `sackperm` (zero `_` or `-`) | | `sport 1234 dport 80 ack 1001 flags [SYN]` | `srcport 1234 dstport 80 acknum 1001 syn` | | `hop_limit 64`, `tos 46`, `traffic_class` | `ttl 64 dscp 46 ecn 0` (unified across IPv4 and IPv6) | | `http get host "example.com"` | `http get hosthdr "example.com"` (`host` opens a host block) | | `rtsp setup transport "RTP/AVP;unicast"` | `rtsp setup transporthdr "RTP/AVP;unicast"` | | `varbind 1.3.6.1.2.1.1.5.0 str "core1"` | `varbind 1.3.6.1.2.1.1.5.0 string "core1"` (`string`, `oidval`) | | `snmp2 trap trapoid 1.3.6.1.6.3.1.1.5.3` | `snmp2 trap varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.6.3.1.1.5.3` | | `frameassembly compile a.frasm -o a.pcap` | `frameassembly a.frasm a.pcap` (default root compile) | --- ## 2. Exhaustive 81-Protocol Syntax, Modifier & Wire Reference Every protocol below compiles with zero mandatory sub-keywords (emitting RFC-compliant defaults) and accepts any combination of its protocol-specific modifiers plus valid cross-layer modifiers from Section 1.5. String enum arguments (``) match case-insensitively in builders while `.frasm` keywords themselves are strictly lowercase. ## 2.1 Layer 2 Switching, VLAN/QinQ, NAC & MPLS Protocols (`1–8`) ### 1. `arp` — Address Resolution Protocol & Gratuitous ARP (RFC 826 / RFC 5227) ```text arp [request | reply | gratuitous | garp] [sendermac|sha ] [senderip|spa ] [targetmac|tha ] [targetip|tpa ] ``` - **Defaults**: Ethernet II `0x0806`; `request` broadcasts to `ff:ff:ff:ff:ff:ff` (`targetmac 00:00:00:00:00:00`); `reply` unicasts to peer MAC; supports IPv4 hosts or MAC-only hosts (defaults `senderip`/`targetip` to host IPv4s or `0.0.0.0`). - **Rules**: `request` (opcode `1`, default), `reply` (opcode `2`), `gratuitous` / `garp` (sets `targetip = senderip` and broadcasts `ff:ff:ff:ff:ff:ff`). `sha`/`spa`/`tha`/`tpa` are aliases for `sendermac`/`senderip`/`targetmac`/`targetip`. Over IPv6 endpoints, emits Neighbor Discovery resolution framing cleanly. ### 2. `vlan` — IEEE 802.1Q Virtual LAN Tagging & 802.1p QoS ```text vlan [] [pcp <0..7>] [dei <0|1>] ``` - **Defaults**: Ethernet II outer TPID `0x8100`, default `vid 1`, `pcp 0`, `dei 0`, inner EtherType `0x0800` (or `ethertype ` override) when used as standalone L2 protocol; MAC-only or IP hosts. - **Rules**: Works both as a standalone L2 protocol (`a -> b vlan 100 pcp 5`) and as a cross-layer L2 modifier on any L3/L4/L7 frame (`a -> b ospf hello vlan 100 pcp 6`). `vid` `0..=4095`, `pcp` `0..=7`, `dei` `0..=1`. ### 3. `qinq` — IEEE 802.1ad Provider Bridge Double VLAN Tagging (S-Tag + C-Tag) ```text qinq [] [innervlan ] [pcp <0..7>] [dei <0|1>] ``` - **Defaults**: Always emits **two** VLAN tags: outer IEEE 802.1ad S-Tag (`0x88a8`, default `100`) + inner IEEE 802.1Q C-Tag (`0x8100`, default `innervlan 1`); MAC-only or IP hosts. - **Rules**: Works both standalone (`a -> b qinq 200 innervlan 10 pcp 4`) and as a cross-layer modifier on any L3/L4/L7 frame (`a -> b bgp keepalive qinq 500 innervlan 20`). Both VIDs validate `0..=4095`. ### 4. `lldp` — IEEE 802.1AB Link Layer Discovery Protocol ```text lldp [chassisid ] [portid ] [ttl ] [sysname ] [sysdesc ] ``` - **Defaults**: Ethernet II `0x88cc`, default multicast destination MAC `01:80:c2:00:00:0e`, default `chassisid` `"switch"`, `portid` `"eth0"`, `ttl 120`; MAC-only or IP hosts. - **Rules**: Encodes mandatory Chassis ID (TLV 1), Port ID (TLV 2), Time-To-Live (TLV 3, `0..=65535`), optional System Name (TLV 5) and System Description (TLV 6), and End of LLDPDU (TLV 0). ### 5. `stp` — IEEE 802.1D Spanning Tree & IEEE 802.1w Rapid Spanning Tree (RSTP) ```text stp [rstp] [rootid ] [bridgeid ] [portid ] [cost ] [maxage ] [hellotime ] [forwarddelay ] [flags ] ``` - **Defaults**: IEEE 802.3 LLC (`DSAP=0x42, SSAP=0x42, Ctrl=0x03`), multicast MAC `01:80:c2:00:00:00`, default `cost 0`, `portid 0x8001`, `maxage 20`, `hellotime 2`, `forwarddelay 15`, `flags 0`; MAC-only or IP hosts. - **Rules**: Add `rstp` to emit Version 2 Rapid STP BPDU (type `0x02`, including Version 1 Length byte); omit `rstp` for classic 802.1D Configuration BPDU (version `0x00`). `rootid` and `bridgeid` accept MAC/bridge strings. ### 6. `lacp` — IEEE 802.3ad / 802.1AX Link Aggregation Control Protocol ```text lacp [actorsys ] [actorkey ] [actorport ] [actorstate ] [partnersys ] [partnerkey ] [partnerport ] [partnerstate ] ``` - **Defaults**: Ethernet II Slow Protocols `0x8809` (subtype `0x01`), multicast MAC `01:80:c2:00:00:02`, 110-byte LACPDU (Actor TLV `0x01`, Partner TLV `0x02`, Collector TLV `0x03`, Terminator TLV `0x00`); MAC-only or IP. - **Rules**: `actorkey` default `1`, `actorport` default `1`, `actorstate` default `0x3d` (Active + Aggregatable + Sync + Collecting + Distributing), `partnerstate` default `0x3d`. ### 7. `eapol` — IEEE 802.1X Port-Based Network Access Control (EAP over LAN) ```text eapol [version ] [type | eappacket | start | logoff | key] [eapcode ] [eapid ] [eapmethod ] [identity ] ``` - **Defaults**: Ethernet II `0x888e`, PAE group MAC `01:80:c2:00:00:03`, default `version 2` (802.1X-2004), `eappacket` (type `0`), `eapcode 2` (Response), `eapid 1`, `eapmethod 1` (Identity); MAC-only or IP hosts. - **Rules**: `type` accepts bare or `type`-prefixed `eappacket` (`0`), `start` (`1`), `logoff` (`2`), or `key` (`3`, WPA2/802.11i EAPOL-Key descriptor). `eapcode`: `1`=Request, `2`=Response, `3`=Success, `4`=Failure. ### 8. `mpls` — Multiprotocol Label Switching Unicast Shim (RFC 3032) ```text mpls [