# FrameAssembly by Example — 169 Annotated `.frasm` Packet Capture Recipes

> **FrameAssembly v3.2.2** · MIT License · Canonical URL: https://frameassembly-lang.dev/docs/examples · Full single-file examples corpus: https://frameassembly-lang.dev/llms-examples.txt

Browse compilable, RFC-accurate `.frasm` (`text/vnd.frameassembly`) packet capture specifications organized into 12 right-sized domain anthologies across all 81 Layer 2–7 protocols, dual-stack `flow(a, b)` templates, `transport tcp|udp` overrides, nanosecond `.pcapng` bursts, and Scapy / Wireshark / `frameassembly reverse` migrations.

## Anthology Index (`01`–`12`)

- **Anthology 01 (Layer 2 · 14 recipes): [Layer 2 Switching, VLAN, QinQ, 802.1X & MPLS Examples](https://frameassembly-lang.dev/docs/examples/l2-switching-vlans-nac)** ([Raw .md](https://frameassembly-lang.dev/docs/examples/l2-switching-vlans-nac.md)) — Rootless Ethernet II switching captures with MAC-only endpoints, 802.1Q VLAN trunks, 802.1ad QinQ double tags, IEEE slow-protocol multicast MACs, 802.1X EAPOL onboarding, and MPLS shim labels.
- **Anthology 02 (Layer 3 · 14 recipes): [ICMPv4/v6, Dual-Stack Flows, Fragmentation & DiffServ QoS](https://frameassembly-lang.dev/docs/examples/icmp-dual-stack-qos)** ([Raw .md](https://frameassembly-lang.dev/docs/examples/icmp-dual-stack-qos.md)) — Reusable IPv4 and IPv6 `flow(src, dst)` reachability checks, Path MTU Discovery (`df`), manual IPv4 fragment offsets (`ipid`, `mf`, `fragoffset`), IPv6 Neighbor Discovery (`ndp`), and IGMP/MLD group joins.
- **Anthology 03 (Layer 4 · 14 recipes): [Stateful 4-Tuple TCP Streams, Sequence Anomalies & SCTP](https://frameassembly-lang.dev/docs/examples/tcp-handshakes-anomalies)** ([Raw .md](https://frameassembly-lang.dev/docs/examples/tcp-handshakes-anomalies.md)) — Automatic 4-tuple `seq` and `acknum` progression, RFC 7323 TCP options (`mss`, `wscale`, `sackperm`, `tsval`/`tsecr`), deliberate retransmissions, ZeroWindow stalls, abnormal scan flags, and Castagnoli CRC-32c SCTP.
- **Anthology 04 (Layer 3 · 13 recipes): [BGP, OSPF, BFD, VRRP/HSRP, Multicast PIM & OpenFlow Examples](https://frameassembly-lang.dev/docs/examples/routing-bfd-redundancy)** ([Raw .md](https://frameassembly-lang.dev/docs/examples/routing-bfd-redundancy.md)) — Control-plane routing sessions, sub-second BFD failure-detection timers, first-hop gateway redundancy (`vrrp` and `hsrp`), multicast Rendezvous Point joins (`pim`), and SDN `openflow` channels.
- **Anthology 05 (Layer 3 · 13 recipes): [Data-Center Overlays (VXLAN, GENEVE, GRE) & VPN Tunnels](https://frameassembly-lang.dev/docs/examples/overlays-tunnels-vpns)** ([Raw .md](https://frameassembly-lang.dev/docs/examples/overlays-tunnels-vpns.md)) — Spine-leaf EVPN underlay captures (`vxlan` UDP 4789 and `geneve` UDP 6081), `gre` routing encapsulations, `ikev2` SA/Child-SA exchanges, IPsec `esp`/`ah`/`ipsec` headers, and modern `wireguard` handshakes.
- **Anthology 06 (Layer 7 · 13 recipes): [DNS (UDP/TCP), mDNS, SSDP, DHCPv4/v6 & Nanosecond Time Sync](https://frameassembly-lang.dev/docs/examples/dns-dhcp-network-timing)** ([Raw .md](https://frameassembly-lang.dev/docs/examples/dns-dhcp-network-timing.md)) — Core DDI address and service resolution (`dns`, `mdns`, `ssdp`, `dhcp` DORA and IPv6 SARR) alongside stratum `ntp` polling and sub-microsecond IEEE 1588 `ptp` `.pcapng` captures.
- **Anthology 07 (Layer 7 · 13 recipes): [TLS 1.3 SNI, QUIC, HTTP/1.1, HTTP/2, gRPC & WebSocket APIs](https://frameassembly-lang.dev/docs/examples/tls-quic-http-apis)** ([Raw .md](https://frameassembly-lang.dev/docs/examples/tls-quic-http-apis.md)) — Modern web, reverse-proxy, WAF, and service-mesh traffic fixtures: TLS 1.3 `clienthello` SNI/ALPN, `quic` long/short headers, `http` `hosthdr` REST calls, `http2` streams, `grpc` status trails, and `websocket` frames.
- **Anthology 08 (Layer 7 · 13 recipes): [PostgreSQL, MySQL, Redis, Memcached, MQTT & AMQP Captures](https://frameassembly-lang.dev/docs/examples/databases-caches-brokers)** ([Raw .md](https://frameassembly-lang.dev/docs/examples/databases-caches-brokers.md)) — East-west microservice data-tier segmentation and IoT message-bus traces: `postgres` v3 Wire queries, `mysql` greetings and SQL commands, `redis` RESP arrays, `memcached` TCP/UDP, `mqtt`, and `amqp`.
- **Anthology 09 (Layer 7 · 14 recipes): [Active Directory (Kerberos, LDAP), AAA, SMB/NFS & Admin Access](https://frameassembly-lang.dev/docs/examples/identity-aaa-storage)** ([Raw .md](https://frameassembly-lang.dev/docs/examples/identity-aaa-storage.md)) — Enterprise identity, NAS storage, and bastion captures: `kerberos` AS/TGS exchanges, `ldap` binds and searches, `radius` & `tacacs` AAA, `smb` & `nfs` shares, plus `ssh`, `telnet`, `ftp`, `tftp`, and `whois`.
- **Anthology 10 (Layer 7 · 20 recipes): [SIP/RTP VoIP, Mail, Encrypted SNMPv3 USM & Flow Telemetry](https://frameassembly-lang.dev/docs/examples/voip-media-snmp-telemetry)** ([Raw .md](https://frameassembly-lang.dev/docs/examples/voip-media-snmp-telemetry.md)) — Voice/media signaling (`sip`, `rtp`, `rtsp`, `stun`), mail relays (`smtp`, `imap`, `pop3`), MIB-free `snmp1`/`snmp2`/encrypted `snmp3` USM traps, `syslog`, and `netflow`/`ipfix`/`sflow` collector streams.
- **Anthology 11 (Layer 7 · 14 recipes): [Industrial ICS/SCADA & IIoT Captures (Modbus, DNP3, S7comm, OPC UA)](https://frameassembly-lang.dev/docs/examples/industrial-ics-scada-ot)** ([Raw .md](https://frameassembly-lang.dev/docs/examples/industrial-ics-scada-ot.md)) — Purdue-model OT firewall and passive ICS sensor validation across `modbus`, `dnp3` (reflected 0x3d65 CRC-16), Siemens `s7comm`, `opcua`, `bacnet`, `ethernetip` CIP, and constrained `coap`.
- **Anthology 12 (L2–L7 Cross-Layer · 14 recipes): [Scapy, Wireshark Filter, tcprewrite & PCAP Reverse Migrations](https://frameassembly-lang.dev/docs/examples/scapy-wireshark-migrations)** ([Raw .md](https://frameassembly-lang.dev/docs/examples/scapy-wireshark-migrations.md)) — Side-by-side translations from imperative Python/Scapy scripts, `tcprewrite`, `text2pcap` hex dumps, and Wireshark display filters into `.frasm`, plus full L2–L7 PCAP redaction with `frameassembly reverse`.

## Machine-Readable Training, Grammar & Specification Feeds

- **Complete Language & 81-Protocol Reference (`llms-full.txt`)**: https://frameassembly-lang.dev/llms-full.txt
- **All 169 Annotated Cookbook Examples (`llms-examples.txt`)**: https://frameassembly-lang.dev/llms-examples.txt
- **ISO/IEC 14977 EBNF Grammar**: https://frameassembly-lang.dev/grammars/grammar.ebnf
- **llama.cpp / XGrammar GBNF Grammar**: https://frameassembly-lang.dev/grammars/frameassembly.gbnf
- **Outlines / vLLM / llguidance Lark Grammar**: https://frameassembly-lang.dev/grammars/frameassembly.lark
- **MLCommons Croissant 1.0 Dataset Manifest**: https://frameassembly-lang.dev/datasets/croissant.json
