{"id":"dpo-diag-e01","category":"compiler_diagnostic","rule_id":"E01","protocols":["icmp","vlan","qinq","tcp","tls"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture demonstrating `icmp`, `vlan`, `qinq`, `tcp`, `tls` while avoiding E01 (Uppercase, Underscore, or Hyphenated Built-In Keyword).","chosen":"host Laptop_01 { ip 10.0.0.10 }\nhost Core-GW   { ip 10.0.0.1 }\n\ncompile {\n    Laptop_01 -> Core-GW icmp echorequest wait 5ms\n}","rejected":"host Laptop_01 { ip 10.0.0.10 }\nhost Core-GW   { ip 10.0.0.1 }\n\ncompile {\n    Laptop_01 -> Core-GW icmp echo_request wait 5ms\n}","explanation":"Every built-in protocol name, modifier, TCP flag, and time unit in FrameAssembly is strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens. User-defined host and flow names may still use capitals, underscores, or internal hyphens."}
{"id":"dpo-diag-e02","category":"compiler_diagnostic","rule_id":"E02","protocols":["icmp","arp","tcp","ospf"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture demonstrating `icmp`, `arp`, `tcp`, `ospf` while avoiding E02 (CIDR Subnet Mask (/24), Equals Sign, or Quotes Inside host Block).","chosen":"host firewall { ip 10.10.1.1 }\nhost server   { ip 10.10.1.20 }\n\ncompile {\n    firewall -> server icmp echorequest\n}","rejected":"host firewall { ip = \"10.10.1.1/24\" }\nhost server   { ip = \"10.10.1.20/24\" }\n\ncompile {\n    firewall -> server icmp echorequest\n}","explanation":"Ethernet frames carry 32-bit IPv4 or 128-bit IPv6 host addresses on the wire—never subnet masks. Declare plain IP literals without /24 suffixes, quotes, commas, or = signs."}
{"id":"dpo-diag-e03","category":"compiler_diagnostic","rule_id":"E03","protocols":["dns","http","syslog","mqtt"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture demonstrating `dns`, `http`, `syslog`, `mqtt` while avoiding E03 (Hash (#) Comments or Single-Quoted Strings).","chosen":"// DNS lookup test\nhost client   { ip 192.168.1.10 }\nhost resolver { ip 192.168.1.53 }\n\ncompile {\n    client -> resolver dns query qname \"portal.internal\" qtype \"A\"\n}","rejected":"# DNS lookup test\nhost client   { ip 192.168.1.10 }\nhost resolver { ip 192.168.1.53 }\n\ncompile {\n    client -> resolver dns query qname 'portal.internal' qtype 'A'\n}","explanation":"FrameAssembly uses // line comments and double-quoted UTF-8 strings (\"...\") exclusively so shell-style # comments and single quotes never create escaping ambiguity."}
{"id":"dpo-diag-e04","category":"compiler_diagnostic","rule_id":"E04","protocols":["tcp","udp","sctp","http"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture demonstrating `tcp`, `udp`, `sctp`, `http` while avoiding E04 (Using sport / dport Instead of srcport / dstport, or ack 1001 Instead of acknum 1001).","chosen":"host c { ip 10.0.0.1 }\nhost s { ip 10.0.0.2 }\n\ncompile {\n    c -> s tcp syn srcport 51000 dstport 443 seq 1000 wait 1ms\n    c <- s tcp syn ack seq 5000 acknum 1001\n}","rejected":"host c { ip 10.0.0.1 }\nhost s { ip 10.0.0.2 }\n\ncompile {\n    c -> s tcp syn sport 51000 dport 443 seq 1000\n    c <- s tcp syn ack 1001 seq 5000\n}","explanation":"Bare ack sets the 1-bit TCP ACK control flag, whereas acknum sets the 32-bit acknowledgment header value. Transport ports always use explicit srcport and dstport."}
{"id":"dpo-diag-e05","category":"compiler_diagnostic","rule_id":"E05","protocols":["http","ssdp","rtsp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture demonstrating `http`, `ssdp`, `rtsp` while avoiding E05 (Writing host on HTTP/SSDP Instead of hosthdr, or transport on RTSP Instead of transporthdr).","chosen":"host cam_client { ip 10.10.2.15 }\nhost nvr_srv    { ip 10.10.2.80 }\n\ncompile {\n    cam_client -> nvr_srv tcp syn srcport 53100 dstport 80 wait 1ms\n    cam_client <- nvr_srv tcp syn ack wait 1ms\n    cam_client -> nvr_srv tcp ack wait 1ms\n    cam_client -> nvr_srv http get uri \"/status\" hosthdr \"nvr.lab.local\"\n}","rejected":"host cam_client { ip 10.10.2.15 }\nhost nvr_srv    { ip 10.10.2.80 }\n\ncompile {\n    cam_client -> nvr_srv http get uri \"/status\" host \"nvr.lab.local\"\n}","explanation":"Top-level host opens an endpoint declaration and transport selects L4 encapsulation (35 TCP/UDP protocols plus universal Layer 7 transport sctp). HTTP/SSDP use hosthdr and RTSP uses transporthdr to set their Layer 7 text headers unambiguously."}
{"id":"dpo-diag-e06","category":"compiler_diagnostic","rule_id":"E06","protocols":["icmp","ptp","ntp","bfd"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture demonstrating `icmp`, `ptp`, `ntp`, `bfd` while avoiding E06 (Using Removed v1 loop Instead of repeat, Leading wait Before Frame 1, or Parameterless flow).","chosen":"host a { ip 10.0.0.1 }\nhost b { ip 10.0.0.2 }\n\nflow ping_pair(src, dst) {\n    src -> dst icmp echorequest id 1 wait 5ms\n    src <- dst icmp echoreply id 1 wait 5ms\n}\n\ncompile {\n    repeat 2 {\n        ping_pair(a, b)\n    }\n}","rejected":"host a { ip 10.0.0.1 }\nhost b { ip 10.0.0.2 }\n\ncompile {\n    loop 2 {\n        a -> b icmp echorequest id 1 seq 1 wait 5ms\n    }\n}","explanation":"FrameAssembly v3.3.0 uses repeat <count> { ... } (up to 100,000 total emitted frames; never v1 loop), requires every flow template to declare at least one formal parameter flow name(a, b), and only accepts wait as a trailing modifier after a frame statement."}
{"id":"dpo-diag-e07","category":"compiler_diagnostic","rule_id":"E07","protocols":["lldp","stp","eapol","ospf"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture demonstrating `lldp`, `stp`, `eapol`, `ospf` while avoiding E07 (MAC-Only Host Used on a Layer 3, Layer 4, or Layer 7 Protocol).","chosen":"host sw1 { ip 10.255.0.1 mac 00:1c:73:00:00:01 }\nhost sw2 { ip 10.255.0.2 mac 00:1c:73:00:00:02 }\n\ncompile {\n    sw1 -> sw2 ospf hello areaid 0.0.0.0\n}","rejected":"host sw1 { mac 00:1c:73:00:00:01 }\nhost sw2 { mac 00:1c:73:00:00:02 }\n\ncompile {\n    sw1 -> sw2 ospf hello areaid 0.0.0.0\n}","explanation":"MAC-only host declarations are valid across all 18 Layer 2 protocols (arp, vlan, qinq, lldp, stp, lacp, eapol, mpls, cdp, isis, macsec, pfc, pppoe, nsh, profinet, goose, sv, ethercat; profinet and ethercat require ip when using transport udp). All 128 Layer 3–7 protocols build an IPv4 or IPv6 header and require ip on both endpoints."}
{"id":"dpo-diag-e08","category":"compiler_diagnostic","rule_id":"E08","protocols":["tcp","icmp","dns","bgp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture demonstrating `tcp`, `icmp`, `dns`, `bgp` while avoiding E08 (Mixing an IPv4 Source Host with an IPv6 Destination Host).","chosen":"host v4_client { ip 10.10.1.10 }\nhost v4_server { ip 10.10.1.20 }\nhost v6_client { ip 2001:db8::10 }\nhost v6_server { ip 2001:db8::20 }\n\nflow tls_open(c, s) {\n    c -> s tcp syn srcport 50100 dstport 443 wait 1ms\n    c <- s tcp syn ack\n}\n\ncompile {\n    tls_open(v4_client, v4_server)\n    tls_open(v6_client, v6_server)\n}","rejected":"host v4_client { ip 10.10.1.10 }\nhost v6_server { ip 2001:db8::20 }\n\ncompile {\n    v4_client -> v6_server tcp syn srcport 50100 dstport 443\n}","explanation":"A single IP packet header is either IPv4 (EtherType 0x0800) or IPv6 (EtherType 0x86dd). To run the same exchange across both families, define a parameterized flow(c, s) and call it once with IPv4 hosts and once with IPv6 hosts."}
{"id":"dpo-diag-e09","category":"compiler_diagnostic","rule_id":"E09","protocols":["igmp","mld","ndp","arp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture demonstrating `igmp`, `mld`, `ndp`, `arp` while avoiding E09 (Running igmp Over IPv6 Hosts or ndp / mld / srv6 Over IPv4 Hosts).","chosen":"host listener_v6 { ip fe80::10 }\nhost querier_v6  { ip fe80::1 }\n\ncompile {\n    listener_v6 -> querier_v6 mld report multicastaddr ff02::1:ff00:10\n}","rejected":"host listener_v6 { ip fe80::10 }\nhost querier_v6  { ip fe80::1 }\n\ncompile {\n    listener_v6 -> querier_v6 igmp v2 report group 239.1.1.10\n}","explanation":"While 124 of the 128 IP protocols automatically adapt between IPv4 and IPv6, IGMP (IP protocol 2) exists only in IPv4, and NDP, MLD, and SRv6 (Segment Routing over IPv6 Routing Header Type 4) exist only in IPv6."}
{"id":"dpo-diag-e10","category":"compiler_diagnostic","rule_id":"E10","protocols":["dns","sip","syslog","modbus","kerberos"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture demonstrating `dns`, `sip`, `syslog`, `modbus`, `kerberos` while avoiding E10 (Using an Unsupported transport tcp|udp|sctp Override for a Fixed-Encapsulation Protocol).","chosen":"host client   { ip 10.0.0.10 }\nhost resolver { ip 10.0.0.53 }\n\ncompile {\n    client -> resolver tcp syn srcport 53120 dstport 53 wait 1ms\n    client <- resolver tcp syn ack wait 1ms\n    client -> resolver tcp ack wait 1ms\n    client -> resolver dns query txid 0x4410 qname \"zone.corp.local\" qtype \"AXFR\" transport tcp\n}","rejected":"host vtep1 { ip 10.0.0.10 }\nhost vtep2 { ip 10.0.0.20 }\n\ncompile {\n    vtep1 -> vtep2 vxlan vni 10010 transport tcp\n}","explanation":"FrameAssembly v3.3.0 supports transport tcp|udp across 35 dual-transport protocols (including dns, llmnr, sip, syslog, kerberos, nfs, memcached, modbus, dnp3, ethernetip, ldap, snmp1..3, radius, coap, mqtt, rtsp, ntp, twamp, ldp, mssql, kafka, turn, h323, mgcp, someip, doip, hartip, fins, melsec, synchrophasor, rocplus, bsap, c1222), transport udp on profinet/ethercat/l2tp, and universal transport sctp across all 94 Layer 7 protocols. Fixed-L3/tunnel protocols such as vxlan, wireguard, or ospf reject incompatible transport overrides."}
{"id":"dpo-diag-e11","category":"compiler_diagnostic","rule_id":"E11","protocols":["udp","tcp","quic","icmp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture demonstrating `udp`, `tcp`, `quic`, `icmp` while avoiding E11 (Applying TCP Flags/Options to Non-TCP Frames or nochecksum to Non-UDP Frames).","chosen":"host a { ip 10.0.0.1 }\nhost b { ip 10.0.0.2 }\n\ncompile {\n    a -> b udp srcport 12000 dstport 9000 nochecksum payload \"probe\"\n}","rejected":"host a { ip 10.0.0.1 }\nhost b { ip 10.0.0.2 }\n\ncompile {\n    a -> b udp srcport 12000 dstport 9000 syn mss 1460 payload \"probe\"\n}","explanation":"UDP, ICMP, and pure L2/L3 headers have no sequence numbers, window fields, or TCP control flags, and nochecksum is valid only on UDP or UDP-encapsulated protocols. Restrict syn, ack, fin, rst, psh, seq, acknum, win, mss, wscale, sackperm, sackblock, tcpmd5, and tfo to tcp and TCP-carried L7 protocols."}
{"id":"dpo-diag-e12","category":"compiler_diagnostic","rule_id":"E12","protocols":["vlan","qinq","mpls","bgp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture demonstrating `vlan`, `qinq`, `mpls`, `bgp` while avoiding E12 (Out-of-Range VLAN ID (>4095), DSCP (>63), NSH TTL (>63), or Duplicate TCP Flag).","chosen":"host pe1 { ip 10.1.1.1 }\nhost pe2 { ip 10.1.1.2 }\n\ncompile {\n    pe1 -> pe2 icmp echorequest mpls 16000 exp 6 mpls 24000 dscp 46\n}","rejected":"host pe1 { ip 10.1.1.1 }\nhost pe2 { ip 10.1.1.2 }\n\ncompile {\n    pe1 -> pe2 icmp echorequest vlan 5000 dscp 80\n}","explanation":"FrameAssembly checks every header field width before writing bytes: VLAN/QinQ VIDs are 12 bits (0..4095), PCP is 3 bits (0..7), DSCP is 6 bits (0..63), ECN is 2 bits (0..3), NSH TTL is 6 bits (0..63), and MPLS labels are 20 bits (0..1048575; mpls is repeatable in v3.3.0 to build multi-label stacks)."}
{"id":"dpo-diag-e13","category":"compiler_diagnostic","rule_id":"E13","protocols":["snmp3","snmp2","snmp1"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture demonstrating `snmp3`, `snmp2`, `snmp1` while avoiding E13 (Odd-Length SNMPv3 engineid Hex or Invalid varbind Value Type).","chosen":"host rtr { ip 10.40.1.1 }\nhost nms { ip 10.40.1.100 }\n\ncompile {\n    rtr -> nms snmp3 trap user \"ops\" engineid \"80001f888001020304\" auth sha256 \"AuthPass123!\" priv aes \"PrivPass123!\" varbind 1.3.6.1.2.1.1.5.0 string \"core1\"\n}","rejected":"host rtr { ip 10.40.1.1 }\nhost nms { ip 10.40.1.100 }\n\ncompile {\n    rtr -> nms snmp3 trap user \"ops\" engineid \"80001f88f\" varbind 1.3.6.1.2.1.1.5.0 string \"core1\"\n}","explanation":"SNMPv3 USM key localization hashes raw engine ID octets, so engineid requires even-length hex (such as \"80001f888001020304\"). Also use varbind <oid> string \"...\" or oidval <oid> (never str or trapoid)."}
{"id":"dpo-diag-e14","category":"compiler_diagnostic","rule_id":"E14","protocols":["dns","mdns","udp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture demonstrating `dns`, `mdns`, `udp` while avoiding E14 (DNS / mDNS / LLMNR Label Longer Than 63 Bytes or Payload + HexPayload Collision).","chosen":"host ws { ip 10.0.0.10 }\nhost ns { ip 10.0.0.53 }\n\ncompile {\n    ws -> ns dns query txid 0x2201 qname \"sub-01.telemetry-ingest.internal\" qtype \"AAAA\"\n}","rejected":"host ws { ip 10.0.0.10 }\nhost ns { ip 10.0.0.53 }\n\ncompile {\n    ws -> ns dns query qname \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.internal\"\n}","explanation":"DNS wire compression uses the top 2 bits of each label length byte as pointer flags, capping single labels at 63 octets and full domain names at 253 characters. Separately, payload and hexpayload are mutually exclusive on the same frame."}
{"id":"dpo-guardrail-host-block-plain-ip","category":"anti_hallucination_guardrail","rule_id":"G01","protocols":["arp","icmp"],"version":"3.3.0","license":"MIT","prompt":"Declare two IPv4 hosts with explicit MAC addresses and send an ICMP Echo Request in FrameAssembly v3.2.2.","chosen":"host a { ip 10.0.0.1 mac 00:11:22:33:44:55 }\nhost b { ip 10.0.0.2 mac 00:11:22:33:44:66 }\n\ncompile {\n    a -> b icmp echorequest wait 5ms\n    a <- b icmp echoreply\n}","rejected":"HOST a { ip = \"10.0.0.1/24\", mac: \"00:11:22:33:44:55\" }\nHOST b { ip = \"10.0.0.2/24\", mac: \"00:11:22:33:44:66\" }\n\ncompile {\n    a -> b icmp echo_request\n}","explanation":"Host declarations use lowercase `host <id> { ip <plain_ip> mac <mac> }` without `=`, `:`, quotes, commas, or `/24` CIDR suffixes, and built-in keywords (`echorequest`) never contain underscores."}
{"id":"dpo-guardrail-parameterized-flow-and-no-loop","category":"anti_hallucination_guardrail","rule_id":"G02","protocols":["icmp"],"version":"3.3.0","license":"MIT","prompt":"Define a reusable ping flow and execute it twice in FrameAssembly v3.2.2.","chosen":"host client { ip 10.10.1.10 }\nhost router { ip 10.10.1.1 }\n\nflow ping(a, b) {\n    a -> b icmp echorequest id 100 seq 1 wait 5ms\n    a <- b icmp echoreply id 100 seq 1 wait 5ms\n}\n\ncompile {\n    ping(client, router)\n    ping(client, router)\n}","rejected":"host client { ip 10.10.1.10 }\nhost router { ip 10.10.1.1 }\n\nflow ping {\n    from client to router icmp\n}\n\ncompile {\n    loop 2 { ping }\n}","explanation":"Every `flow` block requires formal parameters `flow name(a, b) { ... }`, frames use `->` / `<-`, and `loop` does not exist in v3.2.2—repeat flow calls explicitly inside `compile`."}
{"id":"dpo-guardrail-inline-post-packet-wait","category":"anti_hallucination_guardrail","rule_id":"G03","protocols":["dns"],"version":"3.3.0","license":"MIT","prompt":"Send a DNS A-record query and wait 3ms before the DNS response in FrameAssembly v3.2.2.","chosen":"host workstation { ip 192.168.10.25 }\nhost resolver    { ip 192.168.10.53 }\n\ncompile {\n    workstation -> resolver dns query txid 0x1a2b qname \"portal.internal\" qtype \"A\" wait 3ms\n    workstation <- resolver dns response txid 0x1a2b qname \"portal.internal\" qtype \"A\" rdata \"10.20.30.40\"\n}","rejected":"host workstation { ip 192.168.10.25 }\nhost resolver    { ip 192.168.10.53 }\n\ncompile {\n    workstation -> resolver dns query txid 0x1a2b qname \"portal.internal\" qtype \"A\"\n    wait 3ms\n    +3ms workstation <- resolver dns response txid 0x1a2b qname \"portal.internal\" qtype \"A\" rdata \"10.20.30.40\"\n}","explanation":"`wait <u32><ns|us|ms|s|m>` is strictly an inline post-packet modifier on the frame statement itself—never a standalone line or `+3ms` prefix."}
{"id":"dpo-guardrail-unified-ttl-dscp-ipv6","category":"anti_hallucination_guardrail","rule_id":"G04","protocols":["icmp"],"version":"3.3.0","license":"MIT","prompt":"Send an IPv6 ICMPv6 Echo Request with Hop Limit 64 and DiffServ EF (46) in FrameAssembly v3.2.2.","chosen":"host node_a { ip 2001:db8:1::10 }\nhost node_b { ip 2001:db8:1::20 }\n\ncompile {\n    node_a -> node_b icmp echorequest ttl 64 dscp 46 ecn 0 flowlabel 0x10200\n}","rejected":"host node_a { ip 2001:db8:1::10 }\nhost node_b { ip 2001:db8:1::20 }\n\ncompile {\n    node_a -> node_b icmp6 echo_request hop_limit 64 traffic_class 46\n}","explanation":"FrameAssembly unifies `icmp`, `ttl`, `dscp`, and `ecn` across both IPv4 and IPv6 (`icmp` automatically emits ICMPv6 Next Header 58 over IPv6 hosts; `hop_limit` and `traffic_class` do not exist)."}
{"id":"dpo-guardrail-rtsp-transporthdr-vs-transport","category":"anti_hallucination_guardrail","rule_id":"G05","protocols":["tcp","rtsp"],"version":"3.3.0","license":"MIT","prompt":"Write an RTSP SETUP request specifying the RTP/AVP unicast Transport header on TCP port 554 in FrameAssembly v3.2.2.","chosen":"host viewer { ip 10.50.1.15 }\nhost camera { ip 10.50.1.80 }\n\ncompile {\n    viewer -> camera tcp syn srcport 52554 dstport 554 wait 1ms\n    viewer <- camera tcp syn ack wait 1ms\n    viewer -> camera tcp ack wait 1ms\n    viewer -> camera rtsp setup uri \"rtsp://10.50.1.80/stream1/track1\" cseq 2 transporthdr \"RTP/AVP;unicast;client_port=8000-8001\"\n}","rejected":"host viewer { ip 10.50.1.15 }\nhost camera { ip 10.50.1.80 }\n\ncompile {\n    viewer -> camera rtsp setup uri \"rtsp://10.50.1.80/stream1/track1\" cseq 2 transport \"RTP/AVP;unicast;client_port=8000-8001\"\n}","explanation":"`transport` is reserved for L4 `transport tcp|udp` selection on the 9 dual-transport protocols; RTSP uses `transporthdr \"<str>\"` for its Layer 7 `Transport:` header."}
{"id":"dpo-guardrail-snmp-varbind-oidval-string","category":"anti_hallucination_guardrail","rule_id":"G06","protocols":["snmp2"],"version":"3.3.0","license":"MIT","prompt":"Emit an SNMPv2c linkDown trap on UDP 162 with snmpTrapOID.0 and interface description Gi0/1 in FrameAssembly v3.2.2.","chosen":"host switch01 { ip 10.30.1.10 }\nhost nms01    { ip 10.30.1.100 }\n\ncompile {\n    switch01 -> nms01 snmp2 trap community \"public\" sysuptime 120000 varbind 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.2.2.1.2.1 string \"Gi0/1\"\n}","rejected":"host switch01 { ip 10.30.1.10 }\nhost nms01    { ip 10.30.1.100 }\n\ncompile {\n    switch01 -> nms01 snmp2 trap trapoid 1.3.6.1.6.3.1.1.5.3 varbind 1.3.6.1.2.1.2.2.1.2.1 str \"Gi0/1\"\n}","explanation":"SNMPv2c/v3 traps specify `snmpTrapOID.0` via `varbind 1.3.6.1.6.3.1.1.4.1.0 oidval <oid>` and typed varbinds use `string`, `int`, `uint`, `timeticks`, `ipval`, `oidval`, or `nullval` (never `trapoid` or `str`)."}
{"id":"dpo-pitfall-arp-2","category":"protocol_pitfall","rule_id":"ARP_P2","protocols":["arp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Address Resolution Protocol & Gratuitous ARP (`arp`) respecting: Zero Underscores in Sub-Keywords.","chosen":"host client  { ip 10.0.10.25 mac 00:1b:21:aa:00:25 }\nhost gateway { ip 10.0.10.1  mac 00:1b:21:aa:00:01 }\n\ncompile {\n    client -> gateway arp\n}","rejected":"host a { ip 10.0.0.1 }\nhost b { ip 10.0.0.2 }\n\ncompile {\n    a -> b arp sender_ip 10.0.0.1 target_ip 10.0.0.2\n}","explanation":"All FrameAssembly v3.2.0 built-in modifiers are lowercase alphanumeric (`senderip`/`spa`, `sendermac`/`sha`, `targetip`/`tpa`, `targetmac`/`tha`)."}
{"id":"dpo-pitfall-vlan-1","category":"protocol_pitfall","rule_id":"VLAN_P1","protocols":["vlan"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IEEE 802.1Q Virtual LAN Tagging & 802.1p QoS (`vlan`) respecting: Use qinq for Double VLAN Stacking Instead of Repeating vlan.","chosen":"host access_sw { mac 00:1b:21:aa:00:01 }\nhost core_sw   { mac 00:1b:21:bb:00:02 }\n\ncompile {\n    access_sw -> core_sw vlan 100\n}","rejected":"host a { ip 10.0.0.1 }\nhost b { ip 10.0.0.2 }\n\ncompile {\n    a -> b icmp vlan 500 vlan 20\n}","explanation":"Repeating `vlan` overwrites the single 802.1Q tag field. To emit IEEE 802.1ad S-Tag (`0x88a8`) + C-Tag (`0x8100`) double-tagging, use `qinq <svid> innervlan <cvid>`."}
{"id":"dpo-pitfall-vlan-2","category":"protocol_pitfall","rule_id":"VLAN_P2","protocols":["vlan"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IEEE 802.1Q Virtual LAN Tagging & 802.1p QoS (`vlan`) respecting: 12-Bit VID Range Enforcement.","chosen":"host access_sw { mac 00:1b:21:aa:00:01 }\nhost core_sw   { mac 00:1b:21:bb:00:02 }\n\ncompile {\n    access_sw -> core_sw vlan 100\n}","rejected":"host a { ip 10.0.0.1 }\nhost b { ip 10.0.0.2 }\n\ncompile {\n    a -> b vlan 5000\n}","explanation":"Semantic validation enforces `0..=4095` on `vlan` VIDs and `0..=7` on `pcp`, rejecting out-of-range tags at compile time."}
{"id":"dpo-pitfall-qinq-1","category":"protocol_pitfall","rule_id":"QINQ_P1","protocols":["qinq"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IEEE 802.1ad Provider Bridge Double VLAN Tagging (S-Tag + C-Tag) (`qinq`) respecting: Always Spell innervlan Without Underscores.","chosen":"host pe_nni_a { mac 00:25:90:aa:00:01 }\nhost pe_nni_b { mac 00:25:90:bb:00:02 }\n\ncompile {\n    pe_nni_a -> pe_nni_b qinq 500 innervlan 20\n}","rejected":"host a { ip 10.0.0.1 }\nhost b { ip 10.0.0.2 }\n\ncompile {\n    a -> b qinq 500 inner_vlan 20\n}","explanation":"Legacy underscored spellings such as `inner_vlan` or `c_vlan` are rejected by the v3.2.0 lexer with a self-healing diagnostic suggesting `innervlan`."}
{"id":"dpo-pitfall-lldp-2","category":"protocol_pitfall","rule_id":"LLDP_P2","protocols":["lldp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IEEE 802.1AB Link Layer Discovery Protocol (`lldp`) respecting: Quote Interface Names Containing Slashes.","chosen":"host leaf_sw  { mac 00:1c:73:aa:01:01 }\nhost spine_sw { mac 00:1c:73:bb:02:01 }\n\ncompile {\n    leaf_sw -> spine_sw lldp\n}","rejected":"host sw1 { ip 10.0.0.1 }\nhost sw2 { ip 10.0.0.2 }\n\ncompile {\n    sw1 -> sw2 lldp portid Gi1/0/48\n}","explanation":"Slash characters (`/`) are not part of bare identifiers—always wrap interface names like `\"Gi1/0/48\"` or `\"Ethernet49/1\"` in double quotes."}
{"id":"dpo-pitfall-stp-2","category":"protocol_pitfall","rule_id":"STP_P2","protocols":["stp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IEEE 802.1D Spanning Tree & IEEE 802.1w Rapid Spanning Tree (`stp`) respecting: Quote Priority:MAC Strings in rootid and bridgeid.","chosen":"host root_sw { mac 00:1c:73:00:00:01 }\nhost edge_sw { mac 00:1c:73:00:00:02 }\n\ncompile {\n    root_sw -> edge_sw stp rstp\n}","rejected":"host sw1 { ip 10.0.0.1 }\nhost sw2 { ip 10.0.0.2 }\n\ncompile {\n    sw1 -> sw2 stp rootid 32768:00:1c:73:01:00:01\n}","explanation":"Composite `<priority>:<mac>` values have 7 colon-separated groups (rather than a 6-octet MAC literal) and should be enclosed in double quotes."}
{"id":"dpo-pitfall-lacp-1","category":"protocol_pitfall","rule_id":"LACP_P1","protocols":["lacp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IEEE 802.3ad / 802.1AX Link Aggregation Control Protocol (`lacp`) respecting: Zero Underscores in Actor and Partner Modifiers.","chosen":"host tor_sw  { mac 00:1c:73:aa:10:01 }\nhost host_nic { mac 00:1b:21:bb:20:01 }\n\ncompile {\n    tor_sw -> host_nic lacp\n}","rejected":"host sw1 { ip 10.0.0.1 }\nhost sw2 { ip 10.0.0.2 }\n\ncompile {\n    sw1 -> sw2 lacp actor_key 10 actor_state 0x3d\n}","explanation":"All LACP modifiers follow the strict `[a-z0-9]+` rule: `actorsys`, `actorkey`, `actorport`, `actorstate`, `partnersys`, `partnerkey`, `partnerport`, `partnerstate`."}
{"id":"dpo-pitfall-mpls-1","category":"protocol_pitfall","rule_id":"MPLS_P1","protocols":["mpls"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Multiprotocol Label Switching Unicast Shim (`mpls`) respecting: Repeat mpls <label> for Multi-Label Stacks (Auto Bottom-of-Stack).","chosen":"host pe_west { mac 00:1c:73:aa:00:01 }\nhost p_core  { mac 00:1c:73:bb:00:02 }\n\ncompile {\n    pe_west -> p_core mpls 16000 mpls 24010 exp 5 mplsttl 64 payload \"sr-l3vpn\"\n}","rejected":"host pe1 { ip 10.0.0.1 }\nhost pe2 { ip 10.0.0.2 }\n\ncompile {\n    pe1 -> pe2 icmp mpls [16001, 24010]\n}","explanation":"Stack multiple MPLS labels in outer-to-inner wire order (`mpls 16001 mpls 24010`). FrameAssembly sets `bos 0` on outer labels and `bos 1` on the bottom label automatically."}
{"id":"dpo-pitfall-cdp-1","category":"protocol_pitfall","rule_id":"CDP_P1","protocols":["cdp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Cisco Discovery Protocol v2 (IEEE 802.3 LLC/SNAP) (`cdp`) respecting: Use nativevlan for the CDP TLV vs vlan for Outer 802.1Q Tagging.","chosen":"host access_sw { mac 00:1b:21:aa:00:01 }\nhost core_sw   { mac 00:1b:21:bb:00:02 }\n\ncompile {\n    access_sw -> core_sw cdp deviceid \"access-sw-01\" portid \"Gi1/0/48\" platform \"C9300-48P\" nativevlan 10\n}","rejected":"host sw1 { ip 10.0.0.1 }\nhost sw2 { ip 10.0.0.2 }\n\ncompile {\n    sw1 -> sw2 cdp native_vlan 10\n}","explanation":"`nativevlan 10` writes CDP TLV `0x000a` inside the CDP payload, whereas cross-layer `vlan 10` wraps the outer Ethernet frame in an IEEE 802.1Q tag."}
{"id":"dpo-pitfall-cdp-2","category":"protocol_pitfall","rule_id":"CDP_P2","protocols":["cdp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Cisco Discovery Protocol v2 (IEEE 802.3 LLC/SNAP) (`cdp`) respecting: CDP ttl Is an 8-Bit Holdtime (0..255 Seconds).","chosen":"host access_sw { mac 00:1b:21:aa:00:01 }\nhost core_sw   { mac 00:1b:21:bb:00:02 }\n\ncompile {\n    access_sw -> core_sw cdp deviceid \"access-sw-01\" portid \"Gi1/0/48\" platform \"C9300-48P\" nativevlan 10\n}","rejected":"host sw1 { ip 10.0.0.1 }\nhost sw2 { ip 10.0.0.2 }\n\ncompile {\n    sw1 -> sw2 cdp ttl 600\n}","explanation":"Unlike `lldp` (which carries a 16-bit TTL TLV up to 65535), the CDP header Holdtime field is a single byte (`0..255` seconds, Cisco default `180`)."}
{"id":"dpo-pitfall-isis-1","category":"protocol_pitfall","rule_id":"ISIS_P1","protocols":["isis"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Intermediate System to Intermediate System (ISO/IEC 10589) (`isis`) respecting: IS-IS Runs Directly Over Layer 2 (MAC-Only Hosts Are Valid).","chosen":"host core_r1 { mac 00:1c:73:01:00:01 }\nhost core_r2 { mac 00:1c:73:01:00:02 }\n\ncompile {\n    core_r1 -> core_r2 isis l2iih sysid \"1921.6800.1001\" area \"49.0001\" holdtime 30 hostname \"core-rtr-01\"\n}","rejected":"host isis_a { ip 10.0.0.1 }\nhost isis_b { ip 10.0.0.2 }\n\ncompile {\n    isis_a -> isis_b isis l2_iih sys_id \"1921.6800.1001\"\n}","explanation":"All PDU type names and modifiers are strict lowercase alphanumeric (`l2iih`, `p2piih`, `l2lsp`, `l2csnp`, `sysid`, `holdtime`, `seqnum`) with zero underscores."}
{"id":"dpo-pitfall-isis-2","category":"protocol_pitfall","rule_id":"ISIS_P2","protocols":["isis"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Intermediate System to Intermediate System (ISO/IEC 10589) (`isis`) respecting: Quote Dotted Hex sysid and area Values.","chosen":"host core_r1 { mac 00:1c:73:01:00:01 }\nhost core_r2 { mac 00:1c:73:01:00:02 }\n\ncompile {\n    core_r1 -> core_r2 isis l2iih sysid \"1921.6800.1001\" area \"49.0001\" holdtime 30 hostname \"core-rtr-01\"\n}","rejected":"host p1 { ip 10.0.0.1 }\nhost p2 { ip 10.0.0.2 }\n\ncompile {\n    p1 -> p2 isis l2iih sysid 1921.6800.1001 area 49.0001\n}","explanation":"Wrap NSAP area strings (`\"49.0001\"`) and 6-byte System IDs (`\"1921.6800.1001\"`) in double quotes so the lexer does not parse them as malformed IPv4 literals or OIDs."}
{"id":"dpo-pitfall-macsec-1","category":"protocol_pitfall","rule_id":"MACSEC_P1","protocols":["macsec"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IEEE 802.1AE Media Access Control Security (MACsec) (`macsec`) respecting: Pass sci as a 64-Bit Hex Literal (0x...) and icv as a Quoted Hex String.","chosen":"host dc_west { mac 00:1b:21:aa:00:01 }\nhost dc_east { mac 00:1b:21:bb:00:02 }\n\ncompile {\n    dc_west -> dc_east macsec tci 0x2c an 0 pn 1 sci 0x001b21aa00010001 icv \"0102030405060708090a0b0c0d0e0f10\"\n}","rejected":"host sw1 { ip 10.0.0.1 }\nhost sw2 { ip 10.0.0.2 }\n\ncompile {\n    sw1 -> sw2 macsec sci \"00:1b:21:aa:00:01:00:01\" icv 0x0102\n}","explanation":"`sci` takes a Whole number (`0x001b21aa00010001`), while `icv` takes a quoted hex byte string (`\"0102...0f10\"`)."}
{"id":"dpo-pitfall-macsec-2","category":"protocol_pitfall","rule_id":"MACSEC_P2","protocols":["macsec"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IEEE 802.1AE Media Access Control Security (MACsec) (`macsec`) respecting: Association Number an Is Bounded to 0..3.","chosen":"host dc_west { mac 00:1b:21:aa:00:01 }\nhost dc_east { mac 00:1b:21:bb:00:02 }\n\ncompile {\n    dc_west -> dc_east macsec tci 0x2c an 0 pn 1 sci 0x001b21aa00010001 icv \"0102030405060708090a0b0c0d0e0f10\"\n}","rejected":"host sw1 { ip 10.0.0.1 }\nhost sw2 { ip 10.0.0.2 }\n\ncompile {\n    sw1 -> sw2 macsec an 4 pn 1\n}","explanation":"Per IEEE 802.1AE, `an` occupies bits 0..1 of the TCI/AN octet and only accepts values `0`, `1`, `2`, or `3`."}
{"id":"dpo-pitfall-pfc-1","category":"protocol_pitfall","rule_id":"PFC_P1","protocols":["pfc"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IEEE 802.1Qbb Priority-based Flow Control (Lossless Ethernet) (`pfc`) respecting: Include Explicit enable When Sending Zero-Quanta XON Frames.","chosen":"host leaf_tor { mac 00:1c:73:dc:00:01 }\nhost gpu_nic  { mac 00:1c:73:dc:00:10 }\n\ncompile {\n    leaf_tor -> gpu_nic pfc q3 512\n}","rejected":"host tor_sw { ip 10.0.0.1 }\nhost gpu_srv { ip 10.0.0.2 }\n\ncompile {\n    tor_sw -> gpu_srv pfc\n}","explanation":"To unpause Priority 3 (`q3 0`), set `enable 0x0008` explicitly so receivers know the `0` timer applies to Traffic Class 3 rather than an ignored disabled bit."}
{"id":"dpo-pitfall-pfc-2","category":"protocol_pitfall","rule_id":"PFC_P2","protocols":["pfc"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IEEE 802.1Qbb Priority-based Flow Control (Lossless Ethernet) (`pfc`) respecting: Use .pcapng Output to Preserve Sub-Microsecond PFC Timing.","chosen":"host leaf_tor { mac 00:1c:73:dc:00:01 }\nhost gpu_nic  { mac 00:1c:73:dc:00:10 }\n\ncompile {\n    leaf_tor -> gpu_nic pfc q3 512\n}","rejected":"host a { ip 10.0.0.1 }\nhost b { ip 10.0.0.2 }\n\ncompile {\n    a -> b Relying on microsecond .pcap when testing 250ns PFC bursts\n}","explanation":"Classic `.pcap` truncates timestamps to microseconds; compile to `.pcapng` (`IfTsResol=9`) when modeling 100G/400G nanosecond pause intervals."}
{"id":"dpo-pitfall-pppoe-1","category":"protocol_pitfall","rule_id":"PPPOE_P1","protocols":["pppoe"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Point-to-Point Protocol over Ethernet (Discovery & Session) (`pppoe`) respecting: hostuniq and accookie Expect Quoted Even-Length Hex Bytes.","chosen":"host ont_cpe { mac 00:1b:21:c0:00:10 }\nhost isp_bng { mac 00:1c:73:b0:00:01 }\n\ncompile {\n    ont_cpe -> isp_bng pppoe padi servicename \"ftth-gigabit\" hostuniq \"01020304\" wait 2ms\n    ont_cpe <- isp_bng pppoe pado acname \"bng-edge-01\" servicename \"ftth-gigabit\" hostuniq \"01020304\" accookie \"deadbeefcafe\"\n}","rejected":"host cpe { ip 10.0.0.1 }\nhost bng { ip 10.0.0.2 }\n\ncompile {\n    cpe -> bng pppoe padi hostuniq \"router-1\"\n}","explanation":"`hostuniq` and `accookie` are raw binary RFC 2516 TLV octets parsed as hex byte strings (`\"a1b2c3d4\"` or `\"a1:b2:c3:d4\"`)."}
{"id":"dpo-pitfall-pppoe-2","category":"protocol_pitfall","rule_id":"PPPOE_P2","protocols":["pppoe"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Point-to-Point Protocol over Ethernet (Discovery & Session) (`pppoe`) respecting: Discovery Uses sessionid 0 Until PADS Assigns the Session ID.","chosen":"host ont_cpe { mac 00:1b:21:c0:00:10 }\nhost isp_bng { mac 00:1c:73:b0:00:01 }\n\ncompile {\n    ont_cpe -> isp_bng pppoe padi servicename \"ftth-gigabit\" hostuniq \"01020304\" wait 2ms\n    ont_cpe <- isp_bng pppoe pado acname \"bng-edge-01\" servicename \"ftth-gigabit\" hostuniq \"01020304\" accookie \"deadbeefcafe\"\n}","rejected":"host cpe { ip 10.0.0.1 }\nhost bng { ip 10.0.0.2 }\n\ncompile {\n    cpe -> bng pppoe padi sessionid 42\n}","explanation":"Per RFC 2516, `padi`, `pado`, and `padr` carry `SESSION_ID = 0x0000`; the BNG assigns the non-zero `sessionid` in `pads`, which both peers reuse in `session` and `padt`."}
{"id":"dpo-pitfall-nsh-1","category":"protocol_pitfall","rule_id":"NSH_P1","protocols":["nsh"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Network Service Header (Service Function Chaining) (`nsh`) respecting: NSH ttl Is Strictly 6 Bits (0..63, Never 64 or 255).","chosen":"host sff_ingress { mac 00:1c:73:50:00:01 }\nhost sf_firewall { mac 00:1c:73:50:00:10 }\n\ncompile {\n    sff_ingress -> sf_firewall nsh spi 100 si 255 mdtype 1 nextproto \"ipv4\" context \"00000001000000020000000300000004\"\n}","rejected":"host sff1 { ip 10.0.0.1 }\nhost sff2 { ip 10.0.0.2 }\n\ncompile {\n    sff1 -> sff2 nsh spi 100 ttl 64\n}","explanation":"RFC 8300 allocates a 6-bit TTL field in the NSH Base Header (`max 63`), so `ttl 64` or `ttl 255` fails compile-time semantic validation on `nsh` statements."}
{"id":"dpo-pitfall-nsh-2","category":"protocol_pitfall","rule_id":"NSH_P2","protocols":["nsh"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Network Service Header (Service Function Chaining) (`nsh`) respecting: Use nextproto (Never nextheader) on NSH Frames.","chosen":"host sff_ingress { mac 00:1c:73:50:00:01 }\nhost sf_firewall { mac 00:1c:73:50:00:10 }\n\ncompile {\n    sff_ingress -> sf_firewall nsh spi 100 si 255 mdtype 1 nextproto \"ipv4\" context \"00000001000000020000000300000004\"\n}","rejected":"host sff1 { ip 10.0.0.1 }\nhost sff2 { ip 10.0.0.2 }\n\ncompile {\n    sff1 -> sff2 nsh spi 100 nextheader 1\n}","explanation":"`nextproto` sets the NSH Base Header Next Protocol field (`\"ipv4\"`, `\"ipv6\"`, `\"ethernet\"`, `\"nsh\"`, `\"mpls\"`)."}
{"id":"dpo-pitfall-profinet-1","category":"protocol_pitfall","rule_id":"PROFINET_P1","protocols":["profinet"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IEC 61158 PROFINET Real-Time & DCP (Ethernet 0x8892 / UDP 34964) (`profinet`) respecting: transport udp Requires IP Addresses on Both Endpoints.","chosen":"host io_controller { mac 00:0e:8c:aa:00:01 }\nhost io_device     { mac 00:0e:8c:bb:00:10 }\n\ncompile {\n    io_controller -> io_device profinet frameid 0x8000 cycle 100 datastatus 0x35 vlan 0 pcp 6\n}","rejected":"host io1 { mac 00:0e:8c:00:00:01 }\nhost io2 { ip 10.0.0.2 }\n\ncompile {\n    io1 -> io2 profinet transport udp\n}","explanation":"Native Layer 2 `profinet` (`0x8892`) works on MAC-only hosts, whereas `profinet transport udp` builds an IP + UDP `34964` header and requires `ip` on both hosts."}
{"id":"dpo-pitfall-profinet-2","category":"protocol_pitfall","rule_id":"PROFINET_P2","protocols":["profinet"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IEC 61158 PROFINET Real-Time & DCP (Ethernet 0x8892 / UDP 34964) (`profinet`) respecting: PROFINET Supports transport udp Only (Never transport tcp).","chosen":"host io_controller { mac 00:0e:8c:aa:00:01 }\nhost io_device     { mac 00:0e:8c:bb:00:10 }\n\ncompile {\n    io_controller -> io_device profinet frameid 0x8000 cycle 100 datastatus 0x35 vlan 0 pcp 6\n}","rejected":"host plc { ip 10.0.0.1 }\nhost io { ip 10.0.0.2 }\n\ncompile {\n    plc -> io profinet transport tcp\n}","explanation":"Per IEC 61158, routed PROFINET Real-Time uses UDP port `34964`; TCP is not a valid PROFINET RT transport."}
{"id":"dpo-pitfall-goose-1","category":"protocol_pitfall","rule_id":"GOOSE_P1","protocols":["goose"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IEC 61850-8-1 Generic Object Oriented Substation Events (`goose`) respecting: Use timetolive for GOOSE Hold Time (ttl Is Reserved for Layer 3 IP).","chosen":"host relay_ied1 { mac 00:1b:21:61:85:01 }\nhost breaker_mu { mac 01:0c:cd:01:00:01 }\n\ncompile {\n    relay_ied1 -> breaker_mu goose appid 0x1001 gocbref \"IED1PROT/LLN0$GO$gcbTrip\" datset \"IED1PROT/LLN0$TripSet\" stnum 1 sqnum 0 vlan 100 pcp 6\n}","rejected":"host ied1 { ip 10.0.0.1 }\nhost bus { ip 10.0.0.2 }\n\ncompile {\n    ied1 -> bus goose ttl 2000 st_num 1\n}","explanation":"GOOSE runs directly over Layer 2 (`0x88b8`); use `timetolive` for the IEC 61850 `timeAllowedtoLive` field and lowercase `stnum`/`sqnum`/`gocbref` without underscores."}
{"id":"dpo-pitfall-goose-2","category":"protocol_pitfall","rule_id":"GOOSE_P2","protocols":["goose"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IEC 61850-8-1 Generic Object Oriented Substation Events (`goose`) respecting: Quote IEC 61850 Strings Containing $ Object Separators.","chosen":"host relay_ied1 { mac 00:1b:21:61:85:01 }\nhost breaker_mu { mac 01:0c:cd:01:00:01 }\n\ncompile {\n    relay_ied1 -> breaker_mu goose appid 0x1001 gocbref \"IED1PROT/LLN0$GO$gcbTrip\" datset \"IED1PROT/LLN0$TripSet\" stnum 1 sqnum 0 vlan 100 pcp 6\n}","rejected":"host ied1 { ip 10.0.0.1 }\nhost bus { ip 10.0.0.2 }\n\ncompile {\n    ied1 -> bus goose gocbref IED1/LLN0$GO$gcb01\n}","explanation":"IEC 61850 object references contain `/` and `$` characters and must always be enclosed in double quotes."}
{"id":"dpo-pitfall-sv-1","category":"protocol_pitfall","rule_id":"SV_P1","protocols":["sv"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IEC 61850-9-2 Substation Sampled Values (Process Bus) (`sv`) respecting: Standard SV APPID Range Is 0x4000..0x7fff (GOOSE Uses 0x0000..0x3fff).","chosen":"host merging_unit { mac 00:1b:21:92:00:01 }\nhost process_bus  { mac 01:0c:cd:04:00:01 }\n\ncompile {\n    merging_unit -> process_bus sv appid 0x4001 svid \"BAY01_MU01\" smpcnt 0 confrev 1 smpsynch 2 vlan 300 pcp 4\n}","rejected":"host mu1 { ip 10.0.0.1 }\nhost bus { ip 10.0.0.2 }\n\ncompile {\n    mu1 -> bus sv app_id 0x1000 smp_cnt 1\n}","explanation":"Use strict lowercase `appid`, `svid`, `smpcnt`, `smpsynch`, `smprate`, and `confrev` without underscores, and keep `appid` in `0x4000..0x7fff` so substation switches classify SV traffic properly."}
{"id":"dpo-pitfall-sv-2","category":"protocol_pitfall","rule_id":"SV_P2","protocols":["sv"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IEC 61850-9-2 Substation Sampled Values (Process Bus) (`sv`) respecting: smpsynch Accepts 0, 1, or 2.","chosen":"host merging_unit { mac 00:1b:21:92:00:01 }\nhost process_bus  { mac 01:0c:cd:04:00:01 }\n\ncompile {\n    merging_unit -> process_bus sv appid 0x4001 svid \"BAY01_MU01\" smpcnt 0 confrev 1 smpsynch 2 vlan 300 pcp 4\n}","rejected":"host mu1 { ip 10.0.0.1 }\nhost bus { ip 10.0.0.2 }\n\ncompile {\n    mu1 -> bus sv smpsynch 5\n}","explanation":"IEC 61850-9-2 defines `0` (not synchronized), `1` (synchronized by local area clock), and `2` (synchronized by global area clock)."}
{"id":"dpo-pitfall-ethercat-1","category":"protocol_pitfall","rule_id":"ETHERCAT_P1","protocols":["ethercat"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IEC 61158 EtherCAT Industrial Ethernet Fieldbus (0x88a4 / UDP 34980) (`ethercat`) respecting: Declare IP Addresses on Hosts When Using ethercat transport udp.","chosen":"host twincat_master { mac 00:01:05:10:00:01 }\nhost servo_drive_01 { mac 00:01:05:10:00:02 }\n\ncompile {\n    twincat_master -> servo_drive_01 ethercat read idx 1 adp 0x0000 ado 0x0130 wkc 0 wait 125us\n    twincat_master <- servo_drive_01 ethercat read idx 1 adp 0x0001 ado 0x0130 wkc 1\n}","rejected":"host m { mac 00:01:05:00:00:01 }\nhost s { ip 10.0.0.2 }\n\ncompile {\n    m -> s ethercat read transport udp\n}","explanation":"Pure Layer 2 `ethercat` (`0x88a4`) compiles on MAC-only hosts, whereas `transport udp` builds an outer IP + UDP `34980` header and requires `ip` on both hosts."}
{"id":"dpo-pitfall-ethercat-2","category":"protocol_pitfall","rule_id":"ETHERCAT_P2","protocols":["ethercat"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IEC 61158 EtherCAT Industrial Ethernet Fieldbus (0x88a4 / UDP 34980) (`ethercat`) respecting: Keep adp/addr and ado/offset Within 16-Bit Bounds (0..65535).","chosen":"host twincat_master { mac 00:01:05:10:00:01 }\nhost servo_drive_01 { mac 00:01:05:10:00:02 }\n\ncompile {\n    twincat_master -> servo_drive_01 ethercat read idx 1 adp 0x0000 ado 0x0130 wkc 0 wait 125us\n    twincat_master <- servo_drive_01 ethercat read idx 1 adp 0x0001 ado 0x0130 wkc 1\n}","rejected":"host m { ip 10.0.0.1 }\nhost s { ip 10.0.0.2 }\n\ncompile {\n    m -> s ethercat cmd \"LRW\" addr 0x10000 wkc 0\n}","explanation":"Semantic validation enforces 16-bit bounds (`0..=65535`) on `adp`/`addr` and `ado`/`offset`; split upper 16-bit words into `ado` / `offset`."}
{"id":"dpo-pitfall-icmp-1","category":"protocol_pitfall","rule_id":"ICMP_P1","protocols":["icmp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Internet Control Message Protocol v4 & Dual-Stack ICMPv6 (`icmp`) respecting: Zero Underscores in ICMP Message Keywords.","chosen":"host client { ip 10.0.0.10 }\nhost router { ip 10.0.0.1 }\n\ncompile {\n    client -> router icmp echorequest wait 2ms\n    client <- router icmp echoreply\n}","rejected":"host a { ip 10.0.0.1 }\nhost b { ip 10.0.0.2 }\n\ncompile {\n    a -> b icmp echo_request\n}","explanation":"Write `echorequest`, `echoreply`, `destunreach`, and `timeexceeded` with zero underscores."}
{"id":"dpo-pitfall-icmp-2","category":"protocol_pitfall","rule_id":"ICMP_P2","protocols":["icmp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Internet Control Message Protocol v4 & Dual-Stack ICMPv6 (`icmp`) respecting: Both Endpoints Must Share the Same IP Address Family.","chosen":"host client { ip 10.0.0.10 }\nhost router { ip 10.0.0.1 }\n\ncompile {\n    client -> router icmp echorequest wait 2ms\n    client <- router icmp echoreply\n}","rejected":"host app_v4 { ip 10.0.0.1 }\nhost edge_v6 { ip 2001:db8::2 }\n\ncompile {\n    app_v4 -> edge_v6 icmp echorequest\n}","explanation":"Both hosts on a single packet line must use IPv4 or both must use IPv6—you cannot send a packet directly from an IPv4 host to an IPv6 host."}
{"id":"dpo-pitfall-ndp-1","category":"protocol_pitfall","rule_id":"NDP_P1","protocols":["ndp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IPv6 Neighbor Discovery Protocol (`ndp`) respecting: IPv6 Endpoints Are Mandatory on ndp.","chosen":"host host_v6   { ip 2001:db8:cafe::25 mac 00:1b:21:aa:00:25 }\nhost router_v6 { ip 2001:db8:cafe::1  mac 00:1c:73:bb:00:01 }\n\ncompile {\n    host_v6 -> router_v6 ndp neighborsolicit target 2001:db8:cafe::1 slla 00:1b:21:aa:00:25 wait 1ms\n    host_v6 <- router_v6 ndp neighboradvert target 2001:db8:cafe::1 tlla 00:1c:73:bb:00:01\n}","rejected":"host v4_a { ip 10.0.0.1 }\nhost v4_b { ip 10.0.0.2 }\n\ncompile {\n    v4_a -> v4_b ndp neighborsolicit\n}","explanation":"NDP runs over ICMPv6, so both hosts on an `ndp` line must have IPv6 addresses. Use `arp` for IPv4 MAC resolution."}
{"id":"dpo-pitfall-ndp-2","category":"protocol_pitfall","rule_id":"NDP_P2","protocols":["ndp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IPv6 Neighbor Discovery Protocol (`ndp`) respecting: Strict Alphanumeric Message Names.","chosen":"host host_v6   { ip 2001:db8:cafe::25 mac 00:1b:21:aa:00:25 }\nhost router_v6 { ip 2001:db8:cafe::1  mac 00:1c:73:bb:00:01 }\n\ncompile {\n    host_v6 -> router_v6 ndp neighborsolicit target 2001:db8:cafe::1 slla 00:1b:21:aa:00:25 wait 1ms\n    host_v6 <- router_v6 ndp neighboradvert target 2001:db8:cafe::1 tlla 00:1c:73:bb:00:01\n}","rejected":"host v6_a { ip 2001:db8::1 }\nhost v6_b { ip 2001:db8::2 }\n\ncompile {\n    v6_a -> v6_b ndp neighbor_solicit router_lifetime 900\n}","explanation":"Spell NDP sub-keywords without underscores: `routersolicit`, `routeradvert`, `neighborsolicit`, `neighboradvert`, `routerlifetime`."}
{"id":"dpo-pitfall-igmp-1","category":"protocol_pitfall","rule_id":"IGMP_P1","protocols":["igmp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Internet Group Management Protocol v1, v2 & v3 (`igmp`) respecting: IPv4 Endpoints Are Required on igmp (Use mld for IPv6).","chosen":"host querier  { ip 10.20.1.1 }\nhost receiver { ip 10.20.1.55 }\n\ncompile {\n    querier -> receiver igmp v2 query group 224.0.0.1 maxresp 100 wait 5ms\n    receiver -> querier igmp v2 report group 239.1.1.10\n}","rejected":"host host6_a { ip 2001:db8::1 }\nhost host6_b { ip 2001:db8::2 }\n\ncompile {\n    host6_a -> host6_b igmp v3 report\n}","explanation":"IGMP runs exclusively over IPv4, so IPv6 hosts are rejected on `igmp` lines. For IPv6 multicast group management, use `mld` (Multicast Listener Discovery)."}
{"id":"dpo-pitfall-mld-1","category":"protocol_pitfall","rule_id":"MLD_P1","protocols":["mld"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Multicast Listener Discovery v1 & v2 (IPv6) (`mld`) respecting: IPv6 Endpoints Are Mandatory on mld.","chosen":"host rtr_v6  { ip fe80::1 }\nhost node_v6 { ip fe80::25 }\n\ncompile {\n    rtr_v6 -> node_v6 mld query maxrespdelay 10000 wait 3ms\n    node_v6 -> rtr_v6 mld report multicastaddr ff02::1:ff00:25\n}","rejected":"host host4_a { ip 10.0.0.1 }\nhost host4_b { ip 10.0.0.2 }\n\ncompile {\n    host4_a -> host4_b mld query\n}","explanation":"MLD runs inside ICMPv6, so both hosts must have IPv6 addresses. Use `igmp` for IPv4 multicast group management."}
{"id":"dpo-pitfall-vxlan-2","category":"protocol_pitfall","rule_id":"VXLAN_P2","protocols":["vxlan"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Virtual eXtensible Local Area Network Overlay (`vxlan`) respecting: VXLAN Runs Exclusively Over UDP (No transport tcp).","chosen":"host vtep_leaf1 { ip 172.16.0.11 }\nhost vtep_leaf2 { ip 172.16.0.12 }\n\ncompile {\n    vtep_leaf1 -> vtep_leaf2 vxlan vni 10100\n}","rejected":"host leaf1 { ip 10.0.0.1 }\nhost leaf2 { ip 10.0.0.2 }\n\ncompile {\n    leaf1 -> leaf2 vxlan vni 100 transport tcp\n}","explanation":"Per RFC 7348, VXLAN is strictly UDP-encapsulated and is not in the 9-protocol `transport` whitelist."}
{"id":"dpo-pitfall-geneve-1","category":"protocol_pitfall","rule_id":"GENEVE_P1","protocols":["geneve"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Generic Network Virtualization Encapsulation (`geneve`) respecting: Spell optclass, opttype, and protocoltype Without Underscores.","chosen":"host k8s_worker1 { ip 10.240.0.11 }\nhost k8s_worker2 { ip 10.240.0.12 }\n\ncompile {\n    k8s_worker1 -> k8s_worker2 geneve vni 20200 optclass 0x0102 opttype 1\n}","rejected":"host a { ip 10.0.0.1 }\nhost b { ip 10.0.0.2 }\n\ncompile {\n    a -> b geneve opt_class 0x0102 opt_type 1 protocol_type 0x6558\n}","explanation":"All GENEVE sub-keywords are strict lowercase alphanumeric tokens with zero underscores."}
{"id":"dpo-pitfall-ipip-1","category":"protocol_pitfall","rule_id":"IPIP_P1","protocols":["ipip"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IP-in-IP & IPv6-in-IPv4 Tunneling (`ipip`) respecting: Use innerttl and innerdscp for the Encapsulated Header.","chosen":"host k8s_node_a { ip 172.16.10.11 }\nhost k8s_node_b { ip 172.16.20.22 }\n\ncompile {\n    k8s_node_a -> k8s_node_b ipip v4 srcip 10.244.1.15 dstip 10.244.2.40 innerttl 63 proto 6 payload \"calico-pod-probe\"\n}","rejected":"host node1 { ip 10.0.0.1 }\nhost node2 { ip 10.0.0.2 }\n\ncompile {\n    node1 -> node2 ipip v4 srcip 10.1.0.1 dstip 10.2.0.1 ttl 63\n}","explanation":"Bare `ttl` and `dscp` control the outer delivery IP header, while `innerttl` and `innerdscp` control the encapsulated inner IP header."}
{"id":"dpo-pitfall-ipip-2","category":"protocol_pitfall","rule_id":"IPIP_P2","protocols":["ipip"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IP-in-IP & IPv6-in-IPv4 Tunneling (`ipip`) respecting: Keep Inner srcip and dstip in the Same Address Family.","chosen":"host k8s_node_a { ip 172.16.10.11 }\nhost k8s_node_b { ip 172.16.20.22 }\n\ncompile {\n    k8s_node_a -> k8s_node_b ipip v4 srcip 10.244.1.15 dstip 10.244.2.40 innerttl 63 proto 6 payload \"calico-pod-probe\"\n}","rejected":"host node1 { ip 10.0.0.1 }\nhost node2 { ip 10.0.0.2 }\n\ncompile {\n    node1 -> node2 ipip v6 srcip 10.1.0.1 dstip 2001:db8::2\n}","explanation":"While outer hosts can be IPv4 and inner addresses IPv6 (`6in4`), both inner `srcip` and `dstip` must belong to the selected inner IP version (`v4` or `v6`)."}
{"id":"dpo-pitfall-srv6-1","category":"protocol_pitfall","rule_id":"SRV6_P1","protocols":["srv6"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Segment Routing over IPv6 — Segment Routing Header (`srv6`) respecting: srv6 Requires IPv6 Endpoints on Both Hosts.","chosen":"host pe_ingress { ip 2001:db8:c0ca::1 }\nhost p_transit  { ip 2001:db8:c0ca::2 }\n\ncompile {\n    pe_ingress -> p_transit srv6 segleft 1 sid 2001:db8:100::1 sid 2001:db8:200::1 nextheader 59\n}","rejected":"host r1 { ip 10.0.0.1 }\nhost r2 { ip 10.0.0.2 }\n\ncompile {\n    compile { r1 -> r2 srv6 }\n}","explanation":"Because SRv6 is an IPv6 Routing Extension Header (`Next Header 43`), `validate_semantics` rejects IPv4 or MAC-only endpoints on `srv6` frames."}
{"id":"dpo-pitfall-srv6-2","category":"protocol_pitfall","rule_id":"SRV6_P2","protocols":["srv6"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Segment Routing over IPv6 — Segment Routing Header (`srv6`) respecting: Repeat sid <ipv6> for Each Hop (Never Comma-Separated Arrays).","chosen":"host pe_ingress { ip 2001:db8:c0ca::1 }\nhost p_transit  { ip 2001:db8:c0ca::2 }\n\ncompile {\n    pe_ingress -> p_transit srv6 segleft 1 sid 2001:db8:100::1 sid 2001:db8:200::1 nextheader 59\n}","rejected":"host r1 { ip 10.0.0.1 }\nhost r2 { ip 10.0.0.2 }\n\ncompile {\n    r1 -> r2 srv6 sid [2001:db8:1::1, 2001:db8:2::1]\n}","explanation":"Pass each 128-bit Segment ID as its own `sid <ipv6>` modifier clause on the same frame line."}
{"id":"dpo-pitfall-erspan-2","category":"protocol_pitfall","rule_id":"ERSPAN_P2","protocols":["erspan"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Cisco Encapsulated Remote SPAN Port Mirroring (Type II & Type III) (`erspan`) respecting: timestamp Applies to ERSPAN Type III (v3).","chosen":"host leaf_sw   { ip 10.20.0.11 }\nhost zeek_tap  { ip 10.99.0.50 }\n\ncompile {\n    leaf_sw -> zeek_tap erspan v3 sessionid 10 vid 120 cos 5 greseq 1 timestamp 50000 direction 0\n}","rejected":"host leaf { ip 10.0.0.1 }\nhost tap { ip 10.0.0.2 }\n\ncompile {\n    leaf -> tap erspan v2 timestamp 50000\n}","explanation":"ERSPAN Type II (`0x88be`) is a fixed 8-byte header without a 32-bit timestamp field; add `v3` (`0x22eb`) when testing hardware timestamps."}
{"id":"dpo-pitfall-esp-2","category":"protocol_pitfall","rule_id":"ESP_P2","protocols":["esp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IPsec Encapsulating Security Payload (`esp`) respecting: Even-Length Hex Octets in iv and icv.","chosen":"host peer_a { ip 172.16.50.1 }\nhost peer_b { ip 172.16.50.2 }\n\ncompile {\n    peer_a -> peer_b esp spi 0xdead0001 seq 1 iv \"0102030405060708\"\n}","rejected":"host spoke { ip 10.0.0.1 }\nhost hub { ip 10.0.0.2 }\n\ncompile {\n    spoke -> hub esp iv \"abc\"\n}","explanation":"Hex byte literals must contain an even number of hexadecimal digits (`0-9`, `a-f`, `A-F`) representing complete 8-bit octets."}
{"id":"dpo-pitfall-ikev2-1","category":"protocol_pitfall","rule_id":"IKEV2_P1","protocols":["ikev2"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Internet Key Exchange Protocol Version 2 (`ikev2`) respecting: Zero Underscores in Exchange Modes.","chosen":"host initiator { ip 198.51.100.10 }\nhost responder { ip 203.0.113.20 }\n\ncompile {\n    initiator -> responder ikev2 sainit initiatorspi 0xa1b2c3d4e5f60708 msgid 0 wait 3ms\n    initiator <- responder ikev2 sainit initiatorspi 0xa1b2c3d4e5f60708 responderspi 0x1122334455667788 flags 0x20 msgid 0\n}","rejected":"host a { ip 10.0.0.1 }\nhost b { ip 10.0.0.2 }\n\ncompile {\n    a -> b ikev2 sa_init   // or create_child_sa\n}","explanation":"Exchange modes follow the strict lowercase alphanumeric rule: `sainit`, `auth`, `createchildsa`, `informational`."}
{"id":"dpo-pitfall-wireguard-2","category":"protocol_pitfall","rule_id":"WIREGUARD_P2","protocols":["wireguard"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for WireGuard Noise_IK Secure Network Tunnel (`wireguard`) respecting: Use counter (Not seq) for AEAD Packet Nonces.","chosen":"host wg_laptop { ip 198.51.100.42 }\nhost wg_relay  { ip 203.0.113.10 }\n\ncompile {\n    wg_laptop -> wg_relay wireguard initiation sender 0x01020304 wait 2ms\n    wg_laptop <- wg_relay wireguard response sender 0x0a0b0c0d receiver 0x01020304\n}","rejected":"host a { ip 10.0.0.1 }\nhost b { ip 10.0.0.2 }\n\ncompile {\n    a -> b wireguard data seq 1\n}","explanation":"Because WireGuard runs over UDP rather than TCP, TCP `seq` is not valid here. Use `counter` for the 64-bit WireGuard packet counter."}
{"id":"dpo-pitfall-ospf-2","category":"protocol_pitfall","rule_id":"OSPF_P2","protocols":["ospf"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Open Shortest Path First — OSPFv2 & Dual-Stack OSPFv3 (`ospf`) respecting: Zero Underscores in Timer Modifiers.","chosen":"host rtr_a { ip 10.0.0.1 }\nhost rtr_b { ip 10.0.0.2 }\n\ncompile {\n    rtr_a -> rtr_b ospf hello routerid 1.1.1.1 areaid 0\n}","rejected":"host r1 { ip 10.0.0.1 }\nhost r2 { ip 10.0.0.2 }\n\ncompile {\n    r1 -> r2 ospf hello router_id 1.1.1.1 hello_interval 10\n}","explanation":"Use `routerid`, `areaid`, `hellointerval`, and `deadinterval` with zero underscores."}
{"id":"dpo-pitfall-bgp-1","category":"protocol_pitfall","rule_id":"BGP_P1","protocols":["bgp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Border Gateway Protocol 4 & 4-Byte ASN Capability (`bgp`) respecting: Quote CIDR Prefixes in bgp update (Never Put /24 in host Blocks).","chosen":"host spine_01 { ip 10.255.0.1 }\nhost leaf_01  { ip 10.255.0.2 }\n\ncompile {\n    spine_01 -> leaf_01 bgp open asn 65001 holdtime 90 bgpid 10.255.0.1 wait 2ms\n    spine_01 <- leaf_01 bgp open asn 65101 holdtime 90 bgpid 10.255.0.2 wait 2ms\n    spine_01 -> leaf_01 bgp keepalive\n}","rejected":"host r1 { ip 10.0.0.1/24 }\nhost r2 { ip 10.0.0.2 }\n\ncompile {\n    r1 -> r2 bgp update prefix 10.20.0.0/16\n}","explanation":"`host` declarations take plain IP literals without CIDR slashes, while CIDR strings in `bgp update prefix \"10.20.0.0/16\"` must be wrapped in double quotes."}
{"id":"dpo-pitfall-pim-1","category":"protocol_pitfall","rule_id":"PIM_P1","protocols":["pim"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Protocol Independent Multicast — Sparse Mode (`pim`) respecting: Spell joinprune and drpriority Without Underscores or Slashes.","chosen":"host fhr_leaf { ip 172.16.20.1 }\nhost core_rp  { ip 172.16.0.1 }\n\ncompile {\n    fhr_leaf -> core_rp pim hello holdtime 105 drpriority 100 wait 3ms\n    fhr_leaf -> core_rp pim register group 239.10.10.1 source 10.10.1.50 rp 172.16.0.1\n}","rejected":"host r1 { ip 10.0.0.1 }\nhost r2 { ip 10.0.0.2 }\n\ncompile {\n    r1 -> r2 pim join_prune dr_priority 100\n}","explanation":"All built-in PIM tokens are strictly lowercase alphanumeric (`joinprune`, `drpriority`, `holdtime`)."}
{"id":"dpo-pitfall-hsrp-1","category":"protocol_pitfall","rule_id":"HSRP_P1","protocols":["hsrp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Cisco Hot Standby Router Protocol v1 & v2 (`hsrp`) respecting: hellotime and holdtime Must Be Between 0 and 255 Seconds.","chosen":"host dist_sw1 { ip 10.20.10.2 mac 00:00:0c:07:ac:0a }\nhost all_rtrs { ip 224.0.0.2 }\n\ncompile {\n    dist_sw1 -> all_rtrs hsrp group 10 priority 110 state 16 vip 10.20.10.1\n}","rejected":"host dist_a { ip 10.0.0.1 }\nhost hsrp_v4 { ip 10.0.0.2 }\n\ncompile {\n    dist_a -> hsrp_v4 hsrp hellotime 300\n}","explanation":"RFC 2281 stores `hellotime` and `holdtime` as 1-byte fields in seconds, so values above `255` are rejected."}
{"id":"dpo-pitfall-hsrp-2","category":"protocol_pitfall","rule_id":"HSRP_P2","protocols":["hsrp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Cisco Hot Standby Router Protocol v1 & v2 (`hsrp`) respecting: Numeric State Codes (16 = Active, 8 = Standby).","chosen":"host dist_sw1 { ip 10.20.10.2 mac 00:00:0c:07:ac:0a }\nhost all_rtrs { ip 224.0.0.2 }\n\ncompile {\n    dist_sw1 -> all_rtrs hsrp group 10 priority 110 state 16 vip 10.20.10.1\n}","rejected":"host dist_a { ip 10.0.0.1 }\nhost hsrp_v4 { ip 10.0.0.2 }\n\ncompile {\n    dist_a -> hsrp_v4 hsrp state \"active\"\n}","explanation":"`state` takes its numeric RFC 2281 bit value (`16` Active, `8` Standby, `4` Speak, `2` Listen)."}
{"id":"dpo-pitfall-glbp-1","category":"protocol_pitfall","rule_id":"GLBP_P1","protocols":["glbp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Cisco Gateway Load Balancing Protocol (`glbp`) respecting: GLBP Group Numbers Are 10-Bit (0..1023).","chosen":"host dist_rtr_a { ip 172.16.10.2 mac 00:50:56:01:00:01 }\nhost dist_rtr_b { ip 172.16.10.3 mac 00:50:56:01:00:02 }\n\ncompile {\n    dist_rtr_a -> dist_rtr_b glbp hello group 10 priority 150 weight 100 vip 172.16.10.1 ownerid 00:50:56:01:00:01 vmac 00:07:b4:00:0a:01\n}","rejected":"host r1 { ip 10.0.0.1 }\nhost r2 { ip 10.0.0.2 }\n\ncompile {\n    r1 -> r2 glbp hello group 2048 vip 10.0.0.1\n}","explanation":"Unlike HSRPv2 (12-bit `0..4095`), GLBP allocates 10 bits for the Group ID (`0..1023`)."}
{"id":"dpo-pitfall-rsvp-1","category":"protocol_pitfall","rule_id":"RSVP_P1","protocols":["rsvp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Resource Reservation Protocol — Traffic Engineering (`rsvp`) respecting: RSVP Runs Directly on IP Protocol 46 (Never TCP or UDP).","chosen":"host pe_headend { ip 172.16.0.1 }\nhost pe_tailend { ip 172.16.0.2 }\n\ncompile {\n    pe_headend -> pe_tailend rsvp path tunnelid 100 lspid 1 srcip 172.16.0.1 dstip 172.16.0.2 routeralert wait 2ms\n    pe_headend <- pe_tailend rsvp resv tunnelid 100 lspid 1 label 24100\n}","rejected":"host pe1 { ip 10.0.0.1 }\nhost pe2 { ip 10.0.0.2 }\n\ncompile {\n    pe1 -> pe2 rsvp path tunnelid 10 dstport 3455\n}","explanation":"Standard RFC 2205 / RFC 3209 RSVP is a native Layer 3 IP protocol (`46`), so TCP/UDP ports and `transport` overrides are rejected."}
{"id":"dpo-pitfall-rsvp-2","category":"protocol_pitfall","rule_id":"RSVP_P2","protocols":["rsvp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Resource Reservation Protocol — Traffic Engineering (`rsvp`) respecting: Attach routeralert When Simulating Hop-by-Hop IPv4 Path Inspection.","chosen":"host pe_headend { ip 172.16.0.1 }\nhost pe_tailend { ip 172.16.0.2 }\n\ncompile {\n    pe_headend -> pe_tailend rsvp path tunnelid 100 lspid 1 srcip 172.16.0.1 dstip 172.16.0.2 routeralert wait 2ms\n    pe_headend <- pe_tailend rsvp resv tunnelid 100 lspid 1 label 24100\n}","rejected":"host a { ip 10.0.0.1 }\nhost b { ip 10.0.0.2 }\n\ncompile {\n    a -> b Forgetting Router Alert when testing transit LSR punt rules\n}","explanation":"Adding the cross-layer `routeralert` flag injects IPv4 Option `20` (`0x94 0x04 0x00 0x00`), matching how production Juniper and Cisco routers punt `Path` and `PathTear` messages."}
{"id":"dpo-pitfall-ldp-2","category":"protocol_pitfall","rule_id":"LDP_P2","protocols":["ldp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Label Distribution Protocol (`ldp`) respecting: lsrid Is Always a 32-Bit Dotted-Quad ID (Even Over IPv6 LDP).","chosen":"host lsr_pe1 { ip 10.0.0.1 }\nhost lsr_p1  { ip 10.0.0.2 }\n\ncompile {\n    lsr_pe1 -> lsr_p1 ldp hello lsrid 1.1.1.1 holdtime 15 transport udp wait 2ms\n    lsr_pe1 -> lsr_p1 ldp labelmapping lsrid 1.1.1.1 msgid 10 prefix \"192.0.2.0/24\" label 24001\n}","rejected":"host lsr1 { ip 10.0.0.1 }\nhost lsr2 { ip 10.0.0.2 }\n\ncompile {\n    lsr1 -> lsr2 ldp init lsrid 2001:db8::1\n}","explanation":"Per RFC 5036 and RFC 7552 (IPv6 LDP), the LDP Identifier always uses a 4-byte Router ID (`10.255.0.1`) rather than a 128-bit IPv6 address."}
{"id":"dpo-pitfall-bmp-1","category":"protocol_pitfall","rule_id":"BMP_P1","protocols":["bmp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for BGP Monitoring Protocol v3 (`bmp`) respecting: BMP Runs Unidirectionally From Router to Collector Over TCP 1790.","chosen":"host edge_rtr     { ip 192.0.2.1 }\nhost bmp_collector { ip 192.0.2.100 }\n\ncompile {\n    edge_rtr -> bmp_collector tcp syn srcport 51790 dstport 1790 win 65535 mss 1460 wait 1ms\n    edge_rtr <- bmp_collector tcp syn ack win 65535 mss 1460 wait 1ms\n    edge_rtr -> bmp_collector tcp ack wait 1ms\n    edge_rtr -> bmp_collector bmp initiation sysname \"edge-rtr-01\" sysdesc \"FRRouting 10.1\" wait 2ms\n    edge_rtr -> bmp_collector bmp peerup peerip 198.51.100.2 asn 64512 bgpid 198.51.100.2\n}","rejected":"host a { ip 10.0.0.1 }\nhost b { ip 10.0.0.2 }\n\ncompile {\n    a -> b Expecting BMP request/response queries from the collector\n}","explanation":"Per RFC 7854 Section 3.2, the monitored router sends BMP messages unidirectionally; the collector only acknowledges at the TCP layer (`tcp syn ack` / `tcp ack`) and never transmits BMP PDUs."}
{"id":"dpo-pitfall-bmp-2","category":"protocol_pitfall","rule_id":"BMP_P2","protocols":["bmp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for BGP Monitoring Protocol v3 (`bmp`) respecting: bgpid Is Always a 4-Byte Dotted-Quad Identifier.","chosen":"host edge_rtr     { ip 192.0.2.1 }\nhost bmp_collector { ip 192.0.2.100 }\n\ncompile {\n    edge_rtr -> bmp_collector tcp syn srcport 51790 dstport 1790 win 65535 mss 1460 wait 1ms\n    edge_rtr <- bmp_collector tcp syn ack win 65535 mss 1460 wait 1ms\n    edge_rtr -> bmp_collector tcp ack wait 1ms\n    edge_rtr -> bmp_collector bmp initiation sysname \"edge-rtr-01\" sysdesc \"FRRouting 10.1\" wait 2ms\n    edge_rtr -> bmp_collector bmp peerup peerip 198.51.100.2 asn 64512 bgpid 198.51.100.2\n}","rejected":"host router { ip 10.0.0.1 }\nhost collector { ip 10.0.0.2 }\n\ncompile {\n    router -> collector bmp peerup peerip 2001:db8::2 bgpid 2001:db8::2\n}","explanation":"Even when `peerip` is an IPv6 neighbor (`2001:db8::2`), RFC 4271 / RFC 6286 BGP Identifiers (`bgpid`) are always 32-bit dotted-quad values."}
{"id":"dpo-pitfall-rpkirtr-1","category":"protocol_pitfall","rule_id":"RPKIRTR_P1","protocols":["rpkirtr"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for RPKI-Router Origin Validation Protocol (`rpkirtr`) respecting: Match ipv4prefix vs ipv6prefix to Your CIDR Address Family.","chosen":"host edge_bgp   { ip 192.0.2.10 }\nhost routinator { ip 192.0.2.53 }\n\ncompile {\n    edge_bgp -> routinator rpkirtr resetquery version 1 wait 1ms\n    edge_bgp <- routinator rpkirtr cacheresponse version 1 sessionid 42 wait 1ms\n    edge_bgp <- routinator rpkirtr ipv4prefix version 1 announce prefix \"203.0.113.0/24\" maxlen 24 asn 64500 wait 1ms\n    edge_bgp <- routinator rpkirtr endofdata version 1 sessionid 42 serial 100 refresh 3600 retry 600 expire 7200\n}","rejected":"host rtr { ip 10.0.0.1 }\nhost cache { ip 10.0.0.2 }\n\ncompile {\n    rtr <- cache rpkirtr ipv4prefix prefix \"2001:db8::/32\" maxlen 48 asn 65001\n}","explanation":"`ipv4prefix` (`PDU Type 4`, 20 bytes) carries a 4-byte IPv4 prefix, whereas `ipv6prefix` (`PDU Type 6`, 32 bytes) carries a 16-byte IPv6 prefix."}
{"id":"dpo-pitfall-rpkirtr-2","category":"protocol_pitfall","rule_id":"RPKIRTR_P2","protocols":["rpkirtr"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for RPKI-Router Origin Validation Protocol (`rpkirtr`) respecting: Keep maxlen >= CIDR Prefix Length.","chosen":"host edge_bgp   { ip 192.0.2.10 }\nhost routinator { ip 192.0.2.53 }\n\ncompile {\n    edge_bgp -> routinator rpkirtr resetquery version 1 wait 1ms\n    edge_bgp <- routinator rpkirtr cacheresponse version 1 sessionid 42 wait 1ms\n    edge_bgp <- routinator rpkirtr ipv4prefix version 1 announce prefix \"203.0.113.0/24\" maxlen 24 asn 64500 wait 1ms\n    edge_bgp <- routinator rpkirtr endofdata version 1 sessionid 42 serial 100 refresh 3600 retry 600 expire 7200\n}","rejected":"host rtr { ip 10.0.0.1 }\nhost cache { ip 10.0.0.2 }\n\ncompile {\n    rtr <- cache rpkirtr ipv4prefix prefix \"203.0.113.0/24\" maxlen 16 asn 64500\n}","explanation":"Per RFC 8210 Section 5.6, `Max-Length` must be greater than or equal to `Prefix-Length` (`<= 32` for IPv4, `<= 128` for IPv6) or routers reject the VRP as corrupt."}
{"id":"dpo-pitfall-l2tp-1","category":"protocol_pitfall","rule_id":"L2TP_P1","protocols":["l2tp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Layer Two Tunneling Protocol v2 & v3 (`l2tp`) respecting: L2TPv3 Defaults to IP Protocol 115 Unless You Add transport udp.","chosen":"host lac_bng { ip 172.16.50.10 }\nhost lns_isp { ip 172.16.50.20 }\n\ncompile {\n    lac_bng -> lns_isp l2tp v2 sccrq tunnelid 0 ns 0 nr 0 wait 2ms\n    lac_bng <- lns_isp l2tp v2 sccrp tunnelid 100 ns 0 nr 1 wait 2ms\n    lac_bng -> lns_isp l2tp v2 scccn tunnelid 100 ns 1 nr 1\n}","rejected":"host pe1 { ip 10.0.0.1 }\nhost pe2 { ip 10.0.0.2 }\n\ncompile {\n    pe1 -> pe2 l2tp v3 data sessionid 100 dstport 1701\n}","explanation":"Raw `l2tp v3` runs directly over IP Protocol `115` (no UDP header); add `transport udp` whenever you want UDP-encapsulated L2TPv3 or custom UDP ports."}
{"id":"dpo-pitfall-l2tp-2","category":"protocol_pitfall","rule_id":"L2TP_P2","protocols":["l2tp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Layer Two Tunneling Protocol v2 & v3 (`l2tp`) respecting: TCP Transport Is Invalid on L2TP.","chosen":"host lac_bng { ip 172.16.50.10 }\nhost lns_isp { ip 172.16.50.20 }\n\ncompile {\n    lac_bng -> lns_isp l2tp v2 sccrq tunnelid 0 ns 0 nr 0 wait 2ms\n    lac_bng <- lns_isp l2tp v2 sccrp tunnelid 100 ns 0 nr 1 wait 2ms\n    lac_bng -> lns_isp l2tp v2 scccn tunnelid 100 ns 1 nr 1\n}","rejected":"host lac { ip 10.0.0.1 }\nhost lns { ip 10.0.0.2 }\n\ncompile {\n    lac -> lns l2tp v2 sccrq transport tcp\n}","explanation":"L2TP runs strictly over UDP (`1701`) or IP Protocol `115`—never TCP."}
{"id":"dpo-pitfall-lisp-1","category":"protocol_pitfall","rule_id":"LISP_P1","protocols":["lisp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Locator/ID Separation Protocol (Data & Control Plane) (`lisp`) respecting: Quote CIDR Prefixes Passed to eid \"<cidr>\".","chosen":"host sda_edge { ip 172.16.100.11 }\nhost map_srv  { ip 172.16.100.2 }\n\ncompile {\n    sda_edge -> map_srv lisp maprequest iid 4099 nonce 0x1122334455667788 eid \"10.50.10.25/32\" rloc 172.16.100.11 wait 2ms\n    sda_edge <- map_srv lisp mapreply iid 4099 nonce 0x1122334455667788 eid \"10.50.10.25/32\" rloc 172.16.100.22 priority 1 weight 100\n}","rejected":"host itr { ip 10.0.0.1 }\nhost mr { ip 10.0.0.2 }\n\ncompile {\n    itr -> mr lisp maprequest eid 10.200.0.0/16 rloc 172.16.0.1\n}","explanation":"In `.frasm`, CIDR prefixes containing `/` (`\"10.200.0.0/16\"` or `\"2001:db8::/48\"`) are always double-quoted strings, whereas bare IP literals (`rloc 172.16.0.1`) are unquoted."}
{"id":"dpo-pitfall-lisp-2","category":"protocol_pitfall","rule_id":"LISP_P2","protocols":["lisp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Locator/ID Separation Protocol (Data & Control Plane) (`lisp`) respecting: Remember Data Uses UDP 4341 While Control Uses UDP 4342.","chosen":"host sda_edge { ip 172.16.100.11 }\nhost map_srv  { ip 172.16.100.2 }\n\ncompile {\n    sda_edge -> map_srv lisp maprequest iid 4099 nonce 0x1122334455667788 eid \"10.50.10.25/32\" rloc 172.16.100.11 wait 2ms\n    sda_edge <- map_srv lisp mapreply iid 4099 nonce 0x1122334455667788 eid \"10.50.10.25/32\" rloc 172.16.100.22 priority 1 weight 100\n}","rejected":"host a { ip 10.0.0.1 }\nhost b { ip 10.0.0.2 }\n\ncompile {\n    a -> b Filtering Wireshark with udp.port == 4342 when inspecting lisp data\n}","explanation":"Wireshark separates `lisp` (UDP `4342` control plane) from `lisp-data` (UDP `4341` data plane)."}
{"id":"dpo-pitfall-gtpu-1","category":"protocol_pitfall","rule_id":"GTPU_P1","protocols":["gtpu"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for GPRS Tunneling Protocol User Plane (4G S1-U & 5G N3/N9) (`gtpu`) respecting: qfi Is a 6-Bit 5G QoS Flow ID (0..63).","chosen":"host gnb_du  { ip 172.22.10.11 }\nhost core_upf { ip 172.22.20.50 }\n\ncompile {\n    gnb_du -> core_upf gtpu echorequest teid 0 seqnum 1 wait 1ms\n    gnb_du <- core_upf gtpu echoreply teid 0 seqnum 1 wait 1ms\n    gnb_du -> core_upf gtpu gpdu teid 0x10002001 qfi 9 payload \"ue-uplink-pdu\"\n}","rejected":"host gnb { ip 10.0.0.1 }\nhost upf { ip 10.0.0.2 }\n\ncompile {\n    gnb -> upf gtpu gpdu teid 0x1001 qfi 64\n}","explanation":"3GPP TS 38.415 allocates 6 bits (`0..63`) for QoS Flow Identifier inside the PDU Session Container; `qfi > 63` fails compile-time validation."}
{"id":"dpo-pitfall-gtpu-2","category":"protocol_pitfall","rule_id":"GTPU_P2","protocols":["gtpu"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for GPRS Tunneling Protocol User Plane (4G S1-U & 5G N3/N9) (`gtpu`) respecting: GTPv1-U Runs on UDP 2152 (GTPv2-C Control Signaling Uses gtpc on UDP 2123).","chosen":"host gnb_du  { ip 172.22.10.11 }\nhost core_upf { ip 172.22.20.50 }\n\ncompile {\n    gnb_du -> core_upf gtpu echorequest teid 0 seqnum 1 wait 1ms\n    gnb_du <- core_upf gtpu echoreply teid 0 seqnum 1 wait 1ms\n    gnb_du -> core_upf gtpu gpdu teid 0x10002001 qfi 9 payload \"ue-uplink-pdu\"\n}","rejected":"host gnb { ip 10.0.0.1 }\nhost mme { ip 10.0.0.2 }\n\ncompile {\n    gnb -> mme gtpu createsessionrequest teid 0\n}","explanation":"Use `gtpu` (UDP `2152`) for user-plane `gpdu`, `echorequest`, `echoreply`, `errorindication`, and `endmarker`; session creation signaling belongs to control-plane GTPv2-C."}
{"id":"dpo-pitfall-tcp-1","category":"protocol_pitfall","rule_id":"TCP_P1","protocols":["tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Transmission Control Protocol & RFC 7323 Options (`tcp`) respecting: Use acknum <number> for the Acknowledgment Number (Bare ack Is the Flag).","chosen":"host client { ip 10.10.1.15 }\nhost server { ip 10.10.1.80 }\n\ncompile {\n    client -> server tcp syn srcport 52400 dstport 443 win 65535 mss 1460 wscale 7 sackperm wait 1ms\n    client <- server tcp syn ack win 65535 mss 1460 wscale 7 sackperm wait 1ms\n    client -> server tcp ack\n}","rejected":"host client { ip 10.0.0.1 }\nhost server { ip 10.0.0.2 }\n\ncompile {\n    client -> server tcp syn ack 1001 sport 50000 dport 443\n}","explanation":"Bare `ack` sets the 1-bit `ACK` flag in the TCP header. Use `acknum <number>` to set the 32-bit Acknowledgment Number, and always spell out `srcport` / `dstport`."}
{"id":"dpo-pitfall-tcp-2","category":"protocol_pitfall","rule_id":"TCP_P2","protocols":["tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Transmission Control Protocol & RFC 7323 Options (`tcp`) respecting: Never Add Underscores to sackperm, sackblock, or TCP Flags.","chosen":"host client { ip 10.10.1.15 }\nhost server { ip 10.10.1.80 }\n\ncompile {\n    client -> server tcp syn srcport 52400 dstport 443 win 65535 mss 1460 wscale 7 sackperm wait 1ms\n    client <- server tcp syn ack win 65535 mss 1460 wscale 7 sackperm wait 1ms\n    client -> server tcp ack\n}","rejected":"host client { ip 10.0.0.1 }\nhost server { ip 10.0.0.2 }\n\ncompile {\n    client -> server tcp flags [SYN] sack_perm\n}","explanation":"Every FrameAssembly v3.3.0 built-in keyword is strictly lowercase alphanumeric (`syn`, `ack`, `psh`, `sackperm`, `sackblock`, `tcpmd5`, `tfo`, `wscale`, `tsval`, `tsecr`) without brackets or underscores."}
{"id":"dpo-pitfall-udp-1","category":"protocol_pitfall","rule_id":"UDP_P1","protocols":["udp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for User Datagram Protocol (`udp`) respecting: TCP Flags and Options Are Rejected on UDP Frames.","chosen":"host sensor  { ip 10.20.0.15 }\nhost gateway { ip 10.20.0.1 }\n\ncompile {\n    sensor -> gateway udp srcport 53100 dstport 9000 payload \"ping:seq=1\" wait 2ms\n    sensor <- gateway udp payload \"pong:seq=1\"\n}","rejected":"host sensor { ip 10.0.0.1 }\nhost gateway { ip 10.0.0.2 }\n\ncompile {\n    sensor -> gateway udp dstport 9000 syn seq 100\n}","explanation":"TCP-only flags and options (`syn`, `ack`, `psh`, `seq`, `acknum`, `win`, `mss`, `sackperm`) cannot be used on UDP packets."}
{"id":"dpo-pitfall-udp-2","category":"protocol_pitfall","rule_id":"UDP_P2","protocols":["udp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for User Datagram Protocol (`udp`) respecting: Never Combine payload and hexpayload on One Frame.","chosen":"host sensor  { ip 10.20.0.15 }\nhost gateway { ip 10.20.0.1 }\n\ncompile {\n    sensor -> gateway udp srcport 53100 dstport 9000 payload \"ping:seq=1\" wait 2ms\n    sensor <- gateway udp payload \"pong:seq=1\"\n}","rejected":"host sensor { ip 10.0.0.1 }\nhost gateway { ip 10.0.0.2 }\n\ncompile {\n    sensor -> gateway udp dstport 9000 payload \"hdr\" hexpayload \"deadbeef\"\n}","explanation":"A single frame statement accepts either `payload \"<utf8>\"` or `hexpayload \"<hex>\"`, never both simultaneously."}
{"id":"dpo-pitfall-sctp-1","category":"protocol_pitfall","rule_id":"SCTP_P1","protocols":["sctp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Stream Control Transmission Protocol (`sctp`) respecting: Chunk Names Have Zero Underscores (initack, cookieecho, heartbeatack).","chosen":"host gnb_01 { ip 10.50.1.10 }\nhost amf_01 { ip 10.50.1.20 }\n\ncompile {\n    gnb_01 -> amf_01 sctp init srcport 38412 dstport 38412 vtag 0 tsn 1000 wait 1ms\n    gnb_01 <- amf_01 sctp initack vtag 0x11223344 tsn 2000 wait 1ms\n    gnb_01 -> amf_01 sctp data vtag 0x22334455 tsn 1001 stream 0 ssn 0 ppid 60 hexpayload \"0015000900000100\"\n}","rejected":"host gnb_du { ip 10.0.0.1 }\nhost core_amf { ip 10.0.0.2 }\n\ncompile {\n    gnb_du <- core_amf sctp init_ack vtag 0x11223344\n}","explanation":"All SCTP chunk keywords follow FrameAssembly's `[a-z0-9]+` rule: `initack`, `cookieecho`, `cookieack`, `heartbeatack`, and `shutdownack`."}
{"id":"dpo-pitfall-snmp1-1","category":"protocol_pitfall","rule_id":"SNMP1_P1","protocols":["snmp1"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Simple Network Management Protocol v1 (`snmp1`) respecting: Always Spell Out varbind <oid> string \"<val>\" (Never str).","chosen":"host ups_01 { ip 10.10.50.12 }\nhost nms_rx { ip 10.10.50.100 }\n\ncompile {\n    ups_01 -> nms_rx snmp1 trap community \"public\" enterprise 1.3.6.1.4.1.318 gentrap 6 spectrap 5 sysuptime 120500 varbind 1.3.6.1.2.1.1.5.0 string \"ups-dc1-row4\"\n}","rejected":"host ups_01 { ip 10.0.0.1 }\nhost nms_rx { ip 10.0.0.2 }\n\ncompile {\n    ups_01 -> nms_rx snmp1 trap varbind 1.3.6.1.2.1.1.5.0 str \"ups-01\"\n}","explanation":"The SMI OCTET STRING varbind type keyword in FrameAssembly v3.2.0 is strictly `string` (never `str`)."}
{"id":"dpo-pitfall-snmp1-2","category":"protocol_pitfall","rule_id":"SNMP1_P2","protocols":["snmp1"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Simple Network Management Protocol v1 (`snmp1`) respecting: getbulk and inform Require snmp2 or snmp3.","chosen":"host ups_01 { ip 10.10.50.12 }\nhost nms_rx { ip 10.10.50.100 }\n\ncompile {\n    ups_01 -> nms_rx snmp1 trap community \"public\" enterprise 1.3.6.1.4.1.318 gentrap 6 spectrap 5 sysuptime 120500 varbind 1.3.6.1.2.1.1.5.0 string \"ups-dc1-row4\"\n}","rejected":"host poller { ip 10.0.0.1 }\nhost legacy_sw { ip 10.0.0.2 }\n\ncompile {\n    poller -> legacy_sw snmp1 getbulk maxrepetitions 10 oid 1.3.6.1.2.1.2.2.1\n}","explanation":"RFC 1157 SNMPv1 predates `GetBulkRequest` (`0xa5`) and `InformRequest` (`0xa6`); switch the protocol keyword to `snmp2` or `snmp3` for bulk table walks."}
{"id":"dpo-pitfall-snmp2-1","category":"protocol_pitfall","rule_id":"SNMP2_P1","protocols":["snmp2"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Simple Network Management Protocol v2c (`snmp2`) respecting: Pass snmpTrapOID.0 via varbind 1.3.6.1.6.3.1.1.4.1.0 oidval <oid> (Never trapoid).","chosen":"host core_sw { ip 10.20.1.1 }\nhost nms_srv { ip 10.20.1.50 }\n\ncompile {\n    nms_srv -> core_sw snmp2 getbulk community \"ops-ro\" reqid 501 nonrepeaters 0 maxrepetitions 10 oid 1.3.6.1.2.1.31.1.1.1.6 wait 2ms\n    nms_srv <- core_sw snmp2 response community \"ops-ro\" reqid 501 varbind 1.3.6.1.2.1.31.1.1.1.6.1 counter64 98765432100\n}","rejected":"host dist_sw { ip 10.0.0.1 }\nhost nms_poller { ip 10.0.0.2 }\n\ncompile {\n    dist_sw -> nms_poller snmp2 trap trapoid 1.3.6.1.6.3.1.1.5.3\n}","explanation":"In RFC 3416 SNMPv2c/v3, trap OIDs are regular varbinds rather than dedicated v1 header slots. Pass `1.3.6.1.6.3.1.1.4.1.0` (`snmpTrapOID.0`) with the `oidval` type keyword."}
{"id":"dpo-pitfall-snmp2-2","category":"protocol_pitfall","rule_id":"SNMP2_P2","protocols":["snmp2"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Simple Network Management Protocol v2c (`snmp2`) respecting: Use string (Not str) for Text Varbinds.","chosen":"host core_sw { ip 10.20.1.1 }\nhost nms_srv { ip 10.20.1.50 }\n\ncompile {\n    nms_srv -> core_sw snmp2 getbulk community \"ops-ro\" reqid 501 nonrepeaters 0 maxrepetitions 10 oid 1.3.6.1.2.1.31.1.1.1.6 wait 2ms\n    nms_srv <- core_sw snmp2 response community \"ops-ro\" reqid 501 varbind 1.3.6.1.2.1.31.1.1.1.6.1 counter64 98765432100\n}","rejected":"host dist_sw { ip 10.0.0.1 }\nhost nms_poller { ip 10.0.0.2 }\n\ncompile {\n    dist_sw -> nms_poller snmp2 response varbind 1.3.6.1.2.1.1.5.0 str \"core-sw\"\n}","explanation":"Always write `string \"<value>\"` for OCTET STRING varbinds across `snmp1`, `snmp2`, and `snmp3`."}
{"id":"dpo-pitfall-snmp3-1","category":"protocol_pitfall","rule_id":"SNMP3_P1","protocols":["snmp3"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Simple Network Management Protocol v3 with USM Auth & Privacy (`snmp3`) respecting: engineid Must Be Non-Empty Even-Length Hex Octets.","chosen":"host poller { ip 10.40.1.10 }\nhost router { ip 10.40.1.1 }\n\ncompile {\n    poller -> router snmp3 get user \"secops\" engineid \"80001f888001020304\" engineboots 3 enginetime 1200 auth sha256 \"AuthPassPhrase99!\" priv aes \"PrivPassPhrase99!\" reqid 101 oid 1.3.6.1.2.1.1.1.0 wait 2ms\n    poller <- router snmp3 response user \"secops\" engineid \"80001f888001020304\" engineboots 3 enginetime 1200 auth sha256 \"AuthPassPhrase99!\" priv aes \"PrivPassPhrase99!\" reqid 101 varbind 1.3.6.1.2.1.1.1.0 string \"Core-RTR OS 17.9\"\n}","rejected":"host poller { ip 10.0.0.1 }\nhost router { ip 10.0.0.2 }\n\ncompile {\n    poller -> router snmp3 get user \"ops\" engineid \"router-01\"\n}","explanation":"`engineid` must contain a non-empty even number of hexadecimal characters (`0-9a-fA-F`, with optional colons or spaces). Omit `engineid` on initial discovery probes rather than passing `engineid \"\"`."}
{"id":"dpo-pitfall-dns-1","category":"protocol_pitfall","rule_id":"DNS_P1","protocols":["dns"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Domain Name System over UDP or TCP (`dns`) respecting: Spell Answer TTL as ansttl (Zero Underscores).","chosen":"host stub_client { ip 10.10.0.25 }\nhost dns_resolv  { ip 10.10.0.53 }\n\ncompile {\n    stub_client -> dns_resolv dns query txid 0x4a12 qname \"api.frameassembly.internal\" qtype \"A\" wait 2ms\n    stub_client <- dns_resolv dns response txid 0x4a12 qname \"api.frameassembly.internal\" qtype \"A\" rdata \"10.10.50.80\" ansttl 300\n}","rejected":"host stub_client { ip 10.0.0.1 }\nhost dns_resolv { ip 10.0.0.2 }\n\ncompile {\n    stub_client <- dns_resolv dns response rdata \"10.0.0.5\" ans_ttl 300\n}","explanation":"Built-in modifiers never use underscores—use `ansttl <number>` for the DNS Answer RR TTL so L3 `ttl <0..255>` remains free to set the IP Hop Limit."}
{"id":"dpo-pitfall-dns-2","category":"protocol_pitfall","rule_id":"DNS_P2","protocols":["dns"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Domain Name System over UDP or TCP (`dns`) respecting: Each Domain Label Must Be 63 Characters or Fewer.","chosen":"host stub_client { ip 10.10.0.25 }\nhost dns_resolv  { ip 10.10.0.53 }\n\ncompile {\n    stub_client -> dns_resolv dns query txid 0x4a12 qname \"api.frameassembly.internal\" qtype \"A\" wait 2ms\n    stub_client <- dns_resolv dns response txid 0x4a12 qname \"api.frameassembly.internal\" qtype \"A\" rdata \"10.10.50.80\" ansttl 300\n}","rejected":"host stub_client { ip 10.0.0.1 }\nhost dns_resolv { ip 10.0.0.2 }\n\ncompile {\n    stub_client -> dns_resolv dns query qname \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.internal\"\n}","explanation":"RFC 1035 limits each dot-separated label to `63` bytes and the full domain name to `253` bytes. Split long DNS tunneling test payloads across multiple dots."}
{"id":"dpo-pitfall-mdns-1","category":"protocol_pitfall","rule_id":"MDNS_P1","protocols":["mdns"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Multicast DNS Zero-Configuration Discovery (`mdns`) respecting: mDNS Is Strictly UDP-Only (transport tcp Is Rejected).","chosen":"host laptop  { ip 192.168.10.42 }\nhost printer { ip 192.168.10.90 }\n\ncompile {\n    laptop -> printer mdns query qname \"_ipp._tcp.local\" qtype \"PTR\" wait 3ms\n    printer -> laptop mdns response qname \"laserjet-3f.local\" qtype \"A\" rdata \"192.168.10.90\" ansttl 120\n}","rejected":"host laptop { ip 10.0.0.1 }\nhost printer { ip 10.0.0.2 }\n\ncompile {\n    laptop -> printer mdns query qname \"_http._tcp.local\" transport tcp\n}","explanation":"RFC 6762 Multicast DNS operates exclusively over UDP `5353`; `mdns` is not on the 9-protocol `transport` whitelist."}
{"id":"dpo-pitfall-mdns-2","category":"protocol_pitfall","rule_id":"MDNS_P2","protocols":["mdns"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Multicast DNS Zero-Configuration Discovery (`mdns`) respecting: Use ansttl for Resource Record TTL vs ttl for IP Hop Limit.","chosen":"host laptop  { ip 192.168.10.42 }\nhost printer { ip 192.168.10.90 }\n\ncompile {\n    laptop -> printer mdns query qname \"_ipp._tcp.local\" qtype \"PTR\" wait 3ms\n    printer -> laptop mdns response qname \"laserjet-3f.local\" qtype \"A\" rdata \"192.168.10.90\" ansttl 120\n}","rejected":"host printer { ip 10.0.0.1 }\nhost laptop { ip 10.0.0.2 }\n\ncompile {\n    printer -> laptop mdns response rdata \"192.168.10.90\" ans_ttl 120\n}","explanation":"`ansttl 120` sets the mDNS resource record cache lifetime, while `ttl 255` sets the IPv4/IPv6 Hop Limit."}
{"id":"dpo-pitfall-dhcp-1","category":"protocol_pitfall","rule_id":"DHCP_P1","protocols":["dhcp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Dynamic Host Configuration Protocol — DHCPv4 & DHCPv6 (`dhcp`) respecting: Both Endpoints Still Require IP Literals (Use 0.0.0.0 for Unconfigured DHCPv4 Clients).","chosen":"host client_pc { ip 0.0.0.0 mac 00:1b:21:44:55:66 }\nhost dhcp_srv  { ip 10.10.10.1 mac 00:1b:21:00:00:01 }\n\ncompile {\n    client_pc -> dhcp_srv dhcp discover xid 0x3903f326 chaddr 00:1b:21:44:55:66 hostname \"eng-laptop-04\" wait 2ms\n    client_pc <- dhcp_srv dhcp offer xid 0x3903f326 yiaddr 10.10.10.150 siaddr 10.10.10.1 chaddr 00:1b:21:44:55:66 subnetmask 255.255.255.0 router 10.10.10.1 dnsserver 10.10.10.53 leasetime 86400\n}","rejected":"host client_pc { mac 00:1b:21:44:55:66 }\nhost dhcp_srv { ip 10.0.0.2 }\n\ncompile {\n    client_pc -> dhcp_srv dhcp discover\n}","explanation":"Because DHCP runs inside IPv4/UDP or IPv6/UDP, FrameAssembly requires an `ip` address on both hosts. Use `ip 0.0.0.0` (the standard RFC 2131 pre-lease source IP) on unconfigured IPv4 clients, or a `fe80::...` link-local address on IPv6 clients."}
{"id":"dpo-pitfall-dhcp-2","category":"protocol_pitfall","rule_id":"DHCP_P2","protocols":["dhcp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Dynamic Host Configuration Protocol — DHCPv4 & DHCPv6 (`dhcp`) respecting: Use ack (Not dhcp_ack) for DHCPACK Replies.","chosen":"host client_pc { ip 0.0.0.0 mac 00:1b:21:44:55:66 }\nhost dhcp_srv  { ip 10.10.10.1 mac 00:1b:21:00:00:01 }\n\ncompile {\n    client_pc -> dhcp_srv dhcp discover xid 0x3903f326 chaddr 00:1b:21:44:55:66 hostname \"eng-laptop-04\" wait 2ms\n    client_pc <- dhcp_srv dhcp offer xid 0x3903f326 yiaddr 10.10.10.150 siaddr 10.10.10.1 chaddr 00:1b:21:44:55:66 subnetmask 255.255.255.0 router 10.10.10.1 dnsserver 10.10.10.53 leasetime 86400\n}","rejected":"host client_pc { ip 10.0.0.1 }\nhost dhcp_srv { ip 10.0.0.2 }\n\ncompile {\n    client_pc <- dhcp_srv dhcp dhcp_ack xid 0x1234\n}","explanation":"On a `dhcp` line, `ack` sets DHCP Option 53 to `DHCPACK` (`5`) over UDP `67 -> 68` rather than a TCP flag."}
{"id":"dpo-pitfall-ntp-1","category":"protocol_pitfall","rule_id":"NTP_P1","protocols":["ntp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Network Time Protocol v1–v4 (`ntp`) respecting: Signed precision Accepts Negative Integers Directly (precision -20).","chosen":"host app_srv  { ip 10.10.20.40 }\nhost time_appliance { ip 10.10.20.123 }\n\ncompile {\n    app_srv -> time_appliance ntp vn 4 mode 3 poll 6 wait 2ms\n    app_srv <- time_appliance ntp li 0 vn 4 mode 4 stratum 1 poll 6 precision -20 refid \"GPS\" txtimestamp 0xe9b4c20000000000\n}","rejected":"host app_srv { ip 10.0.0.1 }\nhost time_appliance { ip 10.0.0.2 }\n\ncompile {\n    app_srv <- time_appliance ntp mode 4 precision \"-20\"\n}","explanation":"`precision` expects an unquoted signed 8-bit integer (`-20` represents $2^{-20} \\approx 0.95\\,\\mu\\text{s}$)."}
{"id":"dpo-pitfall-ptp-1","category":"protocol_pitfall","rule_id":"PTP_P1","protocols":["ptp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IEEE 1588 Precision Time Protocol v2 (`ptp`) respecting: Message Keywords Contain Zero Underscores (delayreq, followup, delayresp).","chosen":"host grandmaster { ip 10.60.1.1 }\nhost boundary_sw { ip 10.60.1.10 }\n\ncompile {\n    grandmaster -> boundary_sw ptp sync domain 0 seqid 100 clockid \"001c73fffe000001\" wait 200us\n    grandmaster -> boundary_sw ptp followup domain 0 seqid 100 clockid \"001c73fffe000001\"\n}","rejected":"host gm_clock { ip 10.0.0.1 }\nhost media_node { ip 10.0.0.2 }\n\ncompile {\n    gm_clock -> media_node ptp follow_up seqid 501\n}","explanation":"Spell PTPv2 message types without underscores: `sync`, `delayreq`, `followup`, `delayresp`, and `announce`."}
{"id":"dpo-pitfall-radius-1","category":"protocol_pitfall","rule_id":"RADIUS_P1","protocols":["radius"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Remote Authentication Dial-In User Service (Auth & Accounting) (`radius`) respecting: No Hyphens or Underscores in RADIUS Message Names.","chosen":"host access_sw { ip 10.20.0.10 }\nhost ise_node  { ip 10.20.0.50 }\n\ncompile {\n    access_sw -> ise_node radius accessrequest id 1 user \"corp\\\\jdoe\" nasip 10.20.0.10 servicetype 2 wait 3ms\n    access_sw <- ise_node radius accessaccept id 1 framedip 10.20.15.42\n}","rejected":"host access_sw { ip 10.0.0.1 }\nhost ise_node { ip 10.0.0.2 }\n\ncompile {\n    access_sw -> ise_node radius access_request user \"alice\"\n}","explanation":"Write RADIUS packet types as single lowercase words: `accessrequest`, `accessaccept`, `accessreject`, `accesschallenge`, `accountingrequest`, and `accountingresponse`."}
{"id":"dpo-pitfall-radius-2","category":"protocol_pitfall","rule_id":"RADIUS_P2","protocols":["radius"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Remote Authentication Dial-In User Service (Auth & Accounting) (`radius`) respecting: Escape Backslashes in Domain Usernames.","chosen":"host access_sw { ip 10.20.0.10 }\nhost ise_node  { ip 10.20.0.50 }\n\ncompile {\n    access_sw -> ise_node radius accessrequest id 1 user \"corp\\\\jdoe\" nasip 10.20.0.10 servicetype 2 wait 3ms\n    access_sw <- ise_node radius accessaccept id 1 framedip 10.20.15.42\n}","rejected":"host access_sw { ip 10.0.0.1 }\nhost ise_node { ip 10.0.0.2 }\n\ncompile {\n    access_sw -> ise_node radius accessrequest user \"CORP\\alice\" (single slash)\n}","explanation":"Inside double quotes, `\\\\` writes a single literal backslash (`CORP\\alice`) on the wire so `\t` or `\n` are not interpreted as control characters."}
{"id":"dpo-pitfall-tacacs-1","category":"protocol_pitfall","rule_id":"TACACS_P1","protocols":["tacacs"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Terminal Access Controller Access-Control System Plus (`tacacs`) respecting: Protocol Keyword Is tacacs (No Plus Sign).","chosen":"host core_rtr   { ip 10.10.0.1 }\nhost tacacs_srv { ip 10.10.0.49 }\n\ncompile {\n    core_rtr -> tacacs_srv tacacs authen seq 1 sessionid 0x8001 user \"netadmin\" data \"tty0\" wait 2ms\n    core_rtr <- tacacs_srv tacacs authen seq 2 sessionid 0x8001 data \"Password: \"\n}","rejected":"host core_rtr { ip 10.0.0.1 }\nhost tacacs_srv { ip 10.0.0.2 }\n\ncompile {\n    core_rtr -> tacacs_srv tacacs+ authen user \"admin\"\n}","explanation":"Built-in protocol names only use letters and digits (`a-z0-9`), so TACACS+ is written `tacacs`."}
{"id":"dpo-pitfall-tacacs-2","category":"protocol_pitfall","rule_id":"TACACS_P2","protocols":["tacacs"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Terminal Access Controller Access-Control System Plus (`tacacs`) respecting: seq Sets the 1-Byte TACACS+ Sequence Number.","chosen":"host core_rtr   { ip 10.10.0.1 }\nhost tacacs_srv { ip 10.10.0.49 }\n\ncompile {\n    core_rtr -> tacacs_srv tacacs authen seq 1 sessionid 0x8001 user \"netadmin\" data \"tty0\" wait 2ms\n    core_rtr <- tacacs_srv tacacs authen seq 2 sessionid 0x8001 data \"Password: \"\n}","rejected":"host core_rtr { ip 10.0.0.1 }\nhost tacacs_srv { ip 10.0.0.2 }\n\ncompile {\n    core_rtr -> tacacs_srv tacacs authen seq 1000\n}","explanation":"On `tacacs` packets, `seq` sets the 8-bit TACACS+ `seq_no` (`0..255`), while FrameAssembly advances the outer 32-bit TCP sequence number automatically."}
{"id":"dpo-pitfall-syslog-1","category":"protocol_pitfall","rule_id":"SYSLOG_P1","protocols":["syslog"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Syslog Event Logging over UDP or TCP (`syslog`) respecting: Facility Must Be 0..23 and Severity Must Be 0..7.","chosen":"host edge_fw   { ip 10.10.0.1 }\nhost siem_node { ip 10.10.50.10 }\n\ncompile {\n    edge_fw -> siem_node syslog facility 4 severity 4 hostname \"fw-dmz-01\" app \"sshd\" msg \"Failed password for invalid user admin from 198.51.100.77\"\n}","rejected":"host edge_fw { ip 10.0.0.1 }\nhost siem_node { ip 10.0.0.2 }\n\ncompile {\n    edge_fw -> siem_node syslog facility 30 severity 9\n}","explanation":"RFC 5424 defines facilities `0` through `23` and severities `0` through `7` (giving maximum priority `23 * 8 + 7 = 191`)."}
{"id":"dpo-pitfall-syslog-2","category":"protocol_pitfall","rule_id":"SYSLOG_P2","protocols":["syslog"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Syslog Event Logging over UDP or TCP (`syslog`) respecting: Use msg (Not message) for the Log Body.","chosen":"host edge_fw   { ip 10.10.0.1 }\nhost siem_node { ip 10.10.50.10 }\n\ncompile {\n    edge_fw -> siem_node syslog facility 4 severity 4 hostname \"fw-dmz-01\" app \"sshd\" msg \"Failed password for invalid user admin from 198.51.100.77\"\n}","rejected":"host edge_fw { ip 10.0.0.1 }\nhost siem_node { ip 10.0.0.2 }\n\ncompile {\n    edge_fw -> siem_node syslog message \"Interface Gi0/1 down\"\n}","explanation":"The log text option in `.frasm` is `msg \"<text>\"`."}
{"id":"dpo-pitfall-http-1","category":"protocol_pitfall","rule_id":"HTTP_P1","protocols":["http"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Hypertext Transfer Protocol HTTP/1.1 (`http`) respecting: Use hosthdr (Not host) for the HTTP Host Header.","chosen":"host client  { ip 10.10.1.20 }\nhost web_srv { ip 10.10.1.80 }\n\ncompile {\n    client -> web_srv tcp syn srcport 52100 dstport 80 wait 1ms\n    client <- web_srv tcp syn ack wait 1ms\n    client -> web_srv tcp ack wait 1ms\n    client -> web_srv http get uri \"/healthz\" hosthdr \"api.corp.internal\" useragent \"kube-probe/1.30\" wait 2ms\n    client <- web_srv http status 200 reason \"OK\" contenttype \"application/json\" body \"{\\\"status\\\":\\\"healthy\\\"}\"\n}","rejected":"host client { ip 10.0.0.1 }\nhost web_srv { ip 10.0.0.2 }\n\ncompile {\n    client -> web_srv http get uri \"/\" host \"api.example.com\"\n}","explanation":"Because `host` declares network endpoints at the top of a `.frasm` file, HTTP and SSDP use `hosthdr \"<text>\"` to set the `Host:` header."}
{"id":"dpo-pitfall-http2-2","category":"protocol_pitfall","rule_id":"HTTP2_P2","protocols":["http2"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Hypertext Transfer Protocol Version 2 Binary Framing (`http2`) respecting: No Hyphens or Underscores in windowupdate or goaway.","chosen":"host app_client { ip 10.20.1.10 }\nhost api_gw     { ip 10.20.1.44 }\n\ncompile {\n    app_client -> api_gw http2 preface dstport 8080 wait 1ms\n    app_client <- api_gw http2 settings wait 1ms\n    app_client -> api_gw http2 headers streamid 1 wait 1ms\n    app_client <- api_gw http2 data streamid 1 payload \"{\\\"ok\\\":true}\"\n}","rejected":"host app_client { ip 10.0.0.1 }\nhost api_gw { ip 10.0.0.2 }\n\ncompile {\n    app_client -> api_gw http2 window_update stream_id 1\n}","explanation":"Spell HTTP/2 keywords without underscores: `windowupdate`, `goaway`, and `streamid`."}
{"id":"dpo-pitfall-tls-2","category":"protocol_pitfall","rule_id":"TLS_P2","protocols":["tls"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Transport Layer Security Record & Handshake Layer (`tls`) respecting: No Underscores in clienthello, serverhello, or ciphersuite.","chosen":"host workstation { ip 10.10.5.20 }\nhost https_edge  { ip 198.51.100.44 }\n\ncompile {\n    workstation -> https_edge tcp syn srcport 53443 dstport 443 wait 1ms\n    workstation <- https_edge tcp syn ack wait 1ms\n    workstation -> https_edge tcp ack wait 1ms\n    workstation -> https_edge tls clienthello sni \"portal.corp.internal\" ciphersuite 0x1301 alpn \"h2\" wait 2ms\n    workstation <- https_edge tls serverhello ciphersuite 0x1301\n}","rejected":"host a { ip 10.0.0.1 }\nhost b { ip 10.0.0.2 }\n\ncompile {\n    a -> b tls client_hello cipher_suite 0x1301\n}","explanation":"Write `clienthello`, `serverhello`, `appdata`, `recordversion`, `handshakeversion`, and `ciphersuite` as single lowercase words."}
{"id":"dpo-pitfall-quic-1","category":"protocol_pitfall","rule_id":"QUIC_P1","protocols":["quic"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for QUIC v1 & v2 Encrypted UDP Transport (`quic`) respecting: 0-RTT Is Spelled zerortt (Letters Before Digits Pattern).","chosen":"host browser { ip 10.20.4.15 }\nhost cdn_vip { ip 198.51.100.44 }\n\ncompile {\n    browser -> cdn_vip quic initial version 1 dcid 0x1122334455667788 scid 0xaabbccddeeff0011 pktnum 1 wait 2ms\n    browser <- cdn_vip quic handshake version 1 dcid 0xaabbccddeeff0011 scid 0x1122334455667788 pktnum 1\n}","rejected":"host browser { ip 10.0.0.1 }\nhost cdn_vip { ip 10.0.0.2 }\n\ncompile {\n    browser -> cdn_vip quic 0rtt dcid 0x1234\n}","explanation":"Spell 0-RTT early-data packets as `zerortt` with no hyphen."}
{"id":"dpo-pitfall-quic-2","category":"protocol_pitfall","rule_id":"QUIC_P2","protocols":["quic"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for QUIC v1 & v2 Encrypted UDP Transport (`quic`) respecting: QUIC Runs Over UDP 443 (Do Not Add TCP Flags Like syn or ack).","chosen":"host browser { ip 10.20.4.15 }\nhost cdn_vip { ip 198.51.100.44 }\n\ncompile {\n    browser -> cdn_vip quic initial version 1 dcid 0x1122334455667788 scid 0xaabbccddeeff0011 pktnum 1 wait 2ms\n    browser <- cdn_vip quic handshake version 1 dcid 0xaabbccddeeff0011 scid 0x1122334455667788 pktnum 1\n}","rejected":"host browser { ip 10.0.0.1 }\nhost cdn_vip { ip 10.0.0.2 }\n\ncompile {\n    browser -> cdn_vip quic initial syn\n}","explanation":"QUIC handles reliability inside UDP datagrams rather than TCP, so TCP flags (`syn`, `ack`, `fin`) are rejected."}
{"id":"dpo-pitfall-tftp-2","category":"protocol_pitfall","rule_id":"TFTP_P2","protocols":["tftp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Trivial File Transfer Protocol (`tftp`) respecting: Quote Filenames Containing Dots, Slashes, or Hyphens.","chosen":"host voip_phone { ip 10.20.30.112 }\nhost tftp_srv   { ip 10.20.30.10 }\n\ncompile {\n    voip_phone -> tftp_srv tftp rrq filename \"SIPDefault.cnf\" mode \"octet\" wait 2ms\n    voip_phone <- tftp_srv tftp data block 1 payload \"[device]\\nproxy=10.20.30.5\\n\" wait 1ms\n    voip_phone -> tftp_srv tftp ack block 1\n}","rejected":"host voip_phone { ip 10.0.0.1 }\nhost tftp_srv { ip 10.0.0.2 }\n\ncompile {\n    voip_phone -> tftp_srv tftp rrq filename router-confg.cfg\n}","explanation":"Always wrap file paths and names in double quotes (`\"router-confg.cfg\"`)."}
{"id":"dpo-pitfall-sip-2","category":"protocol_pitfall","rule_id":"SIP_P2","protocols":["sip"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Session Initiation Protocol VoIP Signaling (`sip`) respecting: No Hyphens in callid or contenttype Keyword Names.","chosen":"host desk_phone { ip 10.30.20.101 }\nhost corp_pbx   { ip 10.30.20.10 }\n\ncompile {\n    desk_phone -> corp_pbx sip invite uri \"sip:1002@pbx.internal\" from \"sip:1001@pbx.internal\" to \"sip:1002@pbx.internal\" callid \"call-401\" cseq 1 wait 2ms\n    desk_phone <- corp_pbx sip status 180 reason \"Ringing\" callid \"call-401\" cseq 1 wait 10ms\n    desk_phone <- corp_pbx sip status 200 reason \"OK\" callid \"call-401\" cseq 1 wait 2ms\n    desk_phone -> corp_pbx sip ack uri \"sip:1002@pbx.internal\" callid \"call-401\" cseq 1\n}","rejected":"host phone_a { ip 10.0.0.1 }\nhost sbc_01 { ip 10.0.0.2 }\n\ncompile {\n    phone_a -> sbc_01 sip invite call_id \"123\" content_type \"application/sdp\"\n}","explanation":"Spell SIP modifiers without hyphens or underscores: `callid` and `contenttype`."}
{"id":"dpo-pitfall-rtsp-1","category":"protocol_pitfall","rule_id":"RTSP_P1","protocols":["rtsp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Real Time Streaming Protocol IP Camera & Media Control (`rtsp`) respecting: Always Use transporthdr (Never transport) for the RTSP Transport Header.","chosen":"host nvr_srv { ip 10.50.10.10 }\nhost ip_cam  { ip 10.50.20.45 }\n\ncompile {\n    nvr_srv -> ip_cam rtsp options uri \"rtsp://10.50.20.45:554/stream1\" cseq 1 wait 2ms\n    nvr_srv <- ip_cam rtsp status 200 cseq 1 wait 2ms\n    nvr_srv -> ip_cam rtsp setup uri \"rtsp://10.50.20.45:554/stream1/track1\" cseq 2 transporthdr \"RTP/AVP;unicast;client_port=5004-5005\"\n}","rejected":"host nvr_srv { ip 10.0.0.1 }\nhost ip_cam { ip 10.0.0.2 }\n\ncompile {\n    nvr_srv -> ip_cam rtsp setup transport \"RTP/AVP;unicast;client_port=5004-5005\"\n}","explanation":"In FrameAssembly, `transport` is reserved for switching Layer 4 TCP/UDP on dual-transport protocols. RTSP runs over TCP `554` and uses `transporthdr` for the `Transport:` header."}
{"id":"dpo-pitfall-stun-1","category":"protocol_pitfall","rule_id":"STUN_P1","protocols":["stun"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Session Traversal Utilities for NAT (`stun`) respecting: No Hyphens or Underscores in xormappedaddr or bindingrequest.","chosen":"host webrtc_tab { ip 10.10.20.45 }\nhost stun_srv   { ip 198.51.100.34 }\n\ncompile {\n    webrtc_tab -> stun_srv stun bindingrequest txid 0x10203040 software \"webrtc-client\" wait 3ms\n    webrtc_tab <- stun_srv stun bindingresponse txid 0x10203040 xormappedaddr 203.0.113.88\n}","rejected":"host webrtc_tab { ip 10.0.0.1 }\nhost stun_srv { ip 10.0.0.2 }\n\ncompile {\n    webrtc_tab <- stun_srv stun binding_response xor_mapped_addr 203.0.113.88\n}","explanation":"Spell STUN keywords in strict lowercase without underscores: `bindingrequest`, `bindingresponse`, `bindingerror`, and `xormappedaddr`."}
{"id":"dpo-pitfall-ssdp-1","category":"protocol_pitfall","rule_id":"SSDP_P1","protocols":["ssdp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Simple Service Discovery Protocol & UPnP Multicast (`ssdp`) respecting: Use msearch (No Hyphen) and hosthdr (Not host).","chosen":"host laptop    { ip 10.10.20.42 }\nhost ssdp_mcast { ip 239.255.255.250 }\n\ncompile {\n    laptop -> ssdp_mcast ssdp msearch hosthdr \"239.255.255.250:1900\" mx 3 st \"ssdp:all\"\n}","rejected":"host laptop { ip 10.0.0.1 }\nhost ssdp_mcast { ip 10.0.0.2 }\n\ncompile {\n    laptop -> ssdp_mcast ssdp m-search host \"239.255.255.250:1900\"\n}","explanation":"Spell `msearch` without a hyphen and use `hosthdr` for the `HOST:` header."}
{"id":"dpo-pitfall-gtpc-1","category":"protocol_pitfall","rule_id":"GTPC_P1","protocols":["gtpc"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for GPRS Tunneling Protocol v2 Control Plane (4G S11 / S5-C) (`gtpc`) respecting: Use gtpc (UDP 2123) for Control Signaling and gtpu (UDP 2152) for User Data.","chosen":"host mme_s11 { ip 10.200.11.10 }\nhost sgw_s11 { ip 10.200.11.20 }\n\ncompile {\n    mme_s11 -> sgw_s11 gtpc createsessionrequest teid 0x00000000 seqnum 101 imsi \"001010123456789\" apn \"internet\" rat 6 wait 4ms\n    mme_s11 <- sgw_s11 gtpc createsessionresponse teid 0x10012002 seqnum 101 cause 16 addr 100.64.10.25\n}","rejected":"host mme { ip 10.0.0.1 }\nhost sgw { ip 10.0.0.2 }\n\ncompile {\n    mme -> sgw gtpu createsessionrequest teid 0x100 imsi \"001010123456789\"\n}","explanation":"GTPv2-C (`gtpc`, UDP `2123`) negotiates control-plane tunnels and TEIDs, whereas GTPv1-U (`gtpu`, UDP `2152`) encapsulates subscriber user-plane IP packets (`gpdu`)."}
{"id":"dpo-pitfall-gtpc-2","category":"protocol_pitfall","rule_id":"GTPC_P2","protocols":["gtpc"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for GPRS Tunneling Protocol v2 Control Plane (4G S11 / S5-C) (`gtpc`) respecting: Quote 15-Digit IMSI Values That Begin with Leading Zeros.","chosen":"host mme_s11 { ip 10.200.11.10 }\nhost sgw_s11 { ip 10.200.11.20 }\n\ncompile {\n    mme_s11 -> sgw_s11 gtpc createsessionrequest teid 0x00000000 seqnum 101 imsi \"001010123456789\" apn \"internet\" rat 6 wait 4ms\n    mme_s11 <- sgw_s11 gtpc createsessionresponse teid 0x10012002 seqnum 101 cause 16 addr 100.64.10.25\n}","rejected":"host mme { ip 10.0.0.1 }\nhost sgw { ip 10.0.0.2 }\n\ncompile {\n    mme -> sgw gtpc createsessionrequest imsi 001010123456789\n}","explanation":"Test PLMN IMSIs (`00101...`) start with leading zeros that an unquoted integer would strip; pass `imsi` as a double-quoted string so all 15 TBCD digits are preserved."}
{"id":"dpo-pitfall-pfcp-1","category":"protocol_pitfall","rule_id":"PFCP_P1","protocols":["pfcp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Packet Forwarding Control Protocol (5G N4 / 4G Sxa-Sxb CUPS) (`pfcp`) respecting: PFCP Accepted Cause Code Is 1 (Unlike GTPv2-C Cause 16).","chosen":"host smf_n4 { ip 10.55.4.10 }\nhost upf_n4 { ip 10.55.4.20 }\n\ncompile {\n    smf_n4 -> upf_n4 pfcp sessionestablishmentrequest seid 0x0000000000001001 seqnum 1 nodeid 10.55.4.10 wait 3ms\n    smf_n4 <- upf_n4 pfcp sessionestablishmentresponse seid 0x0000000000002001 seqnum 1 nodeid 10.55.4.20 cause 1\n}","rejected":"host smf { ip 10.0.0.1 }\nhost upf { ip 10.0.0.2 }\n\ncompile {\n    smf <- upf pfcp sessionestablishmentresponse seid 0x10 seqnum 1 cause 16\n}","explanation":"In 3GPP TS 29.244 PFCP, `cause 1` means `Request accepted` (whereas `16` is GTPv2-C’s accepted code in TS 29.274)."}
{"id":"dpo-pitfall-diameter-1","category":"protocol_pitfall","rule_id":"DIAMETER_P1","protocols":["diameter"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Diameter Base, Credit-Control & 3GPP S6a/Gx/Gy AAA Signaling (`diameter`) respecting: Diameter Uses TCP or SCTP Only (Never transport udp).","chosen":"host mme_s6a { ip 10.88.6.10 }\nhost hss_s6a { ip 10.88.6.20 }\n\ncompile {\n    mme_s6a -> hss_s6a diameter cer hopid 0x1001 endid 0x2001 originhost \"mme01.epc.internal\" realm \"epc.internal\" transport sctp wait 3ms\n    mme_s6a <- hss_s6a diameter cea hopid 0x1001 endid 0x2001 originhost \"hss01.epc.internal\" realm \"epc.internal\" resultcode 2001 transport sctp\n}","rejected":"host mme { ip 10.0.0.1 }\nhost hss { ip 10.0.0.2 }\n\ncompile {\n    mme -> hss diameter cer originhost \"mme.epc\" realm \"epc\" transport udp\n}","explanation":"RFC 6733 specifies reliable stream/message transports (`TCP` default or `transport sctp`, never connectionless UDP like legacy RADIUS)."}
{"id":"dpo-pitfall-ngap-1","category":"protocol_pitfall","rule_id":"NGAP_P1","protocols":["ngap"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for 5G Next Generation Application Protocol (N2 gNB <-> AMF over SCTP) (`ngap`) respecting: ngap Is Strictly SCTP-Only (Do Not Add transport tcp or transport udp).","chosen":"host gnb_01   { ip 10.52.2.11 }\nhost amf_core { ip 10.52.2.100 }\n\ncompile {\n    gnb_01 -> amf_core ngap ngsetuprequest gnbid 0x000101 plmn \"00101\" tac 1 ranname \"gnb-cell-01\" wait 4ms\n    gnb_01 <- amf_core ngap ngsetupresponse plmn \"00101\" ranname \"amf-region01\"\n}","rejected":"host gnb { ip 10.0.0.1 }\nhost amf { ip 10.0.0.2 }\n\ncompile {\n    gnb -> amf ngap ngsetuprequest transport tcp\n}","explanation":"3GPP TS 38.412 mandates SCTP (`38412`, `PPID 60`) for N2; `validate_semantics` rejects `transport tcp` and `transport udp` on `ngap` at compile time."}
{"id":"dpo-pitfall-ngap-2","category":"protocol_pitfall","rule_id":"NGAP_P2","protocols":["ngap"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for 5G Next Generation Application Protocol (N2 gNB <-> AMF over SCTP) (`ngap`) respecting: Pass naspdu as Valid Hex Octets.","chosen":"host gnb_01   { ip 10.52.2.11 }\nhost amf_core { ip 10.52.2.100 }\n\ncompile {\n    gnb_01 -> amf_core ngap ngsetuprequest gnbid 0x000101 plmn \"00101\" tac 1 ranname \"gnb-cell-01\" wait 4ms\n    gnb_01 <- amf_core ngap ngsetupresponse plmn \"00101\" ranname \"amf-region01\"\n}","rejected":"host gnb { ip 10.0.0.1 }\nhost amf { ip 10.0.0.2 }\n\ncompile {\n    gnb -> amf ngap initialuemessage naspdu \"registration-req\"\n}","explanation":"`naspdu` expects hexadecimal bytes (`\"7e0041\"` or `\"7e:00:41\"`) representing binary 3GPP TS 24.501 5G-NAS PDUs."}
{"id":"dpo-pitfall-s1ap-1","category":"protocol_pitfall","rule_id":"S1AP_P1","protocols":["s1ap"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for 4G LTE S1 Application Protocol (S1-MME eNB <-> MME over SCTP) (`s1ap`) respecting: 4G S1AP TAC Is 16-Bit (0..65535), Unlike 5G NGAP 24-Bit TAC.","chosen":"host enb_01  { ip 10.44.1.11 }\nhost mme_epc { ip 10.44.1.100 }\n\ncompile {\n    enb_01 -> mme_epc s1ap s1setuprequest enbid 0x001a2 plmn \"00101\" tac 10 enbname \"enb-macro-01\" wait 4ms\n    enb_01 <- mme_epc s1ap s1setupresponse plmn \"00101\" enbname \"mme-epc-01\"\n}","rejected":"host enb { ip 10.0.0.1 }\nhost mme { ip 10.0.0.2 }\n\ncompile {\n    enb -> mme s1ap s1setuprequest tac 100000\n}","explanation":"In 4G LTE (`3GPP TS 36.413`), `TAC` is a 2-octet `OCTET STRING (SIZE(2))` (`0..=65535`), whereas 5G NR (`ngap`) widened `TAC` to 3 octets (`0..=16777215`)."}
{"id":"dpo-pitfall-s1ap-2","category":"protocol_pitfall","rule_id":"S1AP_P2","protocols":["s1ap"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for 4G LTE S1 Application Protocol (S1-MME eNB <-> MME over SCTP) (`s1ap`) respecting: s1ap Is Strictly SCTP-Only (SCTP 36412, PPID 18).","chosen":"host enb_01  { ip 10.44.1.11 }\nhost mme_epc { ip 10.44.1.100 }\n\ncompile {\n    enb_01 -> mme_epc s1ap s1setuprequest enbid 0x001a2 plmn \"00101\" tac 10 enbname \"enb-macro-01\" wait 4ms\n    enb_01 <- mme_epc s1ap s1setupresponse plmn \"00101\" enbname \"mme-epc-01\"\n}","rejected":"host enb { ip 10.0.0.1 }\nhost mme { ip 10.0.0.2 }\n\ncompile {\n    enb -> mme s1ap initialuemessage transport udp\n}","explanation":"3GPP TS 36.412 mandates SCTP for S1-MME; `validate_semantics` rejects `transport tcp` and `transport udp` on `s1ap`."}
{"id":"dpo-pitfall-smtp-1","category":"protocol_pitfall","rule_id":"SMTP_P1","protocols":["smtp"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Simple Mail Transfer Protocol (`smtp`) respecting: No Spaces or Underscores in mailfrom and rcptto.","chosen":"host app_srv { ip 10.20.10.15 }\nhost mail_gw { ip 10.20.10.25 }\n\ncompile {\n    app_srv -> mail_gw tcp syn srcport 51025 dstport 25 wait 1ms\n    app_srv <- mail_gw tcp syn ack wait 1ms\n    app_srv -> mail_gw tcp ack wait 1ms\n    app_srv <- mail_gw smtp code 220 reply \"mx01.corp.internal ESMTP Postfix\" wait 2ms\n    app_srv -> mail_gw smtp ehlo \"app01.corp.internal\" wait 2ms\n    app_srv <- mail_gw smtp code 250 reply \"mx01.corp.internal\"\n}","rejected":"host alert_bot { ip 10.0.0.1 }\nhost smtp_relay { ip 10.0.0.2 }\n\ncompile {\n    alert_bot -> smtp_relay smtp mail_from \"<a@b>\" rcpt_to \"<c@d>\"\n}","explanation":"Send `mailfrom` and `rcptto` on separate packet lines (one SMTP command per packet, spelled with zero underscores)."}
{"id":"dpo-pitfall-pop3-1","category":"protocol_pitfall","rule_id":"POP3_P1","protocols":["pop3"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Post Office Protocol Version 3 (`pop3`) respecting: Do Not Include + or - in ok / err Keywords.","chosen":"host client   { ip 10.20.16.25 }\nhost pop3_srv { ip 10.20.16.110 }\n\ncompile {\n    client -> pop3_srv tcp syn srcport 51110 dstport 110 wait 1ms\n    client <- pop3_srv tcp syn ack wait 1ms\n    client -> pop3_srv tcp ack wait 1ms\n    client <- pop3_srv pop3 ok response \"POP3 server ready\" wait 2ms\n    client -> pop3_srv pop3 cmd \"STAT\" wait 2ms\n    client <- pop3_srv pop3 ok response \"2 320\"\n}","rejected":"host client { ip 10.0.0.1 }\nhost pop3_srv { ip 10.0.0.2 }\n\ncompile {\n    client <- pop3_srv pop3 +ok response \"Ready\"\n}","explanation":"Write `ok` or `err` without `+` or `-`; FrameAssembly writes `+OK` and `-ERR` on the wire automatically."}
{"id":"dpo-pitfall-kerberos-1","category":"protocol_pitfall","rule_id":"KERBEROS_P1","protocols":["kerberos"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Kerberos Network Authentication Service v5 (Active Directory) (`kerberos`) respecting: No Hyphens in asreq, asrep, tgsreq, tgsrep, or krberror.","chosen":"host domain_pc { ip 10.10.20.45 }\nhost ad_dc01   { ip 10.10.0.10 }\n\ncompile {\n    domain_pc -> ad_dc01 kerberos asreq realm \"CORP.INTERNAL\" cname \"jdoe\" sname \"krbtgt/CORP.INTERNAL\" etype 18 wait 2ms\n    domain_pc <- ad_dc01 kerberos asrep realm \"CORP.INTERNAL\" cname \"jdoe\" etype 18\n}","rejected":"host domain_pc { ip 10.0.0.1 }\nhost ad_dc01 { ip 10.0.0.2 }\n\ncompile {\n    domain_pc -> ad_dc01 kerberos tgs-req etype 23\n}","explanation":"Write Kerberos message types as single lowercase words without hyphens."}
{"id":"dpo-pitfall-rocev2-1","category":"protocol_pitfall","rule_id":"ROCEV2_P1","protocols":["rocev2"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for RDMA over Converged Ethernet v2 (InfiniBand Annex A17) (`rocev2`) respecting: destqp and seqnum (PSN) Are 24-Bit Fields (0..16777215).","chosen":"host gpu_node_01 { ip 10.90.3.11 }\nhost gpu_node_02 { ip 10.90.3.12 }\n\ncompile {\n    gpu_node_01 -> gpu_node_02 rocev2 write pkey 0xffff destqp 0x000104 ackreq seqnum 1000 addr 0x7f8000100000 key 0xa1b2c3d4 count 4096 dscp 26 ecn 2 payload \"NCCL-ALLREDUCE-SHARD\" wait 50us\n    gpu_node_01 <- gpu_node_02 rocev2 opcode \"ack\" pkey 0xffff destqp 0x000103 seqnum 1000 status 0x00 msgid 1 dscp 26 ecn 2\n}","rejected":"host n1 { ip 10.0.0.1 }\nhost n2 { ip 10.0.0.2 }\n\ncompile {\n    n1 -> n2 rocev2 write destqp 0x01000000 seqnum 1\n}","explanation":"InfiniBand BTH reserves the upper byte before both `Destination QP` and `PSN` (`A`-bit + reserved bits), capping `destqp` and `seqnum` at `0xffffff` (`16,777,215`)."}
{"id":"dpo-pitfall-ethernetip-1","category":"protocol_pitfall","rule_id":"ETHERNETIP_P1","protocols":["ethernetip"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for ODVA EtherNet/IP & Common Industrial Protocol (Rockwell) (`ethernetip`) respecting: Protocol Keyword Is ethernetip (No Slash).","chosen":"host factory_hmi { ip 192.168.20.10 }\nhost logix_plc   { ip 192.168.20.55 }\n\ncompile {\n    factory_hmi -> logix_plc tcp syn srcport 54818 dstport 44818 wait 1ms\n    factory_hmi <- logix_plc tcp syn ack wait 1ms\n    factory_hmi -> logix_plc tcp ack wait 1ms\n    factory_hmi -> logix_plc ethernetip registersession wait 2ms\n    factory_hmi <- logix_plc ethernetip registersession sessionhandle 0x00010001 wait 2ms\n    factory_hmi -> logix_plc ethernetip sendrrdata sessionhandle 0x00010001 cipservice 0x0e cipclass 0x01 cipinstance 1 cipattr 7\n}","rejected":"host factory_hmi { ip 10.0.0.1 }\nhost logix_plc { ip 10.0.0.2 }\n\ncompile {\n    factory_hmi -> logix_plc ethernet/ip listidentity\n}","explanation":"Spell ODVA EtherNet/IP as `ethernetip` with no slash or hyphen."}
{"id":"dpo-pitfall-opcua-1","category":"protocol_pitfall","rule_id":"OPCUA_P1","protocols":["opcua"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for OPC Unified Architecture Binary TCP Protocol (`opcua`) respecting: Keep msgtype and chunktype Uppercase Inside Quotes (\"HEL\", \"F\").","chosen":"host historian { ip 10.130.35.10 }\nhost ua_server { ip 10.130.20.48 }\n\ncompile {\n    historian -> ua_server tcp syn srcport 54840 dstport 4840 wait 1ms\n    historian <- ua_server tcp syn ack wait 1ms\n    historian -> ua_server tcp ack wait 1ms\n    historian -> ua_server opcua msgtype \"HEL\" chunktype \"F\" endpointurl \"opc.tcp://10.130.20.48:4840\" wait 2ms\n    historian <- ua_server opcua msgtype \"ACK\" chunktype \"F\"\n}","rejected":"host historian { ip 10.0.0.1 }\nhost ua_server { ip 10.0.0.2 }\n\ncompile {\n    historian -> ua_server opcua hel\n}","explanation":"OPC UA specifies message types via `msgtype \"<3_CHARS>\"` (`\"HEL\"`, `\"ACK\"`, `\"OPN\"`, `\"MSG\"`, `\"CLO\"`, `\"ERR\"`) rather than bare keywords."}
{"id":"dpo-pitfall-iec104-1","category":"protocol_pitfall","rule_id":"IEC104_P1","protocols":["iec104"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IEC 60870-5-104 Substation Telecontrol Over TCP/IP (`iec104`) respecting: Combine startdt/testfr with confirm (Not response) for U-Frame Confirmations.","chosen":"host scada_cc { ip 10.104.1.10 }\nhost sub_rtu  { ip 10.104.2.50 }\n\ncompile {\n    scada_cc -> sub_rtu tcp syn srcport 52404 dstport 2404 wait 1ms\n    scada_cc <- sub_rtu tcp syn ack wait 1ms\n    scada_cc -> sub_rtu tcp ack wait 1ms\n    scada_cc -> sub_rtu iec104 startdt wait 2ms\n    scada_cc <- sub_rtu iec104 startdt confirm wait 5ms\n    scada_cc <- sub_rtu iec104 txseq 0 rxseq 0 typeid 13 cot 3 ca 1 ioa 1001 real 49.98\n}","rejected":"host cc { ip 10.0.0.1 }\nhost rtu { ip 10.0.0.2 }\n\ncompile {\n    cc <- rtu iec104 startdt response\n}","explanation":"IEC 60870-5-104 U-Frames pair Activation (`act`) with Confirmation (`con`, enabled via the `confirm` flag keyword)."}
{"id":"dpo-pitfall-iec104-2","category":"protocol_pitfall","rule_id":"IEC104_P2","protocols":["iec104"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for IEC 60870-5-104 Substation Telecontrol Over TCP/IP (`iec104`) respecting: Do Not Include typeid/ioa on Pure U-Frames If You Want a 6-Byte APCI Packet.","chosen":"host scada_cc { ip 10.104.1.10 }\nhost sub_rtu  { ip 10.104.2.50 }\n\ncompile {\n    scada_cc -> sub_rtu tcp syn srcport 52404 dstport 2404 wait 1ms\n    scada_cc <- sub_rtu tcp syn ack wait 1ms\n    scada_cc -> sub_rtu tcp ack wait 1ms\n    scada_cc -> sub_rtu iec104 startdt wait 2ms\n    scada_cc <- sub_rtu iec104 startdt confirm wait 5ms\n    scada_cc <- sub_rtu iec104 txseq 0 rxseq 0 typeid 13 cot 3 ca 1 ioa 1001 real 49.98\n}","rejected":"host cc { ip 10.0.0.1 }\nhost rtu { ip 10.0.0.2 }\n\ncompile {\n    cc -> rtu iec104 startdt ca 1 ioa 1001 real 49.98\n}","explanation":"Real substations exchange 6-byte U-Frame `STARTDT act` / `STARTDT con` packets first before transmitting ASDU I-Frames (`ca`, `ioa`, `real`)."}
{"id":"dpo-pitfall-someip-1","category":"protocol_pitfall","rule_id":"SOMEIP_P1","protocols":["someip"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Scalable service-Oriented MiddlewarE over IP & Service Discovery (`someip`) respecting: Use sdservice (Not serviceid) for the Offered Service Inside SOME/IP-SD.","chosen":"host adas_ecu  { ip 192.168.10.20 }\nhost zonal_gw  { ip 192.168.10.1 }\n\ncompile {\n    adas_ecu -> zonal_gw someip offerservice sessionid 1 sdservice 0x1234 instanceid 1 majorver 1 sdttl 3 endpointip 192.168.10.20 endpointport 30509 wait 5ms\n    zonal_gw -> adas_ecu someip request dstport 30509 serviceid 0x1234 methodid 0x0001 clientid 0x0010 sessionid 1 payload \"GET-RADAR-TRACKS\" wait 2ms\n    zonal_gw <- adas_ecu someip response serviceid 0x1234 methodid 0x0001 clientid 0x0010 sessionid 1 returncode 0 payload \"TRACKS-OK\"\n}","rejected":"host ecu { ip 10.0.0.1 }\nhost gw { ip 10.0.0.2 }\n\ncompile {\n    ecu -> gw someip offerservice serviceid 0x2100\n}","explanation":"SOME/IP-SD frames must keep outer `serviceid = 0xffff` and `methodid = 0x8100` so Wireshark dissects them as `SOME/IP-SD`; `sdservice` sets the offered Service ID *inside* the SD Entry."}
{"id":"dpo-pitfall-c1222-1","category":"protocol_pitfall","rule_id":"C1222_P1","protocols":["c1222"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for ANSI C12.22 / IEEE 1703 Smart-Meter Utility AMI Application Protocol (`c1222`) respecting: Pass Valid Dotted Numeric OIDs (At Least 2 Arcs) to callingap / calledap.","chosen":"host ami_headend { ip 10.115.1.10 }\nhost smart_meter { ip 10.115.20.45 }\n\ncompile {\n    ami_headend -> smart_meter c1222 read callingap 1.3.6.1.4.1.9999.1 calledap 1.3.6.1.4.1.9999.45 callingid 1 tableid 1 wait 5ms\n    ami_headend <- smart_meter c1222 response callingap 1.3.6.1.4.1.9999.45 calledap 1.3.6.1.4.1.9999.1 callingid 1 value 4820\n}","rejected":"host headend { ip 10.0.0.1 }\nhost meter { ip 10.0.0.2 }\n\ncompile {\n    headend -> meter c1222 read callingap \"meter01\"\n}","explanation":"ANSI C12.22 `ApTitle` fields are ASN.1 BER `OBJECT IDENTIFIER` values (`1.3.6.1...` or `2.16.124...`), not free-form hostnames."}
{"id":"dpo-pitfall-rocplus-2","category":"protocol_pitfall","rule_id":"ROCPLUS_P2","protocols":["rocplus"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Emerson Fisher ROC Plus Oil & Gas Pipeline RTU Protocol (`rocplus`) respecting: ROC Plus Addresses (dst, group, src, type, addr, param) Are 8-Bit (0..255).","chosen":"host cygnet_host { ip 10.40.1.10 }\nhost roc800_rtu  { ip 10.40.20.1 }\n\ncompile {\n    cygnet_host -> roc800_rtu tcp syn srcport 54000 dstport 4000 wait 1ms\n    cygnet_host <- roc800_rtu tcp syn ack wait 1ms\n    cygnet_host -> roc800_rtu tcp ack wait 1ms\n    cygnet_host -> roc800_rtu rocplus read dst 1 group 2 src 3 type 3 addr 0 param 14 wait 5ms\n    cygnet_host <- roc800_rtu rocplus read isresponse dst 3 group 0 src 1 type 3 addr 0 param 14 value 850\n}","rejected":"host host_scada { ip 10.0.0.1 }\nhost rtu { ip 10.0.0.2 }\n\ncompile {\n    host_scada -> rtu rocplus read dst 300\n}","explanation":"ROC unit/group and TLP coordinates are single octets (`0..=255`); combine `dst` (`Unit`) and `group` (`Group`) to address up to 65,000 RTUs."}
{"id":"dpo-pitfall-bsap-2","category":"protocol_pitfall","rule_id":"BSAP_P2","protocols":["bsap"],"version":"3.3.0","license":"MIT","prompt":"Write a valid FrameAssembly v3.3.0 (.frasm) capture for Emerson / Bristol Babcock Synchronous Asynchronous Protocol (BSAP/IP) (`bsap`) respecting: Keep seqnum Within 8-Bit Bounds (0..255).","chosen":"host openbsi_srv { ip 10.123.1.10 }\nhost cw_rtu_10   { ip 10.123.4.10 }\n\ncompile {\n    openbsi_srv -> cw_rtu_10 bsap read dst 10 src 1 seqnum 1 addr 100 count 2 wait 5ms\n    openbsi_srv <- cw_rtu_10 bsap read isresponse dst 1 src 10 seqnum 1 addr 100 value 420\n}","rejected":"host scada { ip 10.0.0.1 }\nhost rtu { ip 10.0.0.2 }\n\ncompile {\n    scada -> rtu bsap poll seqnum 1000\n}","explanation":"BSAP sequence numbers are 1 octet wide (`0..=255`) and wrap modulo 256."}
