Reference R16 min readFrameAssembly v3.2.2
Raw .mdllms-full.txt

Wireshark / tcpdump / Scapy -> .frasm Rosetta Stone

One-page translation map from Wireshark display filters, tcpdump, Scapy, and tcprewrite to exact FrameAssembly v3.2.2 keywords.

Key Takeaways
  • Every built-in .frasm v3.2.2 keyword, protocol, flag, and time unit is strictly [a-z0-9]+ — zero underscores, zero hyphens.
  • Frame #1 = 0ns; inline wait <n><ns|us|ms|s|m> sets the gap *before* the next frame (default +10ms when omitted).
  • 8 L2 protocols allow MAC-only hosts · 9 dual-L4 protocols accept transport tcp|udp · 70 L3–L7 protocols run over both IPv4 & IPv6.

1. Wireshark Display Filter -> .frasm Modifier Map

Know the Wireshark filter? Here is the exact .frasm token to type:

rosetta_all_in_one.frasm9 lines
Open in Playground
host client { ip 10.10.20.15 mac 001a.2b3c.4d15 }
host edge { ip 10.10.20.1 mac 001a.2b3c.4d01 }
compile {
client -> edge tcp syn srcport 51443 dstport 443 win 65535 mss 1460 sackperm vlan 100 pcp 5 dscp 46 wait 1ms
client <- edge tcp syn ack win 65535 mss 1460 sackperm vlan 100 pcp 5 dscp 46 wait 1ms
client -> edge tcp ack vlan 100 pcp 5 dscp 46 wait 1ms
client -> edge tls clienthello sni "portal.corp.local" alpn "h2" vlan 100 pcp 5 dscp 46
}
IntentWireshark FilterFrameAssembly v3.2.2 (.frasm)
802.1Q VLAN + 802.1p Priorityvlan.id == 100 && vlan.priority == 5vlan 100 pcp 5 dei 0
802.1ad QinQ S-Tag + C-Tagvlan.etype == 0x88a8qinq 2000 innervlan 150
MPLS Shim Labelmpls.label == 24010 && mpls.bottom == 1mpls 24010 exp 5 bos 1 mplsttl 64
IPv4/IPv6 Hop Limit & DiffServip.ttl == 64 && ip.dsfield.dscp == 46ttl 64 dscp 46 ecn 0
IPv4 DF / Fragmentationip.flags.df == 1 / ip.frag_offset > 0df or ipid 0x1234 mf fragoffset 0
TCP Ports, Flags & Optionstcp.dstport == 443 && tcp.flags.syn == 1tcp syn srcport 51234 dstport 443 win 65535 mss 1460 wscale 7 sackperm
Explicit TCP SEQ & ACK Numberstcp.seq == 1000 && tcp.ack == 5001tcp ack seq 1000 acknum 5001 (bare ack = flag bit!)
HTTP Request + Host Headerhttp.host == "api.internal" && http.request.method == "POST"http post uri "/v1/login" hosthdr "api.internal"
TLS ClientHello SNI & ALPNtls.handshake.extensions_server_name == "app.corp.local"tls clienthello sni "app.corp.local" alpn "h2"
SNMPv2c / v3 Trap OID + Stringsnmp.name == 1.3.6.1.6.3.1.1.4.1.0varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.6.3.1.1.5.3 varbind 1.3.6.1.2.1.1.5.0 string "sw1"

2. Scapy, tcprewrite, TraceWrangler, text2pcap & Packetdrill -> FrameAssembly

How common packet-crafting and capture-editing tools map to .frasm — and when you should still reach for one of the others:

Job / ToolTraditional WorkflowFrameAssembly (v3.2.2)
Stateful TCP + L7 stream (Scapy)25+ lines of Python tracking seq, ack, len(payload), and virtualenvs3 handshake lines (-> / <-) + 1 L7 line inside compile { ... }
Scrub IPs, VLANs & L7 hostnames (tcprewrite)tcprewrite --srcipmap=... --fixcsum (fast L2–L4 bulk NAT, but breaks if L7 string length changes)frameassembly reverse in.pcap edit.frasm -> edit IPs, sni, qname, hosthdr -> recompile
Redact customer captures (TraceWrangler)Windows GUI batch anonymizer for bulk IP/MAC/DHCP profiles across multi-file capturesCross-platform CLI or zero-upload browser Playground that turns captures into diffable .frasm text
Build a .pcap from hex / ASCII (text2pcap)od -Ax -tx1 hex-offset dumps + dummy -e / -i / -u header flagsNamed L2–L7 protocol fields (dns, tls, bgp, modbus) + hexpayload "..." only where needed
Test TCP timing & anomalies (Packetdrill)Live kernel-socket script testing a host OS TCP stack (+0.010 < S ...)Offline .pcap / .pcapng file generation across 81 L2–L7 protocols for Suricata, Zeek, Wireshark & tcpreplay
Encrypted SNMPv3 authPriv trap (snmptrap)snmptrap -v 3 -e 0x... + missing vendor MIB errors + live UDP socketsnmp3 trap user "..." engineid "..." auth sha256 "..." priv aes "..." straight to .pcap
When to Pick Scapy, Packetdrill, or tcprewrite Instead

Use Scapy or Packetdrill when conversing live with a remote kernel TCP stack over raw sockets or running 100,000-packet fuzzing loops, and use tcprewrite or editcap when rewriting multi-gigabyte captures in bulk without changing Layer 7 string lengths.

3. Timing & Protocol Whitelist Cheat Matrix

Four compiler rules worth keeping in your back pocket:

RuleExact Set / BehaviorNotes
Post-packet wait clockFrame #1 = 0ns. wait <n><ns|us|ms|s|m> advances clock before the *next* frame.Omitted wait = +10ms · wait 0ns = zero-gap burst · never standalone.
8 MAC-only L2 protocolsarp, vlan, qinq, lldp, stp, lacp, eapol, mplshost sw1 { mac 00:1c:73:00:00:01 } works here; all 73 L3-L7 protocols require matching IPs.
IPv4 vs IPv6 rulesIPv4-only: igmp · IPv6-only: ndp, mld · Dual-stack: all other 70 L3-L7 protocolsicmp, ospf, rip, vrrp, hsrp, and dhcp morph v4 <-> v6 automatically (ospf routerid stays dotted-quad).
9 transport tcp|udp protocolsDefault UDP: dns, sip, syslog, kerberos, memcached · Default TCP: dnp3, modbus, nfs, ethernetipRejected on single-transport protocols (http, bgp, quic, ntp, ...).

4. Six Deliberate Keyword Disambiguations

Six modifier names avoid colliding with top-level blocks or flag bits:

  • hosthdr "api.internal" — HTTP / SSDP Host: header (host declares network boxes).
  • transporthdr "RTP/AVP;unicast;client_port=5004-5005" — RTSP Transport: header (transport tcp|udp picks L4).
  • acknum 1001 — 32-bit TCP acknowledgment number (bare ack = ACK flag bit).
  • srcport / dstport — L4 ports (sport / dport are rejected).
  • varbind <oid> string "<txt>" & varbind 1.3.6.1.6.3.1.1.4.1.0 oidval <oid> — SNMP varbinds (str and trapoid do not exist).
  • CoAP shorthands (get, post, put, delete, created, changed, notfound) and code "0.01" are mutually exclusive on the same frame.