{"id":"sft-cookbook-ex-l2-mac-only-lldp-rstp-lacp","task_type":"nl_to_frasm","protocols":["lldp","stp","lacp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"MAC-Only Switch Control-Plane Bundle (LLDP + RSTP + LACP)\" (switch_l2_control_plane.frasm). Scenario: Pure Layer 2 switching protocols do not require IP addresses on endpoints. This capture declares Cisco dot-quad MAC-only hosts and emits IEEE group-MAC LLDP, Rapid STP, and LACP frames on a trunk. Verify with Wireshark filter `lldp || stp || slow`.","completion":"Automatically populates IEEE slow/bridge multicast destination MACs (01:80:c2:00:00:0e, 01:80:c2:00:00:00, and 01:80:c2:00:00:02). Compile with `frameassembly switch_l2_control_plane.frasm`.\n\n```frameassembly\nhost leaf_sw1  { mac 001c.73aa.0001 }\nhost spine_sw1 { mac 001c.73bb.0001 }\n\ncompile {\n    leaf_sw1 -> spine_sw1 lldp chassisid \"leaf-sw1\" portid \"Ethernet49/1\" ttl 120 sysname \"leaf-sw1.dc1\" wait 2ms\n    spine_sw1 -> leaf_sw1 stp rstp rootid \"32768:00:1c:73:bb:00:01\" bridgeid \"32768:00:1c:73:bb:00:01\" portid 0x8001 cost 2000 hellotime 2 wait 2ms\n    leaf_sw1 -> spine_sw1 lacp actorsys 00:1c:73:aa:00:01 actorkey 10 actorport 49 partnersys 00:1c:73:bb:00:01 partnerkey 10 partnerport 1\n}\n```","frasm_code":"host leaf_sw1  { mac 001c.73aa.0001 }\nhost spine_sw1 { mac 001c.73bb.0001 }\n\ncompile {\n    leaf_sw1 -> spine_sw1 lldp chassisid \"leaf-sw1\" portid \"Ethernet49/1\" ttl 120 sysname \"leaf-sw1.dc1\" wait 2ms\n    spine_sw1 -> leaf_sw1 stp rstp rootid \"32768:00:1c:73:bb:00:01\" bridgeid \"32768:00:1c:73:bb:00:01\" portid 0x8001 cost 2000 hellotime 2 wait 2ms\n    leaf_sw1 -> spine_sw1 lacp actorsys 00:1c:73:aa:00:01 actorkey 10 actorport 49 partnersys 00:1c:73:bb:00:01 partnerkey 10 partnerport 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"MAC-Only Switch Control-Plane Bundle (LLDP + RSTP + LACP)\" (switch_l2_control_plane.frasm). Scenario: Pure Layer 2 switching protocols do not require IP addresses on endpoints. This capture declares Cisco dot-quad MAC-only hosts and emits IEEE group-MAC LLDP, Rapid STP, and LACP frames on a trunk. Verify with Wireshark filter `lldp || stp || slow`."},{"role":"assistant","content":"Automatically populates IEEE slow/bridge multicast destination MACs (01:80:c2:00:00:0e, 01:80:c2:00:00:00, and 01:80:c2:00:00:02). Compile with `frameassembly switch_l2_control_plane.frasm`.\n\n```frameassembly\nhost leaf_sw1  { mac 001c.73aa.0001 }\nhost spine_sw1 { mac 001c.73bb.0001 }\n\ncompile {\n    leaf_sw1 -> spine_sw1 lldp chassisid \"leaf-sw1\" portid \"Ethernet49/1\" ttl 120 sysname \"leaf-sw1.dc1\" wait 2ms\n    spine_sw1 -> leaf_sw1 stp rstp rootid \"32768:00:1c:73:bb:00:01\" bridgeid \"32768:00:1c:73:bb:00:01\" portid 0x8001 cost 2000 hellotime 2 wait 2ms\n    leaf_sw1 -> spine_sw1 lacp actorsys 00:1c:73:aa:00:01 actorkey 10 actorport 49 partnersys 00:1c:73:bb:00:01 partnerkey 10 partnerport 1\n}\n```"}]}
{"id":"sft-cookbook-ex-l2-eapol-8021x-onboarding","task_type":"nl_to_frasm","protocols":["eapol"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IEEE 802.1X Supplicant Onboarding (EAPOL-Start, Identity & Key)\" (nac_8021x_eapol_exchange.frasm). Scenario: Models a wired workstation authenticating to a NAC-enabled access switch over EtherType 0x888e before receiving an IP lease. Verify with Wireshark filter `eapol || eap`.","completion":"Targets PAE multicast MAC 01:80:c2:00:00:03 on supplicant frames and steps through EAP-Request/Response Identity (eapmethod 1) and EAP-Success (eapcode 3). Compile with `frameassembly nac_8021x_eapol_exchange.frasm`.\n\n```frameassembly\nhost corp_laptop { mac 00:24:9b:11:22:33 }\nhost access_sw   { mac 00:1c:73:00:10:01 }\n\ncompile {\n    corp_laptop -> access_sw eapol version 2 start wait 3ms\n    corp_laptop <- access_sw eapol version 2 eappacket eapcode 1 eapid 1 eapmethod 1 wait 2ms\n    corp_laptop -> access_sw eapol version 2 eappacket eapcode 2 eapid 1 eapmethod 1 identity \"host/wkstn-42.corp.internal\" wait 8ms\n    corp_laptop <- access_sw eapol version 2 eappacket eapcode 3 eapid 1 wait 2ms\n    corp_laptop <- access_sw eapol version 2 key\n}\n```","frasm_code":"host corp_laptop { mac 00:24:9b:11:22:33 }\nhost access_sw   { mac 00:1c:73:00:10:01 }\n\ncompile {\n    corp_laptop -> access_sw eapol version 2 start wait 3ms\n    corp_laptop <- access_sw eapol version 2 eappacket eapcode 1 eapid 1 eapmethod 1 wait 2ms\n    corp_laptop -> access_sw eapol version 2 eappacket eapcode 2 eapid 1 eapmethod 1 identity \"host/wkstn-42.corp.internal\" wait 8ms\n    corp_laptop <- access_sw eapol version 2 eappacket eapcode 3 eapid 1 wait 2ms\n    corp_laptop <- access_sw eapol version 2 key\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IEEE 802.1X Supplicant Onboarding (EAPOL-Start, Identity & Key)\" (nac_8021x_eapol_exchange.frasm). Scenario: Models a wired workstation authenticating to a NAC-enabled access switch over EtherType 0x888e before receiving an IP lease. Verify with Wireshark filter `eapol || eap`."},{"role":"assistant","content":"Targets PAE multicast MAC 01:80:c2:00:00:03 on supplicant frames and steps through EAP-Request/Response Identity (eapmethod 1) and EAP-Success (eapcode 3). Compile with `frameassembly nac_8021x_eapol_exchange.frasm`.\n\n```frameassembly\nhost corp_laptop { mac 00:24:9b:11:22:33 }\nhost access_sw   { mac 00:1c:73:00:10:01 }\n\ncompile {\n    corp_laptop -> access_sw eapol version 2 start wait 3ms\n    corp_laptop <- access_sw eapol version 2 eappacket eapcode 1 eapid 1 eapmethod 1 wait 2ms\n    corp_laptop -> access_sw eapol version 2 eappacket eapcode 2 eapid 1 eapmethod 1 identity \"host/wkstn-42.corp.internal\" wait 8ms\n    corp_laptop <- access_sw eapol version 2 eappacket eapcode 3 eapid 1 wait 2ms\n    corp_laptop <- access_sw eapol version 2 key\n}\n```"}]}
{"id":"sft-cookbook-ex-l2-mpls-exp-qos-ping","task_type":"nl_to_frasm","protocols":["mpls","icmp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"MPLS L3VPN Shim Label with Traffic-Class QoS Marking\" (mpls_l3vpn_exp5.frasm). Scenario: Wraps an inter-site ICMP Echo exchange inside a 20-bit MPLS transport label (16040) with Traffic Class / EXP 5 for core voice-grade forwarding checks. Verify with Wireshark filter `mpls.label == 16040`.","completion":"Prepends EtherType 0x8847 with label 16040, exp 5, bos 1, and decremented mplsttl on the return path. Compile with `frameassembly mpls_l3vpn_exp5.frasm`.\n\n```frameassembly\nhost pe_west { ip 10.254.0.1 mac 00:1c:73:10:00:01 }\nhost pe_east { ip 10.254.0.2 mac 00:1c:73:20:00:02 }\n\ncompile {\n    pe_west -> pe_east mpls 16040 exp 5 bos 1 mplsttl 64 icmp echorequest id 0x0901 seq 1 wait 4ms\n    pe_west <- pe_east mpls 24010 exp 5 bos 1 mplsttl 63 icmp echoreply id 0x0901 seq 1\n}\n```","frasm_code":"host pe_west { ip 10.254.0.1 mac 00:1c:73:10:00:01 }\nhost pe_east { ip 10.254.0.2 mac 00:1c:73:20:00:02 }\n\ncompile {\n    pe_west -> pe_east mpls 16040 exp 5 bos 1 mplsttl 64 icmp echorequest id 0x0901 seq 1 wait 4ms\n    pe_west <- pe_east mpls 24010 exp 5 bos 1 mplsttl 63 icmp echoreply id 0x0901 seq 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"MPLS L3VPN Shim Label with Traffic-Class QoS Marking\" (mpls_l3vpn_exp5.frasm). Scenario: Wraps an inter-site ICMP Echo exchange inside a 20-bit MPLS transport label (16040) with Traffic Class / EXP 5 for core voice-grade forwarding checks. Verify with Wireshark filter `mpls.label == 16040`."},{"role":"assistant","content":"Prepends EtherType 0x8847 with label 16040, exp 5, bos 1, and decremented mplsttl on the return path. Compile with `frameassembly mpls_l3vpn_exp5.frasm`.\n\n```frameassembly\nhost pe_west { ip 10.254.0.1 mac 00:1c:73:10:00:01 }\nhost pe_east { ip 10.254.0.2 mac 00:1c:73:20:00:02 }\n\ncompile {\n    pe_west -> pe_east mpls 16040 exp 5 bos 1 mplsttl 64 icmp echorequest id 0x0901 seq 1 wait 4ms\n    pe_west <- pe_east mpls 24010 exp 5 bos 1 mplsttl 63 icmp echoreply id 0x0901 seq 1\n}\n```"}]}
{"id":"sft-cookbook-lib-scan-arp-lan-sweep","task_type":"nl_to_frasm","protocols":["arp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Local Subnet ARP Discovery Sweep\" (scan_arp_lan_sweep.frasm). Scenario: Broadcasts Layer 2 ARP Who-Has requests across three local subnet IPs, showing two online hosts answering with their MACs and one unused IP staying silent. Verify with Wireshark filter `arp`.","completion":"arp request automatically sets the Ethernet destination MAC to ff:ff:ff:ff:ff:ff (broadcast), while <- arp reply sends a unicast response straight back to the scanner. Compile with `frameassembly scan_arp_lan_sweep.frasm`.\n\n```frameassembly\n// Technician laptop scanning three local /24 addresses on the same VLAN\nhost tech_laptop { ip 192.168.10.200 mac 00:1a:2b:00:00:aa }\nhost router_gw   { ip 192.168.10.1   mac 00:1c:73:00:00:01 }\nhost nas_box     { ip 192.168.10.50  mac 00:11:32:aa:bb:cc }\nhost unused_ip   { ip 192.168.10.51 }\n\ncompile {\n    // Probe .1 -> Gateway answers with its MAC\n    tech_laptop -> router_gw arp request senderip 192.168.10.200 targetip 192.168.10.1 wait 1ms\n    tech_laptop <- router_gw arp reply senderip 192.168.10.1 targetip 192.168.10.200 wait 2ms\n\n    // Probe .50 -> NAS answers with its MAC\n    tech_laptop -> nas_box arp request senderip 192.168.10.200 targetip 192.168.10.50 wait 1ms\n    tech_laptop <- nas_box arp reply senderip 192.168.10.50 targetip 192.168.10.200 wait 2ms\n\n    // Probe .51 -> No host owns this IP, so no ARP reply comes back\n    tech_laptop -> unused_ip arp request senderip 192.168.10.200 targetip 192.168.10.51\n}\n```","frasm_code":"// Technician laptop scanning three local /24 addresses on the same VLAN\nhost tech_laptop { ip 192.168.10.200 mac 00:1a:2b:00:00:aa }\nhost router_gw   { ip 192.168.10.1   mac 00:1c:73:00:00:01 }\nhost nas_box     { ip 192.168.10.50  mac 00:11:32:aa:bb:cc }\nhost unused_ip   { ip 192.168.10.51 }\n\ncompile {\n    // Probe .1 -> Gateway answers with its MAC\n    tech_laptop -> router_gw arp request senderip 192.168.10.200 targetip 192.168.10.1 wait 1ms\n    tech_laptop <- router_gw arp reply senderip 192.168.10.1 targetip 192.168.10.200 wait 2ms\n\n    // Probe .50 -> NAS answers with its MAC\n    tech_laptop -> nas_box arp request senderip 192.168.10.200 targetip 192.168.10.50 wait 1ms\n    tech_laptop <- nas_box arp reply senderip 192.168.10.50 targetip 192.168.10.200 wait 2ms\n\n    // Probe .51 -> No host owns this IP, so no ARP reply comes back\n    tech_laptop -> unused_ip arp request senderip 192.168.10.200 targetip 192.168.10.51\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Local Subnet ARP Discovery Sweep\" (scan_arp_lan_sweep.frasm). Scenario: Broadcasts Layer 2 ARP Who-Has requests across three local subnet IPs, showing two online hosts answering with their MACs and one unused IP staying silent. Verify with Wireshark filter `arp`."},{"role":"assistant","content":"arp request automatically sets the Ethernet destination MAC to ff:ff:ff:ff:ff:ff (broadcast), while <- arp reply sends a unicast response straight back to the scanner. Compile with `frameassembly scan_arp_lan_sweep.frasm`.\n\n```frameassembly\n// Technician laptop scanning three local /24 addresses on the same VLAN\nhost tech_laptop { ip 192.168.10.200 mac 00:1a:2b:00:00:aa }\nhost router_gw   { ip 192.168.10.1   mac 00:1c:73:00:00:01 }\nhost nas_box     { ip 192.168.10.50  mac 00:11:32:aa:bb:cc }\nhost unused_ip   { ip 192.168.10.51 }\n\ncompile {\n    // Probe .1 -> Gateway answers with its MAC\n    tech_laptop -> router_gw arp request senderip 192.168.10.200 targetip 192.168.10.1 wait 1ms\n    tech_laptop <- router_gw arp reply senderip 192.168.10.1 targetip 192.168.10.200 wait 2ms\n\n    // Probe .50 -> NAS answers with its MAC\n    tech_laptop -> nas_box arp request senderip 192.168.10.200 targetip 192.168.10.50 wait 1ms\n    tech_laptop <- nas_box arp reply senderip 192.168.10.50 targetip 192.168.10.200 wait 2ms\n\n    // Probe .51 -> No host owns this IP, so no ARP reply comes back\n    tech_laptop -> unused_ip arp request senderip 192.168.10.200 targetip 192.168.10.51\n}\n```"}]}
{"id":"sft-cookbook-lib-pentest-qinq-vlan-hop","task_type":"nl_to_frasm","protocols":["qinq","vlan","icmp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"802.1ad QinQ Double-Tag VLAN Hopping Trunk Audit\" (pentest_qinq_vlan_hop.frasm). Scenario: Builds an 802.1ad/802.1Q double-tagged frame (outer S-VLAN 100 + inner C-VLAN 20) to verify access switch ports drop unexpected outer tags instead of forwarding into a protected VLAN. Verify with Wireshark filter `vlan.id == 100 || vlan.id == 20`.","completion":"qinq 100 innervlan 20 stacks outer EtherType 0x88a8 (VID 100) ahead of inner EtherType 0x8100 (VID 20) so you can audit trunk native-VLAN hardening. Compile with `frameassembly pentest_qinq_vlan_hop.frasm`.\n\n```frameassembly\n// Lab test host on VLAN 100 auditing switch isolation toward restricted VLAN 20\nhost audit_port { ip 10.20.0.99 mac 02:aa:bb:cc:dd:01 }\nhost restricted { ip 10.20.0.10 mac 00:1c:73:20:00:10 }\n\ncompile {\n    // 1. Send double-tagged frame (outer S-Tag 100, inner C-Tag 20)\n    audit_port -> restricted qinq 100 innervlan 20 icmp echorequest id 0x1337 seq 1 payload \"vlan-hop-audit\" wait 3ms\n\n    // 2. Simulated misconfigured trunk stripping outer tag and delivering single-tagged VLAN 20 frame\n    audit_port -> restricted vlan 20 icmp echorequest id 0x1337 seq 1 payload \"vlan-hop-audit\"\n}\n```","frasm_code":"// Lab test host on VLAN 100 auditing switch isolation toward restricted VLAN 20\nhost audit_port { ip 10.20.0.99 mac 02:aa:bb:cc:dd:01 }\nhost restricted { ip 10.20.0.10 mac 00:1c:73:20:00:10 }\n\ncompile {\n    // 1. Send double-tagged frame (outer S-Tag 100, inner C-Tag 20)\n    audit_port -> restricted qinq 100 innervlan 20 icmp echorequest id 0x1337 seq 1 payload \"vlan-hop-audit\" wait 3ms\n\n    // 2. Simulated misconfigured trunk stripping outer tag and delivering single-tagged VLAN 20 frame\n    audit_port -> restricted vlan 20 icmp echorequest id 0x1337 seq 1 payload \"vlan-hop-audit\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"802.1ad QinQ Double-Tag VLAN Hopping Trunk Audit\" (pentest_qinq_vlan_hop.frasm). Scenario: Builds an 802.1ad/802.1Q double-tagged frame (outer S-VLAN 100 + inner C-VLAN 20) to verify access switch ports drop unexpected outer tags instead of forwarding into a protected VLAN. Verify with Wireshark filter `vlan.id == 100 || vlan.id == 20`."},{"role":"assistant","content":"qinq 100 innervlan 20 stacks outer EtherType 0x88a8 (VID 100) ahead of inner EtherType 0x8100 (VID 20) so you can audit trunk native-VLAN hardening. Compile with `frameassembly pentest_qinq_vlan_hop.frasm`.\n\n```frameassembly\n// Lab test host on VLAN 100 auditing switch isolation toward restricted VLAN 20\nhost audit_port { ip 10.20.0.99 mac 02:aa:bb:cc:dd:01 }\nhost restricted { ip 10.20.0.10 mac 00:1c:73:20:00:10 }\n\ncompile {\n    // 1. Send double-tagged frame (outer S-Tag 100, inner C-Tag 20)\n    audit_port -> restricted qinq 100 innervlan 20 icmp echorequest id 0x1337 seq 1 payload \"vlan-hop-audit\" wait 3ms\n\n    // 2. Simulated misconfigured trunk stripping outer tag and delivering single-tagged VLAN 20 frame\n    audit_port -> restricted vlan 20 icmp echorequest id 0x1337 seq 1 payload \"vlan-hop-audit\"\n}\n```"}]}
{"id":"sft-cookbook-lib-pentest-garp-shadow-tls","task_type":"nl_to_frasm","protocols":["arp","tcp","tls"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Gratuitous ARP Spoof Test & Unauthorized Egress TLS SNI Audit\" (pentest_garp_egress_tls.frasm). Scenario: Tests switch Dynamic ARP Inspection (DAI) against an unauthorized Gratuitous ARP claim, followed by an egress TLS ClientHello to an unapproved external domain. Verify with Wireshark filter `arp.isgratuitous || tls.handshake.extensions_server_name`.","completion":"arp gratuitous broadcasts senderip == targetip to ff:ff:ff:ff:ff:ff—ideal for verifying DAI port-shutdown rules in a isolated lab. Compile with `frameassembly pentest_garp_egress_tls.frasm`.\n\n```frameassembly\n// Rogue lab device, default gateway IP, and external cloud endpoint\nhost rogue_box   { ip 10.20.5.99 mac 02:de:ad:be:ef:99 }\nhost vlan_gw     { ip 10.20.5.1  mac 00:1c:73:05:00:01 }\nhost ext_storage { ip 198.51.100.77 }\n\ncompile {\n    // 1. Gratuitous ARP announcement claiming the gateway's 10.20.5.1 IP (tests switch DAI)\n    rogue_box -> vlan_gw arp gratuitous senderip 10.20.5.1 sendermac 02:de:ad:be:ef:99 wait 5ms\n\n    // 2. Outbound TCP 443 + TLS ClientHello to test egress SNI filtering / DLP alerts\n    rogue_box -> ext_storage tcp syn srcport 54900 dstport 443 win 65535 mss 1460 wait 2ms\n    rogue_box <- ext_storage tcp syn ack win 65535 mss 1460 wait 2ms\n    rogue_box -> ext_storage tcp ack wait 1ms\n    rogue_box -> ext_storage tls clienthello sni \"unapproved-drop.example.net\" alpn \"h2\"\n}\n```","frasm_code":"// Rogue lab device, default gateway IP, and external cloud endpoint\nhost rogue_box   { ip 10.20.5.99 mac 02:de:ad:be:ef:99 }\nhost vlan_gw     { ip 10.20.5.1  mac 00:1c:73:05:00:01 }\nhost ext_storage { ip 198.51.100.77 }\n\ncompile {\n    // 1. Gratuitous ARP announcement claiming the gateway's 10.20.5.1 IP (tests switch DAI)\n    rogue_box -> vlan_gw arp gratuitous senderip 10.20.5.1 sendermac 02:de:ad:be:ef:99 wait 5ms\n\n    // 2. Outbound TCP 443 + TLS ClientHello to test egress SNI filtering / DLP alerts\n    rogue_box -> ext_storage tcp syn srcport 54900 dstport 443 win 65535 mss 1460 wait 2ms\n    rogue_box <- ext_storage tcp syn ack win 65535 mss 1460 wait 2ms\n    rogue_box -> ext_storage tcp ack wait 1ms\n    rogue_box -> ext_storage tls clienthello sni \"unapproved-drop.example.net\" alpn \"h2\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Gratuitous ARP Spoof Test & Unauthorized Egress TLS SNI Audit\" (pentest_garp_egress_tls.frasm). Scenario: Tests switch Dynamic ARP Inspection (DAI) against an unauthorized Gratuitous ARP claim, followed by an egress TLS ClientHello to an unapproved external domain. Verify with Wireshark filter `arp.isgratuitous || tls.handshake.extensions_server_name`."},{"role":"assistant","content":"arp gratuitous broadcasts senderip == targetip to ff:ff:ff:ff:ff:ff—ideal for verifying DAI port-shutdown rules in a isolated lab. Compile with `frameassembly pentest_garp_egress_tls.frasm`.\n\n```frameassembly\n// Rogue lab device, default gateway IP, and external cloud endpoint\nhost rogue_box   { ip 10.20.5.99 mac 02:de:ad:be:ef:99 }\nhost vlan_gw     { ip 10.20.5.1  mac 00:1c:73:05:00:01 }\nhost ext_storage { ip 198.51.100.77 }\n\ncompile {\n    // 1. Gratuitous ARP announcement claiming the gateway's 10.20.5.1 IP (tests switch DAI)\n    rogue_box -> vlan_gw arp gratuitous senderip 10.20.5.1 sendermac 02:de:ad:be:ef:99 wait 5ms\n\n    // 2. Outbound TCP 443 + TLS ClientHello to test egress SNI filtering / DLP alerts\n    rogue_box -> ext_storage tcp syn srcport 54900 dstport 443 win 65535 mss 1460 wait 2ms\n    rogue_box <- ext_storage tcp syn ack win 65535 mss 1460 wait 2ms\n    rogue_box -> ext_storage tcp ack wait 1ms\n    rogue_box -> ext_storage tls clienthello sni \"unapproved-drop.example.net\" alpn \"h2\"\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-arp","task_type":"nl_to_frasm","protocols":["arp","vlan"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"ARP / GARP (`arp`): VLAN-Tagged ARP Resolution Followed by Gratuitous ARP VIP Takeover\" (arp_garp_failover.frasm). Scenario: Simulates a workstation resolving its default gateway on VLAN 10, followed by a standby router broadcasting an RFC 5227 Gratuitous ARP announcement during a virtual IP takeover. Verify with Wireshark filter `arp`.","completion":"Sets Ethernet II EtherType to `0x0806` and broadcasts `request` frames to destination MAC `ff:ff:ff:ff:ff:ff` unless `dstmac` is overridden. Populates Hardware Type `1` (Ethernet), Protocol Type `0x0800` (IPv4), `hlen=6`, `plen=4`, and `opcode=1` (`request`). Compile with `frameassembly show arp_garp_failover.frasm`.\n\n```frameassembly\nhost workstation { ip 10.10.10.50 mac 00:1b:21:10:00:50 }\nhost rtr_active  { ip 10.10.10.1  mac 00:00:5e:00:01:01 }\nhost rtr_standby { ip 10.10.10.2  mac 00:1b:21:10:00:02 }\n\ncompile {\n    // 1. Broadcast ARP Who-Has on VLAN 10\n    workstation -> rtr_active arp request vlan 10 pcp 3 wait 1ms\n    // 2. Unicast ARP Is-At reply from active gateway\n    workstation <- rtr_active arp reply vlan 10 wait 5ms\n    // 3. Standby router takes over VIP 10.10.10.1 and broadcasts GARP\n    rtr_standby -> workstation arp gratuitous sendermac 00:00:5e:00:01:01 senderip 10.10.10.1 vlan 10\n}\n```","frasm_code":"host workstation { ip 10.10.10.50 mac 00:1b:21:10:00:50 }\nhost rtr_active  { ip 10.10.10.1  mac 00:00:5e:00:01:01 }\nhost rtr_standby { ip 10.10.10.2  mac 00:1b:21:10:00:02 }\n\ncompile {\n    // 1. Broadcast ARP Who-Has on VLAN 10\n    workstation -> rtr_active arp request vlan 10 pcp 3 wait 1ms\n    // 2. Unicast ARP Is-At reply from active gateway\n    workstation <- rtr_active arp reply vlan 10 wait 5ms\n    // 3. Standby router takes over VIP 10.10.10.1 and broadcasts GARP\n    rtr_standby -> workstation arp gratuitous sendermac 00:00:5e:00:01:01 senderip 10.10.10.1 vlan 10\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"ARP / GARP (`arp`): VLAN-Tagged ARP Resolution Followed by Gratuitous ARP VIP Takeover\" (arp_garp_failover.frasm). Scenario: Simulates a workstation resolving its default gateway on VLAN 10, followed by a standby router broadcasting an RFC 5227 Gratuitous ARP announcement during a virtual IP takeover. Verify with Wireshark filter `arp`."},{"role":"assistant","content":"Sets Ethernet II EtherType to `0x0806` and broadcasts `request` frames to destination MAC `ff:ff:ff:ff:ff:ff` unless `dstmac` is overridden. Populates Hardware Type `1` (Ethernet), Protocol Type `0x0800` (IPv4), `hlen=6`, `plen=4`, and `opcode=1` (`request`). Compile with `frameassembly show arp_garp_failover.frasm`.\n\n```frameassembly\nhost workstation { ip 10.10.10.50 mac 00:1b:21:10:00:50 }\nhost rtr_active  { ip 10.10.10.1  mac 00:00:5e:00:01:01 }\nhost rtr_standby { ip 10.10.10.2  mac 00:1b:21:10:00:02 }\n\ncompile {\n    // 1. Broadcast ARP Who-Has on VLAN 10\n    workstation -> rtr_active arp request vlan 10 pcp 3 wait 1ms\n    // 2. Unicast ARP Is-At reply from active gateway\n    workstation <- rtr_active arp reply vlan 10 wait 5ms\n    // 3. Standby router takes over VIP 10.10.10.1 and broadcasts GARP\n    rtr_standby -> workstation arp gratuitous sendermac 00:00:5e:00:01:01 senderip 10.10.10.1 vlan 10\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-vlan","task_type":"nl_to_frasm","protocols":["vlan"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"802.1Q VLAN (`vlan`): Multi-VLAN Trunk Capture Mixing Standalone L2 Probes & Voice/Routing CoS\" (vlan_trunk_qos.frasm). Scenario: Demonstrates standalone MAC-only 802.1Q frames alongside VLAN-tagged ARP, VoIP RTP (`pcp 5`, `dscp 46`), and network-control OSPF (`pcp 6`) traffic on a single switch trunk. Verify with Wireshark filter `vlan`.","completion":"Inserts outer TPID `0x8100` and packs `pcp` (3 bits), `dei` (1 bit), and `vid` (12 bits) into the big-endian 16-bit Tag Control Information (TCI) word. Emits default inner EtherType `0x0800` when used standalone (overridable via `ethertype <0..65535>`) or preserves the exact inner protocol EtherType (`0x0806`, `0x0800`, `0x86dd`, `0x8847`) when used as a cross-layer modifier. Compile with `frameassembly show vlan_trunk_qos.frasm`.\n\n```frameassembly\nhost sw_leaf  { mac 00:1c:73:10:00:01 }\nhost sw_spine { mac 00:1c:73:20:00:01 }\nhost phone_01 { ip 10.50.20.11 mac 00:1c:73:50:00:11 }\nhost pbx_core { ip 10.50.20.10 mac 00:1c:73:50:00:10 }\n\ncompile {\n    // Standalone L2 VLAN probe on management VLAN 99\n    sw_leaf -> sw_spine vlan 99 pcp 2 dei 0 ethertype 0x88b5 payload \"trunk-health\" wait 1ms\n    // Voice VLAN 20: ARP + CoS 5 / EF RTP media packet\n    phone_01 -> pbx_core arp request vlan 20 pcp 5 wait 1ms\n    phone_01 <- pbx_core arp reply vlan 20 pcp 5 wait 2ms\n    phone_01 -> pbx_core rtp pt 0 seq 1 timestamp 160 ssrc 0x10203040 vlan 20 pcp 5 dscp 46 payload \"g711-ulaw-sample\" wait 2ms\n    // Routing VLAN 30: Priority 6 OSPF Hello\n    phone_01 -> pbx_core ospf hello routerid 10.50.20.11 areaid 0 vlan 30 pcp 6\n}\n```","frasm_code":"host sw_leaf  { mac 00:1c:73:10:00:01 }\nhost sw_spine { mac 00:1c:73:20:00:01 }\nhost phone_01 { ip 10.50.20.11 mac 00:1c:73:50:00:11 }\nhost pbx_core { ip 10.50.20.10 mac 00:1c:73:50:00:10 }\n\ncompile {\n    // Standalone L2 VLAN probe on management VLAN 99\n    sw_leaf -> sw_spine vlan 99 pcp 2 dei 0 ethertype 0x88b5 payload \"trunk-health\" wait 1ms\n    // Voice VLAN 20: ARP + CoS 5 / EF RTP media packet\n    phone_01 -> pbx_core arp request vlan 20 pcp 5 wait 1ms\n    phone_01 <- pbx_core arp reply vlan 20 pcp 5 wait 2ms\n    phone_01 -> pbx_core rtp pt 0 seq 1 timestamp 160 ssrc 0x10203040 vlan 20 pcp 5 dscp 46 payload \"g711-ulaw-sample\" wait 2ms\n    // Routing VLAN 30: Priority 6 OSPF Hello\n    phone_01 -> pbx_core ospf hello routerid 10.50.20.11 areaid 0 vlan 30 pcp 6\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"802.1Q VLAN (`vlan`): Multi-VLAN Trunk Capture Mixing Standalone L2 Probes & Voice/Routing CoS\" (vlan_trunk_qos.frasm). Scenario: Demonstrates standalone MAC-only 802.1Q frames alongside VLAN-tagged ARP, VoIP RTP (`pcp 5`, `dscp 46`), and network-control OSPF (`pcp 6`) traffic on a single switch trunk. Verify with Wireshark filter `vlan`."},{"role":"assistant","content":"Inserts outer TPID `0x8100` and packs `pcp` (3 bits), `dei` (1 bit), and `vid` (12 bits) into the big-endian 16-bit Tag Control Information (TCI) word. Emits default inner EtherType `0x0800` when used standalone (overridable via `ethertype <0..65535>`) or preserves the exact inner protocol EtherType (`0x0806`, `0x0800`, `0x86dd`, `0x8847`) when used as a cross-layer modifier. Compile with `frameassembly show vlan_trunk_qos.frasm`.\n\n```frameassembly\nhost sw_leaf  { mac 00:1c:73:10:00:01 }\nhost sw_spine { mac 00:1c:73:20:00:01 }\nhost phone_01 { ip 10.50.20.11 mac 00:1c:73:50:00:11 }\nhost pbx_core { ip 10.50.20.10 mac 00:1c:73:50:00:10 }\n\ncompile {\n    // Standalone L2 VLAN probe on management VLAN 99\n    sw_leaf -> sw_spine vlan 99 pcp 2 dei 0 ethertype 0x88b5 payload \"trunk-health\" wait 1ms\n    // Voice VLAN 20: ARP + CoS 5 / EF RTP media packet\n    phone_01 -> pbx_core arp request vlan 20 pcp 5 wait 1ms\n    phone_01 <- pbx_core arp reply vlan 20 pcp 5 wait 2ms\n    phone_01 -> pbx_core rtp pt 0 seq 1 timestamp 160 ssrc 0x10203040 vlan 20 pcp 5 dscp 46 payload \"g711-ulaw-sample\" wait 2ms\n    // Routing VLAN 30: Priority 6 OSPF Hello\n    phone_01 -> pbx_core ospf hello routerid 10.50.20.11 areaid 0 vlan 30 pcp 6\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-qinq","task_type":"nl_to_frasm","protocols":["qinq","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"802.1ad QinQ (`qinq`): Provider NNI Trunk Carrying Multiple Customer C-VLANs Inside S-VLAN 1200\" (qinq_metro_nni.frasm). Scenario: Models a Metro Ethernet provider trunk (`S-VLAN 1200`) carrying two distinct customer tenants: Tenant A (`innervlan 100`) running BGP peering and Tenant B (`innervlan 200`) running ICMPv6. Verify with Wireshark filter `vlan.etype == 0x88a8 || vlan`.","completion":"Always writes two complete 4-byte VLAN tags: outer TPID `0x88a8` (S-VLAN, default `100`) followed immediately by inner TPID `0x8100` (C-VLAN, default `innervlan 1`). Applies `pcp` (`0..7`) and `dei` (`0|1`) cleanly to the tag control headers and preserves the inner payload EtherType (`0x0800` IPv4, `0x86dd` IPv6, `0x0806` ARP). Compile with `frameassembly show qinq_metro_nni.frasm`.\n\n```frameassembly\nhost ce_v4_a { ip 172.20.0.1 mac 00:1b:21:c1:00:01 }\nhost ce_v4_b { ip 172.20.0.2 mac 00:1b:21:c1:00:02 }\nhost ce_v6_a { ip 2001:db8:200::1 mac 00:1b:21:c2:00:01 }\nhost ce_v6_b { ip 2001:db8:200::2 mac 00:1b:21:c2:00:02 }\n\ncompile {\n    // Tenant A: eBGP Keepalive inside S-VLAN 1200 / C-VLAN 100\n    ce_v4_a -> ce_v4_b tcp syn srcport 51179 dstport 179 win 65535 mss 1452 qinq 1200 innervlan 100 pcp 6 wait 1ms\n    ce_v4_a <- ce_v4_b tcp syn ack win 65535 mss 1452 qinq 1200 innervlan 100 pcp 6 wait 1ms\n    ce_v4_a -> ce_v4_b tcp ack qinq 1200 innervlan 100 pcp 6 wait 1ms\n    ce_v4_a -> ce_v4_b bgp keepalive qinq 1200 innervlan 100 pcp 6 wait 3ms\n    // Tenant B: IPv6 Echo inside S-VLAN 1200 / C-VLAN 200\n    ce_v6_a -> ce_v6_b icmp echorequest id 42 seq 1 qinq 1200 innervlan 200 pcp 3 wait 1ms\n    ce_v6_a <- ce_v6_b icmp echoreply id 42 seq 1 qinq 1200 innervlan 200 pcp 3\n}\n```","frasm_code":"host ce_v4_a { ip 172.20.0.1 mac 00:1b:21:c1:00:01 }\nhost ce_v4_b { ip 172.20.0.2 mac 00:1b:21:c1:00:02 }\nhost ce_v6_a { ip 2001:db8:200::1 mac 00:1b:21:c2:00:01 }\nhost ce_v6_b { ip 2001:db8:200::2 mac 00:1b:21:c2:00:02 }\n\ncompile {\n    // Tenant A: eBGP Keepalive inside S-VLAN 1200 / C-VLAN 100\n    ce_v4_a -> ce_v4_b tcp syn srcport 51179 dstport 179 win 65535 mss 1452 qinq 1200 innervlan 100 pcp 6 wait 1ms\n    ce_v4_a <- ce_v4_b tcp syn ack win 65535 mss 1452 qinq 1200 innervlan 100 pcp 6 wait 1ms\n    ce_v4_a -> ce_v4_b tcp ack qinq 1200 innervlan 100 pcp 6 wait 1ms\n    ce_v4_a -> ce_v4_b bgp keepalive qinq 1200 innervlan 100 pcp 6 wait 3ms\n    // Tenant B: IPv6 Echo inside S-VLAN 1200 / C-VLAN 200\n    ce_v6_a -> ce_v6_b icmp echorequest id 42 seq 1 qinq 1200 innervlan 200 pcp 3 wait 1ms\n    ce_v6_a <- ce_v6_b icmp echoreply id 42 seq 1 qinq 1200 innervlan 200 pcp 3\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"802.1ad QinQ (`qinq`): Provider NNI Trunk Carrying Multiple Customer C-VLANs Inside S-VLAN 1200\" (qinq_metro_nni.frasm). Scenario: Models a Metro Ethernet provider trunk (`S-VLAN 1200`) carrying two distinct customer tenants: Tenant A (`innervlan 100`) running BGP peering and Tenant B (`innervlan 200`) running ICMPv6. Verify with Wireshark filter `vlan.etype == 0x88a8 || vlan`."},{"role":"assistant","content":"Always writes two complete 4-byte VLAN tags: outer TPID `0x88a8` (S-VLAN, default `100`) followed immediately by inner TPID `0x8100` (C-VLAN, default `innervlan 1`). Applies `pcp` (`0..7`) and `dei` (`0|1`) cleanly to the tag control headers and preserves the inner payload EtherType (`0x0800` IPv4, `0x86dd` IPv6, `0x0806` ARP). Compile with `frameassembly show qinq_metro_nni.frasm`.\n\n```frameassembly\nhost ce_v4_a { ip 172.20.0.1 mac 00:1b:21:c1:00:01 }\nhost ce_v4_b { ip 172.20.0.2 mac 00:1b:21:c1:00:02 }\nhost ce_v6_a { ip 2001:db8:200::1 mac 00:1b:21:c2:00:01 }\nhost ce_v6_b { ip 2001:db8:200::2 mac 00:1b:21:c2:00:02 }\n\ncompile {\n    // Tenant A: eBGP Keepalive inside S-VLAN 1200 / C-VLAN 100\n    ce_v4_a -> ce_v4_b tcp syn srcport 51179 dstport 179 win 65535 mss 1452 qinq 1200 innervlan 100 pcp 6 wait 1ms\n    ce_v4_a <- ce_v4_b tcp syn ack win 65535 mss 1452 qinq 1200 innervlan 100 pcp 6 wait 1ms\n    ce_v4_a -> ce_v4_b tcp ack qinq 1200 innervlan 100 pcp 6 wait 1ms\n    ce_v4_a -> ce_v4_b bgp keepalive qinq 1200 innervlan 100 pcp 6 wait 3ms\n    // Tenant B: IPv6 Echo inside S-VLAN 1200 / C-VLAN 200\n    ce_v6_a -> ce_v6_b icmp echorequest id 42 seq 1 qinq 1200 innervlan 200 pcp 3 wait 1ms\n    ce_v6_a <- ce_v6_b icmp echoreply id 42 seq 1 qinq 1200 innervlan 200 pcp 3\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-lldp","task_type":"nl_to_frasm","protocols":["lldp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"LLDP (`lldp`): Bidirectional Leaf-Spine LLDP Neighbor Exchange Plus Shutdown Frame\" (lldp_leaf_spine.frasm). Scenario: Captures mutual LLDP advertisements between an Arista-class spine and an access switch, followed by an IEEE 802.1AB `ttl 0` neighbor withdrawal frame. Verify with Wireshark filter `lldp`.","completion":"Sets Ethernet II EtherType to `0x88cc` and defaults the destination MAC to IEEE nearest-bridge multicast `01:80:c2:00:00:0e`. Encodes TLV 1 (Chassis ID, subtype `4` MAC or `7` Locally Assigned), TLV 2 (Port ID, subtype `5` Interface Name), and TLV 3 (16-bit `ttl`, default `120` seconds) with exact 7-bit type + 9-bit length bitfields. Compile with `frameassembly show lldp_leaf_spine.frasm`.\n\n```frameassembly\nhost leaf_01  { mac 00:1c:73:11:22:01 }\nhost spine_01 { mac 00:1c:73:99:88:01 }\n\ncompile {\n    leaf_01 -> spine_01 lldp chassisid \"leaf-01.dc1\" portid \"Ethernet49/1\" ttl 120 sysname \"leaf-01.dc1.internal\" sysdesc \"EOS 4.32.1F\" wait 5ms\n    spine_01 -> leaf_01 lldp chassisid \"spine-01.dc1\" portid \"Ethernet1/1\" ttl 120 sysname \"spine-01.dc1.internal\" sysdesc \"EOS 4.32.1F\" wait 10ms\n    // Graceful LLDP port shutdown advertisement (TTL = 0)\n    leaf_01 -> spine_01 lldp chassisid \"leaf-01.dc1\" portid \"Ethernet49/1\" ttl 0\n}\n```","frasm_code":"host leaf_01  { mac 00:1c:73:11:22:01 }\nhost spine_01 { mac 00:1c:73:99:88:01 }\n\ncompile {\n    leaf_01 -> spine_01 lldp chassisid \"leaf-01.dc1\" portid \"Ethernet49/1\" ttl 120 sysname \"leaf-01.dc1.internal\" sysdesc \"EOS 4.32.1F\" wait 5ms\n    spine_01 -> leaf_01 lldp chassisid \"spine-01.dc1\" portid \"Ethernet1/1\" ttl 120 sysname \"spine-01.dc1.internal\" sysdesc \"EOS 4.32.1F\" wait 10ms\n    // Graceful LLDP port shutdown advertisement (TTL = 0)\n    leaf_01 -> spine_01 lldp chassisid \"leaf-01.dc1\" portid \"Ethernet49/1\" ttl 0\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"LLDP (`lldp`): Bidirectional Leaf-Spine LLDP Neighbor Exchange Plus Shutdown Frame\" (lldp_leaf_spine.frasm). Scenario: Captures mutual LLDP advertisements between an Arista-class spine and an access switch, followed by an IEEE 802.1AB `ttl 0` neighbor withdrawal frame. Verify with Wireshark filter `lldp`."},{"role":"assistant","content":"Sets Ethernet II EtherType to `0x88cc` and defaults the destination MAC to IEEE nearest-bridge multicast `01:80:c2:00:00:0e`. Encodes TLV 1 (Chassis ID, subtype `4` MAC or `7` Locally Assigned), TLV 2 (Port ID, subtype `5` Interface Name), and TLV 3 (16-bit `ttl`, default `120` seconds) with exact 7-bit type + 9-bit length bitfields. Compile with `frameassembly show lldp_leaf_spine.frasm`.\n\n```frameassembly\nhost leaf_01  { mac 00:1c:73:11:22:01 }\nhost spine_01 { mac 00:1c:73:99:88:01 }\n\ncompile {\n    leaf_01 -> spine_01 lldp chassisid \"leaf-01.dc1\" portid \"Ethernet49/1\" ttl 120 sysname \"leaf-01.dc1.internal\" sysdesc \"EOS 4.32.1F\" wait 5ms\n    spine_01 -> leaf_01 lldp chassisid \"spine-01.dc1\" portid \"Ethernet1/1\" ttl 120 sysname \"spine-01.dc1.internal\" sysdesc \"EOS 4.32.1F\" wait 10ms\n    // Graceful LLDP port shutdown advertisement (TTL = 0)\n    leaf_01 -> spine_01 lldp chassisid \"leaf-01.dc1\" portid \"Ethernet49/1\" ttl 0\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-stp","task_type":"nl_to_frasm","protocols":["stp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"STP / RSTP (`stp`): Normal Root RSTP Heartbeat Followed by Rogue Superior BPDU Attack\" (stp_rogue_root_audit.frasm). Scenario: Captures a legitimate distribution switch sending RSTP BPDUs (`priority 32768`), followed by a rogue access device advertising priority `4096` (`cost 0`) to trigger Root Guard / BPDU Guard. Verify with Wireshark filter `stp`.","completion":"Addresses Ethernet destination to IEEE Bridge Group multicast `01:80:c2:00:00:00` and writes the exact IEEE 802.3 Payload Length field instead of an Ethernet II EtherType. Prepends the 3-byte LLC header (`0x42 0x42 0x03`) and Protocol Identifier `0x0000` ahead of the Configuration or RSTP BPDU. Compile with `frameassembly show stp_rogue_root_audit.frasm`.\n\n```frameassembly\nhost dist_root  { mac 00:1c:73:01:00:01 }\nhost access_sw  { mac 00:1c:73:02:00:10 }\nhost rogue_port { mac 00:50:56:99:99:99 }\n\ncompile {\n    // Legitimate RSTP Proposal/Learning-Forwarding BPDU from distribution root\n    dist_root -> access_sw stp rstp rootid \"32768:00:1c:73:01:00:01\" bridgeid \"32768:00:1c:73:01:00:01\" portid 0x8001 cost 0 flags 0x3c wait 2s\n    // Downstream access switch relaying root path cost 20000\n    access_sw -> rogue_port stp rstp rootid \"32768:00:1c:73:01:00:01\" bridgeid \"32768:00:1c:73:02:00:10\" portid 0x8018 cost 20000 flags 0x3c wait 500ms\n    // Rogue device injecting a superior Root ID (priority 4096, cost 0)\n    rogue_port -> access_sw stp rstp rootid \"4096:00:50:56:99:99:99\" bridgeid \"4096:00:50:56:99:99:99\" portid 0x8001 cost 0 flags 0x0e\n}\n```","frasm_code":"host dist_root  { mac 00:1c:73:01:00:01 }\nhost access_sw  { mac 00:1c:73:02:00:10 }\nhost rogue_port { mac 00:50:56:99:99:99 }\n\ncompile {\n    // Legitimate RSTP Proposal/Learning-Forwarding BPDU from distribution root\n    dist_root -> access_sw stp rstp rootid \"32768:00:1c:73:01:00:01\" bridgeid \"32768:00:1c:73:01:00:01\" portid 0x8001 cost 0 flags 0x3c wait 2s\n    // Downstream access switch relaying root path cost 20000\n    access_sw -> rogue_port stp rstp rootid \"32768:00:1c:73:01:00:01\" bridgeid \"32768:00:1c:73:02:00:10\" portid 0x8018 cost 20000 flags 0x3c wait 500ms\n    // Rogue device injecting a superior Root ID (priority 4096, cost 0)\n    rogue_port -> access_sw stp rstp rootid \"4096:00:50:56:99:99:99\" bridgeid \"4096:00:50:56:99:99:99\" portid 0x8001 cost 0 flags 0x0e\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"STP / RSTP (`stp`): Normal Root RSTP Heartbeat Followed by Rogue Superior BPDU Attack\" (stp_rogue_root_audit.frasm). Scenario: Captures a legitimate distribution switch sending RSTP BPDUs (`priority 32768`), followed by a rogue access device advertising priority `4096` (`cost 0`) to trigger Root Guard / BPDU Guard. Verify with Wireshark filter `stp`."},{"role":"assistant","content":"Addresses Ethernet destination to IEEE Bridge Group multicast `01:80:c2:00:00:00` and writes the exact IEEE 802.3 Payload Length field instead of an Ethernet II EtherType. Prepends the 3-byte LLC header (`0x42 0x42 0x03`) and Protocol Identifier `0x0000` ahead of the Configuration or RSTP BPDU. Compile with `frameassembly show stp_rogue_root_audit.frasm`.\n\n```frameassembly\nhost dist_root  { mac 00:1c:73:01:00:01 }\nhost access_sw  { mac 00:1c:73:02:00:10 }\nhost rogue_port { mac 00:50:56:99:99:99 }\n\ncompile {\n    // Legitimate RSTP Proposal/Learning-Forwarding BPDU from distribution root\n    dist_root -> access_sw stp rstp rootid \"32768:00:1c:73:01:00:01\" bridgeid \"32768:00:1c:73:01:00:01\" portid 0x8001 cost 0 flags 0x3c wait 2s\n    // Downstream access switch relaying root path cost 20000\n    access_sw -> rogue_port stp rstp rootid \"32768:00:1c:73:01:00:01\" bridgeid \"32768:00:1c:73:02:00:10\" portid 0x8018 cost 20000 flags 0x3c wait 500ms\n    // Rogue device injecting a superior Root ID (priority 4096, cost 0)\n    rogue_port -> access_sw stp rstp rootid \"4096:00:50:56:99:99:99\" bridgeid \"4096:00:50:56:99:99:99\" portid 0x8001 cost 0 flags 0x0e\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-lacp","task_type":"nl_to_frasm","protocols":["lacp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"LACP (`lacp`): LACP Port-Channel Bring-Up From Unsynced Defaulted to Active Distributing\" (lacp_negotiation.frasm). Scenario: Models a Linux bond interface and Top-of-Rack switch negotiating Port-Channel 10 (`key 10`) from initial unsynced discovery (`actorstate 0x45`) to full `0x3f` Fast-LACP Collecting/Distributing sync. Verify with Wireshark filter `lacp`.","completion":"Sets Ethernet II EtherType to Slow Protocols `0x8809`, destination MAC to `01:80:c2:00:00:02`, Subtype `0x01` (LACP), and Version `0x01`. Builds the exact 110-byte LACPDU body: Actor TLV (`0x01`, 20B), Partner TLV (`0x02`, 20B), Collector TLV (`0x03`, 16B, MaxDelay `0x8000`), Terminator TLV (`0x00`), and 50 zero-pad octets. Compile with `frameassembly show lacp_negotiation.frasm`.\n\n```frameassembly\nhost srv_bond0 { mac 00:1b:21:44:55:01 }\nhost tor_leaf1 { mac 00:1c:73:88:99:01 }\n\ncompile {\n    // 1. Initial server LACPDU: Active + ShortTimeout + Aggregatable + Defaulted (0x47)\n    srv_bond0 -> tor_leaf1 lacp actorkey 10 actorport 1 actorstate 0x47 partnerkey 0 partnerport 0 partnerstate 0x00 wait 5ms\n    // 2. Switch replies recognizing server Actor as Partner and setting In-Sync (0x0f)\n    tor_leaf1 -> srv_bond0 lacp actorkey 10 actorport 49 actorstate 0x0f partnersys 00:1b:21:44:55:01 partnerkey 10 partnerport 1 partnerstate 0x47 wait 5ms\n    // 3. Both sides enter Active + Fast + Aggregatable + Sync + Collecting + Distributing (0x3f)\n    srv_bond0 -> tor_leaf1 lacp actorkey 10 actorport 1 actorstate 0x3f partnersys 00:1c:73:88:99:01 partnerkey 10 partnerport 49 partnerstate 0x0f wait 2ms\n    tor_leaf1 -> srv_bond0 lacp actorkey 10 actorport 49 actorstate 0x3f partnersys 00:1b:21:44:55:01 partnerkey 10 partnerport 1 partnerstate 0x3f\n}\n```","frasm_code":"host srv_bond0 { mac 00:1b:21:44:55:01 }\nhost tor_leaf1 { mac 00:1c:73:88:99:01 }\n\ncompile {\n    // 1. Initial server LACPDU: Active + ShortTimeout + Aggregatable + Defaulted (0x47)\n    srv_bond0 -> tor_leaf1 lacp actorkey 10 actorport 1 actorstate 0x47 partnerkey 0 partnerport 0 partnerstate 0x00 wait 5ms\n    // 2. Switch replies recognizing server Actor as Partner and setting In-Sync (0x0f)\n    tor_leaf1 -> srv_bond0 lacp actorkey 10 actorport 49 actorstate 0x0f partnersys 00:1b:21:44:55:01 partnerkey 10 partnerport 1 partnerstate 0x47 wait 5ms\n    // 3. Both sides enter Active + Fast + Aggregatable + Sync + Collecting + Distributing (0x3f)\n    srv_bond0 -> tor_leaf1 lacp actorkey 10 actorport 1 actorstate 0x3f partnersys 00:1c:73:88:99:01 partnerkey 10 partnerport 49 partnerstate 0x0f wait 2ms\n    tor_leaf1 -> srv_bond0 lacp actorkey 10 actorport 49 actorstate 0x3f partnersys 00:1b:21:44:55:01 partnerkey 10 partnerport 1 partnerstate 0x3f\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"LACP (`lacp`): LACP Port-Channel Bring-Up From Unsynced Defaulted to Active Distributing\" (lacp_negotiation.frasm). Scenario: Models a Linux bond interface and Top-of-Rack switch negotiating Port-Channel 10 (`key 10`) from initial unsynced discovery (`actorstate 0x45`) to full `0x3f` Fast-LACP Collecting/Distributing sync. Verify with Wireshark filter `lacp`."},{"role":"assistant","content":"Sets Ethernet II EtherType to Slow Protocols `0x8809`, destination MAC to `01:80:c2:00:00:02`, Subtype `0x01` (LACP), and Version `0x01`. Builds the exact 110-byte LACPDU body: Actor TLV (`0x01`, 20B), Partner TLV (`0x02`, 20B), Collector TLV (`0x03`, 16B, MaxDelay `0x8000`), Terminator TLV (`0x00`), and 50 zero-pad octets. Compile with `frameassembly show lacp_negotiation.frasm`.\n\n```frameassembly\nhost srv_bond0 { mac 00:1b:21:44:55:01 }\nhost tor_leaf1 { mac 00:1c:73:88:99:01 }\n\ncompile {\n    // 1. Initial server LACPDU: Active + ShortTimeout + Aggregatable + Defaulted (0x47)\n    srv_bond0 -> tor_leaf1 lacp actorkey 10 actorport 1 actorstate 0x47 partnerkey 0 partnerport 0 partnerstate 0x00 wait 5ms\n    // 2. Switch replies recognizing server Actor as Partner and setting In-Sync (0x0f)\n    tor_leaf1 -> srv_bond0 lacp actorkey 10 actorport 49 actorstate 0x0f partnersys 00:1b:21:44:55:01 partnerkey 10 partnerport 1 partnerstate 0x47 wait 5ms\n    // 3. Both sides enter Active + Fast + Aggregatable + Sync + Collecting + Distributing (0x3f)\n    srv_bond0 -> tor_leaf1 lacp actorkey 10 actorport 1 actorstate 0x3f partnersys 00:1c:73:88:99:01 partnerkey 10 partnerport 49 partnerstate 0x0f wait 2ms\n    tor_leaf1 -> srv_bond0 lacp actorkey 10 actorport 49 actorstate 0x3f partnersys 00:1b:21:44:55:01 partnerkey 10 partnerport 1 partnerstate 0x3f\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-eapol","task_type":"nl_to_frasm","protocols":["eapol"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"802.1X EAPOL (`eapol`): Full IEEE 802.1X Supplicant Onboarding With Upstream RADIUS Verification\" (eapol_8021x_nac.frasm). Scenario: Traces a workstation sending `EAPOL-Start`, answering an `EAP-Request/Identity` challenge, triggering an upstream `RADIUS Access-Request/Accept` on the switch, and receiving `EAP-Success`. Verify with Wireshark filter `eapol || eap`.","completion":"Sets Ethernet II EtherType to `0x888e` and defaults destination MAC to the IEEE 802.1X PAE group address `01:80:c2:00:00:03`. Writes the 4-byte EAPOL header (`Protocol Version` default `2`, `Packet Type`, and exact 16-bit `Packet Body Length`). Compile with `frameassembly show eapol_8021x_nac.frasm`.\n\n```frameassembly\nhost laptop    { mac 00:1b:21:55:66:77 }\nhost access_sw { ip 10.20.0.2  mac 00:1c:73:00:01:02 }\nhost radius_srv { ip 10.20.0.50 mac 00:50:56:00:00:50 }\n\ncompile {\n    // 1. Supplicant initiates 802.1X on physical switch port\n    laptop -> access_sw eapol start version 2 wait 2ms\n    // 2. Switch Authenticator requests EAP Identity (eapcode 1 = Request, eapmethod 1 = Identity)\n    access_sw -> laptop eapol eappacket version 2 eapcode 1 eapid 1 eapmethod 1 dstmac 00:1b:21:55:66:77 wait 3ms\n    // 3. Supplicant responds with corporate identity\n    laptop -> access_sw eapol eappacket version 2 eapcode 2 eapid 1 eapmethod 1 identity \"corp\\\\jdoe\" wait 2ms\n    // 4. Switch forwards authentication upstream to RADIUS AAA server\n    access_sw -> radius_srv radius accessrequest id 10 user \"corp\\\\jdoe\" nasip 10.20.0.2 wait 4ms\n    access_sw <- radius_srv radius accessaccept id 10 framedip 10.20.100.45 wait 2ms\n    // 5. Switch grants port access with EAP-Success (eapcode 3)\n    access_sw -> laptop eapol eappacket version 2 eapcode 3 eapid 1 dstmac 00:1b:21:55:66:77\n}\n```","frasm_code":"host laptop    { mac 00:1b:21:55:66:77 }\nhost access_sw { ip 10.20.0.2  mac 00:1c:73:00:01:02 }\nhost radius_srv { ip 10.20.0.50 mac 00:50:56:00:00:50 }\n\ncompile {\n    // 1. Supplicant initiates 802.1X on physical switch port\n    laptop -> access_sw eapol start version 2 wait 2ms\n    // 2. Switch Authenticator requests EAP Identity (eapcode 1 = Request, eapmethod 1 = Identity)\n    access_sw -> laptop eapol eappacket version 2 eapcode 1 eapid 1 eapmethod 1 dstmac 00:1b:21:55:66:77 wait 3ms\n    // 3. Supplicant responds with corporate identity\n    laptop -> access_sw eapol eappacket version 2 eapcode 2 eapid 1 eapmethod 1 identity \"corp\\\\jdoe\" wait 2ms\n    // 4. Switch forwards authentication upstream to RADIUS AAA server\n    access_sw -> radius_srv radius accessrequest id 10 user \"corp\\\\jdoe\" nasip 10.20.0.2 wait 4ms\n    access_sw <- radius_srv radius accessaccept id 10 framedip 10.20.100.45 wait 2ms\n    // 5. Switch grants port access with EAP-Success (eapcode 3)\n    access_sw -> laptop eapol eappacket version 2 eapcode 3 eapid 1 dstmac 00:1b:21:55:66:77\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"802.1X EAPOL (`eapol`): Full IEEE 802.1X Supplicant Onboarding With Upstream RADIUS Verification\" (eapol_8021x_nac.frasm). Scenario: Traces a workstation sending `EAPOL-Start`, answering an `EAP-Request/Identity` challenge, triggering an upstream `RADIUS Access-Request/Accept` on the switch, and receiving `EAP-Success`. Verify with Wireshark filter `eapol || eap`."},{"role":"assistant","content":"Sets Ethernet II EtherType to `0x888e` and defaults destination MAC to the IEEE 802.1X PAE group address `01:80:c2:00:00:03`. Writes the 4-byte EAPOL header (`Protocol Version` default `2`, `Packet Type`, and exact 16-bit `Packet Body Length`). Compile with `frameassembly show eapol_8021x_nac.frasm`.\n\n```frameassembly\nhost laptop    { mac 00:1b:21:55:66:77 }\nhost access_sw { ip 10.20.0.2  mac 00:1c:73:00:01:02 }\nhost radius_srv { ip 10.20.0.50 mac 00:50:56:00:00:50 }\n\ncompile {\n    // 1. Supplicant initiates 802.1X on physical switch port\n    laptop -> access_sw eapol start version 2 wait 2ms\n    // 2. Switch Authenticator requests EAP Identity (eapcode 1 = Request, eapmethod 1 = Identity)\n    access_sw -> laptop eapol eappacket version 2 eapcode 1 eapid 1 eapmethod 1 dstmac 00:1b:21:55:66:77 wait 3ms\n    // 3. Supplicant responds with corporate identity\n    laptop -> access_sw eapol eappacket version 2 eapcode 2 eapid 1 eapmethod 1 identity \"corp\\\\jdoe\" wait 2ms\n    // 4. Switch forwards authentication upstream to RADIUS AAA server\n    access_sw -> radius_srv radius accessrequest id 10 user \"corp\\\\jdoe\" nasip 10.20.0.2 wait 4ms\n    access_sw <- radius_srv radius accessaccept id 10 framedip 10.20.100.45 wait 2ms\n    // 5. Switch grants port access with EAP-Success (eapcode 3)\n    access_sw -> laptop eapol eappacket version 2 eapcode 3 eapid 1 dstmac 00:1b:21:55:66:77\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-mpls","task_type":"nl_to_frasm","protocols":["mpls","vlan","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"MPLS (`mpls`): SR-MPLS L3VPN Core Transit Over 802.1Q Sub-Interfaces\" (mpls_sr_l3vpn.frasm). Scenario: Models two Provider Edge routers exchanging MPLS-labeled BGP control traffic, VoIP EF traffic (`exp 5`), and dual-stack IPv6 customer probes across VLAN 400. Verify with Wireshark filter `mpls`.","completion":"Sets Ethernet II (or inner VLAN/QinQ) EtherType to `0x8847` (MPLS Unicast). Automatically sets `bos 0` on outer transit/transport labels and `bos 1` on the innermost service label unless `bos` is explicitly overridden. Compile with `frameassembly show mpls_sr_l3vpn.frasm`.\n\n```frameassembly\nhost pe1_v4 { ip 10.100.1.10 mac 00:1c:73:10:01:01 }\nhost pe2_v4 { ip 10.100.2.20 mac 00:1c:73:20:02:02 }\nhost ce1_v6 { ip 2001:db8:50::10 mac 00:1c:73:10:01:01 }\nhost ce2_v6 { ip 2001:db8:60::20 mac 00:1c:73:20:02:02 }\n\ncompile {\n    // 1. Standalone 2-label SR-MPLS OAM probe over VLAN 400 (outer Node SID 16001, inner VPN label 24010)\n    pe1_v4 -> pe2_v4 mpls 16001 mpls 24010 exp 6 mplsttl 64 vlan 400 payload \"sr-oam-ping\" wait 2ms\n    // 2. L3VPN IPv4 HTTPS TLS ClientHello inside outer label 16002 + inner VPN label 24010\n    pe1_v4 -> pe2_v4 tcp syn srcport 52443 dstport 443 win 65535 mss 1440 vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63 wait 1ms\n    pe1_v4 <- pe2_v4 tcp syn ack win 65535 mss 1440 vlan 400 mpls 16001 mpls 24020 exp 4 mplsttl 63 wait 1ms\n    pe1_v4 -> pe2_v4 tcp ack vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63 wait 1ms\n    pe1_v4 -> pe2_v4 tls clienthello sni \"erp.vrf-prod.internal\" alpn \"h2\" vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63 wait 2ms\n    // 3. 6VPE IPv6 ICMPv6 Echo inside MPLS label stack (16002 -> 24055)\n    ce1_v6 -> ce2_v6 icmp echorequest id 9 seq 1 vlan 400 mpls 16002 mpls 24055 tc 5 mplsttl 62\n}\n```","frasm_code":"host pe1_v4 { ip 10.100.1.10 mac 00:1c:73:10:01:01 }\nhost pe2_v4 { ip 10.100.2.20 mac 00:1c:73:20:02:02 }\nhost ce1_v6 { ip 2001:db8:50::10 mac 00:1c:73:10:01:01 }\nhost ce2_v6 { ip 2001:db8:60::20 mac 00:1c:73:20:02:02 }\n\ncompile {\n    // 1. Standalone 2-label SR-MPLS OAM probe over VLAN 400 (outer Node SID 16001, inner VPN label 24010)\n    pe1_v4 -> pe2_v4 mpls 16001 mpls 24010 exp 6 mplsttl 64 vlan 400 payload \"sr-oam-ping\" wait 2ms\n    // 2. L3VPN IPv4 HTTPS TLS ClientHello inside outer label 16002 + inner VPN label 24010\n    pe1_v4 -> pe2_v4 tcp syn srcport 52443 dstport 443 win 65535 mss 1440 vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63 wait 1ms\n    pe1_v4 <- pe2_v4 tcp syn ack win 65535 mss 1440 vlan 400 mpls 16001 mpls 24020 exp 4 mplsttl 63 wait 1ms\n    pe1_v4 -> pe2_v4 tcp ack vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63 wait 1ms\n    pe1_v4 -> pe2_v4 tls clienthello sni \"erp.vrf-prod.internal\" alpn \"h2\" vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63 wait 2ms\n    // 3. 6VPE IPv6 ICMPv6 Echo inside MPLS label stack (16002 -> 24055)\n    ce1_v6 -> ce2_v6 icmp echorequest id 9 seq 1 vlan 400 mpls 16002 mpls 24055 tc 5 mplsttl 62\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"MPLS (`mpls`): SR-MPLS L3VPN Core Transit Over 802.1Q Sub-Interfaces\" (mpls_sr_l3vpn.frasm). Scenario: Models two Provider Edge routers exchanging MPLS-labeled BGP control traffic, VoIP EF traffic (`exp 5`), and dual-stack IPv6 customer probes across VLAN 400. Verify with Wireshark filter `mpls`."},{"role":"assistant","content":"Sets Ethernet II (or inner VLAN/QinQ) EtherType to `0x8847` (MPLS Unicast). Automatically sets `bos 0` on outer transit/transport labels and `bos 1` on the innermost service label unless `bos` is explicitly overridden. Compile with `frameassembly show mpls_sr_l3vpn.frasm`.\n\n```frameassembly\nhost pe1_v4 { ip 10.100.1.10 mac 00:1c:73:10:01:01 }\nhost pe2_v4 { ip 10.100.2.20 mac 00:1c:73:20:02:02 }\nhost ce1_v6 { ip 2001:db8:50::10 mac 00:1c:73:10:01:01 }\nhost ce2_v6 { ip 2001:db8:60::20 mac 00:1c:73:20:02:02 }\n\ncompile {\n    // 1. Standalone 2-label SR-MPLS OAM probe over VLAN 400 (outer Node SID 16001, inner VPN label 24010)\n    pe1_v4 -> pe2_v4 mpls 16001 mpls 24010 exp 6 mplsttl 64 vlan 400 payload \"sr-oam-ping\" wait 2ms\n    // 2. L3VPN IPv4 HTTPS TLS ClientHello inside outer label 16002 + inner VPN label 24010\n    pe1_v4 -> pe2_v4 tcp syn srcport 52443 dstport 443 win 65535 mss 1440 vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63 wait 1ms\n    pe1_v4 <- pe2_v4 tcp syn ack win 65535 mss 1440 vlan 400 mpls 16001 mpls 24020 exp 4 mplsttl 63 wait 1ms\n    pe1_v4 -> pe2_v4 tcp ack vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63 wait 1ms\n    pe1_v4 -> pe2_v4 tls clienthello sni \"erp.vrf-prod.internal\" alpn \"h2\" vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63 wait 2ms\n    // 3. 6VPE IPv6 ICMPv6 Echo inside MPLS label stack (16002 -> 24055)\n    ce1_v6 -> ce2_v6 icmp echorequest id 9 seq 1 vlan 400 mpls 16002 mpls 24055 tc 5 mplsttl 62\n}\n```"}]}
{"id":"sft-cookbook-ex-l3-dual-stack-icmp-flow","task_type":"nl_to_frasm","protocols":["icmp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Dual-Stack IPv4 & IPv6 Reachability via Parameterized flow(a, b)\" (dual_stack_icmp_flow.frasm). Scenario: Reuses a single flow(src, dst) definition across both IPv4 and IPv6 host pairs so protocol builders automatically morph from IPv4 ICMP (Proto 1) to IPv6 ICMPv6 (Next Header 58). Verify with Wireshark filter `icmp || icmpv6`.","completion":"flowlabel 0x12345 applies to the IPv6 header and is cleanly ignored when the same flow runs over IPv4 endpoints. Compile with `frameassembly dual_stack_icmp_flow.frasm`.\n\n```frameassembly\nhost probe_v4 { ip 10.20.1.10 }\nhost core_v4  { ip 10.20.1.1 }\nhost probe_v6 { ip 2001:db8:20::10 }\nhost core_v6  { ip 2001:db8:20::1 }\n\nflow reachability_check(src, dst) {\n    src -> dst icmp echorequest id 0x4200 seq 1 dscp 46 ecn 2 flowlabel 0x12345 wait 2ms\n    src <- dst icmp echoreply id 0x4200 seq 1 dscp 46 ecn 2 flowlabel 0x12345 wait 5ms\n}\n\ncompile {\n    reachability_check(probe_v4, core_v4)\n    reachability_check(probe_v6, core_v6)\n}\n```","frasm_code":"host probe_v4 { ip 10.20.1.10 }\nhost core_v4  { ip 10.20.1.1 }\nhost probe_v6 { ip 2001:db8:20::10 }\nhost core_v6  { ip 2001:db8:20::1 }\n\nflow reachability_check(src, dst) {\n    src -> dst icmp echorequest id 0x4200 seq 1 dscp 46 ecn 2 flowlabel 0x12345 wait 2ms\n    src <- dst icmp echoreply id 0x4200 seq 1 dscp 46 ecn 2 flowlabel 0x12345 wait 5ms\n}\n\ncompile {\n    reachability_check(probe_v4, core_v4)\n    reachability_check(probe_v6, core_v6)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Dual-Stack IPv4 & IPv6 Reachability via Parameterized flow(a, b)\" (dual_stack_icmp_flow.frasm). Scenario: Reuses a single flow(src, dst) definition across both IPv4 and IPv6 host pairs so protocol builders automatically morph from IPv4 ICMP (Proto 1) to IPv6 ICMPv6 (Next Header 58). Verify with Wireshark filter `icmp || icmpv6`."},{"role":"assistant","content":"flowlabel 0x12345 applies to the IPv6 header and is cleanly ignored when the same flow runs over IPv4 endpoints. Compile with `frameassembly dual_stack_icmp_flow.frasm`.\n\n```frameassembly\nhost probe_v4 { ip 10.20.1.10 }\nhost core_v4  { ip 10.20.1.1 }\nhost probe_v6 { ip 2001:db8:20::10 }\nhost core_v6  { ip 2001:db8:20::1 }\n\nflow reachability_check(src, dst) {\n    src -> dst icmp echorequest id 0x4200 seq 1 dscp 46 ecn 2 flowlabel 0x12345 wait 2ms\n    src <- dst icmp echoreply id 0x4200 seq 1 dscp 46 ecn 2 flowlabel 0x12345 wait 5ms\n}\n\ncompile {\n    reachability_check(probe_v4, core_v4)\n    reachability_check(probe_v6, core_v6)\n}\n```"}]}
{"id":"sft-cookbook-ex-l3-ipv4-manual-fragmentation","task_type":"nl_to_frasm","protocols":["udp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IPv4 Multi-Fragment Reassembly Test (ipid, mf & fragoffset)\" (ipv4_fragment_reassembly.frasm). Scenario: Emits two correlated IPv4 UDP fragments sharing ipid 0x7788 to verify firewall fragment-reassembly engines and Suricata defrag thresholds. Verify with Wireshark filter `ip.id == 0x7788`.","completion":"Fragment 1 sets More-Fragments (mf) with fragoffset 0; Fragment 2 clears mf and sets fragoffset 2 (16-byte offset in 8-byte units). Compile with `frameassembly ipv4_fragment_reassembly.frasm`.\n\n```frameassembly\nhost sender_box { ip 172.16.30.10 }\nhost dpi_sensor { ip 172.16.30.50 }\n\ncompile {\n    sender_box -> dpi_sensor udp srcport 54100 dstport 9000 ipid 0x7788 mf fragoffset 0 payload \"FRAGMENT-PART-01\" wait 1ms\n    sender_box -> dpi_sensor udp srcport 54100 dstport 9000 ipid 0x7788 fragoffset 2 payload \"FRAGMENT-PART-02\"\n}\n```","frasm_code":"host sender_box { ip 172.16.30.10 }\nhost dpi_sensor { ip 172.16.30.50 }\n\ncompile {\n    sender_box -> dpi_sensor udp srcport 54100 dstport 9000 ipid 0x7788 mf fragoffset 0 payload \"FRAGMENT-PART-01\" wait 1ms\n    sender_box -> dpi_sensor udp srcport 54100 dstport 9000 ipid 0x7788 fragoffset 2 payload \"FRAGMENT-PART-02\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IPv4 Multi-Fragment Reassembly Test (ipid, mf & fragoffset)\" (ipv4_fragment_reassembly.frasm). Scenario: Emits two correlated IPv4 UDP fragments sharing ipid 0x7788 to verify firewall fragment-reassembly engines and Suricata defrag thresholds. Verify with Wireshark filter `ip.id == 0x7788`."},{"role":"assistant","content":"Fragment 1 sets More-Fragments (mf) with fragoffset 0; Fragment 2 clears mf and sets fragoffset 2 (16-byte offset in 8-byte units). Compile with `frameassembly ipv4_fragment_reassembly.frasm`.\n\n```frameassembly\nhost sender_box { ip 172.16.30.10 }\nhost dpi_sensor { ip 172.16.30.50 }\n\ncompile {\n    sender_box -> dpi_sensor udp srcport 54100 dstport 9000 ipid 0x7788 mf fragoffset 0 payload \"FRAGMENT-PART-01\" wait 1ms\n    sender_box -> dpi_sensor udp srcport 54100 dstport 9000 ipid 0x7788 fragoffset 2 payload \"FRAGMENT-PART-02\"\n}\n```"}]}
{"id":"sft-cookbook-ex-l3-traceroute-ttl-expiry","task_type":"nl_to_frasm","protocols":["udp","icmp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"UDP Traceroute Hop Expiration (TTL=1 Time Exceeded + Port Unreachable)\" (traceroute_ttl_hops.frasm). Scenario: Reproduces a classic Unix UDP traceroute across an intermediate router hop (TTL=1 -> ICMP Time Exceeded) followed by arrival at the target host (TTL=2 -> ICMP Port Unreachable). Verify with Wireshark filter `udp.port >= 33434 || icmp`.","completion":"ICMP Type 11 Code 0 marks transit TTL expiry; ICMP Type 3 Code 3 signals the final destination port 33435. Compile with `frameassembly traceroute_ttl_hops.frasm`.\n\n```frameassembly\nhost workstation { ip 10.10.0.25 }\nhost hop1_router { ip 10.10.0.1 }\nhost dest_server { ip 10.90.0.40 }\n\ncompile {\n    workstation -> dest_server udp srcport 51200 dstport 33434 ttl 1 payload \"probe-hop-1\" wait 2ms\n    hop1_router -> workstation icmp timeexceeded type 11 code 0 wait 5ms\n    workstation -> dest_server udp srcport 51200 dstport 33435 ttl 2 payload \"probe-hop-2\" wait 3ms\n    dest_server -> workstation icmp destunreach type 3 code 3\n}\n```","frasm_code":"host workstation { ip 10.10.0.25 }\nhost hop1_router { ip 10.10.0.1 }\nhost dest_server { ip 10.90.0.40 }\n\ncompile {\n    workstation -> dest_server udp srcport 51200 dstport 33434 ttl 1 payload \"probe-hop-1\" wait 2ms\n    hop1_router -> workstation icmp timeexceeded type 11 code 0 wait 5ms\n    workstation -> dest_server udp srcport 51200 dstport 33435 ttl 2 payload \"probe-hop-2\" wait 3ms\n    dest_server -> workstation icmp destunreach type 3 code 3\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"UDP Traceroute Hop Expiration (TTL=1 Time Exceeded + Port Unreachable)\" (traceroute_ttl_hops.frasm). Scenario: Reproduces a classic Unix UDP traceroute across an intermediate router hop (TTL=1 -> ICMP Time Exceeded) followed by arrival at the target host (TTL=2 -> ICMP Port Unreachable). Verify with Wireshark filter `udp.port >= 33434 || icmp`."},{"role":"assistant","content":"ICMP Type 11 Code 0 marks transit TTL expiry; ICMP Type 3 Code 3 signals the final destination port 33435. Compile with `frameassembly traceroute_ttl_hops.frasm`.\n\n```frameassembly\nhost workstation { ip 10.10.0.25 }\nhost hop1_router { ip 10.10.0.1 }\nhost dest_server { ip 10.90.0.40 }\n\ncompile {\n    workstation -> dest_server udp srcport 51200 dstport 33434 ttl 1 payload \"probe-hop-1\" wait 2ms\n    hop1_router -> workstation icmp timeexceeded type 11 code 0 wait 5ms\n    workstation -> dest_server udp srcport 51200 dstport 33435 ttl 2 payload \"probe-hop-2\" wait 3ms\n    dest_server -> workstation icmp destunreach type 3 code 3\n}\n```"}]}
{"id":"sft-cookbook-ex-l3-ipv6-slaac-ndp-dad","task_type":"nl_to_frasm","protocols":["ndp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IPv6 Router Discovery & Neighbor Solicitation / Advertisement (NDP)\" (ipv6_ndp_slaac_resolution.frasm). Scenario: Captures IPv6 Router Solicitation, Router Advertisement, and link-layer Neighbor Solicitation / Advertisement with Hop Limit 255. Verify with Wireshark filter `icmpv6`.","completion":"ndp automatically sets IPv6 Hop Limit to 255 per RFC 4861 so router anti-spoofing checks pass. Compile with `frameassembly ipv6_ndp_slaac_resolution.frasm`.\n\n```frameassembly\nhost host_v6   { ip fe80::21a:2bff:fe3c:4d5e mac 00:1a:2b:3c:4d:5e }\nhost router_v6 { ip fe80::1                   mac 00:1c:73:00:00:01 }\n\ncompile {\n    host_v6 -> router_v6 ndp routersolicit slla 00:1a:2b:3c:4d:5e wait 3ms\n    host_v6 <- router_v6 ndp routeradvert routerlifetime 1800 slla 00:1c:73:00:00:01 wait 5ms\n    host_v6 -> router_v6 ndp neighborsolicit target fe80::1 slla 00:1a:2b:3c:4d:5e wait 1ms\n    host_v6 <- router_v6 ndp neighboradvert target fe80::1 tlla 00:1c:73:00:00:01\n}\n```","frasm_code":"host host_v6   { ip fe80::21a:2bff:fe3c:4d5e mac 00:1a:2b:3c:4d:5e }\nhost router_v6 { ip fe80::1                   mac 00:1c:73:00:00:01 }\n\ncompile {\n    host_v6 -> router_v6 ndp routersolicit slla 00:1a:2b:3c:4d:5e wait 3ms\n    host_v6 <- router_v6 ndp routeradvert routerlifetime 1800 slla 00:1c:73:00:00:01 wait 5ms\n    host_v6 -> router_v6 ndp neighborsolicit target fe80::1 slla 00:1a:2b:3c:4d:5e wait 1ms\n    host_v6 <- router_v6 ndp neighboradvert target fe80::1 tlla 00:1c:73:00:00:01\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IPv6 Router Discovery & Neighbor Solicitation / Advertisement (NDP)\" (ipv6_ndp_slaac_resolution.frasm). Scenario: Captures IPv6 Router Solicitation, Router Advertisement, and link-layer Neighbor Solicitation / Advertisement with Hop Limit 255. Verify with Wireshark filter `icmpv6`."},{"role":"assistant","content":"ndp automatically sets IPv6 Hop Limit to 255 per RFC 4861 so router anti-spoofing checks pass. Compile with `frameassembly ipv6_ndp_slaac_resolution.frasm`.\n\n```frameassembly\nhost host_v6   { ip fe80::21a:2bff:fe3c:4d5e mac 00:1a:2b:3c:4d:5e }\nhost router_v6 { ip fe80::1                   mac 00:1c:73:00:00:01 }\n\ncompile {\n    host_v6 -> router_v6 ndp routersolicit slla 00:1a:2b:3c:4d:5e wait 3ms\n    host_v6 <- router_v6 ndp routeradvert routerlifetime 1800 slla 00:1c:73:00:00:01 wait 5ms\n    host_v6 -> router_v6 ndp neighborsolicit target fe80::1 slla 00:1a:2b:3c:4d:5e wait 1ms\n    host_v6 <- router_v6 ndp neighboradvert target fe80::1 tlla 00:1c:73:00:00:01\n}\n```"}]}
{"id":"sft-cookbook-lib-fw-pmtud-df-icmp","task_type":"nl_to_frasm","protocols":["tcp","http","icmp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Path MTU Discovery Check (IPv4 DF Bit + ICMP Fragmentation Needed)\" (fw_pmtud_df_check.frasm). Scenario: Checks that an edge firewall permits ICMP Type 3 Code 4 (Fragmentation Needed) when a Don't-Fragment (df) HTTPS segment hits a lower-MTU IPSec or GRE tunnel. Verify with Wireshark filter `ip.flags.df == 1 || (icmp.type == 3 && icmp.code == 4)`.","completion":"Blocking ICMP Type 3 Code 4 causes classic \"pings work, but HTTPS hangs\" tickets. Use df on IPv4 packets to set the Don't-Fragment bit cleanly. Compile with `frameassembly fw_pmtud_df_check.frasm`.\n\n```frameassembly\n// Branch client, VPN tunnel router (1400-byte MTU), and remote web server\nhost branch_client { ip 10.25.1.15 }\nhost vpn_router    { ip 10.25.1.1 }\nhost remote_web    { ip 10.90.5.80 }\n\ncompile {\n    // 1. Normal TCP 3-way handshake succeeds (small 60-byte packets pass any MTU)\n    branch_client -> remote_web tcp syn srcport 54210 dstport 80 win 65535 mss 1460 df wait 2ms\n    branch_client <- remote_web tcp syn ack win 65535 mss 1460 df wait 2ms\n    branch_client -> remote_web tcp ack df wait 1ms\n\n    // 2. Client sends HTTP request with Don't-Fragment (df) flag set\n    branch_client -> remote_web http post uri \"/upload\" hosthdr \"files.corp.internal\" body \"large-unfragmentable-payload-block\" df wait 2ms\n\n    // 3. Tunnel router notifies client to lower its packet size (ICMP Type 3, Code 4)\n    vpn_router -> branch_client icmp destunreach type 3 code 4\n}\n```","frasm_code":"// Branch client, VPN tunnel router (1400-byte MTU), and remote web server\nhost branch_client { ip 10.25.1.15 }\nhost vpn_router    { ip 10.25.1.1 }\nhost remote_web    { ip 10.90.5.80 }\n\ncompile {\n    // 1. Normal TCP 3-way handshake succeeds (small 60-byte packets pass any MTU)\n    branch_client -> remote_web tcp syn srcport 54210 dstport 80 win 65535 mss 1460 df wait 2ms\n    branch_client <- remote_web tcp syn ack win 65535 mss 1460 df wait 2ms\n    branch_client -> remote_web tcp ack df wait 1ms\n\n    // 2. Client sends HTTP request with Don't-Fragment (df) flag set\n    branch_client -> remote_web http post uri \"/upload\" hosthdr \"files.corp.internal\" body \"large-unfragmentable-payload-block\" df wait 2ms\n\n    // 3. Tunnel router notifies client to lower its packet size (ICMP Type 3, Code 4)\n    vpn_router -> branch_client icmp destunreach type 3 code 4\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Path MTU Discovery Check (IPv4 DF Bit + ICMP Fragmentation Needed)\" (fw_pmtud_df_check.frasm). Scenario: Checks that an edge firewall permits ICMP Type 3 Code 4 (Fragmentation Needed) when a Don't-Fragment (df) HTTPS segment hits a lower-MTU IPSec or GRE tunnel. Verify with Wireshark filter `ip.flags.df == 1 || (icmp.type == 3 && icmp.code == 4)`."},{"role":"assistant","content":"Blocking ICMP Type 3 Code 4 causes classic \"pings work, but HTTPS hangs\" tickets. Use df on IPv4 packets to set the Don't-Fragment bit cleanly. Compile with `frameassembly fw_pmtud_df_check.frasm`.\n\n```frameassembly\n// Branch client, VPN tunnel router (1400-byte MTU), and remote web server\nhost branch_client { ip 10.25.1.15 }\nhost vpn_router    { ip 10.25.1.1 }\nhost remote_web    { ip 10.90.5.80 }\n\ncompile {\n    // 1. Normal TCP 3-way handshake succeeds (small 60-byte packets pass any MTU)\n    branch_client -> remote_web tcp syn srcport 54210 dstport 80 win 65535 mss 1460 df wait 2ms\n    branch_client <- remote_web tcp syn ack win 65535 mss 1460 df wait 2ms\n    branch_client -> remote_web tcp ack df wait 1ms\n\n    // 2. Client sends HTTP request with Don't-Fragment (df) flag set\n    branch_client -> remote_web http post uri \"/upload\" hosthdr \"files.corp.internal\" body \"large-unfragmentable-payload-block\" df wait 2ms\n\n    // 3. Tunnel router notifies client to lower its packet size (ICMP Type 3, Code 4)\n    vpn_router -> branch_client icmp destunreach type 3 code 4\n}\n```"}]}
{"id":"sft-cookbook-lib-scan-icmp-ping-sweep","task_type":"nl_to_frasm","protocols":["icmp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"ICMP Ping Sweep (Live Replies vs. Host Unreachable)\" (scan_icmp_ping_sweep.frasm). Scenario: Pings three subnet targets in sequence: two active servers answer with Echo Reply, while the router reports Host Unreachable (Type 3, Code 1) for a dead address. Verify with Wireshark filter `icmp`.","completion":"Use this capture in Wireshark training to compare fast sub-millisecond LAN replies against router-generated ICMP Destination Unreachable responses. Compile with `frameassembly scan_icmp_ping_sweep.frasm`.\n\n```frameassembly\n// Admin workstation, branch router, and three target IPs\nhost admin_pc   { ip 10.12.0.50 }\nhost branch_rtr { ip 10.12.10.1 }\nhost dns_01     { ip 10.12.10.10 }\nhost print_01   { ip 10.12.10.20 }\nhost offline_pc { ip 10.12.10.99 }\n\ncompile {\n    // Target 1 (.10): Online DNS server replies in 1ms\n    admin_pc -> dns_01 icmp echorequest id 300 seq 1 wait 1ms\n    admin_pc <- dns_01 icmp echoreply id 300 seq 1 wait 3ms\n\n    // Target 2 (.20): Online printer replies in 2ms\n    admin_pc -> print_01 icmp echorequest id 300 seq 2 wait 2ms\n    admin_pc <- print_01 icmp echoreply id 300 seq 2 wait 3ms\n\n    // Target 3 (.99): Offline host -> Router returns ICMP Host Unreachable (Type 3, Code 1)\n    admin_pc -> offline_pc icmp echorequest id 300 seq 3 wait 15ms\n    branch_rtr -> admin_pc icmp destunreach type 3 code 1\n}\n```","frasm_code":"// Admin workstation, branch router, and three target IPs\nhost admin_pc   { ip 10.12.0.50 }\nhost branch_rtr { ip 10.12.10.1 }\nhost dns_01     { ip 10.12.10.10 }\nhost print_01   { ip 10.12.10.20 }\nhost offline_pc { ip 10.12.10.99 }\n\ncompile {\n    // Target 1 (.10): Online DNS server replies in 1ms\n    admin_pc -> dns_01 icmp echorequest id 300 seq 1 wait 1ms\n    admin_pc <- dns_01 icmp echoreply id 300 seq 1 wait 3ms\n\n    // Target 2 (.20): Online printer replies in 2ms\n    admin_pc -> print_01 icmp echorequest id 300 seq 2 wait 2ms\n    admin_pc <- print_01 icmp echoreply id 300 seq 2 wait 3ms\n\n    // Target 3 (.99): Offline host -> Router returns ICMP Host Unreachable (Type 3, Code 1)\n    admin_pc -> offline_pc icmp echorequest id 300 seq 3 wait 15ms\n    branch_rtr -> admin_pc icmp destunreach type 3 code 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"ICMP Ping Sweep (Live Replies vs. Host Unreachable)\" (scan_icmp_ping_sweep.frasm). Scenario: Pings three subnet targets in sequence: two active servers answer with Echo Reply, while the router reports Host Unreachable (Type 3, Code 1) for a dead address. Verify with Wireshark filter `icmp`."},{"role":"assistant","content":"Use this capture in Wireshark training to compare fast sub-millisecond LAN replies against router-generated ICMP Destination Unreachable responses. Compile with `frameassembly scan_icmp_ping_sweep.frasm`.\n\n```frameassembly\n// Admin workstation, branch router, and three target IPs\nhost admin_pc   { ip 10.12.0.50 }\nhost branch_rtr { ip 10.12.10.1 }\nhost dns_01     { ip 10.12.10.10 }\nhost print_01   { ip 10.12.10.20 }\nhost offline_pc { ip 10.12.10.99 }\n\ncompile {\n    // Target 1 (.10): Online DNS server replies in 1ms\n    admin_pc -> dns_01 icmp echorequest id 300 seq 1 wait 1ms\n    admin_pc <- dns_01 icmp echoreply id 300 seq 1 wait 3ms\n\n    // Target 2 (.20): Online printer replies in 2ms\n    admin_pc -> print_01 icmp echorequest id 300 seq 2 wait 2ms\n    admin_pc <- print_01 icmp echoreply id 300 seq 2 wait 3ms\n\n    // Target 3 (.99): Offline host -> Router returns ICMP Host Unreachable (Type 3, Code 1)\n    admin_pc -> offline_pc icmp echorequest id 300 seq 3 wait 15ms\n    branch_rtr -> admin_pc icmp destunreach type 3 code 1\n}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-icmp","task_type":"nl_to_frasm","protocols":["icmp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block ICMP / ICMPv6 (`icmp`) Quickstart\" (icmp_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Internet Control Message Protocol v4 & Dual-Stack ICMPv6 (IP Proto 1 (v4) / NextHdr 58 (v6), Dual-Stack Morphing (v4/v6)). Verify with Wireshark filter `icmp || icmpv6`.","completion":"Automatically selects IPv4 Protocol `1` (`0x0800`) over IPv4 endpoints or ICMPv6 Next Header `58` (`0x86dd`) over IPv6 endpoints. Compile with `frameassembly icmp_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block ICMP / ICMPv6 (`icmp`) Quickstart\" (icmp_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Internet Control Message Protocol v4 & Dual-Stack ICMPv6 (IP Proto 1 (v4) / NextHdr 58 (v6), Dual-Stack Morphing (v4/v6)). Verify with Wireshark filter `icmp || icmpv6`."},{"role":"assistant","content":"Automatically selects IPv4 Protocol `1` (`0x0800`) over IPv4 endpoints or ICMPv6 Next Header `58` (`0x86dd`) over IPv6 endpoints. Compile with `frameassembly icmp_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-ndp","task_type":"nl_to_frasm","protocols":["ndp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block IPv6 NDP (`ndp`) Quickstart\" (ndp_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for IPv6 Neighbor Discovery Protocol (ICMPv6 NextHdr 58 (Hop Limit 255), IPv6-Only). Verify with Wireshark filter `icmpv6.type >= 133 && icmpv6.type <= 137`.","completion":"Enforces IPv6 Hop Limit `255` (`ttl 255`) by default in accordance with RFC 4861 §6.1.2 / §7.1.1. Compile with `frameassembly ndp_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block IPv6 NDP (`ndp`) Quickstart\" (ndp_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for IPv6 Neighbor Discovery Protocol (ICMPv6 NextHdr 58 (Hop Limit 255), IPv6-Only). Verify with Wireshark filter `icmpv6.type >= 133 && icmpv6.type <= 137`."},{"role":"assistant","content":"Enforces IPv6 Hop Limit `255` (`ttl 255`) by default in accordance with RFC 4861 §6.1.2 / §7.1.1. Compile with `frameassembly ndp_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-igmp","task_type":"nl_to_frasm","protocols":["igmp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block IGMPv1/v2/v3 (`igmp`) Quickstart\" (igmp_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Internet Group Management Protocol v1, v2 & v3 (IPv4 Proto 2 (TTL 1), IPv4-Only). Verify with Wireshark filter `igmp`.","completion":"Encapsulates inside IPv4 Protocol `2` with link-local `ttl 1` by default. Compile with `frameassembly igmp_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block IGMPv1/v2/v3 (`igmp`) Quickstart\" (igmp_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Internet Group Management Protocol v1, v2 & v3 (IPv4 Proto 2 (TTL 1), IPv4-Only). Verify with Wireshark filter `igmp`."},{"role":"assistant","content":"Encapsulates inside IPv4 Protocol `2` with link-local `ttl 1` by default. Compile with `frameassembly igmp_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-mld","task_type":"nl_to_frasm","protocols":["mld"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block IPv6 MLD (`mld`) Quickstart\" (mld_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Multicast Listener Discovery v1 & v2 (IPv6) (ICMPv6 NextHdr 58 (Hop Limit 1), IPv6-Only). Verify with Wireshark filter `icmpv6.type >= 130 && icmpv6.type <= 132`.","completion":"Sets IPv6 Next Header to `58` (ICMPv6) and defaults Hop Limit (`ttl`) to `1` per RFC 2710. Compile with `frameassembly mld_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block IPv6 MLD (`mld`) Quickstart\" (mld_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Multicast Listener Discovery v1 & v2 (IPv6) (ICMPv6 NextHdr 58 (Hop Limit 1), IPv6-Only). Verify with Wireshark filter `icmpv6.type >= 130 && icmpv6.type <= 132`."},{"role":"assistant","content":"Sets IPv6 Next Header to `58` (ICMPv6) and defaults Hop Limit (`ttl`) to `1` per RFC 2710. Compile with `frameassembly mld_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-cookbook-proto-lab-icmp","task_type":"nl_to_frasm","protocols":["icmp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"ICMP / ICMPv6 (`icmp`): Dual-Stack Echo Flow Plus IPv4 Fragmentation-Needed & Traceroute TTL Expiry\" (icmp_dualstack_pmtud.frasm). Scenario: Reuses a `ping_test(src, dst)` flow across IPv4 and IPv6 hosts, then sends a router Time Exceeded (`ttl 1`) and Fragmentation Needed (`destunreach code 4`) reply. Verify with Wireshark filter `icmp || icmpv6`.","completion":"Automatically selects IPv4 Protocol `1` (`0x0800`) over IPv4 endpoints or ICMPv6 Next Header `58` (`0x86dd`) over IPv6 endpoints. Translates `echorequest` (`8` v4 / `128` v6), `echoreply` (`0` v4 / `129` v6), `destunreach` (`3` v4 / `1` v6), `timeexceeded` (`11` v4 / `3` v6), and `redirect` (`5` v4 / `137` v6). Compile with `frameassembly show icmp_dualstack_pmtud.frasm`.\n\n```frameassembly\nhost app_v4  { ip 10.10.0.25 }\nhost edge_v4 { ip 10.10.0.1 }\nhost app_v6  { ip 2001:db8:10::25 }\nhost edge_v6 { ip 2001:db8:10::1 }\n\nflow ping_test(src, dst) {\n    src -> dst icmp echorequest id 0x2026 seq 1 payload \"healthcheck-probe\" wait 1ms\n    src <- dst icmp echoreply id 0x2026 seq 1 payload \"healthcheck-probe\" wait 2ms\n}\n\ncompile {\n    ping_test(app_v4, edge_v4)\n    ping_test(app_v6, edge_v6)\n    // Traceroute hop 1 expiry + PMTUD Fragmentation Needed (Type 3, Code 4)\n    app_v4 -> edge_v4 icmp echorequest id 0x2026 seq 2 ttl 1 df wait 1ms\n    app_v4 <- edge_v4 icmp timeexceeded code 0 wait 2ms\n    app_v4 <- edge_v4 icmp destunreach code 4\n}\n```","frasm_code":"host app_v4  { ip 10.10.0.25 }\nhost edge_v4 { ip 10.10.0.1 }\nhost app_v6  { ip 2001:db8:10::25 }\nhost edge_v6 { ip 2001:db8:10::1 }\n\nflow ping_test(src, dst) {\n    src -> dst icmp echorequest id 0x2026 seq 1 payload \"healthcheck-probe\" wait 1ms\n    src <- dst icmp echoreply id 0x2026 seq 1 payload \"healthcheck-probe\" wait 2ms\n}\n\ncompile {\n    ping_test(app_v4, edge_v4)\n    ping_test(app_v6, edge_v6)\n    // Traceroute hop 1 expiry + PMTUD Fragmentation Needed (Type 3, Code 4)\n    app_v4 -> edge_v4 icmp echorequest id 0x2026 seq 2 ttl 1 df wait 1ms\n    app_v4 <- edge_v4 icmp timeexceeded code 0 wait 2ms\n    app_v4 <- edge_v4 icmp destunreach code 4\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"ICMP / ICMPv6 (`icmp`): Dual-Stack Echo Flow Plus IPv4 Fragmentation-Needed & Traceroute TTL Expiry\" (icmp_dualstack_pmtud.frasm). Scenario: Reuses a `ping_test(src, dst)` flow across IPv4 and IPv6 hosts, then sends a router Time Exceeded (`ttl 1`) and Fragmentation Needed (`destunreach code 4`) reply. Verify with Wireshark filter `icmp || icmpv6`."},{"role":"assistant","content":"Automatically selects IPv4 Protocol `1` (`0x0800`) over IPv4 endpoints or ICMPv6 Next Header `58` (`0x86dd`) over IPv6 endpoints. Translates `echorequest` (`8` v4 / `128` v6), `echoreply` (`0` v4 / `129` v6), `destunreach` (`3` v4 / `1` v6), `timeexceeded` (`11` v4 / `3` v6), and `redirect` (`5` v4 / `137` v6). Compile with `frameassembly show icmp_dualstack_pmtud.frasm`.\n\n```frameassembly\nhost app_v4  { ip 10.10.0.25 }\nhost edge_v4 { ip 10.10.0.1 }\nhost app_v6  { ip 2001:db8:10::25 }\nhost edge_v6 { ip 2001:db8:10::1 }\n\nflow ping_test(src, dst) {\n    src -> dst icmp echorequest id 0x2026 seq 1 payload \"healthcheck-probe\" wait 1ms\n    src <- dst icmp echoreply id 0x2026 seq 1 payload \"healthcheck-probe\" wait 2ms\n}\n\ncompile {\n    ping_test(app_v4, edge_v4)\n    ping_test(app_v6, edge_v6)\n    // Traceroute hop 1 expiry + PMTUD Fragmentation Needed (Type 3, Code 4)\n    app_v4 -> edge_v4 icmp echorequest id 0x2026 seq 2 ttl 1 df wait 1ms\n    app_v4 <- edge_v4 icmp timeexceeded code 0 wait 2ms\n    app_v4 <- edge_v4 icmp destunreach code 4\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-ndp","task_type":"nl_to_frasm","protocols":["ndp","vlan"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IPv6 NDP (`ndp`): IPv6 SLAAC Router Discovery Followed by Neighbor Solicitation & Advertisement\" (ndp_slaac_discovery.frasm). Scenario: Models a dual-interface IPv6 leaf node soliciting an upstream router (`routersolicit` -> `routeradvert`) before resolving next-hop MAC reachability (`neighborsolicit` -> `neighboradvert`). Verify with Wireshark filter `icmpv6.type >= 133 && icmpv6.type <= 137`.","completion":"Enforces IPv6 Hop Limit `255` (`ttl 255`) by default in accordance with RFC 4861 §6.1.2 / §7.1.1. Encodes exact ICMPv6 message bodies for `routersolicit` (`133`), `routeradvert` (`134`, `routerlifetime 1800`), `neighborsolicit` (`135`), `neighboradvert` (`136`, Solicited + Override flags set), and `redirect` (`137`). Compile with `frameassembly show ndp_slaac_discovery.frasm`.\n\n```frameassembly\nhost leaf_node { ip fe80::1b21:ff:feaa:10 mac 00:1b:21:aa:00:10 }\nhost core_rtr  { ip fe80::1c73:ff:febb:01 mac 00:1c:73:bb:00:01 }\n\ncompile {\n    // 1. Host sends Router Solicitation with Source Link-Layer Address (SLLA)\n    leaf_node -> core_rtr ndp routersolicit slla 00:1b:21:aa:00:10 vlan 100 wait 2ms\n    // 2. Router replies with Router Advertisement (30-minute router lifetime)\n    core_rtr -> leaf_node ndp routeradvert routerlifetime 1800 slla 00:1c:73:bb:00:01 vlan 100 wait 5ms\n    // 3. Neighbor Solicitation & Solicited+Override Neighbor Advertisement\n    leaf_node -> core_rtr ndp neighborsolicit target fe80::1c73:ff:febb:01 slla 00:1b:21:aa:00:10 vlan 100 wait 1ms\n    leaf_node <- core_rtr ndp neighboradvert target fe80::1c73:ff:febb:01 tlla 00:1c:73:bb:00:01 vlan 100\n}\n```","frasm_code":"host leaf_node { ip fe80::1b21:ff:feaa:10 mac 00:1b:21:aa:00:10 }\nhost core_rtr  { ip fe80::1c73:ff:febb:01 mac 00:1c:73:bb:00:01 }\n\ncompile {\n    // 1. Host sends Router Solicitation with Source Link-Layer Address (SLLA)\n    leaf_node -> core_rtr ndp routersolicit slla 00:1b:21:aa:00:10 vlan 100 wait 2ms\n    // 2. Router replies with Router Advertisement (30-minute router lifetime)\n    core_rtr -> leaf_node ndp routeradvert routerlifetime 1800 slla 00:1c:73:bb:00:01 vlan 100 wait 5ms\n    // 3. Neighbor Solicitation & Solicited+Override Neighbor Advertisement\n    leaf_node -> core_rtr ndp neighborsolicit target fe80::1c73:ff:febb:01 slla 00:1b:21:aa:00:10 vlan 100 wait 1ms\n    leaf_node <- core_rtr ndp neighboradvert target fe80::1c73:ff:febb:01 tlla 00:1c:73:bb:00:01 vlan 100\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IPv6 NDP (`ndp`): IPv6 SLAAC Router Discovery Followed by Neighbor Solicitation & Advertisement\" (ndp_slaac_discovery.frasm). Scenario: Models a dual-interface IPv6 leaf node soliciting an upstream router (`routersolicit` -> `routeradvert`) before resolving next-hop MAC reachability (`neighborsolicit` -> `neighboradvert`). Verify with Wireshark filter `icmpv6.type >= 133 && icmpv6.type <= 137`."},{"role":"assistant","content":"Enforces IPv6 Hop Limit `255` (`ttl 255`) by default in accordance with RFC 4861 §6.1.2 / §7.1.1. Encodes exact ICMPv6 message bodies for `routersolicit` (`133`), `routeradvert` (`134`, `routerlifetime 1800`), `neighborsolicit` (`135`), `neighboradvert` (`136`, Solicited + Override flags set), and `redirect` (`137`). Compile with `frameassembly show ndp_slaac_discovery.frasm`.\n\n```frameassembly\nhost leaf_node { ip fe80::1b21:ff:feaa:10 mac 00:1b:21:aa:00:10 }\nhost core_rtr  { ip fe80::1c73:ff:febb:01 mac 00:1c:73:bb:00:01 }\n\ncompile {\n    // 1. Host sends Router Solicitation with Source Link-Layer Address (SLLA)\n    leaf_node -> core_rtr ndp routersolicit slla 00:1b:21:aa:00:10 vlan 100 wait 2ms\n    // 2. Router replies with Router Advertisement (30-minute router lifetime)\n    core_rtr -> leaf_node ndp routeradvert routerlifetime 1800 slla 00:1c:73:bb:00:01 vlan 100 wait 5ms\n    // 3. Neighbor Solicitation & Solicited+Override Neighbor Advertisement\n    leaf_node -> core_rtr ndp neighborsolicit target fe80::1c73:ff:febb:01 slla 00:1b:21:aa:00:10 vlan 100 wait 1ms\n    leaf_node <- core_rtr ndp neighboradvert target fe80::1c73:ff:febb:01 tlla 00:1c:73:bb:00:01 vlan 100\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-igmp","task_type":"nl_to_frasm","protocols":["igmp","vlan"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IGMPv1/v2/v3 (`igmp`): VLAN-Tagged IGMPv2 Query,IGMPv3 Receiver Join, and IGMPv2 Fast Leave\" (igmp_snooping_vlan.frasm). Scenario: Demonstrates a multicast router polling VLAN 50, one receiver joining `239.255.10.1` via IGMPv3, and a second receiver joining and leaving via IGMPv2. Verify with Wireshark filter `igmp`.","completion":"Encapsulates inside IPv4 Protocol `2` with link-local `ttl 1` by default. Maps version + operation cleanly onto wire Type codes: `0x11` (`query`, 8B in v1/v2 or 12B in v3), `0x12` (`v1 report`), `0x16` (`v2 report`), `0x17` (`v2 leave`), and `0x22` (`v3 report` with `MODE_IS_EXCLUDE` Group Record). Compile with `frameassembly show igmp_snooping_vlan.frasm`.\n\n```frameassembly\nhost mcast_rtr { ip 10.50.0.1 }\nhost all_hosts { ip 224.0.0.1 }\nhost decoder_1 { ip 10.50.0.21 }\nhost decoder_2 { ip 10.50.0.22 }\n\ncompile {\n    // 1. General Query to 224.0.0.1 (auto-derives MAC 01:00:5e:00:00:01)\n    mcast_rtr -> all_hosts igmp v2 query group 0.0.0.0 maxresp 100 vlan 50 wait 4ms\n    // 2. Receiver 1 sends IGMPv3 Membership Report for 239.255.10.1\n    decoder_1 -> mcast_rtr igmp v3 report group 239.255.10.1 vlan 50 wait 3ms\n    // 3. Receiver 2 joins and then leaves 239.255.10.2 via IGMPv2\n    decoder_2 -> mcast_rtr igmp v2 report group 239.255.10.2 vlan 50 wait 20ms\n    decoder_2 -> mcast_rtr igmp v2 leave group 239.255.10.2 vlan 50\n}\n```","frasm_code":"host mcast_rtr { ip 10.50.0.1 }\nhost all_hosts { ip 224.0.0.1 }\nhost decoder_1 { ip 10.50.0.21 }\nhost decoder_2 { ip 10.50.0.22 }\n\ncompile {\n    // 1. General Query to 224.0.0.1 (auto-derives MAC 01:00:5e:00:00:01)\n    mcast_rtr -> all_hosts igmp v2 query group 0.0.0.0 maxresp 100 vlan 50 wait 4ms\n    // 2. Receiver 1 sends IGMPv3 Membership Report for 239.255.10.1\n    decoder_1 -> mcast_rtr igmp v3 report group 239.255.10.1 vlan 50 wait 3ms\n    // 3. Receiver 2 joins and then leaves 239.255.10.2 via IGMPv2\n    decoder_2 -> mcast_rtr igmp v2 report group 239.255.10.2 vlan 50 wait 20ms\n    decoder_2 -> mcast_rtr igmp v2 leave group 239.255.10.2 vlan 50\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IGMPv1/v2/v3 (`igmp`): VLAN-Tagged IGMPv2 Query,IGMPv3 Receiver Join, and IGMPv2 Fast Leave\" (igmp_snooping_vlan.frasm). Scenario: Demonstrates a multicast router polling VLAN 50, one receiver joining `239.255.10.1` via IGMPv3, and a second receiver joining and leaving via IGMPv2. Verify with Wireshark filter `igmp`."},{"role":"assistant","content":"Encapsulates inside IPv4 Protocol `2` with link-local `ttl 1` by default. Maps version + operation cleanly onto wire Type codes: `0x11` (`query`, 8B in v1/v2 or 12B in v3), `0x12` (`v1 report`), `0x16` (`v2 report`), `0x17` (`v2 leave`), and `0x22` (`v3 report` with `MODE_IS_EXCLUDE` Group Record). Compile with `frameassembly show igmp_snooping_vlan.frasm`.\n\n```frameassembly\nhost mcast_rtr { ip 10.50.0.1 }\nhost all_hosts { ip 224.0.0.1 }\nhost decoder_1 { ip 10.50.0.21 }\nhost decoder_2 { ip 10.50.0.22 }\n\ncompile {\n    // 1. General Query to 224.0.0.1 (auto-derives MAC 01:00:5e:00:00:01)\n    mcast_rtr -> all_hosts igmp v2 query group 0.0.0.0 maxresp 100 vlan 50 wait 4ms\n    // 2. Receiver 1 sends IGMPv3 Membership Report for 239.255.10.1\n    decoder_1 -> mcast_rtr igmp v3 report group 239.255.10.1 vlan 50 wait 3ms\n    // 3. Receiver 2 joins and then leaves 239.255.10.2 via IGMPv2\n    decoder_2 -> mcast_rtr igmp v2 report group 239.255.10.2 vlan 50 wait 20ms\n    decoder_2 -> mcast_rtr igmp v2 leave group 239.255.10.2 vlan 50\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-mld","task_type":"nl_to_frasm","protocols":["mld","vlan"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IPv6 MLD (`mld`): Link-Local MLD General Query, Solicited-Node Join, and Listener Done\" (mld_snooping_ipv6.frasm). Scenario: Simulates an IPv6 multicast router querying all link-local nodes (`ff02::1`), a subscriber reporting membership in `ff05::100`, and cleanly departing with `mld done`. Verify with Wireshark filter `icmpv6.type >= 130 && icmpv6.type <= 132`.","completion":"Sets IPv6 Next Header to `58` (ICMPv6) and defaults Hop Limit (`ttl`) to `1` per RFC 2710. Encodes ICMPv6 Type `130` (`query`), `131` (`report`), or `132` (`done`), 16-bit `Maximum Response Delay` (milliseconds), and 128-bit `Multicast Address`. Compile with `frameassembly show mld_snooping_ipv6.frasm`.\n\n```frameassembly\nhost querier_v6 { ip fe80::1c73:1 }\nhost all_nodes  { ip ff02::1 }\nhost all_rtrs   { ip ff02::2 }\nhost listener   { ip fe80::1b21:50 }\n\ncompile {\n    // 1. General MLD Query to ff02::1 (multicastaddr :: = all groups, 10000ms max delay)\n    querier_v6 -> all_nodes mld query multicastaddr :: maxrespdelay 10000 vlan 200 wait 4ms\n    // 2. Host joins site-local multicast stream ff05::100\n    listener -> querier_v6 mld report multicastaddr ff05::100 maxrespdelay 0 vlan 200 wait 25ms\n    // 3. Host sends MLD Done to all-routers multicast ff02::2 upon leaving\n    listener -> all_rtrs mld done multicastaddr ff05::100 vlan 200\n}\n```","frasm_code":"host querier_v6 { ip fe80::1c73:1 }\nhost all_nodes  { ip ff02::1 }\nhost all_rtrs   { ip ff02::2 }\nhost listener   { ip fe80::1b21:50 }\n\ncompile {\n    // 1. General MLD Query to ff02::1 (multicastaddr :: = all groups, 10000ms max delay)\n    querier_v6 -> all_nodes mld query multicastaddr :: maxrespdelay 10000 vlan 200 wait 4ms\n    // 2. Host joins site-local multicast stream ff05::100\n    listener -> querier_v6 mld report multicastaddr ff05::100 maxrespdelay 0 vlan 200 wait 25ms\n    // 3. Host sends MLD Done to all-routers multicast ff02::2 upon leaving\n    listener -> all_rtrs mld done multicastaddr ff05::100 vlan 200\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IPv6 MLD (`mld`): Link-Local MLD General Query, Solicited-Node Join, and Listener Done\" (mld_snooping_ipv6.frasm). Scenario: Simulates an IPv6 multicast router querying all link-local nodes (`ff02::1`), a subscriber reporting membership in `ff05::100`, and cleanly departing with `mld done`. Verify with Wireshark filter `icmpv6.type >= 130 && icmpv6.type <= 132`."},{"role":"assistant","content":"Sets IPv6 Next Header to `58` (ICMPv6) and defaults Hop Limit (`ttl`) to `1` per RFC 2710. Encodes ICMPv6 Type `130` (`query`), `131` (`report`), or `132` (`done`), 16-bit `Maximum Response Delay` (milliseconds), and 128-bit `Multicast Address`. Compile with `frameassembly show mld_snooping_ipv6.frasm`.\n\n```frameassembly\nhost querier_v6 { ip fe80::1c73:1 }\nhost all_nodes  { ip ff02::1 }\nhost all_rtrs   { ip ff02::2 }\nhost listener   { ip fe80::1b21:50 }\n\ncompile {\n    // 1. General MLD Query to ff02::1 (multicastaddr :: = all groups, 10000ms max delay)\n    querier_v6 -> all_nodes mld query multicastaddr :: maxrespdelay 10000 vlan 200 wait 4ms\n    // 2. Host joins site-local multicast stream ff05::100\n    listener -> querier_v6 mld report multicastaddr ff05::100 maxrespdelay 0 vlan 200 wait 25ms\n    // 3. Host sends MLD Done to all-routers multicast ff02::2 upon leaving\n    listener -> all_rtrs mld done multicastaddr ff05::100 vlan 200\n}\n```"}]}
{"id":"sft-cookbook-ex-tcp-rfc7323-options-teardown","task_type":"nl_to_frasm","protocols":["tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Full TCP Lifecycle: RFC 7323 Window Scale, SACK, Timestamps & 4-Way FIN\" (tcp_rfc7323_full_lifecycle.frasm). Scenario: Demonstrates a complete TCP connection from SYN option negotiation (mss, wscale, sackperm, tsval/tsecr) through bidirectional payload transfer and clean 4-way FIN-ACK close. Verify with Wireshark filter `tcp.port == 8443`.","completion":"FrameAssembly advances each direction seq by +1 on syn, +payload_len on data segments, and +1 on fin automatically. Compile with `frameassembly tcp_rfc7323_full_lifecycle.frasm`.\n\n```frameassembly\nhost app_client { ip 10.30.1.15 }\nhost api_srv    { ip 10.30.2.80 }\n\ncompile {\n    app_client -> api_srv tcp syn srcport 52843 dstport 8443 win 65535 mss 1460 wscale 7 sackperm tsval 1000 tsecr 0 wait 1ms\n    app_client <- api_srv tcp syn ack win 65535 mss 1460 wscale 7 sackperm tsval 4000 tsecr 1000 wait 1ms\n    app_client -> api_srv tcp ack tsval 1001 tsecr 4000 wait 2ms\n    app_client -> api_srv tcp psh ack tsval 1003 tsecr 4000 payload \"PING-API-V1\" wait 2ms\n    app_client <- api_srv tcp psh ack tsval 4002 tsecr 1003 payload \"PONG-API-OK\" wait 2ms\n    app_client -> api_srv tcp fin ack tsval 1005 tsecr 4002 wait 1ms\n    app_client <- api_srv tcp ack tsval 4003 tsecr 1005 wait 1ms\n    app_client <- api_srv tcp fin ack tsval 4004 tsecr 1005 wait 1ms\n    app_client -> api_srv tcp ack tsval 1006 tsecr 4004\n}\n```","frasm_code":"host app_client { ip 10.30.1.15 }\nhost api_srv    { ip 10.30.2.80 }\n\ncompile {\n    app_client -> api_srv tcp syn srcport 52843 dstport 8443 win 65535 mss 1460 wscale 7 sackperm tsval 1000 tsecr 0 wait 1ms\n    app_client <- api_srv tcp syn ack win 65535 mss 1460 wscale 7 sackperm tsval 4000 tsecr 1000 wait 1ms\n    app_client -> api_srv tcp ack tsval 1001 tsecr 4000 wait 2ms\n    app_client -> api_srv tcp psh ack tsval 1003 tsecr 4000 payload \"PING-API-V1\" wait 2ms\n    app_client <- api_srv tcp psh ack tsval 4002 tsecr 1003 payload \"PONG-API-OK\" wait 2ms\n    app_client -> api_srv tcp fin ack tsval 1005 tsecr 4002 wait 1ms\n    app_client <- api_srv tcp ack tsval 4003 tsecr 1005 wait 1ms\n    app_client <- api_srv tcp fin ack tsval 4004 tsecr 1005 wait 1ms\n    app_client -> api_srv tcp ack tsval 1006 tsecr 4004\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Full TCP Lifecycle: RFC 7323 Window Scale, SACK, Timestamps & 4-Way FIN\" (tcp_rfc7323_full_lifecycle.frasm). Scenario: Demonstrates a complete TCP connection from SYN option negotiation (mss, wscale, sackperm, tsval/tsecr) through bidirectional payload transfer and clean 4-way FIN-ACK close. Verify with Wireshark filter `tcp.port == 8443`."},{"role":"assistant","content":"FrameAssembly advances each direction seq by +1 on syn, +payload_len on data segments, and +1 on fin automatically. Compile with `frameassembly tcp_rfc7323_full_lifecycle.frasm`.\n\n```frameassembly\nhost app_client { ip 10.30.1.15 }\nhost api_srv    { ip 10.30.2.80 }\n\ncompile {\n    app_client -> api_srv tcp syn srcport 52843 dstport 8443 win 65535 mss 1460 wscale 7 sackperm tsval 1000 tsecr 0 wait 1ms\n    app_client <- api_srv tcp syn ack win 65535 mss 1460 wscale 7 sackperm tsval 4000 tsecr 1000 wait 1ms\n    app_client -> api_srv tcp ack tsval 1001 tsecr 4000 wait 2ms\n    app_client -> api_srv tcp psh ack tsval 1003 tsecr 4000 payload \"PING-API-V1\" wait 2ms\n    app_client <- api_srv tcp psh ack tsval 4002 tsecr 1003 payload \"PONG-API-OK\" wait 2ms\n    app_client -> api_srv tcp fin ack tsval 1005 tsecr 4002 wait 1ms\n    app_client <- api_srv tcp ack tsval 4003 tsecr 1005 wait 1ms\n    app_client <- api_srv tcp fin ack tsval 4004 tsecr 1005 wait 1ms\n    app_client -> api_srv tcp ack tsval 1006 tsecr 4004\n}\n```"}]}
{"id":"sft-cookbook-ex-tcp-out-of-order-gap-fill","task_type":"nl_to_frasm","protocols":["tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Out-of-Order TCP Segment Arrival & Gap Fill for DPI Stream Reassembly\" (tcp_out_of_order_reassembly.frasm). Scenario: Deliberately transmits bytes 9..16 (seq 1009) ahead of bytes 1..8 (seq 1001) to verify IDS/IPS TCP stream reassemblers reconstruct split signatures properly. Verify with Wireshark filter `tcp.analysis.out_of_order || tcp.port == 9090`.","completion":"Explicit seq overrides let you transmit segments out of sequence while keeping checksums valid. Compile with `frameassembly tcp_out_of_order_reassembly.frasm`.\n\n```frameassembly\nhost sender { ip 10.40.10.11 }\nhost sensor { ip 10.40.10.22 }\n\ncompile {\n    sender -> sensor tcp syn srcport 54090 dstport 9090 seq 1000 win 65535 mss 1460 wait 1ms\n    sender <- sensor tcp syn ack seq 5000 acknum 1001 win 65535 mss 1460 wait 1ms\n    sender -> sensor tcp ack seq 1001 acknum 5001 wait 1ms\n    // Send second 8-byte chunk first (seq 1009), then backfill missing gap (seq 1001)\n    sender -> sensor tcp psh ack seq 1009 acknum 5001 payload \"CHUNK-02\" wait 3ms\n    sender -> sensor tcp psh ack seq 1001 acknum 5001 payload \"CHUNK-01\" wait 2ms\n    sender <- sensor tcp ack seq 5001 acknum 1017\n}\n```","frasm_code":"host sender { ip 10.40.10.11 }\nhost sensor { ip 10.40.10.22 }\n\ncompile {\n    sender -> sensor tcp syn srcport 54090 dstport 9090 seq 1000 win 65535 mss 1460 wait 1ms\n    sender <- sensor tcp syn ack seq 5000 acknum 1001 win 65535 mss 1460 wait 1ms\n    sender -> sensor tcp ack seq 1001 acknum 5001 wait 1ms\n    // Send second 8-byte chunk first (seq 1009), then backfill missing gap (seq 1001)\n    sender -> sensor tcp psh ack seq 1009 acknum 5001 payload \"CHUNK-02\" wait 3ms\n    sender -> sensor tcp psh ack seq 1001 acknum 5001 payload \"CHUNK-01\" wait 2ms\n    sender <- sensor tcp ack seq 5001 acknum 1017\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Out-of-Order TCP Segment Arrival & Gap Fill for DPI Stream Reassembly\" (tcp_out_of_order_reassembly.frasm). Scenario: Deliberately transmits bytes 9..16 (seq 1009) ahead of bytes 1..8 (seq 1001) to verify IDS/IPS TCP stream reassemblers reconstruct split signatures properly. Verify with Wireshark filter `tcp.analysis.out_of_order || tcp.port == 9090`."},{"role":"assistant","content":"Explicit seq overrides let you transmit segments out of sequence while keeping checksums valid. Compile with `frameassembly tcp_out_of_order_reassembly.frasm`.\n\n```frameassembly\nhost sender { ip 10.40.10.11 }\nhost sensor { ip 10.40.10.22 }\n\ncompile {\n    sender -> sensor tcp syn srcport 54090 dstport 9090 seq 1000 win 65535 mss 1460 wait 1ms\n    sender <- sensor tcp syn ack seq 5000 acknum 1001 win 65535 mss 1460 wait 1ms\n    sender -> sensor tcp ack seq 1001 acknum 5001 wait 1ms\n    // Send second 8-byte chunk first (seq 1009), then backfill missing gap (seq 1001)\n    sender -> sensor tcp psh ack seq 1009 acknum 5001 payload \"CHUNK-02\" wait 3ms\n    sender -> sensor tcp psh ack seq 1001 acknum 5001 payload \"CHUNK-01\" wait 2ms\n    sender <- sensor tcp ack seq 5001 acknum 1017\n}\n```"}]}
{"id":"sft-cookbook-ex-tcp-dual-stack-flow","task_type":"nl_to_frasm","protocols":["tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Dual-Stack IPv4 + IPv6 Stateful TCP Handshake Template\" (tcp_dual_stack_template.frasm). Scenario: Validates load-balancer VIP listener readiness across both IPv4 and IPv6 frontends using one parameterized flow(c, s). Verify with Wireshark filter `tcp.port == 443`.","completion":"Each 4-tuple maintains an independent TCP sequence state table across IPv4 and IPv6 invocations. Compile with `frameassembly tcp_dual_stack_template.frasm`.\n\n```frameassembly\nhost edge_c4 { ip 198.51.100.12 }\nhost vip_s4  { ip 203.0.113.10 }\nhost edge_c6 { ip 2001:db8:100::12 }\nhost vip_s6  { ip 2001:db8:200::10 }\n\nflow lb_health_probe(c, s) {\n    c -> s tcp syn srcport 53443 dstport 443 win 65535 mss 1440 sackperm wait 1ms\n    c <- s tcp syn ack win 65535 mss 1440 sackperm wait 1ms\n    c -> s tcp ack wait 1ms\n    c -> s tcp fin ack wait 1ms\n    c <- s tcp fin ack wait 1ms\n    c -> s tcp ack\n}\n\ncompile {\n    lb_health_probe(edge_c4, vip_s4)\n    lb_health_probe(edge_c6, vip_s6)\n}\n```","frasm_code":"host edge_c4 { ip 198.51.100.12 }\nhost vip_s4  { ip 203.0.113.10 }\nhost edge_c6 { ip 2001:db8:100::12 }\nhost vip_s6  { ip 2001:db8:200::10 }\n\nflow lb_health_probe(c, s) {\n    c -> s tcp syn srcport 53443 dstport 443 win 65535 mss 1440 sackperm wait 1ms\n    c <- s tcp syn ack win 65535 mss 1440 sackperm wait 1ms\n    c -> s tcp ack wait 1ms\n    c -> s tcp fin ack wait 1ms\n    c <- s tcp fin ack wait 1ms\n    c -> s tcp ack\n}\n\ncompile {\n    lb_health_probe(edge_c4, vip_s4)\n    lb_health_probe(edge_c6, vip_s6)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Dual-Stack IPv4 + IPv6 Stateful TCP Handshake Template\" (tcp_dual_stack_template.frasm). Scenario: Validates load-balancer VIP listener readiness across both IPv4 and IPv6 frontends using one parameterized flow(c, s). Verify with Wireshark filter `tcp.port == 443`."},{"role":"assistant","content":"Each 4-tuple maintains an independent TCP sequence state table across IPv4 and IPv6 invocations. Compile with `frameassembly tcp_dual_stack_template.frasm`.\n\n```frameassembly\nhost edge_c4 { ip 198.51.100.12 }\nhost vip_s4  { ip 203.0.113.10 }\nhost edge_c6 { ip 2001:db8:100::12 }\nhost vip_s6  { ip 2001:db8:200::10 }\n\nflow lb_health_probe(c, s) {\n    c -> s tcp syn srcport 53443 dstport 443 win 65535 mss 1440 sackperm wait 1ms\n    c <- s tcp syn ack win 65535 mss 1440 sackperm wait 1ms\n    c -> s tcp ack wait 1ms\n    c -> s tcp fin ack wait 1ms\n    c <- s tcp fin ack wait 1ms\n    c -> s tcp ack\n}\n\ncompile {\n    lb_health_probe(edge_c4, vip_s4)\n    lb_health_probe(edge_c6, vip_s6)\n}\n```"}]}
{"id":"sft-cookbook-ex-sctp-4way-cookie-heartbeat","task_type":"nl_to_frasm","protocols":["sctp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Telecom SCTP 4-Way Cookie Handshake, S1AP Data, Heartbeat & Shutdown\" (sctp_telecom_4way_lifecycle.frasm). Scenario: Builds a complete RFC 4960 SCTP association on port 36412 (LTE S1AP) with Castagnoli CRC-32c checksums. Verify with Wireshark filter `sctp`.","completion":"Calculates hardware-polynomial SCTP CRC-32c over every INIT, INIT-ACK, COOKIE-ECHO, DATA, SACK, HEARTBEAT, and SHUTDOWN chunk. Compile with `frameassembly sctp_telecom_4way_lifecycle.frasm`.\n\n```frameassembly\nhost enodeb { ip 10.60.1.10 }\nhost mme_01 { ip 10.60.2.20 }\n\ncompile {\n    enodeb -> mme_01 sctp init srcport 36412 dstport 36412 vtag 0 tsn 1000 wait 1ms\n    enodeb <- mme_01 sctp initack vtag 0x11223344 tsn 2000 wait 1ms\n    enodeb -> mme_01 sctp cookieecho vtag 0x11223344 wait 1ms\n    enodeb <- mme_01 sctp cookieack vtag 0x55667788 wait 2ms\n    enodeb -> mme_01 sctp data vtag 0x11223344 tsn 1000 stream 0 ssn 0 ppid 18 payload \"S1SetupRequest\" wait 2ms\n    enodeb <- mme_01 sctp sack vtag 0x55667788 tsn 1000 wait 10ms\n    enodeb -> mme_01 sctp heartbeat vtag 0x11223344 wait 1ms\n    enodeb <- mme_01 sctp heartbeatack vtag 0x55667788 wait 2ms\n    enodeb -> mme_01 sctp shutdown vtag 0x11223344 wait 1ms\n    enodeb <- mme_01 sctp shutdownack vtag 0x55667788\n}\n```","frasm_code":"host enodeb { ip 10.60.1.10 }\nhost mme_01 { ip 10.60.2.20 }\n\ncompile {\n    enodeb -> mme_01 sctp init srcport 36412 dstport 36412 vtag 0 tsn 1000 wait 1ms\n    enodeb <- mme_01 sctp initack vtag 0x11223344 tsn 2000 wait 1ms\n    enodeb -> mme_01 sctp cookieecho vtag 0x11223344 wait 1ms\n    enodeb <- mme_01 sctp cookieack vtag 0x55667788 wait 2ms\n    enodeb -> mme_01 sctp data vtag 0x11223344 tsn 1000 stream 0 ssn 0 ppid 18 payload \"S1SetupRequest\" wait 2ms\n    enodeb <- mme_01 sctp sack vtag 0x55667788 tsn 1000 wait 10ms\n    enodeb -> mme_01 sctp heartbeat vtag 0x11223344 wait 1ms\n    enodeb <- mme_01 sctp heartbeatack vtag 0x55667788 wait 2ms\n    enodeb -> mme_01 sctp shutdown vtag 0x11223344 wait 1ms\n    enodeb <- mme_01 sctp shutdownack vtag 0x55667788\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Telecom SCTP 4-Way Cookie Handshake, S1AP Data, Heartbeat & Shutdown\" (sctp_telecom_4way_lifecycle.frasm). Scenario: Builds a complete RFC 4960 SCTP association on port 36412 (LTE S1AP) with Castagnoli CRC-32c checksums. Verify with Wireshark filter `sctp`."},{"role":"assistant","content":"Calculates hardware-polynomial SCTP CRC-32c over every INIT, INIT-ACK, COOKIE-ECHO, DATA, SACK, HEARTBEAT, and SHUTDOWN chunk. Compile with `frameassembly sctp_telecom_4way_lifecycle.frasm`.\n\n```frameassembly\nhost enodeb { ip 10.60.1.10 }\nhost mme_01 { ip 10.60.2.20 }\n\ncompile {\n    enodeb -> mme_01 sctp init srcport 36412 dstport 36412 vtag 0 tsn 1000 wait 1ms\n    enodeb <- mme_01 sctp initack vtag 0x11223344 tsn 2000 wait 1ms\n    enodeb -> mme_01 sctp cookieecho vtag 0x11223344 wait 1ms\n    enodeb <- mme_01 sctp cookieack vtag 0x55667788 wait 2ms\n    enodeb -> mme_01 sctp data vtag 0x11223344 tsn 1000 stream 0 ssn 0 ppid 18 payload \"S1SetupRequest\" wait 2ms\n    enodeb <- mme_01 sctp sack vtag 0x55667788 tsn 1000 wait 10ms\n    enodeb -> mme_01 sctp heartbeat vtag 0x11223344 wait 1ms\n    enodeb <- mme_01 sctp heartbeatack vtag 0x55667788 wait 2ms\n    enodeb -> mme_01 sctp shutdown vtag 0x11223344 wait 1ms\n    enodeb <- mme_01 sctp shutdownack vtag 0x55667788\n}\n```"}]}
{"id":"sft-cookbook-lib-fw-ssh-deny-rst","task_type":"nl_to_frasm","protocols":["tcp","icmp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Blocked Management SSH Policy (TCP RST + ICMP Admin Prohibited)\" (fw_ssh_deny_policy.frasm). Scenario: Simulates a firewall rejecting unauthorized user-VLAN SSH attempts into the out-of-band switch management subnet using both TCP RST-ACK and ICMP Type 3 Code 13. Verify with Wireshark filter `tcp.port == 22 || icmp.code == 13`.","completion":"Great for verifying SIEM alerts on blocked management-plane access and training helpdesk techs to tell the difference between a firewall Reset and a silent drop. Compile with `frameassembly fw_ssh_deny_policy.frasm`.\n\n```frameassembly\n// User workstation, internal firewall interface, and protected core switch\nhost user_laptop { ip 10.10.40.85 }\nhost mgmt_fw     { ip 10.10.40.1 }\nhost core_sw     { ip 10.99.0.10 }\n\ncompile {\n    // Attempt #1: Workstation tries TCP 22 (SSH) -> Rejected inline with TCP RST-ACK\n    user_laptop -> core_sw tcp syn srcport 53110 dstport 22 win 65535 mss 1460 wait 1ms\n    user_laptop <- core_sw tcp rst ack wait 10ms\n\n    // Attempt #2: Workstation retries TCP 22 -> Firewall returns ICMP Admin Prohibited (Type 3, Code 13)\n    user_laptop -> core_sw tcp syn srcport 53111 dstport 22 win 65535 mss 1460 wait 2ms\n    mgmt_fw -> user_laptop icmp destunreach type 3 code 13\n}\n```","frasm_code":"// User workstation, internal firewall interface, and protected core switch\nhost user_laptop { ip 10.10.40.85 }\nhost mgmt_fw     { ip 10.10.40.1 }\nhost core_sw     { ip 10.99.0.10 }\n\ncompile {\n    // Attempt #1: Workstation tries TCP 22 (SSH) -> Rejected inline with TCP RST-ACK\n    user_laptop -> core_sw tcp syn srcport 53110 dstport 22 win 65535 mss 1460 wait 1ms\n    user_laptop <- core_sw tcp rst ack wait 10ms\n\n    // Attempt #2: Workstation retries TCP 22 -> Firewall returns ICMP Admin Prohibited (Type 3, Code 13)\n    user_laptop -> core_sw tcp syn srcport 53111 dstport 22 win 65535 mss 1460 wait 2ms\n    mgmt_fw -> user_laptop icmp destunreach type 3 code 13\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Blocked Management SSH Policy (TCP RST + ICMP Admin Prohibited)\" (fw_ssh_deny_policy.frasm). Scenario: Simulates a firewall rejecting unauthorized user-VLAN SSH attempts into the out-of-band switch management subnet using both TCP RST-ACK and ICMP Type 3 Code 13. Verify with Wireshark filter `tcp.port == 22 || icmp.code == 13`."},{"role":"assistant","content":"Great for verifying SIEM alerts on blocked management-plane access and training helpdesk techs to tell the difference between a firewall Reset and a silent drop. Compile with `frameassembly fw_ssh_deny_policy.frasm`.\n\n```frameassembly\n// User workstation, internal firewall interface, and protected core switch\nhost user_laptop { ip 10.10.40.85 }\nhost mgmt_fw     { ip 10.10.40.1 }\nhost core_sw     { ip 10.99.0.10 }\n\ncompile {\n    // Attempt #1: Workstation tries TCP 22 (SSH) -> Rejected inline with TCP RST-ACK\n    user_laptop -> core_sw tcp syn srcport 53110 dstport 22 win 65535 mss 1460 wait 1ms\n    user_laptop <- core_sw tcp rst ack wait 10ms\n\n    // Attempt #2: Workstation retries TCP 22 -> Firewall returns ICMP Admin Prohibited (Type 3, Code 13)\n    user_laptop -> core_sw tcp syn srcport 53111 dstport 22 win 65535 mss 1460 wait 2ms\n    mgmt_fw -> user_laptop icmp destunreach type 3 code 13\n}\n```"}]}
{"id":"sft-cookbook-lib-scan-tcp-syn-ports","task_type":"nl_to_frasm","protocols":["tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"TCP SYN Half-Open Port Scan (Ports 22, 80, 443, 3389)\" (scan_tcp_syn_ports.frasm). Scenario: Models an Nmap-style -sS half-open port check across SSH (22), HTTP (80), HTTPS (443), and RDP (3389), contrasting open SYN-ACK ports against closed RST-ACK ports. Verify with Wireshark filter `tcp.flags.syn == 1 || tcp.flags.reset == 1`.","completion":"In a half-open SYN scan, the scanner immediately sends tcp rst after receiving syn ack instead of completing the 3rd handshake packet. Compile with `frameassembly scan_tcp_syn_ports.frasm`.\n\n```frameassembly\n// Vulnerability scanner checking common TCP ports on a Linux web server\nhost scanner { ip 10.10.99.10 }\nhost web_srv { ip 10.10.20.40 }\n\ncompile {\n    // Port 22 (SSH) -> Open: server sends SYN-ACK, scanner tears down with RST\n    scanner -> web_srv tcp syn srcport 55001 dstport 22 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    scanner -> web_srv tcp rst wait 2ms\n\n    // Port 80 (HTTP) -> Closed: server replies immediately with RST-ACK\n    scanner -> web_srv tcp syn srcport 55002 dstport 80 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp rst ack wait 2ms\n\n    // Port 443 (HTTPS) -> Open: server sends SYN-ACK, scanner tears down with RST\n    scanner -> web_srv tcp syn srcport 55003 dstport 443 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    scanner -> web_srv tcp rst wait 2ms\n\n    // Port 3389 (RDP) -> Closed: server replies with RST-ACK\n    scanner -> web_srv tcp syn srcport 55004 dstport 3389 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp rst ack\n}\n```","frasm_code":"// Vulnerability scanner checking common TCP ports on a Linux web server\nhost scanner { ip 10.10.99.10 }\nhost web_srv { ip 10.10.20.40 }\n\ncompile {\n    // Port 22 (SSH) -> Open: server sends SYN-ACK, scanner tears down with RST\n    scanner -> web_srv tcp syn srcport 55001 dstport 22 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    scanner -> web_srv tcp rst wait 2ms\n\n    // Port 80 (HTTP) -> Closed: server replies immediately with RST-ACK\n    scanner -> web_srv tcp syn srcport 55002 dstport 80 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp rst ack wait 2ms\n\n    // Port 443 (HTTPS) -> Open: server sends SYN-ACK, scanner tears down with RST\n    scanner -> web_srv tcp syn srcport 55003 dstport 443 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    scanner -> web_srv tcp rst wait 2ms\n\n    // Port 3389 (RDP) -> Closed: server replies with RST-ACK\n    scanner -> web_srv tcp syn srcport 55004 dstport 3389 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp rst ack\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"TCP SYN Half-Open Port Scan (Ports 22, 80, 443, 3389)\" (scan_tcp_syn_ports.frasm). Scenario: Models an Nmap-style -sS half-open port check across SSH (22), HTTP (80), HTTPS (443), and RDP (3389), contrasting open SYN-ACK ports against closed RST-ACK ports. Verify with Wireshark filter `tcp.flags.syn == 1 || tcp.flags.reset == 1`."},{"role":"assistant","content":"In a half-open SYN scan, the scanner immediately sends tcp rst after receiving syn ack instead of completing the 3rd handshake packet. Compile with `frameassembly scan_tcp_syn_ports.frasm`.\n\n```frameassembly\n// Vulnerability scanner checking common TCP ports on a Linux web server\nhost scanner { ip 10.10.99.10 }\nhost web_srv { ip 10.10.20.40 }\n\ncompile {\n    // Port 22 (SSH) -> Open: server sends SYN-ACK, scanner tears down with RST\n    scanner -> web_srv tcp syn srcport 55001 dstport 22 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    scanner -> web_srv tcp rst wait 2ms\n\n    // Port 80 (HTTP) -> Closed: server replies immediately with RST-ACK\n    scanner -> web_srv tcp syn srcport 55002 dstport 80 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp rst ack wait 2ms\n\n    // Port 443 (HTTPS) -> Open: server sends SYN-ACK, scanner tears down with RST\n    scanner -> web_srv tcp syn srcport 55003 dstport 443 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    scanner -> web_srv tcp rst wait 2ms\n\n    // Port 3389 (RDP) -> Closed: server replies with RST-ACK\n    scanner -> web_srv tcp syn srcport 55004 dstport 3389 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp rst ack\n}\n```"}]}
{"id":"sft-cookbook-lib-pentest-xmas-null-ids","task_type":"nl_to_frasm","protocols":["tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"TCP Xmas (FIN+PSH+URG), SYN+FIN & Stealth FIN Scan for IDS Validation\" (pentest_ids_xmas_scan.frasm). Scenario: Crafts abnormal TCP flag combinations (Xmas FIN+PSH+URG, illegal SYN+FIN, and unsolicited stealth FIN probe) to verify Suricata, Snort, or Zeek scan-detection rules fire in the lab. Verify with Wireshark filter `tcp.flags == 0x029 || tcp.flags == 0x003 || tcp.flags == 0x001`.","completion":"Replay against Suricata (suricata -r pentest_ids_xmas_scan.pcap) during purple-team validation without running live scanner binaries on production segments. Compile with `frameassembly pentest_ids_xmas_scan.frasm`.\n\n```frameassembly\n// Authorized purple-team host testing IDS/IPS abnormal TCP flag signatures\nhost red_lab_box { ip 172.18.99.50 }\nhost dmz_target  { ip 172.18.10.25 }\n\ncompile {\n    // 1. TCP Xmas Scan: lights up FIN + PSH + URG simultaneously on port 443\n    red_lab_box -> dmz_target tcp fin psh urg srcport 56101 dstport 443 win 1024 urgent 0 wait 2ms\n    red_lab_box <- dmz_target tcp rst ack wait 4ms\n\n    // 2. Illegal SYN + FIN combination: tests stateless ACL bypass rules on port 80\n    red_lab_box -> dmz_target tcp syn fin srcport 56102 dstport 80 win 1024 wait 2ms\n    red_lab_box <- dmz_target tcp rst ack wait 4ms\n\n    // 3. TCP FIN Stealth Scan (-sF): unsolicited lone FIN segment with custom seq 5000 on port 22\n    red_lab_box -> dmz_target tcp fin srcport 56103 dstport 22 seq 5000 win 1024\n}\n```","frasm_code":"// Authorized purple-team host testing IDS/IPS abnormal TCP flag signatures\nhost red_lab_box { ip 172.18.99.50 }\nhost dmz_target  { ip 172.18.10.25 }\n\ncompile {\n    // 1. TCP Xmas Scan: lights up FIN + PSH + URG simultaneously on port 443\n    red_lab_box -> dmz_target tcp fin psh urg srcport 56101 dstport 443 win 1024 urgent 0 wait 2ms\n    red_lab_box <- dmz_target tcp rst ack wait 4ms\n\n    // 2. Illegal SYN + FIN combination: tests stateless ACL bypass rules on port 80\n    red_lab_box -> dmz_target tcp syn fin srcport 56102 dstport 80 win 1024 wait 2ms\n    red_lab_box <- dmz_target tcp rst ack wait 4ms\n\n    // 3. TCP FIN Stealth Scan (-sF): unsolicited lone FIN segment with custom seq 5000 on port 22\n    red_lab_box -> dmz_target tcp fin srcport 56103 dstport 22 seq 5000 win 1024\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"TCP Xmas (FIN+PSH+URG), SYN+FIN & Stealth FIN Scan for IDS Validation\" (pentest_ids_xmas_scan.frasm). Scenario: Crafts abnormal TCP flag combinations (Xmas FIN+PSH+URG, illegal SYN+FIN, and unsolicited stealth FIN probe) to verify Suricata, Snort, or Zeek scan-detection rules fire in the lab. Verify with Wireshark filter `tcp.flags == 0x029 || tcp.flags == 0x003 || tcp.flags == 0x001`."},{"role":"assistant","content":"Replay against Suricata (suricata -r pentest_ids_xmas_scan.pcap) during purple-team validation without running live scanner binaries on production segments. Compile with `frameassembly pentest_ids_xmas_scan.frasm`.\n\n```frameassembly\n// Authorized purple-team host testing IDS/IPS abnormal TCP flag signatures\nhost red_lab_box { ip 172.18.99.50 }\nhost dmz_target  { ip 172.18.10.25 }\n\ncompile {\n    // 1. TCP Xmas Scan: lights up FIN + PSH + URG simultaneously on port 443\n    red_lab_box -> dmz_target tcp fin psh urg srcport 56101 dstport 443 win 1024 urgent 0 wait 2ms\n    red_lab_box <- dmz_target tcp rst ack wait 4ms\n\n    // 2. Illegal SYN + FIN combination: tests stateless ACL bypass rules on port 80\n    red_lab_box -> dmz_target tcp syn fin srcport 56102 dstport 80 win 1024 wait 2ms\n    red_lab_box <- dmz_target tcp rst ack wait 4ms\n\n    // 3. TCP FIN Stealth Scan (-sF): unsolicited lone FIN segment with custom seq 5000 on port 22\n    red_lab_box -> dmz_target tcp fin srcport 56103 dstport 22 seq 5000 win 1024\n}\n```"}]}
{"id":"sft-cookbook-lib-troubleshoot-tcp-zero-window","task_type":"nl_to_frasm","protocols":["tcp","http"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Application Stall: TCP Zero-Window & Retransmission\" (troubleshoot_zero_window.frasm). Scenario: Demonstrates the difference between a network packet drop (manual seq retransmission) and an overloaded server advertising TCP win 0 (\"buffer full, pause sending\"). Verify with Wireshark filter `tcp.analysis.zero_window || tcp.analysis.retransmission`.","completion":"When application teams blame the network for slow transfers, TCP ZeroWindow in Wireshark proves the receiving server paused the sender because its socket buffer filled up. Compile with `frameassembly troubleshoot_zero_window.frasm`.\n\n```frameassembly\n// Client uploading report data to a busy backend web server\nhost client_pc { ip 10.10.15.30 }\nhost busy_srv  { ip 10.10.80.40 }\n\ncompile {\n    // 1. Establish TCP connection on port 8080\n    client_pc -> busy_srv tcp syn srcport 51800 dstport 8080 win 65535 mss 1460 wait 1ms\n    client_pc <- busy_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    client_pc -> busy_srv tcp ack wait 1ms\n\n    // 2. Client sends HTTP POST; packet drops on WAN, so client retransmits same seq 1001 after 200ms\n    client_pc -> busy_srv http post uri \"/ingest\" hosthdr \"reports.corp.local\" body \"batch-01-payload\" wait 200ms\n    client_pc -> busy_srv seq 1001 http post uri \"/ingest\" hosthdr \"reports.corp.local\" body \"batch-01-payload\" wait 2ms\n\n    // 3. Overloaded server ACKs the data with win 0 (TCP ZeroWindow: socket buffer exhausted!)\n    client_pc <- busy_srv tcp ack win 0 wait 150ms\n\n    // 4. Server drains buffer and sends Window Update (win 32768) so transfer can resume\n    client_pc <- busy_srv tcp ack win 32768\n}\n```","frasm_code":"// Client uploading report data to a busy backend web server\nhost client_pc { ip 10.10.15.30 }\nhost busy_srv  { ip 10.10.80.40 }\n\ncompile {\n    // 1. Establish TCP connection on port 8080\n    client_pc -> busy_srv tcp syn srcport 51800 dstport 8080 win 65535 mss 1460 wait 1ms\n    client_pc <- busy_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    client_pc -> busy_srv tcp ack wait 1ms\n\n    // 2. Client sends HTTP POST; packet drops on WAN, so client retransmits same seq 1001 after 200ms\n    client_pc -> busy_srv http post uri \"/ingest\" hosthdr \"reports.corp.local\" body \"batch-01-payload\" wait 200ms\n    client_pc -> busy_srv seq 1001 http post uri \"/ingest\" hosthdr \"reports.corp.local\" body \"batch-01-payload\" wait 2ms\n\n    // 3. Overloaded server ACKs the data with win 0 (TCP ZeroWindow: socket buffer exhausted!)\n    client_pc <- busy_srv tcp ack win 0 wait 150ms\n\n    // 4. Server drains buffer and sends Window Update (win 32768) so transfer can resume\n    client_pc <- busy_srv tcp ack win 32768\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Application Stall: TCP Zero-Window & Retransmission\" (troubleshoot_zero_window.frasm). Scenario: Demonstrates the difference between a network packet drop (manual seq retransmission) and an overloaded server advertising TCP win 0 (\"buffer full, pause sending\"). Verify with Wireshark filter `tcp.analysis.zero_window || tcp.analysis.retransmission`."},{"role":"assistant","content":"When application teams blame the network for slow transfers, TCP ZeroWindow in Wireshark proves the receiving server paused the sender because its socket buffer filled up. Compile with `frameassembly troubleshoot_zero_window.frasm`.\n\n```frameassembly\n// Client uploading report data to a busy backend web server\nhost client_pc { ip 10.10.15.30 }\nhost busy_srv  { ip 10.10.80.40 }\n\ncompile {\n    // 1. Establish TCP connection on port 8080\n    client_pc -> busy_srv tcp syn srcport 51800 dstport 8080 win 65535 mss 1460 wait 1ms\n    client_pc <- busy_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    client_pc -> busy_srv tcp ack wait 1ms\n\n    // 2. Client sends HTTP POST; packet drops on WAN, so client retransmits same seq 1001 after 200ms\n    client_pc -> busy_srv http post uri \"/ingest\" hosthdr \"reports.corp.local\" body \"batch-01-payload\" wait 200ms\n    client_pc -> busy_srv seq 1001 http post uri \"/ingest\" hosthdr \"reports.corp.local\" body \"batch-01-payload\" wait 2ms\n\n    // 3. Overloaded server ACKs the data with win 0 (TCP ZeroWindow: socket buffer exhausted!)\n    client_pc <- busy_srv tcp ack win 0 wait 150ms\n\n    // 4. Server drains buffer and sends Window Update (win 32768) so transfer can resume\n    client_pc <- busy_srv tcp ack win 32768\n}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-tcp","task_type":"nl_to_frasm","protocols":["tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block TCP & RFC 7323 (`tcp`) Quickstart\" (tcp_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Transmission Control Protocol & RFC 7323 Options (IP Proto 6 (Default dstport 80), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `tcp`.","completion":"Tracks 4-tuple `(src_ip, dst_ip, src_port, dst_port)` sequence state starting at `seq 1000`—advancing `seq` by `+1` for `syn`/`fin` and `+payload_len` for data without manual arithmetic. Compile with `frameassembly tcp_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block TCP & RFC 7323 (`tcp`) Quickstart\" (tcp_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Transmission Control Protocol & RFC 7323 Options (IP Proto 6 (Default dstport 80), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `tcp`."},{"role":"assistant","content":"Tracks 4-tuple `(src_ip, dst_ip, src_port, dst_port)` sequence state starting at `seq 1000`—advancing `seq` by `+1` for `syn`/`fin` and `+payload_len` for data without manual arithmetic. Compile with `frameassembly tcp_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-udp","task_type":"nl_to_frasm","protocols":["udp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block UDP (`udp`) Quickstart\" (udp_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for User Datagram Protocol (IP Proto 17 (Default dstport 80), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `udp`.","completion":"Computes the 16-bit UDP Length (`8 + payload bytes`) and outer IPv4 Total Length / IPv6 Payload Length automatically. Compile with `frameassembly udp_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block UDP (`udp`) Quickstart\" (udp_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for User Datagram Protocol (IP Proto 17 (Default dstport 80), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `udp`."},{"role":"assistant","content":"Computes the 16-bit UDP Length (`8 + payload bytes`) and outer IPv4 Total Length / IPv6 Payload Length automatically. Compile with `frameassembly udp_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-sctp","task_type":"nl_to_frasm","protocols":["sctp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block SCTP (CRC-32c) (`sctp`) Quickstart\" (sctp_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Stream Control Transmission Protocol (IP Proto 132 (38412 NGAP / 36412 S1AP), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `sctp`.","completion":"Computes the 32-bit reflected Castagnoli CRC-32c checksum across the 12-byte SCTP Common Header and all padded chunk bytes. Compile with `frameassembly sctp_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block SCTP (CRC-32c) (`sctp`) Quickstart\" (sctp_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Stream Control Transmission Protocol (IP Proto 132 (38412 NGAP / 36412 S1AP), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `sctp`."},{"role":"assistant","content":"Computes the 32-bit reflected Castagnoli CRC-32c checksum across the 12-byte SCTP Common Header and all padded chunk bytes. Compile with `frameassembly sctp_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-cookbook-proto-lab-tcp","task_type":"nl_to_frasm","protocols":["tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"TCP & RFC 7323 (`tcp`): Full Lifecycle: RFC 7323 Handshake, ECN-Capable Data Exchange & Graceful FIN Close\" (tcp_rfc7323_lifecycle.frasm). Scenario: Captures a complete 7-packet TCP lifecycle with RFC 7323 timestamps (`tsval`/`tsecr`), selective ACK permission (`sackperm`), payload push (`psh ack`), and 4-way `fin ack` teardown. Verify with Wireshark filter `tcp`.","completion":"Tracks 4-tuple `(src_ip, dst_ip, src_port, dst_port)` sequence state starting at `seq 1000`—advancing `seq` by `+1` for `syn`/`fin` and `+payload_len` for data without manual arithmetic. Remembers `srcport 52400` and `dstport 443` from the opening `syn` so `<-` and `->` follow-up frames swap `443 <-> 52400` automatically. Compile with `frameassembly show tcp_rfc7323_lifecycle.frasm`.\n\n```frameassembly\nhost app_client { ip 172.16.20.10 }\nhost api_origin { ip 172.16.20.90 }\n\ncompile {\n    // 1. 3-way handshake negotiating MSS 1460, Window Scale 7, SACK, and Timestamps\n    app_client -> api_origin tcp syn srcport 54110 dstport 8443 win 65535 mss 1460 wscale 7 sackperm tsval 1000 tsecr 0 wait 1ms\n    app_client <- api_origin tcp syn ack win 65535 mss 1460 wscale 7 sackperm tsval 5000 tsecr 1000 wait 1ms\n    app_client -> api_origin tcp ack tsval 1001 tsecr 5000 wait 2ms\n    // 2. Bidirectional application payload (seq/acknum advance automatically by byte length)\n    app_client -> api_origin tcp psh ack tsval 1003 tsecr 5000 payload \"PING /healthz\\r\\n\" wait 2ms\n    app_client <- api_origin tcp psh ack tsval 5002 tsecr 1003 payload \"200 OK\\r\\n\" wait 3ms\n    // 3. Clean 3-packet FIN/ACK session close\n    app_client -> api_origin tcp fin ack tsval 1006 tsecr 5002 wait 1ms\n    app_client <- api_origin tcp fin ack tsval 5003 tsecr 1007 wait 1ms\n    app_client -> api_origin tcp ack tsval 1007 tsecr 5004\n}\n```","frasm_code":"host app_client { ip 172.16.20.10 }\nhost api_origin { ip 172.16.20.90 }\n\ncompile {\n    // 1. 3-way handshake negotiating MSS 1460, Window Scale 7, SACK, and Timestamps\n    app_client -> api_origin tcp syn srcport 54110 dstport 8443 win 65535 mss 1460 wscale 7 sackperm tsval 1000 tsecr 0 wait 1ms\n    app_client <- api_origin tcp syn ack win 65535 mss 1460 wscale 7 sackperm tsval 5000 tsecr 1000 wait 1ms\n    app_client -> api_origin tcp ack tsval 1001 tsecr 5000 wait 2ms\n    // 2. Bidirectional application payload (seq/acknum advance automatically by byte length)\n    app_client -> api_origin tcp psh ack tsval 1003 tsecr 5000 payload \"PING /healthz\\r\\n\" wait 2ms\n    app_client <- api_origin tcp psh ack tsval 5002 tsecr 1003 payload \"200 OK\\r\\n\" wait 3ms\n    // 3. Clean 3-packet FIN/ACK session close\n    app_client -> api_origin tcp fin ack tsval 1006 tsecr 5002 wait 1ms\n    app_client <- api_origin tcp fin ack tsval 5003 tsecr 1007 wait 1ms\n    app_client -> api_origin tcp ack tsval 1007 tsecr 5004\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"TCP & RFC 7323 (`tcp`): Full Lifecycle: RFC 7323 Handshake, ECN-Capable Data Exchange & Graceful FIN Close\" (tcp_rfc7323_lifecycle.frasm). Scenario: Captures a complete 7-packet TCP lifecycle with RFC 7323 timestamps (`tsval`/`tsecr`), selective ACK permission (`sackperm`), payload push (`psh ack`), and 4-way `fin ack` teardown. Verify with Wireshark filter `tcp`."},{"role":"assistant","content":"Tracks 4-tuple `(src_ip, dst_ip, src_port, dst_port)` sequence state starting at `seq 1000`—advancing `seq` by `+1` for `syn`/`fin` and `+payload_len` for data without manual arithmetic. Remembers `srcport 52400` and `dstport 443` from the opening `syn` so `<-` and `->` follow-up frames swap `443 <-> 52400` automatically. Compile with `frameassembly show tcp_rfc7323_lifecycle.frasm`.\n\n```frameassembly\nhost app_client { ip 172.16.20.10 }\nhost api_origin { ip 172.16.20.90 }\n\ncompile {\n    // 1. 3-way handshake negotiating MSS 1460, Window Scale 7, SACK, and Timestamps\n    app_client -> api_origin tcp syn srcport 54110 dstport 8443 win 65535 mss 1460 wscale 7 sackperm tsval 1000 tsecr 0 wait 1ms\n    app_client <- api_origin tcp syn ack win 65535 mss 1460 wscale 7 sackperm tsval 5000 tsecr 1000 wait 1ms\n    app_client -> api_origin tcp ack tsval 1001 tsecr 5000 wait 2ms\n    // 2. Bidirectional application payload (seq/acknum advance automatically by byte length)\n    app_client -> api_origin tcp psh ack tsval 1003 tsecr 5000 payload \"PING /healthz\\r\\n\" wait 2ms\n    app_client <- api_origin tcp psh ack tsval 5002 tsecr 1003 payload \"200 OK\\r\\n\" wait 3ms\n    // 3. Clean 3-packet FIN/ACK session close\n    app_client -> api_origin tcp fin ack tsval 1006 tsecr 5002 wait 1ms\n    app_client <- api_origin tcp fin ack tsval 5003 tsecr 1007 wait 1ms\n    app_client -> api_origin tcp ack tsval 1007 tsecr 5004\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-udp","task_type":"nl_to_frasm","protocols":["udp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"UDP (`udp`): Dual-Stack Custom Binary Telemetry Feed with QoS Marking\" (udp_dualstack_binary.frasm). Scenario: Uses a reusable `flow(tx, rx)` template to emit identical hex-encoded binary UDP frames marked `dscp 46` (EF) over both IPv4 and IPv6 endpoints. Verify with Wireshark filter `udp`.","completion":"Computes the 16-bit UDP Length (`8 + payload bytes`) and outer IPv4 Total Length / IPv6 Payload Length automatically. Calculates the ones'-complement pseudo-header checksum over IPv4 or IPv6 addresses, converting `0x0000` to `0xffff` per RFC 768 / RFC 8200. Compile with `frameassembly show udp_dualstack_binary.frasm`.\n\n```frameassembly\nhost feed_v4 { ip 192.0.2.10 }\nhost recv_v4 { ip 192.0.2.20 }\nhost feed_v6 { ip 2001:db8:feed::10 }\nhost recv_v6 { ip 2001:db8:feed::20 }\n\nflow telemetry_burst(tx, rx) {\n    tx -> rx udp srcport 55100 dstport 19500 dscp 46 hexpayload \"cafebabe00010008deadbeef\" wait 500us\n    tx -> rx udp dscp 46 hexpayload \"cafebabe0002000801020304\" wait 1ms\n    tx <- rx udp dscp 46 payload \"ACK:2\"\n}\n\ncompile {\n    telemetry_burst(feed_v4, recv_v4)\n    telemetry_burst(feed_v6, recv_v6)\n}\n```","frasm_code":"host feed_v4 { ip 192.0.2.10 }\nhost recv_v4 { ip 192.0.2.20 }\nhost feed_v6 { ip 2001:db8:feed::10 }\nhost recv_v6 { ip 2001:db8:feed::20 }\n\nflow telemetry_burst(tx, rx) {\n    tx -> rx udp srcport 55100 dstport 19500 dscp 46 hexpayload \"cafebabe00010008deadbeef\" wait 500us\n    tx -> rx udp dscp 46 hexpayload \"cafebabe0002000801020304\" wait 1ms\n    tx <- rx udp dscp 46 payload \"ACK:2\"\n}\n\ncompile {\n    telemetry_burst(feed_v4, recv_v4)\n    telemetry_burst(feed_v6, recv_v6)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"UDP (`udp`): Dual-Stack Custom Binary Telemetry Feed with QoS Marking\" (udp_dualstack_binary.frasm). Scenario: Uses a reusable `flow(tx, rx)` template to emit identical hex-encoded binary UDP frames marked `dscp 46` (EF) over both IPv4 and IPv6 endpoints. Verify with Wireshark filter `udp`."},{"role":"assistant","content":"Computes the 16-bit UDP Length (`8 + payload bytes`) and outer IPv4 Total Length / IPv6 Payload Length automatically. Calculates the ones'-complement pseudo-header checksum over IPv4 or IPv6 addresses, converting `0x0000` to `0xffff` per RFC 768 / RFC 8200. Compile with `frameassembly show udp_dualstack_binary.frasm`.\n\n```frameassembly\nhost feed_v4 { ip 192.0.2.10 }\nhost recv_v4 { ip 192.0.2.20 }\nhost feed_v6 { ip 2001:db8:feed::10 }\nhost recv_v6 { ip 2001:db8:feed::20 }\n\nflow telemetry_burst(tx, rx) {\n    tx -> rx udp srcport 55100 dstport 19500 dscp 46 hexpayload \"cafebabe00010008deadbeef\" wait 500us\n    tx -> rx udp dscp 46 hexpayload \"cafebabe0002000801020304\" wait 1ms\n    tx <- rx udp dscp 46 payload \"ACK:2\"\n}\n\ncompile {\n    telemetry_burst(feed_v4, recv_v4)\n    telemetry_burst(feed_v6, recv_v6)\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-sctp","task_type":"nl_to_frasm","protocols":["sctp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SCTP (CRC-32c) (`sctp`): Complete 5G N2 NGAP SCTP 4-Way Handshake, Data Transfer & Heartbeat\" (sctp_5g_ngap_association.frasm). Scenario: Models a 5G gNodeB establishing a full 4-way cookie handshake with an AMF on port 38412, transmitting an NGAP Setup Request (`ppid 60`), receiving `sack`, and exchanging `heartbeat` / `heartbeatack`. Verify with Wireshark filter `sctp`.","completion":"Computes the 32-bit reflected Castagnoli CRC-32c checksum across the 12-byte SCTP Common Header and all padded chunk bytes. Pads chunk payloads to 4-byte alignment per RFC 9260 while recording the exact unpadded length inside the Chunk Length field. Compile with `frameassembly show sctp_5g_ngap_association.frasm`.\n\n```frameassembly\nhost gnb_du { ip 172.20.10.11 }\nhost core_amf { ip 172.20.10.50 }\n\ncompile {\n    // 1. RFC 9260 4-way association handshake (INIT must carry vtag 0)\n    gnb_du -> core_amf sctp init srcport 38412 dstport 38412 vtag 0 tsn 1000 dscp 46 wait 1ms\n    gnb_du <- core_amf sctp initack vtag 0xa1b2c3d4 tsn 5000 dscp 46 wait 1ms\n    gnb_du -> core_amf sctp cookieecho vtag 0x55667788 dscp 46 wait 1ms\n    gnb_du <- core_amf sctp cookieack vtag 0xa1b2c3d4 dscp 46 wait 2ms\n    // 2. NGAP payload over Stream 0 (PPID 60 = 3GPP NGAP) + SACK acknowledgment\n    gnb_du -> core_amf sctp data vtag 0x55667788 tsn 1000 stream 0 ssn 0 ppid 60 dscp 46 hexpayload \"00150014000002001b00080000f110000001\" wait 1ms\n    gnb_du <- core_amf sctp sack vtag 0xa1b2c3d4 tsn 1000 dscp 46 wait 5ms\n    // 3. Path liveness probe\n    gnb_du -> core_amf sctp heartbeat vtag 0x55667788 wait 1ms\n    gnb_du <- core_amf sctp heartbeatack vtag 0xa1b2c3d4\n}\n```","frasm_code":"host gnb_du { ip 172.20.10.11 }\nhost core_amf { ip 172.20.10.50 }\n\ncompile {\n    // 1. RFC 9260 4-way association handshake (INIT must carry vtag 0)\n    gnb_du -> core_amf sctp init srcport 38412 dstport 38412 vtag 0 tsn 1000 dscp 46 wait 1ms\n    gnb_du <- core_amf sctp initack vtag 0xa1b2c3d4 tsn 5000 dscp 46 wait 1ms\n    gnb_du -> core_amf sctp cookieecho vtag 0x55667788 dscp 46 wait 1ms\n    gnb_du <- core_amf sctp cookieack vtag 0xa1b2c3d4 dscp 46 wait 2ms\n    // 2. NGAP payload over Stream 0 (PPID 60 = 3GPP NGAP) + SACK acknowledgment\n    gnb_du -> core_amf sctp data vtag 0x55667788 tsn 1000 stream 0 ssn 0 ppid 60 dscp 46 hexpayload \"00150014000002001b00080000f110000001\" wait 1ms\n    gnb_du <- core_amf sctp sack vtag 0xa1b2c3d4 tsn 1000 dscp 46 wait 5ms\n    // 3. Path liveness probe\n    gnb_du -> core_amf sctp heartbeat vtag 0x55667788 wait 1ms\n    gnb_du <- core_amf sctp heartbeatack vtag 0xa1b2c3d4\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SCTP (CRC-32c) (`sctp`): Complete 5G N2 NGAP SCTP 4-Way Handshake, Data Transfer & Heartbeat\" (sctp_5g_ngap_association.frasm). Scenario: Models a 5G gNodeB establishing a full 4-way cookie handshake with an AMF on port 38412, transmitting an NGAP Setup Request (`ppid 60`), receiving `sack`, and exchanging `heartbeat` / `heartbeatack`. Verify with Wireshark filter `sctp`."},{"role":"assistant","content":"Computes the 32-bit reflected Castagnoli CRC-32c checksum across the 12-byte SCTP Common Header and all padded chunk bytes. Pads chunk payloads to 4-byte alignment per RFC 9260 while recording the exact unpadded length inside the Chunk Length field. Compile with `frameassembly show sctp_5g_ngap_association.frasm`.\n\n```frameassembly\nhost gnb_du { ip 172.20.10.11 }\nhost core_amf { ip 172.20.10.50 }\n\ncompile {\n    // 1. RFC 9260 4-way association handshake (INIT must carry vtag 0)\n    gnb_du -> core_amf sctp init srcport 38412 dstport 38412 vtag 0 tsn 1000 dscp 46 wait 1ms\n    gnb_du <- core_amf sctp initack vtag 0xa1b2c3d4 tsn 5000 dscp 46 wait 1ms\n    gnb_du -> core_amf sctp cookieecho vtag 0x55667788 dscp 46 wait 1ms\n    gnb_du <- core_amf sctp cookieack vtag 0xa1b2c3d4 dscp 46 wait 2ms\n    // 2. NGAP payload over Stream 0 (PPID 60 = 3GPP NGAP) + SACK acknowledgment\n    gnb_du -> core_amf sctp data vtag 0x55667788 tsn 1000 stream 0 ssn 0 ppid 60 dscp 46 hexpayload \"00150014000002001b00080000f110000001\" wait 1ms\n    gnb_du <- core_amf sctp sack vtag 0xa1b2c3d4 tsn 1000 dscp 46 wait 5ms\n    // 3. Path liveness probe\n    gnb_du -> core_amf sctp heartbeat vtag 0x55667788 wait 1ms\n    gnb_du <- core_amf sctp heartbeatack vtag 0xa1b2c3d4\n}\n```"}]}
{"id":"sft-cookbook-ex-routing-bgp-bfd-fast-failover","task_type":"nl_to_frasm","protocols":["tcp","bgp","bfd"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"eBGP Session Bring-Up Paired with 50ms BFD Echo Liveness\" (ebgp_with_bfd_timers.frasm). Scenario: Establishes an eBGP session on TCP 179 (AS 65001 <-> AS 65002), exchanges an IPv4 prefix update, and runs rapid UDP 3784 BFD control packets alongside it. Verify with Wireshark filter `bgp || bfd`.","completion":"Combines stateful TCP 179 BGP framing (marker, OPEN, KEEPALIVE, UPDATE) with UDP 3784 BFD state 3 (Up) timers. Compile with `frameassembly ebgp_with_bfd_timers.frasm`.\n\n```frameassembly\nhost edge_rtr1 { ip 198.51.100.1 }\nhost isp_rtr2  { ip 198.51.100.2 }\n\ncompile {\n    edge_rtr1 -> isp_rtr2 tcp syn srcport 54179 dstport 179 ttl 1 dscp 48 wait 1ms\n    edge_rtr1 <- isp_rtr2 tcp syn ack ttl 1 dscp 48 wait 1ms\n    edge_rtr1 -> isp_rtr2 tcp ack ttl 1 dscp 48 wait 1ms\n    edge_rtr1 -> isp_rtr2 bgp open asn 65001 holdtime 90 bgpid 198.51.100.1 ttl 1 dscp 48 wait 2ms\n    edge_rtr1 <- isp_rtr2 bgp open asn 65002 holdtime 90 bgpid 198.51.100.2 ttl 1 dscp 48 wait 2ms\n    edge_rtr1 -> isp_rtr2 bgp keepalive ttl 1 dscp 48 wait 1ms\n    edge_rtr1 <- isp_rtr2 bgp keepalive ttl 1 dscp 48 wait 2ms\n    edge_rtr1 -> isp_rtr2 bgp update prefix \"203.0.113.0/24\" nexthop 198.51.100.1 asn 65001 ttl 1 dscp 48 wait 5ms\n    edge_rtr1 -> isp_rtr2 bfd state 3 diag 0 mydisc 0x1001 yourdisc 0x2002 mintx 50000 minrx 50000 mult 3 ttl 255 wait 50ms\n    edge_rtr1 <- isp_rtr2 bfd state 3 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 ttl 255\n}\n```","frasm_code":"host edge_rtr1 { ip 198.51.100.1 }\nhost isp_rtr2  { ip 198.51.100.2 }\n\ncompile {\n    edge_rtr1 -> isp_rtr2 tcp syn srcport 54179 dstport 179 ttl 1 dscp 48 wait 1ms\n    edge_rtr1 <- isp_rtr2 tcp syn ack ttl 1 dscp 48 wait 1ms\n    edge_rtr1 -> isp_rtr2 tcp ack ttl 1 dscp 48 wait 1ms\n    edge_rtr1 -> isp_rtr2 bgp open asn 65001 holdtime 90 bgpid 198.51.100.1 ttl 1 dscp 48 wait 2ms\n    edge_rtr1 <- isp_rtr2 bgp open asn 65002 holdtime 90 bgpid 198.51.100.2 ttl 1 dscp 48 wait 2ms\n    edge_rtr1 -> isp_rtr2 bgp keepalive ttl 1 dscp 48 wait 1ms\n    edge_rtr1 <- isp_rtr2 bgp keepalive ttl 1 dscp 48 wait 2ms\n    edge_rtr1 -> isp_rtr2 bgp update prefix \"203.0.113.0/24\" nexthop 198.51.100.1 asn 65001 ttl 1 dscp 48 wait 5ms\n    edge_rtr1 -> isp_rtr2 bfd state 3 diag 0 mydisc 0x1001 yourdisc 0x2002 mintx 50000 minrx 50000 mult 3 ttl 255 wait 50ms\n    edge_rtr1 <- isp_rtr2 bfd state 3 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 ttl 255\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"eBGP Session Bring-Up Paired with 50ms BFD Echo Liveness\" (ebgp_with_bfd_timers.frasm). Scenario: Establishes an eBGP session on TCP 179 (AS 65001 <-> AS 65002), exchanges an IPv4 prefix update, and runs rapid UDP 3784 BFD control packets alongside it. Verify with Wireshark filter `bgp || bfd`."},{"role":"assistant","content":"Combines stateful TCP 179 BGP framing (marker, OPEN, KEEPALIVE, UPDATE) with UDP 3784 BFD state 3 (Up) timers. Compile with `frameassembly ebgp_with_bfd_timers.frasm`.\n\n```frameassembly\nhost edge_rtr1 { ip 198.51.100.1 }\nhost isp_rtr2  { ip 198.51.100.2 }\n\ncompile {\n    edge_rtr1 -> isp_rtr2 tcp syn srcport 54179 dstport 179 ttl 1 dscp 48 wait 1ms\n    edge_rtr1 <- isp_rtr2 tcp syn ack ttl 1 dscp 48 wait 1ms\n    edge_rtr1 -> isp_rtr2 tcp ack ttl 1 dscp 48 wait 1ms\n    edge_rtr1 -> isp_rtr2 bgp open asn 65001 holdtime 90 bgpid 198.51.100.1 ttl 1 dscp 48 wait 2ms\n    edge_rtr1 <- isp_rtr2 bgp open asn 65002 holdtime 90 bgpid 198.51.100.2 ttl 1 dscp 48 wait 2ms\n    edge_rtr1 -> isp_rtr2 bgp keepalive ttl 1 dscp 48 wait 1ms\n    edge_rtr1 <- isp_rtr2 bgp keepalive ttl 1 dscp 48 wait 2ms\n    edge_rtr1 -> isp_rtr2 bgp update prefix \"203.0.113.0/24\" nexthop 198.51.100.1 asn 65001 ttl 1 dscp 48 wait 5ms\n    edge_rtr1 -> isp_rtr2 bfd state 3 diag 0 mydisc 0x1001 yourdisc 0x2002 mintx 50000 minrx 50000 mult 3 ttl 255 wait 50ms\n    edge_rtr1 <- isp_rtr2 bfd state 3 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 ttl 255\n}\n```"}]}
{"id":"sft-cookbook-ex-routing-fhrp-vrrp-and-hsrp","task_type":"nl_to_frasm","protocols":["vlan","vrrp","hsrp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"First-Hop Gateway Redundancy Comparison (VRRPv3 + HSRPv1)\" (fhrp_vrrp_and_hsrp.frasm). Scenario: Models active/standby gateway heartbeats on two VLANs—VLAN 10 running standard VRRP (IP Proto 112) and VLAN 20 running Cisco HSRP (UDP 1985). Verify with Wireshark filter `vrrp || hsrp`.","completion":"VRRP sets TTL=255 automatically; HSRP validates hellotime 3 (u8 seconds) and active state 16. Compile with `frameassembly fhrp_vrrp_and_hsrp.frasm`.\n\n```frameassembly\nhost core_gw_a  { ip 10.10.0.2 mac 00:00:5e:00:01:0a }\nhost vrrp_mcast { ip 224.0.0.18 }\nhost dist_gw_a  { ip 10.20.0.2 mac 00:00:0c:07:ac:14 }\nhost hsrp_mcast { ip 224.0.0.2 }\n\ncompile {\n    core_gw_a -> vrrp_mcast vlan 10 vrrp vrid 10 priority 120 advint 1 vip 10.10.0.1 wait 5ms\n    dist_gw_a -> hsrp_mcast vlan 20 hsrp group 20 priority 110 state 16 hellotime 3 vip 10.20.0.1\n}\n```","frasm_code":"host core_gw_a  { ip 10.10.0.2 mac 00:00:5e:00:01:0a }\nhost vrrp_mcast { ip 224.0.0.18 }\nhost dist_gw_a  { ip 10.20.0.2 mac 00:00:0c:07:ac:14 }\nhost hsrp_mcast { ip 224.0.0.2 }\n\ncompile {\n    core_gw_a -> vrrp_mcast vlan 10 vrrp vrid 10 priority 120 advint 1 vip 10.10.0.1 wait 5ms\n    dist_gw_a -> hsrp_mcast vlan 20 hsrp group 20 priority 110 state 16 hellotime 3 vip 10.20.0.1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"First-Hop Gateway Redundancy Comparison (VRRPv3 + HSRPv1)\" (fhrp_vrrp_and_hsrp.frasm). Scenario: Models active/standby gateway heartbeats on two VLANs—VLAN 10 running standard VRRP (IP Proto 112) and VLAN 20 running Cisco HSRP (UDP 1985). Verify with Wireshark filter `vrrp || hsrp`."},{"role":"assistant","content":"VRRP sets TTL=255 automatically; HSRP validates hellotime 3 (u8 seconds) and active state 16. Compile with `frameassembly fhrp_vrrp_and_hsrp.frasm`.\n\n```frameassembly\nhost core_gw_a  { ip 10.10.0.2 mac 00:00:5e:00:01:0a }\nhost vrrp_mcast { ip 224.0.0.18 }\nhost dist_gw_a  { ip 10.20.0.2 mac 00:00:0c:07:ac:14 }\nhost hsrp_mcast { ip 224.0.0.2 }\n\ncompile {\n    core_gw_a -> vrrp_mcast vlan 10 vrrp vrid 10 priority 120 advint 1 vip 10.10.0.1 wait 5ms\n    dist_gw_a -> hsrp_mcast vlan 20 hsrp group 20 priority 110 state 16 hellotime 3 vip 10.20.0.1\n}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-bgp","task_type":"nl_to_frasm","protocols":["bgp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block BGP-4 / 4-Byte ASN (`bgp`) Quickstart\" (bgp_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Border Gateway Protocol 4 & 4-Byte ASN Capability (TCP 179, Dual-Stack IPv4/IPv6). Verify with Wireshark filter `bgp`.","completion":"Tracks TCP sequence and acknowledgment numbers automatically on port `179` (`psh ack` flags set by default) and prepends the 16-byte `ff..ff` BGP marker. Compile with `frameassembly bgp_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block BGP-4 / 4-Byte ASN (`bgp`) Quickstart\" (bgp_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Border Gateway Protocol 4 & 4-Byte ASN Capability (TCP 179, Dual-Stack IPv4/IPv6). Verify with Wireshark filter `bgp`."},{"role":"assistant","content":"Tracks TCP sequence and acknowledgment numbers automatically on port `179` (`psh ack` flags set by default) and prepends the 16-byte `ff..ff` BGP marker. Compile with `frameassembly bgp_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-ospf","task_type":"nl_to_frasm","protocols":["ospf"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block OSPFv2 / OSPFv3 (`ospf`) Quickstart\" (ospf_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Open Shortest Path First — OSPFv2 & Dual-Stack OSPFv3 (IP Proto 89 (TTL 1), Dual-Stack Morphing (v4/v6)). Verify with Wireshark filter `ospf`.","completion":"Selects OSPFv2 (24B header, IPv4 Proto `89`) over IPv4 hosts or OSPFv3 (16B header, IPv6 Next Header `89`, IPv6 pseudo-header checksum) over IPv6 hosts. Compile with `frameassembly ospf_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block OSPFv2 / OSPFv3 (`ospf`) Quickstart\" (ospf_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Open Shortest Path First — OSPFv2 & Dual-Stack OSPFv3 (IP Proto 89 (TTL 1), Dual-Stack Morphing (v4/v6)). Verify with Wireshark filter `ospf`."},{"role":"assistant","content":"Selects OSPFv2 (24B header, IPv4 Proto `89`) over IPv4 hosts or OSPFv3 (16B header, IPv6 Next Header `89`, IPv6 pseudo-header checksum) over IPv6 hosts. Compile with `frameassembly ospf_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-bfd","task_type":"nl_to_frasm","protocols":["bfd"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block BFD (`bfd`) Quickstart\" (bfd_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Bidirectional Forwarding Detection Control Packet (UDP 3784 (Multihop 4784, TTL 255), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `bfd`.","completion":"Defaults UDP `srcport` to RFC 5881 range (`49152+`), `dstport` to `3784`, and IP `ttl` / Hop Limit to `255`. Compile with `frameassembly bfd_quickstart.frasm`.\n\n```frameassembly\nhost rtr_leaf  { ip 172.16.0.1 }\nhost rtr_spine { ip 172.16.0.2 }\n\ncompile {\n    rtr_leaf -> rtr_spine bfd state 3 mydisc 101 yourdisc 202 mintx 50000 minrx 50000 mult 3 wait 50ms\n    rtr_leaf <- rtr_spine bfd state 3 mydisc 202 yourdisc 101 mintx 50000 minrx 50000 mult 3\n}\n```","frasm_code":"host rtr_leaf  { ip 172.16.0.1 }\nhost rtr_spine { ip 172.16.0.2 }\n\ncompile {\n    rtr_leaf -> rtr_spine bfd state 3 mydisc 101 yourdisc 202 mintx 50000 minrx 50000 mult 3 wait 50ms\n    rtr_leaf <- rtr_spine bfd state 3 mydisc 202 yourdisc 101 mintx 50000 minrx 50000 mult 3\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block BFD (`bfd`) Quickstart\" (bfd_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Bidirectional Forwarding Detection Control Packet (UDP 3784 (Multihop 4784, TTL 255), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `bfd`."},{"role":"assistant","content":"Defaults UDP `srcport` to RFC 5881 range (`49152+`), `dstport` to `3784`, and IP `ttl` / Hop Limit to `255`. Compile with `frameassembly bfd_quickstart.frasm`.\n\n```frameassembly\nhost rtr_leaf  { ip 172.16.0.1 }\nhost rtr_spine { ip 172.16.0.2 }\n\ncompile {\n    rtr_leaf -> rtr_spine bfd state 3 mydisc 101 yourdisc 202 mintx 50000 minrx 50000 mult 3 wait 50ms\n    rtr_leaf <- rtr_spine bfd state 3 mydisc 202 yourdisc 101 mintx 50000 minrx 50000 mult 3\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-ospf","task_type":"nl_to_frasm","protocols":["ospf"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"OSPFv2 / OSPFv3 (`ospf`): Full OSPF Adjacency Synchronization Plus OSPFv3 IPv6 Backbone Hello\" (ospf_adjacency_v2_v3.frasm). Scenario: Walks two core routers through OSPFv2 `hello`, `dbd`, `lsr`, `lsu`, and `lsack` exchange on Area 0, followed by an OSPFv3 IPv6 Hello using 32-bit `routerid`. Verify with Wireshark filter `ospf`.","completion":"Selects OSPFv2 (24B header, IPv4 Proto `89`) over IPv4 hosts or OSPFv3 (16B header, IPv6 Next Header `89`, IPv6 pseudo-header checksum) over IPv6 hosts. Defaults IP `ttl` / Hop Limit to `1` and derives multicast destination MACs automatically when sending to `224.0.0.5` / `224.0.0.6` or `ff02::5` / `ff02::6`. Compile with `frameassembly show ospf_adjacency_v2_v3.frasm`.\n\n```frameassembly\nhost core_1_v4 { ip 172.16.0.1 }\nhost core_2_v4 { ip 172.16.0.2 }\nhost allspf_v6 { ip ff02::5 }\nhost core_1_v6 { ip fe80::1c73:1 }\n\ncompile {\n    // 1. OSPFv2 Area 0 adjacency bring-up and LSA exchange\n    core_1_v4 -> core_2_v4 ospf hello routerid 1.1.1.1 areaid 0 hellointerval 10 deadinterval 40 priority 100 dscp 48 wait 2ms\n    core_1_v4 <- core_2_v4 ospf hello routerid 2.2.2.2 areaid 0 hellointerval 10 deadinterval 40 priority 1 dscp 48 wait 2ms\n    core_1_v4 -> core_2_v4 ospf dbd routerid 1.1.1.1 areaid 0 dscp 48 wait 1ms\n    core_1_v4 <- core_2_v4 ospf lsr routerid 2.2.2.2 areaid 0 dscp 48 wait 1ms\n    core_1_v4 -> core_2_v4 ospf lsu routerid 1.1.1.1 areaid 0 dscp 48 wait 1ms\n    core_1_v4 <- core_2_v4 ospf lsack routerid 2.2.2.2 areaid 0 dscp 48 wait 4ms\n    // 2. OSPFv3 over IPv6 multicast ff02::5 (routerid stays 32-bit dotted-quad!)\n    core_1_v6 -> allspf_v6 ospf hello routerid 1.1.1.1 areaid 0.0.0.0 hellointerval 10 deadinterval 40\n}\n```","frasm_code":"host core_1_v4 { ip 172.16.0.1 }\nhost core_2_v4 { ip 172.16.0.2 }\nhost allspf_v6 { ip ff02::5 }\nhost core_1_v6 { ip fe80::1c73:1 }\n\ncompile {\n    // 1. OSPFv2 Area 0 adjacency bring-up and LSA exchange\n    core_1_v4 -> core_2_v4 ospf hello routerid 1.1.1.1 areaid 0 hellointerval 10 deadinterval 40 priority 100 dscp 48 wait 2ms\n    core_1_v4 <- core_2_v4 ospf hello routerid 2.2.2.2 areaid 0 hellointerval 10 deadinterval 40 priority 1 dscp 48 wait 2ms\n    core_1_v4 -> core_2_v4 ospf dbd routerid 1.1.1.1 areaid 0 dscp 48 wait 1ms\n    core_1_v4 <- core_2_v4 ospf lsr routerid 2.2.2.2 areaid 0 dscp 48 wait 1ms\n    core_1_v4 -> core_2_v4 ospf lsu routerid 1.1.1.1 areaid 0 dscp 48 wait 1ms\n    core_1_v4 <- core_2_v4 ospf lsack routerid 2.2.2.2 areaid 0 dscp 48 wait 4ms\n    // 2. OSPFv3 over IPv6 multicast ff02::5 (routerid stays 32-bit dotted-quad!)\n    core_1_v6 -> allspf_v6 ospf hello routerid 1.1.1.1 areaid 0.0.0.0 hellointerval 10 deadinterval 40\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"OSPFv2 / OSPFv3 (`ospf`): Full OSPF Adjacency Synchronization Plus OSPFv3 IPv6 Backbone Hello\" (ospf_adjacency_v2_v3.frasm). Scenario: Walks two core routers through OSPFv2 `hello`, `dbd`, `lsr`, `lsu`, and `lsack` exchange on Area 0, followed by an OSPFv3 IPv6 Hello using 32-bit `routerid`. Verify with Wireshark filter `ospf`."},{"role":"assistant","content":"Selects OSPFv2 (24B header, IPv4 Proto `89`) over IPv4 hosts or OSPFv3 (16B header, IPv6 Next Header `89`, IPv6 pseudo-header checksum) over IPv6 hosts. Defaults IP `ttl` / Hop Limit to `1` and derives multicast destination MACs automatically when sending to `224.0.0.5` / `224.0.0.6` or `ff02::5` / `ff02::6`. Compile with `frameassembly show ospf_adjacency_v2_v3.frasm`.\n\n```frameassembly\nhost core_1_v4 { ip 172.16.0.1 }\nhost core_2_v4 { ip 172.16.0.2 }\nhost allspf_v6 { ip ff02::5 }\nhost core_1_v6 { ip fe80::1c73:1 }\n\ncompile {\n    // 1. OSPFv2 Area 0 adjacency bring-up and LSA exchange\n    core_1_v4 -> core_2_v4 ospf hello routerid 1.1.1.1 areaid 0 hellointerval 10 deadinterval 40 priority 100 dscp 48 wait 2ms\n    core_1_v4 <- core_2_v4 ospf hello routerid 2.2.2.2 areaid 0 hellointerval 10 deadinterval 40 priority 1 dscp 48 wait 2ms\n    core_1_v4 -> core_2_v4 ospf dbd routerid 1.1.1.1 areaid 0 dscp 48 wait 1ms\n    core_1_v4 <- core_2_v4 ospf lsr routerid 2.2.2.2 areaid 0 dscp 48 wait 1ms\n    core_1_v4 -> core_2_v4 ospf lsu routerid 1.1.1.1 areaid 0 dscp 48 wait 1ms\n    core_1_v4 <- core_2_v4 ospf lsack routerid 2.2.2.2 areaid 0 dscp 48 wait 4ms\n    // 2. OSPFv3 over IPv6 multicast ff02::5 (routerid stays 32-bit dotted-quad!)\n    core_1_v6 -> allspf_v6 ospf hello routerid 1.1.1.1 areaid 0.0.0.0 hellointerval 10 deadinterval 40\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-bgp","task_type":"nl_to_frasm","protocols":["bgp","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"BGP-4 / 4-Byte ASN (`bgp`): Stateful TCP Handshake + 4-Byte ASN eBGP Peering & Route Advertisement\" (bgp_4byte_asn_session.frasm). Scenario: Establishes a GTSM-protected (`ttl 255`) TCP 179 session between two 4-byte ASN switches (`4200000001` and `4200000101`), exchanges `OPEN` + `KEEPALIVE`, and advertises `10.100.0.0/16`. Verify with Wireshark filter `bgp`.","completion":"Tracks TCP sequence and acknowledgment numbers automatically on port `179` (`psh ack` flags set by default) and prepends the 16-byte `ff..ff` BGP marker. On `bgp open` with `asn > 65535`, writes `AS_TRANS` (`23456`) in the 16-bit My AS field and encodes Optional Parameter `2` (Capabilities) -> Capability `65` (4-octet AS) with the full 32-bit `asn`. Compile with `frameassembly show bgp_4byte_asn_session.frasm`.\n\n```frameassembly\nhost leaf_tor  { ip 172.16.255.1 }\nhost spine_agg { ip 172.16.255.2 }\n\ncompile {\n    // 1. Stateful TCP 3-way handshake on port 179 with GTSM (ttl 255) and CS6 (dscp 48)\n    leaf_tor -> spine_agg tcp syn srcport 53179 dstport 179 win 65535 mss 1460 ttl 255 dscp 48 wait 1ms\n    leaf_tor <- spine_agg tcp syn ack win 65535 mss 1460 ttl 255 dscp 48 wait 1ms\n    leaf_tor -> spine_agg tcp ack ttl 255 dscp 48 wait 1ms\n    // 2. 4-Byte ASN OPEN negotiation (auto-encodes AS_TRANS 23456 + Capability 65)\n    leaf_tor -> spine_agg bgp open asn 4200000101 holdtime 90 bgpid 10.0.1.1 ttl 255 dscp 48 wait 2ms\n    leaf_tor <- spine_agg bgp open asn 4200000001 holdtime 90 bgpid 10.0.0.1 ttl 255 dscp 48 wait 2ms\n    leaf_tor -> spine_agg bgp keepalive ttl 255 dscp 48 wait 1ms\n    leaf_tor <- spine_agg bgp keepalive ttl 255 dscp 48 wait 2ms\n    // 3. Advertise tenant CIDR 10.100.0.0/16 via BGP UPDATE\n    leaf_tor -> spine_agg bgp update asn 4200000101 prefix \"10.100.0.0/16\" nexthop 172.16.255.1 ttl 255 dscp 48\n}\n```","frasm_code":"host leaf_tor  { ip 172.16.255.1 }\nhost spine_agg { ip 172.16.255.2 }\n\ncompile {\n    // 1. Stateful TCP 3-way handshake on port 179 with GTSM (ttl 255) and CS6 (dscp 48)\n    leaf_tor -> spine_agg tcp syn srcport 53179 dstport 179 win 65535 mss 1460 ttl 255 dscp 48 wait 1ms\n    leaf_tor <- spine_agg tcp syn ack win 65535 mss 1460 ttl 255 dscp 48 wait 1ms\n    leaf_tor -> spine_agg tcp ack ttl 255 dscp 48 wait 1ms\n    // 2. 4-Byte ASN OPEN negotiation (auto-encodes AS_TRANS 23456 + Capability 65)\n    leaf_tor -> spine_agg bgp open asn 4200000101 holdtime 90 bgpid 10.0.1.1 ttl 255 dscp 48 wait 2ms\n    leaf_tor <- spine_agg bgp open asn 4200000001 holdtime 90 bgpid 10.0.0.1 ttl 255 dscp 48 wait 2ms\n    leaf_tor -> spine_agg bgp keepalive ttl 255 dscp 48 wait 1ms\n    leaf_tor <- spine_agg bgp keepalive ttl 255 dscp 48 wait 2ms\n    // 3. Advertise tenant CIDR 10.100.0.0/16 via BGP UPDATE\n    leaf_tor -> spine_agg bgp update asn 4200000101 prefix \"10.100.0.0/16\" nexthop 172.16.255.1 ttl 255 dscp 48\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"BGP-4 / 4-Byte ASN (`bgp`): Stateful TCP Handshake + 4-Byte ASN eBGP Peering & Route Advertisement\" (bgp_4byte_asn_session.frasm). Scenario: Establishes a GTSM-protected (`ttl 255`) TCP 179 session between two 4-byte ASN switches (`4200000001` and `4200000101`), exchanges `OPEN` + `KEEPALIVE`, and advertises `10.100.0.0/16`. Verify with Wireshark filter `bgp`."},{"role":"assistant","content":"Tracks TCP sequence and acknowledgment numbers automatically on port `179` (`psh ack` flags set by default) and prepends the 16-byte `ff..ff` BGP marker. On `bgp open` with `asn > 65535`, writes `AS_TRANS` (`23456`) in the 16-bit My AS field and encodes Optional Parameter `2` (Capabilities) -> Capability `65` (4-octet AS) with the full 32-bit `asn`. Compile with `frameassembly show bgp_4byte_asn_session.frasm`.\n\n```frameassembly\nhost leaf_tor  { ip 172.16.255.1 }\nhost spine_agg { ip 172.16.255.2 }\n\ncompile {\n    // 1. Stateful TCP 3-way handshake on port 179 with GTSM (ttl 255) and CS6 (dscp 48)\n    leaf_tor -> spine_agg tcp syn srcport 53179 dstport 179 win 65535 mss 1460 ttl 255 dscp 48 wait 1ms\n    leaf_tor <- spine_agg tcp syn ack win 65535 mss 1460 ttl 255 dscp 48 wait 1ms\n    leaf_tor -> spine_agg tcp ack ttl 255 dscp 48 wait 1ms\n    // 2. 4-Byte ASN OPEN negotiation (auto-encodes AS_TRANS 23456 + Capability 65)\n    leaf_tor -> spine_agg bgp open asn 4200000101 holdtime 90 bgpid 10.0.1.1 ttl 255 dscp 48 wait 2ms\n    leaf_tor <- spine_agg bgp open asn 4200000001 holdtime 90 bgpid 10.0.0.1 ttl 255 dscp 48 wait 2ms\n    leaf_tor -> spine_agg bgp keepalive ttl 255 dscp 48 wait 1ms\n    leaf_tor <- spine_agg bgp keepalive ttl 255 dscp 48 wait 2ms\n    // 3. Advertise tenant CIDR 10.100.0.0/16 via BGP UPDATE\n    leaf_tor -> spine_agg bgp update asn 4200000101 prefix \"10.100.0.0/16\" nexthop 172.16.255.1 ttl 255 dscp 48\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-rip","task_type":"nl_to_frasm","protocols":["rip"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"RIPv2 / RIPng (`rip`): RIPv2 Multicast Update, Route Poisoning (Metric 16), and IPv6 RIPng\" (rip_v2_ripng.frasm). Scenario: Shows a branch router advertising `10.50.10.0` (`metric 2`), subsequently poisoning the route (`metric 16`) upon link loss, and advertising an IPv6 prefix over RIPng (`ff02::9`). Verify with Wireshark filter `rip || ripng`.","completion":"Selects RIPv2 on UDP `520 -> 520` over IPv4 hosts or RIPng on UDP `521 -> 521` over IPv6 hosts. Populates Address Family Identifier `2` (`AF_INET`), `255.255.255.0` default mask, Route Tag, Next Hop, and Metric in RIPv2—or 128-bit IPv6 prefix + prefix-length + 8-bit metric in RIPng. Compile with `frameassembly show rip_v2_ripng.frasm`.\n\n```frameassembly\nhost rtr_branch { ip 172.16.10.2 }\nhost rip_mcast  { ip 224.0.0.9 }\nhost rtr6_a     { ip fe80::10:1 }\nhost ripng_all  { ip ff02::9 }\n\ncompile {\n    // 1. Periodic RIPv2 multicast advertisement (metric 2, route tag 65010)\n    rtr_branch -> rip_mcast rip response prefix 10.50.10.0 nexthop 0.0.0.0 metric 2 tag 65010 ttl 2 wait 10ms\n    // 2. Triggered route-poison update (metric 16 = infinity / unreachable)\n    rtr_branch -> rip_mcast rip response prefix 10.50.10.0 nexthop 0.0.0.0 metric 16 tag 65010 ttl 2 wait 5ms\n    // 3. IPv6 RIPng advertisement on UDP 521 -> 521 to ff02::9\n    rtr6_a -> ripng_all rip response prefix 2001:db8:50:: metric 1 tag 100 ttl 255\n}\n```","frasm_code":"host rtr_branch { ip 172.16.10.2 }\nhost rip_mcast  { ip 224.0.0.9 }\nhost rtr6_a     { ip fe80::10:1 }\nhost ripng_all  { ip ff02::9 }\n\ncompile {\n    // 1. Periodic RIPv2 multicast advertisement (metric 2, route tag 65010)\n    rtr_branch -> rip_mcast rip response prefix 10.50.10.0 nexthop 0.0.0.0 metric 2 tag 65010 ttl 2 wait 10ms\n    // 2. Triggered route-poison update (metric 16 = infinity / unreachable)\n    rtr_branch -> rip_mcast rip response prefix 10.50.10.0 nexthop 0.0.0.0 metric 16 tag 65010 ttl 2 wait 5ms\n    // 3. IPv6 RIPng advertisement on UDP 521 -> 521 to ff02::9\n    rtr6_a -> ripng_all rip response prefix 2001:db8:50:: metric 1 tag 100 ttl 255\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"RIPv2 / RIPng (`rip`): RIPv2 Multicast Update, Route Poisoning (Metric 16), and IPv6 RIPng\" (rip_v2_ripng.frasm). Scenario: Shows a branch router advertising `10.50.10.0` (`metric 2`), subsequently poisoning the route (`metric 16`) upon link loss, and advertising an IPv6 prefix over RIPng (`ff02::9`). Verify with Wireshark filter `rip || ripng`."},{"role":"assistant","content":"Selects RIPv2 on UDP `520 -> 520` over IPv4 hosts or RIPng on UDP `521 -> 521` over IPv6 hosts. Populates Address Family Identifier `2` (`AF_INET`), `255.255.255.0` default mask, Route Tag, Next Hop, and Metric in RIPv2—or 128-bit IPv6 prefix + prefix-length + 8-bit metric in RIPng. Compile with `frameassembly show rip_v2_ripng.frasm`.\n\n```frameassembly\nhost rtr_branch { ip 172.16.10.2 }\nhost rip_mcast  { ip 224.0.0.9 }\nhost rtr6_a     { ip fe80::10:1 }\nhost ripng_all  { ip ff02::9 }\n\ncompile {\n    // 1. Periodic RIPv2 multicast advertisement (metric 2, route tag 65010)\n    rtr_branch -> rip_mcast rip response prefix 10.50.10.0 nexthop 0.0.0.0 metric 2 tag 65010 ttl 2 wait 10ms\n    // 2. Triggered route-poison update (metric 16 = infinity / unreachable)\n    rtr_branch -> rip_mcast rip response prefix 10.50.10.0 nexthop 0.0.0.0 metric 16 tag 65010 ttl 2 wait 5ms\n    // 3. IPv6 RIPng advertisement on UDP 521 -> 521 to ff02::9\n    rtr6_a -> ripng_all rip response prefix 2001:db8:50:: metric 1 tag 100 ttl 255\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-pim","task_type":"nl_to_frasm","protocols":["pim"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"PIM-SM (`pim`): End-to-End Multicast Control Plane: IGMPv3 Join + PIM Hello, Join/Prune & Register\" (pim_multicast_tree.frasm). Scenario: Combines a receiver `igmp v3 report` with upstream `pim hello`, `(S,G)` `joinprune`, and First-Hop `pim register` signaling to the Rendezvous Point. Verify with Wireshark filter `pim`.","completion":"Encapsulates over IPv4 Protocol `103` or IPv6 Next Header `103` with PIM Version `2` (`0x20`). Computes full-message checksums (including IPv6 pseudo-header on v6) for `hello` and `joinprune`, while restricting `register` checksums to the 8-byte PIMv2 header per RFC 7761 §4.9. Compile with `frameassembly show pim_multicast_tree.frasm`.\n\n```frameassembly\nhost receiver_01 { ip 10.40.1.50 }\nhost lhr_router  { ip 10.40.1.1 }\nhost pim_mcast   { ip 224.0.0.13 }\nhost core_rp     { ip 172.16.255.1 }\n\ncompile {\n    // 1. PIMv2 Hello on multicast 224.0.0.13 electing DR (drpriority 200)\n    lhr_router -> pim_mcast pim hello holdtime 105 drpriority 200 ttl 1 dscp 48 wait 2ms\n    // 2. Receiver joins SSM channel 232.10.10.5 on LAN\n    receiver_01 -> lhr_router igmp v3 report group 232.10.10.5 wait 2ms\n    // 3. Last-Hop Router sends PIM Join/Prune upstream toward source 10.10.5.100\n    lhr_router -> core_rp pim joinprune group 232.10.10.5 source 10.10.5.100 holdtime 210 dscp 48 wait 3ms\n    // 4. Unicast PIM Register encapsulated to Rendezvous Point\n    lhr_router -> core_rp pim register group 239.20.20.1 source 10.40.1.50 rp 172.16.255.1 ttl 64 dscp 48\n}\n```","frasm_code":"host receiver_01 { ip 10.40.1.50 }\nhost lhr_router  { ip 10.40.1.1 }\nhost pim_mcast   { ip 224.0.0.13 }\nhost core_rp     { ip 172.16.255.1 }\n\ncompile {\n    // 1. PIMv2 Hello on multicast 224.0.0.13 electing DR (drpriority 200)\n    lhr_router -> pim_mcast pim hello holdtime 105 drpriority 200 ttl 1 dscp 48 wait 2ms\n    // 2. Receiver joins SSM channel 232.10.10.5 on LAN\n    receiver_01 -> lhr_router igmp v3 report group 232.10.10.5 wait 2ms\n    // 3. Last-Hop Router sends PIM Join/Prune upstream toward source 10.10.5.100\n    lhr_router -> core_rp pim joinprune group 232.10.10.5 source 10.10.5.100 holdtime 210 dscp 48 wait 3ms\n    // 4. Unicast PIM Register encapsulated to Rendezvous Point\n    lhr_router -> core_rp pim register group 239.20.20.1 source 10.40.1.50 rp 172.16.255.1 ttl 64 dscp 48\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"PIM-SM (`pim`): End-to-End Multicast Control Plane: IGMPv3 Join + PIM Hello, Join/Prune & Register\" (pim_multicast_tree.frasm). Scenario: Combines a receiver `igmp v3 report` with upstream `pim hello`, `(S,G)` `joinprune`, and First-Hop `pim register` signaling to the Rendezvous Point. Verify with Wireshark filter `pim`."},{"role":"assistant","content":"Encapsulates over IPv4 Protocol `103` or IPv6 Next Header `103` with PIM Version `2` (`0x20`). Computes full-message checksums (including IPv6 pseudo-header on v6) for `hello` and `joinprune`, while restricting `register` checksums to the 8-byte PIMv2 header per RFC 7761 §4.9. Compile with `frameassembly show pim_multicast_tree.frasm`.\n\n```frameassembly\nhost receiver_01 { ip 10.40.1.50 }\nhost lhr_router  { ip 10.40.1.1 }\nhost pim_mcast   { ip 224.0.0.13 }\nhost core_rp     { ip 172.16.255.1 }\n\ncompile {\n    // 1. PIMv2 Hello on multicast 224.0.0.13 electing DR (drpriority 200)\n    lhr_router -> pim_mcast pim hello holdtime 105 drpriority 200 ttl 1 dscp 48 wait 2ms\n    // 2. Receiver joins SSM channel 232.10.10.5 on LAN\n    receiver_01 -> lhr_router igmp v3 report group 232.10.10.5 wait 2ms\n    // 3. Last-Hop Router sends PIM Join/Prune upstream toward source 10.10.5.100\n    lhr_router -> core_rp pim joinprune group 232.10.10.5 source 10.10.5.100 holdtime 210 dscp 48 wait 3ms\n    // 4. Unicast PIM Register encapsulated to Rendezvous Point\n    lhr_router -> core_rp pim register group 239.20.20.1 source 10.40.1.50 rp 172.16.255.1 ttl 64 dscp 48\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-vrrp","task_type":"nl_to_frasm","protocols":["vrrp","vlan"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"VRRPv2 / VRRPv3 (`vrrp`): Graceful VRRP Master Shutdown (Priority 0), Backup Takeover & VRRPv3 IPv6\" (vrrp_failover_v2_v3.frasm). Scenario: Traces VRID 10 on VLAN 10 where the primary router sends a `priority 0` release, the backup router assumes mastership + sends GARP, alongside an IPv6 VRRPv3 advertisement. Verify with Wireshark filter `vrrp`.","completion":"Sets IPv4 Protocol / IPv6 Next Header to `112` and defaults `ttl` / Hop Limit to `255` per RFC 3768 / RFC 5798. Selects VRRPv2 (`version 2`) over IPv4 and VRRPv3 (`version 3`, 12-bit centisecond `Max Adver Int` + pseudo-header checksum) over IPv6 automatically. Compile with `frameassembly show vrrp_failover_v2_v3.frasm`.\n\n```frameassembly\nhost rtr_pri   { ip 10.10.10.2 mac 00:00:5e:00:01:0a }\nhost rtr_bkp   { ip 10.10.10.3 mac 00:00:5e:00:01:0a }\nhost vrrp_v4   { ip 224.0.0.18 }\nhost rtr6_pri  { ip fe80::10:2 mac 00:00:5e:00:02:0a }\nhost vrrp_v6   { ip ff02::12 }\n\ncompile {\n    // 1. Primary router steady-state VRRPv2 heartbeat (VRID 10, Priority 150)\n    rtr_pri -> vrrp_v4 vrrp vrid 10 priority 150 advint 1 vip 10.10.10.1 vlan 10 pcp 6 wait 5ms\n    // 2. Primary router initiates graceful shutdown (Priority 0 triggers immediate takeover)\n    rtr_pri -> vrrp_v4 vrrp vrid 10 priority 0 advint 1 vip 10.10.10.1 vlan 10 pcp 6 wait 2ms\n    // 3. Backup router promotes to Master (Priority 120) and broadcasts GARP for VIP\n    rtr_bkp -> vrrp_v4 vrrp vrid 10 priority 120 advint 1 vip 10.10.10.1 vlan 10 pcp 6 wait 1ms\n    rtr_bkp -> vrrp_v4 arp gratuitous sendermac 00:00:5e:00:01:0a senderip 10.10.10.1 vlan 10 wait 3ms\n    // 4. Dual-stack VRRPv3 over IPv6 (advint 100 = 100 centiseconds = 1.00s)\n    rtr6_pri -> vrrp_v6 vrrp version 3 vrid 10 priority 150 advint 100 vip fe80::10:1 vlan 10\n}\n```","frasm_code":"host rtr_pri   { ip 10.10.10.2 mac 00:00:5e:00:01:0a }\nhost rtr_bkp   { ip 10.10.10.3 mac 00:00:5e:00:01:0a }\nhost vrrp_v4   { ip 224.0.0.18 }\nhost rtr6_pri  { ip fe80::10:2 mac 00:00:5e:00:02:0a }\nhost vrrp_v6   { ip ff02::12 }\n\ncompile {\n    // 1. Primary router steady-state VRRPv2 heartbeat (VRID 10, Priority 150)\n    rtr_pri -> vrrp_v4 vrrp vrid 10 priority 150 advint 1 vip 10.10.10.1 vlan 10 pcp 6 wait 5ms\n    // 2. Primary router initiates graceful shutdown (Priority 0 triggers immediate takeover)\n    rtr_pri -> vrrp_v4 vrrp vrid 10 priority 0 advint 1 vip 10.10.10.1 vlan 10 pcp 6 wait 2ms\n    // 3. Backup router promotes to Master (Priority 120) and broadcasts GARP for VIP\n    rtr_bkp -> vrrp_v4 vrrp vrid 10 priority 120 advint 1 vip 10.10.10.1 vlan 10 pcp 6 wait 1ms\n    rtr_bkp -> vrrp_v4 arp gratuitous sendermac 00:00:5e:00:01:0a senderip 10.10.10.1 vlan 10 wait 3ms\n    // 4. Dual-stack VRRPv3 over IPv6 (advint 100 = 100 centiseconds = 1.00s)\n    rtr6_pri -> vrrp_v6 vrrp version 3 vrid 10 priority 150 advint 100 vip fe80::10:1 vlan 10\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"VRRPv2 / VRRPv3 (`vrrp`): Graceful VRRP Master Shutdown (Priority 0), Backup Takeover & VRRPv3 IPv6\" (vrrp_failover_v2_v3.frasm). Scenario: Traces VRID 10 on VLAN 10 where the primary router sends a `priority 0` release, the backup router assumes mastership + sends GARP, alongside an IPv6 VRRPv3 advertisement. Verify with Wireshark filter `vrrp`."},{"role":"assistant","content":"Sets IPv4 Protocol / IPv6 Next Header to `112` and defaults `ttl` / Hop Limit to `255` per RFC 3768 / RFC 5798. Selects VRRPv2 (`version 2`) over IPv4 and VRRPv3 (`version 3`, 12-bit centisecond `Max Adver Int` + pseudo-header checksum) over IPv6 automatically. Compile with `frameassembly show vrrp_failover_v2_v3.frasm`.\n\n```frameassembly\nhost rtr_pri   { ip 10.10.10.2 mac 00:00:5e:00:01:0a }\nhost rtr_bkp   { ip 10.10.10.3 mac 00:00:5e:00:01:0a }\nhost vrrp_v4   { ip 224.0.0.18 }\nhost rtr6_pri  { ip fe80::10:2 mac 00:00:5e:00:02:0a }\nhost vrrp_v6   { ip ff02::12 }\n\ncompile {\n    // 1. Primary router steady-state VRRPv2 heartbeat (VRID 10, Priority 150)\n    rtr_pri -> vrrp_v4 vrrp vrid 10 priority 150 advint 1 vip 10.10.10.1 vlan 10 pcp 6 wait 5ms\n    // 2. Primary router initiates graceful shutdown (Priority 0 triggers immediate takeover)\n    rtr_pri -> vrrp_v4 vrrp vrid 10 priority 0 advint 1 vip 10.10.10.1 vlan 10 pcp 6 wait 2ms\n    // 3. Backup router promotes to Master (Priority 120) and broadcasts GARP for VIP\n    rtr_bkp -> vrrp_v4 vrrp vrid 10 priority 120 advint 1 vip 10.10.10.1 vlan 10 pcp 6 wait 1ms\n    rtr_bkp -> vrrp_v4 arp gratuitous sendermac 00:00:5e:00:01:0a senderip 10.10.10.1 vlan 10 wait 3ms\n    // 4. Dual-stack VRRPv3 over IPv6 (advint 100 = 100 centiseconds = 1.00s)\n    rtr6_pri -> vrrp_v6 vrrp version 3 vrid 10 priority 150 advint 100 vip fe80::10:1 vlan 10\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-hsrp","task_type":"nl_to_frasm","protocols":["hsrp","vlan"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"HSRPv1 / HSRPv2 (`hsrp`): Campus VLAN 20 Active/Standby HSRP Pair Plus HSRPv2 IPv6 Gateway\" (hsrp_active_standby.frasm). Scenario: Models two distribution switches exchanging Active (`state 16`, `priority 110`) and Standby (`state 8`, `priority 100`) HSRPv1 Hellos on VLAN 20 alongside an IPv6 HSRPv2 Active router. Verify with Wireshark filter `hsrp || hsrp2`.","completion":"Defaults UDP source and destination ports to `1985 -> 1985` on IPv4 (HSRPv1) or `2029 -> 2029` on IPv6 (HSRPv2 TLV). Zero-pads or truncates `auth` cleanly into the fixed 8-byte RFC 2281 Authentication Data field (default `\"cisco\\0\\0\\0\"`). Compile with `frameassembly show hsrp_active_standby.frasm`.\n\n```frameassembly\nhost dist_a   { ip 10.20.20.2 mac 00:00:0c:07:ac:14 }\nhost dist_b   { ip 10.20.20.3 mac 00:1c:73:20:00:03 }\nhost hsrp_v4  { ip 224.0.0.2 }\nhost dist6_a  { ip fe80::20:2 mac 00:05:73:a0:00:14 }\nhost hsrp_v6  { ip ff02::66 }\n\ncompile {\n    // 1. Active router (state 16, priority 110, virtual MAC 00:00:0c:07:ac:14 for group 20)\n    dist_a -> hsrp_v4 hsrp group 20 priority 110 state 16 hellotime 3 holdtime 10 auth \"corpkey1\" vip 10.20.20.1 vlan 20 ttl 1 dscp 48 wait 3ms\n    // 2. Standby router (state 8, priority 100) monitoring Active peer\n    dist_b -> hsrp_v4 hsrp group 20 priority 100 state 8 hellotime 3 holdtime 10 auth \"corpkey1\" vip 10.20.20.1 vlan 20 ttl 1 dscp 48 wait 5ms\n    // 3. HSRPv2 over IPv6 on UDP 2029 -> ff02::66\n    dist6_a -> hsrp_v6 hsrp group 20 priority 110 state 16 hellotime 3 holdtime 10 vip 2001:db8:20::1 vlan 20 ttl 255\n}\n```","frasm_code":"host dist_a   { ip 10.20.20.2 mac 00:00:0c:07:ac:14 }\nhost dist_b   { ip 10.20.20.3 mac 00:1c:73:20:00:03 }\nhost hsrp_v4  { ip 224.0.0.2 }\nhost dist6_a  { ip fe80::20:2 mac 00:05:73:a0:00:14 }\nhost hsrp_v6  { ip ff02::66 }\n\ncompile {\n    // 1. Active router (state 16, priority 110, virtual MAC 00:00:0c:07:ac:14 for group 20)\n    dist_a -> hsrp_v4 hsrp group 20 priority 110 state 16 hellotime 3 holdtime 10 auth \"corpkey1\" vip 10.20.20.1 vlan 20 ttl 1 dscp 48 wait 3ms\n    // 2. Standby router (state 8, priority 100) monitoring Active peer\n    dist_b -> hsrp_v4 hsrp group 20 priority 100 state 8 hellotime 3 holdtime 10 auth \"corpkey1\" vip 10.20.20.1 vlan 20 ttl 1 dscp 48 wait 5ms\n    // 3. HSRPv2 over IPv6 on UDP 2029 -> ff02::66\n    dist6_a -> hsrp_v6 hsrp group 20 priority 110 state 16 hellotime 3 holdtime 10 vip 2001:db8:20::1 vlan 20 ttl 255\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"HSRPv1 / HSRPv2 (`hsrp`): Campus VLAN 20 Active/Standby HSRP Pair Plus HSRPv2 IPv6 Gateway\" (hsrp_active_standby.frasm). Scenario: Models two distribution switches exchanging Active (`state 16`, `priority 110`) and Standby (`state 8`, `priority 100`) HSRPv1 Hellos on VLAN 20 alongside an IPv6 HSRPv2 Active router. Verify with Wireshark filter `hsrp || hsrp2`."},{"role":"assistant","content":"Defaults UDP source and destination ports to `1985 -> 1985` on IPv4 (HSRPv1) or `2029 -> 2029` on IPv6 (HSRPv2 TLV). Zero-pads or truncates `auth` cleanly into the fixed 8-byte RFC 2281 Authentication Data field (default `\"cisco\\0\\0\\0\"`). Compile with `frameassembly show hsrp_active_standby.frasm`.\n\n```frameassembly\nhost dist_a   { ip 10.20.20.2 mac 00:00:0c:07:ac:14 }\nhost dist_b   { ip 10.20.20.3 mac 00:1c:73:20:00:03 }\nhost hsrp_v4  { ip 224.0.0.2 }\nhost dist6_a  { ip fe80::20:2 mac 00:05:73:a0:00:14 }\nhost hsrp_v6  { ip ff02::66 }\n\ncompile {\n    // 1. Active router (state 16, priority 110, virtual MAC 00:00:0c:07:ac:14 for group 20)\n    dist_a -> hsrp_v4 hsrp group 20 priority 110 state 16 hellotime 3 holdtime 10 auth \"corpkey1\" vip 10.20.20.1 vlan 20 ttl 1 dscp 48 wait 3ms\n    // 2. Standby router (state 8, priority 100) monitoring Active peer\n    dist_b -> hsrp_v4 hsrp group 20 priority 100 state 8 hellotime 3 holdtime 10 auth \"corpkey1\" vip 10.20.20.1 vlan 20 ttl 1 dscp 48 wait 5ms\n    // 3. HSRPv2 over IPv6 on UDP 2029 -> ff02::66\n    dist6_a -> hsrp_v6 hsrp group 20 priority 110 state 16 hellotime 3 holdtime 10 vip 2001:db8:20::1 vlan 20 ttl 255\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-bfd","task_type":"nl_to_frasm","protocols":["bfd"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"BFD (`bfd`): BFD 3-Way Session Bring-Up (Down -> Init -> Up) & Detection Timeout\" (bfd_state_machine.frasm). Scenario: Traces two routers negotiating a 50ms (`50000` us * `mult 3` = `150ms` detection) BFD session from `Down` (`1`) through `Init` (`2`) to `Up` (`3`), followed by a `diag 1` timeout. Verify with Wireshark filter `bfd`.","completion":"Defaults UDP `srcport` to RFC 5881 range (`49152+`), `dstport` to `3784`, and IP `ttl` / Hop Limit to `255`. Bit-packs Version (`1`), `diag` (`0..31`), `state` (`0..3`), `mult` (default `3`), `Length = 24`, `mydisc`, `yourdisc`, `mintx` (`100000` us), `minrx` (`100000` us), and Echo RX interval. Compile with `frameassembly show bfd_state_machine.frasm`.\n\n```frameassembly\nhost pe_north { ip 10.255.1.1 }\nhost pe_south { ip 10.255.1.2 }\n\ncompile {\n    // 1. Initial Down packet (state 1, yourdisc 0 = peer unknown, slow 1s timer)\n    pe_north -> pe_south bfd state 1 diag 0 mydisc 0x1001 yourdisc 0 mintx 1000000 minrx 1000000 mult 3 dscp 48 wait 2ms\n    // 2. Peer sees 0x1001 and transitions to Init (state 2)\n    pe_north <- pe_south bfd state 2 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 dscp 48 wait 2ms\n    // 3. Both peers reach Up (state 3) at 50ms (50,000 us) intervals\n    pe_north -> pe_south bfd state 3 diag 0 mydisc 0x1001 yourdisc 0x2002 mintx 50000 minrx 50000 mult 3 dscp 48 wait 50ms\n    pe_north <- pe_south bfd state 3 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 dscp 48 wait 150ms\n    // 4. Link failure detected: state 1 (Down), diag 1 (Control Detection Time Expired)\n    pe_north -> pe_south bfd state 1 diag 1 mydisc 0x1001 yourdisc 0x2002 mintx 1000000 minrx 1000000 mult 3 dscp 48\n}\n```","frasm_code":"host pe_north { ip 10.255.1.1 }\nhost pe_south { ip 10.255.1.2 }\n\ncompile {\n    // 1. Initial Down packet (state 1, yourdisc 0 = peer unknown, slow 1s timer)\n    pe_north -> pe_south bfd state 1 diag 0 mydisc 0x1001 yourdisc 0 mintx 1000000 minrx 1000000 mult 3 dscp 48 wait 2ms\n    // 2. Peer sees 0x1001 and transitions to Init (state 2)\n    pe_north <- pe_south bfd state 2 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 dscp 48 wait 2ms\n    // 3. Both peers reach Up (state 3) at 50ms (50,000 us) intervals\n    pe_north -> pe_south bfd state 3 diag 0 mydisc 0x1001 yourdisc 0x2002 mintx 50000 minrx 50000 mult 3 dscp 48 wait 50ms\n    pe_north <- pe_south bfd state 3 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 dscp 48 wait 150ms\n    // 4. Link failure detected: state 1 (Down), diag 1 (Control Detection Time Expired)\n    pe_north -> pe_south bfd state 1 diag 1 mydisc 0x1001 yourdisc 0x2002 mintx 1000000 minrx 1000000 mult 3 dscp 48\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"BFD (`bfd`): BFD 3-Way Session Bring-Up (Down -> Init -> Up) & Detection Timeout\" (bfd_state_machine.frasm). Scenario: Traces two routers negotiating a 50ms (`50000` us * `mult 3` = `150ms` detection) BFD session from `Down` (`1`) through `Init` (`2`) to `Up` (`3`), followed by a `diag 1` timeout. Verify with Wireshark filter `bfd`."},{"role":"assistant","content":"Defaults UDP `srcport` to RFC 5881 range (`49152+`), `dstport` to `3784`, and IP `ttl` / Hop Limit to `255`. Bit-packs Version (`1`), `diag` (`0..31`), `state` (`0..3`), `mult` (default `3`), `Length = 24`, `mydisc`, `yourdisc`, `mintx` (`100000` us), `minrx` (`100000` us), and Echo RX interval. Compile with `frameassembly show bfd_state_machine.frasm`.\n\n```frameassembly\nhost pe_north { ip 10.255.1.1 }\nhost pe_south { ip 10.255.1.2 }\n\ncompile {\n    // 1. Initial Down packet (state 1, yourdisc 0 = peer unknown, slow 1s timer)\n    pe_north -> pe_south bfd state 1 diag 0 mydisc 0x1001 yourdisc 0 mintx 1000000 minrx 1000000 mult 3 dscp 48 wait 2ms\n    // 2. Peer sees 0x1001 and transitions to Init (state 2)\n    pe_north <- pe_south bfd state 2 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 dscp 48 wait 2ms\n    // 3. Both peers reach Up (state 3) at 50ms (50,000 us) intervals\n    pe_north -> pe_south bfd state 3 diag 0 mydisc 0x1001 yourdisc 0x2002 mintx 50000 minrx 50000 mult 3 dscp 48 wait 50ms\n    pe_north <- pe_south bfd state 3 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 dscp 48 wait 150ms\n    // 4. Link failure detected: state 1 (Down), diag 1 (Control Detection Time Expired)\n    pe_north -> pe_south bfd state 1 diag 1 mydisc 0x1001 yourdisc 0x2002 mintx 1000000 minrx 1000000 mult 3 dscp 48\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-openflow","task_type":"nl_to_frasm","protocols":["openflow","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"OpenFlow SDN (`openflow`): Complete OpenFlow 1.3 Switch Onboarding, Packet-In Miss & FlowMod Programming\" (openflow_sdn_pipeline.frasm). Scenario: Walks through TCP 6653 connection establishment, OpenFlow 1.3 `HELLO` + `FEATURES_REPLY`, a switch table-miss `PACKET_IN`, controller `FLOW_MOD` installation in Table 0, and `ECHO` heartbeat. Verify with Wireshark filter `openflow_v4 || openflow`.","completion":"Defaults to IANA OpenFlow port TCP `6653`, Version `4` (`0x04` = OpenFlow 1.3), and shares stateful 4-tuple TCP `seq`/`acknum` progression. Computes the exact 16-bit big-endian OpenFlow `length` field across both 8-byte header-only messages (`hello`, `featuresreq`, `echoreq`) and structured bodies (`32B` `featuresreply`, `56B` `flowmod`). Compile with `frameassembly show openflow_sdn_pipeline.frasm`.\n\n```frameassembly\nhost controller { ip 10.90.0.10 }\nhost leaf_ovs   { ip 10.90.0.51 }\n\ncompile {\n    // 1. TCP handshake on port 6653\n    leaf_ovs -> controller tcp syn srcport 54653 dstport 6653 win 65535 mss 1460 wait 1ms\n    leaf_ovs <- controller tcp syn ack win 65535 mss 1460 wait 1ms\n    leaf_ovs -> controller tcp ack wait 1ms\n    // 2. OpenFlow 1.3 (version 4) Hello & Features negotiation\n    leaf_ovs -> controller openflow hello version 4 xid 10 wait 1ms\n    leaf_ovs <- controller openflow hello version 4 xid 10 wait 1ms\n    leaf_ovs <- controller openflow featuresreq version 4 xid 11 wait 1ms\n    leaf_ovs -> controller openflow featuresreply version 4 xid 11 dpid 0x0000001c73aa0051 wait 3ms\n    // 3. Table-miss PacketIn triggers FlowMod rule installation + PacketOut\n    leaf_ovs -> controller openflow packetin version 4 xid 0 tableid 0 wait 2ms\n    leaf_ovs <- controller openflow flowmod version 4 xid 12 tableid 0 priority 1000 wait 1ms\n    leaf_ovs <- controller openflow packetout version 4 xid 13 wait 5ms\n    // 4. Liveness Echo Request / Reply\n    leaf_ovs <- controller openflow echoreq version 4 xid 99 wait 1ms\n    leaf_ovs -> controller openflow echoreply version 4 xid 99\n}\n```","frasm_code":"host controller { ip 10.90.0.10 }\nhost leaf_ovs   { ip 10.90.0.51 }\n\ncompile {\n    // 1. TCP handshake on port 6653\n    leaf_ovs -> controller tcp syn srcport 54653 dstport 6653 win 65535 mss 1460 wait 1ms\n    leaf_ovs <- controller tcp syn ack win 65535 mss 1460 wait 1ms\n    leaf_ovs -> controller tcp ack wait 1ms\n    // 2. OpenFlow 1.3 (version 4) Hello & Features negotiation\n    leaf_ovs -> controller openflow hello version 4 xid 10 wait 1ms\n    leaf_ovs <- controller openflow hello version 4 xid 10 wait 1ms\n    leaf_ovs <- controller openflow featuresreq version 4 xid 11 wait 1ms\n    leaf_ovs -> controller openflow featuresreply version 4 xid 11 dpid 0x0000001c73aa0051 wait 3ms\n    // 3. Table-miss PacketIn triggers FlowMod rule installation + PacketOut\n    leaf_ovs -> controller openflow packetin version 4 xid 0 tableid 0 wait 2ms\n    leaf_ovs <- controller openflow flowmod version 4 xid 12 tableid 0 priority 1000 wait 1ms\n    leaf_ovs <- controller openflow packetout version 4 xid 13 wait 5ms\n    // 4. Liveness Echo Request / Reply\n    leaf_ovs <- controller openflow echoreq version 4 xid 99 wait 1ms\n    leaf_ovs -> controller openflow echoreply version 4 xid 99\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"OpenFlow SDN (`openflow`): Complete OpenFlow 1.3 Switch Onboarding, Packet-In Miss & FlowMod Programming\" (openflow_sdn_pipeline.frasm). Scenario: Walks through TCP 6653 connection establishment, OpenFlow 1.3 `HELLO` + `FEATURES_REPLY`, a switch table-miss `PACKET_IN`, controller `FLOW_MOD` installation in Table 0, and `ECHO` heartbeat. Verify with Wireshark filter `openflow_v4 || openflow`."},{"role":"assistant","content":"Defaults to IANA OpenFlow port TCP `6653`, Version `4` (`0x04` = OpenFlow 1.3), and shares stateful 4-tuple TCP `seq`/`acknum` progression. Computes the exact 16-bit big-endian OpenFlow `length` field across both 8-byte header-only messages (`hello`, `featuresreq`, `echoreq`) and structured bodies (`32B` `featuresreply`, `56B` `flowmod`). Compile with `frameassembly show openflow_sdn_pipeline.frasm`.\n\n```frameassembly\nhost controller { ip 10.90.0.10 }\nhost leaf_ovs   { ip 10.90.0.51 }\n\ncompile {\n    // 1. TCP handshake on port 6653\n    leaf_ovs -> controller tcp syn srcport 54653 dstport 6653 win 65535 mss 1460 wait 1ms\n    leaf_ovs <- controller tcp syn ack win 65535 mss 1460 wait 1ms\n    leaf_ovs -> controller tcp ack wait 1ms\n    // 2. OpenFlow 1.3 (version 4) Hello & Features negotiation\n    leaf_ovs -> controller openflow hello version 4 xid 10 wait 1ms\n    leaf_ovs <- controller openflow hello version 4 xid 10 wait 1ms\n    leaf_ovs <- controller openflow featuresreq version 4 xid 11 wait 1ms\n    leaf_ovs -> controller openflow featuresreply version 4 xid 11 dpid 0x0000001c73aa0051 wait 3ms\n    // 3. Table-miss PacketIn triggers FlowMod rule installation + PacketOut\n    leaf_ovs -> controller openflow packetin version 4 xid 0 tableid 0 wait 2ms\n    leaf_ovs <- controller openflow flowmod version 4 xid 12 tableid 0 priority 1000 wait 1ms\n    leaf_ovs <- controller openflow packetout version 4 xid 13 wait 5ms\n    // 4. Liveness Echo Request / Reply\n    leaf_ovs <- controller openflow echoreq version 4 xid 99 wait 1ms\n    leaf_ovs -> controller openflow echoreply version 4 xid 99\n}\n```"}]}
{"id":"sft-cookbook-ex-vpn-wireguard-handshake-ipv6","task_type":"nl_to_frasm","protocols":["wireguard"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IPv6 WireGuard Noise_IKpsk2 Handshake, Cookie Reply & Transport Data\" (wireguard_ipv6_tunnel.frasm). Scenario: Runs a complete WireGuard tunnel handshake (initiation, response, cookie, and encrypted data transport) over IPv6 UDP port 51820. Verify with Wireshark filter `wg`.","completion":"Encodes little-endian WireGuard message types (1 Initiation, 2 Response, 3 Cookie, 4 Data) with sender, receiver, and nonce counter fields. Compile with `frameassembly wireguard_ipv6_tunnel.frasm`.\n\n```frameassembly\nhost roadwarrior { ip 2001:db8:50::25 }\nhost wg_hub      { ip 2001:db8:50::1 }\n\ncompile {\n    roadwarrior -> wg_hub wireguard initiation sender 0x0a0b0c0d wait 3ms\n    roadwarrior <- wg_hub wireguard response sender 0x11223344 receiver 0x0a0b0c0d wait 2ms\n    roadwarrior -> wg_hub wireguard data receiver 0x11223344 counter 0 wait 2ms\n    roadwarrior <- wg_hub wireguard data receiver 0x0a0b0c0d counter 0 wait 5ms\n    roadwarrior <- wg_hub wireguard cookie receiver 0x0a0b0c0d\n}\n```","frasm_code":"host roadwarrior { ip 2001:db8:50::25 }\nhost wg_hub      { ip 2001:db8:50::1 }\n\ncompile {\n    roadwarrior -> wg_hub wireguard initiation sender 0x0a0b0c0d wait 3ms\n    roadwarrior <- wg_hub wireguard response sender 0x11223344 receiver 0x0a0b0c0d wait 2ms\n    roadwarrior -> wg_hub wireguard data receiver 0x11223344 counter 0 wait 2ms\n    roadwarrior <- wg_hub wireguard data receiver 0x0a0b0c0d counter 0 wait 5ms\n    roadwarrior <- wg_hub wireguard cookie receiver 0x0a0b0c0d\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IPv6 WireGuard Noise_IKpsk2 Handshake, Cookie Reply & Transport Data\" (wireguard_ipv6_tunnel.frasm). Scenario: Runs a complete WireGuard tunnel handshake (initiation, response, cookie, and encrypted data transport) over IPv6 UDP port 51820. Verify with Wireshark filter `wg`."},{"role":"assistant","content":"Encodes little-endian WireGuard message types (1 Initiation, 2 Response, 3 Cookie, 4 Data) with sender, receiver, and nonce counter fields. Compile with `frameassembly wireguard_ipv6_tunnel.frasm`.\n\n```frameassembly\nhost roadwarrior { ip 2001:db8:50::25 }\nhost wg_hub      { ip 2001:db8:50::1 }\n\ncompile {\n    roadwarrior -> wg_hub wireguard initiation sender 0x0a0b0c0d wait 3ms\n    roadwarrior <- wg_hub wireguard response sender 0x11223344 receiver 0x0a0b0c0d wait 2ms\n    roadwarrior -> wg_hub wireguard data receiver 0x11223344 counter 0 wait 2ms\n    roadwarrior <- wg_hub wireguard data receiver 0x0a0b0c0d counter 0 wait 5ms\n    roadwarrior <- wg_hub wireguard cookie receiver 0x0a0b0c0d\n}\n```"}]}
{"id":"sft-cookbook-ex-overlay-vxlan-and-geneve-dc","task_type":"nl_to_frasm","protocols":["vxlan","geneve"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Data-Center Spine-Leaf Underlay Check (VXLAN UDP 4789 + GENEVE UDP 6081)\" (dc_vxlan_and_geneve_vteps.frasm). Scenario: Verifies jumbo-MTU spine ACLs and hardware VTEP tunnel offload across both VXLAN (VNI 10100) and OVN/NSX GENEVE (VNI 20200 with TLV metadata). Verify with Wireshark filter `vxlan || geneve`.","completion":"Sets DF bit on outer IPv4 underlay headers and encodes 24-bit VNIs on UDP 4789 and UDP 6081. Compile with `frameassembly dc_vxlan_and_geneve_vteps.frasm`.\n\n```frameassembly\nhost vtep_rack01 { ip 10.250.1.11 }\nhost vtep_rack08 { ip 10.250.1.18 }\n\ncompile {\n    vtep_rack01 -> vtep_rack08 vxlan vni 10100 df dscp 18 payload \"evpn-l2vni-10100-frame\" wait 2ms\n    vtep_rack01 <- vtep_rack08 vxlan vni 10100 df dscp 18 payload \"evpn-l2vni-10100-reply\" wait 3ms\n    vtep_rack01 -> vtep_rack08 geneve vni 20200 optclass 0x0102 opttype 1 df payload \"ovn-geneve-metadata\"\n}\n```","frasm_code":"host vtep_rack01 { ip 10.250.1.11 }\nhost vtep_rack08 { ip 10.250.1.18 }\n\ncompile {\n    vtep_rack01 -> vtep_rack08 vxlan vni 10100 df dscp 18 payload \"evpn-l2vni-10100-frame\" wait 2ms\n    vtep_rack01 <- vtep_rack08 vxlan vni 10100 df dscp 18 payload \"evpn-l2vni-10100-reply\" wait 3ms\n    vtep_rack01 -> vtep_rack08 geneve vni 20200 optclass 0x0102 opttype 1 df payload \"ovn-geneve-metadata\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Data-Center Spine-Leaf Underlay Check (VXLAN UDP 4789 + GENEVE UDP 6081)\" (dc_vxlan_and_geneve_vteps.frasm). Scenario: Verifies jumbo-MTU spine ACLs and hardware VTEP tunnel offload across both VXLAN (VNI 10100) and OVN/NSX GENEVE (VNI 20200 with TLV metadata). Verify with Wireshark filter `vxlan || geneve`."},{"role":"assistant","content":"Sets DF bit on outer IPv4 underlay headers and encodes 24-bit VNIs on UDP 4789 and UDP 6081. Compile with `frameassembly dc_vxlan_and_geneve_vteps.frasm`.\n\n```frameassembly\nhost vtep_rack01 { ip 10.250.1.11 }\nhost vtep_rack08 { ip 10.250.1.18 }\n\ncompile {\n    vtep_rack01 -> vtep_rack08 vxlan vni 10100 df dscp 18 payload \"evpn-l2vni-10100-frame\" wait 2ms\n    vtep_rack01 <- vtep_rack08 vxlan vni 10100 df dscp 18 payload \"evpn-l2vni-10100-reply\" wait 3ms\n    vtep_rack01 -> vtep_rack08 geneve vni 20200 optclass 0x0102 opttype 1 df payload \"ovn-geneve-metadata\"\n}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-vxlan","task_type":"nl_to_frasm","protocols":["vxlan"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block VXLAN (`vxlan`) Quickstart\" (vxlan_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Virtual eXtensible Local Area Network Overlay (UDP 4789 (VNI 1), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `vxlan`.","completion":"Wraps the packet in UDP `dstport 4789` with ephemeral outer `srcport` and computes the outer IPv4/IPv6 + UDP checksums. Compile with `frameassembly vxlan_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block VXLAN (`vxlan`) Quickstart\" (vxlan_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Virtual eXtensible Local Area Network Overlay (UDP 4789 (VNI 1), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `vxlan`."},{"role":"assistant","content":"Wraps the packet in UDP `dstport 4789` with ephemeral outer `srcport` and computes the outer IPv4/IPv6 + UDP checksums. Compile with `frameassembly vxlan_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-ikev2","task_type":"nl_to_frasm","protocols":["ikev2"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block IKEv2 (`ikev2`) Quickstart\" (ikev2_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Internet Key Exchange Protocol Version 2 (UDP 500 -> 500 (NAT-T 4500), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `isakmp`.","completion":"Defaults both `srcport` and `dstport` to IANA IKE port `500` (avoiding ephemeral `49152` source ports blocked by strict VPN ACLs). Compile with `frameassembly ikev2_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block IKEv2 (`ikev2`) Quickstart\" (ikev2_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Internet Key Exchange Protocol Version 2 (UDP 500 -> 500 (NAT-T 4500), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `isakmp`."},{"role":"assistant","content":"Defaults both `srcport` and `dstport` to IANA IKE port `500` (avoiding ephemeral `49152` source ports blocked by strict VPN ACLs). Compile with `frameassembly ikev2_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-wireguard","task_type":"nl_to_frasm","protocols":["wireguard"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block WireGuard (`wireguard`) Quickstart\" (wireguard_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for WireGuard Noise_IK Secure Network Tunnel (UDP 51820, Dual-Stack IPv4/IPv6). Verify with Wireshark filter `wg`.","completion":"Defaults UDP `dstport` to `51820` and writes the 4-byte WireGuard message header (`Type` `1..4` followed by three mandatory `0x00` reserved bytes). Compile with `frameassembly wireguard_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block WireGuard (`wireguard`) Quickstart\" (wireguard_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for WireGuard Noise_IK Secure Network Tunnel (UDP 51820, Dual-Stack IPv4/IPv6). Verify with Wireshark filter `wg`."},{"role":"assistant","content":"Defaults UDP `dstport` to `51820` and writes the 4-byte WireGuard message header (`Type` `1..4` followed by three mandatory `0x00` reserved bytes). Compile with `frameassembly wireguard_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-cookbook-proto-lab-gre","task_type":"nl_to_frasm","protocols":["gre"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"GRE / NVGRE (`gre`): Keyed Dual-Stack GRE Tunnel Sequence & Transparent Ethernet Bridging (GRETAP)\" (gre_overlay_lab.frasm). Scenario: Demonstrates an RFC 2890 keyed + checksummed GRE tunnel exchange over IPv4 followed by an IPv6 outer GRETAP (`greproto 0x6558`) overlay frame. Verify with Wireshark filter `gre`.","completion":"Sets outer IPv4 Protocol or IPv6 Next Header to `47` and defaults `greproto` to `0x0800` (IPv4) with an inner probe header when `payload` is omitted. Dynamically toggles GRE header flag bits (`0x8000` for `checksum`, `0x2000` for `grekey`/`key`, `0x1000` for `greseq`) and inserts only the active 32-bit extension words in RFC 2890 order (`Checksum+Reserved1`, `Key`, `Sequence`). Compile with `frameassembly show gre_overlay_lab.frasm`.\n\n```frameassembly\nhost edge_a_v4 { ip 172.16.100.1 }\nhost edge_b_v4 { ip 172.16.100.2 }\nhost vtep_a_v6 { ip 2001:db8:47::1 }\nhost vtep_b_v6 { ip 2001:db8:47::2 }\n\ncompile {\n    // 1. Minimal 4-byte RFC 2784 GRE keepalive\n    edge_a_v4 -> edge_b_v4 gre payload \"keepalive-1\" wait 2ms\n    // 2. Full 16-byte GRE header (C=1, K=1, S=1) with tunnel key 5000\n    edge_a_v4 -> edge_b_v4 gre grekey 5000 greseq 10 checksum dscp 46 payload \"wan-voice-tunnel\" wait 2ms\n    edge_a_v4 <- edge_b_v4 gre grekey 5000 greseq 1 checksum dscp 46 payload \"wan-voice-reply\" wait 3ms\n    // 3. GRE over IPv6 carrying Transparent Ethernet Bridging (0x6558)\n    vtep_a_v6 -> vtep_b_v6 gre grekey 0x00102000 greproto 0x6558 hexpayload \"ffffffffffff001b21aa00010806\"\n}\n```","frasm_code":"host edge_a_v4 { ip 172.16.100.1 }\nhost edge_b_v4 { ip 172.16.100.2 }\nhost vtep_a_v6 { ip 2001:db8:47::1 }\nhost vtep_b_v6 { ip 2001:db8:47::2 }\n\ncompile {\n    // 1. Minimal 4-byte RFC 2784 GRE keepalive\n    edge_a_v4 -> edge_b_v4 gre payload \"keepalive-1\" wait 2ms\n    // 2. Full 16-byte GRE header (C=1, K=1, S=1) with tunnel key 5000\n    edge_a_v4 -> edge_b_v4 gre grekey 5000 greseq 10 checksum dscp 46 payload \"wan-voice-tunnel\" wait 2ms\n    edge_a_v4 <- edge_b_v4 gre grekey 5000 greseq 1 checksum dscp 46 payload \"wan-voice-reply\" wait 3ms\n    // 3. GRE over IPv6 carrying Transparent Ethernet Bridging (0x6558)\n    vtep_a_v6 -> vtep_b_v6 gre grekey 0x00102000 greproto 0x6558 hexpayload \"ffffffffffff001b21aa00010806\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"GRE / NVGRE (`gre`): Keyed Dual-Stack GRE Tunnel Sequence & Transparent Ethernet Bridging (GRETAP)\" (gre_overlay_lab.frasm). Scenario: Demonstrates an RFC 2890 keyed + checksummed GRE tunnel exchange over IPv4 followed by an IPv6 outer GRETAP (`greproto 0x6558`) overlay frame. Verify with Wireshark filter `gre`."},{"role":"assistant","content":"Sets outer IPv4 Protocol or IPv6 Next Header to `47` and defaults `greproto` to `0x0800` (IPv4) with an inner probe header when `payload` is omitted. Dynamically toggles GRE header flag bits (`0x8000` for `checksum`, `0x2000` for `grekey`/`key`, `0x1000` for `greseq`) and inserts only the active 32-bit extension words in RFC 2890 order (`Checksum+Reserved1`, `Key`, `Sequence`). Compile with `frameassembly show gre_overlay_lab.frasm`.\n\n```frameassembly\nhost edge_a_v4 { ip 172.16.100.1 }\nhost edge_b_v4 { ip 172.16.100.2 }\nhost vtep_a_v6 { ip 2001:db8:47::1 }\nhost vtep_b_v6 { ip 2001:db8:47::2 }\n\ncompile {\n    // 1. Minimal 4-byte RFC 2784 GRE keepalive\n    edge_a_v4 -> edge_b_v4 gre payload \"keepalive-1\" wait 2ms\n    // 2. Full 16-byte GRE header (C=1, K=1, S=1) with tunnel key 5000\n    edge_a_v4 -> edge_b_v4 gre grekey 5000 greseq 10 checksum dscp 46 payload \"wan-voice-tunnel\" wait 2ms\n    edge_a_v4 <- edge_b_v4 gre grekey 5000 greseq 1 checksum dscp 46 payload \"wan-voice-reply\" wait 3ms\n    // 3. GRE over IPv6 carrying Transparent Ethernet Bridging (0x6558)\n    vtep_a_v6 -> vtep_b_v6 gre grekey 0x00102000 greproto 0x6558 hexpayload \"ffffffffffff001b21aa00010806\"\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-vxlan","task_type":"nl_to_frasm","protocols":["vxlan","vlan"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"VXLAN (`vxlan`): Multi-Tenant EVPN-VXLAN Underlay Carrying L2VNI 10100 & L3VNI 50000\" (vxlan_evpn_fabric.frasm). Scenario: Simulates leaf VTEPs exchanging multi-tenant VXLAN traffic across ECMP UDP source ports, plus an IPv6 underlay VXLAN encapsulation. Verify with Wireshark filter `vxlan`.","completion":"Wraps the packet in UDP `dstport 4789` with ephemeral outer `srcport` and computes the outer IPv4/IPv6 + UDP checksums. Writes the 8-byte RFC 7348 VXLAN header (`08 00 00 00 <24-bit VNI> 00`) with the mandatory `I` bit (`0x08`) set. Compile with `frameassembly show vxlan_evpn_fabric.frasm`.\n\n```frameassembly\nhost leaf1_vtep { ip 10.255.0.11 mac 00:1c:73:aa:00:11 }\nhost leaf2_vtep { ip 10.255.0.12 mac 00:1c:73:aa:00:12 }\nhost vtep6_a    { ip 2001:db8:255::11 }\nhost vtep6_b    { ip 2001:db8:255::12 }\n\ncompile {\n    // Tenant A L2VNI 10100 with outer UDP entropy port 52101 and underlay VLAN 4090\n    leaf1_vtep -> leaf2_vtep vxlan vni 10100 srcport 52101 vlan 4090 dscp 26 wait 1ms\n    // Tenant B Symmetric IRB L3VNI 50000 with different ECMP hash port 58420\n    leaf2_vtep -> leaf1_vtep vxlan vnid 50000 srcport 58420 vlan 4090 dscp 46 wait 2ms\n    // IPv6 underlay VXLAN on legacy Linux port 8472\n    vtep6_a -> vtep6_b vxlan vni 20200 dstport 8472 flowlabel 0x33445\n}\n```","frasm_code":"host leaf1_vtep { ip 10.255.0.11 mac 00:1c:73:aa:00:11 }\nhost leaf2_vtep { ip 10.255.0.12 mac 00:1c:73:aa:00:12 }\nhost vtep6_a    { ip 2001:db8:255::11 }\nhost vtep6_b    { ip 2001:db8:255::12 }\n\ncompile {\n    // Tenant A L2VNI 10100 with outer UDP entropy port 52101 and underlay VLAN 4090\n    leaf1_vtep -> leaf2_vtep vxlan vni 10100 srcport 52101 vlan 4090 dscp 26 wait 1ms\n    // Tenant B Symmetric IRB L3VNI 50000 with different ECMP hash port 58420\n    leaf2_vtep -> leaf1_vtep vxlan vnid 50000 srcport 58420 vlan 4090 dscp 46 wait 2ms\n    // IPv6 underlay VXLAN on legacy Linux port 8472\n    vtep6_a -> vtep6_b vxlan vni 20200 dstport 8472 flowlabel 0x33445\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"VXLAN (`vxlan`): Multi-Tenant EVPN-VXLAN Underlay Carrying L2VNI 10100 & L3VNI 50000\" (vxlan_evpn_fabric.frasm). Scenario: Simulates leaf VTEPs exchanging multi-tenant VXLAN traffic across ECMP UDP source ports, plus an IPv6 underlay VXLAN encapsulation. Verify with Wireshark filter `vxlan`."},{"role":"assistant","content":"Wraps the packet in UDP `dstport 4789` with ephemeral outer `srcport` and computes the outer IPv4/IPv6 + UDP checksums. Writes the 8-byte RFC 7348 VXLAN header (`08 00 00 00 <24-bit VNI> 00`) with the mandatory `I` bit (`0x08`) set. Compile with `frameassembly show vxlan_evpn_fabric.frasm`.\n\n```frameassembly\nhost leaf1_vtep { ip 10.255.0.11 mac 00:1c:73:aa:00:11 }\nhost leaf2_vtep { ip 10.255.0.12 mac 00:1c:73:aa:00:12 }\nhost vtep6_a    { ip 2001:db8:255::11 }\nhost vtep6_b    { ip 2001:db8:255::12 }\n\ncompile {\n    // Tenant A L2VNI 10100 with outer UDP entropy port 52101 and underlay VLAN 4090\n    leaf1_vtep -> leaf2_vtep vxlan vni 10100 srcport 52101 vlan 4090 dscp 26 wait 1ms\n    // Tenant B Symmetric IRB L3VNI 50000 with different ECMP hash port 58420\n    leaf2_vtep -> leaf1_vtep vxlan vnid 50000 srcport 58420 vlan 4090 dscp 46 wait 2ms\n    // IPv6 underlay VXLAN on legacy Linux port 8472\n    vtep6_a -> vtep6_b vxlan vni 20200 dstport 8472 flowlabel 0x33445\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-geneve","task_type":"nl_to_frasm","protocols":["geneve"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"GENEVE (`geneve`): Kubernetes OVN & Cilium GENEVE Overlay With Security Identity TLVs\" (geneve_cni_tlvs.frasm). Scenario: Models pod-to-pod overlay packets carrying OVN (`0x0102`) and Cilium (`0x0104`) option classes, plus a Layer 3 IPv6 inner payload (`protocoltype 0x86dd`). Verify with Wireshark filter `geneve`.","completion":"Encapsulates over UDP `dstport 6081` with computed IPv4/IPv6 and UDP pseudo-header checksums. Writes the 8-byte RFC 8926 GENEVE base header (`Ver=0`, dynamic `OptLen` in 4-byte words, `Protocol Type=0x6558` TEB, and 24-bit `VNI`). Compile with `frameassembly show geneve_cni_tlvs.frasm`.\n\n```frameassembly\nhost node_az1 { ip 10.128.1.10 }\nhost node_az2 { ip 10.128.2.20 }\n\ncompile {\n    // 1. OVN-Kubernetes pod egress carrying Option Class 0x0102\n    node_az1 -> node_az2 geneve vni 4010 optclass 0x0102 opttype 1 srcport 55100 wait 1ms\n    // 2. Cilium return packet carrying Option Class 0x0104\n    node_az1 <- node_az2 geneve vni 4010 optclass 0x0104 opttype 2 srcport 59200 wait 2ms\n    // 3. Direct L3 IPv4 payload inside GENEVE (protocoltype 0x0800) for GWLB appliance test\n    node_az1 -> node_az2 geneve vni 100 optclass 0x0108 opttype 1 protocoltype 0x0800\n}\n```","frasm_code":"host node_az1 { ip 10.128.1.10 }\nhost node_az2 { ip 10.128.2.20 }\n\ncompile {\n    // 1. OVN-Kubernetes pod egress carrying Option Class 0x0102\n    node_az1 -> node_az2 geneve vni 4010 optclass 0x0102 opttype 1 srcport 55100 wait 1ms\n    // 2. Cilium return packet carrying Option Class 0x0104\n    node_az1 <- node_az2 geneve vni 4010 optclass 0x0104 opttype 2 srcport 59200 wait 2ms\n    // 3. Direct L3 IPv4 payload inside GENEVE (protocoltype 0x0800) for GWLB appliance test\n    node_az1 -> node_az2 geneve vni 100 optclass 0x0108 opttype 1 protocoltype 0x0800\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"GENEVE (`geneve`): Kubernetes OVN & Cilium GENEVE Overlay With Security Identity TLVs\" (geneve_cni_tlvs.frasm). Scenario: Models pod-to-pod overlay packets carrying OVN (`0x0102`) and Cilium (`0x0104`) option classes, plus a Layer 3 IPv6 inner payload (`protocoltype 0x86dd`). Verify with Wireshark filter `geneve`."},{"role":"assistant","content":"Encapsulates over UDP `dstport 6081` with computed IPv4/IPv6 and UDP pseudo-header checksums. Writes the 8-byte RFC 8926 GENEVE base header (`Ver=0`, dynamic `OptLen` in 4-byte words, `Protocol Type=0x6558` TEB, and 24-bit `VNI`). Compile with `frameassembly show geneve_cni_tlvs.frasm`.\n\n```frameassembly\nhost node_az1 { ip 10.128.1.10 }\nhost node_az2 { ip 10.128.2.20 }\n\ncompile {\n    // 1. OVN-Kubernetes pod egress carrying Option Class 0x0102\n    node_az1 -> node_az2 geneve vni 4010 optclass 0x0102 opttype 1 srcport 55100 wait 1ms\n    // 2. Cilium return packet carrying Option Class 0x0104\n    node_az1 <- node_az2 geneve vni 4010 optclass 0x0104 opttype 2 srcport 59200 wait 2ms\n    // 3. Direct L3 IPv4 payload inside GENEVE (protocoltype 0x0800) for GWLB appliance test\n    node_az1 -> node_az2 geneve vni 100 optclass 0x0108 opttype 1 protocoltype 0x0800\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-ipsec","task_type":"nl_to_frasm","protocols":["ipsec"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IPsec (ESP Alias) (`ipsec`): IKEv2 Tunnel Bring-Up Followed by Bidirectional IPsec Data Frames\" (ipsec_site_to_site.frasm). Scenario: Pairs an `ikev2` `SA_INIT` + `IKE_AUTH` negotiation on UDP 500 with encrypted `ipsec` tunnel-mode (`nextheader 4`) data packets in both directions. Verify with Wireshark filter `esp`.","completion":"Sets outer IPv4 Protocol or IPv6 Next Header to `50` (ESP). Encodes the 4-byte `spi` (default `0x00000100`), 4-byte ESP `seq` (default `1`), 8-byte `iv`, block-aligned ciphertext + 2-byte ESP trailer (`Pad Length` + `nextheader`), and 12-byte `icv` authentication tag. Compile with `frameassembly show ipsec_site_to_site.frasm`.\n\n```frameassembly\nhost gw_west { ip 198.51.100.10 }\nhost gw_east { ip 203.0.113.20 }\n\ncompile {\n    // 1. IKEv2 SA_INIT and IKE_AUTH key exchange on UDP 500\n    gw_west -> gw_east ikev2 sainit initiatorspi 0xa1b2c3d4e5f60708 msgid 0 nextheader 33 wait 3ms\n    gw_west <- gw_east ikev2 sainit initiatorspi 0xa1b2c3d4e5f60708 responderspi 0x1122334455667788 flags 0x20 wait 3ms\n    gw_west -> gw_east ikev2 auth initiatorspi 0xa1b2c3d4e5f60708 responderspi 0x1122334455667788 msgid 1 nextheader 46 wait 4ms\n    // 2. Bidirectional IPsec ESP tunnel frames (outbound SPI 0x1001, inbound SPI 0x2002)\n    gw_west -> gw_east ipsec spi 0x00001001 seq 1 iv \"0102030405060708\" icv \"aabbccddeeff001122334455\" nextheader 4 wait 1ms\n    gw_west -> gw_east ipsec spi 0x00001001 seq 2 iv \"090a0b0c0d0e0f10\" icv \"112233445566778899aabbcc\" nextheader 4 wait 2ms\n    gw_west <- gw_east ipsec spi 0x00002002 seq 1 iv \"f1f2f3f4f5f6f7f8\" icv \"99887766554433221100ffaa\" nextheader 4\n}\n```","frasm_code":"host gw_west { ip 198.51.100.10 }\nhost gw_east { ip 203.0.113.20 }\n\ncompile {\n    // 1. IKEv2 SA_INIT and IKE_AUTH key exchange on UDP 500\n    gw_west -> gw_east ikev2 sainit initiatorspi 0xa1b2c3d4e5f60708 msgid 0 nextheader 33 wait 3ms\n    gw_west <- gw_east ikev2 sainit initiatorspi 0xa1b2c3d4e5f60708 responderspi 0x1122334455667788 flags 0x20 wait 3ms\n    gw_west -> gw_east ikev2 auth initiatorspi 0xa1b2c3d4e5f60708 responderspi 0x1122334455667788 msgid 1 nextheader 46 wait 4ms\n    // 2. Bidirectional IPsec ESP tunnel frames (outbound SPI 0x1001, inbound SPI 0x2002)\n    gw_west -> gw_east ipsec spi 0x00001001 seq 1 iv \"0102030405060708\" icv \"aabbccddeeff001122334455\" nextheader 4 wait 1ms\n    gw_west -> gw_east ipsec spi 0x00001001 seq 2 iv \"090a0b0c0d0e0f10\" icv \"112233445566778899aabbcc\" nextheader 4 wait 2ms\n    gw_west <- gw_east ipsec spi 0x00002002 seq 1 iv \"f1f2f3f4f5f6f7f8\" icv \"99887766554433221100ffaa\" nextheader 4\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IPsec (ESP Alias) (`ipsec`): IKEv2 Tunnel Bring-Up Followed by Bidirectional IPsec Data Frames\" (ipsec_site_to_site.frasm). Scenario: Pairs an `ikev2` `SA_INIT` + `IKE_AUTH` negotiation on UDP 500 with encrypted `ipsec` tunnel-mode (`nextheader 4`) data packets in both directions. Verify with Wireshark filter `esp`."},{"role":"assistant","content":"Sets outer IPv4 Protocol or IPv6 Next Header to `50` (ESP). Encodes the 4-byte `spi` (default `0x00000100`), 4-byte ESP `seq` (default `1`), 8-byte `iv`, block-aligned ciphertext + 2-byte ESP trailer (`Pad Length` + `nextheader`), and 12-byte `icv` authentication tag. Compile with `frameassembly show ipsec_site_to_site.frasm`.\n\n```frameassembly\nhost gw_west { ip 198.51.100.10 }\nhost gw_east { ip 203.0.113.20 }\n\ncompile {\n    // 1. IKEv2 SA_INIT and IKE_AUTH key exchange on UDP 500\n    gw_west -> gw_east ikev2 sainit initiatorspi 0xa1b2c3d4e5f60708 msgid 0 nextheader 33 wait 3ms\n    gw_west <- gw_east ikev2 sainit initiatorspi 0xa1b2c3d4e5f60708 responderspi 0x1122334455667788 flags 0x20 wait 3ms\n    gw_west -> gw_east ikev2 auth initiatorspi 0xa1b2c3d4e5f60708 responderspi 0x1122334455667788 msgid 1 nextheader 46 wait 4ms\n    // 2. Bidirectional IPsec ESP tunnel frames (outbound SPI 0x1001, inbound SPI 0x2002)\n    gw_west -> gw_east ipsec spi 0x00001001 seq 1 iv \"0102030405060708\" icv \"aabbccddeeff001122334455\" nextheader 4 wait 1ms\n    gw_west -> gw_east ipsec spi 0x00001001 seq 2 iv \"090a0b0c0d0e0f10\" icv \"112233445566778899aabbcc\" nextheader 4 wait 2ms\n    gw_west <- gw_east ipsec spi 0x00002002 seq 1 iv \"f1f2f3f4f5f6f7f8\" icv \"99887766554433221100ffaa\" nextheader 4\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-esp","task_type":"nl_to_frasm","protocols":["esp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IPsec ESP (`esp`): Dual-Stack IPv4 & IPv6 ESP Security Associations With DiffServ QoS\" (esp_dualstack_vpn.frasm). Scenario: Emits unidirectional outbound and inbound ESP Security Associations across both IPv4 and IPv6 WAN endpoints with preserved DiffServ markings. Verify with Wireshark filter `esp`.","completion":"Emits IPv4 Protocol `50` or IPv6 Next Header `50` with computed outer IPv4 header checksum and exact payload length. Aligns ciphertext + padding + 2-byte trailer (`Pad Length`, `Next Header`) cleanly to cipher block boundaries before appending the `icv`. Compile with `frameassembly show esp_dualstack_vpn.frasm`.\n\n```frameassembly\nhost hub_v4    { ip 198.51.100.1 }\nhost spoke_v4  { ip 203.0.113.50 }\nhost hub_v6    { ip 2001:db8:100::1 }\nhost spoke_v6  { ip 2001:db8:200::50 }\n\ncompile {\n    // IPv4 ESP tunnel (SPI 0x1010 -> 0x2020) with Expedited Forwarding (dscp 46)\n    spoke_v4 -> hub_v4 esp spi 0x00001010 seq 101 iv \"1011121314151617\" icv \"a1a2a3a4a5a6a7a8a9aaabac\" nextheader 4 dscp 46 df wait 1ms\n    spoke_v4 <- hub_v4 esp spi 0x00002020 seq 88 iv \"2021222324252627\" icv \"b1b2b3b4b5b6b7b8b9babbbc\" nextheader 4 dscp 46 df wait 3ms\n    // IPv6 ESP tunnel (Next Header 50, inner Next Header 41 = IPv6-in-IPv6)\n    spoke_v6 -> hub_v6 esp spi 0x00061010 seq 1 iv \"3031323334353637\" icv \"c1c2c3c4c5c6c7c8c9cacbcc\" nextheader 41 flowlabel 0x50001\n}\n```","frasm_code":"host hub_v4    { ip 198.51.100.1 }\nhost spoke_v4  { ip 203.0.113.50 }\nhost hub_v6    { ip 2001:db8:100::1 }\nhost spoke_v6  { ip 2001:db8:200::50 }\n\ncompile {\n    // IPv4 ESP tunnel (SPI 0x1010 -> 0x2020) with Expedited Forwarding (dscp 46)\n    spoke_v4 -> hub_v4 esp spi 0x00001010 seq 101 iv \"1011121314151617\" icv \"a1a2a3a4a5a6a7a8a9aaabac\" nextheader 4 dscp 46 df wait 1ms\n    spoke_v4 <- hub_v4 esp spi 0x00002020 seq 88 iv \"2021222324252627\" icv \"b1b2b3b4b5b6b7b8b9babbbc\" nextheader 4 dscp 46 df wait 3ms\n    // IPv6 ESP tunnel (Next Header 50, inner Next Header 41 = IPv6-in-IPv6)\n    spoke_v6 -> hub_v6 esp spi 0x00061010 seq 1 iv \"3031323334353637\" icv \"c1c2c3c4c5c6c7c8c9cacbcc\" nextheader 41 flowlabel 0x50001\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IPsec ESP (`esp`): Dual-Stack IPv4 & IPv6 ESP Security Associations With DiffServ QoS\" (esp_dualstack_vpn.frasm). Scenario: Emits unidirectional outbound and inbound ESP Security Associations across both IPv4 and IPv6 WAN endpoints with preserved DiffServ markings. Verify with Wireshark filter `esp`."},{"role":"assistant","content":"Emits IPv4 Protocol `50` or IPv6 Next Header `50` with computed outer IPv4 header checksum and exact payload length. Aligns ciphertext + padding + 2-byte trailer (`Pad Length`, `Next Header`) cleanly to cipher block boundaries before appending the `icv`. Compile with `frameassembly show esp_dualstack_vpn.frasm`.\n\n```frameassembly\nhost hub_v4    { ip 198.51.100.1 }\nhost spoke_v4  { ip 203.0.113.50 }\nhost hub_v6    { ip 2001:db8:100::1 }\nhost spoke_v6  { ip 2001:db8:200::50 }\n\ncompile {\n    // IPv4 ESP tunnel (SPI 0x1010 -> 0x2020) with Expedited Forwarding (dscp 46)\n    spoke_v4 -> hub_v4 esp spi 0x00001010 seq 101 iv \"1011121314151617\" icv \"a1a2a3a4a5a6a7a8a9aaabac\" nextheader 4 dscp 46 df wait 1ms\n    spoke_v4 <- hub_v4 esp spi 0x00002020 seq 88 iv \"2021222324252627\" icv \"b1b2b3b4b5b6b7b8b9babbbc\" nextheader 4 dscp 46 df wait 3ms\n    // IPv6 ESP tunnel (Next Header 50, inner Next Header 41 = IPv6-in-IPv6)\n    spoke_v6 -> hub_v6 esp spi 0x00061010 seq 1 iv \"3031323334353637\" icv \"c1c2c3c4c5c6c7c8c9cacbcc\" nextheader 41 flowlabel 0x50001\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-ah","task_type":"nl_to_frasm","protocols":["ah"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IPsec AH (`ah`): Authenticated Dual-Stack Router Peering Using IPsec AH (Protocol 51)\" (ah_authenticated_peering.frasm). Scenario: Emits bidirectional IPv4 and IPv6 RFC 4302 Authentication Header packets demonstrating 32-bit vs 64-bit ICV alignment. Verify with Wireshark filter `ah`.","completion":"Sets outer IPv4 Protocol or IPv6 Next Header to `51` (Authentication Header). Computes RFC 4302 `Payload Len = (total_ah_bytes / 4) - 2` automatically and zero-pads `icv` to 4-byte (IPv4) or 8-byte (IPv6) alignment. Compile with `frameassembly show ah_authenticated_peering.frasm`.\n\n```frameassembly\nhost core_a_v4 { ip 172.16.51.1 }\nhost core_b_v4 { ip 172.16.51.2 }\nhost core_a_v6 { ip 2001:db8:51::1 }\nhost core_b_v6 { ip 2001:db8:51::2 }\n\ncompile {\n    // IPv4 AH (24-byte header: Payload Len = 4, 12-byte 96-bit ICV)\n    core_a_v4 -> core_b_v4 ah spi 0x00002001 seq 1 nextheader 59 icv \"00112233445566778899aabb\" payload \"cleartext-signed-v4\" wait 2ms\n    core_a_v4 <- core_b_v4 ah spi 0x00002002 seq 1 nextheader 59 icv \"aabbccddeeff001122334455\" payload \"cleartext-ack-v4\" wait 3ms\n    // IPv6 AH (aligned to 8-octet boundary per RFC 4302 §2.2)\n    core_a_v6 -> core_b_v6 ah spi 0x00062001 seq 1 nextheader 59 icv \"0102030405060708090a0b0c\" payload \"cleartext-signed-v6\"\n}\n```","frasm_code":"host core_a_v4 { ip 172.16.51.1 }\nhost core_b_v4 { ip 172.16.51.2 }\nhost core_a_v6 { ip 2001:db8:51::1 }\nhost core_b_v6 { ip 2001:db8:51::2 }\n\ncompile {\n    // IPv4 AH (24-byte header: Payload Len = 4, 12-byte 96-bit ICV)\n    core_a_v4 -> core_b_v4 ah spi 0x00002001 seq 1 nextheader 59 icv \"00112233445566778899aabb\" payload \"cleartext-signed-v4\" wait 2ms\n    core_a_v4 <- core_b_v4 ah spi 0x00002002 seq 1 nextheader 59 icv \"aabbccddeeff001122334455\" payload \"cleartext-ack-v4\" wait 3ms\n    // IPv6 AH (aligned to 8-octet boundary per RFC 4302 §2.2)\n    core_a_v6 -> core_b_v6 ah spi 0x00062001 seq 1 nextheader 59 icv \"0102030405060708090a0b0c\" payload \"cleartext-signed-v6\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IPsec AH (`ah`): Authenticated Dual-Stack Router Peering Using IPsec AH (Protocol 51)\" (ah_authenticated_peering.frasm). Scenario: Emits bidirectional IPv4 and IPv6 RFC 4302 Authentication Header packets demonstrating 32-bit vs 64-bit ICV alignment. Verify with Wireshark filter `ah`."},{"role":"assistant","content":"Sets outer IPv4 Protocol or IPv6 Next Header to `51` (Authentication Header). Computes RFC 4302 `Payload Len = (total_ah_bytes / 4) - 2` automatically and zero-pads `icv` to 4-byte (IPv4) or 8-byte (IPv6) alignment. Compile with `frameassembly show ah_authenticated_peering.frasm`.\n\n```frameassembly\nhost core_a_v4 { ip 172.16.51.1 }\nhost core_b_v4 { ip 172.16.51.2 }\nhost core_a_v6 { ip 2001:db8:51::1 }\nhost core_b_v6 { ip 2001:db8:51::2 }\n\ncompile {\n    // IPv4 AH (24-byte header: Payload Len = 4, 12-byte 96-bit ICV)\n    core_a_v4 -> core_b_v4 ah spi 0x00002001 seq 1 nextheader 59 icv \"00112233445566778899aabb\" payload \"cleartext-signed-v4\" wait 2ms\n    core_a_v4 <- core_b_v4 ah spi 0x00002002 seq 1 nextheader 59 icv \"aabbccddeeff001122334455\" payload \"cleartext-ack-v4\" wait 3ms\n    // IPv6 AH (aligned to 8-octet boundary per RFC 4302 §2.2)\n    core_a_v6 -> core_b_v6 ah spi 0x00062001 seq 1 nextheader 59 icv \"0102030405060708090a0b0c\" payload \"cleartext-signed-v6\"\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-ikev2","task_type":"nl_to_frasm","protocols":["ikev2"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IKEv2 (`ikev2`): IKEv2 SA_INIT on UDP 500 Floating to NAT-Traversal UDP 4500 + DPD Check\" (ikev2_natt_dpd.frasm). Scenario: Traces a complete IKEv2 phase: `SA_INIT` on UDP `500`, NAT-T port float to UDP `4500` for encrypted `IKE_AUTH` (`nextpayload 46`), and an `INFORMATIONAL` Dead Peer Detection exchange. Verify with Wireshark filter `isakmp`.","completion":"Defaults both `srcport` and `dstport` to IANA IKE port `500` (avoiding ephemeral `49152` source ports blocked by strict VPN ACLs). Writes the 28-byte RFC 7296 IKEv2 header (`Version 0x20`, exact 32-bit `Length`, 64-bit SPIs) and defaults `responderspi` to `0` on `sainit` requests. Compile with `frameassembly show ikev2_natt_dpd.frasm`.\n\n```frameassembly\nhost branch_fw { ip 198.51.100.15 }\nhost cloud_vpn { ip 203.0.113.99 }\n\ncompile {\n    // 1. IKE_SA_INIT on UDP 500 -> 500 (Next Payload 33 = Security Association)\n    branch_fw -> cloud_vpn ikev2 sainit initiatorspi 0x9080706050403020 responderspi 0 msgid 0 flags 0x08 nextpayload 33 wait 4ms\n    branch_fw <- cloud_vpn ikev2 sainit initiatorspi 0x9080706050403020 responderspi 0x0102030405060708 msgid 0 flags 0x20 nextpayload 33 wait 4ms\n    // 2. Float to UDP 4500 for IKE_AUTH (Next Payload 46 = Encrypted & Authenticated SK)\n    branch_fw -> cloud_vpn ikev2 auth srcport 4500 dstport 4500 initiatorspi 0x9080706050403020 responderspi 0x0102030405060708 msgid 1 flags 0x08 nextpayload 46 wait 5ms\n    branch_fw <- cloud_vpn ikev2 auth srcport 4500 dstport 4500 initiatorspi 0x9080706050403020 responderspi 0x0102030405060708 msgid 1 flags 0x20 nextpayload 46 wait 50ms\n    // 3. INFORMATIONAL Dead Peer Detection (DPD) liveness check\n    branch_fw -> cloud_vpn ikev2 informational srcport 4500 dstport 4500 initiatorspi 0x9080706050403020 responderspi 0x0102030405060708 msgid 2 flags 0x08 nextpayload 46 wait 3ms\n    branch_fw <- cloud_vpn ikev2 informational srcport 4500 dstport 4500 initiatorspi 0x9080706050403020 responderspi 0x0102030405060708 msgid 2 flags 0x20 nextpayload 46\n}\n```","frasm_code":"host branch_fw { ip 198.51.100.15 }\nhost cloud_vpn { ip 203.0.113.99 }\n\ncompile {\n    // 1. IKE_SA_INIT on UDP 500 -> 500 (Next Payload 33 = Security Association)\n    branch_fw -> cloud_vpn ikev2 sainit initiatorspi 0x9080706050403020 responderspi 0 msgid 0 flags 0x08 nextpayload 33 wait 4ms\n    branch_fw <- cloud_vpn ikev2 sainit initiatorspi 0x9080706050403020 responderspi 0x0102030405060708 msgid 0 flags 0x20 nextpayload 33 wait 4ms\n    // 2. Float to UDP 4500 for IKE_AUTH (Next Payload 46 = Encrypted & Authenticated SK)\n    branch_fw -> cloud_vpn ikev2 auth srcport 4500 dstport 4500 initiatorspi 0x9080706050403020 responderspi 0x0102030405060708 msgid 1 flags 0x08 nextpayload 46 wait 5ms\n    branch_fw <- cloud_vpn ikev2 auth srcport 4500 dstport 4500 initiatorspi 0x9080706050403020 responderspi 0x0102030405060708 msgid 1 flags 0x20 nextpayload 46 wait 50ms\n    // 3. INFORMATIONAL Dead Peer Detection (DPD) liveness check\n    branch_fw -> cloud_vpn ikev2 informational srcport 4500 dstport 4500 initiatorspi 0x9080706050403020 responderspi 0x0102030405060708 msgid 2 flags 0x08 nextpayload 46 wait 3ms\n    branch_fw <- cloud_vpn ikev2 informational srcport 4500 dstport 4500 initiatorspi 0x9080706050403020 responderspi 0x0102030405060708 msgid 2 flags 0x20 nextpayload 46\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IKEv2 (`ikev2`): IKEv2 SA_INIT on UDP 500 Floating to NAT-Traversal UDP 4500 + DPD Check\" (ikev2_natt_dpd.frasm). Scenario: Traces a complete IKEv2 phase: `SA_INIT` on UDP `500`, NAT-T port float to UDP `4500` for encrypted `IKE_AUTH` (`nextpayload 46`), and an `INFORMATIONAL` Dead Peer Detection exchange. Verify with Wireshark filter `isakmp`."},{"role":"assistant","content":"Defaults both `srcport` and `dstport` to IANA IKE port `500` (avoiding ephemeral `49152` source ports blocked by strict VPN ACLs). Writes the 28-byte RFC 7296 IKEv2 header (`Version 0x20`, exact 32-bit `Length`, 64-bit SPIs) and defaults `responderspi` to `0` on `sainit` requests. Compile with `frameassembly show ikev2_natt_dpd.frasm`.\n\n```frameassembly\nhost branch_fw { ip 198.51.100.15 }\nhost cloud_vpn { ip 203.0.113.99 }\n\ncompile {\n    // 1. IKE_SA_INIT on UDP 500 -> 500 (Next Payload 33 = Security Association)\n    branch_fw -> cloud_vpn ikev2 sainit initiatorspi 0x9080706050403020 responderspi 0 msgid 0 flags 0x08 nextpayload 33 wait 4ms\n    branch_fw <- cloud_vpn ikev2 sainit initiatorspi 0x9080706050403020 responderspi 0x0102030405060708 msgid 0 flags 0x20 nextpayload 33 wait 4ms\n    // 2. Float to UDP 4500 for IKE_AUTH (Next Payload 46 = Encrypted & Authenticated SK)\n    branch_fw -> cloud_vpn ikev2 auth srcport 4500 dstport 4500 initiatorspi 0x9080706050403020 responderspi 0x0102030405060708 msgid 1 flags 0x08 nextpayload 46 wait 5ms\n    branch_fw <- cloud_vpn ikev2 auth srcport 4500 dstport 4500 initiatorspi 0x9080706050403020 responderspi 0x0102030405060708 msgid 1 flags 0x20 nextpayload 46 wait 50ms\n    // 3. INFORMATIONAL Dead Peer Detection (DPD) liveness check\n    branch_fw -> cloud_vpn ikev2 informational srcport 4500 dstport 4500 initiatorspi 0x9080706050403020 responderspi 0x0102030405060708 msgid 2 flags 0x08 nextpayload 46 wait 3ms\n    branch_fw <- cloud_vpn ikev2 informational srcport 4500 dstport 4500 initiatorspi 0x9080706050403020 responderspi 0x0102030405060708 msgid 2 flags 0x20 nextpayload 46\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-wireguard","task_type":"nl_to_frasm","protocols":["wireguard"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"WireGuard (`wireguard`): Full 1-RTT Noise_IK Handshake, Transport Data Stream, and Under-Load Cookie\" (wireguard_handshake_data.frasm). Scenario: Captures a WireGuard initiator completing a 1-RTT handshake (`initiation` + `response`), exchanging encrypted `data` frames with incrementing counters, and handling a `cookie` challenge. Verify with Wireshark filter `wg`.","completion":"Defaults UDP `dstport` to `51820` and writes the 4-byte WireGuard message header (`Type` `1..4` followed by three mandatory `0x00` reserved bytes). Emits exact-length handshake structures: `148` bytes for `initiation` (`Type 1`), `92` bytes for `response` (`Type 2`), and `64` bytes for `cookie` (`Type 3`). Compile with `frameassembly show wireguard_handshake_data.frasm`.\n\n```frameassembly\nhost roadwarrior { ip 198.51.100.88 }\nhost corp_wg_gw  { ip 203.0.113.5 }\n\ncompile {\n    // 1. Optional DoS Cookie Reply challenge (64 bytes, Type 3)\n    roadwarrior -> corp_wg_gw wireguard initiation sender 0x11112222 wait 2ms\n    roadwarrior <- corp_wg_gw wireguard cookie receiver 0x11112222 wait 3ms\n    // 2. Full 1-RTT Noise_IKpsk2 Handshake (148B Initiation -> 92B Response)\n    roadwarrior -> corp_wg_gw wireguard initiation sender 0x33334444 wait 2ms\n    roadwarrior <- corp_wg_gw wireguard response sender 0xaaaabbbb receiver 0x33334444 wait 2ms\n    // 3. Encrypted Transport Data packets (Type 4) swapping receiver indices\n    roadwarrior -> corp_wg_gw wireguard data receiver 0xaaaabbbb counter 0 payload \"inner-ipv4-syn\" wait 1ms\n    roadwarrior <- corp_wg_gw wireguard data receiver 0x33334444 counter 0 payload \"inner-ipv4-synack\" wait 1ms\n    roadwarrior -> corp_wg_gw wireguard data receiver 0xaaaabbbb counter 1 payload \"inner-ipv4-ack\"\n}\n```","frasm_code":"host roadwarrior { ip 198.51.100.88 }\nhost corp_wg_gw  { ip 203.0.113.5 }\n\ncompile {\n    // 1. Optional DoS Cookie Reply challenge (64 bytes, Type 3)\n    roadwarrior -> corp_wg_gw wireguard initiation sender 0x11112222 wait 2ms\n    roadwarrior <- corp_wg_gw wireguard cookie receiver 0x11112222 wait 3ms\n    // 2. Full 1-RTT Noise_IKpsk2 Handshake (148B Initiation -> 92B Response)\n    roadwarrior -> corp_wg_gw wireguard initiation sender 0x33334444 wait 2ms\n    roadwarrior <- corp_wg_gw wireguard response sender 0xaaaabbbb receiver 0x33334444 wait 2ms\n    // 3. Encrypted Transport Data packets (Type 4) swapping receiver indices\n    roadwarrior -> corp_wg_gw wireguard data receiver 0xaaaabbbb counter 0 payload \"inner-ipv4-syn\" wait 1ms\n    roadwarrior <- corp_wg_gw wireguard data receiver 0x33334444 counter 0 payload \"inner-ipv4-synack\" wait 1ms\n    roadwarrior -> corp_wg_gw wireguard data receiver 0xaaaabbbb counter 1 payload \"inner-ipv4-ack\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"WireGuard (`wireguard`): Full 1-RTT Noise_IK Handshake, Transport Data Stream, and Under-Load Cookie\" (wireguard_handshake_data.frasm). Scenario: Captures a WireGuard initiator completing a 1-RTT handshake (`initiation` + `response`), exchanging encrypted `data` frames with incrementing counters, and handling a `cookie` challenge. Verify with Wireshark filter `wg`."},{"role":"assistant","content":"Defaults UDP `dstport` to `51820` and writes the 4-byte WireGuard message header (`Type` `1..4` followed by three mandatory `0x00` reserved bytes). Emits exact-length handshake structures: `148` bytes for `initiation` (`Type 1`), `92` bytes for `response` (`Type 2`), and `64` bytes for `cookie` (`Type 3`). Compile with `frameassembly show wireguard_handshake_data.frasm`.\n\n```frameassembly\nhost roadwarrior { ip 198.51.100.88 }\nhost corp_wg_gw  { ip 203.0.113.5 }\n\ncompile {\n    // 1. Optional DoS Cookie Reply challenge (64 bytes, Type 3)\n    roadwarrior -> corp_wg_gw wireguard initiation sender 0x11112222 wait 2ms\n    roadwarrior <- corp_wg_gw wireguard cookie receiver 0x11112222 wait 3ms\n    // 2. Full 1-RTT Noise_IKpsk2 Handshake (148B Initiation -> 92B Response)\n    roadwarrior -> corp_wg_gw wireguard initiation sender 0x33334444 wait 2ms\n    roadwarrior <- corp_wg_gw wireguard response sender 0xaaaabbbb receiver 0x33334444 wait 2ms\n    // 3. Encrypted Transport Data packets (Type 4) swapping receiver indices\n    roadwarrior -> corp_wg_gw wireguard data receiver 0xaaaabbbb counter 0 payload \"inner-ipv4-syn\" wait 1ms\n    roadwarrior <- corp_wg_gw wireguard data receiver 0x33334444 counter 0 payload \"inner-ipv4-synack\" wait 1ms\n    roadwarrior -> corp_wg_gw wireguard data receiver 0xaaaabbbb counter 1 payload \"inner-ipv4-ack\"\n}\n```"}]}
{"id":"sft-cookbook-ex-ddi-dns-tcp-axfr-fallback","task_type":"nl_to_frasm","protocols":["tcp","dns"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"DNS over TCP Port 53 Zone Transfer Check (transport tcp)\" (dns_tcp_zone_transfer.frasm). Scenario: Tests firewall rules that mistakenly allow UDP 53 while blocking TCP 53 (required for truncated responses >512B, DNSSEC, and AXFR transfers). Verify with Wireshark filter `dns && tcp.port == 53`.","completion":"Adding transport tcp to dns prepends the mandatory RFC 1035 2-byte big-endian TCP message-length prefix automatically. Compile with `frameassembly dns_tcp_zone_transfer.frasm`.\n\n```frameassembly\nhost ns_secondary { ip 10.53.0.12 }\nhost ns_primary   { ip 10.53.0.11 }\n\ncompile {\n    ns_secondary -> ns_primary tcp syn srcport 53053 dstport 53 win 65535 mss 1460 wait 1ms\n    ns_secondary <- ns_primary tcp syn ack win 65535 mss 1460 wait 1ms\n    ns_secondary -> ns_primary tcp ack wait 1ms\n    ns_secondary -> ns_primary dns query txid 0x8801 qname \"prod.corp.internal\" qtype \"AXFR\" transport tcp wait 3ms\n    ns_secondary <- ns_primary dns response txid 0x8801 qname \"prod.corp.internal\" qtype \"A\" rdata \"10.53.10.20\" ansttl 3600 transport tcp\n}\n```","frasm_code":"host ns_secondary { ip 10.53.0.12 }\nhost ns_primary   { ip 10.53.0.11 }\n\ncompile {\n    ns_secondary -> ns_primary tcp syn srcport 53053 dstport 53 win 65535 mss 1460 wait 1ms\n    ns_secondary <- ns_primary tcp syn ack win 65535 mss 1460 wait 1ms\n    ns_secondary -> ns_primary tcp ack wait 1ms\n    ns_secondary -> ns_primary dns query txid 0x8801 qname \"prod.corp.internal\" qtype \"AXFR\" transport tcp wait 3ms\n    ns_secondary <- ns_primary dns response txid 0x8801 qname \"prod.corp.internal\" qtype \"A\" rdata \"10.53.10.20\" ansttl 3600 transport tcp\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"DNS over TCP Port 53 Zone Transfer Check (transport tcp)\" (dns_tcp_zone_transfer.frasm). Scenario: Tests firewall rules that mistakenly allow UDP 53 while blocking TCP 53 (required for truncated responses >512B, DNSSEC, and AXFR transfers). Verify with Wireshark filter `dns && tcp.port == 53`."},{"role":"assistant","content":"Adding transport tcp to dns prepends the mandatory RFC 1035 2-byte big-endian TCP message-length prefix automatically. Compile with `frameassembly dns_tcp_zone_transfer.frasm`.\n\n```frameassembly\nhost ns_secondary { ip 10.53.0.12 }\nhost ns_primary   { ip 10.53.0.11 }\n\ncompile {\n    ns_secondary -> ns_primary tcp syn srcport 53053 dstport 53 win 65535 mss 1460 wait 1ms\n    ns_secondary <- ns_primary tcp syn ack win 65535 mss 1460 wait 1ms\n    ns_secondary -> ns_primary tcp ack wait 1ms\n    ns_secondary -> ns_primary dns query txid 0x8801 qname \"prod.corp.internal\" qtype \"AXFR\" transport tcp wait 3ms\n    ns_secondary <- ns_primary dns response txid 0x8801 qname \"prod.corp.internal\" qtype \"A\" rdata \"10.53.10.20\" ansttl 3600 transport tcp\n}\n```"}]}
{"id":"sft-cookbook-ex-ddi-dhcpv6-sarr-exchange","task_type":"nl_to_frasm","protocols":["dhcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Stateful DHCPv6 Four-Packet SARR Lease (Solicit, Advertise, Request, Reply)\" (dhcpv6_sarr_lease.frasm). Scenario: Exercises IPv6 DHCPv6 client-to-relay/server port flipping (UDP 546 <-> 547) across Solicit, Advertise, Request, and Reply. Verify with Wireshark filter `dhcpv6`.","completion":"Over IPv6 endpoints, dhcp automatically switches from BOOTP (68/67) to RFC 8415 DHCPv6 (546/547). Compile with `frameassembly dhcpv6_sarr_lease.frasm`.\n\n```frameassembly\nhost client_v6 { ip fe80::250:56ff:feaa:0010 mac 00:50:56:aa:00:10 }\nhost dhcp_v6   { ip fe80::1                   mac 00:1c:73:00:00:53 }\n\ncompile {\n    client_v6 -> dhcp_v6 dhcp solicit txid 0x102030 wait 3ms\n    client_v6 <- dhcp_v6 dhcp advertise txid 0x102030 wait 2ms\n    client_v6 -> dhcp_v6 dhcp request txid 0x102031 wait 2ms\n    client_v6 <- dhcp_v6 dhcp reply txid 0x102031\n}\n```","frasm_code":"host client_v6 { ip fe80::250:56ff:feaa:0010 mac 00:50:56:aa:00:10 }\nhost dhcp_v6   { ip fe80::1                   mac 00:1c:73:00:00:53 }\n\ncompile {\n    client_v6 -> dhcp_v6 dhcp solicit txid 0x102030 wait 3ms\n    client_v6 <- dhcp_v6 dhcp advertise txid 0x102030 wait 2ms\n    client_v6 -> dhcp_v6 dhcp request txid 0x102031 wait 2ms\n    client_v6 <- dhcp_v6 dhcp reply txid 0x102031\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Stateful DHCPv6 Four-Packet SARR Lease (Solicit, Advertise, Request, Reply)\" (dhcpv6_sarr_lease.frasm). Scenario: Exercises IPv6 DHCPv6 client-to-relay/server port flipping (UDP 546 <-> 547) across Solicit, Advertise, Request, and Reply. Verify with Wireshark filter `dhcpv6`."},{"role":"assistant","content":"Over IPv6 endpoints, dhcp automatically switches from BOOTP (68/67) to RFC 8415 DHCPv6 (546/547). Compile with `frameassembly dhcpv6_sarr_lease.frasm`.\n\n```frameassembly\nhost client_v6 { ip fe80::250:56ff:feaa:0010 mac 00:50:56:aa:00:10 }\nhost dhcp_v6   { ip fe80::1                   mac 00:1c:73:00:00:53 }\n\ncompile {\n    client_v6 -> dhcp_v6 dhcp solicit txid 0x102030 wait 3ms\n    client_v6 <- dhcp_v6 dhcp advertise txid 0x102030 wait 2ms\n    client_v6 -> dhcp_v6 dhcp request txid 0x102031 wait 2ms\n    client_v6 <- dhcp_v6 dhcp reply txid 0x102031\n}\n```"}]}
{"id":"sft-cookbook-ex-timing-ptpv2-nanosecond-pcapng","task_type":"nl_to_frasm","protocols":["ptp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Nanosecond IEEE 1588 PTPv2 Two-Step Sync Burst (.pcapng Output)\" (ptpv2_nanosecond_sync.frasm). Scenario: Emits a grandmaster PTPv2 Sync (UDP 319), Follow_Up (UDP 320), Delay_Req (UDP 319), and Delay_Resp (UDP 320) spaced at sub-microsecond 250ns intervals. Verify with Wireshark filter `ptp`.","completion":"Compile to .pcapng so IfTsResol(9) preserves exact 1-nanosecond timestamps on UDP ports 319 and 320. Compile with `frameassembly ptpv2_nanosecond_sync.frasm ptpv2_nanosecond_sync.pcapng`.\n\n```frameassembly\nhost gm_clock    { ip 10.158.0.1 mac 00:1c:73:15:88:01 }\nhost boundary_sw { ip 10.158.0.2 mac 00:1c:73:00:15:88 }\n\ncompile {\n    gm_clock -> boundary_sw ptp sync domain 24 seqid 900 clockid \"001c73fffe000001\" dscp 46 wait 250ns\n    gm_clock -> boundary_sw ptp followup domain 24 seqid 900 clockid \"001c73fffe000001\" dscp 46 wait 500ns\n    boundary_sw -> gm_clock ptp delayreq domain 24 seqid 45 clockid \"001c73fffe001588\" dscp 46 wait 250ns\n    boundary_sw <- gm_clock ptp delayresp domain 24 seqid 45 clockid \"001c73fffe000001\" dscp 46\n}\n```","frasm_code":"host gm_clock    { ip 10.158.0.1 mac 00:1c:73:15:88:01 }\nhost boundary_sw { ip 10.158.0.2 mac 00:1c:73:00:15:88 }\n\ncompile {\n    gm_clock -> boundary_sw ptp sync domain 24 seqid 900 clockid \"001c73fffe000001\" dscp 46 wait 250ns\n    gm_clock -> boundary_sw ptp followup domain 24 seqid 900 clockid \"001c73fffe000001\" dscp 46 wait 500ns\n    boundary_sw -> gm_clock ptp delayreq domain 24 seqid 45 clockid \"001c73fffe001588\" dscp 46 wait 250ns\n    boundary_sw <- gm_clock ptp delayresp domain 24 seqid 45 clockid \"001c73fffe000001\" dscp 46\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Nanosecond IEEE 1588 PTPv2 Two-Step Sync Burst (.pcapng Output)\" (ptpv2_nanosecond_sync.frasm). Scenario: Emits a grandmaster PTPv2 Sync (UDP 319), Follow_Up (UDP 320), Delay_Req (UDP 319), and Delay_Resp (UDP 320) spaced at sub-microsecond 250ns intervals. Verify with Wireshark filter `ptp`."},{"role":"assistant","content":"Compile to .pcapng so IfTsResol(9) preserves exact 1-nanosecond timestamps on UDP ports 319 and 320. Compile with `frameassembly ptpv2_nanosecond_sync.frasm ptpv2_nanosecond_sync.pcapng`.\n\n```frameassembly\nhost gm_clock    { ip 10.158.0.1 mac 00:1c:73:15:88:01 }\nhost boundary_sw { ip 10.158.0.2 mac 00:1c:73:00:15:88 }\n\ncompile {\n    gm_clock -> boundary_sw ptp sync domain 24 seqid 900 clockid \"001c73fffe000001\" dscp 46 wait 250ns\n    gm_clock -> boundary_sw ptp followup domain 24 seqid 900 clockid \"001c73fffe000001\" dscp 46 wait 500ns\n    boundary_sw -> gm_clock ptp delayreq domain 24 seqid 45 clockid \"001c73fffe001588\" dscp 46 wait 250ns\n    boundary_sw <- gm_clock ptp delayresp domain 24 seqid 45 clockid \"001c73fffe000001\" dscp 46\n}\n```"}]}
{"id":"sft-cookbook-lib-scan-udp-service-probe","task_type":"nl_to_frasm","protocols":["dns","ntp","udp","icmp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"UDP Service Probe (DNS 53, NTP 123 & Closed Port ICMP Unreachable)\" (scan_udp_services.frasm). Scenario: Probes UDP 53 (DNS), UDP 123 (NTP), and closed UDP 1900 on an infrastructure host to show open UDP protocol replies vs. ICMP Port Unreachable (Type 3, Code 3). Verify with Wireshark filter `dns || ntp || udp.port == 1900 || icmp`.","completion":"Closed UDP ports do not send TCP RSTs—instead, the target OS sends an ICMP Destination Unreachable (Code 3: Port Unreachable) packet. Compile with `frameassembly scan_udp_services.frasm`.\n\n```frameassembly\n// Audit host checking active UDP services on an internal infrastructure server\nhost audit_pc  { ip 10.15.0.25 }\nhost infra_srv { ip 10.15.1.10 }\n\ncompile {\n    // 1. UDP 53 (DNS) -> Open: answers standard A-record query\n    audit_pc -> infra_srv dns query txid 0x1001 qname \"ns1.corp.local\" qtype \"A\" wait 2ms\n    audit_pc <- infra_srv dns response txid 0x1001 qname \"ns1.corp.local\" qtype \"A\" rdata \"10.15.1.10\" wait 3ms\n\n    // 2. UDP 123 (NTP) -> Open: answers client mode 3 poll with server mode 4 stratum 2\n    audit_pc -> infra_srv ntp vn 4 mode 3 poll 6 wait 2ms\n    audit_pc <- infra_srv ntp vn 4 mode 4 stratum 2 refid \"GPS\" wait 3ms\n\n    // 3. UDP 1900 -> Closed: server OS returns ICMP Port Unreachable (Type 3, Code 3)\n    audit_pc -> infra_srv udp srcport 55200 dstport 1900 payload \"M-SEARCH\" wait 2ms\n    infra_srv -> audit_pc icmp destunreach type 3 code 3\n}\n```","frasm_code":"// Audit host checking active UDP services on an internal infrastructure server\nhost audit_pc  { ip 10.15.0.25 }\nhost infra_srv { ip 10.15.1.10 }\n\ncompile {\n    // 1. UDP 53 (DNS) -> Open: answers standard A-record query\n    audit_pc -> infra_srv dns query txid 0x1001 qname \"ns1.corp.local\" qtype \"A\" wait 2ms\n    audit_pc <- infra_srv dns response txid 0x1001 qname \"ns1.corp.local\" qtype \"A\" rdata \"10.15.1.10\" wait 3ms\n\n    // 2. UDP 123 (NTP) -> Open: answers client mode 3 poll with server mode 4 stratum 2\n    audit_pc -> infra_srv ntp vn 4 mode 3 poll 6 wait 2ms\n    audit_pc <- infra_srv ntp vn 4 mode 4 stratum 2 refid \"GPS\" wait 3ms\n\n    // 3. UDP 1900 -> Closed: server OS returns ICMP Port Unreachable (Type 3, Code 3)\n    audit_pc -> infra_srv udp srcport 55200 dstport 1900 payload \"M-SEARCH\" wait 2ms\n    infra_srv -> audit_pc icmp destunreach type 3 code 3\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"UDP Service Probe (DNS 53, NTP 123 & Closed Port ICMP Unreachable)\" (scan_udp_services.frasm). Scenario: Probes UDP 53 (DNS), UDP 123 (NTP), and closed UDP 1900 on an infrastructure host to show open UDP protocol replies vs. ICMP Port Unreachable (Type 3, Code 3). Verify with Wireshark filter `dns || ntp || udp.port == 1900 || icmp`."},{"role":"assistant","content":"Closed UDP ports do not send TCP RSTs—instead, the target OS sends an ICMP Destination Unreachable (Code 3: Port Unreachable) packet. Compile with `frameassembly scan_udp_services.frasm`.\n\n```frameassembly\n// Audit host checking active UDP services on an internal infrastructure server\nhost audit_pc  { ip 10.15.0.25 }\nhost infra_srv { ip 10.15.1.10 }\n\ncompile {\n    // 1. UDP 53 (DNS) -> Open: answers standard A-record query\n    audit_pc -> infra_srv dns query txid 0x1001 qname \"ns1.corp.local\" qtype \"A\" wait 2ms\n    audit_pc <- infra_srv dns response txid 0x1001 qname \"ns1.corp.local\" qtype \"A\" rdata \"10.15.1.10\" wait 3ms\n\n    // 2. UDP 123 (NTP) -> Open: answers client mode 3 poll with server mode 4 stratum 2\n    audit_pc -> infra_srv ntp vn 4 mode 3 poll 6 wait 2ms\n    audit_pc <- infra_srv ntp vn 4 mode 4 stratum 2 refid \"GPS\" wait 3ms\n\n    // 3. UDP 1900 -> Closed: server OS returns ICMP Port Unreachable (Type 3, Code 3)\n    audit_pc -> infra_srv udp srcport 55200 dstport 1900 payload \"M-SEARCH\" wait 2ms\n    infra_srv -> audit_pc icmp destunreach type 3 code 3\n}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-dns","task_type":"nl_to_frasm","protocols":["dns"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block DNS (UDP/TCP) (`dns`) Quickstart\" (dns_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Domain Name System over UDP or TCP (UDP 53 (or TCP 53 via transport tcp), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `dns`.","completion":"Encodes dotted `qname` strings into RFC 1035 length-prefixed labels (`\\x03api...\\x00`) and validates RFC label (`<= 63`B) and total length (`<= 253`B) limits at compile time. Compile with `frameassembly dns_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block DNS (UDP/TCP) (`dns`) Quickstart\" (dns_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Domain Name System over UDP or TCP (UDP 53 (or TCP 53 via transport tcp), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `dns`."},{"role":"assistant","content":"Encodes dotted `qname` strings into RFC 1035 length-prefixed labels (`\\x03api...\\x00`) and validates RFC label (`<= 63`B) and total length (`<= 253`B) limits at compile time. Compile with `frameassembly dns_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-dhcp","task_type":"nl_to_frasm","protocols":["dhcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block DHCPv4 / DHCPv6 (`dhcp`) Quickstart\" (dhcp_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Dynamic Host Configuration Protocol — DHCPv4 & DHCPv6 (UDP 68/67 (DHCPv4) · UDP 546/547 (DHCPv6), Dual-Stack Morphing (v4/v6)). Verify with Wireshark filter `dhcp || dhcpv6`.","completion":"Selects UDP `68 -> 67` for client messages (`discover`, `request`, `release`) and UDP `67 -> 68` for server messages (`offer`, `ack`) on IPv4—or UDP `546 <-> 547` on IPv6. Compile with `frameassembly dhcp_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block DHCPv4 / DHCPv6 (`dhcp`) Quickstart\" (dhcp_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Dynamic Host Configuration Protocol — DHCPv4 & DHCPv6 (UDP 68/67 (DHCPv4) · UDP 546/547 (DHCPv6), Dual-Stack Morphing (v4/v6)). Verify with Wireshark filter `dhcp || dhcpv6`."},{"role":"assistant","content":"Selects UDP `68 -> 67` for client messages (`discover`, `request`, `release`) and UDP `67 -> 68` for server messages (`offer`, `ack`) on IPv4—or UDP `546 <-> 547` on IPv6. Compile with `frameassembly dhcp_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-ptp","task_type":"nl_to_frasm","protocols":["ptp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block PTPv2 (IEEE 1588) (`ptp`) Quickstart\" (ptp_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for IEEE 1588 Precision Time Protocol v2 (UDP 319 (Event) / UDP 320 (General), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `ptp`.","completion":"Routes time-critical Event messages (`sync`, `delayreq`) to UDP `319` and General messages (`followup`, `delayresp`, `announce`) to UDP `320` automatically. Compile with `frameassembly ptp_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block PTPv2 (IEEE 1588) (`ptp`) Quickstart\" (ptp_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for IEEE 1588 Precision Time Protocol v2 (UDP 319 (Event) / UDP 320 (General), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `ptp`."},{"role":"assistant","content":"Routes time-critical Event messages (`sync`, `delayreq`) to UDP `319` and General messages (`followup`, `delayresp`, `announce`) to UDP `320` automatically. Compile with `frameassembly ptp_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-cookbook-proto-lab-dns","task_type":"nl_to_frasm","protocols":["dns","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"DNS (UDP/TCP) (`dns`): UDP A/AAAA + NXDOMAIN Lookups Followed by Stateful DNS-over-TCP SRV Resolution\" (dns_udp_and_tcp_lab.frasm). Scenario: Captures standard UDP `AAAA` and `NXDOMAIN` (`rcode 3`) queries, then establishes a TCP 53 session to resolve an Active Directory `_kerberos._tcp` lookup via `transport tcp`. Verify with Wireshark filter `dns`.","completion":"Encodes dotted `qname` strings into RFC 1035 length-prefixed labels (`\\x03api...\\x00`) and validates RFC label (`<= 63`B) and total length (`<= 253`B) limits at compile time. Sets DNS flags (`QR=0, RD=1` `0x0100` on `query`; `QR=1, RD=1, RA=1` `0x8180 | rcode` on `response`) and appends compressed `0xc00c` Answer RRs when `rdata` is provided. Compile with `frameassembly show dns_udp_and_tcp_lab.frasm`.\n\n```frameassembly\nhost workstation { ip 172.16.10.45 }\nhost corp_dns    { ip 172.16.10.10 }\n\ncompile {\n    // 1. Standard UDP IPv6 AAAA lookup\n    workstation -> corp_dns dns query txid 0x1001 srcport 53110 qname \"git.corp.internal\" qtype \"AAAA\" wait 1ms\n    workstation <- corp_dns dns response txid 0x1001 qname \"git.corp.internal\" qtype \"AAAA\" rdata \"2001:db8:10::443\" ansttl 120 wait 3ms\n    // 2. Non-existent domain returning NXDOMAIN (rcode 3)\n    workstation -> corp_dns dns query txid 0x1002 srcport 53111 qname \"missing-svc.corp.internal\" qtype \"A\" wait 1ms\n    workstation <- corp_dns dns response txid 0x1002 qname \"missing-svc.corp.internal\" qtype \"A\" rcode 3 wait 4ms\n    // 3. RFC 1035 DNS-over-TCP on port 53 (auto-prefixes 2-byte TCP length field)\n    workstation -> corp_dns tcp syn srcport 54053 dstport 53 win 65535 mss 1460 wait 1ms\n    workstation <- corp_dns tcp syn ack win 65535 mss 1460 wait 1ms\n    workstation -> corp_dns tcp ack wait 1ms\n    workstation -> corp_dns dns query txid 0x2001 qname \"dc01.corp.internal\" qtype \"TXT\" transport tcp wait 1ms\n    workstation <- corp_dns dns response txid 0x2001 qname \"dc01.corp.internal\" qtype \"TXT\" rdata \"v=spf1 ip4:172.16.0.0/16 -all\" ansttl 3600 transport tcp\n}\n```","frasm_code":"host workstation { ip 172.16.10.45 }\nhost corp_dns    { ip 172.16.10.10 }\n\ncompile {\n    // 1. Standard UDP IPv6 AAAA lookup\n    workstation -> corp_dns dns query txid 0x1001 srcport 53110 qname \"git.corp.internal\" qtype \"AAAA\" wait 1ms\n    workstation <- corp_dns dns response txid 0x1001 qname \"git.corp.internal\" qtype \"AAAA\" rdata \"2001:db8:10::443\" ansttl 120 wait 3ms\n    // 2. Non-existent domain returning NXDOMAIN (rcode 3)\n    workstation -> corp_dns dns query txid 0x1002 srcport 53111 qname \"missing-svc.corp.internal\" qtype \"A\" wait 1ms\n    workstation <- corp_dns dns response txid 0x1002 qname \"missing-svc.corp.internal\" qtype \"A\" rcode 3 wait 4ms\n    // 3. RFC 1035 DNS-over-TCP on port 53 (auto-prefixes 2-byte TCP length field)\n    workstation -> corp_dns tcp syn srcport 54053 dstport 53 win 65535 mss 1460 wait 1ms\n    workstation <- corp_dns tcp syn ack win 65535 mss 1460 wait 1ms\n    workstation -> corp_dns tcp ack wait 1ms\n    workstation -> corp_dns dns query txid 0x2001 qname \"dc01.corp.internal\" qtype \"TXT\" transport tcp wait 1ms\n    workstation <- corp_dns dns response txid 0x2001 qname \"dc01.corp.internal\" qtype \"TXT\" rdata \"v=spf1 ip4:172.16.0.0/16 -all\" ansttl 3600 transport tcp\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"DNS (UDP/TCP) (`dns`): UDP A/AAAA + NXDOMAIN Lookups Followed by Stateful DNS-over-TCP SRV Resolution\" (dns_udp_and_tcp_lab.frasm). Scenario: Captures standard UDP `AAAA` and `NXDOMAIN` (`rcode 3`) queries, then establishes a TCP 53 session to resolve an Active Directory `_kerberos._tcp` lookup via `transport tcp`. Verify with Wireshark filter `dns`."},{"role":"assistant","content":"Encodes dotted `qname` strings into RFC 1035 length-prefixed labels (`\\x03api...\\x00`) and validates RFC label (`<= 63`B) and total length (`<= 253`B) limits at compile time. Sets DNS flags (`QR=0, RD=1` `0x0100` on `query`; `QR=1, RD=1, RA=1` `0x8180 | rcode` on `response`) and appends compressed `0xc00c` Answer RRs when `rdata` is provided. Compile with `frameassembly show dns_udp_and_tcp_lab.frasm`.\n\n```frameassembly\nhost workstation { ip 172.16.10.45 }\nhost corp_dns    { ip 172.16.10.10 }\n\ncompile {\n    // 1. Standard UDP IPv6 AAAA lookup\n    workstation -> corp_dns dns query txid 0x1001 srcport 53110 qname \"git.corp.internal\" qtype \"AAAA\" wait 1ms\n    workstation <- corp_dns dns response txid 0x1001 qname \"git.corp.internal\" qtype \"AAAA\" rdata \"2001:db8:10::443\" ansttl 120 wait 3ms\n    // 2. Non-existent domain returning NXDOMAIN (rcode 3)\n    workstation -> corp_dns dns query txid 0x1002 srcport 53111 qname \"missing-svc.corp.internal\" qtype \"A\" wait 1ms\n    workstation <- corp_dns dns response txid 0x1002 qname \"missing-svc.corp.internal\" qtype \"A\" rcode 3 wait 4ms\n    // 3. RFC 1035 DNS-over-TCP on port 53 (auto-prefixes 2-byte TCP length field)\n    workstation -> corp_dns tcp syn srcport 54053 dstport 53 win 65535 mss 1460 wait 1ms\n    workstation <- corp_dns tcp syn ack win 65535 mss 1460 wait 1ms\n    workstation -> corp_dns tcp ack wait 1ms\n    workstation -> corp_dns dns query txid 0x2001 qname \"dc01.corp.internal\" qtype \"TXT\" transport tcp wait 1ms\n    workstation <- corp_dns dns response txid 0x2001 qname \"dc01.corp.internal\" qtype \"TXT\" rdata \"v=spf1 ip4:172.16.0.0/16 -all\" ansttl 3600 transport tcp\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-mdns","task_type":"nl_to_frasm","protocols":["mdns","vlan"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"mDNS (Zero-Conf) (`mdns`): Dual-Stack DNS-SD Service Browse (`PTR`) and Host Address Announcement (`AAAA`)\" (mdns_ipv6_matter_discovery.frasm). Scenario: Discovers `_matterc._udp.local` commissioning nodes and announces an IPv6 link-local service record over VLAN 30. Verify with Wireshark filter `mdns`.","completion":"Overrides the L3 destination IP to link-local multicast `224.0.0.251` (IPv4) or `ff02::fb` (IPv6) with matching multicast Ethernet MAC (`01:00:5e:00:00:fb` / `33:33:00:00:00:fb`). Fixes both UDP source and destination ports to `5353 -> 5353` and defaults `txid` to `0` per RFC 6762. Compile with `frameassembly show mdns_ipv6_matter_discovery.frasm`.\n\n```frameassembly\nhost controller { ip fe80::10 mac 00:1c:73:aa:00:10 }\nhost sensor_hub { ip fe80::55 mac 00:1c:73:aa:00:55 }\n\ncompile {\n    // 1. Multicast browse query to ff02::fb on UDP 5353 -> 5353\n    controller -> sensor_hub mdns query qname \"_matter._tcp.local\" qtype \"PTR\" vlan 30 ttl 255 wait 2ms\n    // 2. Hub announces PTR instance and AAAA address record\n    sensor_hub -> controller mdns response qname \"_matter._tcp.local\" qtype \"PTR\" rdata \"hub-01._matter._tcp.local\" ansttl 4500 vlan 30 ttl 255 wait 1ms\n    sensor_hub -> controller mdns response qname \"hub-01.local\" qtype \"AAAA\" rdata \"fe80::55\" ansttl 120 vlan 30 ttl 255\n}\n```","frasm_code":"host controller { ip fe80::10 mac 00:1c:73:aa:00:10 }\nhost sensor_hub { ip fe80::55 mac 00:1c:73:aa:00:55 }\n\ncompile {\n    // 1. Multicast browse query to ff02::fb on UDP 5353 -> 5353\n    controller -> sensor_hub mdns query qname \"_matter._tcp.local\" qtype \"PTR\" vlan 30 ttl 255 wait 2ms\n    // 2. Hub announces PTR instance and AAAA address record\n    sensor_hub -> controller mdns response qname \"_matter._tcp.local\" qtype \"PTR\" rdata \"hub-01._matter._tcp.local\" ansttl 4500 vlan 30 ttl 255 wait 1ms\n    sensor_hub -> controller mdns response qname \"hub-01.local\" qtype \"AAAA\" rdata \"fe80::55\" ansttl 120 vlan 30 ttl 255\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"mDNS (Zero-Conf) (`mdns`): Dual-Stack DNS-SD Service Browse (`PTR`) and Host Address Announcement (`AAAA`)\" (mdns_ipv6_matter_discovery.frasm). Scenario: Discovers `_matterc._udp.local` commissioning nodes and announces an IPv6 link-local service record over VLAN 30. Verify with Wireshark filter `mdns`."},{"role":"assistant","content":"Overrides the L3 destination IP to link-local multicast `224.0.0.251` (IPv4) or `ff02::fb` (IPv6) with matching multicast Ethernet MAC (`01:00:5e:00:00:fb` / `33:33:00:00:00:fb`). Fixes both UDP source and destination ports to `5353 -> 5353` and defaults `txid` to `0` per RFC 6762. Compile with `frameassembly show mdns_ipv6_matter_discovery.frasm`.\n\n```frameassembly\nhost controller { ip fe80::10 mac 00:1c:73:aa:00:10 }\nhost sensor_hub { ip fe80::55 mac 00:1c:73:aa:00:55 }\n\ncompile {\n    // 1. Multicast browse query to ff02::fb on UDP 5353 -> 5353\n    controller -> sensor_hub mdns query qname \"_matter._tcp.local\" qtype \"PTR\" vlan 30 ttl 255 wait 2ms\n    // 2. Hub announces PTR instance and AAAA address record\n    sensor_hub -> controller mdns response qname \"_matter._tcp.local\" qtype \"PTR\" rdata \"hub-01._matter._tcp.local\" ansttl 4500 vlan 30 ttl 255 wait 1ms\n    sensor_hub -> controller mdns response qname \"hub-01.local\" qtype \"AAAA\" rdata \"fe80::55\" ansttl 120 vlan 30 ttl 255\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-dhcp","task_type":"nl_to_frasm","protocols":["dhcp","vlan"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"DHCPv4 / DHCPv6 (`dhcp`): Complete 4-Step DHCPv4 DORA Lease Workflow + DHCPv6 SARR Exchange\" (dhcp_v4_dora_and_v6_sarr.frasm). Scenario: Captures a full 4-frame IPv4 `discover -> offer -> request -> ack` cycle on VLAN 10 followed by a 4-frame IPv6 `solicit -> advertise -> request -> reply` exchange. Verify with Wireshark filter `dhcp || dhcpv6`.","completion":"Selects UDP `68 -> 67` for client messages (`discover`, `request`, `release`) and UDP `67 -> 68` for server messages (`offer`, `ack`) on IPv4—or UDP `546 <-> 547` on IPv6. Writes the 4-byte RFC 2132 DHCP magic cookie (`0x63825363`), packs every specified option TLV (`1`, `3`, `6`, `12`, `51`, `53`), and terminates with Option `255` (`0xff`). Compile with `frameassembly show dhcp_v4_dora_and_v6_sarr.frasm`.\n\n```frameassembly\nhost phone_v4 { ip 0.0.0.0 mac 00:50:56:aa:10:01 }\nhost srv_v4   { ip 10.20.10.1 mac 00:50:56:aa:00:01 }\nhost host_v6  { ip fe80::25 mac 00:50:56:bb:10:25 }\nhost srv_v6   { ip fe80::1 mac 00:50:56:bb:00:01 }\n\ncompile {\n    // 1. DHCPv4 DORA on VLAN 10 (UDP 68 <-> 67)\n    phone_v4 -> srv_v4 dhcp discover xid 0x77889900 chaddr 00:50:56:aa:10:01 hostname \"voip-desk-12\" vlan 10 wait 2ms\n    phone_v4 <- srv_v4 dhcp offer xid 0x77889900 yiaddr 10.20.10.112 siaddr 10.20.10.1 chaddr 00:50:56:aa:10:01 subnetmask 255.255.255.0 router 10.20.10.1 dnsserver 10.20.10.53 leasetime 43200 vlan 10 wait 1ms\n    phone_v4 -> srv_v4 dhcp request xid 0x77889900 chaddr 00:50:56:aa:10:01 hostname \"voip-desk-12\" vlan 10 wait 1ms\n    phone_v4 <- srv_v4 dhcp ack xid 0x77889900 yiaddr 10.20.10.112 siaddr 10.20.10.1 chaddr 00:50:56:aa:10:01 subnetmask 255.255.255.0 router 10.20.10.1 dnsserver 10.20.10.53 leasetime 43200 vlan 10 wait 5ms\n    // 2. DHCPv6 SARR over IPv6 link-local endpoints (UDP 546 <-> 547)\n    host_v6 -> srv_v6 dhcp solicit xid 0x00a1b2c3 dnsserver 2001:db8:20::53 wait 2ms\n    host_v6 <- srv_v6 dhcp advertise xid 0x00a1b2c3 dnsserver 2001:db8:20::53 wait 1ms\n    host_v6 -> srv_v6 dhcp request xid 0x00a1b2c3 wait 1ms\n    host_v6 <- srv_v6 dhcp reply xid 0x00a1b2c3 dnsserver 2001:db8:20::53\n}\n```","frasm_code":"host phone_v4 { ip 0.0.0.0 mac 00:50:56:aa:10:01 }\nhost srv_v4   { ip 10.20.10.1 mac 00:50:56:aa:00:01 }\nhost host_v6  { ip fe80::25 mac 00:50:56:bb:10:25 }\nhost srv_v6   { ip fe80::1 mac 00:50:56:bb:00:01 }\n\ncompile {\n    // 1. DHCPv4 DORA on VLAN 10 (UDP 68 <-> 67)\n    phone_v4 -> srv_v4 dhcp discover xid 0x77889900 chaddr 00:50:56:aa:10:01 hostname \"voip-desk-12\" vlan 10 wait 2ms\n    phone_v4 <- srv_v4 dhcp offer xid 0x77889900 yiaddr 10.20.10.112 siaddr 10.20.10.1 chaddr 00:50:56:aa:10:01 subnetmask 255.255.255.0 router 10.20.10.1 dnsserver 10.20.10.53 leasetime 43200 vlan 10 wait 1ms\n    phone_v4 -> srv_v4 dhcp request xid 0x77889900 chaddr 00:50:56:aa:10:01 hostname \"voip-desk-12\" vlan 10 wait 1ms\n    phone_v4 <- srv_v4 dhcp ack xid 0x77889900 yiaddr 10.20.10.112 siaddr 10.20.10.1 chaddr 00:50:56:aa:10:01 subnetmask 255.255.255.0 router 10.20.10.1 dnsserver 10.20.10.53 leasetime 43200 vlan 10 wait 5ms\n    // 2. DHCPv6 SARR over IPv6 link-local endpoints (UDP 546 <-> 547)\n    host_v6 -> srv_v6 dhcp solicit xid 0x00a1b2c3 dnsserver 2001:db8:20::53 wait 2ms\n    host_v6 <- srv_v6 dhcp advertise xid 0x00a1b2c3 dnsserver 2001:db8:20::53 wait 1ms\n    host_v6 -> srv_v6 dhcp request xid 0x00a1b2c3 wait 1ms\n    host_v6 <- srv_v6 dhcp reply xid 0x00a1b2c3 dnsserver 2001:db8:20::53\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"DHCPv4 / DHCPv6 (`dhcp`): Complete 4-Step DHCPv4 DORA Lease Workflow + DHCPv6 SARR Exchange\" (dhcp_v4_dora_and_v6_sarr.frasm). Scenario: Captures a full 4-frame IPv4 `discover -> offer -> request -> ack` cycle on VLAN 10 followed by a 4-frame IPv6 `solicit -> advertise -> request -> reply` exchange. Verify with Wireshark filter `dhcp || dhcpv6`."},{"role":"assistant","content":"Selects UDP `68 -> 67` for client messages (`discover`, `request`, `release`) and UDP `67 -> 68` for server messages (`offer`, `ack`) on IPv4—or UDP `546 <-> 547` on IPv6. Writes the 4-byte RFC 2132 DHCP magic cookie (`0x63825363`), packs every specified option TLV (`1`, `3`, `6`, `12`, `51`, `53`), and terminates with Option `255` (`0xff`). Compile with `frameassembly show dhcp_v4_dora_and_v6_sarr.frasm`.\n\n```frameassembly\nhost phone_v4 { ip 0.0.0.0 mac 00:50:56:aa:10:01 }\nhost srv_v4   { ip 10.20.10.1 mac 00:50:56:aa:00:01 }\nhost host_v6  { ip fe80::25 mac 00:50:56:bb:10:25 }\nhost srv_v6   { ip fe80::1 mac 00:50:56:bb:00:01 }\n\ncompile {\n    // 1. DHCPv4 DORA on VLAN 10 (UDP 68 <-> 67)\n    phone_v4 -> srv_v4 dhcp discover xid 0x77889900 chaddr 00:50:56:aa:10:01 hostname \"voip-desk-12\" vlan 10 wait 2ms\n    phone_v4 <- srv_v4 dhcp offer xid 0x77889900 yiaddr 10.20.10.112 siaddr 10.20.10.1 chaddr 00:50:56:aa:10:01 subnetmask 255.255.255.0 router 10.20.10.1 dnsserver 10.20.10.53 leasetime 43200 vlan 10 wait 1ms\n    phone_v4 -> srv_v4 dhcp request xid 0x77889900 chaddr 00:50:56:aa:10:01 hostname \"voip-desk-12\" vlan 10 wait 1ms\n    phone_v4 <- srv_v4 dhcp ack xid 0x77889900 yiaddr 10.20.10.112 siaddr 10.20.10.1 chaddr 00:50:56:aa:10:01 subnetmask 255.255.255.0 router 10.20.10.1 dnsserver 10.20.10.53 leasetime 43200 vlan 10 wait 5ms\n    // 2. DHCPv6 SARR over IPv6 link-local endpoints (UDP 546 <-> 547)\n    host_v6 -> srv_v6 dhcp solicit xid 0x00a1b2c3 dnsserver 2001:db8:20::53 wait 2ms\n    host_v6 <- srv_v6 dhcp advertise xid 0x00a1b2c3 dnsserver 2001:db8:20::53 wait 1ms\n    host_v6 -> srv_v6 dhcp request xid 0x00a1b2c3 wait 1ms\n    host_v6 <- srv_v6 dhcp reply xid 0x00a1b2c3 dnsserver 2001:db8:20::53\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-ntp","task_type":"nl_to_frasm","protocols":["ntp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"NTPv4 (`ntp`): Stratum 1 Synchronization + Kiss-o'-Death Rate-Limit & Mode 6 Audit Probe\" (ntp_sync_and_security_audit.frasm). Scenario: Captures normal NTPv4 client/server clock sync, a `stratum 0 refid \"RATE\"` Kiss-o'-Death response, and a blocked `mode 6` control query for IDS testing. Verify with Wireshark filter `ntp`.","completion":"Packs the first byte `(li << 6) | (vn << 3) | mode` cleanly (`0x23` for `li 0 vn 4 mode 3` client; `0x24` for `mode 4` server) inside a 48-byte RFC 5905 header. Zero-pads 4-character ASCII `refid` strings (`\"GPS\\0\"`, `\"PPS\\0\"`, `\"RATE\"`) for Stratum 0/1 servers. Compile with `frameassembly show ntp_sync_and_security_audit.frasm`.\n\n```frameassembly\nhost branch_rtr { ip 172.16.30.1 }\nhost ntp_core   { ip 172.16.30.123 }\n\ncompile {\n    // 1. Standard NTPv4 Client (mode 3) -> Stratum 1 GPS Server (mode 4)\n    branch_rtr -> ntp_core ntp vn 4 mode 3 poll 6 precision -18 dscp 48 wait 2ms\n    branch_rtr <- ntp_core ntp li 0 vn 4 mode 4 stratum 1 poll 6 precision -24 refid \"GPS\" txtimestamp 0xe9b4d01080000000 dscp 48 wait 5ms\n    // 2. RFC 5905 Kiss-o'-Death (stratum 0, li 3, refid \"RATE\")\n    branch_rtr <- ntp_core ntp li 3 vn 4 mode 4 stratum 0 refid \"RATE\" wait 5ms\n    // 3. Mode 6 NTP Control query probe (tested against perimeter IDS/firewall)\n    branch_rtr -> ntp_core ntp vn 2 mode 6\n}\n```","frasm_code":"host branch_rtr { ip 172.16.30.1 }\nhost ntp_core   { ip 172.16.30.123 }\n\ncompile {\n    // 1. Standard NTPv4 Client (mode 3) -> Stratum 1 GPS Server (mode 4)\n    branch_rtr -> ntp_core ntp vn 4 mode 3 poll 6 precision -18 dscp 48 wait 2ms\n    branch_rtr <- ntp_core ntp li 0 vn 4 mode 4 stratum 1 poll 6 precision -24 refid \"GPS\" txtimestamp 0xe9b4d01080000000 dscp 48 wait 5ms\n    // 2. RFC 5905 Kiss-o'-Death (stratum 0, li 3, refid \"RATE\")\n    branch_rtr <- ntp_core ntp li 3 vn 4 mode 4 stratum 0 refid \"RATE\" wait 5ms\n    // 3. Mode 6 NTP Control query probe (tested against perimeter IDS/firewall)\n    branch_rtr -> ntp_core ntp vn 2 mode 6\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"NTPv4 (`ntp`): Stratum 1 Synchronization + Kiss-o'-Death Rate-Limit & Mode 6 Audit Probe\" (ntp_sync_and_security_audit.frasm). Scenario: Captures normal NTPv4 client/server clock sync, a `stratum 0 refid \"RATE\"` Kiss-o'-Death response, and a blocked `mode 6` control query for IDS testing. Verify with Wireshark filter `ntp`."},{"role":"assistant","content":"Packs the first byte `(li << 6) | (vn << 3) | mode` cleanly (`0x23` for `li 0 vn 4 mode 3` client; `0x24` for `mode 4` server) inside a 48-byte RFC 5905 header. Zero-pads 4-character ASCII `refid` strings (`\"GPS\\0\"`, `\"PPS\\0\"`, `\"RATE\"`) for Stratum 0/1 servers. Compile with `frameassembly show ntp_sync_and_security_audit.frasm`.\n\n```frameassembly\nhost branch_rtr { ip 172.16.30.1 }\nhost ntp_core   { ip 172.16.30.123 }\n\ncompile {\n    // 1. Standard NTPv4 Client (mode 3) -> Stratum 1 GPS Server (mode 4)\n    branch_rtr -> ntp_core ntp vn 4 mode 3 poll 6 precision -18 dscp 48 wait 2ms\n    branch_rtr <- ntp_core ntp li 0 vn 4 mode 4 stratum 1 poll 6 precision -24 refid \"GPS\" txtimestamp 0xe9b4d01080000000 dscp 48 wait 5ms\n    // 2. RFC 5905 Kiss-o'-Death (stratum 0, li 3, refid \"RATE\")\n    branch_rtr <- ntp_core ntp li 3 vn 4 mode 4 stratum 0 refid \"RATE\" wait 5ms\n    // 3. Mode 6 NTP Control query probe (tested against perimeter IDS/firewall)\n    branch_rtr -> ntp_core ntp vn 2 mode 6\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-ptp","task_type":"nl_to_frasm","protocols":["ptp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"PTPv2 (IEEE 1588) (`ptp`): Complete Two-Step IEEE 1588v2 Grandmaster <-> Ordinary Clock Exchange (.pcapng Ready)\" (ptp_twostep_grandmaster.frasm). Scenario: Executes a 5-frame PTPv2 `announce -> sync -> followup -> delayreq -> delayresp` cycle with sub-millisecond `wait` intervals ideal for `.pcapng` nanosecond export. Verify with Wireshark filter `ptp`.","completion":"Routes time-critical Event messages (`sync`, `delayreq`) to UDP `319` and General messages (`followup`, `delayresp`, `announce`) to UDP `320` automatically. Computes exact IEEE 1588-2008 `messageLength` (`44` bytes for `sync`/`followup`/`delayreq`, `54` bytes for `delayresp`, `64` bytes for `announce`) and sets `twoStepFlag` on `sync`. Compile with `frameassembly show ptp_twostep_grandmaster.frasm`.\n\n```frameassembly\nhost gm_clock    { ip 172.22.0.1 }\nhost media_node  { ip 172.22.0.45 }\n\ncompile {\n    // 1. Grandmaster announces BMCA hierarchy on UDP 320 (domain 127 = SMPTE ST 2059-2)\n    gm_clock -> media_node ptp announce domain 127 seqid 500 clockid \"ec4670fffe010203\" dscp 46 wait 500us\n    // 2. Two-step Sync (UDP 319) + Follow_Up (UDP 320) with matching seqid 501\n    gm_clock -> media_node ptp sync domain 127 seqid 501 clockid \"ec4670fffe010203\" dscp 46 wait 120us\n    gm_clock -> media_node ptp followup domain 127 seqid 501 clockid \"ec4670fffe010203\" dscp 46 wait 250us\n    // 3. Slave measures reverse path delay via Delay_Req (UDP 319) -> Delay_Resp (UDP 320)\n    media_node -> gm_clock ptp delayreq domain 127 seqid 88 clockid \"001b21fffeaa0045\" dscp 46 wait 180us\n    media_node <- gm_clock ptp delayresp domain 127 seqid 88 clockid \"ec4670fffe010203\" dscp 46\n}\n```","frasm_code":"host gm_clock    { ip 172.22.0.1 }\nhost media_node  { ip 172.22.0.45 }\n\ncompile {\n    // 1. Grandmaster announces BMCA hierarchy on UDP 320 (domain 127 = SMPTE ST 2059-2)\n    gm_clock -> media_node ptp announce domain 127 seqid 500 clockid \"ec4670fffe010203\" dscp 46 wait 500us\n    // 2. Two-step Sync (UDP 319) + Follow_Up (UDP 320) with matching seqid 501\n    gm_clock -> media_node ptp sync domain 127 seqid 501 clockid \"ec4670fffe010203\" dscp 46 wait 120us\n    gm_clock -> media_node ptp followup domain 127 seqid 501 clockid \"ec4670fffe010203\" dscp 46 wait 250us\n    // 3. Slave measures reverse path delay via Delay_Req (UDP 319) -> Delay_Resp (UDP 320)\n    media_node -> gm_clock ptp delayreq domain 127 seqid 88 clockid \"001b21fffeaa0045\" dscp 46 wait 180us\n    media_node <- gm_clock ptp delayresp domain 127 seqid 88 clockid \"ec4670fffe010203\" dscp 46\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"PTPv2 (IEEE 1588) (`ptp`): Complete Two-Step IEEE 1588v2 Grandmaster <-> Ordinary Clock Exchange (.pcapng Ready)\" (ptp_twostep_grandmaster.frasm). Scenario: Executes a 5-frame PTPv2 `announce -> sync -> followup -> delayreq -> delayresp` cycle with sub-millisecond `wait` intervals ideal for `.pcapng` nanosecond export. Verify with Wireshark filter `ptp`."},{"role":"assistant","content":"Routes time-critical Event messages (`sync`, `delayreq`) to UDP `319` and General messages (`followup`, `delayresp`, `announce`) to UDP `320` automatically. Computes exact IEEE 1588-2008 `messageLength` (`44` bytes for `sync`/`followup`/`delayreq`, `54` bytes for `delayresp`, `64` bytes for `announce`) and sets `twoStepFlag` on `sync`. Compile with `frameassembly show ptp_twostep_grandmaster.frasm`.\n\n```frameassembly\nhost gm_clock    { ip 172.22.0.1 }\nhost media_node  { ip 172.22.0.45 }\n\ncompile {\n    // 1. Grandmaster announces BMCA hierarchy on UDP 320 (domain 127 = SMPTE ST 2059-2)\n    gm_clock -> media_node ptp announce domain 127 seqid 500 clockid \"ec4670fffe010203\" dscp 46 wait 500us\n    // 2. Two-step Sync (UDP 319) + Follow_Up (UDP 320) with matching seqid 501\n    gm_clock -> media_node ptp sync domain 127 seqid 501 clockid \"ec4670fffe010203\" dscp 46 wait 120us\n    gm_clock -> media_node ptp followup domain 127 seqid 501 clockid \"ec4670fffe010203\" dscp 46 wait 250us\n    // 3. Slave measures reverse path delay via Delay_Req (UDP 319) -> Delay_Resp (UDP 320)\n    media_node -> gm_clock ptp delayreq domain 127 seqid 88 clockid \"001b21fffeaa0045\" dscp 46 wait 180us\n    media_node <- gm_clock ptp delayresp domain 127 seqid 88 clockid \"ec4670fffe010203\" dscp 46\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-ssdp","task_type":"nl_to_frasm","protocols":["ssdp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SSDP (UPnP) (`ssdp`): IoT Gateway SSDP M-SEARCH Sweep & UPnP IGD Alive Notification\" (ssdp_upnp_audit.frasm). Scenario: Sends a multicast `msearch` looking for UPnP Internet Gateway Devices, followed by a router `notify` advertisement pointing to its XML description URL. Verify with Wireshark filter `ssdp`.","completion":"Defaults UDP destination port to `1900` and automatically derives the RFC 1112 multicast MAC `01:00:5e:7f:ff:fa` when sending to `239.255.255.250`. Formats `M-SEARCH * HTTP/1.1\r\n` with `HOST`, `MAN: \"ssdp:discover\"`, `MX`, and `ST` headers on `msearch` packets. Compile with `frameassembly show ssdp_upnp_audit.frasm`.\n\n```frameassembly\nhost scanner   { ip 192.168.10.55 }\nhost upnp_grp  { ip 239.255.255.250 }\nhost rogue_rtr { ip 192.168.10.254 }\n\ncompile {\n    scanner -> upnp_grp ssdp msearch hosthdr \"239.255.255.250:1900\" man \"\\\"ssdp:discover\\\"\" mx 2 st \"urn:schemas-upnp-org:device:InternetGatewayDevice:1\" wait 5ms\n    rogue_rtr -> upnp_grp ssdp notify hosthdr \"239.255.255.250:1900\" nt \"urn:schemas-upnp-org:device:InternetGatewayDevice:1\" nts \"ssdp:alive\" usn \"uuid:f81d4fae-7dec::upnp:rootdevice\" location \"http://192.168.10.254:49152/rootDesc.xml\"\n}\n```","frasm_code":"host scanner   { ip 192.168.10.55 }\nhost upnp_grp  { ip 239.255.255.250 }\nhost rogue_rtr { ip 192.168.10.254 }\n\ncompile {\n    scanner -> upnp_grp ssdp msearch hosthdr \"239.255.255.250:1900\" man \"\\\"ssdp:discover\\\"\" mx 2 st \"urn:schemas-upnp-org:device:InternetGatewayDevice:1\" wait 5ms\n    rogue_rtr -> upnp_grp ssdp notify hosthdr \"239.255.255.250:1900\" nt \"urn:schemas-upnp-org:device:InternetGatewayDevice:1\" nts \"ssdp:alive\" usn \"uuid:f81d4fae-7dec::upnp:rootdevice\" location \"http://192.168.10.254:49152/rootDesc.xml\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SSDP (UPnP) (`ssdp`): IoT Gateway SSDP M-SEARCH Sweep & UPnP IGD Alive Notification\" (ssdp_upnp_audit.frasm). Scenario: Sends a multicast `msearch` looking for UPnP Internet Gateway Devices, followed by a router `notify` advertisement pointing to its XML description URL. Verify with Wireshark filter `ssdp`."},{"role":"assistant","content":"Defaults UDP destination port to `1900` and automatically derives the RFC 1112 multicast MAC `01:00:5e:7f:ff:fa` when sending to `239.255.255.250`. Formats `M-SEARCH * HTTP/1.1\r\n` with `HOST`, `MAN: \"ssdp:discover\"`, `MX`, and `ST` headers on `msearch` packets. Compile with `frameassembly show ssdp_upnp_audit.frasm`.\n\n```frameassembly\nhost scanner   { ip 192.168.10.55 }\nhost upnp_grp  { ip 239.255.255.250 }\nhost rogue_rtr { ip 192.168.10.254 }\n\ncompile {\n    scanner -> upnp_grp ssdp msearch hosthdr \"239.255.255.250:1900\" man \"\\\"ssdp:discover\\\"\" mx 2 st \"urn:schemas-upnp-org:device:InternetGatewayDevice:1\" wait 5ms\n    rogue_rtr -> upnp_grp ssdp notify hosthdr \"239.255.255.250:1900\" nt \"urn:schemas-upnp-org:device:InternetGatewayDevice:1\" nts \"ssdp:alive\" usn \"uuid:f81d4fae-7dec::upnp:rootdevice\" location \"http://192.168.10.254:49152/rootDesc.xml\"\n}\n```"}]}
{"id":"sft-cookbook-ex-web-http11-custom-headers-waf","task_type":"nl_to_frasm","protocols":["tcp","http"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"HTTP/1.1 API Authentication & Rate-Limit Response (429 Too Many Requests)\" (http_api_ratelimit_429.frasm). Scenario: Tests WAF and API-gateway rules with repeatable custom header key/value pairs, JSON POST bodies, and HTTP 429 rate-limit replies. Verify with Wireshark filter `http`.","completion":"Uses hosthdr for the HTTP Host header and computes Content-Length automatically from body. Compile with `frameassembly http_api_ratelimit_429.frasm`.\n\n```frameassembly\nhost api_client { ip 10.42.10.15 }\nhost waf_edge   { ip 10.42.90.80 }\n\ncompile {\n    api_client -> waf_edge tcp syn srcport 51080 dstport 80 win 65535 mss 1460 wait 1ms\n    api_client <- waf_edge tcp syn ack win 65535 mss 1460 wait 1ms\n    api_client -> waf_edge tcp ack wait 1ms\n    api_client -> waf_edge http post uri \"/v2/tokens\" hosthdr \"auth.corp.internal\" contenttype \"application/json\" header \"X-Request-Id\" \"req-9012\" body \"{\\\"grant\\\":\\\"client_credentials\\\"}\" wait 2ms\n    api_client <- waf_edge http status 200 reason \"OK\" contenttype \"application/json\" body \"{\\\"active\\\":true}\" wait 3ms\n    api_client -> waf_edge http post uri \"/v2/tokens\" hosthdr \"auth.corp.internal\" contenttype \"application/json\" header \"X-Request-Id\" \"req-9013\" body \"{\\\"grant\\\":\\\"client_credentials\\\"}\" wait 2ms\n    api_client <- waf_edge http status 429 reason \"Too Many Requests\" header \"Retry-After\" \"60\" body \"{\\\"error\\\":\\\"rate_limited\\\"}\"\n}\n```","frasm_code":"host api_client { ip 10.42.10.15 }\nhost waf_edge   { ip 10.42.90.80 }\n\ncompile {\n    api_client -> waf_edge tcp syn srcport 51080 dstport 80 win 65535 mss 1460 wait 1ms\n    api_client <- waf_edge tcp syn ack win 65535 mss 1460 wait 1ms\n    api_client -> waf_edge tcp ack wait 1ms\n    api_client -> waf_edge http post uri \"/v2/tokens\" hosthdr \"auth.corp.internal\" contenttype \"application/json\" header \"X-Request-Id\" \"req-9012\" body \"{\\\"grant\\\":\\\"client_credentials\\\"}\" wait 2ms\n    api_client <- waf_edge http status 200 reason \"OK\" contenttype \"application/json\" body \"{\\\"active\\\":true}\" wait 3ms\n    api_client -> waf_edge http post uri \"/v2/tokens\" hosthdr \"auth.corp.internal\" contenttype \"application/json\" header \"X-Request-Id\" \"req-9013\" body \"{\\\"grant\\\":\\\"client_credentials\\\"}\" wait 2ms\n    api_client <- waf_edge http status 429 reason \"Too Many Requests\" header \"Retry-After\" \"60\" body \"{\\\"error\\\":\\\"rate_limited\\\"}\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"HTTP/1.1 API Authentication & Rate-Limit Response (429 Too Many Requests)\" (http_api_ratelimit_429.frasm). Scenario: Tests WAF and API-gateway rules with repeatable custom header key/value pairs, JSON POST bodies, and HTTP 429 rate-limit replies. Verify with Wireshark filter `http`."},{"role":"assistant","content":"Uses hosthdr for the HTTP Host header and computes Content-Length automatically from body. Compile with `frameassembly http_api_ratelimit_429.frasm`.\n\n```frameassembly\nhost api_client { ip 10.42.10.15 }\nhost waf_edge   { ip 10.42.90.80 }\n\ncompile {\n    api_client -> waf_edge tcp syn srcport 51080 dstport 80 win 65535 mss 1460 wait 1ms\n    api_client <- waf_edge tcp syn ack win 65535 mss 1460 wait 1ms\n    api_client -> waf_edge tcp ack wait 1ms\n    api_client -> waf_edge http post uri \"/v2/tokens\" hosthdr \"auth.corp.internal\" contenttype \"application/json\" header \"X-Request-Id\" \"req-9012\" body \"{\\\"grant\\\":\\\"client_credentials\\\"}\" wait 2ms\n    api_client <- waf_edge http status 200 reason \"OK\" contenttype \"application/json\" body \"{\\\"active\\\":true}\" wait 3ms\n    api_client -> waf_edge http post uri \"/v2/tokens\" hosthdr \"auth.corp.internal\" contenttype \"application/json\" header \"X-Request-Id\" \"req-9013\" body \"{\\\"grant\\\":\\\"client_credentials\\\"}\" wait 2ms\n    api_client <- waf_edge http status 429 reason \"Too Many Requests\" header \"Retry-After\" \"60\" body \"{\\\"error\\\":\\\"rate_limited\\\"}\"\n}\n```"}]}
{"id":"sft-cookbook-ex-web-http2-and-grpc-service","task_type":"nl_to_frasm","protocols":["tcp","grpc"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Service-Mesh gRPC Unary Call & Status Code Verification (TCP 50051)\" (service_mesh_grpc_check.frasm). Scenario: Establishes a TCP 50051 channel between two Kubernetes pods and exercises a unary gRPC call returning grpcstatus 0 (OK) followed by grpcstatus 14 (UNAVAILABLE). Verify with Wireshark filter `http2 || grpc || tcp.port == 50051`.","completion":"Builds HTTP/2 HEADERS + length-prefixed gRPC data + trailing grpc-status frames over stateful TCP. Compile with `frameassembly service_mesh_grpc_check.frasm`.\n\n```frameassembly\nhost checkout_pod { ip 10.244.1.18 }\nhost ledger_pod   { ip 10.244.2.44 }\n\ncompile {\n    checkout_pod -> ledger_pod tcp syn srcport 55051 dstport 50051 win 65535 mss 1460 wait 1ms\n    checkout_pod <- ledger_pod tcp syn ack win 65535 mss 1460 wait 1ms\n    checkout_pod -> ledger_pod tcp ack wait 1ms\n    checkout_pod -> ledger_pod grpc service \"ledger.v1.LedgerService\" method \"ReserveFunds\" streamid 1 payload \"order-8841\" wait 2ms\n    checkout_pod <- ledger_pod grpc service \"ledger.v1.LedgerService\" method \"ReserveFunds\" streamid 1 grpcstatus 0 wait 4ms\n    checkout_pod -> ledger_pod grpc service \"ledger.v1.LedgerService\" method \"CommitBatch\" streamid 3 payload \"batch-99\" wait 2ms\n    checkout_pod <- ledger_pod grpc service \"ledger.v1.LedgerService\" method \"CommitBatch\" streamid 3 grpcstatus 14\n}\n```","frasm_code":"host checkout_pod { ip 10.244.1.18 }\nhost ledger_pod   { ip 10.244.2.44 }\n\ncompile {\n    checkout_pod -> ledger_pod tcp syn srcport 55051 dstport 50051 win 65535 mss 1460 wait 1ms\n    checkout_pod <- ledger_pod tcp syn ack win 65535 mss 1460 wait 1ms\n    checkout_pod -> ledger_pod tcp ack wait 1ms\n    checkout_pod -> ledger_pod grpc service \"ledger.v1.LedgerService\" method \"ReserveFunds\" streamid 1 payload \"order-8841\" wait 2ms\n    checkout_pod <- ledger_pod grpc service \"ledger.v1.LedgerService\" method \"ReserveFunds\" streamid 1 grpcstatus 0 wait 4ms\n    checkout_pod -> ledger_pod grpc service \"ledger.v1.LedgerService\" method \"CommitBatch\" streamid 3 payload \"batch-99\" wait 2ms\n    checkout_pod <- ledger_pod grpc service \"ledger.v1.LedgerService\" method \"CommitBatch\" streamid 3 grpcstatus 14\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Service-Mesh gRPC Unary Call & Status Code Verification (TCP 50051)\" (service_mesh_grpc_check.frasm). Scenario: Establishes a TCP 50051 channel between two Kubernetes pods and exercises a unary gRPC call returning grpcstatus 0 (OK) followed by grpcstatus 14 (UNAVAILABLE). Verify with Wireshark filter `http2 || grpc || tcp.port == 50051`."},{"role":"assistant","content":"Builds HTTP/2 HEADERS + length-prefixed gRPC data + trailing grpc-status frames over stateful TCP. Compile with `frameassembly service_mesh_grpc_check.frasm`.\n\n```frameassembly\nhost checkout_pod { ip 10.244.1.18 }\nhost ledger_pod   { ip 10.244.2.44 }\n\ncompile {\n    checkout_pod -> ledger_pod tcp syn srcport 55051 dstport 50051 win 65535 mss 1460 wait 1ms\n    checkout_pod <- ledger_pod tcp syn ack win 65535 mss 1460 wait 1ms\n    checkout_pod -> ledger_pod tcp ack wait 1ms\n    checkout_pod -> ledger_pod grpc service \"ledger.v1.LedgerService\" method \"ReserveFunds\" streamid 1 payload \"order-8841\" wait 2ms\n    checkout_pod <- ledger_pod grpc service \"ledger.v1.LedgerService\" method \"ReserveFunds\" streamid 1 grpcstatus 0 wait 4ms\n    checkout_pod -> ledger_pod grpc service \"ledger.v1.LedgerService\" method \"CommitBatch\" streamid 3 payload \"batch-99\" wait 2ms\n    checkout_pod <- ledger_pod grpc service \"ledger.v1.LedgerService\" method \"CommitBatch\" streamid 3 grpcstatus 14\n}\n```"}]}
{"id":"sft-cookbook-lib-fw-vlan20-https-permit","task_type":"nl_to_frasm","protocols":["vlan","tcp","tls"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Stateful VLAN 20 HTTPS Permit Check\" (fw_vlan20_https_permit.frasm). Scenario: Verifies an inter-VLAN firewall rule permits branch workstations on VLAN 20 to complete a 3-way TCP handshake and TLS 1.3 negotiation to an internal portal on port 443. Verify with Wireshark filter `vlan.id == 20 && tcp.port == 443`.","completion":"Stateful firewalls drop lone TLS packets without a prior SYN -> SYN-ACK -> ACK exchange. Specify srcport and dstport once on the opening syn line and FrameAssembly tracks ports and sequence numbers automatically. Compile with `frameassembly fw_vlan20_https_permit.frasm`.\n\n```frameassembly\n// Devices on Branch VLAN 20 and Internal Portal Subnet\nhost branch_pc  { ip 10.20.10.25 }\nhost portal_srv { ip 10.20.90.80 }\n\ncompile {\n    // 1. Open TCP port 443 with an 802.1Q VLAN 20 tag (0x8100)\n    branch_pc -> portal_srv vlan 20 tcp syn srcport 51240 dstport 443 win 65535 mss 1460 wait 1ms\n    branch_pc <- portal_srv vlan 20 tcp syn ack win 65535 mss 1460 wait 1ms\n    branch_pc -> portal_srv vlan 20 tcp ack wait 1ms\n\n    // 2. Send TLS ClientHello with SNI so NGFW application control can inspect the hostname\n    branch_pc -> portal_srv vlan 20 tls clienthello sni \"portal.corp.internal\" alpn \"h2\" wait 2ms\n\n    // 3. Server completes TLS 1.3 ServerHello (0x1301 = TLS_AES_128_GCM_SHA256)\n    branch_pc <- portal_srv vlan 20 tls serverhello ciphersuite 0x1301\n}\n```","frasm_code":"// Devices on Branch VLAN 20 and Internal Portal Subnet\nhost branch_pc  { ip 10.20.10.25 }\nhost portal_srv { ip 10.20.90.80 }\n\ncompile {\n    // 1. Open TCP port 443 with an 802.1Q VLAN 20 tag (0x8100)\n    branch_pc -> portal_srv vlan 20 tcp syn srcport 51240 dstport 443 win 65535 mss 1460 wait 1ms\n    branch_pc <- portal_srv vlan 20 tcp syn ack win 65535 mss 1460 wait 1ms\n    branch_pc -> portal_srv vlan 20 tcp ack wait 1ms\n\n    // 2. Send TLS ClientHello with SNI so NGFW application control can inspect the hostname\n    branch_pc -> portal_srv vlan 20 tls clienthello sni \"portal.corp.internal\" alpn \"h2\" wait 2ms\n\n    // 3. Server completes TLS 1.3 ServerHello (0x1301 = TLS_AES_128_GCM_SHA256)\n    branch_pc <- portal_srv vlan 20 tls serverhello ciphersuite 0x1301\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Stateful VLAN 20 HTTPS Permit Check\" (fw_vlan20_https_permit.frasm). Scenario: Verifies an inter-VLAN firewall rule permits branch workstations on VLAN 20 to complete a 3-way TCP handshake and TLS 1.3 negotiation to an internal portal on port 443. Verify with Wireshark filter `vlan.id == 20 && tcp.port == 443`."},{"role":"assistant","content":"Stateful firewalls drop lone TLS packets without a prior SYN -> SYN-ACK -> ACK exchange. Specify srcport and dstport once on the opening syn line and FrameAssembly tracks ports and sequence numbers automatically. Compile with `frameassembly fw_vlan20_https_permit.frasm`.\n\n```frameassembly\n// Devices on Branch VLAN 20 and Internal Portal Subnet\nhost branch_pc  { ip 10.20.10.25 }\nhost portal_srv { ip 10.20.90.80 }\n\ncompile {\n    // 1. Open TCP port 443 with an 802.1Q VLAN 20 tag (0x8100)\n    branch_pc -> portal_srv vlan 20 tcp syn srcport 51240 dstport 443 win 65535 mss 1460 wait 1ms\n    branch_pc <- portal_srv vlan 20 tcp syn ack win 65535 mss 1460 wait 1ms\n    branch_pc -> portal_srv vlan 20 tcp ack wait 1ms\n\n    // 2. Send TLS ClientHello with SNI so NGFW application control can inspect the hostname\n    branch_pc -> portal_srv vlan 20 tls clienthello sni \"portal.corp.internal\" alpn \"h2\" wait 2ms\n\n    // 3. Server completes TLS 1.3 ServerHello (0x1301 = TLS_AES_128_GCM_SHA256)\n    branch_pc <- portal_srv vlan 20 tls serverhello ciphersuite 0x1301\n}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-http","task_type":"nl_to_frasm","protocols":["http"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block HTTP/1.1 (`http`) Quickstart\" (http_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Hypertext Transfer Protocol HTTP/1.1 (TCP 80, Dual-Stack IPv4/IPv6). Verify with Wireshark filter `http`.","completion":"Defaults to TCP destination port `80` with `psh ack` flags and advances TCP `seq` by the exact HTTP header + body byte count. Compile with `frameassembly http_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block HTTP/1.1 (`http`) Quickstart\" (http_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Hypertext Transfer Protocol HTTP/1.1 (TCP 80, Dual-Stack IPv4/IPv6). Verify with Wireshark filter `http`."},{"role":"assistant","content":"Defaults to TCP destination port `80` with `psh ack` flags and advances TCP `seq` by the exact HTTP header + body byte count. Compile with `frameassembly http_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-http2","task_type":"nl_to_frasm","protocols":["http2"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block HTTP/2 (`http2`) Quickstart\" (http2_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Hypertext Transfer Protocol Version 2 Binary Framing (TCP 443, Dual-Stack IPv4/IPv6). Verify with Wireshark filter `http2`.","completion":"Defaults to TCP destination port `443` (`psh ack`) and keeps TCP `seq` / `acknum` synchronized across multiplexed frames. Compile with `frameassembly http2_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block HTTP/2 (`http2`) Quickstart\" (http2_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Hypertext Transfer Protocol Version 2 Binary Framing (TCP 443, Dual-Stack IPv4/IPv6). Verify with Wireshark filter `http2`."},{"role":"assistant","content":"Defaults to TCP destination port `443` (`psh ack`) and keeps TCP `seq` / `acknum` synchronized across multiplexed frames. Compile with `frameassembly http2_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-tls","task_type":"nl_to_frasm","protocols":["tls"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block TLS 1.2 / 1.3 (`tls`) Quickstart\" (tls_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Transport Layer Security Record & Handshake Layer (TCP 443, Dual-Stack IPv4/IPv6). Verify with Wireshark filter `tls`.","completion":"Defaults to TCP destination port `443` (`psh ack`), TLS record version `0x0303` (RFC 8446 compatibility layer), and TLS 1.3 cipher suite `0x1301` (`TLS_AES_128_GCM_SHA256`). Compile with `frameassembly tls_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block TLS 1.2 / 1.3 (`tls`) Quickstart\" (tls_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Transport Layer Security Record & Handshake Layer (TCP 443, Dual-Stack IPv4/IPv6). Verify with Wireshark filter `tls`."},{"role":"assistant","content":"Defaults to TCP destination port `443` (`psh ack`), TLS record version `0x0303` (RFC 8446 compatibility layer), and TLS 1.3 cipher suite `0x1301` (`TLS_AES_128_GCM_SHA256`). Compile with `frameassembly tls_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-quic","task_type":"nl_to_frasm","protocols":["quic"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block QUIC (HTTP/3) (`quic`) Quickstart\" (quic_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for QUIC v1 & v2 Encrypted UDP Transport (UDP 443, Dual-Stack IPv4/IPv6). Verify with Wireshark filter `quic`.","completion":"Defaults to UDP destination port `443`, QUIC v1 (`version 1` `0x00000001`), and sets the mandatory Fixed Bit (`0x40`) in byte 0. Compile with `frameassembly quic_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block QUIC (HTTP/3) (`quic`) Quickstart\" (quic_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for QUIC v1 & v2 Encrypted UDP Transport (UDP 443, Dual-Stack IPv4/IPv6). Verify with Wireshark filter `quic`."},{"role":"assistant","content":"Defaults to UDP destination port `443`, QUIC v1 (`version 1` `0x00000001`), and sets the mandatory Fixed Bit (`0x40`) in byte 0. Compile with `frameassembly quic_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-cookbook-proto-lab-http","task_type":"nl_to_frasm","protocols":["http","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"HTTP/1.1 (`http`): REST API JSON Webhook POST + WAF 403 Block Scenario\" (http_api_waf_test.frasm). Scenario: Completes a TCP handshake on port 8080, sends an authenticated JSON `POST` request with custom HTTP headers, and captures a `403 Forbidden` gateway response. Verify with Wireshark filter `http`.","completion":"Defaults to TCP destination port `80` with `psh ack` flags and advances TCP `seq` by the exact HTTP header + body byte count. Computes and inserts `Content-Length: <bytes>` automatically whenever `body` is present, formatting all header lines with standard `\r\n` CRLF terminators. Compile with `frameassembly show http_api_waf_test.frasm`.\n\n```frameassembly\nhost ext_client { ip 198.51.100.45 }\nhost waf_proxy  { ip 172.16.20.80 }\n\ncompile {\n    // 1. Complete TCP 3-way handshake on port 8080 (so Suricata stream engine tracks state)\n    ext_client -> waf_proxy tcp syn srcport 54320 dstport 8080 win 65535 mss 1460 wait 1ms\n    ext_client <- waf_proxy tcp syn ack win 65535 mss 1460 wait 1ms\n    ext_client -> waf_proxy tcp ack wait 1ms\n    // 2. HTTP POST with custom headers and JSON body\n    ext_client -> waf_proxy http post uri \"/v1/login\" hosthdr \"portal.example.com\" useragent \"Mozilla/5.0\" contenttype \"application/json\" header \"X-Request-ID\" \"req-9041\" header \"X-Forwarded-For\" \"203.0.113.9\" body \"{\\\"user\\\":\\\"admin\\\"}\" wait 3ms\n    // 3. WAF blocks request with HTTP 403 Forbidden + TCP FIN\n    ext_client <- waf_proxy http status 403 reason \"Forbidden\" contenttype \"application/json\" body \"{\\\"error\\\":\\\"blocked_by_policy\\\"}\" wait 1ms\n    ext_client <- waf_proxy tcp fin ack wait 1ms\n    ext_client -> waf_proxy tcp ack\n}\n```","frasm_code":"host ext_client { ip 198.51.100.45 }\nhost waf_proxy  { ip 172.16.20.80 }\n\ncompile {\n    // 1. Complete TCP 3-way handshake on port 8080 (so Suricata stream engine tracks state)\n    ext_client -> waf_proxy tcp syn srcport 54320 dstport 8080 win 65535 mss 1460 wait 1ms\n    ext_client <- waf_proxy tcp syn ack win 65535 mss 1460 wait 1ms\n    ext_client -> waf_proxy tcp ack wait 1ms\n    // 2. HTTP POST with custom headers and JSON body\n    ext_client -> waf_proxy http post uri \"/v1/login\" hosthdr \"portal.example.com\" useragent \"Mozilla/5.0\" contenttype \"application/json\" header \"X-Request-ID\" \"req-9041\" header \"X-Forwarded-For\" \"203.0.113.9\" body \"{\\\"user\\\":\\\"admin\\\"}\" wait 3ms\n    // 3. WAF blocks request with HTTP 403 Forbidden + TCP FIN\n    ext_client <- waf_proxy http status 403 reason \"Forbidden\" contenttype \"application/json\" body \"{\\\"error\\\":\\\"blocked_by_policy\\\"}\" wait 1ms\n    ext_client <- waf_proxy tcp fin ack wait 1ms\n    ext_client -> waf_proxy tcp ack\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"HTTP/1.1 (`http`): REST API JSON Webhook POST + WAF 403 Block Scenario\" (http_api_waf_test.frasm). Scenario: Completes a TCP handshake on port 8080, sends an authenticated JSON `POST` request with custom HTTP headers, and captures a `403 Forbidden` gateway response. Verify with Wireshark filter `http`."},{"role":"assistant","content":"Defaults to TCP destination port `80` with `psh ack` flags and advances TCP `seq` by the exact HTTP header + body byte count. Computes and inserts `Content-Length: <bytes>` automatically whenever `body` is present, formatting all header lines with standard `\r\n` CRLF terminators. Compile with `frameassembly show http_api_waf_test.frasm`.\n\n```frameassembly\nhost ext_client { ip 198.51.100.45 }\nhost waf_proxy  { ip 172.16.20.80 }\n\ncompile {\n    // 1. Complete TCP 3-way handshake on port 8080 (so Suricata stream engine tracks state)\n    ext_client -> waf_proxy tcp syn srcport 54320 dstport 8080 win 65535 mss 1460 wait 1ms\n    ext_client <- waf_proxy tcp syn ack win 65535 mss 1460 wait 1ms\n    ext_client -> waf_proxy tcp ack wait 1ms\n    // 2. HTTP POST with custom headers and JSON body\n    ext_client -> waf_proxy http post uri \"/v1/login\" hosthdr \"portal.example.com\" useragent \"Mozilla/5.0\" contenttype \"application/json\" header \"X-Request-ID\" \"req-9041\" header \"X-Forwarded-For\" \"203.0.113.9\" body \"{\\\"user\\\":\\\"admin\\\"}\" wait 3ms\n    // 3. WAF blocks request with HTTP 403 Forbidden + TCP FIN\n    ext_client <- waf_proxy http status 403 reason \"Forbidden\" contenttype \"application/json\" body \"{\\\"error\\\":\\\"blocked_by_policy\\\"}\" wait 1ms\n    ext_client <- waf_proxy tcp fin ack wait 1ms\n    ext_client -> waf_proxy tcp ack\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-http2","task_type":"nl_to_frasm","protocols":["http2","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"HTTP/2 (`http2`): Cleartext h2c Connection Preface, Stream 1 Request, PING & Graceful GOAWAY\" (http2_multiplexed_session.frasm). Scenario: Establishes a TCP port 8080 connection, exchanges HTTP/2 connection prefaces, serves a Stream 1 request/data exchange, tests liveness with `ping`, and closes cleanly via `goaway`. Verify with Wireshark filter `http2`.","completion":"Defaults to TCP destination port `443` (`psh ack`) and keeps TCP `seq` / `acknum` synchronized across multiplexed frames. Enforces RFC 9113 frame size rules automatically: 24-byte magic string + `SETTINGS` on `preface`, 8-byte payload on `ping` (`streamid 0`), 4-byte window increment on `windowupdate`, and 8-byte `last_stream_id + error_code` on `goaway`. Compile with `frameassembly show http2_multiplexed_session.frasm`.\n\n```frameassembly\nhost mesh_sidecar { ip 172.16.30.11 }\nhost upstream_svc { ip 172.16.30.80 }\n\ncompile {\n    mesh_sidecar -> upstream_svc tcp syn srcport 53080 dstport 8080 win 65535 mss 1460 wait 1ms\n    mesh_sidecar <- upstream_svc tcp syn ack win 65535 mss 1460 wait 1ms\n    mesh_sidecar -> upstream_svc tcp ack wait 1ms\n    // 1. Client magic preface + server SETTINGS\n    mesh_sidecar -> upstream_svc http2 preface wait 1ms\n    mesh_sidecar <- upstream_svc http2 settings wait 1ms\n    // 2. Stream 1 request headers + response data + flow-control window update\n    mesh_sidecar -> upstream_svc http2 headers streamid 1 wait 2ms\n    mesh_sidecar <- upstream_svc http2 headers streamid 1 wait 1ms\n    mesh_sidecar <- upstream_svc http2 data streamid 1 payload \"{\\\"items\\\":[]}\" wait 1ms\n    mesh_sidecar -> upstream_svc http2 windowupdate streamid 0 wait 5ms\n    // 3. Keepalive PING & graceful connection drain (GOAWAY on stream 0)\n    mesh_sidecar -> upstream_svc http2 ping streamid 0 wait 2ms\n    mesh_sidecar <- upstream_svc http2 goaway streamid 0\n}\n```","frasm_code":"host mesh_sidecar { ip 172.16.30.11 }\nhost upstream_svc { ip 172.16.30.80 }\n\ncompile {\n    mesh_sidecar -> upstream_svc tcp syn srcport 53080 dstport 8080 win 65535 mss 1460 wait 1ms\n    mesh_sidecar <- upstream_svc tcp syn ack win 65535 mss 1460 wait 1ms\n    mesh_sidecar -> upstream_svc tcp ack wait 1ms\n    // 1. Client magic preface + server SETTINGS\n    mesh_sidecar -> upstream_svc http2 preface wait 1ms\n    mesh_sidecar <- upstream_svc http2 settings wait 1ms\n    // 2. Stream 1 request headers + response data + flow-control window update\n    mesh_sidecar -> upstream_svc http2 headers streamid 1 wait 2ms\n    mesh_sidecar <- upstream_svc http2 headers streamid 1 wait 1ms\n    mesh_sidecar <- upstream_svc http2 data streamid 1 payload \"{\\\"items\\\":[]}\" wait 1ms\n    mesh_sidecar -> upstream_svc http2 windowupdate streamid 0 wait 5ms\n    // 3. Keepalive PING & graceful connection drain (GOAWAY on stream 0)\n    mesh_sidecar -> upstream_svc http2 ping streamid 0 wait 2ms\n    mesh_sidecar <- upstream_svc http2 goaway streamid 0\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"HTTP/2 (`http2`): Cleartext h2c Connection Preface, Stream 1 Request, PING & Graceful GOAWAY\" (http2_multiplexed_session.frasm). Scenario: Establishes a TCP port 8080 connection, exchanges HTTP/2 connection prefaces, serves a Stream 1 request/data exchange, tests liveness with `ping`, and closes cleanly via `goaway`. Verify with Wireshark filter `http2`."},{"role":"assistant","content":"Defaults to TCP destination port `443` (`psh ack`) and keeps TCP `seq` / `acknum` synchronized across multiplexed frames. Enforces RFC 9113 frame size rules automatically: 24-byte magic string + `SETTINGS` on `preface`, 8-byte payload on `ping` (`streamid 0`), 4-byte window increment on `windowupdate`, and 8-byte `last_stream_id + error_code` on `goaway`. Compile with `frameassembly show http2_multiplexed_session.frasm`.\n\n```frameassembly\nhost mesh_sidecar { ip 172.16.30.11 }\nhost upstream_svc { ip 172.16.30.80 }\n\ncompile {\n    mesh_sidecar -> upstream_svc tcp syn srcport 53080 dstport 8080 win 65535 mss 1460 wait 1ms\n    mesh_sidecar <- upstream_svc tcp syn ack win 65535 mss 1460 wait 1ms\n    mesh_sidecar -> upstream_svc tcp ack wait 1ms\n    // 1. Client magic preface + server SETTINGS\n    mesh_sidecar -> upstream_svc http2 preface wait 1ms\n    mesh_sidecar <- upstream_svc http2 settings wait 1ms\n    // 2. Stream 1 request headers + response data + flow-control window update\n    mesh_sidecar -> upstream_svc http2 headers streamid 1 wait 2ms\n    mesh_sidecar <- upstream_svc http2 headers streamid 1 wait 1ms\n    mesh_sidecar <- upstream_svc http2 data streamid 1 payload \"{\\\"items\\\":[]}\" wait 1ms\n    mesh_sidecar -> upstream_svc http2 windowupdate streamid 0 wait 5ms\n    // 3. Keepalive PING & graceful connection drain (GOAWAY on stream 0)\n    mesh_sidecar -> upstream_svc http2 ping streamid 0 wait 2ms\n    mesh_sidecar <- upstream_svc http2 goaway streamid 0\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-grpc","task_type":"nl_to_frasm","protocols":["grpc","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"gRPC (`grpc`): gNMI Router Telemetry Subscription + Backend UNAVAILABLE Failover\" (grpc_service_mesh_lab.frasm). Scenario: Opens a TCP 50051 connection, invokes a `telemetry.Collector/Export` RPC succeeding with `grpcstatus 0`, and captures a second call returning `grpcstatus 14` (`UNAVAILABLE`). Verify with Wireshark filter `grpc || http2`.","completion":"Defaults to TCP destination port `50051` (`psh ack`) and formats HTTP/2 `HEADERS` (`:method POST`, `:path /<service>/<method>`, `content-type: application/grpc`). Wraps request payloads in the 5-byte gRPC Length-Prefixed-Message header (`Compressed-Flag = 0` + 32-bit big-endian message length). Compile with `frameassembly show grpc_service_mesh_lab.frasm`.\n\n```frameassembly\nhost edge_agent { ip 172.16.40.12 }\nhost mesh_gw    { ip 172.16.40.50 }\n\ncompile {\n    edge_agent -> mesh_gw tcp syn srcport 55051 dstport 50051 win 65535 mss 1460 wait 1ms\n    edge_agent <- mesh_gw tcp syn ack win 65535 mss 1460 wait 1ms\n    edge_agent -> mesh_gw tcp ack wait 1ms\n    // 1. Healthy gRPC Export call -> OK (0)\n    edge_agent -> mesh_gw grpc service \"telemetry.Collector\" method \"Export\" wait 2ms\n    edge_agent <- mesh_gw grpc grpcstatus 0 wait 4ms\n    // 2. Upstream maintenance -> UNAVAILABLE (14)\n    edge_agent -> mesh_gw grpc service \"auth.TokenVerifier\" method \"Validate\" wait 2ms\n    edge_agent <- mesh_gw grpc grpcstatus 14\n}\n```","frasm_code":"host edge_agent { ip 172.16.40.12 }\nhost mesh_gw    { ip 172.16.40.50 }\n\ncompile {\n    edge_agent -> mesh_gw tcp syn srcport 55051 dstport 50051 win 65535 mss 1460 wait 1ms\n    edge_agent <- mesh_gw tcp syn ack win 65535 mss 1460 wait 1ms\n    edge_agent -> mesh_gw tcp ack wait 1ms\n    // 1. Healthy gRPC Export call -> OK (0)\n    edge_agent -> mesh_gw grpc service \"telemetry.Collector\" method \"Export\" wait 2ms\n    edge_agent <- mesh_gw grpc grpcstatus 0 wait 4ms\n    // 2. Upstream maintenance -> UNAVAILABLE (14)\n    edge_agent -> mesh_gw grpc service \"auth.TokenVerifier\" method \"Validate\" wait 2ms\n    edge_agent <- mesh_gw grpc grpcstatus 14\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"gRPC (`grpc`): gNMI Router Telemetry Subscription + Backend UNAVAILABLE Failover\" (grpc_service_mesh_lab.frasm). Scenario: Opens a TCP 50051 connection, invokes a `telemetry.Collector/Export` RPC succeeding with `grpcstatus 0`, and captures a second call returning `grpcstatus 14` (`UNAVAILABLE`). Verify with Wireshark filter `grpc || http2`."},{"role":"assistant","content":"Defaults to TCP destination port `50051` (`psh ack`) and formats HTTP/2 `HEADERS` (`:method POST`, `:path /<service>/<method>`, `content-type: application/grpc`). Wraps request payloads in the 5-byte gRPC Length-Prefixed-Message header (`Compressed-Flag = 0` + 32-bit big-endian message length). Compile with `frameassembly show grpc_service_mesh_lab.frasm`.\n\n```frameassembly\nhost edge_agent { ip 172.16.40.12 }\nhost mesh_gw    { ip 172.16.40.50 }\n\ncompile {\n    edge_agent -> mesh_gw tcp syn srcport 55051 dstport 50051 win 65535 mss 1460 wait 1ms\n    edge_agent <- mesh_gw tcp syn ack win 65535 mss 1460 wait 1ms\n    edge_agent -> mesh_gw tcp ack wait 1ms\n    // 1. Healthy gRPC Export call -> OK (0)\n    edge_agent -> mesh_gw grpc service \"telemetry.Collector\" method \"Export\" wait 2ms\n    edge_agent <- mesh_gw grpc grpcstatus 0 wait 4ms\n    // 2. Upstream maintenance -> UNAVAILABLE (14)\n    edge_agent -> mesh_gw grpc service \"auth.TokenVerifier\" method \"Validate\" wait 2ms\n    edge_agent <- mesh_gw grpc grpcstatus 14\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-websocket","task_type":"nl_to_frasm","protocols":["websocket","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"WebSocket (`websocket`): Full HTTP 101 Upgrade Handshake Into Masked WebSocket Stream & Close\" (websocket_upgrade_session.frasm). Scenario: Performs a TCP handshake + HTTP `101 Switching Protocols` WebSocket upgrade so Wireshark and Suricata track the protocol switch, then exchanges masked client JSON, server events, `ping`/`pong`, and `close`. Verify with Wireshark filter `websocket`.","completion":"Defaults to TCP destination port `80` (`psh ack`), `text` frame (`opcode 0x1`), and `finbit 1` (complete unfragmented message). Encodes RFC 6455 extended 16-bit (`126`) or 64-bit (`127`) payload lengths automatically when payloads exceed 125 bytes. Compile with `frameassembly show websocket_upgrade_session.frasm`.\n\n```frameassembly\nhost dashboard_ui { ip 172.16.10.25 }\nhost realtime_gw  { ip 172.16.10.80 }\n\ncompile {\n    // 1. TCP 3-way handshake + HTTP 101 WebSocket Upgrade\n    dashboard_ui -> realtime_gw tcp syn srcport 52800 dstport 80 win 65535 mss 1460 wait 1ms\n    dashboard_ui <- realtime_gw tcp syn ack win 65535 mss 1460 wait 1ms\n    dashboard_ui -> realtime_gw tcp ack wait 1ms\n    dashboard_ui -> realtime_gw http get uri \"/ws\" hosthdr \"noc.corp.internal\" header \"Upgrade\" \"websocket\" header \"Connection\" \"Upgrade\" header \"Sec-WebSocket-Version\" \"13\" header \"Sec-WebSocket-Key\" \"dGhlIHNhbXBsZSBub25jZQ==\" wait 2ms\n    dashboard_ui <- realtime_gw http status 101 reason \"Switching Protocols\" header \"Upgrade\" \"websocket\" header \"Connection\" \"Upgrade\" wait 2ms\n    // 2. Masked client text frame + unmasked server push + Ping/Pong + Close\n    dashboard_ui -> realtime_gw websocket text maskkey 0x12345678 payload \"{\\\"op\\\":\\\"subscribe\\\",\\\"channel\\\":\\\"bgp\\\"}\" wait 2ms\n    dashboard_ui <- realtime_gw websocket text payload \"{\\\"peer\\\":\\\"10.0.0.2\\\",\\\"state\\\":\\\"Established\\\"}\" wait 10ms\n    dashboard_ui <- realtime_gw websocket ping payload \"hb\" wait 1ms\n    dashboard_ui -> realtime_gw websocket pong maskkey 0xabcdef01 payload \"hb\" wait 5ms\n    dashboard_ui -> realtime_gw websocket close maskkey 0x11223344\n}\n```","frasm_code":"host dashboard_ui { ip 172.16.10.25 }\nhost realtime_gw  { ip 172.16.10.80 }\n\ncompile {\n    // 1. TCP 3-way handshake + HTTP 101 WebSocket Upgrade\n    dashboard_ui -> realtime_gw tcp syn srcport 52800 dstport 80 win 65535 mss 1460 wait 1ms\n    dashboard_ui <- realtime_gw tcp syn ack win 65535 mss 1460 wait 1ms\n    dashboard_ui -> realtime_gw tcp ack wait 1ms\n    dashboard_ui -> realtime_gw http get uri \"/ws\" hosthdr \"noc.corp.internal\" header \"Upgrade\" \"websocket\" header \"Connection\" \"Upgrade\" header \"Sec-WebSocket-Version\" \"13\" header \"Sec-WebSocket-Key\" \"dGhlIHNhbXBsZSBub25jZQ==\" wait 2ms\n    dashboard_ui <- realtime_gw http status 101 reason \"Switching Protocols\" header \"Upgrade\" \"websocket\" header \"Connection\" \"Upgrade\" wait 2ms\n    // 2. Masked client text frame + unmasked server push + Ping/Pong + Close\n    dashboard_ui -> realtime_gw websocket text maskkey 0x12345678 payload \"{\\\"op\\\":\\\"subscribe\\\",\\\"channel\\\":\\\"bgp\\\"}\" wait 2ms\n    dashboard_ui <- realtime_gw websocket text payload \"{\\\"peer\\\":\\\"10.0.0.2\\\",\\\"state\\\":\\\"Established\\\"}\" wait 10ms\n    dashboard_ui <- realtime_gw websocket ping payload \"hb\" wait 1ms\n    dashboard_ui -> realtime_gw websocket pong maskkey 0xabcdef01 payload \"hb\" wait 5ms\n    dashboard_ui -> realtime_gw websocket close maskkey 0x11223344\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"WebSocket (`websocket`): Full HTTP 101 Upgrade Handshake Into Masked WebSocket Stream & Close\" (websocket_upgrade_session.frasm). Scenario: Performs a TCP handshake + HTTP `101 Switching Protocols` WebSocket upgrade so Wireshark and Suricata track the protocol switch, then exchanges masked client JSON, server events, `ping`/`pong`, and `close`. Verify with Wireshark filter `websocket`."},{"role":"assistant","content":"Defaults to TCP destination port `80` (`psh ack`), `text` frame (`opcode 0x1`), and `finbit 1` (complete unfragmented message). Encodes RFC 6455 extended 16-bit (`126`) or 64-bit (`127`) payload lengths automatically when payloads exceed 125 bytes. Compile with `frameassembly show websocket_upgrade_session.frasm`.\n\n```frameassembly\nhost dashboard_ui { ip 172.16.10.25 }\nhost realtime_gw  { ip 172.16.10.80 }\n\ncompile {\n    // 1. TCP 3-way handshake + HTTP 101 WebSocket Upgrade\n    dashboard_ui -> realtime_gw tcp syn srcport 52800 dstport 80 win 65535 mss 1460 wait 1ms\n    dashboard_ui <- realtime_gw tcp syn ack win 65535 mss 1460 wait 1ms\n    dashboard_ui -> realtime_gw tcp ack wait 1ms\n    dashboard_ui -> realtime_gw http get uri \"/ws\" hosthdr \"noc.corp.internal\" header \"Upgrade\" \"websocket\" header \"Connection\" \"Upgrade\" header \"Sec-WebSocket-Version\" \"13\" header \"Sec-WebSocket-Key\" \"dGhlIHNhbXBsZSBub25jZQ==\" wait 2ms\n    dashboard_ui <- realtime_gw http status 101 reason \"Switching Protocols\" header \"Upgrade\" \"websocket\" header \"Connection\" \"Upgrade\" wait 2ms\n    // 2. Masked client text frame + unmasked server push + Ping/Pong + Close\n    dashboard_ui -> realtime_gw websocket text maskkey 0x12345678 payload \"{\\\"op\\\":\\\"subscribe\\\",\\\"channel\\\":\\\"bgp\\\"}\" wait 2ms\n    dashboard_ui <- realtime_gw websocket text payload \"{\\\"peer\\\":\\\"10.0.0.2\\\",\\\"state\\\":\\\"Established\\\"}\" wait 10ms\n    dashboard_ui <- realtime_gw websocket ping payload \"hb\" wait 1ms\n    dashboard_ui -> realtime_gw websocket pong maskkey 0xabcdef01 payload \"hb\" wait 5ms\n    dashboard_ui -> realtime_gw websocket close maskkey 0x11223344\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-tls","task_type":"nl_to_frasm","protocols":["tls","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"TLS 1.2 / 1.3 (`tls`): Full TLS 1.3 Handshake (`sni` + `alpn \"h2\"`), Encrypted AppData & Alert Teardown\" (tls13_sni_handshake.frasm). Scenario: Completes a TCP 443 handshake, negotiates `TLS_CHACHA20_POLY1305_SHA256` (`0x1303`) with SNI and ALPN, exchanges encrypted Application Data records, and closes with a TLS `alert`. Verify with Wireshark filter `tls`.","completion":"Defaults to TCP destination port `443` (`psh ack`), TLS record version `0x0303` (RFC 8446 compatibility layer), and TLS 1.3 cipher suite `0x1301` (`TLS_AES_128_GCM_SHA256`). Automatically encodes Extension `0x0000` (`server_name` when `sni` is set), Extension `0x002b` (`supported_versions` advertising TLS 1.3 `0x0304` + TLS 1.2 `0x0303`), and Extension `0x0010` (`alpn` when `alpn` is set). Compile with `frameassembly show tls13_sni_handshake.frasm`.\n\n```frameassembly\nhost branch_pc { ip 172.16.12.34 }\nhost saas_gw   { ip 203.0.113.100 }\n\ncompile {\n    branch_pc -> saas_gw tcp syn srcport 54443 dstport 443 win 65535 mss 1460 sackperm wait 1ms\n    branch_pc <- saas_gw tcp syn ack win 65535 mss 1460 sackperm wait 1ms\n    branch_pc -> saas_gw tcp ack wait 1ms\n    // 1. TLS 1.3 ClientHello + ServerHello + Encrypted Handshake / AppData\n    branch_pc -> saas_gw tls clienthello sni \"api.saas-vendor.example\" ciphersuite 0x1303 alpn \"h2\" wait 2ms\n    branch_pc <- saas_gw tls serverhello ciphersuite 0x1303 wait 1ms\n    branch_pc <- saas_gw tls certificate wait 1ms\n    branch_pc <- saas_gw tls finished wait 1ms\n    branch_pc -> saas_gw tls finished wait 2ms\n    // 2. Encrypted TLS Record Type 23 (Application Data) + Record Type 21 (Alert)\n    branch_pc -> saas_gw tls appdata hexpayload \"9f4a1c880021bc773310aa55\" wait 3ms\n    branch_pc <- saas_gw tls appdata hexpayload \"41e82209ff12008ac491bb02\" wait 5ms\n    branch_pc -> saas_gw tls alert\n}\n```","frasm_code":"host branch_pc { ip 172.16.12.34 }\nhost saas_gw   { ip 203.0.113.100 }\n\ncompile {\n    branch_pc -> saas_gw tcp syn srcport 54443 dstport 443 win 65535 mss 1460 sackperm wait 1ms\n    branch_pc <- saas_gw tcp syn ack win 65535 mss 1460 sackperm wait 1ms\n    branch_pc -> saas_gw tcp ack wait 1ms\n    // 1. TLS 1.3 ClientHello + ServerHello + Encrypted Handshake / AppData\n    branch_pc -> saas_gw tls clienthello sni \"api.saas-vendor.example\" ciphersuite 0x1303 alpn \"h2\" wait 2ms\n    branch_pc <- saas_gw tls serverhello ciphersuite 0x1303 wait 1ms\n    branch_pc <- saas_gw tls certificate wait 1ms\n    branch_pc <- saas_gw tls finished wait 1ms\n    branch_pc -> saas_gw tls finished wait 2ms\n    // 2. Encrypted TLS Record Type 23 (Application Data) + Record Type 21 (Alert)\n    branch_pc -> saas_gw tls appdata hexpayload \"9f4a1c880021bc773310aa55\" wait 3ms\n    branch_pc <- saas_gw tls appdata hexpayload \"41e82209ff12008ac491bb02\" wait 5ms\n    branch_pc -> saas_gw tls alert\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"TLS 1.2 / 1.3 (`tls`): Full TLS 1.3 Handshake (`sni` + `alpn \"h2\"`), Encrypted AppData & Alert Teardown\" (tls13_sni_handshake.frasm). Scenario: Completes a TCP 443 handshake, negotiates `TLS_CHACHA20_POLY1305_SHA256` (`0x1303`) with SNI and ALPN, exchanges encrypted Application Data records, and closes with a TLS `alert`. Verify with Wireshark filter `tls`."},{"role":"assistant","content":"Defaults to TCP destination port `443` (`psh ack`), TLS record version `0x0303` (RFC 8446 compatibility layer), and TLS 1.3 cipher suite `0x1301` (`TLS_AES_128_GCM_SHA256`). Automatically encodes Extension `0x0000` (`server_name` when `sni` is set), Extension `0x002b` (`supported_versions` advertising TLS 1.3 `0x0304` + TLS 1.2 `0x0303`), and Extension `0x0010` (`alpn` when `alpn` is set). Compile with `frameassembly show tls13_sni_handshake.frasm`.\n\n```frameassembly\nhost branch_pc { ip 172.16.12.34 }\nhost saas_gw   { ip 203.0.113.100 }\n\ncompile {\n    branch_pc -> saas_gw tcp syn srcport 54443 dstport 443 win 65535 mss 1460 sackperm wait 1ms\n    branch_pc <- saas_gw tcp syn ack win 65535 mss 1460 sackperm wait 1ms\n    branch_pc -> saas_gw tcp ack wait 1ms\n    // 1. TLS 1.3 ClientHello + ServerHello + Encrypted Handshake / AppData\n    branch_pc -> saas_gw tls clienthello sni \"api.saas-vendor.example\" ciphersuite 0x1303 alpn \"h2\" wait 2ms\n    branch_pc <- saas_gw tls serverhello ciphersuite 0x1303 wait 1ms\n    branch_pc <- saas_gw tls certificate wait 1ms\n    branch_pc <- saas_gw tls finished wait 1ms\n    branch_pc -> saas_gw tls finished wait 2ms\n    // 2. Encrypted TLS Record Type 23 (Application Data) + Record Type 21 (Alert)\n    branch_pc -> saas_gw tls appdata hexpayload \"9f4a1c880021bc773310aa55\" wait 3ms\n    branch_pc <- saas_gw tls appdata hexpayload \"41e82209ff12008ac491bb02\" wait 5ms\n    branch_pc -> saas_gw tls alert\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-quic","task_type":"nl_to_frasm","protocols":["quic"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"QUIC (HTTP/3) (`quic`): QUIC v1 Retry Token Challenge, Handshake & 1-RTT Connection Migration\" (quic_connection_migration.frasm). Scenario: Shows a server challenging an initial client packet with `retry`, completing the QUIC handshake, and maintaining the same `dcid` across a NAT source-port rebind on `short` packets. Verify with Wireshark filter `quic`.","completion":"Defaults to UDP destination port `443`, QUIC v1 (`version 1` `0x00000001`), and sets the mandatory Fixed Bit (`0x40`) in byte 0. Encodes 8-byte `dcid` and `scid` Connection IDs plus RFC 9000 variable-length integer payload lengths automatically on Long Header packets. Compile with `frameassembly show quic_connection_migration.frasm`.\n\n```frameassembly\nhost mobile_app { ip 198.51.100.70 }\nhost edge_pop   { ip 203.0.113.44 }\n\ncompile {\n    // 1. Initial attempt -> Server sends stateless Retry token\n    mobile_app -> edge_pop quic initial srcport 51443 dcid 0x0102030405060708 scid 0x1111222233334444 pktnum 0 wait 2ms\n    mobile_app <- edge_pop quic retry dcid 0x1111222233334444 scid 0x9999888877776666 token \"addr-verified-tok\" wait 2ms\n    // 2. Client resends Initial with token + Handshake completion\n    mobile_app -> edge_pop quic initial dcid 0x9999888877776666 scid 0x1111222233334444 token \"addr-verified-tok\" pktnum 1 wait 2ms\n    mobile_app <- edge_pop quic handshake dcid 0x1111222233334444 scid 0x9999888877776666 pktnum 1 wait 3ms\n    // 3. 1-RTT Short Header packets (client migrates from srcport 51443 -> 60222 keeping dcid)\n    mobile_app -> edge_pop quic short dcid 0x9999888877776666 pktnum 2 payload \"h3-stream-frame-1\" wait 5ms\n    mobile_app -> edge_pop quic short srcport 60222 dstport 443 dcid 0x9999888877776666 pktnum 3 payload \"h3-migrated-port\"\n}\n```","frasm_code":"host mobile_app { ip 198.51.100.70 }\nhost edge_pop   { ip 203.0.113.44 }\n\ncompile {\n    // 1. Initial attempt -> Server sends stateless Retry token\n    mobile_app -> edge_pop quic initial srcport 51443 dcid 0x0102030405060708 scid 0x1111222233334444 pktnum 0 wait 2ms\n    mobile_app <- edge_pop quic retry dcid 0x1111222233334444 scid 0x9999888877776666 token \"addr-verified-tok\" wait 2ms\n    // 2. Client resends Initial with token + Handshake completion\n    mobile_app -> edge_pop quic initial dcid 0x9999888877776666 scid 0x1111222233334444 token \"addr-verified-tok\" pktnum 1 wait 2ms\n    mobile_app <- edge_pop quic handshake dcid 0x1111222233334444 scid 0x9999888877776666 pktnum 1 wait 3ms\n    // 3. 1-RTT Short Header packets (client migrates from srcport 51443 -> 60222 keeping dcid)\n    mobile_app -> edge_pop quic short dcid 0x9999888877776666 pktnum 2 payload \"h3-stream-frame-1\" wait 5ms\n    mobile_app -> edge_pop quic short srcport 60222 dstport 443 dcid 0x9999888877776666 pktnum 3 payload \"h3-migrated-port\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"QUIC (HTTP/3) (`quic`): QUIC v1 Retry Token Challenge, Handshake & 1-RTT Connection Migration\" (quic_connection_migration.frasm). Scenario: Shows a server challenging an initial client packet with `retry`, completing the QUIC handshake, and maintaining the same `dcid` across a NAT source-port rebind on `short` packets. Verify with Wireshark filter `quic`."},{"role":"assistant","content":"Defaults to UDP destination port `443`, QUIC v1 (`version 1` `0x00000001`), and sets the mandatory Fixed Bit (`0x40`) in byte 0. Encodes 8-byte `dcid` and `scid` Connection IDs plus RFC 9000 variable-length integer payload lengths automatically on Long Header packets. Compile with `frameassembly show quic_connection_migration.frasm`.\n\n```frameassembly\nhost mobile_app { ip 198.51.100.70 }\nhost edge_pop   { ip 203.0.113.44 }\n\ncompile {\n    // 1. Initial attempt -> Server sends stateless Retry token\n    mobile_app -> edge_pop quic initial srcport 51443 dcid 0x0102030405060708 scid 0x1111222233334444 pktnum 0 wait 2ms\n    mobile_app <- edge_pop quic retry dcid 0x1111222233334444 scid 0x9999888877776666 token \"addr-verified-tok\" wait 2ms\n    // 2. Client resends Initial with token + Handshake completion\n    mobile_app -> edge_pop quic initial dcid 0x9999888877776666 scid 0x1111222233334444 token \"addr-verified-tok\" pktnum 1 wait 2ms\n    mobile_app <- edge_pop quic handshake dcid 0x1111222233334444 scid 0x9999888877776666 pktnum 1 wait 3ms\n    // 3. 1-RTT Short Header packets (client migrates from srcport 51443 -> 60222 keeping dcid)\n    mobile_app -> edge_pop quic short dcid 0x9999888877776666 pktnum 2 payload \"h3-stream-frame-1\" wait 5ms\n    mobile_app -> edge_pop quic short srcport 60222 dstport 443 dcid 0x9999888877776666 pktnum 3 payload \"h3-migrated-port\"\n}\n```"}]}
{"id":"sft-cookbook-ex-db-dual-stack-postgres-flow","task_type":"nl_to_frasm","protocols":["tcp","postgres"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Dual-Stack IPv4 + IPv6 PostgreSQL Read-Replica Health Flow\" (postgres_dual_stack_replica.frasm). Scenario: Runs an identical PostgreSQL v3 startup, authentication, and SQL readiness probe across IPv4 and IPv6 database subnets via flow(app, db). Verify with Wireshark filter `pgsql`.","completion":"Encodes big-endian PostgreSQL StartupMessage (196608 = v3.0), AuthenticationOk, Query (\"Q\"), CommandComplete (\"C\"), and ReadyForQuery (\"Z\"). Compile with `frameassembly postgres_dual_stack_replica.frasm`.\n\n```frameassembly\nhost api_v4 { ip 10.50.1.10 }\nhost pg_v4  { ip 10.50.2.54 }\nhost api_v6 { ip 2001:db8:50:1::10 }\nhost pg_v6  { ip 2001:db8:50:2::54 }\n\nflow pg_replica_check(app, db) {\n    app -> db tcp syn srcport 54320 dstport 5432 win 65535 mss 1440 wait 1ms\n    app <- db tcp syn ack win 65535 mss 1440 wait 1ms\n    app -> db tcp ack wait 1ms\n    app -> db postgres startup user \"health_ro\" db \"analytics\" wait 1ms\n    app <- db postgres authok wait 1ms\n    app <- db postgres readyforquery wait 1ms\n    app -> db postgres query sql \"SELECT pg_is_in_recovery();\" wait 2ms\n    app <- db postgres commandcomplete wait 1ms\n    app <- db postgres readyforquery\n}\n\ncompile {\n    pg_replica_check(api_v4, pg_v4)\n    pg_replica_check(api_v6, pg_v6)\n}\n```","frasm_code":"host api_v4 { ip 10.50.1.10 }\nhost pg_v4  { ip 10.50.2.54 }\nhost api_v6 { ip 2001:db8:50:1::10 }\nhost pg_v6  { ip 2001:db8:50:2::54 }\n\nflow pg_replica_check(app, db) {\n    app -> db tcp syn srcport 54320 dstport 5432 win 65535 mss 1440 wait 1ms\n    app <- db tcp syn ack win 65535 mss 1440 wait 1ms\n    app -> db tcp ack wait 1ms\n    app -> db postgres startup user \"health_ro\" db \"analytics\" wait 1ms\n    app <- db postgres authok wait 1ms\n    app <- db postgres readyforquery wait 1ms\n    app -> db postgres query sql \"SELECT pg_is_in_recovery();\" wait 2ms\n    app <- db postgres commandcomplete wait 1ms\n    app <- db postgres readyforquery\n}\n\ncompile {\n    pg_replica_check(api_v4, pg_v4)\n    pg_replica_check(api_v6, pg_v6)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Dual-Stack IPv4 + IPv6 PostgreSQL Read-Replica Health Flow\" (postgres_dual_stack_replica.frasm). Scenario: Runs an identical PostgreSQL v3 startup, authentication, and SQL readiness probe across IPv4 and IPv6 database subnets via flow(app, db). Verify with Wireshark filter `pgsql`."},{"role":"assistant","content":"Encodes big-endian PostgreSQL StartupMessage (196608 = v3.0), AuthenticationOk, Query (\"Q\"), CommandComplete (\"C\"), and ReadyForQuery (\"Z\"). Compile with `frameassembly postgres_dual_stack_replica.frasm`.\n\n```frameassembly\nhost api_v4 { ip 10.50.1.10 }\nhost pg_v4  { ip 10.50.2.54 }\nhost api_v6 { ip 2001:db8:50:1::10 }\nhost pg_v6  { ip 2001:db8:50:2::54 }\n\nflow pg_replica_check(app, db) {\n    app -> db tcp syn srcport 54320 dstport 5432 win 65535 mss 1440 wait 1ms\n    app <- db tcp syn ack win 65535 mss 1440 wait 1ms\n    app -> db tcp ack wait 1ms\n    app -> db postgres startup user \"health_ro\" db \"analytics\" wait 1ms\n    app <- db postgres authok wait 1ms\n    app <- db postgres readyforquery wait 1ms\n    app -> db postgres query sql \"SELECT pg_is_in_recovery();\" wait 2ms\n    app <- db postgres commandcomplete wait 1ms\n    app <- db postgres readyforquery\n}\n\ncompile {\n    pg_replica_check(api_v4, pg_v4)\n    pg_replica_check(api_v6, pg_v6)\n}\n```"}]}
{"id":"sft-cookbook-ex-mq-mqtt-qos1-telemetry","task_type":"nl_to_frasm","protocols":["tcp","mqtt"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"MQTT v3.1.1 Broker Connect, Topic Subscribe & QoS 1 Publish / PubAck\" (mqtt_qos1_sensor_bus.frasm). Scenario: Models an edge gateway connecting to an internal MQTT broker on TCP 1883, subscribing to command topics, and publishing QoS 1 sensor telemetry. Verify with Wireshark filter `mqtt`.","completion":"Encodes variable-byte MQTT Remaining Length headers across CONNECT, CONNACK, SUBSCRIBE, SUBACK, PUBLISH, PUBACK, and PINGREQ/PINGRESP. Compile with `frameassembly mqtt_qos1_sensor_bus.frasm`.\n\n```frameassembly\nhost edge_gw     { ip 10.75.10.22 }\nhost mqtt_broker { ip 10.75.0.18 }\n\ncompile {\n    edge_gw -> mqtt_broker tcp syn srcport 51883 dstport 1883 win 65535 mss 1460 wait 1ms\n    edge_gw <- mqtt_broker tcp syn ack win 65535 mss 1460 wait 1ms\n    edge_gw -> mqtt_broker tcp ack wait 1ms\n    edge_gw -> mqtt_broker mqtt connect clientid \"gw-line04\" wait 2ms\n    edge_gw <- mqtt_broker mqtt connack returncode 0 wait 2ms\n    edge_gw -> mqtt_broker mqtt subscribe pktid 10 topic \"plant/line04/cmd/#\" qos 1 wait 2ms\n    edge_gw <- mqtt_broker mqtt suback pktid 10 qos 1 wait 3ms\n    edge_gw -> mqtt_broker mqtt publish pktid 11 topic \"plant/line04/temp\" qos 1 payload \"{\\\"c\\\":64.5}\" wait 2ms\n    edge_gw <- mqtt_broker mqtt puback pktid 11 wait 10ms\n    edge_gw -> mqtt_broker mqtt pingreq wait 1ms\n    edge_gw <- mqtt_broker mqtt pingresp\n}\n```","frasm_code":"host edge_gw     { ip 10.75.10.22 }\nhost mqtt_broker { ip 10.75.0.18 }\n\ncompile {\n    edge_gw -> mqtt_broker tcp syn srcport 51883 dstport 1883 win 65535 mss 1460 wait 1ms\n    edge_gw <- mqtt_broker tcp syn ack win 65535 mss 1460 wait 1ms\n    edge_gw -> mqtt_broker tcp ack wait 1ms\n    edge_gw -> mqtt_broker mqtt connect clientid \"gw-line04\" wait 2ms\n    edge_gw <- mqtt_broker mqtt connack returncode 0 wait 2ms\n    edge_gw -> mqtt_broker mqtt subscribe pktid 10 topic \"plant/line04/cmd/#\" qos 1 wait 2ms\n    edge_gw <- mqtt_broker mqtt suback pktid 10 qos 1 wait 3ms\n    edge_gw -> mqtt_broker mqtt publish pktid 11 topic \"plant/line04/temp\" qos 1 payload \"{\\\"c\\\":64.5}\" wait 2ms\n    edge_gw <- mqtt_broker mqtt puback pktid 11 wait 10ms\n    edge_gw -> mqtt_broker mqtt pingreq wait 1ms\n    edge_gw <- mqtt_broker mqtt pingresp\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"MQTT v3.1.1 Broker Connect, Topic Subscribe & QoS 1 Publish / PubAck\" (mqtt_qos1_sensor_bus.frasm). Scenario: Models an edge gateway connecting to an internal MQTT broker on TCP 1883, subscribing to command topics, and publishing QoS 1 sensor telemetry. Verify with Wireshark filter `mqtt`."},{"role":"assistant","content":"Encodes variable-byte MQTT Remaining Length headers across CONNECT, CONNACK, SUBSCRIBE, SUBACK, PUBLISH, PUBACK, and PINGREQ/PINGRESP. Compile with `frameassembly mqtt_qos1_sensor_bus.frasm`.\n\n```frameassembly\nhost edge_gw     { ip 10.75.10.22 }\nhost mqtt_broker { ip 10.75.0.18 }\n\ncompile {\n    edge_gw -> mqtt_broker tcp syn srcport 51883 dstport 1883 win 65535 mss 1460 wait 1ms\n    edge_gw <- mqtt_broker tcp syn ack win 65535 mss 1460 wait 1ms\n    edge_gw -> mqtt_broker tcp ack wait 1ms\n    edge_gw -> mqtt_broker mqtt connect clientid \"gw-line04\" wait 2ms\n    edge_gw <- mqtt_broker mqtt connack returncode 0 wait 2ms\n    edge_gw -> mqtt_broker mqtt subscribe pktid 10 topic \"plant/line04/cmd/#\" qos 1 wait 2ms\n    edge_gw <- mqtt_broker mqtt suback pktid 10 qos 1 wait 3ms\n    edge_gw -> mqtt_broker mqtt publish pktid 11 topic \"plant/line04/temp\" qos 1 payload \"{\\\"c\\\":64.5}\" wait 2ms\n    edge_gw <- mqtt_broker mqtt puback pktid 11 wait 10ms\n    edge_gw -> mqtt_broker mqtt pingreq wait 1ms\n    edge_gw <- mqtt_broker mqtt pingresp\n}\n```"}]}
{"id":"sft-cookbook-lib-fw-dmz-postgres-acl","task_type":"nl_to_frasm","protocols":["vlan","tcp","postgres"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"DMZ Web App to Internal PostgreSQL (TCP 5432) Segmentation Check\" (fw_dmz_postgres_5432.frasm). Scenario: Tests a narrow East-West firewall rule allowing a DMZ web server to authenticate and run a health query against an internal PostgreSQL database on TCP port 5432. Verify with Wireshark filter `vlan.id == 50 && tcp.port == 5432`.","completion":"Feed this .pcap into Suricata or firewall packet-tracer tools to confirm deep-packet inspection recognizes valid PostgreSQL wire framing over VLAN 50. Compile with `frameassembly fw_dmz_postgres_5432.frasm`.\n\n```frameassembly\n// DMZ application node and internal database host\nhost dmz_app { ip 172.16.50.20 }\nhost prod_db { ip 10.50.20.40 }\n\ncompile {\n    // 1. Complete 3-way TCP handshake on PostgreSQL port 5432 (VLAN 50)\n    dmz_app -> prod_db vlan 50 tcp syn srcport 52400 dstport 5432 win 65535 mss 1460 wait 1ms\n    dmz_app <- prod_db vlan 50 tcp syn ack win 65535 mss 1460 wait 1ms\n    dmz_app -> prod_db vlan 50 tcp ack wait 1ms\n\n    // 2. PostgreSQL v3.0 startup, auth OK, and lightweight SQL check\n    dmz_app -> prod_db vlan 50 postgres startup user \"app_svc\" db \"orders\" wait 1ms\n    dmz_app <- prod_db vlan 50 postgres authok wait 1ms\n    dmz_app -> prod_db vlan 50 postgres query sql \"SELECT 1;\" wait 2ms\n    dmz_app <- prod_db vlan 50 postgres commandcomplete wait 1ms\n    dmz_app <- prod_db vlan 50 postgres readyforquery\n}\n```","frasm_code":"// DMZ application node and internal database host\nhost dmz_app { ip 172.16.50.20 }\nhost prod_db { ip 10.50.20.40 }\n\ncompile {\n    // 1. Complete 3-way TCP handshake on PostgreSQL port 5432 (VLAN 50)\n    dmz_app -> prod_db vlan 50 tcp syn srcport 52400 dstport 5432 win 65535 mss 1460 wait 1ms\n    dmz_app <- prod_db vlan 50 tcp syn ack win 65535 mss 1460 wait 1ms\n    dmz_app -> prod_db vlan 50 tcp ack wait 1ms\n\n    // 2. PostgreSQL v3.0 startup, auth OK, and lightweight SQL check\n    dmz_app -> prod_db vlan 50 postgres startup user \"app_svc\" db \"orders\" wait 1ms\n    dmz_app <- prod_db vlan 50 postgres authok wait 1ms\n    dmz_app -> prod_db vlan 50 postgres query sql \"SELECT 1;\" wait 2ms\n    dmz_app <- prod_db vlan 50 postgres commandcomplete wait 1ms\n    dmz_app <- prod_db vlan 50 postgres readyforquery\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"DMZ Web App to Internal PostgreSQL (TCP 5432) Segmentation Check\" (fw_dmz_postgres_5432.frasm). Scenario: Tests a narrow East-West firewall rule allowing a DMZ web server to authenticate and run a health query against an internal PostgreSQL database on TCP port 5432. Verify with Wireshark filter `vlan.id == 50 && tcp.port == 5432`."},{"role":"assistant","content":"Feed this .pcap into Suricata or firewall packet-tracer tools to confirm deep-packet inspection recognizes valid PostgreSQL wire framing over VLAN 50. Compile with `frameassembly fw_dmz_postgres_5432.frasm`.\n\n```frameassembly\n// DMZ application node and internal database host\nhost dmz_app { ip 172.16.50.20 }\nhost prod_db { ip 10.50.20.40 }\n\ncompile {\n    // 1. Complete 3-way TCP handshake on PostgreSQL port 5432 (VLAN 50)\n    dmz_app -> prod_db vlan 50 tcp syn srcport 52400 dstport 5432 win 65535 mss 1460 wait 1ms\n    dmz_app <- prod_db vlan 50 tcp syn ack win 65535 mss 1460 wait 1ms\n    dmz_app -> prod_db vlan 50 tcp ack wait 1ms\n\n    // 2. PostgreSQL v3.0 startup, auth OK, and lightweight SQL check\n    dmz_app -> prod_db vlan 50 postgres startup user \"app_svc\" db \"orders\" wait 1ms\n    dmz_app <- prod_db vlan 50 postgres authok wait 1ms\n    dmz_app -> prod_db vlan 50 postgres query sql \"SELECT 1;\" wait 2ms\n    dmz_app <- prod_db vlan 50 postgres commandcomplete wait 1ms\n    dmz_app <- prod_db vlan 50 postgres readyforquery\n}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-postgres","task_type":"nl_to_frasm","protocols":["postgres"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block PostgreSQL (`postgres`) Quickstart\" (postgres_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for PostgreSQL Frontend/Backend Wire Protocol v3.0 (TCP 5432, Dual-Stack IPv4/IPv6). Verify with Wireshark filter `pgsql`.","completion":"Defaults to TCP destination port `5432` (`psh ack`) and writes Protocol Version `3.0` (`0x00030000`) inside `startup` frames. Compile with `frameassembly postgres_quickstart.frasm`.\n\n```frameassembly\nhost app_pod { ip 10.50.10.12 }\nhost pg_db   { ip 10.50.20.54 }\n\ncompile {\n    app_pod -> pg_db tcp syn srcport 55432 dstport 5432 wait 1ms\n    app_pod <- pg_db tcp syn ack wait 1ms\n    app_pod -> pg_db tcp ack wait 1ms\n    app_pod -> pg_db postgres startup user \"app_ro\" db \"inventory\" wait 2ms\n    app_pod <- pg_db postgres authok wait 1ms\n    app_pod <- pg_db postgres readyforquery wait 2ms\n    app_pod -> pg_db postgres query sql \"SELECT sku, qty FROM stock WHERE qty < 10;\"\n}\n```","frasm_code":"host app_pod { ip 10.50.10.12 }\nhost pg_db   { ip 10.50.20.54 }\n\ncompile {\n    app_pod -> pg_db tcp syn srcport 55432 dstport 5432 wait 1ms\n    app_pod <- pg_db tcp syn ack wait 1ms\n    app_pod -> pg_db tcp ack wait 1ms\n    app_pod -> pg_db postgres startup user \"app_ro\" db \"inventory\" wait 2ms\n    app_pod <- pg_db postgres authok wait 1ms\n    app_pod <- pg_db postgres readyforquery wait 2ms\n    app_pod -> pg_db postgres query sql \"SELECT sku, qty FROM stock WHERE qty < 10;\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block PostgreSQL (`postgres`) Quickstart\" (postgres_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for PostgreSQL Frontend/Backend Wire Protocol v3.0 (TCP 5432, Dual-Stack IPv4/IPv6). Verify with Wireshark filter `pgsql`."},{"role":"assistant","content":"Defaults to TCP destination port `5432` (`psh ack`) and writes Protocol Version `3.0` (`0x00030000`) inside `startup` frames. Compile with `frameassembly postgres_quickstart.frasm`.\n\n```frameassembly\nhost app_pod { ip 10.50.10.12 }\nhost pg_db   { ip 10.50.20.54 }\n\ncompile {\n    app_pod -> pg_db tcp syn srcport 55432 dstport 5432 wait 1ms\n    app_pod <- pg_db tcp syn ack wait 1ms\n    app_pod -> pg_db tcp ack wait 1ms\n    app_pod -> pg_db postgres startup user \"app_ro\" db \"inventory\" wait 2ms\n    app_pod <- pg_db postgres authok wait 1ms\n    app_pod <- pg_db postgres readyforquery wait 2ms\n    app_pod -> pg_db postgres query sql \"SELECT sku, qty FROM stock WHERE qty < 10;\"\n}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-mysql","task_type":"nl_to_frasm","protocols":["mysql"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block MySQL / MariaDB (`mysql`) Quickstart\" (mysql_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for MySQL & MariaDB Wire Protocol v10 (TCP 3306, Dual-Stack IPv4/IPv6). Verify with Wireshark filter `mysql`.","completion":"Defaults to TCP destination port `3306` (`psh ack`) and computes the 3-byte little-endian MySQL packet length automatically. Compile with `frameassembly mysql_quickstart.frasm`.\n\n```frameassembly\nhost app_srv  { ip 10.50.1.20 }\nhost mysql_db { ip 10.50.2.33 }\n\ncompile {\n    app_srv -> mysql_db tcp syn srcport 53306 dstport 3306 wait 1ms\n    app_srv <- mysql_db tcp syn ack wait 1ms\n    app_srv -> mysql_db tcp ack wait 1ms\n    app_srv <- mysql_db mysql greeting serverversion \"8.0.36\" wait 2ms\n    app_srv -> mysql_db mysql login user \"app_rw\" db \"orders\" wait 2ms\n    app_srv <- mysql_db mysql ok\n}\n```","frasm_code":"host app_srv  { ip 10.50.1.20 }\nhost mysql_db { ip 10.50.2.33 }\n\ncompile {\n    app_srv -> mysql_db tcp syn srcport 53306 dstport 3306 wait 1ms\n    app_srv <- mysql_db tcp syn ack wait 1ms\n    app_srv -> mysql_db tcp ack wait 1ms\n    app_srv <- mysql_db mysql greeting serverversion \"8.0.36\" wait 2ms\n    app_srv -> mysql_db mysql login user \"app_rw\" db \"orders\" wait 2ms\n    app_srv <- mysql_db mysql ok\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block MySQL / MariaDB (`mysql`) Quickstart\" (mysql_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for MySQL & MariaDB Wire Protocol v10 (TCP 3306, Dual-Stack IPv4/IPv6). Verify with Wireshark filter `mysql`."},{"role":"assistant","content":"Defaults to TCP destination port `3306` (`psh ack`) and computes the 3-byte little-endian MySQL packet length automatically. Compile with `frameassembly mysql_quickstart.frasm`.\n\n```frameassembly\nhost app_srv  { ip 10.50.1.20 }\nhost mysql_db { ip 10.50.2.33 }\n\ncompile {\n    app_srv -> mysql_db tcp syn srcport 53306 dstport 3306 wait 1ms\n    app_srv <- mysql_db tcp syn ack wait 1ms\n    app_srv -> mysql_db tcp ack wait 1ms\n    app_srv <- mysql_db mysql greeting serverversion \"8.0.36\" wait 2ms\n    app_srv -> mysql_db mysql login user \"app_rw\" db \"orders\" wait 2ms\n    app_srv <- mysql_db mysql ok\n}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-redis","task_type":"nl_to_frasm","protocols":["redis"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block Redis (RESP) (`redis`) Quickstart\" (redis_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Redis Serialization Protocol Cache & Broker (TCP 6379, Dual-Stack IPv4/IPv6). Verify with Wireshark filter `redis || tcp.port == 6379`.","completion":"Defaults to TCP destination port `6379` (`psh ack`) and formats exact `*N\r\n$<len>\r\n...` RESP multibulk wire arrays. Compile with `frameassembly redis_quickstart.frasm`.\n\n```frameassembly\nhost api_pod   { ip 10.44.1.12 }\nhost redis_primary { ip 10.44.2.10 }\n\ncompile {\n    api_pod -> redis_primary tcp syn srcport 51637 dstport 6379 wait 1ms\n    api_pod <- redis_primary tcp syn ack wait 1ms\n    api_pod -> redis_primary tcp ack wait 1ms\n    api_pod -> redis_primary redis set key \"session:4821\" value \"active\" wait 1ms\n    api_pod <- redis_primary redis replytype \"ok\" value \"OK\"\n}\n```","frasm_code":"host api_pod   { ip 10.44.1.12 }\nhost redis_primary { ip 10.44.2.10 }\n\ncompile {\n    api_pod -> redis_primary tcp syn srcport 51637 dstport 6379 wait 1ms\n    api_pod <- redis_primary tcp syn ack wait 1ms\n    api_pod -> redis_primary tcp ack wait 1ms\n    api_pod -> redis_primary redis set key \"session:4821\" value \"active\" wait 1ms\n    api_pod <- redis_primary redis replytype \"ok\" value \"OK\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block Redis (RESP) (`redis`) Quickstart\" (redis_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Redis Serialization Protocol Cache & Broker (TCP 6379, Dual-Stack IPv4/IPv6). Verify with Wireshark filter `redis || tcp.port == 6379`."},{"role":"assistant","content":"Defaults to TCP destination port `6379` (`psh ack`) and formats exact `*N\r\n$<len>\r\n...` RESP multibulk wire arrays. Compile with `frameassembly redis_quickstart.frasm`.\n\n```frameassembly\nhost api_pod   { ip 10.44.1.12 }\nhost redis_primary { ip 10.44.2.10 }\n\ncompile {\n    api_pod -> redis_primary tcp syn srcport 51637 dstport 6379 wait 1ms\n    api_pod <- redis_primary tcp syn ack wait 1ms\n    api_pod -> redis_primary tcp ack wait 1ms\n    api_pod -> redis_primary redis set key \"session:4821\" value \"active\" wait 1ms\n    api_pod <- redis_primary redis replytype \"ok\" value \"OK\"\n}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-mqtt","task_type":"nl_to_frasm","protocols":["mqtt"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block MQTT (`mqtt`) Quickstart\" (mqtt_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Message Queuing Telemetry Transport (IoT & IIoT) (TCP 1883 (or transport udp), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `mqtt`.","completion":"Defaults to TCP destination port `1883` (`psh ack`) and encodes the multi-byte variable-length `Remaining Length` field per OASIS MQTT §2.2.3. Compile with `frameassembly mqtt_quickstart.frasm`.\n\n```frameassembly\nhost edge_gw { ip 10.60.10.25 }\nhost broker  { ip 10.60.10.10 }\n\ncompile {\n    edge_gw -> broker tcp syn srcport 51883 dstport 1883 wait 1ms\n    edge_gw <- broker tcp syn ack wait 1ms\n    edge_gw -> broker tcp ack wait 1ms\n    edge_gw -> broker mqtt connect clientid \"gw-rack04\" keepalive 60 wait 2ms\n    edge_gw <- broker mqtt connack returncode 0 wait 2ms\n    edge_gw -> broker mqtt publish topic \"dc1/rack04/kw\" qos 0 retain payload \"4.85\"\n}\n```","frasm_code":"host edge_gw { ip 10.60.10.25 }\nhost broker  { ip 10.60.10.10 }\n\ncompile {\n    edge_gw -> broker tcp syn srcport 51883 dstport 1883 wait 1ms\n    edge_gw <- broker tcp syn ack wait 1ms\n    edge_gw -> broker tcp ack wait 1ms\n    edge_gw -> broker mqtt connect clientid \"gw-rack04\" keepalive 60 wait 2ms\n    edge_gw <- broker mqtt connack returncode 0 wait 2ms\n    edge_gw -> broker mqtt publish topic \"dc1/rack04/kw\" qos 0 retain payload \"4.85\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block MQTT (`mqtt`) Quickstart\" (mqtt_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Message Queuing Telemetry Transport (IoT & IIoT) (TCP 1883 (or transport udp), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `mqtt`."},{"role":"assistant","content":"Defaults to TCP destination port `1883` (`psh ack`) and encodes the multi-byte variable-length `Remaining Length` field per OASIS MQTT §2.2.3. Compile with `frameassembly mqtt_quickstart.frasm`.\n\n```frameassembly\nhost edge_gw { ip 10.60.10.25 }\nhost broker  { ip 10.60.10.10 }\n\ncompile {\n    edge_gw -> broker tcp syn srcport 51883 dstport 1883 wait 1ms\n    edge_gw <- broker tcp syn ack wait 1ms\n    edge_gw -> broker tcp ack wait 1ms\n    edge_gw -> broker mqtt connect clientid \"gw-rack04\" keepalive 60 wait 2ms\n    edge_gw <- broker mqtt connack returncode 0 wait 2ms\n    edge_gw -> broker mqtt publish topic \"dc1/rack04/kw\" qos 0 retain payload \"4.85\"\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-postgres","task_type":"nl_to_frasm","protocols":["postgres","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"PostgreSQL (`postgres`): Full PostgreSQL v3.0 Startup, SQL Query Lifecycle & ErrorResponse\" (postgres_session_audit.frasm). Scenario: Completes a TCP 5432 handshake, authenticates via `startup` -> `authok` -> `readyforquery`, runs an audit query (`commandcomplete` + `readyforquery`), and triggers an `errorresponse` on a restricted table. Verify with Wireshark filter `pgsql`.","completion":"Defaults to TCP destination port `5432` (`psh ack`) and writes Protocol Version `3.0` (`0x00030000`) inside `startup` frames. Computes the 32-bit big-endian self-inclusive length (`4 + body_bytes`) on every `'R'`, `'Q'`, `'C'`, `'Z'`, and `'E'` message. Compile with `frameassembly show postgres_session_audit.frasm`.\n\n```frameassembly\nhost api_svc { ip 172.16.54.15 }\nhost pg_pri  { ip 172.16.54.100 }\n\ncompile {\n    api_svc -> pg_pri tcp syn srcport 51432 dstport 5432 win 65535 mss 1460 wait 1ms\n    api_svc <- pg_pri tcp syn ack win 65535 mss 1460 wait 1ms\n    api_svc -> pg_pri tcp ack wait 1ms\n    // 1. Client-first StartupMessage -> AuthenticationOk + ReadyForQuery ('I')\n    api_svc -> pg_pri postgres startup user \"reporting_ro\" db \"analytics\" wait 2ms\n    api_svc <- pg_pri postgres authok wait 1ms\n    api_svc <- pg_pri postgres readyforquery wait 2ms\n    // 2. Authorized SELECT query -> CommandComplete + ReadyForQuery\n    api_svc -> pg_pri postgres query sql \"SELECT count(*) FROM daily_events;\" wait 3ms\n    api_svc <- pg_pri postgres commandcomplete wait 1ms\n    api_svc <- pg_pri postgres readyforquery wait 4ms\n    // 3. Unauthorized write attempt -> ErrorResponse ('E')\n    api_svc -> pg_pri postgres query sql \"DROP TABLE audit_trail;\" wait 2ms\n    api_svc <- pg_pri postgres errorresponse\n}\n```","frasm_code":"host api_svc { ip 172.16.54.15 }\nhost pg_pri  { ip 172.16.54.100 }\n\ncompile {\n    api_svc -> pg_pri tcp syn srcport 51432 dstport 5432 win 65535 mss 1460 wait 1ms\n    api_svc <- pg_pri tcp syn ack win 65535 mss 1460 wait 1ms\n    api_svc -> pg_pri tcp ack wait 1ms\n    // 1. Client-first StartupMessage -> AuthenticationOk + ReadyForQuery ('I')\n    api_svc -> pg_pri postgres startup user \"reporting_ro\" db \"analytics\" wait 2ms\n    api_svc <- pg_pri postgres authok wait 1ms\n    api_svc <- pg_pri postgres readyforquery wait 2ms\n    // 2. Authorized SELECT query -> CommandComplete + ReadyForQuery\n    api_svc -> pg_pri postgres query sql \"SELECT count(*) FROM daily_events;\" wait 3ms\n    api_svc <- pg_pri postgres commandcomplete wait 1ms\n    api_svc <- pg_pri postgres readyforquery wait 4ms\n    // 3. Unauthorized write attempt -> ErrorResponse ('E')\n    api_svc -> pg_pri postgres query sql \"DROP TABLE audit_trail;\" wait 2ms\n    api_svc <- pg_pri postgres errorresponse\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"PostgreSQL (`postgres`): Full PostgreSQL v3.0 Startup, SQL Query Lifecycle & ErrorResponse\" (postgres_session_audit.frasm). Scenario: Completes a TCP 5432 handshake, authenticates via `startup` -> `authok` -> `readyforquery`, runs an audit query (`commandcomplete` + `readyforquery`), and triggers an `errorresponse` on a restricted table. Verify with Wireshark filter `pgsql`."},{"role":"assistant","content":"Defaults to TCP destination port `5432` (`psh ack`) and writes Protocol Version `3.0` (`0x00030000`) inside `startup` frames. Computes the 32-bit big-endian self-inclusive length (`4 + body_bytes`) on every `'R'`, `'Q'`, `'C'`, `'Z'`, and `'E'` message. Compile with `frameassembly show postgres_session_audit.frasm`.\n\n```frameassembly\nhost api_svc { ip 172.16.54.15 }\nhost pg_pri  { ip 172.16.54.100 }\n\ncompile {\n    api_svc -> pg_pri tcp syn srcport 51432 dstport 5432 win 65535 mss 1460 wait 1ms\n    api_svc <- pg_pri tcp syn ack win 65535 mss 1460 wait 1ms\n    api_svc -> pg_pri tcp ack wait 1ms\n    // 1. Client-first StartupMessage -> AuthenticationOk + ReadyForQuery ('I')\n    api_svc -> pg_pri postgres startup user \"reporting_ro\" db \"analytics\" wait 2ms\n    api_svc <- pg_pri postgres authok wait 1ms\n    api_svc <- pg_pri postgres readyforquery wait 2ms\n    // 2. Authorized SELECT query -> CommandComplete + ReadyForQuery\n    api_svc -> pg_pri postgres query sql \"SELECT count(*) FROM daily_events;\" wait 3ms\n    api_svc <- pg_pri postgres commandcomplete wait 1ms\n    api_svc <- pg_pri postgres readyforquery wait 4ms\n    // 3. Unauthorized write attempt -> ErrorResponse ('E')\n    api_svc -> pg_pri postgres query sql \"DROP TABLE audit_trail;\" wait 2ms\n    api_svc <- pg_pri postgres errorresponse\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-mysql","task_type":"nl_to_frasm","protocols":["mysql","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"MySQL / MariaDB (`mysql`): Blocked `root` Login (`errcode 1045`) + Authorized Application SQL Session\" (mysql_dam_audit.frasm). Scenario: Shows a rejected `root` login returning MySQL Error `1045`, followed by an authorized `app_ro` connection running a `SELECT` query. Verify with Wireshark filter `mysql`.","completion":"Defaults to TCP destination port `3306` (`psh ack`) and computes the 3-byte little-endian MySQL packet length automatically. Encodes NUL-terminated server version, thread ID, auth-plugin-data salt, and capability flags inside `greeting` so Wireshark recognizes the session as MySQL. Compile with `frameassembly show mysql_dam_audit.frasm`.\n\n```frameassembly\nhost web_node { ip 172.16.50.15 }\nhost db_main  { ip 172.16.60.10 }\n\ncompile {\n    // 1. Unauthorized root login attempt -> MySQL Error 1045\n    web_node -> db_main tcp syn srcport 54306 dstport 3306 win 65535 mss 1460 wait 1ms\n    web_node <- db_main tcp syn ack win 65535 mss 1460 wait 1ms\n    web_node -> db_main tcp ack wait 1ms\n    web_node <- db_main mysql greeting serverversion \"8.0.37-commercial\" wait 2ms\n    web_node -> db_main mysql login user \"root\" db \"mysql\" wait 2ms\n    web_node <- db_main mysql err errcode 1045 wait 5ms\n    // 2. Authorized query on a second connection\n    web_node -> db_main tcp syn srcport 54307 dstport 3306 win 65535 mss 1460 wait 1ms\n    web_node <- db_main tcp syn ack win 65535 mss 1460 wait 1ms\n    web_node -> db_main tcp ack wait 1ms\n    web_node <- db_main mysql greeting serverversion \"8.0.37-commercial\" wait 1ms\n    web_node -> db_main mysql login user \"app_ro\" db \"billing\" wait 1ms\n    web_node <- db_main mysql ok wait 2ms\n    web_node -> db_main mysql query sql \"SELECT invoice_id, total_cents FROM invoices WHERE paid = 0 LIMIT 25\" wait 3ms\n    web_node <- db_main mysql ok\n}\n```","frasm_code":"host web_node { ip 172.16.50.15 }\nhost db_main  { ip 172.16.60.10 }\n\ncompile {\n    // 1. Unauthorized root login attempt -> MySQL Error 1045\n    web_node -> db_main tcp syn srcport 54306 dstport 3306 win 65535 mss 1460 wait 1ms\n    web_node <- db_main tcp syn ack win 65535 mss 1460 wait 1ms\n    web_node -> db_main tcp ack wait 1ms\n    web_node <- db_main mysql greeting serverversion \"8.0.37-commercial\" wait 2ms\n    web_node -> db_main mysql login user \"root\" db \"mysql\" wait 2ms\n    web_node <- db_main mysql err errcode 1045 wait 5ms\n    // 2. Authorized query on a second connection\n    web_node -> db_main tcp syn srcport 54307 dstport 3306 win 65535 mss 1460 wait 1ms\n    web_node <- db_main tcp syn ack win 65535 mss 1460 wait 1ms\n    web_node -> db_main tcp ack wait 1ms\n    web_node <- db_main mysql greeting serverversion \"8.0.37-commercial\" wait 1ms\n    web_node -> db_main mysql login user \"app_ro\" db \"billing\" wait 1ms\n    web_node <- db_main mysql ok wait 2ms\n    web_node -> db_main mysql query sql \"SELECT invoice_id, total_cents FROM invoices WHERE paid = 0 LIMIT 25\" wait 3ms\n    web_node <- db_main mysql ok\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"MySQL / MariaDB (`mysql`): Blocked `root` Login (`errcode 1045`) + Authorized Application SQL Session\" (mysql_dam_audit.frasm). Scenario: Shows a rejected `root` login returning MySQL Error `1045`, followed by an authorized `app_ro` connection running a `SELECT` query. Verify with Wireshark filter `mysql`."},{"role":"assistant","content":"Defaults to TCP destination port `3306` (`psh ack`) and computes the 3-byte little-endian MySQL packet length automatically. Encodes NUL-terminated server version, thread ID, auth-plugin-data salt, and capability flags inside `greeting` so Wireshark recognizes the session as MySQL. Compile with `frameassembly show mysql_dam_audit.frasm`.\n\n```frameassembly\nhost web_node { ip 172.16.50.15 }\nhost db_main  { ip 172.16.60.10 }\n\ncompile {\n    // 1. Unauthorized root login attempt -> MySQL Error 1045\n    web_node -> db_main tcp syn srcport 54306 dstport 3306 win 65535 mss 1460 wait 1ms\n    web_node <- db_main tcp syn ack win 65535 mss 1460 wait 1ms\n    web_node -> db_main tcp ack wait 1ms\n    web_node <- db_main mysql greeting serverversion \"8.0.37-commercial\" wait 2ms\n    web_node -> db_main mysql login user \"root\" db \"mysql\" wait 2ms\n    web_node <- db_main mysql err errcode 1045 wait 5ms\n    // 2. Authorized query on a second connection\n    web_node -> db_main tcp syn srcport 54307 dstport 3306 win 65535 mss 1460 wait 1ms\n    web_node <- db_main tcp syn ack win 65535 mss 1460 wait 1ms\n    web_node -> db_main tcp ack wait 1ms\n    web_node <- db_main mysql greeting serverversion \"8.0.37-commercial\" wait 1ms\n    web_node -> db_main mysql login user \"app_ro\" db \"billing\" wait 1ms\n    web_node <- db_main mysql ok wait 2ms\n    web_node -> db_main mysql query sql \"SELECT invoice_id, total_cents FROM invoices WHERE paid = 0 LIMIT 25\" wait 3ms\n    web_node <- db_main mysql ok\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-redis","task_type":"nl_to_frasm","protocols":["redis","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Redis (RESP) (`redis`): Blocked Unauthenticated `CONFIG` Probe (`-NOAUTH`) + Authenticated Cache Read/Write\" (redis_security_audit.frasm). Scenario: Tests an unauthenticated command rejected with `-NOAUTH Authentication required.`, followed by `AUTH`, `SET`, and bulk `GET`. Verify with Wireshark filter `redis || tcp.port == 6379`.","completion":"Defaults to TCP destination port `6379` (`psh ack`) and formats exact `*N\r\n$<len>\r\n...` RESP multibulk wire arrays. Emits `+OK\r\n` (`replytype \"ok\"`), `-ERR ...\r\n` (`replytype \"err\"`), `:<num>\r\n` (`replytype \"integer\"`), or `$<len>\r\n<value>\r\n` (`replytype \"bulk\"`) on server responses. Compile with `frameassembly show redis_security_audit.frasm`.\n\n```frameassembly\nhost app_worker { ip 172.16.44.20 }\nhost cache_node { ip 172.16.44.63 }\n\ncompile {\n    app_worker -> cache_node tcp syn srcport 52637 dstport 6379 win 65535 mss 1460 wait 1ms\n    app_worker <- cache_node tcp syn ack win 65535 mss 1460 wait 1ms\n    app_worker -> cache_node tcp ack wait 1ms\n    // 1. Unauthenticated probe rejected with RESP error (-)\n    app_worker -> cache_node redis cmd \"INFO\" wait 1ms\n    app_worker <- cache_node redis replytype \"err\" value \"NOAUTH Authentication required.\" wait 3ms\n    // 2. Authenticate + SET + GET\n    app_worker -> cache_node redis cmd \"AUTH\" args \"LabCacheToken2026\" wait 1ms\n    app_worker <- cache_node redis replytype \"ok\" value \"OK\" wait 1ms\n    app_worker -> cache_node redis set key \"ratelimit:198.51.100.9\" value \"42\" wait 1ms\n    app_worker <- cache_node redis replytype \"ok\" value \"OK\" wait 1ms\n    app_worker -> cache_node redis get key \"ratelimit:198.51.100.9\" wait 1ms\n    app_worker <- cache_node redis replytype \"bulk\" value \"42\"\n}\n```","frasm_code":"host app_worker { ip 172.16.44.20 }\nhost cache_node { ip 172.16.44.63 }\n\ncompile {\n    app_worker -> cache_node tcp syn srcport 52637 dstport 6379 win 65535 mss 1460 wait 1ms\n    app_worker <- cache_node tcp syn ack win 65535 mss 1460 wait 1ms\n    app_worker -> cache_node tcp ack wait 1ms\n    // 1. Unauthenticated probe rejected with RESP error (-)\n    app_worker -> cache_node redis cmd \"INFO\" wait 1ms\n    app_worker <- cache_node redis replytype \"err\" value \"NOAUTH Authentication required.\" wait 3ms\n    // 2. Authenticate + SET + GET\n    app_worker -> cache_node redis cmd \"AUTH\" args \"LabCacheToken2026\" wait 1ms\n    app_worker <- cache_node redis replytype \"ok\" value \"OK\" wait 1ms\n    app_worker -> cache_node redis set key \"ratelimit:198.51.100.9\" value \"42\" wait 1ms\n    app_worker <- cache_node redis replytype \"ok\" value \"OK\" wait 1ms\n    app_worker -> cache_node redis get key \"ratelimit:198.51.100.9\" wait 1ms\n    app_worker <- cache_node redis replytype \"bulk\" value \"42\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Redis (RESP) (`redis`): Blocked Unauthenticated `CONFIG` Probe (`-NOAUTH`) + Authenticated Cache Read/Write\" (redis_security_audit.frasm). Scenario: Tests an unauthenticated command rejected with `-NOAUTH Authentication required.`, followed by `AUTH`, `SET`, and bulk `GET`. Verify with Wireshark filter `redis || tcp.port == 6379`."},{"role":"assistant","content":"Defaults to TCP destination port `6379` (`psh ack`) and formats exact `*N\r\n$<len>\r\n...` RESP multibulk wire arrays. Emits `+OK\r\n` (`replytype \"ok\"`), `-ERR ...\r\n` (`replytype \"err\"`), `:<num>\r\n` (`replytype \"integer\"`), or `$<len>\r\n<value>\r\n` (`replytype \"bulk\"`) on server responses. Compile with `frameassembly show redis_security_audit.frasm`.\n\n```frameassembly\nhost app_worker { ip 172.16.44.20 }\nhost cache_node { ip 172.16.44.63 }\n\ncompile {\n    app_worker -> cache_node tcp syn srcport 52637 dstport 6379 win 65535 mss 1460 wait 1ms\n    app_worker <- cache_node tcp syn ack win 65535 mss 1460 wait 1ms\n    app_worker -> cache_node tcp ack wait 1ms\n    // 1. Unauthenticated probe rejected with RESP error (-)\n    app_worker -> cache_node redis cmd \"INFO\" wait 1ms\n    app_worker <- cache_node redis replytype \"err\" value \"NOAUTH Authentication required.\" wait 3ms\n    // 2. Authenticate + SET + GET\n    app_worker -> cache_node redis cmd \"AUTH\" args \"LabCacheToken2026\" wait 1ms\n    app_worker <- cache_node redis replytype \"ok\" value \"OK\" wait 1ms\n    app_worker -> cache_node redis set key \"ratelimit:198.51.100.9\" value \"42\" wait 1ms\n    app_worker <- cache_node redis replytype \"ok\" value \"OK\" wait 1ms\n    app_worker -> cache_node redis get key \"ratelimit:198.51.100.9\" wait 1ms\n    app_worker <- cache_node redis replytype \"bulk\" value \"42\"\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-memcached","task_type":"nl_to_frasm","protocols":["memcached","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Memcached (`memcached`): UDP 11211 `stats` Amplification Audit + TCP ASCII & Binary Cache Operations\" (memcached_udp_and_tcp.frasm). Scenario: Tests a UDP 11211 `stats` probe, then opens a TCP 11211 session exercising both ASCII `set`/`get` and Binary (`opcode 0x00`) `get`. Verify with Wireshark filter `memcache`.","completion":"Prepends the mandatory 8-byte Memcached UDP frame header (`Request ID`, `Seq 0`, `Total Datagrams 1`, `Reserved 0`) automatically on UDP `11211`, and omits it cleanly when `transport tcp` is set. Formats exact `<byte_len>\r\n<value>\r\n` blocks on ASCII `set` commands. Compile with `frameassembly show memcached_udp_and_tcp.frasm`.\n\n```frameassembly\nhost auditor   { ip 172.16.45.10 }\nhost memcache  { ip 172.16.45.112 }\n\ncompile {\n    // 1. UDP 11211 amplification audit probe (with 8-byte UDP header)\n    auditor -> memcache memcached cmd \"stats\" wait 4ms\n    // 2. Authorized internal TCP 11211 session (ASCII + Binary)\n    auditor -> memcache tcp syn srcport 53211 dstport 11211 win 65535 mss 1460 wait 1ms\n    auditor <- memcache tcp syn ack win 65535 mss 1460 wait 1ms\n    auditor -> memcache tcp ack wait 1ms\n    auditor -> memcache memcached set key \"cfg:feature_x\" value \"enabled\" flags 0 exptime 600 transport tcp wait 2ms\n    auditor -> memcache memcached get key \"cfg:feature_x\" opcode 0x00 opaque 0x99 transport tcp\n}\n```","frasm_code":"host auditor   { ip 172.16.45.10 }\nhost memcache  { ip 172.16.45.112 }\n\ncompile {\n    // 1. UDP 11211 amplification audit probe (with 8-byte UDP header)\n    auditor -> memcache memcached cmd \"stats\" wait 4ms\n    // 2. Authorized internal TCP 11211 session (ASCII + Binary)\n    auditor -> memcache tcp syn srcport 53211 dstport 11211 win 65535 mss 1460 wait 1ms\n    auditor <- memcache tcp syn ack win 65535 mss 1460 wait 1ms\n    auditor -> memcache tcp ack wait 1ms\n    auditor -> memcache memcached set key \"cfg:feature_x\" value \"enabled\" flags 0 exptime 600 transport tcp wait 2ms\n    auditor -> memcache memcached get key \"cfg:feature_x\" opcode 0x00 opaque 0x99 transport tcp\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Memcached (`memcached`): UDP 11211 `stats` Amplification Audit + TCP ASCII & Binary Cache Operations\" (memcached_udp_and_tcp.frasm). Scenario: Tests a UDP 11211 `stats` probe, then opens a TCP 11211 session exercising both ASCII `set`/`get` and Binary (`opcode 0x00`) `get`. Verify with Wireshark filter `memcache`."},{"role":"assistant","content":"Prepends the mandatory 8-byte Memcached UDP frame header (`Request ID`, `Seq 0`, `Total Datagrams 1`, `Reserved 0`) automatically on UDP `11211`, and omits it cleanly when `transport tcp` is set. Formats exact `<byte_len>\r\n<value>\r\n` blocks on ASCII `set` commands. Compile with `frameassembly show memcached_udp_and_tcp.frasm`.\n\n```frameassembly\nhost auditor   { ip 172.16.45.10 }\nhost memcache  { ip 172.16.45.112 }\n\ncompile {\n    // 1. UDP 11211 amplification audit probe (with 8-byte UDP header)\n    auditor -> memcache memcached cmd \"stats\" wait 4ms\n    // 2. Authorized internal TCP 11211 session (ASCII + Binary)\n    auditor -> memcache tcp syn srcport 53211 dstport 11211 win 65535 mss 1460 wait 1ms\n    auditor <- memcache tcp syn ack win 65535 mss 1460 wait 1ms\n    auditor -> memcache tcp ack wait 1ms\n    auditor -> memcache memcached set key \"cfg:feature_x\" value \"enabled\" flags 0 exptime 600 transport tcp wait 2ms\n    auditor -> memcache memcached get key \"cfg:feature_x\" opcode 0x00 opaque 0x99 transport tcp\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-mqtt","task_type":"nl_to_frasm","protocols":["mqtt","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"MQTT (`mqtt`): IIoT Gateway Connect, Wildcard Topic Subscribe, QoS 1 Publish & Keepalive Ping\" (mqtt_iiot_telemetry.frasm). Scenario: Connects an industrial gateway to TCP 1883, subscribes to control commands, publishes a `qos 1` retained sensor reading acknowledged via `puback`, and exchanges `pingreq`/`pingresp`. Verify with Wireshark filter `mqtt`.","completion":"Defaults to TCP destination port `1883` (`psh ack`) and encodes the multi-byte variable-length `Remaining Length` field per OASIS MQTT §2.2.3. Encodes the `\"MQTT\"` Protocol Level `4` header inside `connect`, and includes the 2-byte Packet Identifier (`pktid`) automatically on `qos 1` / `qos 2` `publish`, `puback`, `subscribe`, and `suback` packets. Compile with `frameassembly show mqtt_iiot_telemetry.frasm`.\n\n```frameassembly\nhost plc_gw      { ip 192.168.80.21 }\nhost mqtt_broker { ip 192.168.80.10 }\n\ncompile {\n    plc_gw -> mqtt_broker tcp syn srcport 52883 dstport 1883 win 65535 mss 1460 wait 1ms\n    plc_gw <- mqtt_broker tcp syn ack win 65535 mss 1460 wait 1ms\n    plc_gw -> mqtt_broker tcp ack wait 1ms\n    plc_gw -> mqtt_broker mqtt connect clientid \"line2-plc-gw\" keepalive 30 wait 2ms\n    plc_gw <- mqtt_broker mqtt connack returncode 0 wait 2ms\n    // 1. Subscribe to actuator commands (pktid 1)\n    plc_gw -> mqtt_broker mqtt subscribe pktid 1 topic \"plant1/line2/cmd\" qos 1 wait 2ms\n    plc_gw <- mqtt_broker mqtt suback pktid 1 wait 3ms\n    // 2. Publish QoS 1 retained telemetry (pktid 2 -> puback)\n    plc_gw -> mqtt_broker mqtt publish topic \"plant1/line2/pressure_bar\" qos 1 retain pktid 2 payload \"{\\\"bar\\\":6.42}\" wait 2ms\n    plc_gw <- mqtt_broker mqtt puback pktid 2 wait 10ms\n    // 3. Keepalive heartbeat + clean disconnect\n    plc_gw -> mqtt_broker mqtt pingreq wait 1ms\n    plc_gw <- mqtt_broker mqtt pingresp wait 2ms\n    plc_gw -> mqtt_broker mqtt disconnect\n}\n```","frasm_code":"host plc_gw      { ip 192.168.80.21 }\nhost mqtt_broker { ip 192.168.80.10 }\n\ncompile {\n    plc_gw -> mqtt_broker tcp syn srcport 52883 dstport 1883 win 65535 mss 1460 wait 1ms\n    plc_gw <- mqtt_broker tcp syn ack win 65535 mss 1460 wait 1ms\n    plc_gw -> mqtt_broker tcp ack wait 1ms\n    plc_gw -> mqtt_broker mqtt connect clientid \"line2-plc-gw\" keepalive 30 wait 2ms\n    plc_gw <- mqtt_broker mqtt connack returncode 0 wait 2ms\n    // 1. Subscribe to actuator commands (pktid 1)\n    plc_gw -> mqtt_broker mqtt subscribe pktid 1 topic \"plant1/line2/cmd\" qos 1 wait 2ms\n    plc_gw <- mqtt_broker mqtt suback pktid 1 wait 3ms\n    // 2. Publish QoS 1 retained telemetry (pktid 2 -> puback)\n    plc_gw -> mqtt_broker mqtt publish topic \"plant1/line2/pressure_bar\" qos 1 retain pktid 2 payload \"{\\\"bar\\\":6.42}\" wait 2ms\n    plc_gw <- mqtt_broker mqtt puback pktid 2 wait 10ms\n    // 3. Keepalive heartbeat + clean disconnect\n    plc_gw -> mqtt_broker mqtt pingreq wait 1ms\n    plc_gw <- mqtt_broker mqtt pingresp wait 2ms\n    plc_gw -> mqtt_broker mqtt disconnect\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"MQTT (`mqtt`): IIoT Gateway Connect, Wildcard Topic Subscribe, QoS 1 Publish & Keepalive Ping\" (mqtt_iiot_telemetry.frasm). Scenario: Connects an industrial gateway to TCP 1883, subscribes to control commands, publishes a `qos 1` retained sensor reading acknowledged via `puback`, and exchanges `pingreq`/`pingresp`. Verify with Wireshark filter `mqtt`."},{"role":"assistant","content":"Defaults to TCP destination port `1883` (`psh ack`) and encodes the multi-byte variable-length `Remaining Length` field per OASIS MQTT §2.2.3. Encodes the `\"MQTT\"` Protocol Level `4` header inside `connect`, and includes the 2-byte Packet Identifier (`pktid`) automatically on `qos 1` / `qos 2` `publish`, `puback`, `subscribe`, and `suback` packets. Compile with `frameassembly show mqtt_iiot_telemetry.frasm`.\n\n```frameassembly\nhost plc_gw      { ip 192.168.80.21 }\nhost mqtt_broker { ip 192.168.80.10 }\n\ncompile {\n    plc_gw -> mqtt_broker tcp syn srcport 52883 dstport 1883 win 65535 mss 1460 wait 1ms\n    plc_gw <- mqtt_broker tcp syn ack win 65535 mss 1460 wait 1ms\n    plc_gw -> mqtt_broker tcp ack wait 1ms\n    plc_gw -> mqtt_broker mqtt connect clientid \"line2-plc-gw\" keepalive 30 wait 2ms\n    plc_gw <- mqtt_broker mqtt connack returncode 0 wait 2ms\n    // 1. Subscribe to actuator commands (pktid 1)\n    plc_gw -> mqtt_broker mqtt subscribe pktid 1 topic \"plant1/line2/cmd\" qos 1 wait 2ms\n    plc_gw <- mqtt_broker mqtt suback pktid 1 wait 3ms\n    // 2. Publish QoS 1 retained telemetry (pktid 2 -> puback)\n    plc_gw -> mqtt_broker mqtt publish topic \"plant1/line2/pressure_bar\" qos 1 retain pktid 2 payload \"{\\\"bar\\\":6.42}\" wait 2ms\n    plc_gw <- mqtt_broker mqtt puback pktid 2 wait 10ms\n    // 3. Keepalive heartbeat + clean disconnect\n    plc_gw -> mqtt_broker mqtt pingreq wait 1ms\n    plc_gw <- mqtt_broker mqtt pingresp wait 2ms\n    plc_gw -> mqtt_broker mqtt disconnect\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-amqp","task_type":"nl_to_frasm","protocols":["amqp","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"AMQP 0-9-1 (`amqp`): Full RabbitMQ Connection Startup, Channel Open, Publish, Deliver & Heartbeat\" (amqp_rabbitmq_flow.frasm). Scenario: Walks through TCP 5672 connection startup, opening Channel 1, publishing an audit event to `\"sec.events\"`, delivering to a worker, and sending a Channel 0 heartbeat. Verify with Wireshark filter `amqp`.","completion":"Defaults to TCP destination port `5672` (`psh ack`) and appends the mandatory `0xce` frame-end octet to every AMQP 0-9-1 frame. Emits the exact 8-byte `AMQP\\x00\\x00\\x09\\x01` connection header on `protocolheader` so Wireshark locks onto the AMQP dissector. Compile with `frameassembly show amqp_rabbitmq_flow.frasm`.\n\n```frameassembly\nhost auth_svc { ip 172.16.65.10 }\nhost mq_node  { ip 172.16.65.56 }\n\ncompile {\n    auth_svc -> mq_node tcp syn srcport 51672 dstport 5672 win 65535 mss 1460 wait 1ms\n    auth_svc <- mq_node tcp syn ack win 65535 mss 1460 wait 1ms\n    auth_svc -> mq_node tcp ack wait 1ms\n    auth_svc -> mq_node amqp protocolheader wait 1ms\n    auth_svc <- mq_node amqp connectionstart channel 0 wait 2ms\n    auth_svc -> mq_node amqp channelopen channel 1 wait 2ms\n    auth_svc -> mq_node amqp basicpublish channel 1 exchange \"sec.events\" routingkey \"login.mfa\" payload \"{\\\"user\\\":\\\"netadmin\\\"}\" wait 3ms\n    auth_svc <- mq_node amqp basicdeliver channel 1 exchange \"sec.events\" routingkey \"login.mfa\" payload \"{\\\"user\\\":\\\"netadmin\\\"}\" wait 10ms\n    auth_svc <- mq_node amqp heartbeat channel 0\n}\n```","frasm_code":"host auth_svc { ip 172.16.65.10 }\nhost mq_node  { ip 172.16.65.56 }\n\ncompile {\n    auth_svc -> mq_node tcp syn srcport 51672 dstport 5672 win 65535 mss 1460 wait 1ms\n    auth_svc <- mq_node tcp syn ack win 65535 mss 1460 wait 1ms\n    auth_svc -> mq_node tcp ack wait 1ms\n    auth_svc -> mq_node amqp protocolheader wait 1ms\n    auth_svc <- mq_node amqp connectionstart channel 0 wait 2ms\n    auth_svc -> mq_node amqp channelopen channel 1 wait 2ms\n    auth_svc -> mq_node amqp basicpublish channel 1 exchange \"sec.events\" routingkey \"login.mfa\" payload \"{\\\"user\\\":\\\"netadmin\\\"}\" wait 3ms\n    auth_svc <- mq_node amqp basicdeliver channel 1 exchange \"sec.events\" routingkey \"login.mfa\" payload \"{\\\"user\\\":\\\"netadmin\\\"}\" wait 10ms\n    auth_svc <- mq_node amqp heartbeat channel 0\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"AMQP 0-9-1 (`amqp`): Full RabbitMQ Connection Startup, Channel Open, Publish, Deliver & Heartbeat\" (amqp_rabbitmq_flow.frasm). Scenario: Walks through TCP 5672 connection startup, opening Channel 1, publishing an audit event to `\"sec.events\"`, delivering to a worker, and sending a Channel 0 heartbeat. Verify with Wireshark filter `amqp`."},{"role":"assistant","content":"Defaults to TCP destination port `5672` (`psh ack`) and appends the mandatory `0xce` frame-end octet to every AMQP 0-9-1 frame. Emits the exact 8-byte `AMQP\\x00\\x00\\x09\\x01` connection header on `protocolheader` so Wireshark locks onto the AMQP dissector. Compile with `frameassembly show amqp_rabbitmq_flow.frasm`.\n\n```frameassembly\nhost auth_svc { ip 172.16.65.10 }\nhost mq_node  { ip 172.16.65.56 }\n\ncompile {\n    auth_svc -> mq_node tcp syn srcport 51672 dstport 5672 win 65535 mss 1460 wait 1ms\n    auth_svc <- mq_node tcp syn ack win 65535 mss 1460 wait 1ms\n    auth_svc -> mq_node tcp ack wait 1ms\n    auth_svc -> mq_node amqp protocolheader wait 1ms\n    auth_svc <- mq_node amqp connectionstart channel 0 wait 2ms\n    auth_svc -> mq_node amqp channelopen channel 1 wait 2ms\n    auth_svc -> mq_node amqp basicpublish channel 1 exchange \"sec.events\" routingkey \"login.mfa\" payload \"{\\\"user\\\":\\\"netadmin\\\"}\" wait 3ms\n    auth_svc <- mq_node amqp basicdeliver channel 1 exchange \"sec.events\" routingkey \"login.mfa\" payload \"{\\\"user\\\":\\\"netadmin\\\"}\" wait 10ms\n    auth_svc <- mq_node amqp heartbeat channel 0\n}\n```"}]}
{"id":"sft-cookbook-ex-aaa-kerberos-tcp-kdc","task_type":"nl_to_frasm","protocols":["tcp","kerberos"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Active Directory Kerberos AS-REQ / TGS-REQ over TCP Port 88 (transport tcp)\" (kerberos_tcp88_ticket_flow.frasm). Scenario: Enterprise Windows tickets carrying large PAC group memberships exceed UDP MTU and switch to TCP port 88. This trace validates TCP 88 KDC rules. Verify with Wireshark filter `kerberos && tcp.port == 88`.","completion":"transport tcp on kerberos prepends the 4-byte RFC 4120 record-length header over stateful TCP 88. Compile with `frameassembly kerberos_tcp88_ticket_flow.frasm`.\n\n```frameassembly\nhost domain_pc { ip 10.10.30.45 }\nhost dc01_kdc  { ip 10.10.0.10 }\n\ncompile {\n    domain_pc -> dc01_kdc tcp syn srcport 52088 dstport 88 win 65535 mss 1460 wait 1ms\n    domain_pc <- dc01_kdc tcp syn ack win 65535 mss 1460 wait 1ms\n    domain_pc -> dc01_kdc tcp ack wait 1ms\n    domain_pc -> dc01_kdc kerberos asreq realm \"CORP.EXAMPLE.COM\" cname \"alice\" sname \"krbtgt/CORP.EXAMPLE.COM\" etype 18 transport tcp wait 2ms\n    domain_pc <- dc01_kdc kerberos asrep realm \"CORP.EXAMPLE.COM\" cname \"alice\" sname \"krbtgt/CORP.EXAMPLE.COM\" etype 18 transport tcp wait 2ms\n    domain_pc -> dc01_kdc kerberos tgsreq realm \"CORP.EXAMPLE.COM\" cname \"alice\" sname \"cifs/filesrv01.corp.example.com\" etype 18 transport tcp wait 2ms\n    domain_pc <- dc01_kdc kerberos tgsrep realm \"CORP.EXAMPLE.COM\" cname \"alice\" sname \"cifs/filesrv01.corp.example.com\" etype 18 transport tcp\n}\n```","frasm_code":"host domain_pc { ip 10.10.30.45 }\nhost dc01_kdc  { ip 10.10.0.10 }\n\ncompile {\n    domain_pc -> dc01_kdc tcp syn srcport 52088 dstport 88 win 65535 mss 1460 wait 1ms\n    domain_pc <- dc01_kdc tcp syn ack win 65535 mss 1460 wait 1ms\n    domain_pc -> dc01_kdc tcp ack wait 1ms\n    domain_pc -> dc01_kdc kerberos asreq realm \"CORP.EXAMPLE.COM\" cname \"alice\" sname \"krbtgt/CORP.EXAMPLE.COM\" etype 18 transport tcp wait 2ms\n    domain_pc <- dc01_kdc kerberos asrep realm \"CORP.EXAMPLE.COM\" cname \"alice\" sname \"krbtgt/CORP.EXAMPLE.COM\" etype 18 transport tcp wait 2ms\n    domain_pc -> dc01_kdc kerberos tgsreq realm \"CORP.EXAMPLE.COM\" cname \"alice\" sname \"cifs/filesrv01.corp.example.com\" etype 18 transport tcp wait 2ms\n    domain_pc <- dc01_kdc kerberos tgsrep realm \"CORP.EXAMPLE.COM\" cname \"alice\" sname \"cifs/filesrv01.corp.example.com\" etype 18 transport tcp\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Active Directory Kerberos AS-REQ / TGS-REQ over TCP Port 88 (transport tcp)\" (kerberos_tcp88_ticket_flow.frasm). Scenario: Enterprise Windows tickets carrying large PAC group memberships exceed UDP MTU and switch to TCP port 88. This trace validates TCP 88 KDC rules. Verify with Wireshark filter `kerberos && tcp.port == 88`."},{"role":"assistant","content":"transport tcp on kerberos prepends the 4-byte RFC 4120 record-length header over stateful TCP 88. Compile with `frameassembly kerberos_tcp88_ticket_flow.frasm`.\n\n```frameassembly\nhost domain_pc { ip 10.10.30.45 }\nhost dc01_kdc  { ip 10.10.0.10 }\n\ncompile {\n    domain_pc -> dc01_kdc tcp syn srcport 52088 dstport 88 win 65535 mss 1460 wait 1ms\n    domain_pc <- dc01_kdc tcp syn ack win 65535 mss 1460 wait 1ms\n    domain_pc -> dc01_kdc tcp ack wait 1ms\n    domain_pc -> dc01_kdc kerberos asreq realm \"CORP.EXAMPLE.COM\" cname \"alice\" sname \"krbtgt/CORP.EXAMPLE.COM\" etype 18 transport tcp wait 2ms\n    domain_pc <- dc01_kdc kerberos asrep realm \"CORP.EXAMPLE.COM\" cname \"alice\" sname \"krbtgt/CORP.EXAMPLE.COM\" etype 18 transport tcp wait 2ms\n    domain_pc -> dc01_kdc kerberos tgsreq realm \"CORP.EXAMPLE.COM\" cname \"alice\" sname \"cifs/filesrv01.corp.example.com\" etype 18 transport tcp wait 2ms\n    domain_pc <- dc01_kdc kerberos tgsrep realm \"CORP.EXAMPLE.COM\" cname \"alice\" sname \"cifs/filesrv01.corp.example.com\" etype 18 transport tcp\n}\n```"}]}
{"id":"sft-cookbook-ex-aaa-radius-auth-and-acct","task_type":"nl_to_frasm","protocols":["radius"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"RADIUS 802.1X Access-Challenge / Accept (UDP 1812) + Accounting (UDP 1813)\" (radius_auth_and_accounting.frasm). Scenario: Verifies NAC firewall rules for both RADIUS authentication (UDP 1812) and session accounting start/response (UDP 1813). Verify with Wireshark filter `radius`.","completion":"FrameAssembly automatically selects UDP 1812 on access* messages and switches to UDP 1813 on accounting* messages. Compile with `frameassembly radius_auth_and_accounting.frasm`.\n\n```frameassembly\nhost edge_sw { ip 10.20.0.5 }\nhost ise_psn { ip 10.20.100.10 }\n\ncompile {\n    edge_sw -> ise_psn radius accessrequest id 10 user \"mchen\" nasip 10.20.0.5 servicetype 2 wait 3ms\n    edge_sw <- ise_psn radius accesschallenge id 10 wait 3ms\n    edge_sw -> ise_psn radius accessrequest id 11 user \"mchen\" nasip 10.20.0.5 wait 4ms\n    edge_sw <- ise_psn radius accessaccept id 11 framedip 10.20.40.88 wait 5ms\n    edge_sw -> ise_psn radius accountingrequest id 20 user \"mchen\" nasip 10.20.0.5 framedip 10.20.40.88 wait 2ms\n    edge_sw <- ise_psn radius accountingresponse id 20\n}\n```","frasm_code":"host edge_sw { ip 10.20.0.5 }\nhost ise_psn { ip 10.20.100.10 }\n\ncompile {\n    edge_sw -> ise_psn radius accessrequest id 10 user \"mchen\" nasip 10.20.0.5 servicetype 2 wait 3ms\n    edge_sw <- ise_psn radius accesschallenge id 10 wait 3ms\n    edge_sw -> ise_psn radius accessrequest id 11 user \"mchen\" nasip 10.20.0.5 wait 4ms\n    edge_sw <- ise_psn radius accessaccept id 11 framedip 10.20.40.88 wait 5ms\n    edge_sw -> ise_psn radius accountingrequest id 20 user \"mchen\" nasip 10.20.0.5 framedip 10.20.40.88 wait 2ms\n    edge_sw <- ise_psn radius accountingresponse id 20\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"RADIUS 802.1X Access-Challenge / Accept (UDP 1812) + Accounting (UDP 1813)\" (radius_auth_and_accounting.frasm). Scenario: Verifies NAC firewall rules for both RADIUS authentication (UDP 1812) and session accounting start/response (UDP 1813). Verify with Wireshark filter `radius`."},{"role":"assistant","content":"FrameAssembly automatically selects UDP 1812 on access* messages and switches to UDP 1813 on accounting* messages. Compile with `frameassembly radius_auth_and_accounting.frasm`.\n\n```frameassembly\nhost edge_sw { ip 10.20.0.5 }\nhost ise_psn { ip 10.20.100.10 }\n\ncompile {\n    edge_sw -> ise_psn radius accessrequest id 10 user \"mchen\" nasip 10.20.0.5 servicetype 2 wait 3ms\n    edge_sw <- ise_psn radius accesschallenge id 10 wait 3ms\n    edge_sw -> ise_psn radius accessrequest id 11 user \"mchen\" nasip 10.20.0.5 wait 4ms\n    edge_sw <- ise_psn radius accessaccept id 11 framedip 10.20.40.88 wait 5ms\n    edge_sw -> ise_psn radius accountingrequest id 20 user \"mchen\" nasip 10.20.0.5 framedip 10.20.40.88 wait 2ms\n    edge_sw <- ise_psn radius accountingresponse id 20\n}\n```"}]}
{"id":"sft-cookbook-lib-pentest-kerberos-smb-lateral","task_type":"nl_to_frasm","protocols":["kerberos","tcp","smb"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Active Directory RC4 Kerberoasting + ADMIN$ SMB Lateral Check\" (pentest_ad_kerberos_smb.frasm). Scenario: Simulates an RC4-HMAC (etype 23) Kerberos service ticket request on port 88 followed by an SMB2 ADMIN$ share connection on TCP 445 to validate SOC lateral-movement alerts. Verify with Wireshark filter `kerberos || smb2`.","completion":"Lets blue-team and SOC engineers verify Zeek kerberos.log / smb_mapping.log and SIEM correlation rules safely without touching a live Domain Controller. Compile with `frameassembly pentest_ad_kerberos_smb.frasm`.\n\n```frameassembly\n// Lab workstation, Active Directory KDC, and Windows member server\nhost lab_wkstn { ip 10.10.20.44 }\nhost ad_dc01   { ip 10.10.0.10 }\nhost file_srv  { ip 10.10.1.45 }\n\ncompile {\n    // Phase 1: Request SQL SPN ticket downgraded to RC4-HMAC (etype 23 = Kerberoasting test)\n    lab_wkstn -> ad_dc01 kerberos tgsreq realm \"CORP.INTERNAL\" cname \"svc_test\" sname \"MSSQLSvc/sql01.corp.internal:1433\" etype 23 wait 2ms\n    lab_wkstn <- ad_dc01 kerberos tgsrep realm \"CORP.INTERNAL\" cname \"svc_test\" sname \"MSSQLSvc/sql01.corp.internal:1433\" etype 23 wait 5ms\n\n    // Phase 2: Open TCP 445 to member server and connect to administrative share ADMIN$\n    lab_wkstn -> file_srv tcp syn srcport 52445 dstport 445 win 65535 mss 1460 wait 1ms\n    lab_wkstn <- file_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    lab_wkstn -> file_srv tcp ack wait 1ms\n    lab_wkstn -> file_srv smb negotiate msgid 0 wait 1ms\n    lab_wkstn <- file_srv smb negotiate msgid 0 status 0 wait 1ms\n    lab_wkstn -> file_srv smb sessionsetup msgid 1 sessionid 0x2001 wait 1ms\n    lab_wkstn <- file_srv smb sessionsetup msgid 1 sessionid 0x2001 status 0 wait 1ms\n    lab_wkstn -> file_srv smb treeconnect msgid 2 sessionid 0x2001 share \"\\\\file_srv\\ADMIN$\"\n}\n```","frasm_code":"// Lab workstation, Active Directory KDC, and Windows member server\nhost lab_wkstn { ip 10.10.20.44 }\nhost ad_dc01   { ip 10.10.0.10 }\nhost file_srv  { ip 10.10.1.45 }\n\ncompile {\n    // Phase 1: Request SQL SPN ticket downgraded to RC4-HMAC (etype 23 = Kerberoasting test)\n    lab_wkstn -> ad_dc01 kerberos tgsreq realm \"CORP.INTERNAL\" cname \"svc_test\" sname \"MSSQLSvc/sql01.corp.internal:1433\" etype 23 wait 2ms\n    lab_wkstn <- ad_dc01 kerberos tgsrep realm \"CORP.INTERNAL\" cname \"svc_test\" sname \"MSSQLSvc/sql01.corp.internal:1433\" etype 23 wait 5ms\n\n    // Phase 2: Open TCP 445 to member server and connect to administrative share ADMIN$\n    lab_wkstn -> file_srv tcp syn srcport 52445 dstport 445 win 65535 mss 1460 wait 1ms\n    lab_wkstn <- file_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    lab_wkstn -> file_srv tcp ack wait 1ms\n    lab_wkstn -> file_srv smb negotiate msgid 0 wait 1ms\n    lab_wkstn <- file_srv smb negotiate msgid 0 status 0 wait 1ms\n    lab_wkstn -> file_srv smb sessionsetup msgid 1 sessionid 0x2001 wait 1ms\n    lab_wkstn <- file_srv smb sessionsetup msgid 1 sessionid 0x2001 status 0 wait 1ms\n    lab_wkstn -> file_srv smb treeconnect msgid 2 sessionid 0x2001 share \"\\\\file_srv\\ADMIN$\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Active Directory RC4 Kerberoasting + ADMIN$ SMB Lateral Check\" (pentest_ad_kerberos_smb.frasm). Scenario: Simulates an RC4-HMAC (etype 23) Kerberos service ticket request on port 88 followed by an SMB2 ADMIN$ share connection on TCP 445 to validate SOC lateral-movement alerts. Verify with Wireshark filter `kerberos || smb2`."},{"role":"assistant","content":"Lets blue-team and SOC engineers verify Zeek kerberos.log / smb_mapping.log and SIEM correlation rules safely without touching a live Domain Controller. Compile with `frameassembly pentest_ad_kerberos_smb.frasm`.\n\n```frameassembly\n// Lab workstation, Active Directory KDC, and Windows member server\nhost lab_wkstn { ip 10.10.20.44 }\nhost ad_dc01   { ip 10.10.0.10 }\nhost file_srv  { ip 10.10.1.45 }\n\ncompile {\n    // Phase 1: Request SQL SPN ticket downgraded to RC4-HMAC (etype 23 = Kerberoasting test)\n    lab_wkstn -> ad_dc01 kerberos tgsreq realm \"CORP.INTERNAL\" cname \"svc_test\" sname \"MSSQLSvc/sql01.corp.internal:1433\" etype 23 wait 2ms\n    lab_wkstn <- ad_dc01 kerberos tgsrep realm \"CORP.INTERNAL\" cname \"svc_test\" sname \"MSSQLSvc/sql01.corp.internal:1433\" etype 23 wait 5ms\n\n    // Phase 2: Open TCP 445 to member server and connect to administrative share ADMIN$\n    lab_wkstn -> file_srv tcp syn srcport 52445 dstport 445 win 65535 mss 1460 wait 1ms\n    lab_wkstn <- file_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    lab_wkstn -> file_srv tcp ack wait 1ms\n    lab_wkstn -> file_srv smb negotiate msgid 0 wait 1ms\n    lab_wkstn <- file_srv smb negotiate msgid 0 status 0 wait 1ms\n    lab_wkstn -> file_srv smb sessionsetup msgid 1 sessionid 0x2001 wait 1ms\n    lab_wkstn <- file_srv smb sessionsetup msgid 1 sessionid 0x2001 status 0 wait 1ms\n    lab_wkstn -> file_srv smb treeconnect msgid 2 sessionid 0x2001 share \"\\\\file_srv\\ADMIN$\"\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-kerberos","task_type":"nl_to_frasm","protocols":["kerberos","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Kerberos v5 (`kerberos`): AES256 TGT Login Over TCP 88 + RC4 (`etype 23`) Kerberoasting Detection Lab\" (kerberos_ad_detection_lab.frasm). Scenario: Models a normal Windows workstation obtaining an AES256 TGT over TCP port 88, followed by an RC4 (`etype 23`) `tgsreq`/`tgsrep` SPN ticket request to trigger SOC Kerberoasting signatures. Verify with Wireshark filter `kerberos`.","completion":"Encodes valid ASN.1 DER RFC 4120 `APPLICATION` tags (`10` AS-REQ, `11` AS-REP, `12` TGS-REQ, `13` TGS-REP, `30` KRB-ERROR) with `pvno = 5`. Splits slash-separated SPNs like `\"MSSQLSvc/db01.corp.internal:1433\"` into multi-component `PrincipalName` ASN.1 sequences automatically. Compile with `frameassembly show kerberos_ad_detection_lab.frasm`.\n\n```frameassembly\nhost wkstn_14 { ip 172.16.20.14 }\nhost dc01_ad  { ip 172.16.1.10 }\n\ncompile {\n    // 1. Normal Active Directory TGT exchange over TCP port 88 (etype 18 = AES256)\n    wkstn_14 -> dc01_ad tcp syn srcport 53088 dstport 88 win 65535 mss 1460 wait 1ms\n    wkstn_14 <- dc01_ad tcp syn ack win 65535 mss 1460 wait 1ms\n    wkstn_14 -> dc01_ad tcp ack wait 1ms\n    wkstn_14 -> dc01_ad kerberos asreq realm \"CORP.INTERNAL\" cname \"alice\" sname \"krbtgt/CORP.INTERNAL\" etype 18 transport tcp wait 2ms\n    wkstn_14 <- dc01_ad kerberos asrep realm \"CORP.INTERNAL\" cname \"alice\" etype 18 transport tcp wait 5ms\n    // 2. Suspicious RC4-HMAC (etype 23) Service Ticket Request for SQL SPN (Kerberoasting test)\n    wkstn_14 -> dc01_ad kerberos tgsreq realm \"CORP.INTERNAL\" cname \"alice\" sname \"MSSQLSvc/db-prod.corp.internal:1433\" etype 23 transport tcp wait 2ms\n    wkstn_14 <- dc01_ad kerberos tgsrep realm \"CORP.INTERNAL\" cname \"alice\" sname \"MSSQLSvc/db-prod.corp.internal:1433\" etype 23 transport tcp\n}\n```","frasm_code":"host wkstn_14 { ip 172.16.20.14 }\nhost dc01_ad  { ip 172.16.1.10 }\n\ncompile {\n    // 1. Normal Active Directory TGT exchange over TCP port 88 (etype 18 = AES256)\n    wkstn_14 -> dc01_ad tcp syn srcport 53088 dstport 88 win 65535 mss 1460 wait 1ms\n    wkstn_14 <- dc01_ad tcp syn ack win 65535 mss 1460 wait 1ms\n    wkstn_14 -> dc01_ad tcp ack wait 1ms\n    wkstn_14 -> dc01_ad kerberos asreq realm \"CORP.INTERNAL\" cname \"alice\" sname \"krbtgt/CORP.INTERNAL\" etype 18 transport tcp wait 2ms\n    wkstn_14 <- dc01_ad kerberos asrep realm \"CORP.INTERNAL\" cname \"alice\" etype 18 transport tcp wait 5ms\n    // 2. Suspicious RC4-HMAC (etype 23) Service Ticket Request for SQL SPN (Kerberoasting test)\n    wkstn_14 -> dc01_ad kerberos tgsreq realm \"CORP.INTERNAL\" cname \"alice\" sname \"MSSQLSvc/db-prod.corp.internal:1433\" etype 23 transport tcp wait 2ms\n    wkstn_14 <- dc01_ad kerberos tgsrep realm \"CORP.INTERNAL\" cname \"alice\" sname \"MSSQLSvc/db-prod.corp.internal:1433\" etype 23 transport tcp\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Kerberos v5 (`kerberos`): AES256 TGT Login Over TCP 88 + RC4 (`etype 23`) Kerberoasting Detection Lab\" (kerberos_ad_detection_lab.frasm). Scenario: Models a normal Windows workstation obtaining an AES256 TGT over TCP port 88, followed by an RC4 (`etype 23`) `tgsreq`/`tgsrep` SPN ticket request to trigger SOC Kerberoasting signatures. Verify with Wireshark filter `kerberos`."},{"role":"assistant","content":"Encodes valid ASN.1 DER RFC 4120 `APPLICATION` tags (`10` AS-REQ, `11` AS-REP, `12` TGS-REQ, `13` TGS-REP, `30` KRB-ERROR) with `pvno = 5`. Splits slash-separated SPNs like `\"MSSQLSvc/db01.corp.internal:1433\"` into multi-component `PrincipalName` ASN.1 sequences automatically. Compile with `frameassembly show kerberos_ad_detection_lab.frasm`.\n\n```frameassembly\nhost wkstn_14 { ip 172.16.20.14 }\nhost dc01_ad  { ip 172.16.1.10 }\n\ncompile {\n    // 1. Normal Active Directory TGT exchange over TCP port 88 (etype 18 = AES256)\n    wkstn_14 -> dc01_ad tcp syn srcport 53088 dstport 88 win 65535 mss 1460 wait 1ms\n    wkstn_14 <- dc01_ad tcp syn ack win 65535 mss 1460 wait 1ms\n    wkstn_14 -> dc01_ad tcp ack wait 1ms\n    wkstn_14 -> dc01_ad kerberos asreq realm \"CORP.INTERNAL\" cname \"alice\" sname \"krbtgt/CORP.INTERNAL\" etype 18 transport tcp wait 2ms\n    wkstn_14 <- dc01_ad kerberos asrep realm \"CORP.INTERNAL\" cname \"alice\" etype 18 transport tcp wait 5ms\n    // 2. Suspicious RC4-HMAC (etype 23) Service Ticket Request for SQL SPN (Kerberoasting test)\n    wkstn_14 -> dc01_ad kerberos tgsreq realm \"CORP.INTERNAL\" cname \"alice\" sname \"MSSQLSvc/db-prod.corp.internal:1433\" etype 23 transport tcp wait 2ms\n    wkstn_14 <- dc01_ad kerberos tgsrep realm \"CORP.INTERNAL\" cname \"alice\" sname \"MSSQLSvc/db-prod.corp.internal:1433\" etype 23 transport tcp\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-ldap","task_type":"nl_to_frasm","protocols":["ldap","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"LDAPv3 (`ldap`): AD Bind Failure (`49`), Authorized Bind, Privileged Group Search & Unbind\" (ldap_ad_search_audit.frasm). Scenario: Captures a rejected bind (`resultcode 49`), a successful bind (`resultcode 0`), an `(adminCount=1)` privileged-account search returning an entry + `searchdone`, and a clean `unbindreq`. Verify with Wireshark filter `ldap`.","completion":"Defaults to TCP destination port `389` (`psh ack`) and wraps every operation in an ASN.1 BER `SEQUENCE` (`0x30`) with exact definite-length tags. Encodes RFC 4511 protocolOp tags (`0x60` BindRequest, `0x61` BindResponse, `0x63` SearchRequest, `0x64` SearchResultEntry, `0x65` SearchResultDone, `0x42` UnbindRequest). Compile with `frameassembly show ldap_ad_search_audit.frasm`.\n\n```frameassembly\nhost jump_ws { ip 172.16.30.44 }\nhost ad_dc   { ip 172.16.1.10 }\n\ncompile {\n    jump_ws -> ad_dc tcp syn srcport 52389 dstport 389 win 65535 mss 1460 wait 1ms\n    jump_ws <- ad_dc tcp syn ack win 65535 mss 1460 wait 1ms\n    jump_ws -> ad_dc tcp ack wait 1ms\n    // 1. Failed Simple Bind -> resultcode 49 (invalidCredentials)\n    jump_ws -> ad_dc ldap bindreq msgid 1 basedn \"cn=backup_ro,dc=corp,dc=internal\" wait 2ms\n    jump_ws <- ad_dc ldap bindres msgid 1 resultcode 49 wait 5ms\n    // 2. Successful Bind -> Search privileged accounts -> Unbind\n    jump_ws -> ad_dc ldap bindreq msgid 2 basedn \"cn=backup_ro,dc=corp,dc=internal\" wait 2ms\n    jump_ws <- ad_dc ldap bindres msgid 2 resultcode 0 wait 2ms\n    jump_ws -> ad_dc ldap searchreq msgid 3 basedn \"dc=corp,dc=internal\" filter \"(adminCount=1)\" wait 3ms\n    jump_ws <- ad_dc ldap searchentry msgid 3 basedn \"cn=Domain Admins,cn=Users,dc=corp,dc=internal\" wait 1ms\n    jump_ws <- ad_dc ldap searchdone msgid 3 resultcode 0 wait 2ms\n    jump_ws -> ad_dc ldap unbindreq msgid 4\n}\n```","frasm_code":"host jump_ws { ip 172.16.30.44 }\nhost ad_dc   { ip 172.16.1.10 }\n\ncompile {\n    jump_ws -> ad_dc tcp syn srcport 52389 dstport 389 win 65535 mss 1460 wait 1ms\n    jump_ws <- ad_dc tcp syn ack win 65535 mss 1460 wait 1ms\n    jump_ws -> ad_dc tcp ack wait 1ms\n    // 1. Failed Simple Bind -> resultcode 49 (invalidCredentials)\n    jump_ws -> ad_dc ldap bindreq msgid 1 basedn \"cn=backup_ro,dc=corp,dc=internal\" wait 2ms\n    jump_ws <- ad_dc ldap bindres msgid 1 resultcode 49 wait 5ms\n    // 2. Successful Bind -> Search privileged accounts -> Unbind\n    jump_ws -> ad_dc ldap bindreq msgid 2 basedn \"cn=backup_ro,dc=corp,dc=internal\" wait 2ms\n    jump_ws <- ad_dc ldap bindres msgid 2 resultcode 0 wait 2ms\n    jump_ws -> ad_dc ldap searchreq msgid 3 basedn \"dc=corp,dc=internal\" filter \"(adminCount=1)\" wait 3ms\n    jump_ws <- ad_dc ldap searchentry msgid 3 basedn \"cn=Domain Admins,cn=Users,dc=corp,dc=internal\" wait 1ms\n    jump_ws <- ad_dc ldap searchdone msgid 3 resultcode 0 wait 2ms\n    jump_ws -> ad_dc ldap unbindreq msgid 4\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"LDAPv3 (`ldap`): AD Bind Failure (`49`), Authorized Bind, Privileged Group Search & Unbind\" (ldap_ad_search_audit.frasm). Scenario: Captures a rejected bind (`resultcode 49`), a successful bind (`resultcode 0`), an `(adminCount=1)` privileged-account search returning an entry + `searchdone`, and a clean `unbindreq`. Verify with Wireshark filter `ldap`."},{"role":"assistant","content":"Defaults to TCP destination port `389` (`psh ack`) and wraps every operation in an ASN.1 BER `SEQUENCE` (`0x30`) with exact definite-length tags. Encodes RFC 4511 protocolOp tags (`0x60` BindRequest, `0x61` BindResponse, `0x63` SearchRequest, `0x64` SearchResultEntry, `0x65` SearchResultDone, `0x42` UnbindRequest). Compile with `frameassembly show ldap_ad_search_audit.frasm`.\n\n```frameassembly\nhost jump_ws { ip 172.16.30.44 }\nhost ad_dc   { ip 172.16.1.10 }\n\ncompile {\n    jump_ws -> ad_dc tcp syn srcport 52389 dstport 389 win 65535 mss 1460 wait 1ms\n    jump_ws <- ad_dc tcp syn ack win 65535 mss 1460 wait 1ms\n    jump_ws -> ad_dc tcp ack wait 1ms\n    // 1. Failed Simple Bind -> resultcode 49 (invalidCredentials)\n    jump_ws -> ad_dc ldap bindreq msgid 1 basedn \"cn=backup_ro,dc=corp,dc=internal\" wait 2ms\n    jump_ws <- ad_dc ldap bindres msgid 1 resultcode 49 wait 5ms\n    // 2. Successful Bind -> Search privileged accounts -> Unbind\n    jump_ws -> ad_dc ldap bindreq msgid 2 basedn \"cn=backup_ro,dc=corp,dc=internal\" wait 2ms\n    jump_ws <- ad_dc ldap bindres msgid 2 resultcode 0 wait 2ms\n    jump_ws -> ad_dc ldap searchreq msgid 3 basedn \"dc=corp,dc=internal\" filter \"(adminCount=1)\" wait 3ms\n    jump_ws <- ad_dc ldap searchentry msgid 3 basedn \"cn=Domain Admins,cn=Users,dc=corp,dc=internal\" wait 1ms\n    jump_ws <- ad_dc ldap searchdone msgid 3 resultcode 0 wait 2ms\n    jump_ws -> ad_dc ldap unbindreq msgid 4\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-radius","task_type":"nl_to_frasm","protocols":["radius"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"RADIUS (`radius`): MFA Challenge, VPN IP Assignment & RADIUS Accounting Start\" (radius_vpn_mfa_accounting.frasm). Scenario: Walks through a VPN gateway sending an Access-Request, handling an MFA Access-Challenge, receiving an Access-Accept with an assigned client IP, and logging an Accounting-Request on UDP 1813. Verify with Wireshark filter `radius`.","completion":"Picks UDP destination port `1812` for `accessrequest`, `accessaccept`, `accessreject`, and `accesschallenge`, or UDP `1813` for `accountingrequest` and `accountingresponse`. Calculates the exact 16-bit RADIUS Length across the 20-byte header and all included AVP attributes, and reverses UDP ports automatically on `<-` replies. Compile with `frameassembly show radius_vpn_mfa_accounting.frasm`.\n\n```frameassembly\nhost vpn_gw    { ip 172.16.1.5 }\nhost radius_01 { ip 172.16.10.20 }\n\ncompile {\n    // 1. Initial VPN login + MFA Access-Challenge on UDP 1812\n    vpn_gw -> radius_01 radius accessrequest id 10 user \"oncall.netops\" nasip 172.16.1.5 servicetype 2 wait 2ms\n    vpn_gw <- radius_01 radius accesschallenge id 10 wait 15ms\n    // 2. Second factor approved -> Access-Accept assigns Framed-IP 10.250.0.25\n    vpn_gw -> radius_01 radius accessrequest id 11 user \"oncall.netops\" nasip 172.16.1.5 servicetype 2 wait 2ms\n    vpn_gw <- radius_01 radius accessaccept id 11 framedip 10.250.0.25 wait 5ms\n    // 3. Session accounting record on UDP 1813\n    vpn_gw -> radius_01 radius accountingrequest id 12 user \"oncall.netops\" nasip 172.16.1.5 framedip 10.250.0.25 wait 2ms\n    vpn_gw <- radius_01 radius accountingresponse id 12\n}\n```","frasm_code":"host vpn_gw    { ip 172.16.1.5 }\nhost radius_01 { ip 172.16.10.20 }\n\ncompile {\n    // 1. Initial VPN login + MFA Access-Challenge on UDP 1812\n    vpn_gw -> radius_01 radius accessrequest id 10 user \"oncall.netops\" nasip 172.16.1.5 servicetype 2 wait 2ms\n    vpn_gw <- radius_01 radius accesschallenge id 10 wait 15ms\n    // 2. Second factor approved -> Access-Accept assigns Framed-IP 10.250.0.25\n    vpn_gw -> radius_01 radius accessrequest id 11 user \"oncall.netops\" nasip 172.16.1.5 servicetype 2 wait 2ms\n    vpn_gw <- radius_01 radius accessaccept id 11 framedip 10.250.0.25 wait 5ms\n    // 3. Session accounting record on UDP 1813\n    vpn_gw -> radius_01 radius accountingrequest id 12 user \"oncall.netops\" nasip 172.16.1.5 framedip 10.250.0.25 wait 2ms\n    vpn_gw <- radius_01 radius accountingresponse id 12\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"RADIUS (`radius`): MFA Challenge, VPN IP Assignment & RADIUS Accounting Start\" (radius_vpn_mfa_accounting.frasm). Scenario: Walks through a VPN gateway sending an Access-Request, handling an MFA Access-Challenge, receiving an Access-Accept with an assigned client IP, and logging an Accounting-Request on UDP 1813. Verify with Wireshark filter `radius`."},{"role":"assistant","content":"Picks UDP destination port `1812` for `accessrequest`, `accessaccept`, `accessreject`, and `accesschallenge`, or UDP `1813` for `accountingrequest` and `accountingresponse`. Calculates the exact 16-bit RADIUS Length across the 20-byte header and all included AVP attributes, and reverses UDP ports automatically on `<-` replies. Compile with `frameassembly show radius_vpn_mfa_accounting.frasm`.\n\n```frameassembly\nhost vpn_gw    { ip 172.16.1.5 }\nhost radius_01 { ip 172.16.10.20 }\n\ncompile {\n    // 1. Initial VPN login + MFA Access-Challenge on UDP 1812\n    vpn_gw -> radius_01 radius accessrequest id 10 user \"oncall.netops\" nasip 172.16.1.5 servicetype 2 wait 2ms\n    vpn_gw <- radius_01 radius accesschallenge id 10 wait 15ms\n    // 2. Second factor approved -> Access-Accept assigns Framed-IP 10.250.0.25\n    vpn_gw -> radius_01 radius accessrequest id 11 user \"oncall.netops\" nasip 172.16.1.5 servicetype 2 wait 2ms\n    vpn_gw <- radius_01 radius accessaccept id 11 framedip 10.250.0.25 wait 5ms\n    // 3. Session accounting record on UDP 1813\n    vpn_gw -> radius_01 radius accountingrequest id 12 user \"oncall.netops\" nasip 172.16.1.5 framedip 10.250.0.25 wait 2ms\n    vpn_gw <- radius_01 radius accountingresponse id 12\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-tacacs","task_type":"nl_to_frasm","protocols":["tacacs","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"TACACS+ (`tacacs`): Full TCP 49 Handshake + TACACS+ Admin Login & Command Accounting\" (tacacs_admin_session.frasm). Scenario: Opens a TCP port 49 session from a spine router to a TACACS+ server, completes an authentication prompt/reply pair, and sends a command accounting record. Verify with Wireshark filter `tacplus`.","completion":"Defaults to TCP destination port `49` (`psh ack`), TACACS+ version `0xc0`, and calculates the 32-bit payload `length` field automatically. Treats `seq` (`0..255`) on a `tacacs` line as the 1-byte TACACS+ `seq_no` (`1` client start, `2` server reply, `3` client continue) without breaking the outer 32-bit TCP sequence number. Compile with `frameassembly show tacacs_admin_session.frasm`.\n\n```frameassembly\nhost spine_rtr  { ip 172.20.0.1 }\nhost tacacs_aaa { ip 172.20.0.49 }\n\ncompile {\n    // 1. TCP 3-way handshake on port 49\n    spine_rtr -> tacacs_aaa tcp syn srcport 51049 dstport 49 win 65535 mss 1460 wait 1ms\n    spine_rtr <- tacacs_aaa tcp syn ack win 65535 mss 1460 wait 1ms\n    spine_rtr -> tacacs_aaa tcp ack wait 1ms\n    // 2. TACACS+ Authentication conversation (odd seq = router, even seq = server)\n    spine_rtr -> tacacs_aaa tacacs authen seq 1 flags 1 sessionid 0x44001122 user \"secops\" data \"vty0\" wait 2ms\n    spine_rtr <- tacacs_aaa tacacs authen seq 2 flags 1 sessionid 0x44001122 data \"Password: \" wait 5ms\n    spine_rtr -> tacacs_aaa tacacs authen seq 3 flags 1 sessionid 0x44001122 user \"secops\" data \"LabPass!\" wait 2ms\n    // 3. Command authorization & accounting\n    spine_rtr -> tacacs_aaa tacacs author seq 1 flags 1 sessionid 0x44001123 user \"secops\" data \"cmd=configure\" wait 2ms\n    spine_rtr -> tacacs_aaa tacacs acct seq 1 flags 1 sessionid 0x44001124 user \"secops\" data \"task_id=42\"\n}\n```","frasm_code":"host spine_rtr  { ip 172.20.0.1 }\nhost tacacs_aaa { ip 172.20.0.49 }\n\ncompile {\n    // 1. TCP 3-way handshake on port 49\n    spine_rtr -> tacacs_aaa tcp syn srcport 51049 dstport 49 win 65535 mss 1460 wait 1ms\n    spine_rtr <- tacacs_aaa tcp syn ack win 65535 mss 1460 wait 1ms\n    spine_rtr -> tacacs_aaa tcp ack wait 1ms\n    // 2. TACACS+ Authentication conversation (odd seq = router, even seq = server)\n    spine_rtr -> tacacs_aaa tacacs authen seq 1 flags 1 sessionid 0x44001122 user \"secops\" data \"vty0\" wait 2ms\n    spine_rtr <- tacacs_aaa tacacs authen seq 2 flags 1 sessionid 0x44001122 data \"Password: \" wait 5ms\n    spine_rtr -> tacacs_aaa tacacs authen seq 3 flags 1 sessionid 0x44001122 user \"secops\" data \"LabPass!\" wait 2ms\n    // 3. Command authorization & accounting\n    spine_rtr -> tacacs_aaa tacacs author seq 1 flags 1 sessionid 0x44001123 user \"secops\" data \"cmd=configure\" wait 2ms\n    spine_rtr -> tacacs_aaa tacacs acct seq 1 flags 1 sessionid 0x44001124 user \"secops\" data \"task_id=42\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"TACACS+ (`tacacs`): Full TCP 49 Handshake + TACACS+ Admin Login & Command Accounting\" (tacacs_admin_session.frasm). Scenario: Opens a TCP port 49 session from a spine router to a TACACS+ server, completes an authentication prompt/reply pair, and sends a command accounting record. Verify with Wireshark filter `tacplus`."},{"role":"assistant","content":"Defaults to TCP destination port `49` (`psh ack`), TACACS+ version `0xc0`, and calculates the 32-bit payload `length` field automatically. Treats `seq` (`0..255`) on a `tacacs` line as the 1-byte TACACS+ `seq_no` (`1` client start, `2` server reply, `3` client continue) without breaking the outer 32-bit TCP sequence number. Compile with `frameassembly show tacacs_admin_session.frasm`.\n\n```frameassembly\nhost spine_rtr  { ip 172.20.0.1 }\nhost tacacs_aaa { ip 172.20.0.49 }\n\ncompile {\n    // 1. TCP 3-way handshake on port 49\n    spine_rtr -> tacacs_aaa tcp syn srcport 51049 dstport 49 win 65535 mss 1460 wait 1ms\n    spine_rtr <- tacacs_aaa tcp syn ack win 65535 mss 1460 wait 1ms\n    spine_rtr -> tacacs_aaa tcp ack wait 1ms\n    // 2. TACACS+ Authentication conversation (odd seq = router, even seq = server)\n    spine_rtr -> tacacs_aaa tacacs authen seq 1 flags 1 sessionid 0x44001122 user \"secops\" data \"vty0\" wait 2ms\n    spine_rtr <- tacacs_aaa tacacs authen seq 2 flags 1 sessionid 0x44001122 data \"Password: \" wait 5ms\n    spine_rtr -> tacacs_aaa tacacs authen seq 3 flags 1 sessionid 0x44001122 user \"secops\" data \"LabPass!\" wait 2ms\n    // 3. Command authorization & accounting\n    spine_rtr -> tacacs_aaa tacacs author seq 1 flags 1 sessionid 0x44001123 user \"secops\" data \"cmd=configure\" wait 2ms\n    spine_rtr -> tacacs_aaa tacacs acct seq 1 flags 1 sessionid 0x44001124 user \"secops\" data \"task_id=42\"\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-smb","task_type":"nl_to_frasm","protocols":["smb","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SMB2 / SMB3 (`smb`): SMB2 Login Failure (`0xc000006d`) + Administrative `ADMIN$` Named-Pipe Access\" (smb_lateral_movement_lab.frasm). Scenario: Completes TCP 445 setup, captures a failed `sessionsetup`, then connects to `\\\\srv01\\ADMIN$` and opens a remote file handle (`create` + `read` + `close`). Verify with Wireshark filter `smb2`.","completion":"Defaults to TCP destination port `445` (`psh ack`) and prepends the 4-byte big-endian NetBIOS Session length header (`0x00` + 24-bit size). Builds the full 64-byte `þSMB` header (`StructureSize = 64`, `Command`, `NTSTATUS`, `MessageId`, `TreeId`, `SessionId`) and sets the Server-to-Client flag on `<-` replies. Compile with `frameassembly show smb_lateral_movement_lab.frasm`.\n\n```frameassembly\nhost admin_pc { ip 172.16.20.55 }\nhost srv_01   { ip 172.16.10.45 }\n\ncompile {\n    admin_pc -> srv_01 tcp syn srcport 52445 dstport 445 win 65535 mss 1460 wait 1ms\n    admin_pc <- srv_01 tcp syn ack win 65535 mss 1460 wait 1ms\n    admin_pc -> srv_01 tcp ack wait 1ms\n    // 1. SMB2 Negotiate + Failed SessionSetup (STATUS_LOGON_FAILURE = 0xc000006d)\n    admin_pc -> srv_01 smb negotiate msgid 0 wait 1ms\n    admin_pc <- srv_01 smb negotiate msgid 0 status 0 wait 1ms\n    admin_pc -> srv_01 smb sessionsetup msgid 1 wait 2ms\n    admin_pc <- srv_01 smb sessionsetup msgid 1 status 0xc000006d wait 5ms\n    // 2. Successful SessionSetup + ADMIN$ TreeConnect + Create/Read/Close\n    admin_pc -> srv_01 smb sessionsetup msgid 2 sessionid 0x400001 wait 1ms\n    admin_pc <- srv_01 smb sessionsetup msgid 2 sessionid 0x400001 status 0 wait 1ms\n    admin_pc -> srv_01 smb treeconnect msgid 3 sessionid 0x400001 share \"\\\\\\\\srv_01\\\\ADMIN$\" wait 2ms\n    admin_pc <- srv_01 smb treeconnect msgid 3 sessionid 0x400001 treeid 1 status 0 wait 1ms\n    admin_pc -> srv_01 smb create msgid 4 sessionid 0x400001 treeid 1 filename \"System32\\\\drivers\\\\etc\\\\hosts\" wait 2ms\n    admin_pc <- srv_01 smb create msgid 4 sessionid 0x400001 treeid 1 status 0 wait 1ms\n    admin_pc -> srv_01 smb treedisconnect msgid 5 sessionid 0x400001 treeid 1\n}\n```","frasm_code":"host admin_pc { ip 172.16.20.55 }\nhost srv_01   { ip 172.16.10.45 }\n\ncompile {\n    admin_pc -> srv_01 tcp syn srcport 52445 dstport 445 win 65535 mss 1460 wait 1ms\n    admin_pc <- srv_01 tcp syn ack win 65535 mss 1460 wait 1ms\n    admin_pc -> srv_01 tcp ack wait 1ms\n    // 1. SMB2 Negotiate + Failed SessionSetup (STATUS_LOGON_FAILURE = 0xc000006d)\n    admin_pc -> srv_01 smb negotiate msgid 0 wait 1ms\n    admin_pc <- srv_01 smb negotiate msgid 0 status 0 wait 1ms\n    admin_pc -> srv_01 smb sessionsetup msgid 1 wait 2ms\n    admin_pc <- srv_01 smb sessionsetup msgid 1 status 0xc000006d wait 5ms\n    // 2. Successful SessionSetup + ADMIN$ TreeConnect + Create/Read/Close\n    admin_pc -> srv_01 smb sessionsetup msgid 2 sessionid 0x400001 wait 1ms\n    admin_pc <- srv_01 smb sessionsetup msgid 2 sessionid 0x400001 status 0 wait 1ms\n    admin_pc -> srv_01 smb treeconnect msgid 3 sessionid 0x400001 share \"\\\\\\\\srv_01\\\\ADMIN$\" wait 2ms\n    admin_pc <- srv_01 smb treeconnect msgid 3 sessionid 0x400001 treeid 1 status 0 wait 1ms\n    admin_pc -> srv_01 smb create msgid 4 sessionid 0x400001 treeid 1 filename \"System32\\\\drivers\\\\etc\\\\hosts\" wait 2ms\n    admin_pc <- srv_01 smb create msgid 4 sessionid 0x400001 treeid 1 status 0 wait 1ms\n    admin_pc -> srv_01 smb treedisconnect msgid 5 sessionid 0x400001 treeid 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SMB2 / SMB3 (`smb`): SMB2 Login Failure (`0xc000006d`) + Administrative `ADMIN$` Named-Pipe Access\" (smb_lateral_movement_lab.frasm). Scenario: Completes TCP 445 setup, captures a failed `sessionsetup`, then connects to `\\\\srv01\\ADMIN$` and opens a remote file handle (`create` + `read` + `close`). Verify with Wireshark filter `smb2`."},{"role":"assistant","content":"Defaults to TCP destination port `445` (`psh ack`) and prepends the 4-byte big-endian NetBIOS Session length header (`0x00` + 24-bit size). Builds the full 64-byte `þSMB` header (`StructureSize = 64`, `Command`, `NTSTATUS`, `MessageId`, `TreeId`, `SessionId`) and sets the Server-to-Client flag on `<-` replies. Compile with `frameassembly show smb_lateral_movement_lab.frasm`.\n\n```frameassembly\nhost admin_pc { ip 172.16.20.55 }\nhost srv_01   { ip 172.16.10.45 }\n\ncompile {\n    admin_pc -> srv_01 tcp syn srcport 52445 dstport 445 win 65535 mss 1460 wait 1ms\n    admin_pc <- srv_01 tcp syn ack win 65535 mss 1460 wait 1ms\n    admin_pc -> srv_01 tcp ack wait 1ms\n    // 1. SMB2 Negotiate + Failed SessionSetup (STATUS_LOGON_FAILURE = 0xc000006d)\n    admin_pc -> srv_01 smb negotiate msgid 0 wait 1ms\n    admin_pc <- srv_01 smb negotiate msgid 0 status 0 wait 1ms\n    admin_pc -> srv_01 smb sessionsetup msgid 1 wait 2ms\n    admin_pc <- srv_01 smb sessionsetup msgid 1 status 0xc000006d wait 5ms\n    // 2. Successful SessionSetup + ADMIN$ TreeConnect + Create/Read/Close\n    admin_pc -> srv_01 smb sessionsetup msgid 2 sessionid 0x400001 wait 1ms\n    admin_pc <- srv_01 smb sessionsetup msgid 2 sessionid 0x400001 status 0 wait 1ms\n    admin_pc -> srv_01 smb treeconnect msgid 3 sessionid 0x400001 share \"\\\\\\\\srv_01\\\\ADMIN$\" wait 2ms\n    admin_pc <- srv_01 smb treeconnect msgid 3 sessionid 0x400001 treeid 1 status 0 wait 1ms\n    admin_pc -> srv_01 smb create msgid 4 sessionid 0x400001 treeid 1 filename \"System32\\\\drivers\\\\etc\\\\hosts\" wait 2ms\n    admin_pc <- srv_01 smb create msgid 4 sessionid 0x400001 treeid 1 status 0 wait 1ms\n    admin_pc -> srv_01 smb treedisconnect msgid 5 sessionid 0x400001 treeid 1\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-nfs","task_type":"nl_to_frasm","protocols":["nfs","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"NFSv3 / v4 (`nfs`): NFSv4 TCP 2049 Export Lookup + Legacy NFSv3 UDP Probe\" (nfs_storage_audit.frasm). Scenario: Opens TCP port 2049 from a privileged source port (`srcport 850`) to mount `/exports/backups`, then tests a legacy NFSv3 `NULL` ping over UDP 2049. Verify with Wireshark filter `nfs || rpc`.","completion":"Defaults to TCP destination port `2049` (`vers 4`, RPC Program `100003`) and prepends the 4-byte ONC RPC Record Marking header (`0x80000000 | length`) over TCP (omitting it cleanly when `transport udp` is selected). Aligns `tag` and `path` UTF-8 strings to 4-byte XDR boundaries per RFC 4506. Compile with `frameassembly show nfs_storage_audit.frasm`.\n\n```frameassembly\nhost worker_01 { ip 172.16.40.25 }\nhost netapp_01 { ip 172.16.40.200 }\n\ncompile {\n    // 1. Stateful NFSv4 COMPOUND over TCP 2049 from privileged port 850 (< 1024)\n    worker_01 -> netapp_01 tcp syn srcport 850 dstport 2049 win 65535 mss 1460 wait 1ms\n    worker_01 <- netapp_01 tcp syn ack win 65535 mss 1460 wait 1ms\n    worker_01 -> netapp_01 tcp ack wait 1ms\n    worker_01 -> netapp_01 nfs vers 4 compound xid 0x7001 tag \"mount-backups\" path \"/exports/backups\" wait 3ms\n    // 2. Legacy NFSv3 NULL RPC check over UDP 2049\n    worker_01 -> netapp_01 nfs vers 3 proc \"NULL\" xid 0x7002 transport udp\n}\n```","frasm_code":"host worker_01 { ip 172.16.40.25 }\nhost netapp_01 { ip 172.16.40.200 }\n\ncompile {\n    // 1. Stateful NFSv4 COMPOUND over TCP 2049 from privileged port 850 (< 1024)\n    worker_01 -> netapp_01 tcp syn srcport 850 dstport 2049 win 65535 mss 1460 wait 1ms\n    worker_01 <- netapp_01 tcp syn ack win 65535 mss 1460 wait 1ms\n    worker_01 -> netapp_01 tcp ack wait 1ms\n    worker_01 -> netapp_01 nfs vers 4 compound xid 0x7001 tag \"mount-backups\" path \"/exports/backups\" wait 3ms\n    // 2. Legacy NFSv3 NULL RPC check over UDP 2049\n    worker_01 -> netapp_01 nfs vers 3 proc \"NULL\" xid 0x7002 transport udp\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"NFSv3 / v4 (`nfs`): NFSv4 TCP 2049 Export Lookup + Legacy NFSv3 UDP Probe\" (nfs_storage_audit.frasm). Scenario: Opens TCP port 2049 from a privileged source port (`srcport 850`) to mount `/exports/backups`, then tests a legacy NFSv3 `NULL` ping over UDP 2049. Verify with Wireshark filter `nfs || rpc`."},{"role":"assistant","content":"Defaults to TCP destination port `2049` (`vers 4`, RPC Program `100003`) and prepends the 4-byte ONC RPC Record Marking header (`0x80000000 | length`) over TCP (omitting it cleanly when `transport udp` is selected). Aligns `tag` and `path` UTF-8 strings to 4-byte XDR boundaries per RFC 4506. Compile with `frameassembly show nfs_storage_audit.frasm`.\n\n```frameassembly\nhost worker_01 { ip 172.16.40.25 }\nhost netapp_01 { ip 172.16.40.200 }\n\ncompile {\n    // 1. Stateful NFSv4 COMPOUND over TCP 2049 from privileged port 850 (< 1024)\n    worker_01 -> netapp_01 tcp syn srcport 850 dstport 2049 win 65535 mss 1460 wait 1ms\n    worker_01 <- netapp_01 tcp syn ack win 65535 mss 1460 wait 1ms\n    worker_01 -> netapp_01 tcp ack wait 1ms\n    worker_01 -> netapp_01 nfs vers 4 compound xid 0x7001 tag \"mount-backups\" path \"/exports/backups\" wait 3ms\n    // 2. Legacy NFSv3 NULL RPC check over UDP 2049\n    worker_01 -> netapp_01 nfs vers 3 proc \"NULL\" xid 0x7002 transport udp\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-ssh","task_type":"nl_to_frasm","protocols":["ssh","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SSH-2 (`ssh`): Complete SSH-2 Banner Exchange, KEXINIT Negotiation & NEWKEYS Cutover\" (ssh_handshake_audit.frasm). Scenario: Establishes a TCP 22 session between an admin workstation and a Linux server, exchanges version banners, negotiates keys via `kexinit`, activates encryption with `newkeys`, and sends encrypted session data. Verify with Wireshark filter `ssh`.","completion":"Defaults to TCP destination port `22` (`psh ack`) and appends standard RFC 4253 `\r\n` terminators to `banner` strings. Computes RFC 4253 binary packet framing (`4-byte packet_length`, `1-byte padding_length`, payload, and 8-byte block padding) automatically on `kexinit`, `newkeys`, and `msgcode` packets. Compile with `frameassembly show ssh_handshake_audit.frasm`.\n\n```frameassembly\nhost admin_ws  { ip 172.16.99.10 }\nhost linux_srv { ip 172.16.10.22 }\n\ncompile {\n    admin_ws -> linux_srv tcp syn srcport 53220 dstport 22 win 65535 mss 1460 wait 1ms\n    admin_ws <- linux_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    admin_ws -> linux_srv tcp ack wait 1ms\n    // 1. Cleartext RFC 4253 §4.2 protocol version exchange\n    admin_ws -> linux_srv ssh banner \"SSH-2.0-OpenSSH_9.7p1\" wait 1ms\n    admin_ws <- linux_srv ssh banner \"SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13\" wait 2ms\n    // 2. Binary KEXINIT (msgcode 20) + NEWKEYS (msgcode 21)\n    admin_ws -> linux_srv ssh kexinit cookie \"0102030405060708\" wait 1ms\n    admin_ws <- linux_srv ssh kexinit cookie \"aabbccddeeff0011\" wait 2ms\n    admin_ws -> linux_srv ssh newkeys wait 1ms\n    admin_ws <- linux_srv ssh newkeys\n}\n```","frasm_code":"host admin_ws  { ip 172.16.99.10 }\nhost linux_srv { ip 172.16.10.22 }\n\ncompile {\n    admin_ws -> linux_srv tcp syn srcport 53220 dstport 22 win 65535 mss 1460 wait 1ms\n    admin_ws <- linux_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    admin_ws -> linux_srv tcp ack wait 1ms\n    // 1. Cleartext RFC 4253 §4.2 protocol version exchange\n    admin_ws -> linux_srv ssh banner \"SSH-2.0-OpenSSH_9.7p1\" wait 1ms\n    admin_ws <- linux_srv ssh banner \"SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13\" wait 2ms\n    // 2. Binary KEXINIT (msgcode 20) + NEWKEYS (msgcode 21)\n    admin_ws -> linux_srv ssh kexinit cookie \"0102030405060708\" wait 1ms\n    admin_ws <- linux_srv ssh kexinit cookie \"aabbccddeeff0011\" wait 2ms\n    admin_ws -> linux_srv ssh newkeys wait 1ms\n    admin_ws <- linux_srv ssh newkeys\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SSH-2 (`ssh`): Complete SSH-2 Banner Exchange, KEXINIT Negotiation & NEWKEYS Cutover\" (ssh_handshake_audit.frasm). Scenario: Establishes a TCP 22 session between an admin workstation and a Linux server, exchanges version banners, negotiates keys via `kexinit`, activates encryption with `newkeys`, and sends encrypted session data. Verify with Wireshark filter `ssh`."},{"role":"assistant","content":"Defaults to TCP destination port `22` (`psh ack`) and appends standard RFC 4253 `\r\n` terminators to `banner` strings. Computes RFC 4253 binary packet framing (`4-byte packet_length`, `1-byte padding_length`, payload, and 8-byte block padding) automatically on `kexinit`, `newkeys`, and `msgcode` packets. Compile with `frameassembly show ssh_handshake_audit.frasm`.\n\n```frameassembly\nhost admin_ws  { ip 172.16.99.10 }\nhost linux_srv { ip 172.16.10.22 }\n\ncompile {\n    admin_ws -> linux_srv tcp syn srcport 53220 dstport 22 win 65535 mss 1460 wait 1ms\n    admin_ws <- linux_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    admin_ws -> linux_srv tcp ack wait 1ms\n    // 1. Cleartext RFC 4253 §4.2 protocol version exchange\n    admin_ws -> linux_srv ssh banner \"SSH-2.0-OpenSSH_9.7p1\" wait 1ms\n    admin_ws <- linux_srv ssh banner \"SSH-2.0-OpenSSH_9.6p1 Ubuntu-3ubuntu13\" wait 2ms\n    // 2. Binary KEXINIT (msgcode 20) + NEWKEYS (msgcode 21)\n    admin_ws -> linux_srv ssh kexinit cookie \"0102030405060708\" wait 1ms\n    admin_ws <- linux_srv ssh kexinit cookie \"aabbccddeeff0011\" wait 2ms\n    admin_ws -> linux_srv ssh newkeys wait 1ms\n    admin_ws <- linux_srv ssh newkeys\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-telnet","task_type":"nl_to_frasm","protocols":["telnet","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Telnet (`telnet`): Legacy OT RTU Telnet Login Detection Scenario\" (telnet_cleartext_audit.frasm). Scenario: Models a TCP 23 connection to a legacy serial-to-Ethernet terminal server, negotiating Echo/Suppress-Go-Ahead options and sending a `show running-config` command. Verify with Wireshark filter `telnet`.","completion":"Defaults to TCP destination port `23` (`psh ack`) and tracks TCP sequence numbers automatically. Prefixes every `will` (`251`), `wont` (`252`), `do` (`253`), and `dont` (`254`) option with the `0xff` IAC escape byte. Compile with `frameassembly show telnet_cleartext_audit.frasm`.\n\n```frameassembly\nhost eng_laptop { ip 192.168.50.15 }\nhost rtu_gw     { ip 192.168.50.200 }\n\ncompile {\n    eng_laptop -> rtu_gw tcp syn srcport 50123 dstport 23 win 65535 mss 1460 wait 1ms\n    eng_laptop <- rtu_gw tcp syn ack win 65535 mss 1460 wait 1ms\n    eng_laptop -> rtu_gw tcp ack wait 1ms\n    eng_laptop <- rtu_gw telnet will 1 do 24 wait 2ms\n    eng_laptop <- rtu_gw telnet will 3 data \"RTU-GW01 login: \" wait 5ms\n    eng_laptop -> rtu_gw telnet do 1 wont 24 wait 2ms\n    eng_laptop -> rtu_gw telnet do 3 data \"maint\\r\\n\" wait 3ms\n    eng_laptop <- rtu_gw telnet data \"Password: \" wait 5ms\n    eng_laptop -> rtu_gw telnet data \"show version\\r\\n\"\n}\n```","frasm_code":"host eng_laptop { ip 192.168.50.15 }\nhost rtu_gw     { ip 192.168.50.200 }\n\ncompile {\n    eng_laptop -> rtu_gw tcp syn srcport 50123 dstport 23 win 65535 mss 1460 wait 1ms\n    eng_laptop <- rtu_gw tcp syn ack win 65535 mss 1460 wait 1ms\n    eng_laptop -> rtu_gw tcp ack wait 1ms\n    eng_laptop <- rtu_gw telnet will 1 do 24 wait 2ms\n    eng_laptop <- rtu_gw telnet will 3 data \"RTU-GW01 login: \" wait 5ms\n    eng_laptop -> rtu_gw telnet do 1 wont 24 wait 2ms\n    eng_laptop -> rtu_gw telnet do 3 data \"maint\\r\\n\" wait 3ms\n    eng_laptop <- rtu_gw telnet data \"Password: \" wait 5ms\n    eng_laptop -> rtu_gw telnet data \"show version\\r\\n\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Telnet (`telnet`): Legacy OT RTU Telnet Login Detection Scenario\" (telnet_cleartext_audit.frasm). Scenario: Models a TCP 23 connection to a legacy serial-to-Ethernet terminal server, negotiating Echo/Suppress-Go-Ahead options and sending a `show running-config` command. Verify with Wireshark filter `telnet`."},{"role":"assistant","content":"Defaults to TCP destination port `23` (`psh ack`) and tracks TCP sequence numbers automatically. Prefixes every `will` (`251`), `wont` (`252`), `do` (`253`), and `dont` (`254`) option with the `0xff` IAC escape byte. Compile with `frameassembly show telnet_cleartext_audit.frasm`.\n\n```frameassembly\nhost eng_laptop { ip 192.168.50.15 }\nhost rtu_gw     { ip 192.168.50.200 }\n\ncompile {\n    eng_laptop -> rtu_gw tcp syn srcport 50123 dstport 23 win 65535 mss 1460 wait 1ms\n    eng_laptop <- rtu_gw tcp syn ack win 65535 mss 1460 wait 1ms\n    eng_laptop -> rtu_gw tcp ack wait 1ms\n    eng_laptop <- rtu_gw telnet will 1 do 24 wait 2ms\n    eng_laptop <- rtu_gw telnet will 3 data \"RTU-GW01 login: \" wait 5ms\n    eng_laptop -> rtu_gw telnet do 1 wont 24 wait 2ms\n    eng_laptop -> rtu_gw telnet do 3 data \"maint\\r\\n\" wait 3ms\n    eng_laptop <- rtu_gw telnet data \"Password: \" wait 5ms\n    eng_laptop -> rtu_gw telnet data \"show version\\r\\n\"\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-ftp","task_type":"nl_to_frasm","protocols":["ftp","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"FTP (`ftp`): FTP Banner, Failed Brute-Force Login (`530`) & Successful Passive Retrieval\" (ftp_login_and_pasv.frasm). Scenario: Completes a TCP 21 handshake, tests a failed `530 Login incorrect` attempt, then logs in cleanly and enters `PASV` mode to retrieve an archive. Verify with Wireshark filter `ftp`.","completion":"Defaults to TCP destination port `21` (`psh ack`) and terminates every command or reply with standard `\r\n` CRLF. Formats `<code_num> <reply>\r\n` automatically when `code` is provided, or `<cmd> <arg>\r\n` for client requests. Compile with `frameassembly show ftp_login_and_pasv.frasm`.\n\n```frameassembly\nhost branch_host { ip 172.16.20.35 }\nhost dmz_ftp     { ip 172.16.100.21 }\n\ncompile {\n    branch_host -> dmz_ftp tcp syn srcport 52121 dstport 21 win 65535 mss 1460 wait 1ms\n    branch_host <- dmz_ftp tcp syn ack win 65535 mss 1460 wait 1ms\n    branch_host -> dmz_ftp tcp ack wait 1ms\n    branch_host <- dmz_ftp ftp code 220 reply \"DMZ Archive FTP Ready\" wait 2ms\n    // 1. Rejected login attempt -> 530 Login incorrect\n    branch_host -> dmz_ftp ftp cmd \"USER\" arg \"admin\" wait 1ms\n    branch_host <- dmz_ftp ftp code 331 reply \"Password required for admin\" wait 2ms\n    branch_host -> dmz_ftp ftp cmd \"PASS\" arg \"wrongpass\" wait 5ms\n    branch_host <- dmz_ftp ftp code 530 reply \"Login incorrect.\" wait 5ms\n    // 2. Authorized backup user + PASV + RETR\n    branch_host -> dmz_ftp ftp cmd \"USER\" arg \"svc_backup\" wait 1ms\n    branch_host <- dmz_ftp ftp code 331 reply \"Password required\" wait 1ms\n    branch_host -> dmz_ftp ftp cmd \"PASS\" arg \"LabOnlyToken99\" wait 2ms\n    branch_host <- dmz_ftp ftp code 230 reply \"User logged in, proceed.\" wait 2ms\n    branch_host -> dmz_ftp ftp cmd \"PASV\" wait 1ms\n    branch_host <- dmz_ftp ftp code 227 reply \"Entering Passive Mode (172,16,100,21,195,80).\" wait 1ms\n    branch_host -> dmz_ftp ftp cmd \"RETR\" arg \"daily-config.tar.gz\"\n}\n```","frasm_code":"host branch_host { ip 172.16.20.35 }\nhost dmz_ftp     { ip 172.16.100.21 }\n\ncompile {\n    branch_host -> dmz_ftp tcp syn srcport 52121 dstport 21 win 65535 mss 1460 wait 1ms\n    branch_host <- dmz_ftp tcp syn ack win 65535 mss 1460 wait 1ms\n    branch_host -> dmz_ftp tcp ack wait 1ms\n    branch_host <- dmz_ftp ftp code 220 reply \"DMZ Archive FTP Ready\" wait 2ms\n    // 1. Rejected login attempt -> 530 Login incorrect\n    branch_host -> dmz_ftp ftp cmd \"USER\" arg \"admin\" wait 1ms\n    branch_host <- dmz_ftp ftp code 331 reply \"Password required for admin\" wait 2ms\n    branch_host -> dmz_ftp ftp cmd \"PASS\" arg \"wrongpass\" wait 5ms\n    branch_host <- dmz_ftp ftp code 530 reply \"Login incorrect.\" wait 5ms\n    // 2. Authorized backup user + PASV + RETR\n    branch_host -> dmz_ftp ftp cmd \"USER\" arg \"svc_backup\" wait 1ms\n    branch_host <- dmz_ftp ftp code 331 reply \"Password required\" wait 1ms\n    branch_host -> dmz_ftp ftp cmd \"PASS\" arg \"LabOnlyToken99\" wait 2ms\n    branch_host <- dmz_ftp ftp code 230 reply \"User logged in, proceed.\" wait 2ms\n    branch_host -> dmz_ftp ftp cmd \"PASV\" wait 1ms\n    branch_host <- dmz_ftp ftp code 227 reply \"Entering Passive Mode (172,16,100,21,195,80).\" wait 1ms\n    branch_host -> dmz_ftp ftp cmd \"RETR\" arg \"daily-config.tar.gz\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"FTP (`ftp`): FTP Banner, Failed Brute-Force Login (`530`) & Successful Passive Retrieval\" (ftp_login_and_pasv.frasm). Scenario: Completes a TCP 21 handshake, tests a failed `530 Login incorrect` attempt, then logs in cleanly and enters `PASV` mode to retrieve an archive. Verify with Wireshark filter `ftp`."},{"role":"assistant","content":"Defaults to TCP destination port `21` (`psh ack`) and terminates every command or reply with standard `\r\n` CRLF. Formats `<code_num> <reply>\r\n` automatically when `code` is provided, or `<cmd> <arg>\r\n` for client requests. Compile with `frameassembly show ftp_login_and_pasv.frasm`.\n\n```frameassembly\nhost branch_host { ip 172.16.20.35 }\nhost dmz_ftp     { ip 172.16.100.21 }\n\ncompile {\n    branch_host -> dmz_ftp tcp syn srcport 52121 dstport 21 win 65535 mss 1460 wait 1ms\n    branch_host <- dmz_ftp tcp syn ack win 65535 mss 1460 wait 1ms\n    branch_host -> dmz_ftp tcp ack wait 1ms\n    branch_host <- dmz_ftp ftp code 220 reply \"DMZ Archive FTP Ready\" wait 2ms\n    // 1. Rejected login attempt -> 530 Login incorrect\n    branch_host -> dmz_ftp ftp cmd \"USER\" arg \"admin\" wait 1ms\n    branch_host <- dmz_ftp ftp code 331 reply \"Password required for admin\" wait 2ms\n    branch_host -> dmz_ftp ftp cmd \"PASS\" arg \"wrongpass\" wait 5ms\n    branch_host <- dmz_ftp ftp code 530 reply \"Login incorrect.\" wait 5ms\n    // 2. Authorized backup user + PASV + RETR\n    branch_host -> dmz_ftp ftp cmd \"USER\" arg \"svc_backup\" wait 1ms\n    branch_host <- dmz_ftp ftp code 331 reply \"Password required\" wait 1ms\n    branch_host -> dmz_ftp ftp cmd \"PASS\" arg \"LabOnlyToken99\" wait 2ms\n    branch_host <- dmz_ftp ftp code 230 reply \"User logged in, proceed.\" wait 2ms\n    branch_host -> dmz_ftp ftp cmd \"PASV\" wait 1ms\n    branch_host <- dmz_ftp ftp code 227 reply \"Entering Passive Mode (172,16,100,21,195,80).\" wait 1ms\n    branch_host -> dmz_ftp ftp cmd \"RETR\" arg \"daily-config.tar.gz\"\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-tftp","task_type":"nl_to_frasm","protocols":["tftp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"TFTP (`tftp`): PXE Bootloader Download + Missing Config File Error\" (tftp_pxe_boot.frasm). Scenario: Requests `pxelinux.0` in binary `\"octet\"` mode, transfers Block 1 with TFTP `ack`, and then requests a missing board config returning RFC 1350 Error Code `1`. Verify with Wireshark filter `tftp`.","completion":"Defaults UDP destination port to `69` and writes NUL-terminated (`0x00`) `filename` and transfer `mode` (`\"octet\"` or `\"netascii\"`) strings on `rrq`/`wrq`. Encodes 2-byte big-endian Opcode + 2-byte `block` number on `data` (`3`) and `ack` (`4`) packets. Compile with `frameassembly show tftp_pxe_boot.frasm`.\n\n```frameassembly\nhost pxe_host { ip 172.16.50.101 }\nhost boot_srv { ip 172.16.50.10 }\n\ncompile {\n    // 1. Successful Read Request (RRQ) + Block 1 transfer\n    pxe_host -> boot_srv tftp rrq filename \"pxelinux.0\" mode \"octet\" wait 2ms\n    pxe_host <- boot_srv tftp data block 1 hexpayload \"7f454c46020101000000000000000000\" wait 1ms\n    pxe_host -> boot_srv tftp ack block 1 wait 4ms\n    // 2. Missing profile returns TFTP Error (Opcode 5, Error Code 1 = File not found)\n    pxe_host -> boot_srv tftp rrq filename \"pxelinux.cfg/default\" mode \"octet\" wait 2ms\n    pxe_host <- boot_srv tftp error errcode 1 errmsg \"File not found\"\n}\n```","frasm_code":"host pxe_host { ip 172.16.50.101 }\nhost boot_srv { ip 172.16.50.10 }\n\ncompile {\n    // 1. Successful Read Request (RRQ) + Block 1 transfer\n    pxe_host -> boot_srv tftp rrq filename \"pxelinux.0\" mode \"octet\" wait 2ms\n    pxe_host <- boot_srv tftp data block 1 hexpayload \"7f454c46020101000000000000000000\" wait 1ms\n    pxe_host -> boot_srv tftp ack block 1 wait 4ms\n    // 2. Missing profile returns TFTP Error (Opcode 5, Error Code 1 = File not found)\n    pxe_host -> boot_srv tftp rrq filename \"pxelinux.cfg/default\" mode \"octet\" wait 2ms\n    pxe_host <- boot_srv tftp error errcode 1 errmsg \"File not found\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"TFTP (`tftp`): PXE Bootloader Download + Missing Config File Error\" (tftp_pxe_boot.frasm). Scenario: Requests `pxelinux.0` in binary `\"octet\"` mode, transfers Block 1 with TFTP `ack`, and then requests a missing board config returning RFC 1350 Error Code `1`. Verify with Wireshark filter `tftp`."},{"role":"assistant","content":"Defaults UDP destination port to `69` and writes NUL-terminated (`0x00`) `filename` and transfer `mode` (`\"octet\"` or `\"netascii\"`) strings on `rrq`/`wrq`. Encodes 2-byte big-endian Opcode + 2-byte `block` number on `data` (`3`) and `ack` (`4`) packets. Compile with `frameassembly show tftp_pxe_boot.frasm`.\n\n```frameassembly\nhost pxe_host { ip 172.16.50.101 }\nhost boot_srv { ip 172.16.50.10 }\n\ncompile {\n    // 1. Successful Read Request (RRQ) + Block 1 transfer\n    pxe_host -> boot_srv tftp rrq filename \"pxelinux.0\" mode \"octet\" wait 2ms\n    pxe_host <- boot_srv tftp data block 1 hexpayload \"7f454c46020101000000000000000000\" wait 1ms\n    pxe_host -> boot_srv tftp ack block 1 wait 4ms\n    // 2. Missing profile returns TFTP Error (Opcode 5, Error Code 1 = File not found)\n    pxe_host -> boot_srv tftp rrq filename \"pxelinux.cfg/default\" mode \"octet\" wait 2ms\n    pxe_host <- boot_srv tftp error errcode 1 errmsg \"File not found\"\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-whois","task_type":"nl_to_frasm","protocols":["whois","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"WHOIS (`whois`): Full TCP 43 WHOIS Lookup & Clean FIN Teardown\" (whois_soc_enrichment.frasm). Scenario: Opens TCP port 43 from a SOC automation host, queries `suspicious-login.example`, receives registrar metadata, and closes the TCP session cleanly per RFC 3912. Verify with Wireshark filter `whois`.","completion":"Defaults to TCP destination port `43` (`psh ack`) and appends `\r\n` to `domain` on `query` frames. Formats standard multi-line `Domain Name: <domain>\r\nRegistrar: <registrar>\r\n` directory output on `response` frames. Compile with `frameassembly show whois_soc_enrichment.frasm`.\n\n```frameassembly\nhost soc_bot  { ip 172.16.80.12 }\nhost rir_node { ip 198.51.100.43 }\n\ncompile {\n    soc_bot -> rir_node tcp syn srcport 54043 dstport 43 win 65535 mss 1460 wait 1ms\n    soc_bot <- rir_node tcp syn ack win 65535 mss 1460 wait 1ms\n    soc_bot -> rir_node tcp ack wait 1ms\n    soc_bot -> rir_node whois query domain \"suspicious-login.example\" wait 4ms\n    soc_bot <- rir_node whois response domain \"suspicious-login.example\" registrar \"Example Registrar LLC\" wait 1ms\n    soc_bot <- rir_node tcp fin ack wait 1ms\n    soc_bot -> rir_node tcp fin ack wait 1ms\n    soc_bot <- rir_node tcp ack\n}\n```","frasm_code":"host soc_bot  { ip 172.16.80.12 }\nhost rir_node { ip 198.51.100.43 }\n\ncompile {\n    soc_bot -> rir_node tcp syn srcport 54043 dstport 43 win 65535 mss 1460 wait 1ms\n    soc_bot <- rir_node tcp syn ack win 65535 mss 1460 wait 1ms\n    soc_bot -> rir_node tcp ack wait 1ms\n    soc_bot -> rir_node whois query domain \"suspicious-login.example\" wait 4ms\n    soc_bot <- rir_node whois response domain \"suspicious-login.example\" registrar \"Example Registrar LLC\" wait 1ms\n    soc_bot <- rir_node tcp fin ack wait 1ms\n    soc_bot -> rir_node tcp fin ack wait 1ms\n    soc_bot <- rir_node tcp ack\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"WHOIS (`whois`): Full TCP 43 WHOIS Lookup & Clean FIN Teardown\" (whois_soc_enrichment.frasm). Scenario: Opens TCP port 43 from a SOC automation host, queries `suspicious-login.example`, receives registrar metadata, and closes the TCP session cleanly per RFC 3912. Verify with Wireshark filter `whois`."},{"role":"assistant","content":"Defaults to TCP destination port `43` (`psh ack`) and appends `\r\n` to `domain` on `query` frames. Formats standard multi-line `Domain Name: <domain>\r\nRegistrar: <registrar>\r\n` directory output on `response` frames. Compile with `frameassembly show whois_soc_enrichment.frasm`.\n\n```frameassembly\nhost soc_bot  { ip 172.16.80.12 }\nhost rir_node { ip 198.51.100.43 }\n\ncompile {\n    soc_bot -> rir_node tcp syn srcport 54043 dstport 43 win 65535 mss 1460 wait 1ms\n    soc_bot <- rir_node tcp syn ack win 65535 mss 1460 wait 1ms\n    soc_bot -> rir_node tcp ack wait 1ms\n    soc_bot -> rir_node whois query domain \"suspicious-login.example\" wait 4ms\n    soc_bot <- rir_node whois response domain \"suspicious-login.example\" registrar \"Example Registrar LLC\" wait 1ms\n    soc_bot <- rir_node tcp fin ack wait 1ms\n    soc_bot -> rir_node tcp fin ack wait 1ms\n    soc_bot <- rir_node tcp ack\n}\n```"}]}
{"id":"sft-cookbook-ex-voip-sip-tcp-and-rtp-call","task_type":"nl_to_frasm","protocols":["tcp","sip","rtp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SIP Trunk Call Setup over TCP 5060 + Bidirectional G.711 RTP Stream\" (voip_sip_tcp_rtp_call.frasm). Scenario: Combines SIP signaling over TCP (transport tcp, DSCP CS3 = 24) with a bidirectional 20ms G.711 mu-law RTP audio stream (DSCP EF = 46) and clean BYE teardown. Verify with Wireshark filter `sip || rtp`.","completion":"sip accepts transport tcp for enterprise SBC trunks while rtp carries 160-sample (20ms) timestamp increments. Compile with `frameassembly voip_sip_tcp_rtp_call.frasm`.\n\n```frameassembly\nhost ip_phone { ip 10.80.10.25 }\nhost sbc_gw   { ip 10.80.1.10 }\n\ncompile {\n    ip_phone -> sbc_gw tcp syn srcport 51060 dstport 5060 dscp 24 wait 1ms\n    ip_phone <- sbc_gw tcp syn ack dscp 24 wait 1ms\n    ip_phone -> sbc_gw tcp ack dscp 24 wait 1ms\n    ip_phone -> sbc_gw sip invite uri \"sip:+14155550199@sbc.corp.internal\" from \"sip:ext204@corp.internal\" to \"sip:+14155550199@sbc.corp.internal\" callid \"call-7741@10.80.10.25\" cseq 1 dscp 24 transport tcp wait 4ms\n    ip_phone <- sbc_gw sip status 200 reason \"OK\" callid \"call-7741@10.80.10.25\" cseq 1 dscp 24 transport tcp wait 10ms\n    ip_phone -> sbc_gw rtp srcport 16384 dstport 24000 pt 0 seq 100 timestamp 160 ssrc 0x11223344 marker 1 dscp 46 payload \"g711-ulaw-frame-1\" wait 20ms\n    ip_phone <- sbc_gw rtp srcport 24000 dstport 16384 pt 0 seq 500 timestamp 160 ssrc 0x99887766 marker 1 dscp 46 payload \"g711-ulaw-reply-1\" wait 20ms\n    ip_phone -> sbc_gw sip bye uri \"sip:+14155550199@sbc.corp.internal\" callid \"call-7741@10.80.10.25\" cseq 2 dscp 24 transport tcp\n}\n```","frasm_code":"host ip_phone { ip 10.80.10.25 }\nhost sbc_gw   { ip 10.80.1.10 }\n\ncompile {\n    ip_phone -> sbc_gw tcp syn srcport 51060 dstport 5060 dscp 24 wait 1ms\n    ip_phone <- sbc_gw tcp syn ack dscp 24 wait 1ms\n    ip_phone -> sbc_gw tcp ack dscp 24 wait 1ms\n    ip_phone -> sbc_gw sip invite uri \"sip:+14155550199@sbc.corp.internal\" from \"sip:ext204@corp.internal\" to \"sip:+14155550199@sbc.corp.internal\" callid \"call-7741@10.80.10.25\" cseq 1 dscp 24 transport tcp wait 4ms\n    ip_phone <- sbc_gw sip status 200 reason \"OK\" callid \"call-7741@10.80.10.25\" cseq 1 dscp 24 transport tcp wait 10ms\n    ip_phone -> sbc_gw rtp srcport 16384 dstport 24000 pt 0 seq 100 timestamp 160 ssrc 0x11223344 marker 1 dscp 46 payload \"g711-ulaw-frame-1\" wait 20ms\n    ip_phone <- sbc_gw rtp srcport 24000 dstport 16384 pt 0 seq 500 timestamp 160 ssrc 0x99887766 marker 1 dscp 46 payload \"g711-ulaw-reply-1\" wait 20ms\n    ip_phone -> sbc_gw sip bye uri \"sip:+14155550199@sbc.corp.internal\" callid \"call-7741@10.80.10.25\" cseq 2 dscp 24 transport tcp\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SIP Trunk Call Setup over TCP 5060 + Bidirectional G.711 RTP Stream\" (voip_sip_tcp_rtp_call.frasm). Scenario: Combines SIP signaling over TCP (transport tcp, DSCP CS3 = 24) with a bidirectional 20ms G.711 mu-law RTP audio stream (DSCP EF = 46) and clean BYE teardown. Verify with Wireshark filter `sip || rtp`."},{"role":"assistant","content":"sip accepts transport tcp for enterprise SBC trunks while rtp carries 160-sample (20ms) timestamp increments. Compile with `frameassembly voip_sip_tcp_rtp_call.frasm`.\n\n```frameassembly\nhost ip_phone { ip 10.80.10.25 }\nhost sbc_gw   { ip 10.80.1.10 }\n\ncompile {\n    ip_phone -> sbc_gw tcp syn srcport 51060 dstport 5060 dscp 24 wait 1ms\n    ip_phone <- sbc_gw tcp syn ack dscp 24 wait 1ms\n    ip_phone -> sbc_gw tcp ack dscp 24 wait 1ms\n    ip_phone -> sbc_gw sip invite uri \"sip:+14155550199@sbc.corp.internal\" from \"sip:ext204@corp.internal\" to \"sip:+14155550199@sbc.corp.internal\" callid \"call-7741@10.80.10.25\" cseq 1 dscp 24 transport tcp wait 4ms\n    ip_phone <- sbc_gw sip status 200 reason \"OK\" callid \"call-7741@10.80.10.25\" cseq 1 dscp 24 transport tcp wait 10ms\n    ip_phone -> sbc_gw rtp srcport 16384 dstport 24000 pt 0 seq 100 timestamp 160 ssrc 0x11223344 marker 1 dscp 46 payload \"g711-ulaw-frame-1\" wait 20ms\n    ip_phone <- sbc_gw rtp srcport 24000 dstport 16384 pt 0 seq 500 timestamp 160 ssrc 0x99887766 marker 1 dscp 46 payload \"g711-ulaw-reply-1\" wait 20ms\n    ip_phone -> sbc_gw sip bye uri \"sip:+14155550199@sbc.corp.internal\" callid \"call-7741@10.80.10.25\" cseq 2 dscp 24 transport tcp\n}\n```"}]}
{"id":"sft-cookbook-ex-telemetry-syslog-tcp-rfc5424","task_type":"nl_to_frasm","protocols":["tcp","syslog"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Reliable Syslog Forwarding over TCP Port 514 (transport tcp)\" (syslog_tcp_siem_forwarder.frasm). Scenario: Verifies TCP-based SIEM log-collector ingestion on port 514 when compliance policies forbid lossy UDP Syslog. Verify with Wireshark filter `syslog && tcp.port == 514`.","completion":"transport tcp switches syslog from UDP 514 onto stateful TCP 514. Compile with `frameassembly syslog_tcp_siem_forwarder.frasm`.\n\n```frameassembly\nhost fw_edge  { ip 10.90.1.1 }\nhost siem_ing { ip 10.90.50.20 }\n\ncompile {\n    fw_edge -> siem_ing tcp syn srcport 53514 dstport 514 win 65535 mss 1460 wait 1ms\n    fw_edge <- siem_ing tcp syn ack win 65535 mss 1460 wait 1ms\n    fw_edge -> siem_ing tcp ack wait 1ms\n    fw_edge -> siem_ing syslog facility 4 severity 2 hostname \"fw-edge-01\" app \"policy-engine\" procid \"2048\" msg \"Denied TCP 198.51.100.99:44112 -> 10.90.10.5:22\" transport tcp\n}\n```","frasm_code":"host fw_edge  { ip 10.90.1.1 }\nhost siem_ing { ip 10.90.50.20 }\n\ncompile {\n    fw_edge -> siem_ing tcp syn srcport 53514 dstport 514 win 65535 mss 1460 wait 1ms\n    fw_edge <- siem_ing tcp syn ack win 65535 mss 1460 wait 1ms\n    fw_edge -> siem_ing tcp ack wait 1ms\n    fw_edge -> siem_ing syslog facility 4 severity 2 hostname \"fw-edge-01\" app \"policy-engine\" procid \"2048\" msg \"Denied TCP 198.51.100.99:44112 -> 10.90.10.5:22\" transport tcp\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Reliable Syslog Forwarding over TCP Port 514 (transport tcp)\" (syslog_tcp_siem_forwarder.frasm). Scenario: Verifies TCP-based SIEM log-collector ingestion on port 514 when compliance policies forbid lossy UDP Syslog. Verify with Wireshark filter `syslog && tcp.port == 514`."},{"role":"assistant","content":"transport tcp switches syslog from UDP 514 onto stateful TCP 514. Compile with `frameassembly syslog_tcp_siem_forwarder.frasm`.\n\n```frameassembly\nhost fw_edge  { ip 10.90.1.1 }\nhost siem_ing { ip 10.90.50.20 }\n\ncompile {\n    fw_edge -> siem_ing tcp syn srcport 53514 dstport 514 win 65535 mss 1460 wait 1ms\n    fw_edge <- siem_ing tcp syn ack win 65535 mss 1460 wait 1ms\n    fw_edge -> siem_ing tcp ack wait 1ms\n    fw_edge -> siem_ing syslog facility 4 severity 2 hostname \"fw-edge-01\" app \"policy-engine\" procid \"2048\" msg \"Denied TCP 198.51.100.99:44112 -> 10.90.10.5:22\" transport tcp\n}\n```"}]}
{"id":"sft-cookbook-lib-snmp-v2c-linkdown","task_type":"nl_to_frasm","protocols":["snmp2"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SNMPv2c Switch Uplink linkDown Trap (UDP 162)\" (snmpv2c_linkdown_trap.frasm). Scenario: Sends a standard SNMPv2c linkDown trap on UDP port 162 carrying sysUpTime, snmpTrapOID.0, interface name Gi1/0/24, and operational state varbinds. Verify with Wireshark filter `snmp && udp.port == 162`.","completion":"No vendor MIB files are needed: 1.3.6.1.6.3.1.1.4.1.0 is snmpTrapOID.0, and oidval 1.3.6.1.6.3.1.1.5.3 identifies standard linkDown (use .5.4 for linkUp). Compile with `frameassembly snmpv2c_linkdown_trap.frasm`.\n\n```frameassembly\n// Access switch sending a Trapv2-PDU to your monitoring server\nhost access_sw { ip 10.30.2.14 }\nhost nms_srv   { ip 10.30.0.100 }\n\ncompile {\n    // SNMPv2c linkDown (.5.3) trap for uplink Gi1/0/24 (ifIndex 24, ifOperStatus 2 = down)\n    access_sw -> nms_srv snmp2 trap community \"noc-traps\" reqid 401 sysuptime 245000 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.24 string \"Gi1/0/24\" varbind 1.3.6.1.2.1.2.2.1.8.24 int 2 wait 500ms\n\n    // Recovery: SNMPv2c linkUp (.5.4) trap 500ms later (ifOperStatus 1 = up)\n    access_sw -> nms_srv snmp2 trap community \"noc-traps\" reqid 402 sysuptime 245050 varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.6.3.1.1.5.4 varbind 1.3.6.1.2.1.2.2.1.2.24 string \"Gi1/0/24\" varbind 1.3.6.1.2.1.2.2.1.8.24 int 1\n}\n```","frasm_code":"// Access switch sending a Trapv2-PDU to your monitoring server\nhost access_sw { ip 10.30.2.14 }\nhost nms_srv   { ip 10.30.0.100 }\n\ncompile {\n    // SNMPv2c linkDown (.5.3) trap for uplink Gi1/0/24 (ifIndex 24, ifOperStatus 2 = down)\n    access_sw -> nms_srv snmp2 trap community \"noc-traps\" reqid 401 sysuptime 245000 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.24 string \"Gi1/0/24\" varbind 1.3.6.1.2.1.2.2.1.8.24 int 2 wait 500ms\n\n    // Recovery: SNMPv2c linkUp (.5.4) trap 500ms later (ifOperStatus 1 = up)\n    access_sw -> nms_srv snmp2 trap community \"noc-traps\" reqid 402 sysuptime 245050 varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.6.3.1.1.5.4 varbind 1.3.6.1.2.1.2.2.1.2.24 string \"Gi1/0/24\" varbind 1.3.6.1.2.1.2.2.1.8.24 int 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SNMPv2c Switch Uplink linkDown Trap (UDP 162)\" (snmpv2c_linkdown_trap.frasm). Scenario: Sends a standard SNMPv2c linkDown trap on UDP port 162 carrying sysUpTime, snmpTrapOID.0, interface name Gi1/0/24, and operational state varbinds. Verify with Wireshark filter `snmp && udp.port == 162`."},{"role":"assistant","content":"No vendor MIB files are needed: 1.3.6.1.6.3.1.1.4.1.0 is snmpTrapOID.0, and oidval 1.3.6.1.6.3.1.1.5.3 identifies standard linkDown (use .5.4 for linkUp). Compile with `frameassembly snmpv2c_linkdown_trap.frasm`.\n\n```frameassembly\n// Access switch sending a Trapv2-PDU to your monitoring server\nhost access_sw { ip 10.30.2.14 }\nhost nms_srv   { ip 10.30.0.100 }\n\ncompile {\n    // SNMPv2c linkDown (.5.3) trap for uplink Gi1/0/24 (ifIndex 24, ifOperStatus 2 = down)\n    access_sw -> nms_srv snmp2 trap community \"noc-traps\" reqid 401 sysuptime 245000 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.24 string \"Gi1/0/24\" varbind 1.3.6.1.2.1.2.2.1.8.24 int 2 wait 500ms\n\n    // Recovery: SNMPv2c linkUp (.5.4) trap 500ms later (ifOperStatus 1 = up)\n    access_sw -> nms_srv snmp2 trap community \"noc-traps\" reqid 402 sysuptime 245050 varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.6.3.1.1.5.4 varbind 1.3.6.1.2.1.2.2.1.2.24 string \"Gi1/0/24\" varbind 1.3.6.1.2.1.2.2.1.8.24 int 1\n}\n```"}]}
{"id":"sft-cookbook-lib-snmp-v3-authpriv-trap","task_type":"nl_to_frasm","protocols":["snmp3"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Encrypted SNMPv3 authPriv Trap (SHA-256 + AES-128)\" (snmpv3_authpriv_trap.frasm). Scenario: Generates a fully authenticated and AES-128-encrypted SNMPv3 USM trap so NOC teams can verify Zabbix, PRTG, Checkmk, or snmptrapd decryption keys safely. Verify with Wireshark filter `snmp && udp.port == 162`.","completion":"Enter user \"noc-secops\", engineid \"80001f888001020304\", SHA-256 pass \"AuthPass2026!\", and AES pass \"PrivPass2026!\" in Wireshark -> Preferences -> Protocols -> SNMP -> Users Table to decrypt. Compile with `frameassembly snmpv3_authpriv_trap.frasm`.\n\n```frameassembly\n// Core distribution switch and SNMPv3 trap collector\nhost core_sw { ip 10.40.1.1 }\nhost nms_srv { ip 10.40.1.100 }\n\ncompile {\n    // Encrypted SNMPv3 USM trap (HMAC-SHA-256 auth + AES-128-CFB encryption) on UDP 162\n    // engineid must be an even-length hex string matching your snmptrapd createUser -e setting\n    core_sw -> nms_srv snmp3 trap user \"noc-secops\" engineid \"80001f888001020304\" engineboots 5 enginetime 1840 auth sha256 \"AuthPass2026!\" priv aes \"PrivPass2026!\" sysuptime 360000 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 \"TenGigE0/1/0\"\n}\n```","frasm_code":"// Core distribution switch and SNMPv3 trap collector\nhost core_sw { ip 10.40.1.1 }\nhost nms_srv { ip 10.40.1.100 }\n\ncompile {\n    // Encrypted SNMPv3 USM trap (HMAC-SHA-256 auth + AES-128-CFB encryption) on UDP 162\n    // engineid must be an even-length hex string matching your snmptrapd createUser -e setting\n    core_sw -> nms_srv snmp3 trap user \"noc-secops\" engineid \"80001f888001020304\" engineboots 5 enginetime 1840 auth sha256 \"AuthPass2026!\" priv aes \"PrivPass2026!\" sysuptime 360000 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 \"TenGigE0/1/0\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Encrypted SNMPv3 authPriv Trap (SHA-256 + AES-128)\" (snmpv3_authpriv_trap.frasm). Scenario: Generates a fully authenticated and AES-128-encrypted SNMPv3 USM trap so NOC teams can verify Zabbix, PRTG, Checkmk, or snmptrapd decryption keys safely. Verify with Wireshark filter `snmp && udp.port == 162`."},{"role":"assistant","content":"Enter user \"noc-secops\", engineid \"80001f888001020304\", SHA-256 pass \"AuthPass2026!\", and AES pass \"PrivPass2026!\" in Wireshark -> Preferences -> Protocols -> SNMP -> Users Table to decrypt. Compile with `frameassembly snmpv3_authpriv_trap.frasm`.\n\n```frameassembly\n// Core distribution switch and SNMPv3 trap collector\nhost core_sw { ip 10.40.1.1 }\nhost nms_srv { ip 10.40.1.100 }\n\ncompile {\n    // Encrypted SNMPv3 USM trap (HMAC-SHA-256 auth + AES-128-CFB encryption) on UDP 162\n    // engineid must be an even-length hex string matching your snmptrapd createUser -e setting\n    core_sw -> nms_srv snmp3 trap user \"noc-secops\" engineid \"80001f888001020304\" engineboots 5 enginetime 1840 auth sha256 \"AuthPass2026!\" priv aes \"PrivPass2026!\" sysuptime 360000 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 \"TenGigE0/1/0\"\n}\n```"}]}
{"id":"sft-cookbook-lib-snmp-v3-inform-ack","task_type":"nl_to_frasm","protocols":["snmp3"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Acknowledged SNMPv3 Inform + NMS Response\" (snmpv3_inform_ack.frasm). Scenario: Models a confirmed SNMPv3 InformRequest on UDP 162 and the matching Response-PDU returned by the NMS collector so router retry queues clear cleanly. Verify with Wireshark filter `snmp`.","completion":"Unlike fire-and-forget traps, an SNMP inform expects a response with the same reqid; use <- so the NMS reply automatically flips UDP ports (162 -> 49152). Compile with `frameassembly snmpv3_inform_ack.frasm`.\n\n```frameassembly\n// WAN edge router sending a confirmed SNMPv3 Inform to the central NMS\nhost wan_rtr { ip 172.20.0.1 }\nhost nms_srv { ip 172.20.0.50 }\n\ncompile {\n    // 1. Router sends encrypted SNMPv3 Inform (reqid 910) reporting BGP neighbor loss\n    wan_rtr -> nms_srv snmp3 inform user \"wan-ops\" engineid \"80001f8880aabbccdd\" engineboots 8 enginetime 4200 auth sha256 \"WanAuthKey99!\" priv aes \"WanPrivKey99!\" reqid 910 sysuptime 980000 varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.2.1.15.7.2 varbind 1.3.6.1.2.1.15.3.1.7.1 string \"198.51.100.1\" wait 4ms\n\n    // 2. NMS acknowledges receipt with matching reqid 910 so router stops retransmitting\n    wan_rtr <- nms_srv snmp3 response user \"wan-ops\" engineid \"80001f8880aabbccdd\" engineboots 8 enginetime 4200 auth sha256 \"WanAuthKey99!\" priv aes \"WanPrivKey99!\" reqid 910 varbind 1.3.6.1.2.1.15.3.1.7.1 string \"198.51.100.1\"\n}\n```","frasm_code":"// WAN edge router sending a confirmed SNMPv3 Inform to the central NMS\nhost wan_rtr { ip 172.20.0.1 }\nhost nms_srv { ip 172.20.0.50 }\n\ncompile {\n    // 1. Router sends encrypted SNMPv3 Inform (reqid 910) reporting BGP neighbor loss\n    wan_rtr -> nms_srv snmp3 inform user \"wan-ops\" engineid \"80001f8880aabbccdd\" engineboots 8 enginetime 4200 auth sha256 \"WanAuthKey99!\" priv aes \"WanPrivKey99!\" reqid 910 sysuptime 980000 varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.2.1.15.7.2 varbind 1.3.6.1.2.1.15.3.1.7.1 string \"198.51.100.1\" wait 4ms\n\n    // 2. NMS acknowledges receipt with matching reqid 910 so router stops retransmitting\n    wan_rtr <- nms_srv snmp3 response user \"wan-ops\" engineid \"80001f8880aabbccdd\" engineboots 8 enginetime 4200 auth sha256 \"WanAuthKey99!\" priv aes \"WanPrivKey99!\" reqid 910 varbind 1.3.6.1.2.1.15.3.1.7.1 string \"198.51.100.1\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Acknowledged SNMPv3 Inform + NMS Response\" (snmpv3_inform_ack.frasm). Scenario: Models a confirmed SNMPv3 InformRequest on UDP 162 and the matching Response-PDU returned by the NMS collector so router retry queues clear cleanly. Verify with Wireshark filter `snmp`."},{"role":"assistant","content":"Unlike fire-and-forget traps, an SNMP inform expects a response with the same reqid; use <- so the NMS reply automatically flips UDP ports (162 -> 49152). Compile with `frameassembly snmpv3_inform_ack.frasm`.\n\n```frameassembly\n// WAN edge router sending a confirmed SNMPv3 Inform to the central NMS\nhost wan_rtr { ip 172.20.0.1 }\nhost nms_srv { ip 172.20.0.50 }\n\ncompile {\n    // 1. Router sends encrypted SNMPv3 Inform (reqid 910) reporting BGP neighbor loss\n    wan_rtr -> nms_srv snmp3 inform user \"wan-ops\" engineid \"80001f8880aabbccdd\" engineboots 8 enginetime 4200 auth sha256 \"WanAuthKey99!\" priv aes \"WanPrivKey99!\" reqid 910 sysuptime 980000 varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.2.1.15.7.2 varbind 1.3.6.1.2.1.15.3.1.7.1 string \"198.51.100.1\" wait 4ms\n\n    // 2. NMS acknowledges receipt with matching reqid 910 so router stops retransmitting\n    wan_rtr <- nms_srv snmp3 response user \"wan-ops\" engineid \"80001f8880aabbccdd\" engineboots 8 enginetime 4200 auth sha256 \"WanAuthKey99!\" priv aes \"WanPrivKey99!\" reqid 910 varbind 1.3.6.1.2.1.15.3.1.7.1 string \"198.51.100.1\"\n}\n```"}]}
{"id":"sft-cookbook-lib-snmp-ups-syslog-pair","task_type":"nl_to_frasm","protocols":["syslog","snmp2"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Rack UPS On-Battery Trap + Syslog Alert Correlation\" (ups_battery_trap_syslog.frasm). Scenario: Combines an RFC 5424 critical Syslog event (UDP 514) with an SNMPv2c UPS battery-power trap (UDP 162) to test NOC event deduplication and paging rules. Verify with Wireshark filter `syslog || snmp`.","completion":"Handy for testing Graylog/Splunk + Zabbix alert correlation without flipping the breaker on the server-room PDU. Compile with `frameassembly ups_battery_trap_syslog.frasm`.\n\n```frameassembly\n// Rack UPS management card and NOC monitoring collector\nhost rack_ups { ip 10.40.10.15 }\nhost noc_srv  { ip 10.40.1.100 }\n\ncompile {\n    // 1. Critical Syslog alert (facility 16 = local0, severity 2 = critical) on UDP 514\n    rack_ups -> noc_srv syslog facility 16 severity 2 hostname \"ups-row-b02\" app \"POWER\" msg \"Utility AC lost: switched to battery (est runtime 18 min)\" wait 3ms\n\n    // 2. Matching SNMPv2c UPS on-battery trap (1.3.6.1.2.1.33.2.1 = upsTrapOnBattery) on UDP 162\n    rack_ups -> noc_srv snmp2 trap community \"dc-facilities\" reqid 77 sysuptime 864000 varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.2.1.33.2.1 varbind 1.3.6.1.2.1.33.1.2.3.0 int 18\n}\n```","frasm_code":"// Rack UPS management card and NOC monitoring collector\nhost rack_ups { ip 10.40.10.15 }\nhost noc_srv  { ip 10.40.1.100 }\n\ncompile {\n    // 1. Critical Syslog alert (facility 16 = local0, severity 2 = critical) on UDP 514\n    rack_ups -> noc_srv syslog facility 16 severity 2 hostname \"ups-row-b02\" app \"POWER\" msg \"Utility AC lost: switched to battery (est runtime 18 min)\" wait 3ms\n\n    // 2. Matching SNMPv2c UPS on-battery trap (1.3.6.1.2.1.33.2.1 = upsTrapOnBattery) on UDP 162\n    rack_ups -> noc_srv snmp2 trap community \"dc-facilities\" reqid 77 sysuptime 864000 varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.2.1.33.2.1 varbind 1.3.6.1.2.1.33.1.2.3.0 int 18\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Rack UPS On-Battery Trap + Syslog Alert Correlation\" (ups_battery_trap_syslog.frasm). Scenario: Combines an RFC 5424 critical Syslog event (UDP 514) with an SNMPv2c UPS battery-power trap (UDP 162) to test NOC event deduplication and paging rules. Verify with Wireshark filter `syslog || snmp`."},{"role":"assistant","content":"Handy for testing Graylog/Splunk + Zabbix alert correlation without flipping the breaker on the server-room PDU. Compile with `frameassembly ups_battery_trap_syslog.frasm`.\n\n```frameassembly\n// Rack UPS management card and NOC monitoring collector\nhost rack_ups { ip 10.40.10.15 }\nhost noc_srv  { ip 10.40.1.100 }\n\ncompile {\n    // 1. Critical Syslog alert (facility 16 = local0, severity 2 = critical) on UDP 514\n    rack_ups -> noc_srv syslog facility 16 severity 2 hostname \"ups-row-b02\" app \"POWER\" msg \"Utility AC lost: switched to battery (est runtime 18 min)\" wait 3ms\n\n    // 2. Matching SNMPv2c UPS on-battery trap (1.3.6.1.2.1.33.2.1 = upsTrapOnBattery) on UDP 162\n    rack_ups -> noc_srv snmp2 trap community \"dc-facilities\" reqid 77 sysuptime 864000 varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.2.1.33.2.1 varbind 1.3.6.1.2.1.33.1.2.3.0 int 18\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-sip","task_type":"nl_to_frasm","protocols":["sip","vlan"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SIP (VoIP) (`sip`): Complete VoIP Call Setup (`INVITE` + SDP), `RTP` Audio & `BYE` Hangup\" (sip_rtp_voip_call.frasm). Scenario: Establishes a SIP call with an `application/sdp` offer on VLAN 30, streams G.711 `rtp` voice packets with `dscp 46` (EF), and hangs up cleanly via `bye` + `200 OK`. Verify with Wireshark filter `sip`.","completion":"Defaults to UDP `5060` (`SIP/2.0/UDP`) or switches `Via` and Layer 4 to TCP `5060` (`SIP/2.0/TCP`) when `transport tcp` is added. Generates mandatory RFC 3261 headers (`Via` with `branch=z9hG4bK...`, `From`, `To`, `Call-ID`, `CSeq`, `Max-Forwards: 70`, `Contact`, and exact `Content-Length`). Compile with `frameassembly show sip_rtp_voip_call.frasm`.\n\n```frameassembly\nhost phone_a { ip 172.16.30.101 }\nhost sbc_01  { ip 172.16.30.10 }\n\ncompile {\n    // 1. SIP INVITE with SDP offer + 180 Ringing + 200 OK + SIP ACK\n    phone_a -> sbc_01 sip invite uri \"sip:2050@voice.internal\" from \"sip:1010@voice.internal\" to \"sip:2050@voice.internal\" callid \"voip-8801\" cseq 1 contenttype \"application/sdp\" body \"v=0\\r\\no=- 1 1 IN IP4 172.16.30.101\\r\\ns=-\\r\\nc=IN IP4 172.16.30.101\\r\\nt=0 0\\r\\nm=audio 5004 RTP/AVP 0\\r\\n\" vlan 30 dscp 24 wait 2ms\n    phone_a <- sbc_01 sip status 180 reason \"Ringing\" callid \"voip-8801\" cseq 1 vlan 30 dscp 24 wait 20ms\n    phone_a <- sbc_01 sip status 200 reason \"OK\" callid \"voip-8801\" cseq 1 vlan 30 dscp 24 wait 2ms\n    phone_a -> sbc_01 sip ack uri \"sip:2050@voice.internal\" callid \"voip-8801\" cseq 1 vlan 30 dscp 24 wait 5ms\n    // 2. Bidirectional G.711 PCMU RTP audio (DSCP 46 Expedited Forwarding)\n    phone_a -> sbc_01 rtp pt 0 seq 1 timestamp 160 ssrc 0x11223344 marker 1 payload \"g711-audio-1\" vlan 30 dscp 46 wait 20ms\n    phone_a <- sbc_01 rtp pt 0 seq 1 timestamp 160 ssrc 0x55667788 marker 1 payload \"g711-reply-1\" vlan 30 dscp 46 wait 20ms\n    // 3. Call hangup (BYE -> 200 OK)\n    phone_a -> sbc_01 sip bye uri \"sip:2050@voice.internal\" callid \"voip-8801\" cseq 2 vlan 30 dscp 24 wait 2ms\n    phone_a <- sbc_01 sip status 200 reason \"OK\" callid \"voip-8801\" cseq 2 vlan 30 dscp 24\n}\n```","frasm_code":"host phone_a { ip 172.16.30.101 }\nhost sbc_01  { ip 172.16.30.10 }\n\ncompile {\n    // 1. SIP INVITE with SDP offer + 180 Ringing + 200 OK + SIP ACK\n    phone_a -> sbc_01 sip invite uri \"sip:2050@voice.internal\" from \"sip:1010@voice.internal\" to \"sip:2050@voice.internal\" callid \"voip-8801\" cseq 1 contenttype \"application/sdp\" body \"v=0\\r\\no=- 1 1 IN IP4 172.16.30.101\\r\\ns=-\\r\\nc=IN IP4 172.16.30.101\\r\\nt=0 0\\r\\nm=audio 5004 RTP/AVP 0\\r\\n\" vlan 30 dscp 24 wait 2ms\n    phone_a <- sbc_01 sip status 180 reason \"Ringing\" callid \"voip-8801\" cseq 1 vlan 30 dscp 24 wait 20ms\n    phone_a <- sbc_01 sip status 200 reason \"OK\" callid \"voip-8801\" cseq 1 vlan 30 dscp 24 wait 2ms\n    phone_a -> sbc_01 sip ack uri \"sip:2050@voice.internal\" callid \"voip-8801\" cseq 1 vlan 30 dscp 24 wait 5ms\n    // 2. Bidirectional G.711 PCMU RTP audio (DSCP 46 Expedited Forwarding)\n    phone_a -> sbc_01 rtp pt 0 seq 1 timestamp 160 ssrc 0x11223344 marker 1 payload \"g711-audio-1\" vlan 30 dscp 46 wait 20ms\n    phone_a <- sbc_01 rtp pt 0 seq 1 timestamp 160 ssrc 0x55667788 marker 1 payload \"g711-reply-1\" vlan 30 dscp 46 wait 20ms\n    // 3. Call hangup (BYE -> 200 OK)\n    phone_a -> sbc_01 sip bye uri \"sip:2050@voice.internal\" callid \"voip-8801\" cseq 2 vlan 30 dscp 24 wait 2ms\n    phone_a <- sbc_01 sip status 200 reason \"OK\" callid \"voip-8801\" cseq 2 vlan 30 dscp 24\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SIP (VoIP) (`sip`): Complete VoIP Call Setup (`INVITE` + SDP), `RTP` Audio & `BYE` Hangup\" (sip_rtp_voip_call.frasm). Scenario: Establishes a SIP call with an `application/sdp` offer on VLAN 30, streams G.711 `rtp` voice packets with `dscp 46` (EF), and hangs up cleanly via `bye` + `200 OK`. Verify with Wireshark filter `sip`."},{"role":"assistant","content":"Defaults to UDP `5060` (`SIP/2.0/UDP`) or switches `Via` and Layer 4 to TCP `5060` (`SIP/2.0/TCP`) when `transport tcp` is added. Generates mandatory RFC 3261 headers (`Via` with `branch=z9hG4bK...`, `From`, `To`, `Call-ID`, `CSeq`, `Max-Forwards: 70`, `Contact`, and exact `Content-Length`). Compile with `frameassembly show sip_rtp_voip_call.frasm`.\n\n```frameassembly\nhost phone_a { ip 172.16.30.101 }\nhost sbc_01  { ip 172.16.30.10 }\n\ncompile {\n    // 1. SIP INVITE with SDP offer + 180 Ringing + 200 OK + SIP ACK\n    phone_a -> sbc_01 sip invite uri \"sip:2050@voice.internal\" from \"sip:1010@voice.internal\" to \"sip:2050@voice.internal\" callid \"voip-8801\" cseq 1 contenttype \"application/sdp\" body \"v=0\\r\\no=- 1 1 IN IP4 172.16.30.101\\r\\ns=-\\r\\nc=IN IP4 172.16.30.101\\r\\nt=0 0\\r\\nm=audio 5004 RTP/AVP 0\\r\\n\" vlan 30 dscp 24 wait 2ms\n    phone_a <- sbc_01 sip status 180 reason \"Ringing\" callid \"voip-8801\" cseq 1 vlan 30 dscp 24 wait 20ms\n    phone_a <- sbc_01 sip status 200 reason \"OK\" callid \"voip-8801\" cseq 1 vlan 30 dscp 24 wait 2ms\n    phone_a -> sbc_01 sip ack uri \"sip:2050@voice.internal\" callid \"voip-8801\" cseq 1 vlan 30 dscp 24 wait 5ms\n    // 2. Bidirectional G.711 PCMU RTP audio (DSCP 46 Expedited Forwarding)\n    phone_a -> sbc_01 rtp pt 0 seq 1 timestamp 160 ssrc 0x11223344 marker 1 payload \"g711-audio-1\" vlan 30 dscp 46 wait 20ms\n    phone_a <- sbc_01 rtp pt 0 seq 1 timestamp 160 ssrc 0x55667788 marker 1 payload \"g711-reply-1\" vlan 30 dscp 46 wait 20ms\n    // 3. Call hangup (BYE -> 200 OK)\n    phone_a -> sbc_01 sip bye uri \"sip:2050@voice.internal\" callid \"voip-8801\" cseq 2 vlan 30 dscp 24 wait 2ms\n    phone_a <- sbc_01 sip status 200 reason \"OK\" callid \"voip-8801\" cseq 2 vlan 30 dscp 24\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-rtp","task_type":"nl_to_frasm","protocols":["rtp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"RTP (Media) (`rtp`): G.711 VoIP Stream With Simulated WAN Jitter & Single-Packet Drop\" (rtp_qos_jitter_lab.frasm). Scenario: Emits a G.711 PCMU (`pt 0`, 8 kHz = `+160` timestamp ticks per `20ms`) voice burst containing a skipped sequence number (`seq 3` dropped) and a `55ms` jitter spike. Verify with Wireshark filter `rtp`.","completion":"Defaults to UDP destination port `5004` and writes RTP Version `2` (`0x80`) in the upper bits of byte 0. Packs the 1-bit `marker` and 7-bit Payload Type (`pt`) cleanly into byte 1 (`(marker << 7) | pt`). Compile with `frameassembly show rtp_qos_jitter_lab.frasm`.\n\n```frameassembly\nhost branch_phone { ip 172.16.30.21 }\nhost hq_gateway   { ip 172.16.1.10 }\n\ncompile {\n    // Normal 20ms pacing (+160 samples at 8000 Hz)\n    branch_phone -> hq_gateway rtp srcport 16384 dstport 16400 pt 0 seq 1 timestamp 160 ssrc 0xdeadbeef marker 1 dscp 46 payload \"audio-pkt-1\" wait 20ms\n    branch_phone -> hq_gateway rtp pt 0 seq 2 timestamp 320 ssrc 0xdeadbeef marker 0 dscp 46 payload \"audio-pkt-2\" wait 55ms\n    // seq 3 intentionally omitted to test 1-packet loss + 55ms jitter detection!\n    branch_phone -> hq_gateway rtp pt 0 seq 4 timestamp 640 ssrc 0xdeadbeef marker 0 dscp 46 payload \"audio-pkt-4\" wait 5ms\n    branch_phone -> hq_gateway rtp pt 0 seq 5 timestamp 800 ssrc 0xdeadbeef marker 0 dscp 46 payload \"audio-pkt-5\"\n}\n```","frasm_code":"host branch_phone { ip 172.16.30.21 }\nhost hq_gateway   { ip 172.16.1.10 }\n\ncompile {\n    // Normal 20ms pacing (+160 samples at 8000 Hz)\n    branch_phone -> hq_gateway rtp srcport 16384 dstport 16400 pt 0 seq 1 timestamp 160 ssrc 0xdeadbeef marker 1 dscp 46 payload \"audio-pkt-1\" wait 20ms\n    branch_phone -> hq_gateway rtp pt 0 seq 2 timestamp 320 ssrc 0xdeadbeef marker 0 dscp 46 payload \"audio-pkt-2\" wait 55ms\n    // seq 3 intentionally omitted to test 1-packet loss + 55ms jitter detection!\n    branch_phone -> hq_gateway rtp pt 0 seq 4 timestamp 640 ssrc 0xdeadbeef marker 0 dscp 46 payload \"audio-pkt-4\" wait 5ms\n    branch_phone -> hq_gateway rtp pt 0 seq 5 timestamp 800 ssrc 0xdeadbeef marker 0 dscp 46 payload \"audio-pkt-5\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"RTP (Media) (`rtp`): G.711 VoIP Stream With Simulated WAN Jitter & Single-Packet Drop\" (rtp_qos_jitter_lab.frasm). Scenario: Emits a G.711 PCMU (`pt 0`, 8 kHz = `+160` timestamp ticks per `20ms`) voice burst containing a skipped sequence number (`seq 3` dropped) and a `55ms` jitter spike. Verify with Wireshark filter `rtp`."},{"role":"assistant","content":"Defaults to UDP destination port `5004` and writes RTP Version `2` (`0x80`) in the upper bits of byte 0. Packs the 1-bit `marker` and 7-bit Payload Type (`pt`) cleanly into byte 1 (`(marker << 7) | pt`). Compile with `frameassembly show rtp_qos_jitter_lab.frasm`.\n\n```frameassembly\nhost branch_phone { ip 172.16.30.21 }\nhost hq_gateway   { ip 172.16.1.10 }\n\ncompile {\n    // Normal 20ms pacing (+160 samples at 8000 Hz)\n    branch_phone -> hq_gateway rtp srcport 16384 dstport 16400 pt 0 seq 1 timestamp 160 ssrc 0xdeadbeef marker 1 dscp 46 payload \"audio-pkt-1\" wait 20ms\n    branch_phone -> hq_gateway rtp pt 0 seq 2 timestamp 320 ssrc 0xdeadbeef marker 0 dscp 46 payload \"audio-pkt-2\" wait 55ms\n    // seq 3 intentionally omitted to test 1-packet loss + 55ms jitter detection!\n    branch_phone -> hq_gateway rtp pt 0 seq 4 timestamp 640 ssrc 0xdeadbeef marker 0 dscp 46 payload \"audio-pkt-4\" wait 5ms\n    branch_phone -> hq_gateway rtp pt 0 seq 5 timestamp 800 ssrc 0xdeadbeef marker 0 dscp 46 payload \"audio-pkt-5\"\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-rtsp","task_type":"nl_to_frasm","protocols":["rtsp","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"RTSP (`rtsp`): Full IP Camera RTSP Setup, PLAY, RTP Video Frame & TEARDOWN\" (rtsp_camera_session.frasm). Scenario: Walks through TCP 554 connection setup, `DESCRIBE`, `SETUP` (`client_port=5004-5005`), `PLAY`, an H.264 `rtp pt 96` packet from the camera, and `TEARDOWN`. Verify with Wireshark filter `rtsp`.","completion":"Defaults to TCP destination port `554` (`psh ack`) and writes `\r\n`-terminated `RTSP/1.0` lines with `CSeq`. Switches from an RTSP client request to an `RTSP/1.0 <status> OK` server reply whenever `status` is set. Compile with `frameassembly show rtsp_camera_session.frasm`.\n\n```frameassembly\nhost vms_nvr  { ip 192.168.60.10 }\nhost gate_cam { ip 192.168.60.105 }\n\ncompile {\n    vms_nvr -> gate_cam tcp syn srcport 51554 dstport 554 win 65535 mss 1460 wait 1ms\n    vms_nvr <- gate_cam tcp syn ack win 65535 mss 1460 wait 1ms\n    vms_nvr -> gate_cam tcp ack wait 1ms\n    vms_nvr -> gate_cam rtsp describe uri \"rtsp://192.168.60.105/h264\" cseq 1 wait 2ms\n    vms_nvr <- gate_cam rtsp status 200 cseq 1 wait 2ms\n    vms_nvr -> gate_cam rtsp setup uri \"rtsp://192.168.60.105/h264/trackID=1\" cseq 2 transporthdr \"RTP/AVP;unicast;client_port=5004-5005\" wait 2ms\n    vms_nvr <- gate_cam rtsp status 200 cseq 2 transporthdr \"RTP/AVP;unicast;client_port=5004-5005;server_port=8000-8001\" session \"98112233\" wait 2ms\n    vms_nvr -> gate_cam rtsp play uri \"rtsp://192.168.60.105/h264\" cseq 3 session \"98112233\" wait 2ms\n    vms_nvr <- gate_cam rtsp status 200 cseq 3 session \"98112233\" wait 5ms\n    // Camera sends H.264 RTP packet (pt 96) to client port 5004\n    gate_cam -> vms_nvr rtp srcport 8000 dstport 5004 pt 96 seq 1 timestamp 90000 ssrc 0xcafebabe marker 1 payload \"h264-nal-idr\" wait 10ms\n    vms_nvr -> gate_cam rtsp teardown uri \"rtsp://192.168.60.105/h264\" cseq 4 session \"98112233\"\n}\n```","frasm_code":"host vms_nvr  { ip 192.168.60.10 }\nhost gate_cam { ip 192.168.60.105 }\n\ncompile {\n    vms_nvr -> gate_cam tcp syn srcport 51554 dstport 554 win 65535 mss 1460 wait 1ms\n    vms_nvr <- gate_cam tcp syn ack win 65535 mss 1460 wait 1ms\n    vms_nvr -> gate_cam tcp ack wait 1ms\n    vms_nvr -> gate_cam rtsp describe uri \"rtsp://192.168.60.105/h264\" cseq 1 wait 2ms\n    vms_nvr <- gate_cam rtsp status 200 cseq 1 wait 2ms\n    vms_nvr -> gate_cam rtsp setup uri \"rtsp://192.168.60.105/h264/trackID=1\" cseq 2 transporthdr \"RTP/AVP;unicast;client_port=5004-5005\" wait 2ms\n    vms_nvr <- gate_cam rtsp status 200 cseq 2 transporthdr \"RTP/AVP;unicast;client_port=5004-5005;server_port=8000-8001\" session \"98112233\" wait 2ms\n    vms_nvr -> gate_cam rtsp play uri \"rtsp://192.168.60.105/h264\" cseq 3 session \"98112233\" wait 2ms\n    vms_nvr <- gate_cam rtsp status 200 cseq 3 session \"98112233\" wait 5ms\n    // Camera sends H.264 RTP packet (pt 96) to client port 5004\n    gate_cam -> vms_nvr rtp srcport 8000 dstport 5004 pt 96 seq 1 timestamp 90000 ssrc 0xcafebabe marker 1 payload \"h264-nal-idr\" wait 10ms\n    vms_nvr -> gate_cam rtsp teardown uri \"rtsp://192.168.60.105/h264\" cseq 4 session \"98112233\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"RTSP (`rtsp`): Full IP Camera RTSP Setup, PLAY, RTP Video Frame & TEARDOWN\" (rtsp_camera_session.frasm). Scenario: Walks through TCP 554 connection setup, `DESCRIBE`, `SETUP` (`client_port=5004-5005`), `PLAY`, an H.264 `rtp pt 96` packet from the camera, and `TEARDOWN`. Verify with Wireshark filter `rtsp`."},{"role":"assistant","content":"Defaults to TCP destination port `554` (`psh ack`) and writes `\r\n`-terminated `RTSP/1.0` lines with `CSeq`. Switches from an RTSP client request to an `RTSP/1.0 <status> OK` server reply whenever `status` is set. Compile with `frameassembly show rtsp_camera_session.frasm`.\n\n```frameassembly\nhost vms_nvr  { ip 192.168.60.10 }\nhost gate_cam { ip 192.168.60.105 }\n\ncompile {\n    vms_nvr -> gate_cam tcp syn srcport 51554 dstport 554 win 65535 mss 1460 wait 1ms\n    vms_nvr <- gate_cam tcp syn ack win 65535 mss 1460 wait 1ms\n    vms_nvr -> gate_cam tcp ack wait 1ms\n    vms_nvr -> gate_cam rtsp describe uri \"rtsp://192.168.60.105/h264\" cseq 1 wait 2ms\n    vms_nvr <- gate_cam rtsp status 200 cseq 1 wait 2ms\n    vms_nvr -> gate_cam rtsp setup uri \"rtsp://192.168.60.105/h264/trackID=1\" cseq 2 transporthdr \"RTP/AVP;unicast;client_port=5004-5005\" wait 2ms\n    vms_nvr <- gate_cam rtsp status 200 cseq 2 transporthdr \"RTP/AVP;unicast;client_port=5004-5005;server_port=8000-8001\" session \"98112233\" wait 2ms\n    vms_nvr -> gate_cam rtsp play uri \"rtsp://192.168.60.105/h264\" cseq 3 session \"98112233\" wait 2ms\n    vms_nvr <- gate_cam rtsp status 200 cseq 3 session \"98112233\" wait 5ms\n    // Camera sends H.264 RTP packet (pt 96) to client port 5004\n    gate_cam -> vms_nvr rtp srcport 8000 dstport 5004 pt 96 seq 1 timestamp 90000 ssrc 0xcafebabe marker 1 payload \"h264-nal-idr\" wait 10ms\n    vms_nvr -> gate_cam rtsp teardown uri \"rtsp://192.168.60.105/h264\" cseq 4 session \"98112233\"\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-stun","task_type":"nl_to_frasm","protocols":["stun"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"STUN (NAT) (`stun`): Dual-Stack IPv4 & IPv6 WebRTC ICE STUN Discovery + Error Response\" (stun_webrtc_ice.frasm). Scenario: Performs an IPv4 STUN check on port 19302, an IPv6 STUN check on port 3478, and a `bindingerror` (`0x0111`) test. Verify with Wireshark filter `stun`.","completion":"Defaults to UDP destination port `3478` and writes the mandatory RFC 5389 magic cookie `0x2112a442` in bytes 4..7. XOR-encodes IPv4 (`32-bit ^ 0x2112a442`) and IPv6 (`128-bit ^ (0x2112a442 || txid)`) `xormappedaddr` attributes (`0x0020`) automatically. Compile with `frameassembly show stun_webrtc_ice.frasm`.\n\n```frameassembly\nhost client_v4 { ip 172.16.10.25 }\nhost stun_v4   { ip 198.51.100.10 }\nhost client_v6 { ip 2001:db8:10::25 }\nhost stun_v6   { ip 2001:db8:99::3478 }\n\ncompile {\n    // 1. WebRTC UDP 19302 STUN check returning NAT public IPv4 203.0.113.50\n    client_v4 -> stun_v4 stun bindingrequest dstport 19302 txid 0xa1b2c3d4 software \"Chromium-ICE\" wait 2ms\n    client_v4 <- stun_v4 stun bindingresponse txid 0xa1b2c3d4 xormappedaddr 203.0.113.50 software \"coturn-4.6\" wait 4ms\n    // 2. IPv6 STUN Binding check + Error response\n    client_v6 -> stun_v6 stun bindingrequest txid 0x55667788 wait 2ms\n    client_v6 <- stun_v6 stun bindingresponse txid 0x55667788 xormappedaddr 2001:db8:10::25 wait 3ms\n    client_v4 <- stun_v4 stun bindingerror txid 0x99990000\n}\n```","frasm_code":"host client_v4 { ip 172.16.10.25 }\nhost stun_v4   { ip 198.51.100.10 }\nhost client_v6 { ip 2001:db8:10::25 }\nhost stun_v6   { ip 2001:db8:99::3478 }\n\ncompile {\n    // 1. WebRTC UDP 19302 STUN check returning NAT public IPv4 203.0.113.50\n    client_v4 -> stun_v4 stun bindingrequest dstport 19302 txid 0xa1b2c3d4 software \"Chromium-ICE\" wait 2ms\n    client_v4 <- stun_v4 stun bindingresponse txid 0xa1b2c3d4 xormappedaddr 203.0.113.50 software \"coturn-4.6\" wait 4ms\n    // 2. IPv6 STUN Binding check + Error response\n    client_v6 -> stun_v6 stun bindingrequest txid 0x55667788 wait 2ms\n    client_v6 <- stun_v6 stun bindingresponse txid 0x55667788 xormappedaddr 2001:db8:10::25 wait 3ms\n    client_v4 <- stun_v4 stun bindingerror txid 0x99990000\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"STUN (NAT) (`stun`): Dual-Stack IPv4 & IPv6 WebRTC ICE STUN Discovery + Error Response\" (stun_webrtc_ice.frasm). Scenario: Performs an IPv4 STUN check on port 19302, an IPv6 STUN check on port 3478, and a `bindingerror` (`0x0111`) test. Verify with Wireshark filter `stun`."},{"role":"assistant","content":"Defaults to UDP destination port `3478` and writes the mandatory RFC 5389 magic cookie `0x2112a442` in bytes 4..7. XOR-encodes IPv4 (`32-bit ^ 0x2112a442`) and IPv6 (`128-bit ^ (0x2112a442 || txid)`) `xormappedaddr` attributes (`0x0020`) automatically. Compile with `frameassembly show stun_webrtc_ice.frasm`.\n\n```frameassembly\nhost client_v4 { ip 172.16.10.25 }\nhost stun_v4   { ip 198.51.100.10 }\nhost client_v6 { ip 2001:db8:10::25 }\nhost stun_v6   { ip 2001:db8:99::3478 }\n\ncompile {\n    // 1. WebRTC UDP 19302 STUN check returning NAT public IPv4 203.0.113.50\n    client_v4 -> stun_v4 stun bindingrequest dstport 19302 txid 0xa1b2c3d4 software \"Chromium-ICE\" wait 2ms\n    client_v4 <- stun_v4 stun bindingresponse txid 0xa1b2c3d4 xormappedaddr 203.0.113.50 software \"coturn-4.6\" wait 4ms\n    // 2. IPv6 STUN Binding check + Error response\n    client_v6 -> stun_v6 stun bindingrequest txid 0x55667788 wait 2ms\n    client_v6 <- stun_v6 stun bindingresponse txid 0x55667788 xormappedaddr 2001:db8:10::25 wait 3ms\n    client_v4 <- stun_v4 stun bindingerror txid 0x99990000\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-smtp","task_type":"nl_to_frasm","protocols":["smtp","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SMTP (`smtp`): Complete End-to-End RFC 5321 Email Delivery Transaction\" (smtp_full_envelope.frasm). Scenario: Walks through a full TCP 25 session from `220` banner and `EHLO` through `MAIL FROM`, `RCPT TO`, `DATA` (`354`), message headers/body, `250 Queued`, and `QUIT`. Verify with Wireshark filter `smtp`.","completion":"Defaults to TCP destination port `25` (`psh ack`; use `dstport 587` for submission) and terminates SMTP lines with `\r\n`. Formats `MAIL FROM:<...>` (`mailfrom`) and `RCPT TO:<...>` (`rcptto`) cleanly and terminates `body` payloads with `\r\n.\r\n` when needed. Compile with `frameassembly show smtp_full_envelope.frasm`.\n\n```frameassembly\nhost alert_bot { ip 172.16.15.20 }\nhost smtp_relay { ip 172.16.15.25 }\n\ncompile {\n    alert_bot -> smtp_relay tcp syn srcport 52025 dstport 25 win 65535 mss 1460 wait 1ms\n    alert_bot <- smtp_relay tcp syn ack win 65535 mss 1460 wait 1ms\n    alert_bot -> smtp_relay tcp ack wait 1ms\n    alert_bot <- smtp_relay smtp code 220 reply \"relay.corp.internal ESMTP\" wait 2ms\n    alert_bot -> smtp_relay smtp ehlo \"alert-bot.corp.internal\" wait 1ms\n    alert_bot <- smtp_relay smtp code 250 reply \"PIPELINING\" wait 1ms\n    alert_bot -> smtp_relay smtp mailfrom \"<noc-alerts@corp.internal>\" wait 1ms\n    alert_bot <- smtp_relay smtp code 250 reply \"2.1.0 Ok\" wait 1ms\n    alert_bot -> smtp_relay smtp rcptto \"<oncall@corp.internal>\" wait 1ms\n    alert_bot <- smtp_relay smtp code 250 reply \"2.1.5 Ok\" wait 1ms\n    alert_bot -> smtp_relay smtp data wait 1ms\n    alert_bot <- smtp_relay smtp code 354 reply \"End data with <CR><LF>.<CR><LF>\" wait 2ms\n    alert_bot -> smtp_relay smtp body \"Subject: Core Link Down\\r\\nFrom: noc-alerts@corp.internal\\r\\n\\r\\nGi1/0/49 went down.\\r\\n.\" wait 2ms\n    alert_bot <- smtp_relay smtp code 250 reply \"2.0.0 Ok: queued as 9F4A1\" wait 1ms\n    alert_bot -> smtp_relay smtp quit wait 1ms\n    alert_bot <- smtp_relay smtp code 221 reply \"2.0.0 Bye\"\n}\n```","frasm_code":"host alert_bot { ip 172.16.15.20 }\nhost smtp_relay { ip 172.16.15.25 }\n\ncompile {\n    alert_bot -> smtp_relay tcp syn srcport 52025 dstport 25 win 65535 mss 1460 wait 1ms\n    alert_bot <- smtp_relay tcp syn ack win 65535 mss 1460 wait 1ms\n    alert_bot -> smtp_relay tcp ack wait 1ms\n    alert_bot <- smtp_relay smtp code 220 reply \"relay.corp.internal ESMTP\" wait 2ms\n    alert_bot -> smtp_relay smtp ehlo \"alert-bot.corp.internal\" wait 1ms\n    alert_bot <- smtp_relay smtp code 250 reply \"PIPELINING\" wait 1ms\n    alert_bot -> smtp_relay smtp mailfrom \"<noc-alerts@corp.internal>\" wait 1ms\n    alert_bot <- smtp_relay smtp code 250 reply \"2.1.0 Ok\" wait 1ms\n    alert_bot -> smtp_relay smtp rcptto \"<oncall@corp.internal>\" wait 1ms\n    alert_bot <- smtp_relay smtp code 250 reply \"2.1.5 Ok\" wait 1ms\n    alert_bot -> smtp_relay smtp data wait 1ms\n    alert_bot <- smtp_relay smtp code 354 reply \"End data with <CR><LF>.<CR><LF>\" wait 2ms\n    alert_bot -> smtp_relay smtp body \"Subject: Core Link Down\\r\\nFrom: noc-alerts@corp.internal\\r\\n\\r\\nGi1/0/49 went down.\\r\\n.\" wait 2ms\n    alert_bot <- smtp_relay smtp code 250 reply \"2.0.0 Ok: queued as 9F4A1\" wait 1ms\n    alert_bot -> smtp_relay smtp quit wait 1ms\n    alert_bot <- smtp_relay smtp code 221 reply \"2.0.0 Bye\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SMTP (`smtp`): Complete End-to-End RFC 5321 Email Delivery Transaction\" (smtp_full_envelope.frasm). Scenario: Walks through a full TCP 25 session from `220` banner and `EHLO` through `MAIL FROM`, `RCPT TO`, `DATA` (`354`), message headers/body, `250 Queued`, and `QUIT`. Verify with Wireshark filter `smtp`."},{"role":"assistant","content":"Defaults to TCP destination port `25` (`psh ack`; use `dstport 587` for submission) and terminates SMTP lines with `\r\n`. Formats `MAIL FROM:<...>` (`mailfrom`) and `RCPT TO:<...>` (`rcptto`) cleanly and terminates `body` payloads with `\r\n.\r\n` when needed. Compile with `frameassembly show smtp_full_envelope.frasm`.\n\n```frameassembly\nhost alert_bot { ip 172.16.15.20 }\nhost smtp_relay { ip 172.16.15.25 }\n\ncompile {\n    alert_bot -> smtp_relay tcp syn srcport 52025 dstport 25 win 65535 mss 1460 wait 1ms\n    alert_bot <- smtp_relay tcp syn ack win 65535 mss 1460 wait 1ms\n    alert_bot -> smtp_relay tcp ack wait 1ms\n    alert_bot <- smtp_relay smtp code 220 reply \"relay.corp.internal ESMTP\" wait 2ms\n    alert_bot -> smtp_relay smtp ehlo \"alert-bot.corp.internal\" wait 1ms\n    alert_bot <- smtp_relay smtp code 250 reply \"PIPELINING\" wait 1ms\n    alert_bot -> smtp_relay smtp mailfrom \"<noc-alerts@corp.internal>\" wait 1ms\n    alert_bot <- smtp_relay smtp code 250 reply \"2.1.0 Ok\" wait 1ms\n    alert_bot -> smtp_relay smtp rcptto \"<oncall@corp.internal>\" wait 1ms\n    alert_bot <- smtp_relay smtp code 250 reply \"2.1.5 Ok\" wait 1ms\n    alert_bot -> smtp_relay smtp data wait 1ms\n    alert_bot <- smtp_relay smtp code 354 reply \"End data with <CR><LF>.<CR><LF>\" wait 2ms\n    alert_bot -> smtp_relay smtp body \"Subject: Core Link Down\\r\\nFrom: noc-alerts@corp.internal\\r\\n\\r\\nGi1/0/49 went down.\\r\\n.\" wait 2ms\n    alert_bot <- smtp_relay smtp code 250 reply \"2.0.0 Ok: queued as 9F4A1\" wait 1ms\n    alert_bot -> smtp_relay smtp quit wait 1ms\n    alert_bot <- smtp_relay smtp code 221 reply \"2.0.0 Bye\"\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-imap","task_type":"nl_to_frasm","protocols":["imap","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IMAP4 (`imap`): Cleartext IMAP Login Failure Followed by Authorized Inbox Selection\" (imap_login_audit.frasm). Scenario: Captures an untagged server greeting, a failed `A01 LOGIN` returning `NO`, and an authorized `A02 LOGIN` + `A03 SELECT INBOX`. Verify with Wireshark filter `imap`.","completion":"Defaults to TCP destination port `143` (`psh ack`) and appends `\r\n` to every IMAP command or response line. Formats `<tag> <cmd> <arg>\r\n` on client requests and `<tag> <status> <response>\r\n` when `status` or `response` is provided. Compile with `frameassembly show imap_login_audit.frasm`.\n\n```frameassembly\nhost laptop   { ip 172.16.25.44 }\nhost mail_box { ip 172.16.25.10 }\n\ncompile {\n    laptop -> mail_box tcp syn srcport 52143 dstport 143 win 65535 mss 1460 wait 1ms\n    laptop <- mail_box tcp syn ack win 65535 mss 1460 wait 1ms\n    laptop -> mail_box tcp ack wait 1ms\n    laptop <- mail_box imap tag \"*\" status \"OK\" response \"IMAP4rev1 Service Ready\" wait 2ms\n    // 1. Failed login -> tagged NO\n    laptop -> mail_box imap tag \"A01\" cmd \"LOGIN\" arg \"jdoe WrongPass1\" wait 3ms\n    laptop <- mail_box imap tag \"A01\" status \"NO\" response \"LOGIN failed.\" wait 5ms\n    // 2. Valid login + SELECT INBOX\n    laptop -> mail_box imap tag \"A02\" cmd \"LOGIN\" arg \"jdoe LabPass2026\" wait 2ms\n    laptop <- mail_box imap tag \"A02\" status \"OK\" response \"LOGIN completed\" wait 2ms\n    laptop -> mail_box imap tag \"A03\" cmd \"SELECT\" arg \"INBOX\" wait 2ms\n    laptop <- mail_box imap tag \"A03\" status \"OK\" response \"[READ-WRITE] SELECT completed\"\n}\n```","frasm_code":"host laptop   { ip 172.16.25.44 }\nhost mail_box { ip 172.16.25.10 }\n\ncompile {\n    laptop -> mail_box tcp syn srcport 52143 dstport 143 win 65535 mss 1460 wait 1ms\n    laptop <- mail_box tcp syn ack win 65535 mss 1460 wait 1ms\n    laptop -> mail_box tcp ack wait 1ms\n    laptop <- mail_box imap tag \"*\" status \"OK\" response \"IMAP4rev1 Service Ready\" wait 2ms\n    // 1. Failed login -> tagged NO\n    laptop -> mail_box imap tag \"A01\" cmd \"LOGIN\" arg \"jdoe WrongPass1\" wait 3ms\n    laptop <- mail_box imap tag \"A01\" status \"NO\" response \"LOGIN failed.\" wait 5ms\n    // 2. Valid login + SELECT INBOX\n    laptop -> mail_box imap tag \"A02\" cmd \"LOGIN\" arg \"jdoe LabPass2026\" wait 2ms\n    laptop <- mail_box imap tag \"A02\" status \"OK\" response \"LOGIN completed\" wait 2ms\n    laptop -> mail_box imap tag \"A03\" cmd \"SELECT\" arg \"INBOX\" wait 2ms\n    laptop <- mail_box imap tag \"A03\" status \"OK\" response \"[READ-WRITE] SELECT completed\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IMAP4 (`imap`): Cleartext IMAP Login Failure Followed by Authorized Inbox Selection\" (imap_login_audit.frasm). Scenario: Captures an untagged server greeting, a failed `A01 LOGIN` returning `NO`, and an authorized `A02 LOGIN` + `A03 SELECT INBOX`. Verify with Wireshark filter `imap`."},{"role":"assistant","content":"Defaults to TCP destination port `143` (`psh ack`) and appends `\r\n` to every IMAP command or response line. Formats `<tag> <cmd> <arg>\r\n` on client requests and `<tag> <status> <response>\r\n` when `status` or `response` is provided. Compile with `frameassembly show imap_login_audit.frasm`.\n\n```frameassembly\nhost laptop   { ip 172.16.25.44 }\nhost mail_box { ip 172.16.25.10 }\n\ncompile {\n    laptop -> mail_box tcp syn srcport 52143 dstport 143 win 65535 mss 1460 wait 1ms\n    laptop <- mail_box tcp syn ack win 65535 mss 1460 wait 1ms\n    laptop -> mail_box tcp ack wait 1ms\n    laptop <- mail_box imap tag \"*\" status \"OK\" response \"IMAP4rev1 Service Ready\" wait 2ms\n    // 1. Failed login -> tagged NO\n    laptop -> mail_box imap tag \"A01\" cmd \"LOGIN\" arg \"jdoe WrongPass1\" wait 3ms\n    laptop <- mail_box imap tag \"A01\" status \"NO\" response \"LOGIN failed.\" wait 5ms\n    // 2. Valid login + SELECT INBOX\n    laptop -> mail_box imap tag \"A02\" cmd \"LOGIN\" arg \"jdoe LabPass2026\" wait 2ms\n    laptop <- mail_box imap tag \"A02\" status \"OK\" response \"LOGIN completed\" wait 2ms\n    laptop -> mail_box imap tag \"A03\" cmd \"SELECT\" arg \"INBOX\" wait 2ms\n    laptop <- mail_box imap tag \"A03\" status \"OK\" response \"[READ-WRITE] SELECT completed\"\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-pop3","task_type":"nl_to_frasm","protocols":["pop3","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"POP3 (`pop3`): POP3 Failed Login (`-ERR`) + Successful Mailbox `STAT` & `QUIT`\" (pop3_session_audit.frasm). Scenario: Establishes a TCP 110 session, captures a rejected password attempt (`err`), then completes `USER` -> `PASS` -> `STAT` -> `QUIT`. Verify with Wireshark filter `pop`.","completion":"Defaults to TCP destination port `110` (`psh ack`) and appends `\r\n` per RFC 1939. Formats `+OK <response>\r\n` on `ok` and `-ERR <response>\r\n` on `err`. Compile with `frameassembly show pop3_session_audit.frasm`.\n\n```frameassembly\nhost workstation { ip 172.16.16.40 }\nhost legacy_mail { ip 172.16.16.110 }\n\ncompile {\n    workstation -> legacy_mail tcp syn srcport 52110 dstport 110 win 65535 mss 1460 wait 1ms\n    workstation <- legacy_mail tcp syn ack win 65535 mss 1460 wait 1ms\n    workstation -> legacy_mail tcp ack wait 1ms\n    workstation <- legacy_mail pop3 ok response \"Dovecot POP3 ready.\" wait 2ms\n    workstation -> legacy_mail pop3 cmd \"USER\" arg \"ops_scanner\" wait 1ms\n    workstation <- legacy_mail pop3 ok response \"Pass required\" wait 1ms\n    workstation -> legacy_mail pop3 cmd \"PASS\" arg \"BadPass1\" wait 4ms\n    workstation <- legacy_mail pop3 err response \"[AUTH] Authentication failed.\" wait 5ms\n    workstation -> legacy_mail pop3 cmd \"USER\" arg \"ops_scanner\" wait 1ms\n    workstation <- legacy_mail pop3 ok wait 1ms\n    workstation -> legacy_mail pop3 cmd \"PASS\" arg \"LabPass99\" wait 2ms\n    workstation <- legacy_mail pop3 ok response \"Logged in.\" wait 1ms\n    workstation -> legacy_mail pop3 cmd \"STAT\" wait 1ms\n    workstation <- legacy_mail pop3 ok response \"3 4096\" wait 1ms\n    workstation -> legacy_mail pop3 cmd \"QUIT\" wait 1ms\n    workstation <- legacy_mail pop3 ok response \"Logging out.\"\n}\n```","frasm_code":"host workstation { ip 172.16.16.40 }\nhost legacy_mail { ip 172.16.16.110 }\n\ncompile {\n    workstation -> legacy_mail tcp syn srcport 52110 dstport 110 win 65535 mss 1460 wait 1ms\n    workstation <- legacy_mail tcp syn ack win 65535 mss 1460 wait 1ms\n    workstation -> legacy_mail tcp ack wait 1ms\n    workstation <- legacy_mail pop3 ok response \"Dovecot POP3 ready.\" wait 2ms\n    workstation -> legacy_mail pop3 cmd \"USER\" arg \"ops_scanner\" wait 1ms\n    workstation <- legacy_mail pop3 ok response \"Pass required\" wait 1ms\n    workstation -> legacy_mail pop3 cmd \"PASS\" arg \"BadPass1\" wait 4ms\n    workstation <- legacy_mail pop3 err response \"[AUTH] Authentication failed.\" wait 5ms\n    workstation -> legacy_mail pop3 cmd \"USER\" arg \"ops_scanner\" wait 1ms\n    workstation <- legacy_mail pop3 ok wait 1ms\n    workstation -> legacy_mail pop3 cmd \"PASS\" arg \"LabPass99\" wait 2ms\n    workstation <- legacy_mail pop3 ok response \"Logged in.\" wait 1ms\n    workstation -> legacy_mail pop3 cmd \"STAT\" wait 1ms\n    workstation <- legacy_mail pop3 ok response \"3 4096\" wait 1ms\n    workstation -> legacy_mail pop3 cmd \"QUIT\" wait 1ms\n    workstation <- legacy_mail pop3 ok response \"Logging out.\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"POP3 (`pop3`): POP3 Failed Login (`-ERR`) + Successful Mailbox `STAT` & `QUIT`\" (pop3_session_audit.frasm). Scenario: Establishes a TCP 110 session, captures a rejected password attempt (`err`), then completes `USER` -> `PASS` -> `STAT` -> `QUIT`. Verify with Wireshark filter `pop`."},{"role":"assistant","content":"Defaults to TCP destination port `110` (`psh ack`) and appends `\r\n` per RFC 1939. Formats `+OK <response>\r\n` on `ok` and `-ERR <response>\r\n` on `err`. Compile with `frameassembly show pop3_session_audit.frasm`.\n\n```frameassembly\nhost workstation { ip 172.16.16.40 }\nhost legacy_mail { ip 172.16.16.110 }\n\ncompile {\n    workstation -> legacy_mail tcp syn srcport 52110 dstport 110 win 65535 mss 1460 wait 1ms\n    workstation <- legacy_mail tcp syn ack win 65535 mss 1460 wait 1ms\n    workstation -> legacy_mail tcp ack wait 1ms\n    workstation <- legacy_mail pop3 ok response \"Dovecot POP3 ready.\" wait 2ms\n    workstation -> legacy_mail pop3 cmd \"USER\" arg \"ops_scanner\" wait 1ms\n    workstation <- legacy_mail pop3 ok response \"Pass required\" wait 1ms\n    workstation -> legacy_mail pop3 cmd \"PASS\" arg \"BadPass1\" wait 4ms\n    workstation <- legacy_mail pop3 err response \"[AUTH] Authentication failed.\" wait 5ms\n    workstation -> legacy_mail pop3 cmd \"USER\" arg \"ops_scanner\" wait 1ms\n    workstation <- legacy_mail pop3 ok wait 1ms\n    workstation -> legacy_mail pop3 cmd \"PASS\" arg \"LabPass99\" wait 2ms\n    workstation <- legacy_mail pop3 ok response \"Logged in.\" wait 1ms\n    workstation -> legacy_mail pop3 cmd \"STAT\" wait 1ms\n    workstation <- legacy_mail pop3 ok response \"3 4096\" wait 1ms\n    workstation -> legacy_mail pop3 cmd \"QUIT\" wait 1ms\n    workstation <- legacy_mail pop3 ok response \"Logging out.\"\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-snmp1","task_type":"nl_to_frasm","protocols":["snmp1"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SNMPv1 (`snmp1`): SNMPv1 System MIB Poll (`sysDescr.0` / `sysName.0`) + ColdStart & Enterprise Traps\" (snmp1_poll_and_traps.frasm). Scenario: Polls `sysDescr.0` on UDP 161, returns a multi-varbind `response`, and emits both a standard `gentrap 0` (`coldStart`) and an `enterpriseSpecific` (`gentrap 6`) hardware alarm trap on UDP 162. Verify with Wireshark filter `snmp`.","completion":"Selects UDP `dstport 162` automatically for `trap` (the default PDU) and UDP `161` (with `161 -> ephemeral` port reversal on `<- response`) for `get`, `getnext`, `set`, and `response`. Encodes dotted numeric OIDs (`1.3.6.1.4.1.318` or `.1.3.6.1...`) into compact ASN.1 BER base-128 VLQ octets (`0x2b 0x06 0x01 ...`) and computes nested SEQUENCE lengths. Compile with `frameassembly show snmp1_poll_and_traps.frasm`.\n\n```frameassembly\nhost poller   { ip 172.16.40.10 }\nhost legacy_sw { ip 172.16.40.25 }\n\ncompile {\n    // 1. Poll sysDescr.0 (1.3.6.1.2.1.1.1.0) on UDP 161\n    poller -> legacy_sw snmp1 get community \"ops-ro\" reqid 1001 oid 1.3.6.1.2.1.1.1.0 wait 2ms\n    poller <- legacy_sw snmp1 response community \"ops-ro\" reqid 1001 varbind 1.3.6.1.2.1.1.1.0 string \"Managed L2 Switch v4.2\" varbind 1.3.6.1.2.1.1.3.0 timeticks 8640000 wait 5ms\n    // 2. Generic coldStart trap (gentrap 0, spectrap 0) on UDP 162\n    legacy_sw -> poller snmp1 trap community \"ops-ro\" enterprise 1.3.6.1.4.1.9.1.516 agentip 172.16.40.25 gentrap 0 spectrap 0 sysuptime 120 wait 2ms\n    // 3. Enterprise-specific PSU fault trap (gentrap 6, spectrap 42) with typed varbinds\n    legacy_sw -> poller snmp1 trap community \"ops-ro\" enterprise 1.3.6.1.4.1.9.9.13 gentrap 6 spectrap 42 sysuptime 45000 varbind 1.3.6.1.2.1.1.5.0 string \"sw-idf-03\" varbind 1.3.6.1.4.1.9.9.13.1.5.1.3.1 int 4\n}\n```","frasm_code":"host poller   { ip 172.16.40.10 }\nhost legacy_sw { ip 172.16.40.25 }\n\ncompile {\n    // 1. Poll sysDescr.0 (1.3.6.1.2.1.1.1.0) on UDP 161\n    poller -> legacy_sw snmp1 get community \"ops-ro\" reqid 1001 oid 1.3.6.1.2.1.1.1.0 wait 2ms\n    poller <- legacy_sw snmp1 response community \"ops-ro\" reqid 1001 varbind 1.3.6.1.2.1.1.1.0 string \"Managed L2 Switch v4.2\" varbind 1.3.6.1.2.1.1.3.0 timeticks 8640000 wait 5ms\n    // 2. Generic coldStart trap (gentrap 0, spectrap 0) on UDP 162\n    legacy_sw -> poller snmp1 trap community \"ops-ro\" enterprise 1.3.6.1.4.1.9.1.516 agentip 172.16.40.25 gentrap 0 spectrap 0 sysuptime 120 wait 2ms\n    // 3. Enterprise-specific PSU fault trap (gentrap 6, spectrap 42) with typed varbinds\n    legacy_sw -> poller snmp1 trap community \"ops-ro\" enterprise 1.3.6.1.4.1.9.9.13 gentrap 6 spectrap 42 sysuptime 45000 varbind 1.3.6.1.2.1.1.5.0 string \"sw-idf-03\" varbind 1.3.6.1.4.1.9.9.13.1.5.1.3.1 int 4\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SNMPv1 (`snmp1`): SNMPv1 System MIB Poll (`sysDescr.0` / `sysName.0`) + ColdStart & Enterprise Traps\" (snmp1_poll_and_traps.frasm). Scenario: Polls `sysDescr.0` on UDP 161, returns a multi-varbind `response`, and emits both a standard `gentrap 0` (`coldStart`) and an `enterpriseSpecific` (`gentrap 6`) hardware alarm trap on UDP 162. Verify with Wireshark filter `snmp`."},{"role":"assistant","content":"Selects UDP `dstport 162` automatically for `trap` (the default PDU) and UDP `161` (with `161 -> ephemeral` port reversal on `<- response`) for `get`, `getnext`, `set`, and `response`. Encodes dotted numeric OIDs (`1.3.6.1.4.1.318` or `.1.3.6.1...`) into compact ASN.1 BER base-128 VLQ octets (`0x2b 0x06 0x01 ...`) and computes nested SEQUENCE lengths. Compile with `frameassembly show snmp1_poll_and_traps.frasm`.\n\n```frameassembly\nhost poller   { ip 172.16.40.10 }\nhost legacy_sw { ip 172.16.40.25 }\n\ncompile {\n    // 1. Poll sysDescr.0 (1.3.6.1.2.1.1.1.0) on UDP 161\n    poller -> legacy_sw snmp1 get community \"ops-ro\" reqid 1001 oid 1.3.6.1.2.1.1.1.0 wait 2ms\n    poller <- legacy_sw snmp1 response community \"ops-ro\" reqid 1001 varbind 1.3.6.1.2.1.1.1.0 string \"Managed L2 Switch v4.2\" varbind 1.3.6.1.2.1.1.3.0 timeticks 8640000 wait 5ms\n    // 2. Generic coldStart trap (gentrap 0, spectrap 0) on UDP 162\n    legacy_sw -> poller snmp1 trap community \"ops-ro\" enterprise 1.3.6.1.4.1.9.1.516 agentip 172.16.40.25 gentrap 0 spectrap 0 sysuptime 120 wait 2ms\n    // 3. Enterprise-specific PSU fault trap (gentrap 6, spectrap 42) with typed varbinds\n    legacy_sw -> poller snmp1 trap community \"ops-ro\" enterprise 1.3.6.1.4.1.9.9.13 gentrap 6 spectrap 42 sysuptime 45000 varbind 1.3.6.1.2.1.1.5.0 string \"sw-idf-03\" varbind 1.3.6.1.4.1.9.9.13.1.5.1.3.1 int 4\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-snmp2","task_type":"nl_to_frasm","protocols":["snmp2"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SNMPv2c (`snmp2`): ifXTable 64-Bit Counter Walk + Acknowledged SNMPv2c LinkDown Inform\" (snmp2_getbulk_and_inform.frasm). Scenario: Walks 64-bit high-capacity interface counters via `getbulk` on UDP 161, then delivers a reliable `snmp2 inform` (`linkDown` `1.3.6.1.6.3.1.1.5.3`) on UDP 162 with manager `response` acknowledgment. Verify with Wireshark filter `snmp`.","completion":"Encodes `GetBulkRequest` (`0xa5`) overloading the BER error-status and error-index slots with `nonrepeaters` (default `0`) and `maxrepetitions` (default `10`) per RFC 3416. Automatically prepends `1.3.6.1.2.1.1.3.0` (`sysUpTime.0` `TimeTicks`) on `trap` (`0xa7`), `inform` (`0xa6`), and `report` (`0xa8`) when `sysuptime` is specified. Compile with `frameassembly show snmp2_getbulk_and_inform.frasm`.\n\n```frameassembly\nhost nms_poller { ip 10.30.10.20 }\nhost dist_sw    { ip 10.30.10.1 }\n\ncompile {\n    // 1. High-capacity 64-bit interface counter bulk poll on UDP 161\n    nms_poller -> dist_sw snmp2 getbulk community \"infra-ro\" reqid 2001 nonrepeaters 1 maxrepetitions 5 varbind 1.3.6.1.2.1.1.3.0 null varbind 1.3.6.1.2.1.31.1.1.1.6 null wait 2ms\n    nms_poller <- dist_sw snmp2 response community \"infra-ro\" reqid 2001 varbind 1.3.6.1.2.1.1.3.0 timeticks 43200000 varbind 1.3.6.1.2.1.31.1.1.1.6.101 counter64 184502910440 varbind 1.3.6.1.2.1.31.1.1.1.1.101 string \"TenGigabitEthernet1/0/1\" wait 5ms\n    // 2. Acknowledged SNMPv2c InformRequest for linkDown (1.3.6.1.6.3.1.1.5.3) on UDP 162\n    dist_sw -> nms_poller snmp2 inform community \"infra-trap\" reqid 9001 sysuptime 43200500 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.1.101 int 101 varbind 1.3.6.1.2.1.2.2.1.8.101 int 2 wait 1ms\n    dist_sw <- nms_poller snmp2 response community \"infra-trap\" reqid 9001 varbind 1.3.6.1.2.1.1.3.0 timeticks 43200500 varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.6.3.1.1.5.3\n}\n```","frasm_code":"host nms_poller { ip 10.30.10.20 }\nhost dist_sw    { ip 10.30.10.1 }\n\ncompile {\n    // 1. High-capacity 64-bit interface counter bulk poll on UDP 161\n    nms_poller -> dist_sw snmp2 getbulk community \"infra-ro\" reqid 2001 nonrepeaters 1 maxrepetitions 5 varbind 1.3.6.1.2.1.1.3.0 null varbind 1.3.6.1.2.1.31.1.1.1.6 null wait 2ms\n    nms_poller <- dist_sw snmp2 response community \"infra-ro\" reqid 2001 varbind 1.3.6.1.2.1.1.3.0 timeticks 43200000 varbind 1.3.6.1.2.1.31.1.1.1.6.101 counter64 184502910440 varbind 1.3.6.1.2.1.31.1.1.1.1.101 string \"TenGigabitEthernet1/0/1\" wait 5ms\n    // 2. Acknowledged SNMPv2c InformRequest for linkDown (1.3.6.1.6.3.1.1.5.3) on UDP 162\n    dist_sw -> nms_poller snmp2 inform community \"infra-trap\" reqid 9001 sysuptime 43200500 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.1.101 int 101 varbind 1.3.6.1.2.1.2.2.1.8.101 int 2 wait 1ms\n    dist_sw <- nms_poller snmp2 response community \"infra-trap\" reqid 9001 varbind 1.3.6.1.2.1.1.3.0 timeticks 43200500 varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.6.3.1.1.5.3\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SNMPv2c (`snmp2`): ifXTable 64-Bit Counter Walk + Acknowledged SNMPv2c LinkDown Inform\" (snmp2_getbulk_and_inform.frasm). Scenario: Walks 64-bit high-capacity interface counters via `getbulk` on UDP 161, then delivers a reliable `snmp2 inform` (`linkDown` `1.3.6.1.6.3.1.1.5.3`) on UDP 162 with manager `response` acknowledgment. Verify with Wireshark filter `snmp`."},{"role":"assistant","content":"Encodes `GetBulkRequest` (`0xa5`) overloading the BER error-status and error-index slots with `nonrepeaters` (default `0`) and `maxrepetitions` (default `10`) per RFC 3416. Automatically prepends `1.3.6.1.2.1.1.3.0` (`sysUpTime.0` `TimeTicks`) on `trap` (`0xa7`), `inform` (`0xa6`), and `report` (`0xa8`) when `sysuptime` is specified. Compile with `frameassembly show snmp2_getbulk_and_inform.frasm`.\n\n```frameassembly\nhost nms_poller { ip 10.30.10.20 }\nhost dist_sw    { ip 10.30.10.1 }\n\ncompile {\n    // 1. High-capacity 64-bit interface counter bulk poll on UDP 161\n    nms_poller -> dist_sw snmp2 getbulk community \"infra-ro\" reqid 2001 nonrepeaters 1 maxrepetitions 5 varbind 1.3.6.1.2.1.1.3.0 null varbind 1.3.6.1.2.1.31.1.1.1.6 null wait 2ms\n    nms_poller <- dist_sw snmp2 response community \"infra-ro\" reqid 2001 varbind 1.3.6.1.2.1.1.3.0 timeticks 43200000 varbind 1.3.6.1.2.1.31.1.1.1.6.101 counter64 184502910440 varbind 1.3.6.1.2.1.31.1.1.1.1.101 string \"TenGigabitEthernet1/0/1\" wait 5ms\n    // 2. Acknowledged SNMPv2c InformRequest for linkDown (1.3.6.1.6.3.1.1.5.3) on UDP 162\n    dist_sw -> nms_poller snmp2 inform community \"infra-trap\" reqid 9001 sysuptime 43200500 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.1.101 int 101 varbind 1.3.6.1.2.1.2.2.1.8.101 int 2 wait 1ms\n    dist_sw <- nms_poller snmp2 response community \"infra-trap\" reqid 9001 varbind 1.3.6.1.2.1.1.3.0 timeticks 43200500 varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.6.3.1.1.5.3\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-snmp3","task_type":"nl_to_frasm","protocols":["snmp3"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SNMPv3 USM (authPriv) (`snmp3`): Full RFC 3414 Engine Discovery (`report`) + SHA-256/AES-128 `authPriv` Poll & Trap\" (snmp3_usm_discovery_and_authpriv.frasm). Scenario: Walks through RFC 3414 USM engine discovery (`usmStatsUnknownEngineIDs.0`), authenticated/encrypted `get` + `response` on UDP 161, and an `authPriv` encrypted `snmp3 trap` on UDP 162. Verify with Wireshark filter `snmp`.","completion":"Derives `msgFlags` automatically from provided credentials: `noAuthNoPriv` (neither set), `authNoPriv` (`auth` only), or `authPriv` (`auth` + `priv`, setting `0x03`, plus `0x04` Reportable on requests/informs). Runs RFC 3414 / RFC 7860 password-to-key (`Ku`, 1 MiB expansion) and engine-localized (`Kul`) derivation for `md5`, `sha` (SHA-1), `sha256`, `sha384`, and `sha512`. Compile with `frameassembly show snmp3_usm_discovery_and_authpriv.frasm`.\n\n```frameassembly\nhost zabbix_srv { ip 172.18.10.50 }\nhost core_rtr   { ip 172.18.10.1 }\n\ncompile {\n    // 1. Unauthenticated USM EngineID discovery probe -> Agent replies with Report PDU\n    zabbix_srv -> core_rtr snmp3 get user \"\" reqid 100 wait 1ms\n    zabbix_srv <- core_rtr snmp3 report user \"\" engineid \"80001f8880aabbccdd\" engineboots 5 enginetime 8420 reqid 100 varbind 1.3.6.1.6.3.15.1.1.4.0 counter32 1 wait 3ms\n    // 2. Encrypted authPriv (HMAC-SHA-256 + AES-128-CFB) GET & RESPONSE on UDP 161\n    zabbix_srv -> core_rtr snmp3 get user \"nms-v3-prod\" engineid \"80001f8880aabbccdd\" engineboots 5 enginetime 8420 auth sha256 \"StrongAuthKey2026!\" priv aes \"StrongPrivKey2026!\" reqid 101 oid 1.3.6.1.2.1.1.5.0 wait 2ms\n    zabbix_srv <- core_rtr snmp3 response user \"nms-v3-prod\" engineid \"80001f8880aabbccdd\" engineboots 5 enginetime 8420 auth sha256 \"StrongAuthKey2026!\" priv aes \"StrongPrivKey2026!\" reqid 101 varbind 1.3.6.1.2.1.1.5.0 string \"core-rtr-fra1.internal\" wait 5ms\n    // 3. Encrypted authPriv SNMPv3 Trap on UDP 162 (authoritative sender = core_rtr)\n    core_rtr -> zabbix_srv snmp3 trap user \"nms-v3-prod\" engineid \"80001f8880aabbccdd\" engineboots 5 enginetime 8425 auth sha256 \"StrongAuthKey2026!\" priv aes \"StrongPrivKey2026!\" sysuptime 842500 varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.6.3.1.1.5.4 varbind 1.3.6.1.2.1.2.2.1.2.1 string \"HundredGigE0/0/0/1\"\n}\n```","frasm_code":"host zabbix_srv { ip 172.18.10.50 }\nhost core_rtr   { ip 172.18.10.1 }\n\ncompile {\n    // 1. Unauthenticated USM EngineID discovery probe -> Agent replies with Report PDU\n    zabbix_srv -> core_rtr snmp3 get user \"\" reqid 100 wait 1ms\n    zabbix_srv <- core_rtr snmp3 report user \"\" engineid \"80001f8880aabbccdd\" engineboots 5 enginetime 8420 reqid 100 varbind 1.3.6.1.6.3.15.1.1.4.0 counter32 1 wait 3ms\n    // 2. Encrypted authPriv (HMAC-SHA-256 + AES-128-CFB) GET & RESPONSE on UDP 161\n    zabbix_srv -> core_rtr snmp3 get user \"nms-v3-prod\" engineid \"80001f8880aabbccdd\" engineboots 5 enginetime 8420 auth sha256 \"StrongAuthKey2026!\" priv aes \"StrongPrivKey2026!\" reqid 101 oid 1.3.6.1.2.1.1.5.0 wait 2ms\n    zabbix_srv <- core_rtr snmp3 response user \"nms-v3-prod\" engineid \"80001f8880aabbccdd\" engineboots 5 enginetime 8420 auth sha256 \"StrongAuthKey2026!\" priv aes \"StrongPrivKey2026!\" reqid 101 varbind 1.3.6.1.2.1.1.5.0 string \"core-rtr-fra1.internal\" wait 5ms\n    // 3. Encrypted authPriv SNMPv3 Trap on UDP 162 (authoritative sender = core_rtr)\n    core_rtr -> zabbix_srv snmp3 trap user \"nms-v3-prod\" engineid \"80001f8880aabbccdd\" engineboots 5 enginetime 8425 auth sha256 \"StrongAuthKey2026!\" priv aes \"StrongPrivKey2026!\" sysuptime 842500 varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.6.3.1.1.5.4 varbind 1.3.6.1.2.1.2.2.1.2.1 string \"HundredGigE0/0/0/1\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"SNMPv3 USM (authPriv) (`snmp3`): Full RFC 3414 Engine Discovery (`report`) + SHA-256/AES-128 `authPriv` Poll & Trap\" (snmp3_usm_discovery_and_authpriv.frasm). Scenario: Walks through RFC 3414 USM engine discovery (`usmStatsUnknownEngineIDs.0`), authenticated/encrypted `get` + `response` on UDP 161, and an `authPriv` encrypted `snmp3 trap` on UDP 162. Verify with Wireshark filter `snmp`."},{"role":"assistant","content":"Derives `msgFlags` automatically from provided credentials: `noAuthNoPriv` (neither set), `authNoPriv` (`auth` only), or `authPriv` (`auth` + `priv`, setting `0x03`, plus `0x04` Reportable on requests/informs). Runs RFC 3414 / RFC 7860 password-to-key (`Ku`, 1 MiB expansion) and engine-localized (`Kul`) derivation for `md5`, `sha` (SHA-1), `sha256`, `sha384`, and `sha512`. Compile with `frameassembly show snmp3_usm_discovery_and_authpriv.frasm`.\n\n```frameassembly\nhost zabbix_srv { ip 172.18.10.50 }\nhost core_rtr   { ip 172.18.10.1 }\n\ncompile {\n    // 1. Unauthenticated USM EngineID discovery probe -> Agent replies with Report PDU\n    zabbix_srv -> core_rtr snmp3 get user \"\" reqid 100 wait 1ms\n    zabbix_srv <- core_rtr snmp3 report user \"\" engineid \"80001f8880aabbccdd\" engineboots 5 enginetime 8420 reqid 100 varbind 1.3.6.1.6.3.15.1.1.4.0 counter32 1 wait 3ms\n    // 2. Encrypted authPriv (HMAC-SHA-256 + AES-128-CFB) GET & RESPONSE on UDP 161\n    zabbix_srv -> core_rtr snmp3 get user \"nms-v3-prod\" engineid \"80001f8880aabbccdd\" engineboots 5 enginetime 8420 auth sha256 \"StrongAuthKey2026!\" priv aes \"StrongPrivKey2026!\" reqid 101 oid 1.3.6.1.2.1.1.5.0 wait 2ms\n    zabbix_srv <- core_rtr snmp3 response user \"nms-v3-prod\" engineid \"80001f8880aabbccdd\" engineboots 5 enginetime 8420 auth sha256 \"StrongAuthKey2026!\" priv aes \"StrongPrivKey2026!\" reqid 101 varbind 1.3.6.1.2.1.1.5.0 string \"core-rtr-fra1.internal\" wait 5ms\n    // 3. Encrypted authPriv SNMPv3 Trap on UDP 162 (authoritative sender = core_rtr)\n    core_rtr -> zabbix_srv snmp3 trap user \"nms-v3-prod\" engineid \"80001f8880aabbccdd\" engineboots 5 enginetime 8425 auth sha256 \"StrongAuthKey2026!\" priv aes \"StrongPrivKey2026!\" sysuptime 842500 varbind 1.3.6.1.6.3.1.1.4.1.0 oidval 1.3.6.1.6.3.1.1.5.4 varbind 1.3.6.1.2.1.2.2.1.2.1 string \"HundredGigE0/0/0/1\"\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-syslog","task_type":"nl_to_frasm","protocols":["syslog","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Syslog (`syslog`): Multi-Severity Security Audit over UDP 514 & Reliable TCP 514\" (syslog_siem_pipeline.frasm). Scenario: Sends a firewall drop alert and OSPF adjacency warning over UDP 514, then opens a TCP 514 session to deliver a high-priority authentication alert. Verify with Wireshark filter `syslog`.","completion":"Computes `<PRI> = facility * 8 + severity` automatically (default `facility 16` `local0`, `severity 6` `info` -> `<134>`). Formats a complete RFC 5424 `<PRI>1 TIMESTAMP HOSTNAME APP PROCID MSGID - MSG` wire payload that Wireshark and syslog-ng/rsyslog parse out of the box. Compile with `frameassembly show syslog_siem_pipeline.frasm`.\n\n```frameassembly\nhost branch_fw { ip 172.16.1.1 }\nhost log_relay { ip 172.16.100.10 }\n\ncompile {\n    // 1. Stateless UDP 514 security & routing logs\n    branch_fw -> log_relay syslog facility 4 severity 4 hostname \"branch-fw-01\" app \"filterlog\" msgid \"DROP\" msg \"Blocked TCP SYN 203.0.113.99:44112 -> 172.16.1.10:3389\" wait 2ms\n    branch_fw -> log_relay syslog facility 16 severity 3 hostname \"branch-fw-01\" app \"ospfd\" msgid \"ADJCHG\" msg \"Neighbor 172.16.0.2 Down: Dead timer expired\" wait 4ms\n    // 2. Reliable TCP 514 syslog stream (transport tcp)\n    branch_fw -> log_relay tcp syn srcport 52514 dstport 514 win 65535 mss 1460 wait 1ms\n    branch_fw <- log_relay tcp syn ack win 65535 mss 1460 wait 1ms\n    branch_fw -> log_relay tcp ack wait 1ms\n    branch_fw -> log_relay syslog facility 10 severity 2 hostname \"branch-fw-01\" app \"sudo\" procid \"4812\" msg \"Critical privilege escalation alert\" transport tcp\n}\n```","frasm_code":"host branch_fw { ip 172.16.1.1 }\nhost log_relay { ip 172.16.100.10 }\n\ncompile {\n    // 1. Stateless UDP 514 security & routing logs\n    branch_fw -> log_relay syslog facility 4 severity 4 hostname \"branch-fw-01\" app \"filterlog\" msgid \"DROP\" msg \"Blocked TCP SYN 203.0.113.99:44112 -> 172.16.1.10:3389\" wait 2ms\n    branch_fw -> log_relay syslog facility 16 severity 3 hostname \"branch-fw-01\" app \"ospfd\" msgid \"ADJCHG\" msg \"Neighbor 172.16.0.2 Down: Dead timer expired\" wait 4ms\n    // 2. Reliable TCP 514 syslog stream (transport tcp)\n    branch_fw -> log_relay tcp syn srcport 52514 dstport 514 win 65535 mss 1460 wait 1ms\n    branch_fw <- log_relay tcp syn ack win 65535 mss 1460 wait 1ms\n    branch_fw -> log_relay tcp ack wait 1ms\n    branch_fw -> log_relay syslog facility 10 severity 2 hostname \"branch-fw-01\" app \"sudo\" procid \"4812\" msg \"Critical privilege escalation alert\" transport tcp\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Syslog (`syslog`): Multi-Severity Security Audit over UDP 514 & Reliable TCP 514\" (syslog_siem_pipeline.frasm). Scenario: Sends a firewall drop alert and OSPF adjacency warning over UDP 514, then opens a TCP 514 session to deliver a high-priority authentication alert. Verify with Wireshark filter `syslog`."},{"role":"assistant","content":"Computes `<PRI> = facility * 8 + severity` automatically (default `facility 16` `local0`, `severity 6` `info` -> `<134>`). Formats a complete RFC 5424 `<PRI>1 TIMESTAMP HOSTNAME APP PROCID MSGID - MSG` wire payload that Wireshark and syslog-ng/rsyslog parse out of the box. Compile with `frameassembly show syslog_siem_pipeline.frasm`.\n\n```frameassembly\nhost branch_fw { ip 172.16.1.1 }\nhost log_relay { ip 172.16.100.10 }\n\ncompile {\n    // 1. Stateless UDP 514 security & routing logs\n    branch_fw -> log_relay syslog facility 4 severity 4 hostname \"branch-fw-01\" app \"filterlog\" msgid \"DROP\" msg \"Blocked TCP SYN 203.0.113.99:44112 -> 172.16.1.10:3389\" wait 2ms\n    branch_fw -> log_relay syslog facility 16 severity 3 hostname \"branch-fw-01\" app \"ospfd\" msgid \"ADJCHG\" msg \"Neighbor 172.16.0.2 Down: Dead timer expired\" wait 4ms\n    // 2. Reliable TCP 514 syslog stream (transport tcp)\n    branch_fw -> log_relay tcp syn srcport 52514 dstport 514 win 65535 mss 1460 wait 1ms\n    branch_fw <- log_relay tcp syn ack win 65535 mss 1460 wait 1ms\n    branch_fw -> log_relay tcp ack wait 1ms\n    branch_fw -> log_relay syslog facility 10 severity 2 hostname \"branch-fw-01\" app \"sudo\" procid \"4812\" msg \"Critical privilege escalation alert\" transport tcp\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-netflow","task_type":"nl_to_frasm","protocols":["netflow"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"NetFlow v5 (`netflow`): Multi-Flow Export: HTTPS Upload Spike, DNS Lookup & ICMP Probe\" (netflow_collector_test.frasm). Scenario: Exports three sequential NetFlow v5 records from a border router representing a large HTTPS transfer, a UDP DNS query, and an ICMP ping flow. Verify with Wireshark filter `cflow`.","completion":"Defaults UDP destination port to `2055` and builds the exact 24-byte NetFlow v5 header + 48-byte flow record (`72` UDP payload bytes). Populates protocol defaults (`proto 6` TCP, `packets 10`, `octets 1500`) whenever counters are omitted. Compile with `frameassembly show netflow_collector_test.frasm`.\n\n```frameassembly\nhost border_rtr     { ip 172.16.0.1 }\nhost flow_collector { ip 172.16.100.55 }\n\ncompile {\n    // 1. Large outbound HTTPS transfer (proto 6 = TCP)\n    border_rtr -> flow_collector netflow srcip 10.20.5.14 dstip 203.0.113.80 srcport 54120 dstport 443 proto 6 packets 8500 octets 12240000 wait 2ms\n    // 2. Internal-to-DMZ DNS flow (proto 17 = UDP)\n    border_rtr -> flow_collector netflow srcip 10.20.5.14 dstip 172.16.10.53 srcport 59102 dstport 53 proto 17 packets 2 octets 148 wait 2ms\n    // 3. ICMP reachability flow (proto 1 = ICMP)\n    border_rtr -> flow_collector netflow srcip 10.20.5.14 dstip 8.8.8.8 srcport 0 dstport 0 proto 1 packets 4 octets 336\n}\n```","frasm_code":"host border_rtr     { ip 172.16.0.1 }\nhost flow_collector { ip 172.16.100.55 }\n\ncompile {\n    // 1. Large outbound HTTPS transfer (proto 6 = TCP)\n    border_rtr -> flow_collector netflow srcip 10.20.5.14 dstip 203.0.113.80 srcport 54120 dstport 443 proto 6 packets 8500 octets 12240000 wait 2ms\n    // 2. Internal-to-DMZ DNS flow (proto 17 = UDP)\n    border_rtr -> flow_collector netflow srcip 10.20.5.14 dstip 172.16.10.53 srcport 59102 dstport 53 proto 17 packets 2 octets 148 wait 2ms\n    // 3. ICMP reachability flow (proto 1 = ICMP)\n    border_rtr -> flow_collector netflow srcip 10.20.5.14 dstip 8.8.8.8 srcport 0 dstport 0 proto 1 packets 4 octets 336\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"NetFlow v5 (`netflow`): Multi-Flow Export: HTTPS Upload Spike, DNS Lookup & ICMP Probe\" (netflow_collector_test.frasm). Scenario: Exports three sequential NetFlow v5 records from a border router representing a large HTTPS transfer, a UDP DNS query, and an ICMP ping flow. Verify with Wireshark filter `cflow`."},{"role":"assistant","content":"Defaults UDP destination port to `2055` and builds the exact 24-byte NetFlow v5 header + 48-byte flow record (`72` UDP payload bytes). Populates protocol defaults (`proto 6` TCP, `packets 10`, `octets 1500`) whenever counters are omitted. Compile with `frameassembly show netflow_collector_test.frasm`.\n\n```frameassembly\nhost border_rtr     { ip 172.16.0.1 }\nhost flow_collector { ip 172.16.100.55 }\n\ncompile {\n    // 1. Large outbound HTTPS transfer (proto 6 = TCP)\n    border_rtr -> flow_collector netflow srcip 10.20.5.14 dstip 203.0.113.80 srcport 54120 dstport 443 proto 6 packets 8500 octets 12240000 wait 2ms\n    // 2. Internal-to-DMZ DNS flow (proto 17 = UDP)\n    border_rtr -> flow_collector netflow srcip 10.20.5.14 dstip 172.16.10.53 srcport 59102 dstport 53 proto 17 packets 2 octets 148 wait 2ms\n    // 3. ICMP reachability flow (proto 1 = ICMP)\n    border_rtr -> flow_collector netflow srcip 10.20.5.14 dstip 8.8.8.8 srcport 0 dstport 0 proto 1 packets 4 octets 336\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-ipfix","task_type":"nl_to_frasm","protocols":["ipfix"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IPFIX (`ipfix`): Mixed IPv4 & IPv6 VRF Flow Telemetry to an IPFIX Collector\" (ipfix_dualstack_flows.frasm). Scenario: Exports an IPv4 enterprise HTTPS flow (`domainid 10`) followed by an IPv6 service-mesh gRPC flow (`domainid 20`) to UDP port 4739. Verify with Wireshark filter `cflow.version == 10`.","completion":"Defaults to UDP destination port `4739` and builds the 16-byte IPFIX Version `0x000a` header with exact total message length and Observation Domain ID. Bundles a self-describing Template Set (`Set ID 2`, Template ID `256`) plus the Data Set (`Set ID 256`) in one UDP datagram. Compile with `frameassembly show ipfix_dualstack_flows.frasm`.\n\n```frameassembly\nhost spine_exporter { ip 172.20.0.1 }\nhost ipfix_ingest   { ip 172.20.50.10 }\n\ncompile {\n    // 1. VRF 10 IPv4 flow record\n    spine_exporter -> ipfix_ingest ipfix domainid 10 srcip 10.100.4.15 dstip 203.0.113.44 srcport 50112 dstport 443 proto 6 packets 420 octets 512000 wait 3ms\n    // 2. VRF 20 IPv6 flow record over the same exporter session\n    spine_exporter -> ipfix_ingest ipfix domainid 20 srcip 2001:db8:20::15 dstip 2001:db8:99::5051 srcport 54200 dstport 50051 proto 6 packets 95 octets 84000\n}\n```","frasm_code":"host spine_exporter { ip 172.20.0.1 }\nhost ipfix_ingest   { ip 172.20.50.10 }\n\ncompile {\n    // 1. VRF 10 IPv4 flow record\n    spine_exporter -> ipfix_ingest ipfix domainid 10 srcip 10.100.4.15 dstip 203.0.113.44 srcport 50112 dstport 443 proto 6 packets 420 octets 512000 wait 3ms\n    // 2. VRF 20 IPv6 flow record over the same exporter session\n    spine_exporter -> ipfix_ingest ipfix domainid 20 srcip 2001:db8:20::15 dstip 2001:db8:99::5051 srcport 54200 dstport 50051 proto 6 packets 95 octets 84000\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"IPFIX (`ipfix`): Mixed IPv4 & IPv6 VRF Flow Telemetry to an IPFIX Collector\" (ipfix_dualstack_flows.frasm). Scenario: Exports an IPv4 enterprise HTTPS flow (`domainid 10`) followed by an IPv6 service-mesh gRPC flow (`domainid 20`) to UDP port 4739. Verify with Wireshark filter `cflow.version == 10`."},{"role":"assistant","content":"Defaults to UDP destination port `4739` and builds the 16-byte IPFIX Version `0x000a` header with exact total message length and Observation Domain ID. Bundles a self-describing Template Set (`Set ID 2`, Template ID `256`) plus the Data Set (`Set ID 256`) in one UDP datagram. Compile with `frameassembly show ipfix_dualstack_flows.frasm`.\n\n```frameassembly\nhost spine_exporter { ip 172.20.0.1 }\nhost ipfix_ingest   { ip 172.20.50.10 }\n\ncompile {\n    // 1. VRF 10 IPv4 flow record\n    spine_exporter -> ipfix_ingest ipfix domainid 10 srcip 10.100.4.15 dstip 203.0.113.44 srcport 50112 dstport 443 proto 6 packets 420 octets 512000 wait 3ms\n    // 2. VRF 20 IPv6 flow record over the same exporter session\n    spine_exporter -> ipfix_ingest ipfix domainid 20 srcip 2001:db8:20::15 dstip 2001:db8:99::5051 srcport 54200 dstport 50051 proto 6 packets 95 octets 84000\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-sflow","task_type":"nl_to_frasm","protocols":["sflow"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"sFlow v5 (`sflow`): Multi-Switch Leaf-Spine sFlow v5 Telemetry Stream\" (sflow_leaf_spine.frasm). Scenario: Simulates two leaf switches exporting sequential sFlow v5 datagrams (including an IPv6 loopback agent IP) to a central collector. Verify with Wireshark filter `sflow`.","completion":"Defaults UDP destination port to `6343` and aligns all fields to 4-byte XDR boundaries per the sFlow v5 specification. Sets Agent Address Type to `1` (4-byte IPv4) or `2` (16-byte IPv6) automatically from `agentip`. Compile with `frameassembly show sflow_leaf_spine.frasm`.\n\n```frameassembly\nhost leaf_01   { ip 172.18.1.11 }\nhost leaf_02   { ip 172.18.1.12 }\nhost collector { ip 172.18.100.50 }\n\ncompile {\n    leaf_01 -> collector sflow agentip 172.18.1.11 subagentid 0 seq 101 uptime 450000 samples 1 wait 2ms\n    leaf_01 -> collector sflow agentip 172.18.1.11 subagentid 0 seq 102 uptime 451000 samples 1 wait 2ms\n    leaf_02 -> collector sflow agentip 2001:db8:18::12 subagentid 1 seq 55 uptime 820000 samples 1\n}\n```","frasm_code":"host leaf_01   { ip 172.18.1.11 }\nhost leaf_02   { ip 172.18.1.12 }\nhost collector { ip 172.18.100.50 }\n\ncompile {\n    leaf_01 -> collector sflow agentip 172.18.1.11 subagentid 0 seq 101 uptime 450000 samples 1 wait 2ms\n    leaf_01 -> collector sflow agentip 172.18.1.11 subagentid 0 seq 102 uptime 451000 samples 1 wait 2ms\n    leaf_02 -> collector sflow agentip 2001:db8:18::12 subagentid 1 seq 55 uptime 820000 samples 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"sFlow v5 (`sflow`): Multi-Switch Leaf-Spine sFlow v5 Telemetry Stream\" (sflow_leaf_spine.frasm). Scenario: Simulates two leaf switches exporting sequential sFlow v5 datagrams (including an IPv6 loopback agent IP) to a central collector. Verify with Wireshark filter `sflow`."},{"role":"assistant","content":"Defaults UDP destination port to `6343` and aligns all fields to 4-byte XDR boundaries per the sFlow v5 specification. Sets Agent Address Type to `1` (4-byte IPv4) or `2` (16-byte IPv6) automatically from `agentip`. Compile with `frameassembly show sflow_leaf_spine.frasm`.\n\n```frameassembly\nhost leaf_01   { ip 172.18.1.11 }\nhost leaf_02   { ip 172.18.1.12 }\nhost collector { ip 172.18.100.50 }\n\ncompile {\n    leaf_01 -> collector sflow agentip 172.18.1.11 subagentid 0 seq 101 uptime 450000 samples 1 wait 2ms\n    leaf_01 -> collector sflow agentip 172.18.1.11 subagentid 0 seq 102 uptime 451000 samples 1 wait 2ms\n    leaf_02 -> collector sflow agentip 2001:db8:18::12 subagentid 1 seq 55 uptime 820000 samples 1\n}\n```"}]}
{"id":"sft-cookbook-ex-ot-modbus-tcp-and-udp-gateway","task_type":"nl_to_frasm","protocols":["tcp","modbus"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Modbus TCP Register Poll vs. Modbus-over-UDP Serial Gateway (transport udp)\" (modbus_tcp_and_udp_conduit.frasm). Scenario: Tests Purdue Level 2 industrial firewall rules for standard Modbus/TCP polling alongside a serial-to-Ethernet gateway configured for UDP 502. Verify with Wireshark filter `mbtcp || modbus`.","completion":"Encodes the 7-byte MBAP header (txid, protoid 0, length, unitid) across both TCP 502 and transport udp. Compile with `frameassembly modbus_tcp_and_udp_conduit.frasm`.\n\n```frameassembly\nhost scada_poller { ip 10.110.10.10 }\nhost plc_rack_01  { ip 10.110.20.50 }\nhost rtu_gw_udp   { ip 10.110.20.60 }\n\ncompile {\n    scada_poller -> plc_rack_01 tcp syn srcport 50502 dstport 502 win 65535 mss 1460 wait 1ms\n    scada_poller <- plc_rack_01 tcp syn ack win 65535 mss 1460 wait 1ms\n    scada_poller -> plc_rack_01 tcp ack wait 1ms\n    scada_poller -> plc_rack_01 modbus readholdingregisters txid 101 unitid 1 addr 40001 count 4 wait 2ms\n    scada_poller <- plc_rack_01 modbus readholdingregisters isresponse txid 101 unitid 1 count 4 wait 5ms\n    scada_poller -> rtu_gw_udp modbus readinputregisters txid 201 unitid 2 addr 30001 count 2 transport udp\n}\n```","frasm_code":"host scada_poller { ip 10.110.10.10 }\nhost plc_rack_01  { ip 10.110.20.50 }\nhost rtu_gw_udp   { ip 10.110.20.60 }\n\ncompile {\n    scada_poller -> plc_rack_01 tcp syn srcport 50502 dstport 502 win 65535 mss 1460 wait 1ms\n    scada_poller <- plc_rack_01 tcp syn ack win 65535 mss 1460 wait 1ms\n    scada_poller -> plc_rack_01 tcp ack wait 1ms\n    scada_poller -> plc_rack_01 modbus readholdingregisters txid 101 unitid 1 addr 40001 count 4 wait 2ms\n    scada_poller <- plc_rack_01 modbus readholdingregisters isresponse txid 101 unitid 1 count 4 wait 5ms\n    scada_poller -> rtu_gw_udp modbus readinputregisters txid 201 unitid 2 addr 30001 count 2 transport udp\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Modbus TCP Register Poll vs. Modbus-over-UDP Serial Gateway (transport udp)\" (modbus_tcp_and_udp_conduit.frasm). Scenario: Tests Purdue Level 2 industrial firewall rules for standard Modbus/TCP polling alongside a serial-to-Ethernet gateway configured for UDP 502. Verify with Wireshark filter `mbtcp || modbus`."},{"role":"assistant","content":"Encodes the 7-byte MBAP header (txid, protoid 0, length, unitid) across both TCP 502 and transport udp. Compile with `frameassembly modbus_tcp_and_udp_conduit.frasm`.\n\n```frameassembly\nhost scada_poller { ip 10.110.10.10 }\nhost plc_rack_01  { ip 10.110.20.50 }\nhost rtu_gw_udp   { ip 10.110.20.60 }\n\ncompile {\n    scada_poller -> plc_rack_01 tcp syn srcport 50502 dstport 502 win 65535 mss 1460 wait 1ms\n    scada_poller <- plc_rack_01 tcp syn ack win 65535 mss 1460 wait 1ms\n    scada_poller -> plc_rack_01 tcp ack wait 1ms\n    scada_poller -> plc_rack_01 modbus readholdingregisters txid 101 unitid 1 addr 40001 count 4 wait 2ms\n    scada_poller <- plc_rack_01 modbus readholdingregisters isresponse txid 101 unitid 1 count 4 wait 5ms\n    scada_poller -> rtu_gw_udp modbus readinputregisters txid 201 unitid 2 addr 30001 count 2 transport udp\n}\n```"}]}
{"id":"sft-cookbook-ex-ot-dnp3-corrupted-crc-negative-test","task_type":"nl_to_frasm","protocols":["dnp3"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"DNP3 Valid IEEE 1815 CRC-16 vs. Intentional Corrupted CRC Negative Test\" (dnp3_crc_negative_validation.frasm). Scenario: Sends a valid UDP 20000 DNP3 Analog Input read (auto CRC-16) followed by an explicit corrupted crc 0xdead packet to verify OT IDS malformed-frame alerts. Verify with Wireshark filter `dnp3`.","completion":"Omitting crc computes exact reflected 0x3d65 CRC-16s; setting crc 0xdead overrides the link-header checksum intentionally. Compile with `frameassembly dnp3_crc_negative_validation.frasm`.\n\n```frameassembly\nhost sub_master { ip 172.25.0.10 }\nhost bay_rtu    { ip 172.25.0.25 }\n\ncompile {\n    sub_master -> bay_rtu dnp3 read src 1 dst 25 group 30 variation 1 transport udp wait 5ms\n    sub_master <- bay_rtu dnp3 response src 25 dst 1 group 30 variation 1 transport udp wait 10ms\n    sub_master -> bay_rtu dnp3 read src 1 dst 25 group 30 variation 1 crc 0xdead transport udp\n}\n```","frasm_code":"host sub_master { ip 172.25.0.10 }\nhost bay_rtu    { ip 172.25.0.25 }\n\ncompile {\n    sub_master -> bay_rtu dnp3 read src 1 dst 25 group 30 variation 1 transport udp wait 5ms\n    sub_master <- bay_rtu dnp3 response src 25 dst 1 group 30 variation 1 transport udp wait 10ms\n    sub_master -> bay_rtu dnp3 read src 1 dst 25 group 30 variation 1 crc 0xdead transport udp\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"DNP3 Valid IEEE 1815 CRC-16 vs. Intentional Corrupted CRC Negative Test\" (dnp3_crc_negative_validation.frasm). Scenario: Sends a valid UDP 20000 DNP3 Analog Input read (auto CRC-16) followed by an explicit corrupted crc 0xdead packet to verify OT IDS malformed-frame alerts. Verify with Wireshark filter `dnp3`."},{"role":"assistant","content":"Omitting crc computes exact reflected 0x3d65 CRC-16s; setting crc 0xdead overrides the link-header checksum intentionally. Compile with `frameassembly dnp3_crc_negative_validation.frasm`.\n\n```frameassembly\nhost sub_master { ip 172.25.0.10 }\nhost bay_rtu    { ip 172.25.0.25 }\n\ncompile {\n    sub_master -> bay_rtu dnp3 read src 1 dst 25 group 30 variation 1 transport udp wait 5ms\n    sub_master <- bay_rtu dnp3 response src 25 dst 1 group 30 variation 1 transport udp wait 10ms\n    sub_master -> bay_rtu dnp3 read src 1 dst 25 group 30 variation 1 crc 0xdead transport udp\n}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-modbus","task_type":"nl_to_frasm","protocols":["modbus"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block Modbus TCP (`modbus`) Quickstart\" (modbus_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Modbus TCP / UDP Industrial Application Protocol (TCP 502 (or UDP 502 via transport udp), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `mbtcp || modbus`.","completion":"Defaults to TCP destination port `502` (`psh ack`), Protocol ID `0`, `unitid 1`, and computes the 16-bit MBAP `Length` (`unitid + PDU bytes`) automatically. Compile with `frameassembly modbus_quickstart.frasm`.\n\n```frameassembly\nhost scada_hmi { ip 192.168.100.10 }\nhost plc_pump1 { ip 192.168.100.50 }\n\ncompile {\n    scada_hmi -> plc_pump1 tcp syn srcport 50502 dstport 502 wait 1ms\n    scada_hmi <- plc_pump1 tcp syn ack wait 1ms\n    scada_hmi -> plc_pump1 tcp ack wait 1ms\n    scada_hmi -> plc_pump1 modbus readholdingregisters txid 1 unitid 1 addr 100 count 2 wait 3ms\n    scada_hmi <- plc_pump1 modbus readholdingregisters txid 1 unitid 1 count 2 value 1500 isresponse\n}\n```","frasm_code":"host scada_hmi { ip 192.168.100.10 }\nhost plc_pump1 { ip 192.168.100.50 }\n\ncompile {\n    scada_hmi -> plc_pump1 tcp syn srcport 50502 dstport 502 wait 1ms\n    scada_hmi <- plc_pump1 tcp syn ack wait 1ms\n    scada_hmi -> plc_pump1 tcp ack wait 1ms\n    scada_hmi -> plc_pump1 modbus readholdingregisters txid 1 unitid 1 addr 100 count 2 wait 3ms\n    scada_hmi <- plc_pump1 modbus readholdingregisters txid 1 unitid 1 count 2 value 1500 isresponse\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block Modbus TCP (`modbus`) Quickstart\" (modbus_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Modbus TCP / UDP Industrial Application Protocol (TCP 502 (or UDP 502 via transport udp), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `mbtcp || modbus`."},{"role":"assistant","content":"Defaults to TCP destination port `502` (`psh ack`), Protocol ID `0`, `unitid 1`, and computes the 16-bit MBAP `Length` (`unitid + PDU bytes`) automatically. Compile with `frameassembly modbus_quickstart.frasm`.\n\n```frameassembly\nhost scada_hmi { ip 192.168.100.10 }\nhost plc_pump1 { ip 192.168.100.50 }\n\ncompile {\n    scada_hmi -> plc_pump1 tcp syn srcport 50502 dstport 502 wait 1ms\n    scada_hmi <- plc_pump1 tcp syn ack wait 1ms\n    scada_hmi -> plc_pump1 tcp ack wait 1ms\n    scada_hmi -> plc_pump1 modbus readholdingregisters txid 1 unitid 1 addr 100 count 2 wait 3ms\n    scada_hmi <- plc_pump1 modbus readholdingregisters txid 1 unitid 1 count 2 value 1500 isresponse\n}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-dnp3","task_type":"nl_to_frasm","protocols":["dnp3"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block DNP3 (IEEE 1815) (`dnp3`) Quickstart\" (dnp3_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Distributed Network Protocol 3 (Electric & Water Utilities) (TCP 20000 (or UDP 20000 via transport udp), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `dnp3`.","completion":"Defaults to TCP destination port `20000` (`transport udp` switches to UDP `20000`) and builds the `0x0564` Data Link + Transport (`FIN|FIR`) + Application headers. Compile with `frameassembly dnp3_quickstart.frasm`.\n\n```frameassembly\nhost scada_master { ip 10.100.1.10 }\nhost sub_rtu_10   { ip 10.100.2.10 }\n\ncompile {\n    scada_master -> sub_rtu_10 tcp syn srcport 52000 dstport 20000 wait 1ms\n    scada_master <- sub_rtu_10 tcp syn ack wait 1ms\n    scada_master -> sub_rtu_10 tcp ack wait 1ms\n    scada_master -> sub_rtu_10 dnp3 read src 1 dst 10 group 30 variation 1 wait 3ms\n    scada_master <- sub_rtu_10 dnp3 response src 10 dst 1 group 30 variation 1\n}\n```","frasm_code":"host scada_master { ip 10.100.1.10 }\nhost sub_rtu_10   { ip 10.100.2.10 }\n\ncompile {\n    scada_master -> sub_rtu_10 tcp syn srcport 52000 dstport 20000 wait 1ms\n    scada_master <- sub_rtu_10 tcp syn ack wait 1ms\n    scada_master -> sub_rtu_10 tcp ack wait 1ms\n    scada_master -> sub_rtu_10 dnp3 read src 1 dst 10 group 30 variation 1 wait 3ms\n    scada_master <- sub_rtu_10 dnp3 response src 10 dst 1 group 30 variation 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block DNP3 (IEEE 1815) (`dnp3`) Quickstart\" (dnp3_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Distributed Network Protocol 3 (Electric & Water Utilities) (TCP 20000 (or UDP 20000 via transport udp), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `dnp3`."},{"role":"assistant","content":"Defaults to TCP destination port `20000` (`transport udp` switches to UDP `20000`) and builds the `0x0564` Data Link + Transport (`FIN|FIR`) + Application headers. Compile with `frameassembly dnp3_quickstart.frasm`.\n\n```frameassembly\nhost scada_master { ip 10.100.1.10 }\nhost sub_rtu_10   { ip 10.100.2.10 }\n\ncompile {\n    scada_master -> sub_rtu_10 tcp syn srcport 52000 dstport 20000 wait 1ms\n    scada_master <- sub_rtu_10 tcp syn ack wait 1ms\n    scada_master -> sub_rtu_10 tcp ack wait 1ms\n    scada_master -> sub_rtu_10 dnp3 read src 1 dst 10 group 30 variation 1 wait 3ms\n    scada_master <- sub_rtu_10 dnp3 response src 10 dst 1 group 30 variation 1\n}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-s7comm","task_type":"nl_to_frasm","protocols":["s7comm"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block Siemens S7comm (`s7comm`) Quickstart\" (s7comm_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Siemens S7 Communication Protocol over ISO-on-TCP (TCP 102 (ISO-on-TCP), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `s7comm`.","completion":"Defaults to TCP destination port `102` (`psh ack`) and computes the outer 4-byte TPKT (`0x03 0x00 <len>`) + 3-byte COTP DT (`0x02 0xf0 0x80`) framing automatically. Compile with `frameassembly s7comm_quickstart.frasm`.\n\n```frameassembly\nhost wincc_hmi { ip 192.168.10.20 }\nhost s7_plc    { ip 192.168.10.100 }\n\ncompile {\n    wincc_hmi -> s7_plc tcp syn srcport 50102 dstport 102 wait 1ms\n    wincc_hmi <- s7_plc tcp syn ack wait 1ms\n    wincc_hmi -> s7_plc tcp ack wait 1ms\n    wincc_hmi -> s7_plc s7comm rosctr \"job\" setupcomm pduref 1 wait 2ms\n    wincc_hmi <- s7_plc s7comm rosctr \"ackdata\" setupcomm pduref 1 wait 2ms\n    wincc_hmi -> s7_plc s7comm rosctr \"job\" readvar pduref 2 area 0x84 dbnum 1 offset 0 count 4\n}\n```","frasm_code":"host wincc_hmi { ip 192.168.10.20 }\nhost s7_plc    { ip 192.168.10.100 }\n\ncompile {\n    wincc_hmi -> s7_plc tcp syn srcport 50102 dstport 102 wait 1ms\n    wincc_hmi <- s7_plc tcp syn ack wait 1ms\n    wincc_hmi -> s7_plc tcp ack wait 1ms\n    wincc_hmi -> s7_plc s7comm rosctr \"job\" setupcomm pduref 1 wait 2ms\n    wincc_hmi <- s7_plc s7comm rosctr \"ackdata\" setupcomm pduref 1 wait 2ms\n    wincc_hmi -> s7_plc s7comm rosctr \"job\" readvar pduref 2 area 0x84 dbnum 1 offset 0 count 4\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block Siemens S7comm (`s7comm`) Quickstart\" (s7comm_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Siemens S7 Communication Protocol over ISO-on-TCP (TCP 102 (ISO-on-TCP), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `s7comm`."},{"role":"assistant","content":"Defaults to TCP destination port `102` (`psh ack`) and computes the outer 4-byte TPKT (`0x03 0x00 <len>`) + 3-byte COTP DT (`0x02 0xf0 0x80`) framing automatically. Compile with `frameassembly s7comm_quickstart.frasm`.\n\n```frameassembly\nhost wincc_hmi { ip 192.168.10.20 }\nhost s7_plc    { ip 192.168.10.100 }\n\ncompile {\n    wincc_hmi -> s7_plc tcp syn srcport 50102 dstport 102 wait 1ms\n    wincc_hmi <- s7_plc tcp syn ack wait 1ms\n    wincc_hmi -> s7_plc tcp ack wait 1ms\n    wincc_hmi -> s7_plc s7comm rosctr \"job\" setupcomm pduref 1 wait 2ms\n    wincc_hmi <- s7_plc s7comm rosctr \"ackdata\" setupcomm pduref 1 wait 2ms\n    wincc_hmi -> s7_plc s7comm rosctr \"job\" readvar pduref 2 area 0x84 dbnum 1 offset 0 count 4\n}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-opcua","task_type":"nl_to_frasm","protocols":["opcua"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block OPC UA (`opcua`) Quickstart\" (opcua_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for OPC Unified Architecture Binary TCP Protocol (TCP 4840, Dual-Stack IPv4/IPv6). Verify with Wireshark filter `opcua`.","completion":"Defaults to TCP destination port `4840` (`psh ack`), `msgtype \"HEL\"`, `chunktype \"F\"`, and calculates the 4-byte little-endian `MessageSize` across the entire OPC UA frame. Compile with `frameassembly opcua_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block OPC UA (`opcua`) Quickstart\" (opcua_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for OPC Unified Architecture Binary TCP Protocol (TCP 4840, Dual-Stack IPv4/IPv6). Verify with Wireshark filter `opcua`."},{"role":"assistant","content":"Defaults to TCP destination port `4840` (`psh ack`), `msgtype \"HEL\"`, `chunktype \"F\"`, and calculates the 4-byte little-endian `MessageSize` across the entire OPC UA frame. Compile with `frameassembly opcua_quickstart.frasm`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-cookbook-proto-quickstart-coap","task_type":"nl_to_frasm","protocols":["coap"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block CoAP (IoT) (`coap`) Quickstart\" (coap_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Constrained Application Protocol (UDP 5683 (or RFC 8323 transport tcp), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `coap`.","completion":"Defaults to UDP destination port `5683` and packs CoAP Version `1`, 2-bit Type, Token Length (`TKL`), 1-byte `c.dd` Code (`(class << 5) | detail`), and 16-bit `msgid`. Compile with `frameassembly coap_quickstart.frasm`.\n\n```frameassembly\nhost sensor_01 { ip 10.70.1.50 }\nhost iot_gw    { ip 10.70.1.1 }\n\ncompile {\n    sensor_01 -> iot_gw coap con post msgid 101 token 0x4a1b uripath \"telemetry/humidity\" contentformat 50 payload \"{\\\"rh\\\":48.2}\" wait 3ms\n    sensor_01 <- iot_gw coap ack changed msgid 101 token 0x4a1b\n}\n```","frasm_code":"host sensor_01 { ip 10.70.1.50 }\nhost iot_gw    { ip 10.70.1.1 }\n\ncompile {\n    sensor_01 -> iot_gw coap con post msgid 101 token 0x4a1b uripath \"telemetry/humidity\" contentformat 50 payload \"{\\\"rh\\\":48.2}\" wait 3ms\n    sensor_01 <- iot_gw coap ack changed msgid 101 token 0x4a1b\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Minimal Two-Block CoAP (IoT) (`coap`) Quickstart\" (coap_quickstart.frasm). Scenario: Smallest zero-boilerplate `host` + `compile` capture for Constrained Application Protocol (UDP 5683 (or RFC 8323 transport tcp), Dual-Stack IPv4/IPv6). Verify with Wireshark filter `coap`."},{"role":"assistant","content":"Defaults to UDP destination port `5683` and packs CoAP Version `1`, 2-bit Type, Token Length (`TKL`), 1-byte `c.dd` Code (`(class << 5) | detail`), and 16-bit `msgid`. Compile with `frameassembly coap_quickstart.frasm`.\n\n```frameassembly\nhost sensor_01 { ip 10.70.1.50 }\nhost iot_gw    { ip 10.70.1.1 }\n\ncompile {\n    sensor_01 -> iot_gw coap con post msgid 101 token 0x4a1b uripath \"telemetry/humidity\" contentformat 50 payload \"{\\\"rh\\\":48.2}\" wait 3ms\n    sensor_01 <- iot_gw coap ack changed msgid 101 token 0x4a1b\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-modbus","task_type":"nl_to_frasm","protocols":["modbus","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Modbus TCP (`modbus`): Normal Historian Read Polling (`FC 3`) + Unauthorized Coil/Register Write (`FC 5` / `FC 6`)\" (modbus_ot_conduit_test.frasm). Scenario: Models an HMI polling Holding Registers on Unit 1 (`FC 3` request + `isresponse` reply), followed by a `writesinglecoil` (`FC 5`) and `writesingleregister` (`FC 6`) command to test OT write-detection alarms. Verify with Wireshark filter `mbtcp || modbus`.","completion":"Defaults to TCP destination port `502` (`psh ack`), Protocol ID `0`, `unitid 1`, and computes the 16-bit MBAP `Length` (`unitid + PDU bytes`) automatically. Formats client Request PDUs (`addr` + `count` / `value`) by default, and switches to PLC Response PDUs (`byte_count` + register/coil values) when `isresponse` is set. Compile with `frameassembly show modbus_ot_conduit_test.frasm`.\n\n```frameassembly\nhost hmi_01   { ip 10.100.10.15 }\nhost vfd_plc  { ip 10.100.20.50 }\n\ncompile {\n    hmi_01 -> vfd_plc tcp syn srcport 51502 dstport 502 win 65535 mss 1460 wait 1ms\n    hmi_01 <- vfd_plc tcp syn ack win 65535 mss 1460 wait 1ms\n    hmi_01 -> vfd_plc tcp ack wait 1ms\n    // 1. Authorized Read Holding Registers (FC 3) + PLC Response (isresponse)\n    hmi_01 -> vfd_plc modbus readholdingregisters txid 101 unitid 1 addr 0 count 4 wait 2ms\n    hmi_01 <- vfd_plc modbus readholdingregisters txid 101 unitid 1 count 4 value 3600 isresponse wait 5ms\n    // 2. Write Single Coil (FC 5) & Write Single Register (FC 6) -> triggers OT IDS write alert!\n    hmi_01 -> vfd_plc modbus writesinglecoil txid 102 unitid 1 addr 10 value 1 wait 2ms\n    hmi_01 <- vfd_plc modbus writesinglecoil txid 102 unitid 1 addr 10 value 1 isresponse wait 3ms\n    hmi_01 -> vfd_plc modbus writesingleregister txid 103 unitid 1 addr 200 value 1800\n}\n```","frasm_code":"host hmi_01   { ip 10.100.10.15 }\nhost vfd_plc  { ip 10.100.20.50 }\n\ncompile {\n    hmi_01 -> vfd_plc tcp syn srcport 51502 dstport 502 win 65535 mss 1460 wait 1ms\n    hmi_01 <- vfd_plc tcp syn ack win 65535 mss 1460 wait 1ms\n    hmi_01 -> vfd_plc tcp ack wait 1ms\n    // 1. Authorized Read Holding Registers (FC 3) + PLC Response (isresponse)\n    hmi_01 -> vfd_plc modbus readholdingregisters txid 101 unitid 1 addr 0 count 4 wait 2ms\n    hmi_01 <- vfd_plc modbus readholdingregisters txid 101 unitid 1 count 4 value 3600 isresponse wait 5ms\n    // 2. Write Single Coil (FC 5) & Write Single Register (FC 6) -> triggers OT IDS write alert!\n    hmi_01 -> vfd_plc modbus writesinglecoil txid 102 unitid 1 addr 10 value 1 wait 2ms\n    hmi_01 <- vfd_plc modbus writesinglecoil txid 102 unitid 1 addr 10 value 1 isresponse wait 3ms\n    hmi_01 -> vfd_plc modbus writesingleregister txid 103 unitid 1 addr 200 value 1800\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Modbus TCP (`modbus`): Normal Historian Read Polling (`FC 3`) + Unauthorized Coil/Register Write (`FC 5` / `FC 6`)\" (modbus_ot_conduit_test.frasm). Scenario: Models an HMI polling Holding Registers on Unit 1 (`FC 3` request + `isresponse` reply), followed by a `writesinglecoil` (`FC 5`) and `writesingleregister` (`FC 6`) command to test OT write-detection alarms. Verify with Wireshark filter `mbtcp || modbus`."},{"role":"assistant","content":"Defaults to TCP destination port `502` (`psh ack`), Protocol ID `0`, `unitid 1`, and computes the 16-bit MBAP `Length` (`unitid + PDU bytes`) automatically. Formats client Request PDUs (`addr` + `count` / `value`) by default, and switches to PLC Response PDUs (`byte_count` + register/coil values) when `isresponse` is set. Compile with `frameassembly show modbus_ot_conduit_test.frasm`.\n\n```frameassembly\nhost hmi_01   { ip 10.100.10.15 }\nhost vfd_plc  { ip 10.100.20.50 }\n\ncompile {\n    hmi_01 -> vfd_plc tcp syn srcport 51502 dstport 502 win 65535 mss 1460 wait 1ms\n    hmi_01 <- vfd_plc tcp syn ack win 65535 mss 1460 wait 1ms\n    hmi_01 -> vfd_plc tcp ack wait 1ms\n    // 1. Authorized Read Holding Registers (FC 3) + PLC Response (isresponse)\n    hmi_01 -> vfd_plc modbus readholdingregisters txid 101 unitid 1 addr 0 count 4 wait 2ms\n    hmi_01 <- vfd_plc modbus readholdingregisters txid 101 unitid 1 count 4 value 3600 isresponse wait 5ms\n    // 2. Write Single Coil (FC 5) & Write Single Register (FC 6) -> triggers OT IDS write alert!\n    hmi_01 -> vfd_plc modbus writesinglecoil txid 102 unitid 1 addr 10 value 1 wait 2ms\n    hmi_01 <- vfd_plc modbus writesinglecoil txid 102 unitid 1 addr 10 value 1 isresponse wait 3ms\n    hmi_01 -> vfd_plc modbus writesingleregister txid 103 unitid 1 addr 200 value 1800\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-bacnet","task_type":"nl_to_frasm","protocols":["bacnet"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"BACnet/IP (`bacnet`): Data-Center CRAC Discovery (`Who-Is`/`I-Am`), Temperature Read & Setpoint Write\" (bacnet_dc_cooling_audit.frasm). Scenario: Discovers CRAC device instance `2001`, reads Analog-Input 1 `Present-Value` (`propertyid 85`), and tests an unauthorized `writeproperty` setpoint change. Verify with Wireshark filter `bacnet || bvlc || bacapp`.","completion":"Defaults to UDP source and destination port `47808` (`0xbac0`) and sets BVLC Function to `0x0b` (`Original-Broadcast-NPDU`) on `whois`/`iam` or `0x0a` (`Original-Unicast-NPDU`) on `readproperty`/`writeproperty`. Bit-packs the 10-bit `objecttype` and 22-bit `objectinstance` into the 32-bit ASHRAE 135 `BACnetObjectIdentifier` tag. Compile with `frameassembly show bacnet_dc_cooling_audit.frasm`.\n\n```frameassembly\nhost bms_workstation { ip 192.168.90.10 }\nhost crac_unit_04    { ip 192.168.90.40 }\n\ncompile {\n    // 1. Device discovery: Who-Is -> I-Am (Object Type 8 = Device, Instance 2001)\n    bms_workstation -> crac_unit_04 bacnet whois wait 2ms\n    bms_workstation <- crac_unit_04 bacnet iam objecttype 8 objectinstance 2001 wait 5ms\n    // 2. Read return-air temperature (Object Type 0 = Analog-Input, Property 85 = Present-Value)\n    bms_workstation -> crac_unit_04 bacnet readproperty invokeid 10 objecttype 0 objectinstance 1 propertyid 85 wait 4ms\n    // 3. Write chiller setpoint (Object Type 2 = Analog-Value, Property 85 = Present-Value)\n    bms_workstation -> crac_unit_04 bacnet writeproperty invokeid 11 objecttype 2 objectinstance 1 propertyid 85 value 24\n}\n```","frasm_code":"host bms_workstation { ip 192.168.90.10 }\nhost crac_unit_04    { ip 192.168.90.40 }\n\ncompile {\n    // 1. Device discovery: Who-Is -> I-Am (Object Type 8 = Device, Instance 2001)\n    bms_workstation -> crac_unit_04 bacnet whois wait 2ms\n    bms_workstation <- crac_unit_04 bacnet iam objecttype 8 objectinstance 2001 wait 5ms\n    // 2. Read return-air temperature (Object Type 0 = Analog-Input, Property 85 = Present-Value)\n    bms_workstation -> crac_unit_04 bacnet readproperty invokeid 10 objecttype 0 objectinstance 1 propertyid 85 wait 4ms\n    // 3. Write chiller setpoint (Object Type 2 = Analog-Value, Property 85 = Present-Value)\n    bms_workstation -> crac_unit_04 bacnet writeproperty invokeid 11 objecttype 2 objectinstance 1 propertyid 85 value 24\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"BACnet/IP (`bacnet`): Data-Center CRAC Discovery (`Who-Is`/`I-Am`), Temperature Read & Setpoint Write\" (bacnet_dc_cooling_audit.frasm). Scenario: Discovers CRAC device instance `2001`, reads Analog-Input 1 `Present-Value` (`propertyid 85`), and tests an unauthorized `writeproperty` setpoint change. Verify with Wireshark filter `bacnet || bvlc || bacapp`."},{"role":"assistant","content":"Defaults to UDP source and destination port `47808` (`0xbac0`) and sets BVLC Function to `0x0b` (`Original-Broadcast-NPDU`) on `whois`/`iam` or `0x0a` (`Original-Unicast-NPDU`) on `readproperty`/`writeproperty`. Bit-packs the 10-bit `objecttype` and 22-bit `objectinstance` into the 32-bit ASHRAE 135 `BACnetObjectIdentifier` tag. Compile with `frameassembly show bacnet_dc_cooling_audit.frasm`.\n\n```frameassembly\nhost bms_workstation { ip 192.168.90.10 }\nhost crac_unit_04    { ip 192.168.90.40 }\n\ncompile {\n    // 1. Device discovery: Who-Is -> I-Am (Object Type 8 = Device, Instance 2001)\n    bms_workstation -> crac_unit_04 bacnet whois wait 2ms\n    bms_workstation <- crac_unit_04 bacnet iam objecttype 8 objectinstance 2001 wait 5ms\n    // 2. Read return-air temperature (Object Type 0 = Analog-Input, Property 85 = Present-Value)\n    bms_workstation -> crac_unit_04 bacnet readproperty invokeid 10 objecttype 0 objectinstance 1 propertyid 85 wait 4ms\n    // 3. Write chiller setpoint (Object Type 2 = Analog-Value, Property 85 = Present-Value)\n    bms_workstation -> crac_unit_04 bacnet writeproperty invokeid 11 objecttype 2 objectinstance 1 propertyid 85 value 24\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-dnp3","task_type":"nl_to_frasm","protocols":["dnp3","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"DNP3 (IEEE 1815) (`dnp3`): Substation Analog Input Poll (`Group 30`) + Select-Before-Operate (`Group 12` CROB)\" (dnp3_substation_sbo.frasm). Scenario: Polls Analog Inputs (`group 30 variation 1`), receives an RTU `unsolicitedresponse` event (`group 2` Binary Input Change), and executes a two-step `select` -> `operate` breaker sequence. Verify with Wireshark filter `dnp3`.","completion":"Defaults to TCP destination port `20000` (`transport udp` switches to UDP `20000`) and builds the `0x0564` Data Link + Transport (`FIN|FIR`) + Application headers. Computes the reflected IEEE 1815 `0x3d65` CRC-16 across the 8-byte Data Link header and every 16-byte user-data chunk automatically. Compile with `frameassembly show dnp3_substation_sbo.frasm`.\n\n```frameassembly\nhost ems_master { ip 172.25.1.5 }\nhost feeder_rtu { ip 172.25.10.20 }\n\ncompile {\n    ems_master -> feeder_rtu tcp syn srcport 53000 dstport 20000 win 65535 mss 1460 wait 1ms\n    ems_master <- feeder_rtu tcp syn ack win 65535 mss 1460 wait 1ms\n    ems_master -> feeder_rtu tcp ack wait 1ms\n    // 1. Class/Group 30 Analog Input Read + RTU Response\n    ems_master -> feeder_rtu dnp3 read src 1 dst 20 group 30 variation 1 wait 3ms\n    ems_master <- feeder_rtu dnp3 response src 20 dst 1 group 30 variation 1 wait 10ms\n    // 2. RTU Unsolicited Event (Group 2 Binary Input Event) + Master Confirm\n    ems_master <- feeder_rtu dnp3 unsolicitedresponse src 20 dst 1 group 2 variation 2 wait 2ms\n    ems_master -> feeder_rtu dnp3 confirm src 1 dst 20 wait 5ms\n    // 3. Select-Before-Operate (Group 12 Variation 1 CROB) -> triggers high-priority OT alert\n    ems_master -> feeder_rtu dnp3 select src 1 dst 20 group 12 variation 1 wait 2ms\n    ems_master <- feeder_rtu dnp3 response src 20 dst 1 group 12 variation 1 wait 2ms\n    ems_master -> feeder_rtu dnp3 operate src 1 dst 20 group 12 variation 1\n}\n```","frasm_code":"host ems_master { ip 172.25.1.5 }\nhost feeder_rtu { ip 172.25.10.20 }\n\ncompile {\n    ems_master -> feeder_rtu tcp syn srcport 53000 dstport 20000 win 65535 mss 1460 wait 1ms\n    ems_master <- feeder_rtu tcp syn ack win 65535 mss 1460 wait 1ms\n    ems_master -> feeder_rtu tcp ack wait 1ms\n    // 1. Class/Group 30 Analog Input Read + RTU Response\n    ems_master -> feeder_rtu dnp3 read src 1 dst 20 group 30 variation 1 wait 3ms\n    ems_master <- feeder_rtu dnp3 response src 20 dst 1 group 30 variation 1 wait 10ms\n    // 2. RTU Unsolicited Event (Group 2 Binary Input Event) + Master Confirm\n    ems_master <- feeder_rtu dnp3 unsolicitedresponse src 20 dst 1 group 2 variation 2 wait 2ms\n    ems_master -> feeder_rtu dnp3 confirm src 1 dst 20 wait 5ms\n    // 3. Select-Before-Operate (Group 12 Variation 1 CROB) -> triggers high-priority OT alert\n    ems_master -> feeder_rtu dnp3 select src 1 dst 20 group 12 variation 1 wait 2ms\n    ems_master <- feeder_rtu dnp3 response src 20 dst 1 group 12 variation 1 wait 2ms\n    ems_master -> feeder_rtu dnp3 operate src 1 dst 20 group 12 variation 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"DNP3 (IEEE 1815) (`dnp3`): Substation Analog Input Poll (`Group 30`) + Select-Before-Operate (`Group 12` CROB)\" (dnp3_substation_sbo.frasm). Scenario: Polls Analog Inputs (`group 30 variation 1`), receives an RTU `unsolicitedresponse` event (`group 2` Binary Input Change), and executes a two-step `select` -> `operate` breaker sequence. Verify with Wireshark filter `dnp3`."},{"role":"assistant","content":"Defaults to TCP destination port `20000` (`transport udp` switches to UDP `20000`) and builds the `0x0564` Data Link + Transport (`FIN|FIR`) + Application headers. Computes the reflected IEEE 1815 `0x3d65` CRC-16 across the 8-byte Data Link header and every 16-byte user-data chunk automatically. Compile with `frameassembly show dnp3_substation_sbo.frasm`.\n\n```frameassembly\nhost ems_master { ip 172.25.1.5 }\nhost feeder_rtu { ip 172.25.10.20 }\n\ncompile {\n    ems_master -> feeder_rtu tcp syn srcport 53000 dstport 20000 win 65535 mss 1460 wait 1ms\n    ems_master <- feeder_rtu tcp syn ack win 65535 mss 1460 wait 1ms\n    ems_master -> feeder_rtu tcp ack wait 1ms\n    // 1. Class/Group 30 Analog Input Read + RTU Response\n    ems_master -> feeder_rtu dnp3 read src 1 dst 20 group 30 variation 1 wait 3ms\n    ems_master <- feeder_rtu dnp3 response src 20 dst 1 group 30 variation 1 wait 10ms\n    // 2. RTU Unsolicited Event (Group 2 Binary Input Event) + Master Confirm\n    ems_master <- feeder_rtu dnp3 unsolicitedresponse src 20 dst 1 group 2 variation 2 wait 2ms\n    ems_master -> feeder_rtu dnp3 confirm src 1 dst 20 wait 5ms\n    // 3. Select-Before-Operate (Group 12 Variation 1 CROB) -> triggers high-priority OT alert\n    ems_master -> feeder_rtu dnp3 select src 1 dst 20 group 12 variation 1 wait 2ms\n    ems_master <- feeder_rtu dnp3 response src 20 dst 1 group 12 variation 1 wait 2ms\n    ems_master -> feeder_rtu dnp3 operate src 1 dst 20 group 12 variation 1\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-s7comm","task_type":"nl_to_frasm","protocols":["s7comm","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Siemens S7comm (`s7comm`): S7 Communication Setup, DB1 Read Poll, DB1 Write & PLC CPU Control Alert\" (s7comm_plc_security_lab.frasm). Scenario: Negotiates S7 PDU parameters (`setupcomm`), polls 4 bytes from `DB1.DBB0` (`area 0x84 dbnum 1`), writes to `DB1`, and emits a `plccontrol` Job to test critical OT security alerts. Verify with Wireshark filter `s7comm`.","completion":"Defaults to TCP destination port `102` (`psh ack`) and computes the outer 4-byte TPKT (`0x03 0x00 <len>`) + 3-byte COTP DT (`0x02 0xf0 0x80`) framing automatically. Writes the `0x32` S7 Protocol ID, ROSCTR (`0x01` Job, `0x02` Ack, `0x03` Ack_Data, `0x07` Userdata), 2-byte error class/code on `ackdata`, and exact Parameter/Data lengths. Compile with `frameassembly show s7comm_plc_security_lab.frasm`.\n\n```frameassembly\nhost tia_ws  { ip 10.110.1.15 }\nhost plc_315 { ip 10.110.2.102 }\n\ncompile {\n    tia_ws -> plc_315 tcp syn srcport 51102 dstport 102 win 65535 mss 1460 wait 1ms\n    tia_ws <- plc_315 tcp syn ack win 65535 mss 1460 wait 1ms\n    tia_ws -> plc_315 tcp ack wait 1ms\n    // 1. S7 Setup Communication (Func 0xf0)\n    tia_ws -> plc_315 s7comm rosctr \"job\" setupcomm pduref 100 wait 2ms\n    tia_ws <- plc_315 s7comm rosctr \"ackdata\" setupcomm pduref 100 wait 2ms\n    // 2. Read 4 bytes from Data Block 1 (area 0x84 = DB, dbnum 1, offset 0)\n    tia_ws -> plc_315 s7comm rosctr \"job\" readvar pduref 101 area 0x84 dbnum 1 offset 0 count 4 wait 2ms\n    tia_ws <- plc_315 s7comm rosctr \"ackdata\" readvar pduref 101 count 4 wait 5ms\n    // 3. WriteVar (0x05) + PLCControl (0x28) -> critical OT IDS signatures\n    tia_ws -> plc_315 s7comm rosctr \"job\" writevar pduref 102 area 0x84 dbnum 1 offset 0 count 2 wait 3ms\n    tia_ws <- plc_315 s7comm rosctr \"ackdata\" writevar pduref 102 wait 3ms\n    tia_ws -> plc_315 s7comm rosctr \"job\" plccontrol pduref 103\n}\n```","frasm_code":"host tia_ws  { ip 10.110.1.15 }\nhost plc_315 { ip 10.110.2.102 }\n\ncompile {\n    tia_ws -> plc_315 tcp syn srcport 51102 dstport 102 win 65535 mss 1460 wait 1ms\n    tia_ws <- plc_315 tcp syn ack win 65535 mss 1460 wait 1ms\n    tia_ws -> plc_315 tcp ack wait 1ms\n    // 1. S7 Setup Communication (Func 0xf0)\n    tia_ws -> plc_315 s7comm rosctr \"job\" setupcomm pduref 100 wait 2ms\n    tia_ws <- plc_315 s7comm rosctr \"ackdata\" setupcomm pduref 100 wait 2ms\n    // 2. Read 4 bytes from Data Block 1 (area 0x84 = DB, dbnum 1, offset 0)\n    tia_ws -> plc_315 s7comm rosctr \"job\" readvar pduref 101 area 0x84 dbnum 1 offset 0 count 4 wait 2ms\n    tia_ws <- plc_315 s7comm rosctr \"ackdata\" readvar pduref 101 count 4 wait 5ms\n    // 3. WriteVar (0x05) + PLCControl (0x28) -> critical OT IDS signatures\n    tia_ws -> plc_315 s7comm rosctr \"job\" writevar pduref 102 area 0x84 dbnum 1 offset 0 count 2 wait 3ms\n    tia_ws <- plc_315 s7comm rosctr \"ackdata\" writevar pduref 102 wait 3ms\n    tia_ws -> plc_315 s7comm rosctr \"job\" plccontrol pduref 103\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Siemens S7comm (`s7comm`): S7 Communication Setup, DB1 Read Poll, DB1 Write & PLC CPU Control Alert\" (s7comm_plc_security_lab.frasm). Scenario: Negotiates S7 PDU parameters (`setupcomm`), polls 4 bytes from `DB1.DBB0` (`area 0x84 dbnum 1`), writes to `DB1`, and emits a `plccontrol` Job to test critical OT security alerts. Verify with Wireshark filter `s7comm`."},{"role":"assistant","content":"Defaults to TCP destination port `102` (`psh ack`) and computes the outer 4-byte TPKT (`0x03 0x00 <len>`) + 3-byte COTP DT (`0x02 0xf0 0x80`) framing automatically. Writes the `0x32` S7 Protocol ID, ROSCTR (`0x01` Job, `0x02` Ack, `0x03` Ack_Data, `0x07` Userdata), 2-byte error class/code on `ackdata`, and exact Parameter/Data lengths. Compile with `frameassembly show s7comm_plc_security_lab.frasm`.\n\n```frameassembly\nhost tia_ws  { ip 10.110.1.15 }\nhost plc_315 { ip 10.110.2.102 }\n\ncompile {\n    tia_ws -> plc_315 tcp syn srcport 51102 dstport 102 win 65535 mss 1460 wait 1ms\n    tia_ws <- plc_315 tcp syn ack win 65535 mss 1460 wait 1ms\n    tia_ws -> plc_315 tcp ack wait 1ms\n    // 1. S7 Setup Communication (Func 0xf0)\n    tia_ws -> plc_315 s7comm rosctr \"job\" setupcomm pduref 100 wait 2ms\n    tia_ws <- plc_315 s7comm rosctr \"ackdata\" setupcomm pduref 100 wait 2ms\n    // 2. Read 4 bytes from Data Block 1 (area 0x84 = DB, dbnum 1, offset 0)\n    tia_ws -> plc_315 s7comm rosctr \"job\" readvar pduref 101 area 0x84 dbnum 1 offset 0 count 4 wait 2ms\n    tia_ws <- plc_315 s7comm rosctr \"ackdata\" readvar pduref 101 count 4 wait 5ms\n    // 3. WriteVar (0x05) + PLCControl (0x28) -> critical OT IDS signatures\n    tia_ws -> plc_315 s7comm rosctr \"job\" writevar pduref 102 area 0x84 dbnum 1 offset 0 count 2 wait 3ms\n    tia_ws <- plc_315 s7comm rosctr \"ackdata\" writevar pduref 102 wait 3ms\n    tia_ws -> plc_315 s7comm rosctr \"job\" plccontrol pduref 103\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-ethernetip","task_type":"nl_to_frasm","protocols":["ethernetip","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"EtherNet/IP (CIP) (`ethernetip`): PLC Discovery (`ListIdentity`), Session Registration, CIP Attribute Read & UDP 2222 I/O\" (ethernetip_cip_cell.frasm). Scenario: Performs a `listidentity` check, registers session `0x00010042` on TCP 44818, reads Assembly Instance `100` Attribute `3` (`Get_Attribute_Single` `0x0e`), and sends an implicit I/O packet on UDP 2222. Verify with Wireshark filter `enip || cip`.","completion":"Selects TCP port `44818` for explicit encapsulation commands (`registersession`, `listidentity`, `sendrrdata`) and automatically switches to UDP port `2222` on `sendunitdata` or `transport udp`. Encodes the 24-byte little-endian EtherNet/IP Encapsulation Header (`Command`, `Length`, `Session Handle`, `Status`, 8-byte `Sender Context`, `Options`). Compile with `frameassembly show ethernetip_cip_cell.frasm`.\n\n```frameassembly\nhost studio_ws { ip 10.120.10.15 }\nhost clx_plc   { ip 10.120.10.60 }\n\ncompile {\n    studio_ws -> clx_plc tcp syn srcport 51818 dstport 44818 win 65535 mss 1460 wait 1ms\n    studio_ws <- clx_plc tcp syn ack win 65535 mss 1460 wait 1ms\n    studio_ws -> clx_plc tcp ack wait 1ms\n    // 1. ListIdentity (0x0063) + RegisterSession (0x0065)\n    studio_ws -> clx_plc ethernetip listidentity wait 2ms\n    studio_ws -> clx_plc ethernetip registersession context 0x1122334455667788 wait 2ms\n    studio_ws <- clx_plc ethernetip registersession sessionhandle 0x00010042 context 0x1122334455667788 status 0 wait 3ms\n    // 2. SendRRData (0x006f): CIP Get_Attribute_Single (0x0e) on Assembly Object (0x04), Instance 100, Attr 3\n    studio_ws -> clx_plc ethernetip sendrrdata sessionhandle 0x00010042 cipservice 0x0e cipclass 0x04 cipinstance 100 cipattr 3 wait 4ms\n    // 3. Implicit CIP I/O over UDP 2222 + UnRegisterSession\n    studio_ws -> clx_plc ethernetip sendunitdata sessionhandle 0x00010042 cipservice 0x0e cipclass 0x04 cipinstance 150 cipattr 3 transport udp wait 3ms\n    studio_ws -> clx_plc ethernetip unregistersession sessionhandle 0x00010042\n}\n```","frasm_code":"host studio_ws { ip 10.120.10.15 }\nhost clx_plc   { ip 10.120.10.60 }\n\ncompile {\n    studio_ws -> clx_plc tcp syn srcport 51818 dstport 44818 win 65535 mss 1460 wait 1ms\n    studio_ws <- clx_plc tcp syn ack win 65535 mss 1460 wait 1ms\n    studio_ws -> clx_plc tcp ack wait 1ms\n    // 1. ListIdentity (0x0063) + RegisterSession (0x0065)\n    studio_ws -> clx_plc ethernetip listidentity wait 2ms\n    studio_ws -> clx_plc ethernetip registersession context 0x1122334455667788 wait 2ms\n    studio_ws <- clx_plc ethernetip registersession sessionhandle 0x00010042 context 0x1122334455667788 status 0 wait 3ms\n    // 2. SendRRData (0x006f): CIP Get_Attribute_Single (0x0e) on Assembly Object (0x04), Instance 100, Attr 3\n    studio_ws -> clx_plc ethernetip sendrrdata sessionhandle 0x00010042 cipservice 0x0e cipclass 0x04 cipinstance 100 cipattr 3 wait 4ms\n    // 3. Implicit CIP I/O over UDP 2222 + UnRegisterSession\n    studio_ws -> clx_plc ethernetip sendunitdata sessionhandle 0x00010042 cipservice 0x0e cipclass 0x04 cipinstance 150 cipattr 3 transport udp wait 3ms\n    studio_ws -> clx_plc ethernetip unregistersession sessionhandle 0x00010042\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"EtherNet/IP (CIP) (`ethernetip`): PLC Discovery (`ListIdentity`), Session Registration, CIP Attribute Read & UDP 2222 I/O\" (ethernetip_cip_cell.frasm). Scenario: Performs a `listidentity` check, registers session `0x00010042` on TCP 44818, reads Assembly Instance `100` Attribute `3` (`Get_Attribute_Single` `0x0e`), and sends an implicit I/O packet on UDP 2222. Verify with Wireshark filter `enip || cip`."},{"role":"assistant","content":"Selects TCP port `44818` for explicit encapsulation commands (`registersession`, `listidentity`, `sendrrdata`) and automatically switches to UDP port `2222` on `sendunitdata` or `transport udp`. Encodes the 24-byte little-endian EtherNet/IP Encapsulation Header (`Command`, `Length`, `Session Handle`, `Status`, 8-byte `Sender Context`, `Options`). Compile with `frameassembly show ethernetip_cip_cell.frasm`.\n\n```frameassembly\nhost studio_ws { ip 10.120.10.15 }\nhost clx_plc   { ip 10.120.10.60 }\n\ncompile {\n    studio_ws -> clx_plc tcp syn srcport 51818 dstport 44818 win 65535 mss 1460 wait 1ms\n    studio_ws <- clx_plc tcp syn ack win 65535 mss 1460 wait 1ms\n    studio_ws -> clx_plc tcp ack wait 1ms\n    // 1. ListIdentity (0x0063) + RegisterSession (0x0065)\n    studio_ws -> clx_plc ethernetip listidentity wait 2ms\n    studio_ws -> clx_plc ethernetip registersession context 0x1122334455667788 wait 2ms\n    studio_ws <- clx_plc ethernetip registersession sessionhandle 0x00010042 context 0x1122334455667788 status 0 wait 3ms\n    // 2. SendRRData (0x006f): CIP Get_Attribute_Single (0x0e) on Assembly Object (0x04), Instance 100, Attr 3\n    studio_ws -> clx_plc ethernetip sendrrdata sessionhandle 0x00010042 cipservice 0x0e cipclass 0x04 cipinstance 100 cipattr 3 wait 4ms\n    // 3. Implicit CIP I/O over UDP 2222 + UnRegisterSession\n    studio_ws -> clx_plc ethernetip sendunitdata sessionhandle 0x00010042 cipservice 0x0e cipclass 0x04 cipinstance 150 cipattr 3 transport udp wait 3ms\n    studio_ws -> clx_plc ethernetip unregistersession sessionhandle 0x00010042\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-opcua","task_type":"nl_to_frasm","protocols":["opcua","tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"OPC UA (`opcua`): Complete OPC UA Connection (`HEL`/`ACK`), `OpenSecureChannel`, `NodeId` Read & `CLO`\" (opcua_idmz_historian.frasm). Scenario: Establishes an OPC UA Binary TCP 4840 session across an Industrial DMZ, opens Secure Channel `1`, reads `\"ns=2;s=Turbine1.RPM\"` via `\"MSG\"`, and closes cleanly with `\"CLO\"`. Verify with Wireshark filter `opcua`.","completion":"Defaults to TCP destination port `4840` (`psh ack`), `msgtype \"HEL\"`, `chunktype \"F\"`, and calculates the 4-byte little-endian `MessageSize` across the entire OPC UA frame. Encodes IEC 62541-6 receive/send buffer sizes (`65535`) + length-prefixed UTF-8 `endpointurl` inside `\"HEL\"` and `\"ACK\"` frames. Compile with `frameassembly show opcua_idmz_historian.frasm`.\n\n```frameassembly\nhost idmz_hist { ip 172.18.35.20 }\nhost plant_ua  { ip 192.168.48.10 }\n\ncompile {\n    idmz_hist -> plant_ua tcp syn srcport 51840 dstport 4840 win 65535 mss 1460 wait 1ms\n    idmz_hist <- plant_ua tcp syn ack win 65535 mss 1460 wait 1ms\n    idmz_hist -> plant_ua tcp ack wait 1ms\n    // 1. Transport Hello / Acknowledge\n    idmz_hist -> plant_ua opcua msgtype \"HEL\" chunktype \"F\" endpointurl \"opc.tcp://192.168.48.10:4840/UA/PlantServer\" wait 2ms\n    idmz_hist <- plant_ua opcua msgtype \"ACK\" chunktype \"F\" wait 2ms\n    // 2. OpenSecureChannel (OPN)\n    idmz_hist -> plant_ua opcua msgtype \"OPN\" chunktype \"F\" securechannelid 0 seqnum 1 reqid 1 wait 2ms\n    idmz_hist <- plant_ua opcua msgtype \"OPN\" chunktype \"F\" securechannelid 1 tokenid 1 seqnum 1 reqid 1 wait 3ms\n    // 3. Service Read Request (MSG) for NodeId + CloseSecureChannel (CLO)\n    idmz_hist -> plant_ua opcua msgtype \"MSG\" chunktype \"F\" securechannelid 1 tokenid 1 seqnum 2 reqid 2 nodeid \"ns=2;s=Turbine1.RPM\" wait 4ms\n    idmz_hist -> plant_ua opcua msgtype \"CLO\" chunktype \"F\" securechannelid 1 tokenid 1 seqnum 3 reqid 3\n}\n```","frasm_code":"host idmz_hist { ip 172.18.35.20 }\nhost plant_ua  { ip 192.168.48.10 }\n\ncompile {\n    idmz_hist -> plant_ua tcp syn srcport 51840 dstport 4840 win 65535 mss 1460 wait 1ms\n    idmz_hist <- plant_ua tcp syn ack win 65535 mss 1460 wait 1ms\n    idmz_hist -> plant_ua tcp ack wait 1ms\n    // 1. Transport Hello / Acknowledge\n    idmz_hist -> plant_ua opcua msgtype \"HEL\" chunktype \"F\" endpointurl \"opc.tcp://192.168.48.10:4840/UA/PlantServer\" wait 2ms\n    idmz_hist <- plant_ua opcua msgtype \"ACK\" chunktype \"F\" wait 2ms\n    // 2. OpenSecureChannel (OPN)\n    idmz_hist -> plant_ua opcua msgtype \"OPN\" chunktype \"F\" securechannelid 0 seqnum 1 reqid 1 wait 2ms\n    idmz_hist <- plant_ua opcua msgtype \"OPN\" chunktype \"F\" securechannelid 1 tokenid 1 seqnum 1 reqid 1 wait 3ms\n    // 3. Service Read Request (MSG) for NodeId + CloseSecureChannel (CLO)\n    idmz_hist -> plant_ua opcua msgtype \"MSG\" chunktype \"F\" securechannelid 1 tokenid 1 seqnum 2 reqid 2 nodeid \"ns=2;s=Turbine1.RPM\" wait 4ms\n    idmz_hist -> plant_ua opcua msgtype \"CLO\" chunktype \"F\" securechannelid 1 tokenid 1 seqnum 3 reqid 3\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"OPC UA (`opcua`): Complete OPC UA Connection (`HEL`/`ACK`), `OpenSecureChannel`, `NodeId` Read & `CLO`\" (opcua_idmz_historian.frasm). Scenario: Establishes an OPC UA Binary TCP 4840 session across an Industrial DMZ, opens Secure Channel `1`, reads `\"ns=2;s=Turbine1.RPM\"` via `\"MSG\"`, and closes cleanly with `\"CLO\"`. Verify with Wireshark filter `opcua`."},{"role":"assistant","content":"Defaults to TCP destination port `4840` (`psh ack`), `msgtype \"HEL\"`, `chunktype \"F\"`, and calculates the 4-byte little-endian `MessageSize` across the entire OPC UA frame. Encodes IEC 62541-6 receive/send buffer sizes (`65535`) + length-prefixed UTF-8 `endpointurl` inside `\"HEL\"` and `\"ACK\"` frames. Compile with `frameassembly show opcua_idmz_historian.frasm`.\n\n```frameassembly\nhost idmz_hist { ip 172.18.35.20 }\nhost plant_ua  { ip 192.168.48.10 }\n\ncompile {\n    idmz_hist -> plant_ua tcp syn srcport 51840 dstport 4840 win 65535 mss 1460 wait 1ms\n    idmz_hist <- plant_ua tcp syn ack win 65535 mss 1460 wait 1ms\n    idmz_hist -> plant_ua tcp ack wait 1ms\n    // 1. Transport Hello / Acknowledge\n    idmz_hist -> plant_ua opcua msgtype \"HEL\" chunktype \"F\" endpointurl \"opc.tcp://192.168.48.10:4840/UA/PlantServer\" wait 2ms\n    idmz_hist <- plant_ua opcua msgtype \"ACK\" chunktype \"F\" wait 2ms\n    // 2. OpenSecureChannel (OPN)\n    idmz_hist -> plant_ua opcua msgtype \"OPN\" chunktype \"F\" securechannelid 0 seqnum 1 reqid 1 wait 2ms\n    idmz_hist <- plant_ua opcua msgtype \"OPN\" chunktype \"F\" securechannelid 1 tokenid 1 seqnum 1 reqid 1 wait 3ms\n    // 3. Service Read Request (MSG) for NodeId + CloseSecureChannel (CLO)\n    idmz_hist -> plant_ua opcua msgtype \"MSG\" chunktype \"F\" securechannelid 1 tokenid 1 seqnum 2 reqid 2 nodeid \"ns=2;s=Turbine1.RPM\" wait 4ms\n    idmz_hist -> plant_ua opcua msgtype \"CLO\" chunktype \"F\" securechannelid 1 tokenid 1 seqnum 3 reqid 3\n}\n```"}]}
{"id":"sft-cookbook-proto-lab-coap","task_type":"nl_to_frasm","protocols":["coap"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"CoAP (IoT) (`coap`): Confirmable CoAP Sensor GET (`2.05 Content`) & Missing Resource (`4.04`)\" (coap_ipv6_sensors.frasm). Scenario: Queries `/sensors/temp` over IPv6 receiving a piggybacked `ack` with `code \"2.05\"` JSON payload, then queries an unknown path returning `notfound` (`4.04`). Verify with Wireshark filter `coap`.","completion":"Defaults to UDP destination port `5683` and packs CoAP Version `1`, 2-bit Type, Token Length (`TKL`), 1-byte `c.dd` Code (`(class << 5) | detail`), and 16-bit `msgid`. Splits slash-separated `uripath` strings (`\"telemetry/humidity\"`) into individual delta-encoded Option `11` (`Uri-Path`) segments automatically. Compile with `frameassembly show coap_ipv6_sensors.frasm`.\n\n```frameassembly\nhost collector { ip 2001:db8:70::1 }\nhost mote_12   { ip 2001:db8:70::12 }\n\ncompile {\n    // 1. Confirmable GET -> Piggybacked ACK 2.05 Content (contentformat 50 = application/json)\n    collector -> mote_12 coap con get msgid 500 token 0x0102 uripath \"sensors/temp\" wait 4ms\n    collector <- mote_12 coap ack code \"2.05\" msgid 500 token 0x0102 contentformat 50 payload \"{\\\"c\\\":22.4}\" wait 5ms\n    // 2. Unknown URI -> 4.04 Not Found\n    collector -> mote_12 coap con get msgid 501 token 0x0103 uripath \"sensors/valve9\" wait 4ms\n    collector <- mote_12 coap ack notfound msgid 501 token 0x0103\n}\n```","frasm_code":"host collector { ip 2001:db8:70::1 }\nhost mote_12   { ip 2001:db8:70::12 }\n\ncompile {\n    // 1. Confirmable GET -> Piggybacked ACK 2.05 Content (contentformat 50 = application/json)\n    collector -> mote_12 coap con get msgid 500 token 0x0102 uripath \"sensors/temp\" wait 4ms\n    collector <- mote_12 coap ack code \"2.05\" msgid 500 token 0x0102 contentformat 50 payload \"{\\\"c\\\":22.4}\" wait 5ms\n    // 2. Unknown URI -> 4.04 Not Found\n    collector -> mote_12 coap con get msgid 501 token 0x0103 uripath \"sensors/valve9\" wait 4ms\n    collector <- mote_12 coap ack notfound msgid 501 token 0x0103\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"CoAP (IoT) (`coap`): Confirmable CoAP Sensor GET (`2.05 Content`) & Missing Resource (`4.04`)\" (coap_ipv6_sensors.frasm). Scenario: Queries `/sensors/temp` over IPv6 receiving a piggybacked `ack` with `code \"2.05\"` JSON payload, then queries an unknown path returning `notfound` (`4.04`). Verify with Wireshark filter `coap`."},{"role":"assistant","content":"Defaults to UDP destination port `5683` and packs CoAP Version `1`, 2-bit Type, Token Length (`TKL`), 1-byte `c.dd` Code (`(class << 5) | detail`), and 16-bit `msgid`. Splits slash-separated `uripath` strings (`\"telemetry/humidity\"`) into individual delta-encoded Option `11` (`Uri-Path`) segments automatically. Compile with `frameassembly show coap_ipv6_sensors.frasm`.\n\n```frameassembly\nhost collector { ip 2001:db8:70::1 }\nhost mote_12   { ip 2001:db8:70::12 }\n\ncompile {\n    // 1. Confirmable GET -> Piggybacked ACK 2.05 Content (contentformat 50 = application/json)\n    collector -> mote_12 coap con get msgid 500 token 0x0102 uripath \"sensors/temp\" wait 4ms\n    collector <- mote_12 coap ack code \"2.05\" msgid 500 token 0x0102 contentformat 50 payload \"{\\\"c\\\":22.4}\" wait 5ms\n    // 2. Unknown URI -> 4.04 Not Found\n    collector -> mote_12 coap con get msgid 501 token 0x0103 uripath \"sensors/valve9\" wait 4ms\n    collector <- mote_12 coap ack notfound msgid 501 token 0x0103\n}\n```"}]}
{"id":"sft-cookbook-ex-mig-01-scapy-tcp-http-stream","task_type":"nl_to_frasm","protocols":["tcp","http"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Scapy Manual TCP Sequence Math -> Stateful .frasm HTTP Exchange\" (mig_scapy_stateful_http.frasm). Scenario: In Scapy, crafting a bidirectional HTTP conversation requires manually counting payload byte lengths, flipping IP/MAC/TCP port tuples on every reply, and maintaining seq/ack variables. FrameAssembly tracks the 4-tuple state and <- port swap automatically. Verify with Wireshark filter `http && tcp.port == 8080`.","completion":"Specify srcport and dstport once on syn; HTTP frames emit psh ack and advance seq by exact wire byte length. Compile with `frameassembly mig_scapy_stateful_http.frasm`.\n\n```frameassembly\nhost client { ip 10.0.0.10 }\nhost server { ip 10.0.0.20 }\n\ncompile {\n    client -> server tcp syn srcport 51200 dstport 8080 win 65535 mss 1460 wait 1ms\n    client <- server tcp syn ack win 65535 mss 1460 wait 1ms\n    client -> server tcp ack wait 1ms\n    client -> server http get uri \"/health\" hosthdr \"api.internal\" wait 2ms\n    client <- server http status 200 reason \"OK\" contenttype \"application/json\" body \"{\\\"ok\\\":true}\"\n}\n```","frasm_code":"host client { ip 10.0.0.10 }\nhost server { ip 10.0.0.20 }\n\ncompile {\n    client -> server tcp syn srcport 51200 dstport 8080 win 65535 mss 1460 wait 1ms\n    client <- server tcp syn ack win 65535 mss 1460 wait 1ms\n    client -> server tcp ack wait 1ms\n    client -> server http get uri \"/health\" hosthdr \"api.internal\" wait 2ms\n    client <- server http status 200 reason \"OK\" contenttype \"application/json\" body \"{\\\"ok\\\":true}\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Scapy Manual TCP Sequence Math -> Stateful .frasm HTTP Exchange\" (mig_scapy_stateful_http.frasm). Scenario: In Scapy, crafting a bidirectional HTTP conversation requires manually counting payload byte lengths, flipping IP/MAC/TCP port tuples on every reply, and maintaining seq/ack variables. FrameAssembly tracks the 4-tuple state and <- port swap automatically. Verify with Wireshark filter `http && tcp.port == 8080`."},{"role":"assistant","content":"Specify srcport and dstport once on syn; HTTP frames emit psh ack and advance seq by exact wire byte length. Compile with `frameassembly mig_scapy_stateful_http.frasm`.\n\n```frameassembly\nhost client { ip 10.0.0.10 }\nhost server { ip 10.0.0.20 }\n\ncompile {\n    client -> server tcp syn srcport 51200 dstport 8080 win 65535 mss 1460 wait 1ms\n    client <- server tcp syn ack win 65535 mss 1460 wait 1ms\n    client -> server tcp ack wait 1ms\n    client -> server http get uri \"/health\" hosthdr \"api.internal\" wait 2ms\n    client <- server http status 200 reason \"OK\" contenttype \"application/json\" body \"{\\\"ok\\\":true}\"\n}\n```"}]}
{"id":"sft-migration-ex-mig-01-scapy-tcp-http-stream","task_type":"tool_migration","protocols":["tcp","http"],"version":"3.3.0","license":"MIT","prompt":"Translate the following Equivalent Imperative Scapy Script workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```python\nfrom scapy.all import Ether, IP, TCP, Raw, wrpcap\nreq = b\"GET /health HTTP/1.1\\r\\nHost: api.internal\\r\\n\\r\\n\"\nresp = b\"HTTP/1.1 200 OK\\r\\nContent-Length: 11\\r\\n\\r\\n{\\\"ok\\\":true}\"\npkts = [\n    Ether()/IP(src=\"10.0.0.10\", dst=\"10.0.0.20\")/TCP(sport=51200, dport=8080, flags=\"S\", seq=1000),\n    Ether()/IP(src=\"10.0.0.20\", dst=\"10.0.0.10\")/TCP(sport=8080, dport=51200, flags=\"SA\", seq=2000, ack=1001),\n    Ether()/IP(src=\"10.0.0.10\", dst=\"10.0.0.20\")/TCP(sport=51200, dport=8080, flags=\"A\", seq=1001, ack=2001),\n    Ether()/IP(src=\"10.0.0.10\", dst=\"10.0.0.20\")/TCP(sport=51200, dport=8080, flags=\"PA\", seq=1001, ack=2001)/Raw(req),\n    Ether()/IP(src=\"10.0.0.20\", dst=\"10.0.0.10\")/TCP(sport=8080, dport=51200, flags=\"PA\", seq=2001, ack=1001+len(req))/Raw(resp),\n]\nwrpcap(\"mig_scapy_stateful_http.pcap\", pkts)\n```","completion":"In Scapy, crafting a bidirectional HTTP conversation requires manually counting payload byte lengths, flipping IP/MAC/TCP port tuples on every reply, and maintaining seq/ack variables. FrameAssembly tracks the 4-tuple state and <- port swap automatically. Specify srcport and dstport once on syn; HTTP frames emit psh ack and advance seq by exact wire byte length.\n\n```frameassembly\nhost client { ip 10.0.0.10 }\nhost server { ip 10.0.0.20 }\n\ncompile {\n    client -> server tcp syn srcport 51200 dstport 8080 win 65535 mss 1460 wait 1ms\n    client <- server tcp syn ack win 65535 mss 1460 wait 1ms\n    client -> server tcp ack wait 1ms\n    client -> server http get uri \"/health\" hosthdr \"api.internal\" wait 2ms\n    client <- server http status 200 reason \"OK\" contenttype \"application/json\" body \"{\\\"ok\\\":true}\"\n}\n```","frasm_code":"host client { ip 10.0.0.10 }\nhost server { ip 10.0.0.20 }\n\ncompile {\n    client -> server tcp syn srcport 51200 dstport 8080 win 65535 mss 1460 wait 1ms\n    client <- server tcp syn ack win 65535 mss 1460 wait 1ms\n    client -> server tcp ack wait 1ms\n    client -> server http get uri \"/health\" hosthdr \"api.internal\" wait 2ms\n    client <- server http status 200 reason \"OK\" contenttype \"application/json\" body \"{\\\"ok\\\":true}\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Translate the following Equivalent Imperative Scapy Script workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```python\nfrom scapy.all import Ether, IP, TCP, Raw, wrpcap\nreq = b\"GET /health HTTP/1.1\\r\\nHost: api.internal\\r\\n\\r\\n\"\nresp = b\"HTTP/1.1 200 OK\\r\\nContent-Length: 11\\r\\n\\r\\n{\\\"ok\\\":true}\"\npkts = [\n    Ether()/IP(src=\"10.0.0.10\", dst=\"10.0.0.20\")/TCP(sport=51200, dport=8080, flags=\"S\", seq=1000),\n    Ether()/IP(src=\"10.0.0.20\", dst=\"10.0.0.10\")/TCP(sport=8080, dport=51200, flags=\"SA\", seq=2000, ack=1001),\n    Ether()/IP(src=\"10.0.0.10\", dst=\"10.0.0.20\")/TCP(sport=51200, dport=8080, flags=\"A\", seq=1001, ack=2001),\n    Ether()/IP(src=\"10.0.0.10\", dst=\"10.0.0.20\")/TCP(sport=51200, dport=8080, flags=\"PA\", seq=1001, ack=2001)/Raw(req),\n    Ether()/IP(src=\"10.0.0.20\", dst=\"10.0.0.10\")/TCP(sport=8080, dport=51200, flags=\"PA\", seq=2001, ack=1001+len(req))/Raw(resp),\n]\nwrpcap(\"mig_scapy_stateful_http.pcap\", pkts)\n```"},{"role":"assistant","content":"In Scapy, crafting a bidirectional HTTP conversation requires manually counting payload byte lengths, flipping IP/MAC/TCP port tuples on every reply, and maintaining seq/ack variables. FrameAssembly tracks the 4-tuple state and <- port swap automatically. Specify srcport and dstport once on syn; HTTP frames emit psh ack and advance seq by exact wire byte length.\n\n```frameassembly\nhost client { ip 10.0.0.10 }\nhost server { ip 10.0.0.20 }\n\ncompile {\n    client -> server tcp syn srcport 51200 dstport 8080 win 65535 mss 1460 wait 1ms\n    client <- server tcp syn ack win 65535 mss 1460 wait 1ms\n    client -> server tcp ack wait 1ms\n    client -> server http get uri \"/health\" hosthdr \"api.internal\" wait 2ms\n    client <- server http status 200 reason \"OK\" contenttype \"application/json\" body \"{\\\"ok\\\":true}\"\n}\n```"}]}
{"id":"sft-cookbook-ex-mig-02-scapy-qinq-double-tag","task_type":"nl_to_frasm","protocols":["qinq","ospf"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Scapy Dot1AD / Dot1Q Stacking -> Cross-Layer qinq + innervlan Modifier\" (mig_scapy_qinq_stack.frasm). Scenario: Replaces nested Scapy Ether(type=0x88a8)/Dot1Q()/Dot1Q() layer constructors with a declarative qinq <svlan> innervlan <cvlan> modifier usable on any L3–L7 protocol. Verify with Wireshark filter `vlan.id == 300 && ospf`.","completion":"Writes outer IEEE 802.1ad TPID 0x88a8 (S-VLAN 300, PCP 5) followed by inner 802.1Q TPID 0x8100 (C-VLAN 40). Compile with `frameassembly mig_scapy_qinq_stack.frasm`.\n\n```frameassembly\nhost ce_rtr     { ip 10.30.40.1 mac 00:1c:73:01:00:01 }\nhost ospf_mcast { ip 224.0.0.5 }\n\ncompile {\n    ce_rtr -> ospf_mcast qinq 300 innervlan 40 pcp 5 ospf hello routerid 10.30.40.1 areaid 0.0.0.0 hellointerval 10 deadinterval 40 ttl 1\n}\n```","frasm_code":"host ce_rtr     { ip 10.30.40.1 mac 00:1c:73:01:00:01 }\nhost ospf_mcast { ip 224.0.0.5 }\n\ncompile {\n    ce_rtr -> ospf_mcast qinq 300 innervlan 40 pcp 5 ospf hello routerid 10.30.40.1 areaid 0.0.0.0 hellointerval 10 deadinterval 40 ttl 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Scapy Dot1AD / Dot1Q Stacking -> Cross-Layer qinq + innervlan Modifier\" (mig_scapy_qinq_stack.frasm). Scenario: Replaces nested Scapy Ether(type=0x88a8)/Dot1Q()/Dot1Q() layer constructors with a declarative qinq <svlan> innervlan <cvlan> modifier usable on any L3–L7 protocol. Verify with Wireshark filter `vlan.id == 300 && ospf`."},{"role":"assistant","content":"Writes outer IEEE 802.1ad TPID 0x88a8 (S-VLAN 300, PCP 5) followed by inner 802.1Q TPID 0x8100 (C-VLAN 40). Compile with `frameassembly mig_scapy_qinq_stack.frasm`.\n\n```frameassembly\nhost ce_rtr     { ip 10.30.40.1 mac 00:1c:73:01:00:01 }\nhost ospf_mcast { ip 224.0.0.5 }\n\ncompile {\n    ce_rtr -> ospf_mcast qinq 300 innervlan 40 pcp 5 ospf hello routerid 10.30.40.1 areaid 0.0.0.0 hellointerval 10 deadinterval 40 ttl 1\n}\n```"}]}
{"id":"sft-migration-ex-mig-02-scapy-qinq-double-tag","task_type":"tool_migration","protocols":["qinq","ospf"],"version":"3.3.0","license":"MIT","prompt":"Translate the following Scapy 802.1ad + 802.1Q Layer Stack workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```python\nfrom scapy.all import Ether, Dot1AD, Dot1Q, IP, wrpcap\nfrom scapy.contrib.ospf import OSPF_Hdr, OSPF_Hello\npkt = (Ether(src=\"00:1c:73:01:00:01\", dst=\"01:00:5e:00:00:05\")\n       / Dot1AD(vlan=300, prio=5) / Dot1Q(vlan=40)\n       / IP(src=\"10.30.40.1\", dst=\"224.0.0.5\", ttl=1)\n       / OSPF_Hdr(src=\"10.30.40.1\", area=\"0.0.0.0\") / OSPF_Hello())\nwrpcap(\"mig_scapy_qinq_stack.pcap\", [pkt])\n```","completion":"Replaces nested Scapy Ether(type=0x88a8)/Dot1Q()/Dot1Q() layer constructors with a declarative qinq <svlan> innervlan <cvlan> modifier usable on any L3–L7 protocol. Writes outer IEEE 802.1ad TPID 0x88a8 (S-VLAN 300, PCP 5) followed by inner 802.1Q TPID 0x8100 (C-VLAN 40).\n\n```frameassembly\nhost ce_rtr     { ip 10.30.40.1 mac 00:1c:73:01:00:01 }\nhost ospf_mcast { ip 224.0.0.5 }\n\ncompile {\n    ce_rtr -> ospf_mcast qinq 300 innervlan 40 pcp 5 ospf hello routerid 10.30.40.1 areaid 0.0.0.0 hellointerval 10 deadinterval 40 ttl 1\n}\n```","frasm_code":"host ce_rtr     { ip 10.30.40.1 mac 00:1c:73:01:00:01 }\nhost ospf_mcast { ip 224.0.0.5 }\n\ncompile {\n    ce_rtr -> ospf_mcast qinq 300 innervlan 40 pcp 5 ospf hello routerid 10.30.40.1 areaid 0.0.0.0 hellointerval 10 deadinterval 40 ttl 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Translate the following Scapy 802.1ad + 802.1Q Layer Stack workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```python\nfrom scapy.all import Ether, Dot1AD, Dot1Q, IP, wrpcap\nfrom scapy.contrib.ospf import OSPF_Hdr, OSPF_Hello\npkt = (Ether(src=\"00:1c:73:01:00:01\", dst=\"01:00:5e:00:00:05\")\n       / Dot1AD(vlan=300, prio=5) / Dot1Q(vlan=40)\n       / IP(src=\"10.30.40.1\", dst=\"224.0.0.5\", ttl=1)\n       / OSPF_Hdr(src=\"10.30.40.1\", area=\"0.0.0.0\") / OSPF_Hello())\nwrpcap(\"mig_scapy_qinq_stack.pcap\", [pkt])\n```"},{"role":"assistant","content":"Replaces nested Scapy Ether(type=0x88a8)/Dot1Q()/Dot1Q() layer constructors with a declarative qinq <svlan> innervlan <cvlan> modifier usable on any L3–L7 protocol. Writes outer IEEE 802.1ad TPID 0x88a8 (S-VLAN 300, PCP 5) followed by inner 802.1Q TPID 0x8100 (C-VLAN 40).\n\n```frameassembly\nhost ce_rtr     { ip 10.30.40.1 mac 00:1c:73:01:00:01 }\nhost ospf_mcast { ip 224.0.0.5 }\n\ncompile {\n    ce_rtr -> ospf_mcast qinq 300 innervlan 40 pcp 5 ospf hello routerid 10.30.40.1 areaid 0.0.0.0 hellointerval 10 deadinterval 40 ttl 1\n}\n```"}]}
{"id":"sft-cookbook-ex-mig-03-scapy-snmpv3-usm-crypto","task_type":"nl_to_frasm","protocols":["snmp3"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"PySNMP / Scapy USM Boilerplate -> Single-Line Encrypted SNMPv3 Trap\" (mig_snmpv3_usm_authpriv.frasm). Scenario: Generating an encrypted RFC 3414/3826/7860 SNMPv3 authPriv trap in Python normally requires PySNMP key localization, ASN.1 BER encoders, and MIB compilation. FrameAssembly performs SHA-256 key localization and AES-128-CFB encryption natively. Verify with Wireshark filter `snmp && udp.port == 162`.","completion":"Computes localized Ku -> Kul keys from engineid hex, encrypts the scopedPDU with AES-128, and signs the packet with HMAC-SHA-256. Compile with `frameassembly mig_snmpv3_usm_authpriv.frasm`.\n\n```frameassembly\nhost core_rtr { ip 10.40.1.1 }\nhost nms_srv  { ip 10.40.1.100 }\n\ncompile {\n    core_rtr -> nms_srv snmp3 trap user \"secops\" engineid \"80001f888001020304\" engineboots 3 enginetime 1200 auth sha256 \"AuthSecret2026!\" priv aes \"PrivSecret2026!\" sysuptime 240000 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 \"TenGigE0/0/1\"\n}\n```","frasm_code":"host core_rtr { ip 10.40.1.1 }\nhost nms_srv  { ip 10.40.1.100 }\n\ncompile {\n    core_rtr -> nms_srv snmp3 trap user \"secops\" engineid \"80001f888001020304\" engineboots 3 enginetime 1200 auth sha256 \"AuthSecret2026!\" priv aes \"PrivSecret2026!\" sysuptime 240000 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 \"TenGigE0/0/1\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"PySNMP / Scapy USM Boilerplate -> Single-Line Encrypted SNMPv3 Trap\" (mig_snmpv3_usm_authpriv.frasm). Scenario: Generating an encrypted RFC 3414/3826/7860 SNMPv3 authPriv trap in Python normally requires PySNMP key localization, ASN.1 BER encoders, and MIB compilation. FrameAssembly performs SHA-256 key localization and AES-128-CFB encryption natively. Verify with Wireshark filter `snmp && udp.port == 162`."},{"role":"assistant","content":"Computes localized Ku -> Kul keys from engineid hex, encrypts the scopedPDU with AES-128, and signs the packet with HMAC-SHA-256. Compile with `frameassembly mig_snmpv3_usm_authpriv.frasm`.\n\n```frameassembly\nhost core_rtr { ip 10.40.1.1 }\nhost nms_srv  { ip 10.40.1.100 }\n\ncompile {\n    core_rtr -> nms_srv snmp3 trap user \"secops\" engineid \"80001f888001020304\" engineboots 3 enginetime 1200 auth sha256 \"AuthSecret2026!\" priv aes \"PrivSecret2026!\" sysuptime 240000 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 \"TenGigE0/0/1\"\n}\n```"}]}
{"id":"sft-migration-ex-mig-03-scapy-snmpv3-usm-crypto","task_type":"tool_migration","protocols":["snmp3"],"version":"3.3.0","license":"MIT","prompt":"Translate the following net-snmp CLI Equivalent (Requires Live Socket & Daemon) workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```bash\nsnmptrap -v 3 -e 0x80001f888001020304 -u secops \\\n  -a SHA-256 -A \"AuthSecret2026!\" -x AES -X \"PrivSecret2026!\" \\\n  -l authPriv 10.40.1.100:162 240000 1.3.6.1.6.3.1.1.5.3 \\\n  1.3.6.1.2.1.2.2.1.2.1 s \"TenGigE0/0/1\"\n```","completion":"Generating an encrypted RFC 3414/3826/7860 SNMPv3 authPriv trap in Python normally requires PySNMP key localization, ASN.1 BER encoders, and MIB compilation. FrameAssembly performs SHA-256 key localization and AES-128-CFB encryption natively. Computes localized Ku -> Kul keys from engineid hex, encrypts the scopedPDU with AES-128, and signs the packet with HMAC-SHA-256.\n\n```frameassembly\nhost core_rtr { ip 10.40.1.1 }\nhost nms_srv  { ip 10.40.1.100 }\n\ncompile {\n    core_rtr -> nms_srv snmp3 trap user \"secops\" engineid \"80001f888001020304\" engineboots 3 enginetime 1200 auth sha256 \"AuthSecret2026!\" priv aes \"PrivSecret2026!\" sysuptime 240000 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 \"TenGigE0/0/1\"\n}\n```","frasm_code":"host core_rtr { ip 10.40.1.1 }\nhost nms_srv  { ip 10.40.1.100 }\n\ncompile {\n    core_rtr -> nms_srv snmp3 trap user \"secops\" engineid \"80001f888001020304\" engineboots 3 enginetime 1200 auth sha256 \"AuthSecret2026!\" priv aes \"PrivSecret2026!\" sysuptime 240000 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 \"TenGigE0/0/1\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Translate the following net-snmp CLI Equivalent (Requires Live Socket & Daemon) workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```bash\nsnmptrap -v 3 -e 0x80001f888001020304 -u secops \\\n  -a SHA-256 -A \"AuthSecret2026!\" -x AES -X \"PrivSecret2026!\" \\\n  -l authPriv 10.40.1.100:162 240000 1.3.6.1.6.3.1.1.5.3 \\\n  1.3.6.1.2.1.2.2.1.2.1 s \"TenGigE0/0/1\"\n```"},{"role":"assistant","content":"Generating an encrypted RFC 3414/3826/7860 SNMPv3 authPriv trap in Python normally requires PySNMP key localization, ASN.1 BER encoders, and MIB compilation. FrameAssembly performs SHA-256 key localization and AES-128-CFB encryption natively. Computes localized Ku -> Kul keys from engineid hex, encrypts the scopedPDU with AES-128, and signs the packet with HMAC-SHA-256.\n\n```frameassembly\nhost core_rtr { ip 10.40.1.1 }\nhost nms_srv  { ip 10.40.1.100 }\n\ncompile {\n    core_rtr -> nms_srv snmp3 trap user \"secops\" engineid \"80001f888001020304\" engineboots 3 enginetime 1200 auth sha256 \"AuthSecret2026!\" priv aes \"PrivSecret2026!\" sysuptime 240000 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 \"TenGigE0/0/1\"\n}\n```"}]}
{"id":"sft-cookbook-ex-mig-04-scapy-dual-stack-dedup","task_type":"nl_to_frasm","protocols":["tcp","tls"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Scapy IP() vs IPv6() Script Duplication -> Reusable Dual-Stack flow(c, s)\" (mig_dual_stack_tls_flow.frasm). Scenario: Instead of maintaining separate Scapy IP() and IPv6() builders for dual-stack regression suites, write one parameterized flow(c, s) and invoke it for IPv4 and IPv6 host pairs. Verify with Wireshark filter `tls.handshake.extensions_server_name == \"api.example.com\"`.","completion":"Emits EtherType 0x0800 on the first call and EtherType 0x86dd (with IPv6 pseudo-header TCP checksums) on the second call. Compile with `frameassembly mig_dual_stack_tls_flow.frasm`.\n\n```frameassembly\nhost app_v4 { ip 10.1.1.10 }\nhost gw_v4  { ip 10.1.1.20 }\nhost app_v6 { ip 2001:db8::10 }\nhost gw_v6  { ip 2001:db8::20 }\n\nflow tls_sni_probe(c, s) {\n    c -> s tcp syn srcport 52443 dstport 443 win 65535 mss 1440 wait 1ms\n    c <- s tcp syn ack win 65535 mss 1440 wait 1ms\n    c -> s tcp ack wait 1ms\n    c -> s tls clienthello sni \"api.example.com\" alpn \"h2\" wait 2ms\n    c <- s tls serverhello ciphersuite 0x1301\n}\n\ncompile {\n    tls_sni_probe(app_v4, gw_v4)\n    tls_sni_probe(app_v6, gw_v6)\n}\n```","frasm_code":"host app_v4 { ip 10.1.1.10 }\nhost gw_v4  { ip 10.1.1.20 }\nhost app_v6 { ip 2001:db8::10 }\nhost gw_v6  { ip 2001:db8::20 }\n\nflow tls_sni_probe(c, s) {\n    c -> s tcp syn srcport 52443 dstport 443 win 65535 mss 1440 wait 1ms\n    c <- s tcp syn ack win 65535 mss 1440 wait 1ms\n    c -> s tcp ack wait 1ms\n    c -> s tls clienthello sni \"api.example.com\" alpn \"h2\" wait 2ms\n    c <- s tls serverhello ciphersuite 0x1301\n}\n\ncompile {\n    tls_sni_probe(app_v4, gw_v4)\n    tls_sni_probe(app_v6, gw_v6)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Scapy IP() vs IPv6() Script Duplication -> Reusable Dual-Stack flow(c, s)\" (mig_dual_stack_tls_flow.frasm). Scenario: Instead of maintaining separate Scapy IP() and IPv6() builders for dual-stack regression suites, write one parameterized flow(c, s) and invoke it for IPv4 and IPv6 host pairs. Verify with Wireshark filter `tls.handshake.extensions_server_name == \"api.example.com\"`."},{"role":"assistant","content":"Emits EtherType 0x0800 on the first call and EtherType 0x86dd (with IPv6 pseudo-header TCP checksums) on the second call. Compile with `frameassembly mig_dual_stack_tls_flow.frasm`.\n\n```frameassembly\nhost app_v4 { ip 10.1.1.10 }\nhost gw_v4  { ip 10.1.1.20 }\nhost app_v6 { ip 2001:db8::10 }\nhost gw_v6  { ip 2001:db8::20 }\n\nflow tls_sni_probe(c, s) {\n    c -> s tcp syn srcport 52443 dstport 443 win 65535 mss 1440 wait 1ms\n    c <- s tcp syn ack win 65535 mss 1440 wait 1ms\n    c -> s tcp ack wait 1ms\n    c -> s tls clienthello sni \"api.example.com\" alpn \"h2\" wait 2ms\n    c <- s tls serverhello ciphersuite 0x1301\n}\n\ncompile {\n    tls_sni_probe(app_v4, gw_v4)\n    tls_sni_probe(app_v6, gw_v6)\n}\n```"}]}
{"id":"sft-migration-ex-mig-04-scapy-dual-stack-dedup","task_type":"tool_migration","protocols":["tcp","tls"],"version":"3.3.0","license":"MIT","prompt":"Translate the following Duplicated IPv4 / IPv6 Scapy Construction workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```python\n# In Scapy, IP() and IPv6() require separate packet lists & L3 headers:\nv4_syn = Ether()/IP(src=\"10.1.1.10\", dst=\"10.1.1.20\")/TCP(sport=52443, dport=443, flags=\"S\")\nv6_syn = Ether()/IPv6(src=\"2001:db8::10\", dst=\"2001:db8::20\")/TCP(sport=52443, dport=443, flags=\"S\")\n```","completion":"Instead of maintaining separate Scapy IP() and IPv6() builders for dual-stack regression suites, write one parameterized flow(c, s) and invoke it for IPv4 and IPv6 host pairs. Emits EtherType 0x0800 on the first call and EtherType 0x86dd (with IPv6 pseudo-header TCP checksums) on the second call.\n\n```frameassembly\nhost app_v4 { ip 10.1.1.10 }\nhost gw_v4  { ip 10.1.1.20 }\nhost app_v6 { ip 2001:db8::10 }\nhost gw_v6  { ip 2001:db8::20 }\n\nflow tls_sni_probe(c, s) {\n    c -> s tcp syn srcport 52443 dstport 443 win 65535 mss 1440 wait 1ms\n    c <- s tcp syn ack win 65535 mss 1440 wait 1ms\n    c -> s tcp ack wait 1ms\n    c -> s tls clienthello sni \"api.example.com\" alpn \"h2\" wait 2ms\n    c <- s tls serverhello ciphersuite 0x1301\n}\n\ncompile {\n    tls_sni_probe(app_v4, gw_v4)\n    tls_sni_probe(app_v6, gw_v6)\n}\n```","frasm_code":"host app_v4 { ip 10.1.1.10 }\nhost gw_v4  { ip 10.1.1.20 }\nhost app_v6 { ip 2001:db8::10 }\nhost gw_v6  { ip 2001:db8::20 }\n\nflow tls_sni_probe(c, s) {\n    c -> s tcp syn srcport 52443 dstport 443 win 65535 mss 1440 wait 1ms\n    c <- s tcp syn ack win 65535 mss 1440 wait 1ms\n    c -> s tcp ack wait 1ms\n    c -> s tls clienthello sni \"api.example.com\" alpn \"h2\" wait 2ms\n    c <- s tls serverhello ciphersuite 0x1301\n}\n\ncompile {\n    tls_sni_probe(app_v4, gw_v4)\n    tls_sni_probe(app_v6, gw_v6)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Translate the following Duplicated IPv4 / IPv6 Scapy Construction workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```python\n# In Scapy, IP() and IPv6() require separate packet lists & L3 headers:\nv4_syn = Ether()/IP(src=\"10.1.1.10\", dst=\"10.1.1.20\")/TCP(sport=52443, dport=443, flags=\"S\")\nv6_syn = Ether()/IPv6(src=\"2001:db8::10\", dst=\"2001:db8::20\")/TCP(sport=52443, dport=443, flags=\"S\")\n```"},{"role":"assistant","content":"Instead of maintaining separate Scapy IP() and IPv6() builders for dual-stack regression suites, write one parameterized flow(c, s) and invoke it for IPv4 and IPv6 host pairs. Emits EtherType 0x0800 on the first call and EtherType 0x86dd (with IPv6 pseudo-header TCP checksums) on the second call.\n\n```frameassembly\nhost app_v4 { ip 10.1.1.10 }\nhost gw_v4  { ip 10.1.1.20 }\nhost app_v6 { ip 2001:db8::10 }\nhost gw_v6  { ip 2001:db8::20 }\n\nflow tls_sni_probe(c, s) {\n    c -> s tcp syn srcport 52443 dstport 443 win 65535 mss 1440 wait 1ms\n    c <- s tcp syn ack win 65535 mss 1440 wait 1ms\n    c -> s tcp ack wait 1ms\n    c -> s tls clienthello sni \"api.example.com\" alpn \"h2\" wait 2ms\n    c <- s tls serverhello ciphersuite 0x1301\n}\n\ncompile {\n    tls_sni_probe(app_v4, gw_v4)\n    tls_sni_probe(app_v6, gw_v6)\n}\n```"}]}
{"id":"sft-cookbook-ex-mig-05-scapy-bgp-contrib-to-frasm","task_type":"nl_to_frasm","protocols":["tcp","bgp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Scapy scapy.contrib.bgp Byte Packing -> Native bgp open / update\" (mig_scapy_bgp_nlri.frasm). Scenario: Translates verbose scapy.contrib.bgp path-attribute constructors into readable bgp open, keepalive, update, and notification lines. Verify with Wireshark filter `bgp`.","completion":"Automatically prepends the 16-byte all-ones BGP marker (ff..ff) and 16-bit message length. Compile with `frameassembly mig_scapy_bgp_nlri.frasm`.\n\n```frameassembly\nhost peer_a { ip 192.0.2.1 }\nhost peer_b { ip 192.0.2.2 }\n\ncompile {\n    peer_a -> peer_b tcp syn srcport 50179 dstport 179 ttl 1 wait 1ms\n    peer_a <- peer_b tcp syn ack ttl 1 wait 1ms\n    peer_a -> peer_b tcp ack ttl 1 wait 1ms\n    peer_a -> peer_b bgp open asn 64512 holdtime 180 bgpid 192.0.2.1 ttl 1 wait 2ms\n    peer_a <- peer_b bgp open asn 64513 holdtime 180 bgpid 192.0.2.2 ttl 1 wait 2ms\n    peer_a -> peer_b bgp update prefix \"198.51.100.0/24\" nexthop 192.0.2.1 asn 64512 ttl 1\n}\n```","frasm_code":"host peer_a { ip 192.0.2.1 }\nhost peer_b { ip 192.0.2.2 }\n\ncompile {\n    peer_a -> peer_b tcp syn srcport 50179 dstport 179 ttl 1 wait 1ms\n    peer_a <- peer_b tcp syn ack ttl 1 wait 1ms\n    peer_a -> peer_b tcp ack ttl 1 wait 1ms\n    peer_a -> peer_b bgp open asn 64512 holdtime 180 bgpid 192.0.2.1 ttl 1 wait 2ms\n    peer_a <- peer_b bgp open asn 64513 holdtime 180 bgpid 192.0.2.2 ttl 1 wait 2ms\n    peer_a -> peer_b bgp update prefix \"198.51.100.0/24\" nexthop 192.0.2.1 asn 64512 ttl 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Scapy scapy.contrib.bgp Byte Packing -> Native bgp open / update\" (mig_scapy_bgp_nlri.frasm). Scenario: Translates verbose scapy.contrib.bgp path-attribute constructors into readable bgp open, keepalive, update, and notification lines. Verify with Wireshark filter `bgp`."},{"role":"assistant","content":"Automatically prepends the 16-byte all-ones BGP marker (ff..ff) and 16-bit message length. Compile with `frameassembly mig_scapy_bgp_nlri.frasm`.\n\n```frameassembly\nhost peer_a { ip 192.0.2.1 }\nhost peer_b { ip 192.0.2.2 }\n\ncompile {\n    peer_a -> peer_b tcp syn srcport 50179 dstport 179 ttl 1 wait 1ms\n    peer_a <- peer_b tcp syn ack ttl 1 wait 1ms\n    peer_a -> peer_b tcp ack ttl 1 wait 1ms\n    peer_a -> peer_b bgp open asn 64512 holdtime 180 bgpid 192.0.2.1 ttl 1 wait 2ms\n    peer_a <- peer_b bgp open asn 64513 holdtime 180 bgpid 192.0.2.2 ttl 1 wait 2ms\n    peer_a -> peer_b bgp update prefix \"198.51.100.0/24\" nexthop 192.0.2.1 asn 64512 ttl 1\n}\n```"}]}
{"id":"sft-migration-ex-mig-05-scapy-bgp-contrib-to-frasm","task_type":"tool_migration","protocols":["tcp","bgp"],"version":"3.3.0","license":"MIT","prompt":"Translate the following Scapy BGP Contrib Imports & Path Attributes workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```python\nfrom scapy.contrib.bgp import BGPHeader, BGPOpen, BGPUpdate, BGPPAOrigin, BGPPANextHop, BGPNLRI_IPv4\nupd = BGPHeader(type=2) / BGPUpdate(\n    path_attr=[BGPPAOrigin(origin=\"IGP\"), BGPPANextHop(next_hop=\"192.0.2.1\")],\n    nlri=[BGPNLRI_IPv4(prefix=\"198.51.100.0/24\")]\n)\n```","completion":"Translates verbose scapy.contrib.bgp path-attribute constructors into readable bgp open, keepalive, update, and notification lines. Automatically prepends the 16-byte all-ones BGP marker (ff..ff) and 16-bit message length.\n\n```frameassembly\nhost peer_a { ip 192.0.2.1 }\nhost peer_b { ip 192.0.2.2 }\n\ncompile {\n    peer_a -> peer_b tcp syn srcport 50179 dstport 179 ttl 1 wait 1ms\n    peer_a <- peer_b tcp syn ack ttl 1 wait 1ms\n    peer_a -> peer_b tcp ack ttl 1 wait 1ms\n    peer_a -> peer_b bgp open asn 64512 holdtime 180 bgpid 192.0.2.1 ttl 1 wait 2ms\n    peer_a <- peer_b bgp open asn 64513 holdtime 180 bgpid 192.0.2.2 ttl 1 wait 2ms\n    peer_a -> peer_b bgp update prefix \"198.51.100.0/24\" nexthop 192.0.2.1 asn 64512 ttl 1\n}\n```","frasm_code":"host peer_a { ip 192.0.2.1 }\nhost peer_b { ip 192.0.2.2 }\n\ncompile {\n    peer_a -> peer_b tcp syn srcport 50179 dstport 179 ttl 1 wait 1ms\n    peer_a <- peer_b tcp syn ack ttl 1 wait 1ms\n    peer_a -> peer_b tcp ack ttl 1 wait 1ms\n    peer_a -> peer_b bgp open asn 64512 holdtime 180 bgpid 192.0.2.1 ttl 1 wait 2ms\n    peer_a <- peer_b bgp open asn 64513 holdtime 180 bgpid 192.0.2.2 ttl 1 wait 2ms\n    peer_a -> peer_b bgp update prefix \"198.51.100.0/24\" nexthop 192.0.2.1 asn 64512 ttl 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Translate the following Scapy BGP Contrib Imports & Path Attributes workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```python\nfrom scapy.contrib.bgp import BGPHeader, BGPOpen, BGPUpdate, BGPPAOrigin, BGPPANextHop, BGPNLRI_IPv4\nupd = BGPHeader(type=2) / BGPUpdate(\n    path_attr=[BGPPAOrigin(origin=\"IGP\"), BGPPANextHop(next_hop=\"192.0.2.1\")],\n    nlri=[BGPNLRI_IPv4(prefix=\"198.51.100.0/24\")]\n)\n```"},{"role":"assistant","content":"Translates verbose scapy.contrib.bgp path-attribute constructors into readable bgp open, keepalive, update, and notification lines. Automatically prepends the 16-byte all-ones BGP marker (ff..ff) and 16-bit message length.\n\n```frameassembly\nhost peer_a { ip 192.0.2.1 }\nhost peer_b { ip 192.0.2.2 }\n\ncompile {\n    peer_a -> peer_b tcp syn srcport 50179 dstport 179 ttl 1 wait 1ms\n    peer_a <- peer_b tcp syn ack ttl 1 wait 1ms\n    peer_a -> peer_b tcp ack ttl 1 wait 1ms\n    peer_a -> peer_b bgp open asn 64512 holdtime 180 bgpid 192.0.2.1 ttl 1 wait 2ms\n    peer_a <- peer_b bgp open asn 64513 holdtime 180 bgpid 192.0.2.2 ttl 1 wait 2ms\n    peer_a -> peer_b bgp update prefix \"198.51.100.0/24\" nexthop 192.0.2.1 asn 64512 ttl 1\n}\n```"}]}
{"id":"sft-cookbook-ex-mig-06-scapy-vxlan-overlay","task_type":"nl_to_frasm","protocols":["vxlan"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Scapy VXLAN UDP/4789 Header Flags -> Declarative vxlan vni\" (mig_scapy_vxlan_vni.frasm). Scenario: Replaces manual VXLAN(flags=0x08, vni=10500) bitmask setup on UDP 4789 with the native vxlan protocol builder. Verify with Wireshark filter `vxlan.vni == 10500`.","completion":"Sets the VXLAN I-flag (0x08), 24-bit VNI 10500, and UDP destination port 4789 automatically. Compile with `frameassembly mig_scapy_vxlan_vni.frasm`.\n\n```frameassembly\nhost leaf_vtep1 { ip 10.250.0.1 }\nhost leaf_vtep2 { ip 10.250.0.2 }\n\ncompile {\n    leaf_vtep1 -> leaf_vtep2 vxlan vni 10500 srcport 51000 df payload \"inner-tenant-frame\"\n}\n```","frasm_code":"host leaf_vtep1 { ip 10.250.0.1 }\nhost leaf_vtep2 { ip 10.250.0.2 }\n\ncompile {\n    leaf_vtep1 -> leaf_vtep2 vxlan vni 10500 srcport 51000 df payload \"inner-tenant-frame\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Scapy VXLAN UDP/4789 Header Flags -> Declarative vxlan vni\" (mig_scapy_vxlan_vni.frasm). Scenario: Replaces manual VXLAN(flags=0x08, vni=10500) bitmask setup on UDP 4789 with the native vxlan protocol builder. Verify with Wireshark filter `vxlan.vni == 10500`."},{"role":"assistant","content":"Sets the VXLAN I-flag (0x08), 24-bit VNI 10500, and UDP destination port 4789 automatically. Compile with `frameassembly mig_scapy_vxlan_vni.frasm`.\n\n```frameassembly\nhost leaf_vtep1 { ip 10.250.0.1 }\nhost leaf_vtep2 { ip 10.250.0.2 }\n\ncompile {\n    leaf_vtep1 -> leaf_vtep2 vxlan vni 10500 srcport 51000 df payload \"inner-tenant-frame\"\n}\n```"}]}
{"id":"sft-migration-ex-mig-06-scapy-vxlan-overlay","task_type":"tool_migration","protocols":["vxlan"],"version":"3.3.0","license":"MIT","prompt":"Translate the following Scapy VXLAN Framing workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```python\nfrom scapy.all import Ether, IP, UDP, VXLAN, wrpcap\npkt = Ether()/IP(src=\"10.250.0.1\", dst=\"10.250.0.2\", flags=\"DF\")/UDP(sport=51000, dport=4789)/VXLAN(flags=0x08, vni=10500)\nwrpcap(\"mig_scapy_vxlan_vni.pcap\", [pkt])\n```","completion":"Replaces manual VXLAN(flags=0x08, vni=10500) bitmask setup on UDP 4789 with the native vxlan protocol builder. Sets the VXLAN I-flag (0x08), 24-bit VNI 10500, and UDP destination port 4789 automatically.\n\n```frameassembly\nhost leaf_vtep1 { ip 10.250.0.1 }\nhost leaf_vtep2 { ip 10.250.0.2 }\n\ncompile {\n    leaf_vtep1 -> leaf_vtep2 vxlan vni 10500 srcport 51000 df payload \"inner-tenant-frame\"\n}\n```","frasm_code":"host leaf_vtep1 { ip 10.250.0.1 }\nhost leaf_vtep2 { ip 10.250.0.2 }\n\ncompile {\n    leaf_vtep1 -> leaf_vtep2 vxlan vni 10500 srcport 51000 df payload \"inner-tenant-frame\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Translate the following Scapy VXLAN Framing workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```python\nfrom scapy.all import Ether, IP, UDP, VXLAN, wrpcap\npkt = Ether()/IP(src=\"10.250.0.1\", dst=\"10.250.0.2\", flags=\"DF\")/UDP(sport=51000, dport=4789)/VXLAN(flags=0x08, vni=10500)\nwrpcap(\"mig_scapy_vxlan_vni.pcap\", [pkt])\n```"},{"role":"assistant","content":"Replaces manual VXLAN(flags=0x08, vni=10500) bitmask setup on UDP 4789 with the native vxlan protocol builder. Sets the VXLAN I-flag (0x08), 24-bit VNI 10500, and UDP destination port 4789 automatically.\n\n```frameassembly\nhost leaf_vtep1 { ip 10.250.0.1 }\nhost leaf_vtep2 { ip 10.250.0.2 }\n\ncompile {\n    leaf_vtep1 -> leaf_vtep2 vxlan vni 10500 srcport 51000 df payload \"inner-tenant-frame\"\n}\n```"}]}
{"id":"sft-cookbook-ex-mig-07-scapy-struct-modbus-to-frasm","task_type":"nl_to_frasm","protocols":["tcp","modbus"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Python struct.pack() Raw Modbus MBAP Bytes -> Native modbus Builder\" (mig_scapy_modbus_mbap.frasm). Scenario: OT engineers frequently pack 12-byte Modbus MBAP + PDU structs by hand in Python. FrameAssembly builds request and isresponse MBAP frames natively. Verify with Wireshark filter `mbtcp`.","completion":"Computes the 16-bit MBAP length field and function code 0x03 / 0x05 payloads on TCP 502. Compile with `frameassembly mig_scapy_modbus_mbap.frasm`.\n\n```frameassembly\nhost hmi_01 { ip 192.168.1.10 }\nhost plc_01 { ip 192.168.1.50 }\n\ncompile {\n    hmi_01 -> plc_01 tcp syn srcport 50200 dstport 502 wait 1ms\n    hmi_01 <- plc_01 tcp syn ack wait 1ms\n    hmi_01 -> plc_01 tcp ack wait 1ms\n    hmi_01 -> plc_01 modbus readholdingregisters txid 0x0042 unitid 1 addr 100 count 2 wait 2ms\n    hmi_01 <- plc_01 modbus readholdingregisters isresponse txid 0x0042 unitid 1 count 2\n}\n```","frasm_code":"host hmi_01 { ip 192.168.1.10 }\nhost plc_01 { ip 192.168.1.50 }\n\ncompile {\n    hmi_01 -> plc_01 tcp syn srcport 50200 dstport 502 wait 1ms\n    hmi_01 <- plc_01 tcp syn ack wait 1ms\n    hmi_01 -> plc_01 tcp ack wait 1ms\n    hmi_01 -> plc_01 modbus readholdingregisters txid 0x0042 unitid 1 addr 100 count 2 wait 2ms\n    hmi_01 <- plc_01 modbus readholdingregisters isresponse txid 0x0042 unitid 1 count 2\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Python struct.pack() Raw Modbus MBAP Bytes -> Native modbus Builder\" (mig_scapy_modbus_mbap.frasm). Scenario: OT engineers frequently pack 12-byte Modbus MBAP + PDU structs by hand in Python. FrameAssembly builds request and isresponse MBAP frames natively. Verify with Wireshark filter `mbtcp`."},{"role":"assistant","content":"Computes the 16-bit MBAP length field and function code 0x03 / 0x05 payloads on TCP 502. Compile with `frameassembly mig_scapy_modbus_mbap.frasm`.\n\n```frameassembly\nhost hmi_01 { ip 192.168.1.10 }\nhost plc_01 { ip 192.168.1.50 }\n\ncompile {\n    hmi_01 -> plc_01 tcp syn srcport 50200 dstport 502 wait 1ms\n    hmi_01 <- plc_01 tcp syn ack wait 1ms\n    hmi_01 -> plc_01 tcp ack wait 1ms\n    hmi_01 -> plc_01 modbus readholdingregisters txid 0x0042 unitid 1 addr 100 count 2 wait 2ms\n    hmi_01 <- plc_01 modbus readholdingregisters isresponse txid 0x0042 unitid 1 count 2\n}\n```"}]}
{"id":"sft-migration-ex-mig-07-scapy-struct-modbus-to-frasm","task_type":"tool_migration","protocols":["tcp","modbus"],"version":"3.3.0","license":"MIT","prompt":"Translate the following Manual Python struct.pack(\">HHHBBHH\", ...) MBAP Payload workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```python\nimport struct\nfrom scapy.all import Ether, IP, TCP, Raw\nmbap_pdu = struct.pack(\">HHHBBHH\", 0x0042, 0x0000, 6, 1, 0x03, 100, 2)\npkt = Ether()/IP(src=\"192.168.1.10\", dst=\"192.168.1.50\")/TCP(sport=50200, dport=502, flags=\"PA\")/Raw(mbap_pdu)\n```","completion":"OT engineers frequently pack 12-byte Modbus MBAP + PDU structs by hand in Python. FrameAssembly builds request and isresponse MBAP frames natively. Computes the 16-bit MBAP length field and function code 0x03 / 0x05 payloads on TCP 502.\n\n```frameassembly\nhost hmi_01 { ip 192.168.1.10 }\nhost plc_01 { ip 192.168.1.50 }\n\ncompile {\n    hmi_01 -> plc_01 tcp syn srcport 50200 dstport 502 wait 1ms\n    hmi_01 <- plc_01 tcp syn ack wait 1ms\n    hmi_01 -> plc_01 tcp ack wait 1ms\n    hmi_01 -> plc_01 modbus readholdingregisters txid 0x0042 unitid 1 addr 100 count 2 wait 2ms\n    hmi_01 <- plc_01 modbus readholdingregisters isresponse txid 0x0042 unitid 1 count 2\n}\n```","frasm_code":"host hmi_01 { ip 192.168.1.10 }\nhost plc_01 { ip 192.168.1.50 }\n\ncompile {\n    hmi_01 -> plc_01 tcp syn srcport 50200 dstport 502 wait 1ms\n    hmi_01 <- plc_01 tcp syn ack wait 1ms\n    hmi_01 -> plc_01 tcp ack wait 1ms\n    hmi_01 -> plc_01 modbus readholdingregisters txid 0x0042 unitid 1 addr 100 count 2 wait 2ms\n    hmi_01 <- plc_01 modbus readholdingregisters isresponse txid 0x0042 unitid 1 count 2\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Translate the following Manual Python struct.pack(\">HHHBBHH\", ...) MBAP Payload workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```python\nimport struct\nfrom scapy.all import Ether, IP, TCP, Raw\nmbap_pdu = struct.pack(\">HHHBBHH\", 0x0042, 0x0000, 6, 1, 0x03, 100, 2)\npkt = Ether()/IP(src=\"192.168.1.10\", dst=\"192.168.1.50\")/TCP(sport=50200, dport=502, flags=\"PA\")/Raw(mbap_pdu)\n```"},{"role":"assistant","content":"OT engineers frequently pack 12-byte Modbus MBAP + PDU structs by hand in Python. FrameAssembly builds request and isresponse MBAP frames natively. Computes the 16-bit MBAP length field and function code 0x03 / 0x05 payloads on TCP 502.\n\n```frameassembly\nhost hmi_01 { ip 192.168.1.10 }\nhost plc_01 { ip 192.168.1.50 }\n\ncompile {\n    hmi_01 -> plc_01 tcp syn srcport 50200 dstport 502 wait 1ms\n    hmi_01 <- plc_01 tcp syn ack wait 1ms\n    hmi_01 -> plc_01 tcp ack wait 1ms\n    hmi_01 -> plc_01 modbus readholdingregisters txid 0x0042 unitid 1 addr 100 count 2 wait 2ms\n    hmi_01 <- plc_01 modbus readholdingregisters isresponse txid 0x0042 unitid 1 count 2\n}\n```"}]}
{"id":"sft-cookbook-ex-mig-08-scapy-dnp3-crc16-to-frasm","task_type":"nl_to_frasm","protocols":["tcp","dnp3"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Custom DNP3 CRC-16 Python Loops -> Native dnp3 Select-Before-Operate\" (mig_dnp3_auto_crc16.frasm). Scenario: Scapy has no built-in DNP3 layer in core, forcing scripts to implement IEEE 1815 reflected 0x3d65 CRC-16 loops over every 16-byte chunk. FrameAssembly emits valid DNP3 CROB frames directly. Verify with Wireshark filter `dnp3`.","completion":"Calculates link-header and per-16-byte user-data CRC-16 octets automatically on port 20000. Compile with `frameassembly mig_dnp3_auto_crc16.frasm`.\n\n```frameassembly\nhost scada_srv { ip 10.100.1.5 }\nhost rtu_10    { ip 10.100.2.10 }\n\ncompile {\n    scada_srv -> rtu_10 tcp syn srcport 52010 dstport 20000 wait 1ms\n    scada_srv <- rtu_10 tcp syn ack wait 1ms\n    scada_srv -> rtu_10 tcp ack wait 1ms\n    scada_srv -> rtu_10 dnp3 select src 1 dst 10 group 12 variation 1 wait 2ms\n    scada_srv <- rtu_10 dnp3 response src 10 dst 1 group 12 variation 1 wait 2ms\n    scada_srv -> rtu_10 dnp3 operate src 1 dst 10 group 12 variation 1\n}\n```","frasm_code":"host scada_srv { ip 10.100.1.5 }\nhost rtu_10    { ip 10.100.2.10 }\n\ncompile {\n    scada_srv -> rtu_10 tcp syn srcport 52010 dstport 20000 wait 1ms\n    scada_srv <- rtu_10 tcp syn ack wait 1ms\n    scada_srv -> rtu_10 tcp ack wait 1ms\n    scada_srv -> rtu_10 dnp3 select src 1 dst 10 group 12 variation 1 wait 2ms\n    scada_srv <- rtu_10 dnp3 response src 10 dst 1 group 12 variation 1 wait 2ms\n    scada_srv -> rtu_10 dnp3 operate src 1 dst 10 group 12 variation 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Custom DNP3 CRC-16 Python Loops -> Native dnp3 Select-Before-Operate\" (mig_dnp3_auto_crc16.frasm). Scenario: Scapy has no built-in DNP3 layer in core, forcing scripts to implement IEEE 1815 reflected 0x3d65 CRC-16 loops over every 16-byte chunk. FrameAssembly emits valid DNP3 CROB frames directly. Verify with Wireshark filter `dnp3`."},{"role":"assistant","content":"Calculates link-header and per-16-byte user-data CRC-16 octets automatically on port 20000. Compile with `frameassembly mig_dnp3_auto_crc16.frasm`.\n\n```frameassembly\nhost scada_srv { ip 10.100.1.5 }\nhost rtu_10    { ip 10.100.2.10 }\n\ncompile {\n    scada_srv -> rtu_10 tcp syn srcport 52010 dstport 20000 wait 1ms\n    scada_srv <- rtu_10 tcp syn ack wait 1ms\n    scada_srv -> rtu_10 tcp ack wait 1ms\n    scada_srv -> rtu_10 dnp3 select src 1 dst 10 group 12 variation 1 wait 2ms\n    scada_srv <- rtu_10 dnp3 response src 10 dst 1 group 12 variation 1 wait 2ms\n    scada_srv -> rtu_10 dnp3 operate src 1 dst 10 group 12 variation 1\n}\n```"}]}
{"id":"sft-migration-ex-mig-08-scapy-dnp3-crc16-to-frasm","task_type":"tool_migration","protocols":["tcp","dnp3"],"version":"3.3.0","license":"MIT","prompt":"Translate the following Manual DNP3 Header + Reflected 0x3d65 CRC-16 Requirement workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```python\n# Without FrameAssembly, every 8B header + 16B chunk needs custom CRC-16:\nlink_hdr = bytes([0x05, 0x64, 0x0c, 0xc4, 0x0a, 0x00, 0x01, 0x00])\nhdr_crc = dnp3_crc16_le(link_hdr)  # custom ~crc16_0x3d65 implementation\n```","completion":"Scapy has no built-in DNP3 layer in core, forcing scripts to implement IEEE 1815 reflected 0x3d65 CRC-16 loops over every 16-byte chunk. FrameAssembly emits valid DNP3 CROB frames directly. Calculates link-header and per-16-byte user-data CRC-16 octets automatically on port 20000.\n\n```frameassembly\nhost scada_srv { ip 10.100.1.5 }\nhost rtu_10    { ip 10.100.2.10 }\n\ncompile {\n    scada_srv -> rtu_10 tcp syn srcport 52010 dstport 20000 wait 1ms\n    scada_srv <- rtu_10 tcp syn ack wait 1ms\n    scada_srv -> rtu_10 tcp ack wait 1ms\n    scada_srv -> rtu_10 dnp3 select src 1 dst 10 group 12 variation 1 wait 2ms\n    scada_srv <- rtu_10 dnp3 response src 10 dst 1 group 12 variation 1 wait 2ms\n    scada_srv -> rtu_10 dnp3 operate src 1 dst 10 group 12 variation 1\n}\n```","frasm_code":"host scada_srv { ip 10.100.1.5 }\nhost rtu_10    { ip 10.100.2.10 }\n\ncompile {\n    scada_srv -> rtu_10 tcp syn srcport 52010 dstport 20000 wait 1ms\n    scada_srv <- rtu_10 tcp syn ack wait 1ms\n    scada_srv -> rtu_10 tcp ack wait 1ms\n    scada_srv -> rtu_10 dnp3 select src 1 dst 10 group 12 variation 1 wait 2ms\n    scada_srv <- rtu_10 dnp3 response src 10 dst 1 group 12 variation 1 wait 2ms\n    scada_srv -> rtu_10 dnp3 operate src 1 dst 10 group 12 variation 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Translate the following Manual DNP3 Header + Reflected 0x3d65 CRC-16 Requirement workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```python\n# Without FrameAssembly, every 8B header + 16B chunk needs custom CRC-16:\nlink_hdr = bytes([0x05, 0x64, 0x0c, 0xc4, 0x0a, 0x00, 0x01, 0x00])\nhdr_crc = dnp3_crc16_le(link_hdr)  # custom ~crc16_0x3d65 implementation\n```"},{"role":"assistant","content":"Scapy has no built-in DNP3 layer in core, forcing scripts to implement IEEE 1815 reflected 0x3d65 CRC-16 loops over every 16-byte chunk. FrameAssembly emits valid DNP3 CROB frames directly. Calculates link-header and per-16-byte user-data CRC-16 octets automatically on port 20000.\n\n```frameassembly\nhost scada_srv { ip 10.100.1.5 }\nhost rtu_10    { ip 10.100.2.10 }\n\ncompile {\n    scada_srv -> rtu_10 tcp syn srcport 52010 dstport 20000 wait 1ms\n    scada_srv <- rtu_10 tcp syn ack wait 1ms\n    scada_srv -> rtu_10 tcp ack wait 1ms\n    scada_srv -> rtu_10 dnp3 select src 1 dst 10 group 12 variation 1 wait 2ms\n    scada_srv <- rtu_10 dnp3 response src 10 dst 1 group 12 variation 1 wait 2ms\n    scada_srv -> rtu_10 dnp3 operate src 1 dst 10 group 12 variation 1\n}\n```"}]}
{"id":"sft-cookbook-ex-mig-09-wireshark-filter-dns-nxdomain","task_type":"nl_to_frasm","protocols":["dns"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Wireshark Filter (dns.flags.rcode == 3 && ipv6) -> Deterministic .frasm Fixture\" (mig_wireshark_ipv6_nxdomain.frasm). Scenario: Turns a Wireshark display filter used in DNS threat-hunting detections (IPv6 AAAA NXDOMAIN responses) into a deterministic 2-packet CI test capture. Verify with Wireshark filter `dns.flags.rcode == 3 && ipv6`.","completion":"rcode 3 sets DNS Response Code NXDOMAIN (Name Error) inside the 16-bit DNS flags word. Compile with `frameassembly mig_wireshark_ipv6_nxdomain.frasm`.\n\n```frameassembly\nhost endpoint_v6 { ip 2001:db8:10::44 }\nhost resolver_v6 { ip 2001:db8:53::53 }\n\ncompile {\n    endpoint_v6 -> resolver_v6 dns query txid 0x7a01 qname \"dga-8891a.example.invalid\" qtype \"AAAA\" wait 3ms\n    endpoint_v6 <- resolver_v6 dns response txid 0x7a01 qname \"dga-8891a.example.invalid\" qtype \"AAAA\" rcode 3\n}\n```","frasm_code":"host endpoint_v6 { ip 2001:db8:10::44 }\nhost resolver_v6 { ip 2001:db8:53::53 }\n\ncompile {\n    endpoint_v6 -> resolver_v6 dns query txid 0x7a01 qname \"dga-8891a.example.invalid\" qtype \"AAAA\" wait 3ms\n    endpoint_v6 <- resolver_v6 dns response txid 0x7a01 qname \"dga-8891a.example.invalid\" qtype \"AAAA\" rcode 3\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Wireshark Filter (dns.flags.rcode == 3 && ipv6) -> Deterministic .frasm Fixture\" (mig_wireshark_ipv6_nxdomain.frasm). Scenario: Turns a Wireshark display filter used in DNS threat-hunting detections (IPv6 AAAA NXDOMAIN responses) into a deterministic 2-packet CI test capture. Verify with Wireshark filter `dns.flags.rcode == 3 && ipv6`."},{"role":"assistant","content":"rcode 3 sets DNS Response Code NXDOMAIN (Name Error) inside the 16-bit DNS flags word. Compile with `frameassembly mig_wireshark_ipv6_nxdomain.frasm`.\n\n```frameassembly\nhost endpoint_v6 { ip 2001:db8:10::44 }\nhost resolver_v6 { ip 2001:db8:53::53 }\n\ncompile {\n    endpoint_v6 -> resolver_v6 dns query txid 0x7a01 qname \"dga-8891a.example.invalid\" qtype \"AAAA\" wait 3ms\n    endpoint_v6 <- resolver_v6 dns response txid 0x7a01 qname \"dga-8891a.example.invalid\" qtype \"AAAA\" rcode 3\n}\n```"}]}
{"id":"sft-migration-ex-mig-09-wireshark-filter-dns-nxdomain","task_type":"tool_migration","protocols":["dns"],"version":"3.3.0","license":"MIT","prompt":"Translate the following Target Wireshark / tshark Detection Filter workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```text\ndns.flags.response == 1 && dns.flags.rcode == 3 && ipv6.src == 2001:db8:53::53\n```","completion":"Turns a Wireshark display filter used in DNS threat-hunting detections (IPv6 AAAA NXDOMAIN responses) into a deterministic 2-packet CI test capture. rcode 3 sets DNS Response Code NXDOMAIN (Name Error) inside the 16-bit DNS flags word.\n\n```frameassembly\nhost endpoint_v6 { ip 2001:db8:10::44 }\nhost resolver_v6 { ip 2001:db8:53::53 }\n\ncompile {\n    endpoint_v6 -> resolver_v6 dns query txid 0x7a01 qname \"dga-8891a.example.invalid\" qtype \"AAAA\" wait 3ms\n    endpoint_v6 <- resolver_v6 dns response txid 0x7a01 qname \"dga-8891a.example.invalid\" qtype \"AAAA\" rcode 3\n}\n```","frasm_code":"host endpoint_v6 { ip 2001:db8:10::44 }\nhost resolver_v6 { ip 2001:db8:53::53 }\n\ncompile {\n    endpoint_v6 -> resolver_v6 dns query txid 0x7a01 qname \"dga-8891a.example.invalid\" qtype \"AAAA\" wait 3ms\n    endpoint_v6 <- resolver_v6 dns response txid 0x7a01 qname \"dga-8891a.example.invalid\" qtype \"AAAA\" rcode 3\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Translate the following Target Wireshark / tshark Detection Filter workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```text\ndns.flags.response == 1 && dns.flags.rcode == 3 && ipv6.src == 2001:db8:53::53\n```"},{"role":"assistant","content":"Turns a Wireshark display filter used in DNS threat-hunting detections (IPv6 AAAA NXDOMAIN responses) into a deterministic 2-packet CI test capture. rcode 3 sets DNS Response Code NXDOMAIN (Name Error) inside the 16-bit DNS flags word.\n\n```frameassembly\nhost endpoint_v6 { ip 2001:db8:10::44 }\nhost resolver_v6 { ip 2001:db8:53::53 }\n\ncompile {\n    endpoint_v6 -> resolver_v6 dns query txid 0x7a01 qname \"dga-8891a.example.invalid\" qtype \"AAAA\" wait 3ms\n    endpoint_v6 <- resolver_v6 dns response txid 0x7a01 qname \"dga-8891a.example.invalid\" qtype \"AAAA\" rcode 3\n}\n```"}]}
{"id":"sft-cookbook-ex-mig-10-wireshark-filter-tcp-retrans","task_type":"nl_to_frasm","protocols":["tcp","http"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Wireshark Filter (tcp.analysis.retransmission) -> Exact RTO Replay Capture\" (mig_wireshark_tcp_retrans.frasm). Scenario: Generates a reproducible 250ms TCP retransmission fixture matching Wireshark tcp.analysis.retransmission without needing tc/netem packet loss. Verify with Wireshark filter `tcp.analysis.retransmission`.","completion":"Repeating seq 1001 after wait 250ms triggers Wireshark TCP Retransmission expert analysis. Compile with `frameassembly mig_wireshark_tcp_retrans.frasm`.\n\n```frameassembly\nhost web_client { ip 10.15.1.20 }\nhost origin_srv { ip 10.15.2.80 }\n\ncompile {\n    web_client -> origin_srv tcp syn srcport 51900 dstport 80 win 65535 mss 1460 wait 1ms\n    web_client <- origin_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    web_client -> origin_srv tcp ack wait 1ms\n    web_client -> origin_srv http get uri \"/report.csv\" hosthdr \"data.internal\" wait 250ms\n    web_client -> origin_srv seq 1001 http get uri \"/report.csv\" hosthdr \"data.internal\" wait 2ms\n    web_client <- origin_srv http status 200 reason \"OK\" body \"id,status\\n1,ok\\n\"\n}\n```","frasm_code":"host web_client { ip 10.15.1.20 }\nhost origin_srv { ip 10.15.2.80 }\n\ncompile {\n    web_client -> origin_srv tcp syn srcport 51900 dstport 80 win 65535 mss 1460 wait 1ms\n    web_client <- origin_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    web_client -> origin_srv tcp ack wait 1ms\n    web_client -> origin_srv http get uri \"/report.csv\" hosthdr \"data.internal\" wait 250ms\n    web_client -> origin_srv seq 1001 http get uri \"/report.csv\" hosthdr \"data.internal\" wait 2ms\n    web_client <- origin_srv http status 200 reason \"OK\" body \"id,status\\n1,ok\\n\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Wireshark Filter (tcp.analysis.retransmission) -> Exact RTO Replay Capture\" (mig_wireshark_tcp_retrans.frasm). Scenario: Generates a reproducible 250ms TCP retransmission fixture matching Wireshark tcp.analysis.retransmission without needing tc/netem packet loss. Verify with Wireshark filter `tcp.analysis.retransmission`."},{"role":"assistant","content":"Repeating seq 1001 after wait 250ms triggers Wireshark TCP Retransmission expert analysis. Compile with `frameassembly mig_wireshark_tcp_retrans.frasm`.\n\n```frameassembly\nhost web_client { ip 10.15.1.20 }\nhost origin_srv { ip 10.15.2.80 }\n\ncompile {\n    web_client -> origin_srv tcp syn srcport 51900 dstport 80 win 65535 mss 1460 wait 1ms\n    web_client <- origin_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    web_client -> origin_srv tcp ack wait 1ms\n    web_client -> origin_srv http get uri \"/report.csv\" hosthdr \"data.internal\" wait 250ms\n    web_client -> origin_srv seq 1001 http get uri \"/report.csv\" hosthdr \"data.internal\" wait 2ms\n    web_client <- origin_srv http status 200 reason \"OK\" body \"id,status\\n1,ok\\n\"\n}\n```"}]}
{"id":"sft-migration-ex-mig-10-wireshark-filter-tcp-retrans","task_type":"tool_migration","protocols":["tcp","http"],"version":"3.3.0","license":"MIT","prompt":"Translate the following Target Wireshark Expert Filter workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```text\ntcp.analysis.retransmission && tcp.port == 80\n```","completion":"Generates a reproducible 250ms TCP retransmission fixture matching Wireshark tcp.analysis.retransmission without needing tc/netem packet loss. Repeating seq 1001 after wait 250ms triggers Wireshark TCP Retransmission expert analysis.\n\n```frameassembly\nhost web_client { ip 10.15.1.20 }\nhost origin_srv { ip 10.15.2.80 }\n\ncompile {\n    web_client -> origin_srv tcp syn srcport 51900 dstport 80 win 65535 mss 1460 wait 1ms\n    web_client <- origin_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    web_client -> origin_srv tcp ack wait 1ms\n    web_client -> origin_srv http get uri \"/report.csv\" hosthdr \"data.internal\" wait 250ms\n    web_client -> origin_srv seq 1001 http get uri \"/report.csv\" hosthdr \"data.internal\" wait 2ms\n    web_client <- origin_srv http status 200 reason \"OK\" body \"id,status\\n1,ok\\n\"\n}\n```","frasm_code":"host web_client { ip 10.15.1.20 }\nhost origin_srv { ip 10.15.2.80 }\n\ncompile {\n    web_client -> origin_srv tcp syn srcport 51900 dstport 80 win 65535 mss 1460 wait 1ms\n    web_client <- origin_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    web_client -> origin_srv tcp ack wait 1ms\n    web_client -> origin_srv http get uri \"/report.csv\" hosthdr \"data.internal\" wait 250ms\n    web_client -> origin_srv seq 1001 http get uri \"/report.csv\" hosthdr \"data.internal\" wait 2ms\n    web_client <- origin_srv http status 200 reason \"OK\" body \"id,status\\n1,ok\\n\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Translate the following Target Wireshark Expert Filter workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```text\ntcp.analysis.retransmission && tcp.port == 80\n```"},{"role":"assistant","content":"Generates a reproducible 250ms TCP retransmission fixture matching Wireshark tcp.analysis.retransmission without needing tc/netem packet loss. Repeating seq 1001 after wait 250ms triggers Wireshark TCP Retransmission expert analysis.\n\n```frameassembly\nhost web_client { ip 10.15.1.20 }\nhost origin_srv { ip 10.15.2.80 }\n\ncompile {\n    web_client -> origin_srv tcp syn srcport 51900 dstport 80 win 65535 mss 1460 wait 1ms\n    web_client <- origin_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    web_client -> origin_srv tcp ack wait 1ms\n    web_client -> origin_srv http get uri \"/report.csv\" hosthdr \"data.internal\" wait 250ms\n    web_client -> origin_srv seq 1001 http get uri \"/report.csv\" hosthdr \"data.internal\" wait 2ms\n    web_client <- origin_srv http status 200 reason \"OK\" body \"id,status\\n1,ok\\n\"\n}\n```"}]}
{"id":"sft-cookbook-ex-mig-11-tcprewrite-vs-reverse-l7-scrub","task_type":"nl_to_frasm","protocols":["dns","tcp","tls","http"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"tcprewrite L3-Only Rewrite vs. frameassembly reverse Full L2–L7 Redaction\" (mig_reverse_l7_redaction.frasm). Scenario: tcprewrite only rewrites Ethernet MACs and IPv4/IPv6 headers—leaving internal DNS qnames, TLS SNI hostnames, and HTTP Host headers exposed inside the payload. frameassembly reverse decompiles L2–L7 into editable .frasm text and recalculates lengths and checksums on recompile. Verify with Wireshark filter `dns || tls || http`.","completion":"Changing qname, sni, and hosthdr from long internal names to short RFC 2606 .example names automatically updates IP Total Length, TCP seq/acknum, and checksums. Compile with `frameassembly reverse prod_incident.pcap scrubbed.frasm && frameassembly scrubbed.frasm safe_tac.pcap`.\n\n```frameassembly\nhost host1 { ip 198.51.100.15 mac 02:00:00:00:00:01 }\nhost host2 { ip 198.51.100.53 mac 02:00:00:00:00:02 }\nhost host3 { ip 203.0.113.80  mac 02:00:00:00:00:03 }\n\ncompile {\n    host1 -> host2 dns query txid 0x3100 qname \"portal.example.com\" qtype \"A\" wait 2ms\n    host1 <- host2 dns response txid 0x3100 qname \"portal.example.com\" qtype \"A\" rdata \"203.0.113.80\" ansttl 300 wait 2ms\n    host1 -> host3 tcp syn srcport 52100 dstport 443 win 65535 mss 1460 wait 1ms\n    host1 <- host3 tcp syn ack win 65535 mss 1460 wait 1ms\n    host1 -> host3 tcp ack wait 1ms\n    host1 -> host3 tls clienthello sni \"portal.example.com\" alpn \"http/1.1\"\n}\n```","frasm_code":"host host1 { ip 198.51.100.15 mac 02:00:00:00:00:01 }\nhost host2 { ip 198.51.100.53 mac 02:00:00:00:00:02 }\nhost host3 { ip 203.0.113.80  mac 02:00:00:00:00:03 }\n\ncompile {\n    host1 -> host2 dns query txid 0x3100 qname \"portal.example.com\" qtype \"A\" wait 2ms\n    host1 <- host2 dns response txid 0x3100 qname \"portal.example.com\" qtype \"A\" rdata \"203.0.113.80\" ansttl 300 wait 2ms\n    host1 -> host3 tcp syn srcport 52100 dstport 443 win 65535 mss 1460 wait 1ms\n    host1 <- host3 tcp syn ack win 65535 mss 1460 wait 1ms\n    host1 -> host3 tcp ack wait 1ms\n    host1 -> host3 tls clienthello sni \"portal.example.com\" alpn \"http/1.1\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"tcprewrite L3-Only Rewrite vs. frameassembly reverse Full L2–L7 Redaction\" (mig_reverse_l7_redaction.frasm). Scenario: tcprewrite only rewrites Ethernet MACs and IPv4/IPv6 headers—leaving internal DNS qnames, TLS SNI hostnames, and HTTP Host headers exposed inside the payload. frameassembly reverse decompiles L2–L7 into editable .frasm text and recalculates lengths and checksums on recompile. Verify with Wireshark filter `dns || tls || http`."},{"role":"assistant","content":"Changing qname, sni, and hosthdr from long internal names to short RFC 2606 .example names automatically updates IP Total Length, TCP seq/acknum, and checksums. Compile with `frameassembly reverse prod_incident.pcap scrubbed.frasm && frameassembly scrubbed.frasm safe_tac.pcap`.\n\n```frameassembly\nhost host1 { ip 198.51.100.15 mac 02:00:00:00:00:01 }\nhost host2 { ip 198.51.100.53 mac 02:00:00:00:00:02 }\nhost host3 { ip 203.0.113.80  mac 02:00:00:00:00:03 }\n\ncompile {\n    host1 -> host2 dns query txid 0x3100 qname \"portal.example.com\" qtype \"A\" wait 2ms\n    host1 <- host2 dns response txid 0x3100 qname \"portal.example.com\" qtype \"A\" rdata \"203.0.113.80\" ansttl 300 wait 2ms\n    host1 -> host3 tcp syn srcport 52100 dstport 443 win 65535 mss 1460 wait 1ms\n    host1 <- host3 tcp syn ack win 65535 mss 1460 wait 1ms\n    host1 -> host3 tcp ack wait 1ms\n    host1 -> host3 tls clienthello sni \"portal.example.com\" alpn \"http/1.1\"\n}\n```"}]}
{"id":"sft-migration-ex-mig-11-tcprewrite-vs-reverse-l7-scrub","task_type":"tool_migration","protocols":["dns","tcp","tls","http"],"version":"3.3.0","license":"MIT","prompt":"Translate the following tcprewrite Limitation (Leaves DNS / SNI / HTTP Host Leaking in Payload) workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```bash\n# Rewrites outer IPs only; L7 DNS/SNI/HTTP strings remain unredacted!\ntcprewrite --pnat=10.0.0.0/8:198.51.100.0/24 -i prod_incident.pcap -o partial.pcap\n```","completion":"tcprewrite only rewrites Ethernet MACs and IPv4/IPv6 headers—leaving internal DNS qnames, TLS SNI hostnames, and HTTP Host headers exposed inside the payload. frameassembly reverse decompiles L2–L7 into editable .frasm text and recalculates lengths and checksums on recompile. Changing qname, sni, and hosthdr from long internal names to short RFC 2606 .example names automatically updates IP Total Length, TCP seq/acknum, and checksums.\n\n```frameassembly\nhost host1 { ip 198.51.100.15 mac 02:00:00:00:00:01 }\nhost host2 { ip 198.51.100.53 mac 02:00:00:00:00:02 }\nhost host3 { ip 203.0.113.80  mac 02:00:00:00:00:03 }\n\ncompile {\n    host1 -> host2 dns query txid 0x3100 qname \"portal.example.com\" qtype \"A\" wait 2ms\n    host1 <- host2 dns response txid 0x3100 qname \"portal.example.com\" qtype \"A\" rdata \"203.0.113.80\" ansttl 300 wait 2ms\n    host1 -> host3 tcp syn srcport 52100 dstport 443 win 65535 mss 1460 wait 1ms\n    host1 <- host3 tcp syn ack win 65535 mss 1460 wait 1ms\n    host1 -> host3 tcp ack wait 1ms\n    host1 -> host3 tls clienthello sni \"portal.example.com\" alpn \"http/1.1\"\n}\n```","frasm_code":"host host1 { ip 198.51.100.15 mac 02:00:00:00:00:01 }\nhost host2 { ip 198.51.100.53 mac 02:00:00:00:00:02 }\nhost host3 { ip 203.0.113.80  mac 02:00:00:00:00:03 }\n\ncompile {\n    host1 -> host2 dns query txid 0x3100 qname \"portal.example.com\" qtype \"A\" wait 2ms\n    host1 <- host2 dns response txid 0x3100 qname \"portal.example.com\" qtype \"A\" rdata \"203.0.113.80\" ansttl 300 wait 2ms\n    host1 -> host3 tcp syn srcport 52100 dstport 443 win 65535 mss 1460 wait 1ms\n    host1 <- host3 tcp syn ack win 65535 mss 1460 wait 1ms\n    host1 -> host3 tcp ack wait 1ms\n    host1 -> host3 tls clienthello sni \"portal.example.com\" alpn \"http/1.1\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Translate the following tcprewrite Limitation (Leaves DNS / SNI / HTTP Host Leaking in Payload) workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```bash\n# Rewrites outer IPs only; L7 DNS/SNI/HTTP strings remain unredacted!\ntcprewrite --pnat=10.0.0.0/8:198.51.100.0/24 -i prod_incident.pcap -o partial.pcap\n```"},{"role":"assistant","content":"tcprewrite only rewrites Ethernet MACs and IPv4/IPv6 headers—leaving internal DNS qnames, TLS SNI hostnames, and HTTP Host headers exposed inside the payload. frameassembly reverse decompiles L2–L7 into editable .frasm text and recalculates lengths and checksums on recompile. Changing qname, sni, and hosthdr from long internal names to short RFC 2606 .example names automatically updates IP Total Length, TCP seq/acknum, and checksums.\n\n```frameassembly\nhost host1 { ip 198.51.100.15 mac 02:00:00:00:00:01 }\nhost host2 { ip 198.51.100.53 mac 02:00:00:00:00:02 }\nhost host3 { ip 203.0.113.80  mac 02:00:00:00:00:03 }\n\ncompile {\n    host1 -> host2 dns query txid 0x3100 qname \"portal.example.com\" qtype \"A\" wait 2ms\n    host1 <- host2 dns response txid 0x3100 qname \"portal.example.com\" qtype \"A\" rdata \"203.0.113.80\" ansttl 300 wait 2ms\n    host1 -> host3 tcp syn srcport 52100 dstport 443 win 65535 mss 1460 wait 1ms\n    host1 <- host3 tcp syn ack win 65535 mss 1460 wait 1ms\n    host1 -> host3 tcp ack wait 1ms\n    host1 -> host3 tls clienthello sni \"portal.example.com\" alpn \"http/1.1\"\n}\n```"}]}
{"id":"sft-cookbook-ex-mig-12-text2pcap-hexdump-to-frasm","task_type":"nl_to_frasm","protocols":["vlan","udp"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"text2pcap Static Hex Offsets -> Readable .frasm + hexpayload Trailer\" (mig_text2pcap_hexpayload.frasm). Scenario: Replaces brittle 0000 00 1c 73 ... text2pcap hex dumps with typed L2/L3/L4 headers and a concise hexpayload trailer for custom proprietary bytes. Verify with Wireshark filter `vlan.id == 120 && udp.port == 31000`.","completion":"hexpayload accepts continuous, space-separated, or colon-separated hex octets and computes UDP/IP lengths and checksums automatically. Compile with `frameassembly mig_text2pcap_hexpayload.frasm mig_text2pcap_hexpayload.pcapng`.\n\n```frameassembly\nhost sensor_node { ip 10.120.1.10 mac 00:1c:73:00:00:01 }\nhost ingest_srv  { ip 10.120.1.20 mac 00:1c:73:00:00:02 }\n\ncompile {\n    sensor_node -> ingest_srv vlan 120 udp srcport 50000 dstport 31000 hexpayload \"ca:fe:ba:be:00:01:02:03\" wait 500ns\n    sensor_node <- ingest_srv vlan 120 udp hexpayload \"ca:fe:ba:be:80:01:00:00\"\n}\n```","frasm_code":"host sensor_node { ip 10.120.1.10 mac 00:1c:73:00:00:01 }\nhost ingest_srv  { ip 10.120.1.20 mac 00:1c:73:00:00:02 }\n\ncompile {\n    sensor_node -> ingest_srv vlan 120 udp srcport 50000 dstport 31000 hexpayload \"ca:fe:ba:be:00:01:02:03\" wait 500ns\n    sensor_node <- ingest_srv vlan 120 udp hexpayload \"ca:fe:ba:be:80:01:00:00\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"text2pcap Static Hex Offsets -> Readable .frasm + hexpayload Trailer\" (mig_text2pcap_hexpayload.frasm). Scenario: Replaces brittle 0000 00 1c 73 ... text2pcap hex dumps with typed L2/L3/L4 headers and a concise hexpayload trailer for custom proprietary bytes. Verify with Wireshark filter `vlan.id == 120 && udp.port == 31000`."},{"role":"assistant","content":"hexpayload accepts continuous, space-separated, or colon-separated hex octets and computes UDP/IP lengths and checksums automatically. Compile with `frameassembly mig_text2pcap_hexpayload.frasm mig_text2pcap_hexpayload.pcapng`.\n\n```frameassembly\nhost sensor_node { ip 10.120.1.10 mac 00:1c:73:00:00:01 }\nhost ingest_srv  { ip 10.120.1.20 mac 00:1c:73:00:00:02 }\n\ncompile {\n    sensor_node -> ingest_srv vlan 120 udp srcport 50000 dstport 31000 hexpayload \"ca:fe:ba:be:00:01:02:03\" wait 500ns\n    sensor_node <- ingest_srv vlan 120 udp hexpayload \"ca:fe:ba:be:80:01:00:00\"\n}\n```"}]}
{"id":"sft-migration-ex-mig-12-text2pcap-hexdump-to-frasm","task_type":"tool_migration","protocols":["vlan","udp"],"version":"3.3.0","license":"MIT","prompt":"Translate the following Legacy text2pcap Offset Dump (Breaks Checksums on Any Byte Edit) workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```bash\n# 0000  00 1c 73 00 00 02 00 1c 73 00 00 01 81 00 00 78 ...\ntext2pcap -u 50000,31000 raw_hex_dump.txt legacy.pcap\n```","completion":"Replaces brittle 0000 00 1c 73 ... text2pcap hex dumps with typed L2/L3/L4 headers and a concise hexpayload trailer for custom proprietary bytes. hexpayload accepts continuous, space-separated, or colon-separated hex octets and computes UDP/IP lengths and checksums automatically.\n\n```frameassembly\nhost sensor_node { ip 10.120.1.10 mac 00:1c:73:00:00:01 }\nhost ingest_srv  { ip 10.120.1.20 mac 00:1c:73:00:00:02 }\n\ncompile {\n    sensor_node -> ingest_srv vlan 120 udp srcport 50000 dstport 31000 hexpayload \"ca:fe:ba:be:00:01:02:03\" wait 500ns\n    sensor_node <- ingest_srv vlan 120 udp hexpayload \"ca:fe:ba:be:80:01:00:00\"\n}\n```","frasm_code":"host sensor_node { ip 10.120.1.10 mac 00:1c:73:00:00:01 }\nhost ingest_srv  { ip 10.120.1.20 mac 00:1c:73:00:00:02 }\n\ncompile {\n    sensor_node -> ingest_srv vlan 120 udp srcport 50000 dstport 31000 hexpayload \"ca:fe:ba:be:00:01:02:03\" wait 500ns\n    sensor_node <- ingest_srv vlan 120 udp hexpayload \"ca:fe:ba:be:80:01:00:00\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Translate the following Legacy text2pcap Offset Dump (Breaks Checksums on Any Byte Edit) workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```bash\n# 0000  00 1c 73 00 00 02 00 1c 73 00 00 01 81 00 00 78 ...\ntext2pcap -u 50000,31000 raw_hex_dump.txt legacy.pcap\n```"},{"role":"assistant","content":"Replaces brittle 0000 00 1c 73 ... text2pcap hex dumps with typed L2/L3/L4 headers and a concise hexpayload trailer for custom proprietary bytes. hexpayload accepts continuous, space-separated, or colon-separated hex octets and computes UDP/IP lengths and checksums automatically.\n\n```frameassembly\nhost sensor_node { ip 10.120.1.10 mac 00:1c:73:00:00:01 }\nhost ingest_srv  { ip 10.120.1.20 mac 00:1c:73:00:00:02 }\n\ncompile {\n    sensor_node -> ingest_srv vlan 120 udp srcport 50000 dstport 31000 hexpayload \"ca:fe:ba:be:00:01:02:03\" wait 500ns\n    sensor_node <- ingest_srv vlan 120 udp hexpayload \"ca:fe:ba:be:80:01:00:00\"\n}\n```"}]}
{"id":"sft-cookbook-ex-mig-13-suricata-tshark-ci-fixture","task_type":"nl_to_frasm","protocols":["tcp","tls","smb"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Binary .pcap Git Blobs -> Plain-Text .frasm Suricata & tshark CI Fixture\" (mig_ci_suricata_smb_tls.frasm). Scenario: Checking binary .pcap files into Git makes pull-request diffs unreadable. Storing plain-text .frasm fixtures lets CI compile fresh .pcap files on the fly for Suricata and tshark assertions. Verify with Wireshark filter `tls || smb2`.","completion":"frameassembly show prints the relative-timestamp packet ladder in CI logs without writing temporary files. Compile with `frameassembly show mig_ci_suricata_smb_tls.frasm && frameassembly mig_ci_suricata_smb_tls.frasm ci_out.pcap`.\n\n```frameassembly\nhost wkstn_ci { ip 10.88.1.15 }\nhost edge_ci  { ip 198.51.100.44 }\nhost fs_ci    { ip 10.88.2.45 }\n\ncompile {\n    wkstn_ci -> edge_ci tcp syn srcport 51443 dstport 443 win 65535 mss 1460 wait 1ms\n    wkstn_ci <- edge_ci tcp syn ack win 65535 mss 1460 wait 1ms\n    wkstn_ci -> edge_ci tcp ack wait 1ms\n    wkstn_ci -> edge_ci tls clienthello sni \"updates.example.net\" alpn \"h2\" wait 4ms\n    wkstn_ci -> fs_ci tcp syn srcport 51445 dstport 445 win 65535 mss 1460 wait 1ms\n    wkstn_ci <- fs_ci tcp syn ack win 65535 mss 1460 wait 1ms\n    wkstn_ci -> fs_ci tcp ack wait 1ms\n    wkstn_ci -> fs_ci smb negotiate msgid 0 wait 1ms\n    wkstn_ci <- fs_ci smb negotiate msgid 0 status 0 wait 1ms\n    wkstn_ci -> fs_ci smb sessionsetup msgid 1 sessionid 0x1001 wait 1ms\n    wkstn_ci <- fs_ci smb sessionsetup msgid 1 sessionid 0x1001 status 0 wait 1ms\n    wkstn_ci -> fs_ci smb treeconnect msgid 2 sessionid 0x1001 share \"\\\\\\\\fs_ci\\\\IPC$\"\n}\n```","frasm_code":"host wkstn_ci { ip 10.88.1.15 }\nhost edge_ci  { ip 198.51.100.44 }\nhost fs_ci    { ip 10.88.2.45 }\n\ncompile {\n    wkstn_ci -> edge_ci tcp syn srcport 51443 dstport 443 win 65535 mss 1460 wait 1ms\n    wkstn_ci <- edge_ci tcp syn ack win 65535 mss 1460 wait 1ms\n    wkstn_ci -> edge_ci tcp ack wait 1ms\n    wkstn_ci -> edge_ci tls clienthello sni \"updates.example.net\" alpn \"h2\" wait 4ms\n    wkstn_ci -> fs_ci tcp syn srcport 51445 dstport 445 win 65535 mss 1460 wait 1ms\n    wkstn_ci <- fs_ci tcp syn ack win 65535 mss 1460 wait 1ms\n    wkstn_ci -> fs_ci tcp ack wait 1ms\n    wkstn_ci -> fs_ci smb negotiate msgid 0 wait 1ms\n    wkstn_ci <- fs_ci smb negotiate msgid 0 status 0 wait 1ms\n    wkstn_ci -> fs_ci smb sessionsetup msgid 1 sessionid 0x1001 wait 1ms\n    wkstn_ci <- fs_ci smb sessionsetup msgid 1 sessionid 0x1001 status 0 wait 1ms\n    wkstn_ci -> fs_ci smb treeconnect msgid 2 sessionid 0x1001 share \"\\\\\\\\fs_ci\\\\IPC$\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Binary .pcap Git Blobs -> Plain-Text .frasm Suricata & tshark CI Fixture\" (mig_ci_suricata_smb_tls.frasm). Scenario: Checking binary .pcap files into Git makes pull-request diffs unreadable. Storing plain-text .frasm fixtures lets CI compile fresh .pcap files on the fly for Suricata and tshark assertions. Verify with Wireshark filter `tls || smb2`."},{"role":"assistant","content":"frameassembly show prints the relative-timestamp packet ladder in CI logs without writing temporary files. Compile with `frameassembly show mig_ci_suricata_smb_tls.frasm && frameassembly mig_ci_suricata_smb_tls.frasm ci_out.pcap`.\n\n```frameassembly\nhost wkstn_ci { ip 10.88.1.15 }\nhost edge_ci  { ip 198.51.100.44 }\nhost fs_ci    { ip 10.88.2.45 }\n\ncompile {\n    wkstn_ci -> edge_ci tcp syn srcport 51443 dstport 443 win 65535 mss 1460 wait 1ms\n    wkstn_ci <- edge_ci tcp syn ack win 65535 mss 1460 wait 1ms\n    wkstn_ci -> edge_ci tcp ack wait 1ms\n    wkstn_ci -> edge_ci tls clienthello sni \"updates.example.net\" alpn \"h2\" wait 4ms\n    wkstn_ci -> fs_ci tcp syn srcport 51445 dstport 445 win 65535 mss 1460 wait 1ms\n    wkstn_ci <- fs_ci tcp syn ack win 65535 mss 1460 wait 1ms\n    wkstn_ci -> fs_ci tcp ack wait 1ms\n    wkstn_ci -> fs_ci smb negotiate msgid 0 wait 1ms\n    wkstn_ci <- fs_ci smb negotiate msgid 0 status 0 wait 1ms\n    wkstn_ci -> fs_ci smb sessionsetup msgid 1 sessionid 0x1001 wait 1ms\n    wkstn_ci <- fs_ci smb sessionsetup msgid 1 sessionid 0x1001 status 0 wait 1ms\n    wkstn_ci -> fs_ci smb treeconnect msgid 2 sessionid 0x1001 share \"\\\\\\\\fs_ci\\\\IPC$\"\n}\n```"}]}
{"id":"sft-migration-ex-mig-13-suricata-tshark-ci-fixture","task_type":"tool_migration","protocols":["tcp","tls","smb"],"version":"3.3.0","license":"MIT","prompt":"Translate the following GitHub Actions / GitLab CI Verification Pipeline workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```bash\nframeassembly mig_ci_suricata_smb_tls.frasm ci_out.pcap\ntshark -r ci_out.pcap -Y \"tls.handshake.extensions_server_name || smb2.tree\"\n```","completion":"Checking binary .pcap files into Git makes pull-request diffs unreadable. Storing plain-text .frasm fixtures lets CI compile fresh .pcap files on the fly for Suricata and tshark assertions. frameassembly show prints the relative-timestamp packet ladder in CI logs without writing temporary files.\n\n```frameassembly\nhost wkstn_ci { ip 10.88.1.15 }\nhost edge_ci  { ip 198.51.100.44 }\nhost fs_ci    { ip 10.88.2.45 }\n\ncompile {\n    wkstn_ci -> edge_ci tcp syn srcport 51443 dstport 443 win 65535 mss 1460 wait 1ms\n    wkstn_ci <- edge_ci tcp syn ack win 65535 mss 1460 wait 1ms\n    wkstn_ci -> edge_ci tcp ack wait 1ms\n    wkstn_ci -> edge_ci tls clienthello sni \"updates.example.net\" alpn \"h2\" wait 4ms\n    wkstn_ci -> fs_ci tcp syn srcport 51445 dstport 445 win 65535 mss 1460 wait 1ms\n    wkstn_ci <- fs_ci tcp syn ack win 65535 mss 1460 wait 1ms\n    wkstn_ci -> fs_ci tcp ack wait 1ms\n    wkstn_ci -> fs_ci smb negotiate msgid 0 wait 1ms\n    wkstn_ci <- fs_ci smb negotiate msgid 0 status 0 wait 1ms\n    wkstn_ci -> fs_ci smb sessionsetup msgid 1 sessionid 0x1001 wait 1ms\n    wkstn_ci <- fs_ci smb sessionsetup msgid 1 sessionid 0x1001 status 0 wait 1ms\n    wkstn_ci -> fs_ci smb treeconnect msgid 2 sessionid 0x1001 share \"\\\\\\\\fs_ci\\\\IPC$\"\n}\n```","frasm_code":"host wkstn_ci { ip 10.88.1.15 }\nhost edge_ci  { ip 198.51.100.44 }\nhost fs_ci    { ip 10.88.2.45 }\n\ncompile {\n    wkstn_ci -> edge_ci tcp syn srcport 51443 dstport 443 win 65535 mss 1460 wait 1ms\n    wkstn_ci <- edge_ci tcp syn ack win 65535 mss 1460 wait 1ms\n    wkstn_ci -> edge_ci tcp ack wait 1ms\n    wkstn_ci -> edge_ci tls clienthello sni \"updates.example.net\" alpn \"h2\" wait 4ms\n    wkstn_ci -> fs_ci tcp syn srcport 51445 dstport 445 win 65535 mss 1460 wait 1ms\n    wkstn_ci <- fs_ci tcp syn ack win 65535 mss 1460 wait 1ms\n    wkstn_ci -> fs_ci tcp ack wait 1ms\n    wkstn_ci -> fs_ci smb negotiate msgid 0 wait 1ms\n    wkstn_ci <- fs_ci smb negotiate msgid 0 status 0 wait 1ms\n    wkstn_ci -> fs_ci smb sessionsetup msgid 1 sessionid 0x1001 wait 1ms\n    wkstn_ci <- fs_ci smb sessionsetup msgid 1 sessionid 0x1001 status 0 wait 1ms\n    wkstn_ci -> fs_ci smb treeconnect msgid 2 sessionid 0x1001 share \"\\\\\\\\fs_ci\\\\IPC$\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Translate the following GitHub Actions / GitLab CI Verification Pipeline workflow into an idiomatic, compilable FrameAssembly v3.3.0 (.frasm) capture:\n\n```bash\nframeassembly mig_ci_suricata_smb_tls.frasm ci_out.pcap\ntshark -r ci_out.pcap -Y \"tls.handshake.extensions_server_name || smb2.tree\"\n```"},{"role":"assistant","content":"Checking binary .pcap files into Git makes pull-request diffs unreadable. Storing plain-text .frasm fixtures lets CI compile fresh .pcap files on the fly for Suricata and tshark assertions. frameassembly show prints the relative-timestamp packet ladder in CI logs without writing temporary files.\n\n```frameassembly\nhost wkstn_ci { ip 10.88.1.15 }\nhost edge_ci  { ip 198.51.100.44 }\nhost fs_ci    { ip 10.88.2.45 }\n\ncompile {\n    wkstn_ci -> edge_ci tcp syn srcport 51443 dstport 443 win 65535 mss 1460 wait 1ms\n    wkstn_ci <- edge_ci tcp syn ack win 65535 mss 1460 wait 1ms\n    wkstn_ci -> edge_ci tcp ack wait 1ms\n    wkstn_ci -> edge_ci tls clienthello sni \"updates.example.net\" alpn \"h2\" wait 4ms\n    wkstn_ci -> fs_ci tcp syn srcport 51445 dstport 445 win 65535 mss 1460 wait 1ms\n    wkstn_ci <- fs_ci tcp syn ack win 65535 mss 1460 wait 1ms\n    wkstn_ci -> fs_ci tcp ack wait 1ms\n    wkstn_ci -> fs_ci smb negotiate msgid 0 wait 1ms\n    wkstn_ci <- fs_ci smb negotiate msgid 0 status 0 wait 1ms\n    wkstn_ci -> fs_ci smb sessionsetup msgid 1 sessionid 0x1001 wait 1ms\n    wkstn_ci <- fs_ci smb sessionsetup msgid 1 sessionid 0x1001 status 0 wait 1ms\n    wkstn_ci -> fs_ci smb treeconnect msgid 2 sessionid 0x1001 share \"\\\\\\\\fs_ci\\\\IPC$\"\n}\n```"}]}
{"id":"sft-cookbook-lib-troubleshoot-tac-scrubbed","task_type":"nl_to_frasm","protocols":["dns","tcp","tls"],"version":"3.3.0","license":"MIT","prompt":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Sanitized Vendor TAC Capture (RFC 5737 Safe Subnets)\" (tac_sanitized_support.frasm). Scenario: Clean, share-ready template showing a reversed DNS + HTTPS trace scrubbed to RFC 5737 documentation IPs (198.51.100.x) and neutral example hostnames. Verify with Wireshark filter `dns || tls`.","completion":"Run frameassembly reverse incident.pcap clean.frasm, swap your 10.x.x.x IPs and internal hostnames once, and rebuild a valid .pcap safe to attach to external tickets. Compile with `frameassembly tac_sanitized_support.frasm`.\n\n```frameassembly\n// Reversed capture scrubbed to RFC 5737 documentation IPs before sending to vendor TAC\nhost host1 { ip 198.51.100.21 mac 02:00:00:00:00:01 }\nhost host2 { ip 198.51.100.53 mac 02:00:00:00:00:02 }\nhost host3 { ip 203.0.113.44  mac 02:00:00:00:00:03 }\n\ncompile {\n    // 1. Redacted DNS lookup (replaced internal domain with sso.example.test)\n    host1 -> host2 dns query txid 0x5120 qname \"sso.example.test\" qtype \"A\" wait 3ms\n    host1 <- host2 dns response txid 0x5120 qname \"sso.example.test\" qtype \"A\" rdata \"203.0.113.44\" ansttl 120 wait 2ms\n\n    // 2. Stateful TCP 443 handshake + TLS ClientHello with recalculated lengths & checksums\n    host1 -> host3 tcp syn srcport 53400 dstport 443 win 65535 mss 1460 wait 1ms\n    host1 <- host3 tcp syn ack win 65535 mss 1460 wait 1ms\n    host1 -> host3 tcp ack wait 1ms\n    host1 -> host3 tls clienthello sni \"sso.example.test\" alpn \"h2\"\n}\n```","frasm_code":"// Reversed capture scrubbed to RFC 5737 documentation IPs before sending to vendor TAC\nhost host1 { ip 198.51.100.21 mac 02:00:00:00:00:01 }\nhost host2 { ip 198.51.100.53 mac 02:00:00:00:00:02 }\nhost host3 { ip 203.0.113.44  mac 02:00:00:00:00:03 }\n\ncompile {\n    // 1. Redacted DNS lookup (replaced internal domain with sso.example.test)\n    host1 -> host2 dns query txid 0x5120 qname \"sso.example.test\" qtype \"A\" wait 3ms\n    host1 <- host2 dns response txid 0x5120 qname \"sso.example.test\" qtype \"A\" rdata \"203.0.113.44\" ansttl 120 wait 2ms\n\n    // 2. Stateful TCP 443 handshake + TLS ClientHello with recalculated lengths & checksums\n    host1 -> host3 tcp syn srcport 53400 dstport 443 win 65535 mss 1460 wait 1ms\n    host1 <- host3 tcp syn ack win 65535 mss 1460 wait 1ms\n    host1 -> host3 tcp ack wait 1ms\n    host1 -> host3 tls clienthello sni \"sso.example.test\" alpn \"h2\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a compilable FrameAssembly v3.3.0 (.frasm) specification for \"Sanitized Vendor TAC Capture (RFC 5737 Safe Subnets)\" (tac_sanitized_support.frasm). Scenario: Clean, share-ready template showing a reversed DNS + HTTPS trace scrubbed to RFC 5737 documentation IPs (198.51.100.x) and neutral example hostnames. Verify with Wireshark filter `dns || tls`."},{"role":"assistant","content":"Run frameassembly reverse incident.pcap clean.frasm, swap your 10.x.x.x IPs and internal hostnames once, and rebuild a valid .pcap safe to attach to external tickets. Compile with `frameassembly tac_sanitized_support.frasm`.\n\n```frameassembly\n// Reversed capture scrubbed to RFC 5737 documentation IPs before sending to vendor TAC\nhost host1 { ip 198.51.100.21 mac 02:00:00:00:00:01 }\nhost host2 { ip 198.51.100.53 mac 02:00:00:00:00:02 }\nhost host3 { ip 203.0.113.44  mac 02:00:00:00:00:03 }\n\ncompile {\n    // 1. Redacted DNS lookup (replaced internal domain with sso.example.test)\n    host1 -> host2 dns query txid 0x5120 qname \"sso.example.test\" qtype \"A\" wait 3ms\n    host1 <- host2 dns response txid 0x5120 qname \"sso.example.test\" qtype \"A\" rdata \"203.0.113.44\" ansttl 120 wait 2ms\n\n    // 2. Stateful TCP 443 handshake + TLS ClientHello with recalculated lengths & checksums\n    host1 -> host3 tcp syn srcport 53400 dstport 443 win 65535 mss 1460 wait 1ms\n    host1 <- host3 tcp syn ack win 65535 mss 1460 wait 1ms\n    host1 -> host3 tcp ack wait 1ms\n    host1 -> host3 tls clienthello sni \"sso.example.test\" alpn \"h2\"\n}\n```"}]}
{"id":"sft-quickstart-arp","task_type":"protocol_quickstart","protocols":["arp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Address Resolution Protocol & Gratuitous ARP (`arp`, EtherType 0x0806).","completion":"Uses the strict-lowercase `arp` builder (MAC-Only or IP). Sets Ethernet II EtherType to `0x0806` and broadcasts `request` frames to destination MAC `ff:ff:ff:ff:ff:ff` unless `dstmac` is overridden.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Address Resolution Protocol & Gratuitous ARP (`arp`, EtherType 0x0806)."},{"role":"assistant","content":"Uses the strict-lowercase `arp` builder (MAC-Only or IP). Sets Ethernet II EtherType to `0x0806` and broadcasts `request` frames to destination MAC `ff:ff:ff:ff:ff:ff` unless `dstmac` is overridden.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-vlan","task_type":"protocol_quickstart","protocols":["vlan"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEEE 802.1Q Virtual LAN Tagging & 802.1p QoS (`vlan`, TPID 0x8100 (VID 1)).","completion":"Uses the strict-lowercase `vlan` builder (MAC-Only or IP). Inserts outer TPID `0x8100` and packs `pcp` (3 bits), `dei` (1 bit), and `vid` (12 bits) into the big-endian 16-bit Tag Control Information (TCI) word.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEEE 802.1Q Virtual LAN Tagging & 802.1p QoS (`vlan`, TPID 0x8100 (VID 1))."},{"role":"assistant","content":"Uses the strict-lowercase `vlan` builder (MAC-Only or IP). Inserts outer TPID `0x8100` and packs `pcp` (3 bits), `dei` (1 bit), and `vid` (12 bits) into the big-endian 16-bit Tag Control Information (TCI) word.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-qinq","task_type":"protocol_quickstart","protocols":["qinq"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEEE 802.1ad Provider Bridge Double VLAN Tagging (S-Tag + C-Tag) (`qinq`, Outer 0x88a8 + Inner 0x8100).","completion":"Uses the strict-lowercase `qinq` builder (MAC-Only or IP). Always writes two complete 4-byte VLAN tags: outer TPID `0x88a8` (S-VLAN, default `100`) followed immediately by inner TPID `0x8100` (C-VLAN, default `innervlan 1`).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEEE 802.1ad Provider Bridge Double VLAN Tagging (S-Tag + C-Tag) (`qinq`, Outer 0x88a8 + Inner 0x8100)."},{"role":"assistant","content":"Uses the strict-lowercase `qinq` builder (MAC-Only or IP). Always writes two complete 4-byte VLAN tags: outer TPID `0x88a8` (S-VLAN, default `100`) followed immediately by inner TPID `0x8100` (C-VLAN, default `innervlan 1`).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-lldp","task_type":"protocol_quickstart","protocols":["lldp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEEE 802.1AB Link Layer Discovery Protocol (`lldp`, EtherType 0x88cc).","completion":"Uses the strict-lowercase `lldp` builder (MAC-Only or IP). Sets Ethernet II EtherType to `0x88cc` and defaults the destination MAC to IEEE nearest-bridge multicast `01:80:c2:00:00:0e`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEEE 802.1AB Link Layer Discovery Protocol (`lldp`, EtherType 0x88cc)."},{"role":"assistant","content":"Uses the strict-lowercase `lldp` builder (MAC-Only or IP). Sets Ethernet II EtherType to `0x88cc` and defaults the destination MAC to IEEE nearest-bridge multicast `01:80:c2:00:00:0e`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-stp","task_type":"protocol_quickstart","protocols":["stp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEEE 802.1D Spanning Tree & IEEE 802.1w Rapid Spanning Tree (`stp`, 802.3 LLC 0x4242 -> 01:80:c2:00:00:00).","completion":"Uses the strict-lowercase `stp` builder (MAC-Only or IP). Addresses Ethernet destination to IEEE Bridge Group multicast `01:80:c2:00:00:00` and writes the exact IEEE 802.3 Payload Length field instead of an Ethernet II EtherType.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEEE 802.1D Spanning Tree & IEEE 802.1w Rapid Spanning Tree (`stp`, 802.3 LLC 0x4242 -> 01:80:c2:00:00:00)."},{"role":"assistant","content":"Uses the strict-lowercase `stp` builder (MAC-Only or IP). Addresses Ethernet destination to IEEE Bridge Group multicast `01:80:c2:00:00:00` and writes the exact IEEE 802.3 Payload Length field instead of an Ethernet II EtherType.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-lacp","task_type":"protocol_quickstart","protocols":["lacp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEEE 802.3ad / 802.1AX Link Aggregation Control Protocol (`lacp`, EtherType 0x8809 (Slow Subtype 0x01)).","completion":"Uses the strict-lowercase `lacp` builder (MAC-Only or IP). Sets Ethernet II EtherType to Slow Protocols `0x8809`, destination MAC to `01:80:c2:00:00:02`, Subtype `0x01` (LACP), and Version `0x01`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEEE 802.3ad / 802.1AX Link Aggregation Control Protocol (`lacp`, EtherType 0x8809 (Slow Subtype 0x01))."},{"role":"assistant","content":"Uses the strict-lowercase `lacp` builder (MAC-Only or IP). Sets Ethernet II EtherType to Slow Protocols `0x8809`, destination MAC to `01:80:c2:00:00:02`, Subtype `0x01` (LACP), and Version `0x01`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-eapol","task_type":"protocol_quickstart","protocols":["eapol"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEEE 802.1X Port-Based Network Access Control (EAP over LAN) (`eapol`, EtherType 0x888e -> 01:80:c2:00:00:03).","completion":"Uses the strict-lowercase `eapol` builder (MAC-Only or IP). Sets Ethernet II EtherType to `0x888e` and defaults destination MAC to the IEEE 802.1X PAE group address `01:80:c2:00:00:03`.\n\n```frameassembly\nhost supplicant { mac 00:1b:21:cc:10:25 }\nhost switch_pae { mac 00:1c:73:aa:00:01 }\n\ncompile {\n    supplicant -> switch_pae eapol\n}\n```","frasm_code":"host supplicant { mac 00:1b:21:cc:10:25 }\nhost switch_pae { mac 00:1c:73:aa:00:01 }\n\ncompile {\n    supplicant -> switch_pae eapol\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEEE 802.1X Port-Based Network Access Control (EAP over LAN) (`eapol`, EtherType 0x888e -> 01:80:c2:00:00:03)."},{"role":"assistant","content":"Uses the strict-lowercase `eapol` builder (MAC-Only or IP). Sets Ethernet II EtherType to `0x888e` and defaults destination MAC to the IEEE 802.1X PAE group address `01:80:c2:00:00:03`.\n\n```frameassembly\nhost supplicant { mac 00:1b:21:cc:10:25 }\nhost switch_pae { mac 00:1c:73:aa:00:01 }\n\ncompile {\n    supplicant -> switch_pae eapol\n}\n```"}]}
{"id":"sft-quickstart-mpls","task_type":"protocol_quickstart","protocols":["mpls"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Multiprotocol Label Switching Unicast Shim (`mpls`, EtherType 0x8847 (Label 16)).","completion":"Uses the strict-lowercase `mpls` builder (MAC-Only or IP). Sets Ethernet II (or inner VLAN/QinQ) EtherType to `0x8847` (MPLS Unicast).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Multiprotocol Label Switching Unicast Shim (`mpls`, EtherType 0x8847 (Label 16))."},{"role":"assistant","content":"Uses the strict-lowercase `mpls` builder (MAC-Only or IP). Sets Ethernet II (or inner VLAN/QinQ) EtherType to `0x8847` (MPLS Unicast).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-cdp","task_type":"protocol_quickstart","protocols":["cdp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Cisco Discovery Protocol v2 (IEEE 802.3 LLC/SNAP) (`cdp`, 802.3 SNAP 0x2000).","completion":"Uses the strict-lowercase `cdp` builder (MAC-Only or IP). Encapsulates the frame in IEEE 802.3 length framing + 8-byte LLC/SNAP header (`aa:aa:03:00:00:0c:20:00`) and targets Cisco multicast MAC `01:00:0c:cc:cc:cc` when `dstmac` is omitted.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Cisco Discovery Protocol v2 (IEEE 802.3 LLC/SNAP) (`cdp`, 802.3 SNAP 0x2000)."},{"role":"assistant","content":"Uses the strict-lowercase `cdp` builder (MAC-Only or IP). Encapsulates the frame in IEEE 802.3 length framing + 8-byte LLC/SNAP header (`aa:aa:03:00:00:0c:20:00`) and targets Cisco multicast MAC `01:00:0c:cc:cc:cc` when `dstmac` is omitted.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-isis","task_type":"protocol_quickstart","protocols":["isis"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Intermediate System to Intermediate System (ISO/IEC 10589) (`isis`, 802.3 LLC CLNS 0xfefe03).","completion":"Uses the strict-lowercase `isis` builder (MAC-Only or IP). Frames packets with IEEE 802.3 length + LLC `fe:fe:03` + ISO 10589 Intradomain Routing Protocol Discriminator `0x83` and sets `AllL1IS` (`01:80:c2:00:00:14`) or `AllL2IS` (`01:80:c2:00:00:15`) multicast destination MACs.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Intermediate System to Intermediate System (ISO/IEC 10589) (`isis`, 802.3 LLC CLNS 0xfefe03)."},{"role":"assistant","content":"Uses the strict-lowercase `isis` builder (MAC-Only or IP). Frames packets with IEEE 802.3 length + LLC `fe:fe:03` + ISO 10589 Intradomain Routing Protocol Discriminator `0x83` and sets `AllL1IS` (`01:80:c2:00:00:14`) or `AllL2IS` (`01:80:c2:00:00:15`) multicast destination MACs.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-macsec","task_type":"protocol_quickstart","protocols":["macsec"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEEE 802.1AE Media Access Control Security (MACsec) (`macsec`, EtherType 0x88e5).","completion":"Uses the strict-lowercase `macsec` builder (MAC-Only or IP). Sets Ethernet II EtherType to `0x88e5` (IEEE 802.1AE MACsec) and bit-packs upper `tci` flags with the 2-bit Association Number (`an`).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEEE 802.1AE Media Access Control Security (MACsec) (`macsec`, EtherType 0x88e5)."},{"role":"assistant","content":"Uses the strict-lowercase `macsec` builder (MAC-Only or IP). Sets Ethernet II EtherType to `0x88e5` (IEEE 802.1AE MACsec) and bit-packs upper `tci` flags with the 2-bit Association Number (`an`).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-pfc","task_type":"protocol_quickstart","protocols":["pfc"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEEE 802.1Qbb Priority-based Flow Control (Lossless Ethernet) (`pfc`, EtherType 0x8808 (Opcode 0x0101)).","completion":"Uses the strict-lowercase `pfc` builder (MAC-Only or IP). Sets Ethernet II EtherType to `0x8808` (MAC Control), destination MAC to `01:80:c2:00:00:01`, and MAC Control Opcode to `0x0101` (PFC).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEEE 802.1Qbb Priority-based Flow Control (Lossless Ethernet) (`pfc`, EtherType 0x8808 (Opcode 0x0101))."},{"role":"assistant","content":"Uses the strict-lowercase `pfc` builder (MAC-Only or IP). Sets Ethernet II EtherType to `0x8808` (MAC Control), destination MAC to `01:80:c2:00:00:01`, and MAC Control Opcode to `0x0101` (PFC).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-pppoe","task_type":"protocol_quickstart","protocols":["pppoe"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Point-to-Point Protocol over Ethernet (Discovery & Session) (`pppoe`, EtherType 0x8863 / 0x8864).","completion":"Uses the strict-lowercase `pppoe` builder (MAC-Only or IP). Selects EtherType `0x8863` for Discovery (`padi`, `pado`, `padr`, `pads`, `padt`) and `0x8864` for `session`, broadcasting `padi` to `ff:ff:ff:ff:ff:ff` automatically.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Point-to-Point Protocol over Ethernet (Discovery & Session) (`pppoe`, EtherType 0x8863 / 0x8864)."},{"role":"assistant","content":"Uses the strict-lowercase `pppoe` builder (MAC-Only or IP). Selects EtherType `0x8863` for Discovery (`padi`, `pado`, `padr`, `pads`, `padt`) and `0x8864` for `session`, broadcasting `padi` to `ff:ff:ff:ff:ff:ff` automatically.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-nsh","task_type":"protocol_quickstart","protocols":["nsh"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Network Service Header (Service Function Chaining) (`nsh`, EtherType 0x894f).","completion":"Uses the strict-lowercase `nsh` builder (MAC-Only or IP). Sets Ethernet II EtherType to `0x894f` and bit-packs the 2-bit `version`, `oam` flag, 6-bit `ttl` (`default 63`), and 6-bit 32-bit-word `Length` field.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Network Service Header (Service Function Chaining) (`nsh`, EtherType 0x894f)."},{"role":"assistant","content":"Uses the strict-lowercase `nsh` builder (MAC-Only or IP). Sets Ethernet II EtherType to `0x894f` and bit-packs the 2-bit `version`, `oam` flag, 6-bit `ttl` (`default 63`), and 6-bit 32-bit-word `Length` field.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-profinet","task_type":"protocol_quickstart","protocols":["profinet"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEC 61158 PROFINET Real-Time & DCP (Ethernet 0x8892 / UDP 34964) (`profinet`, EtherType 0x8892 (or UDP 34964)).","completion":"Uses the strict-lowercase `profinet` builder (MAC-Only or IP). Sets Ethernet II EtherType to `0x8892` on Layer 2 frames, or encapsulates inside IPv4/IPv6 + UDP `dstport 34964` when `transport udp` is specified.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEC 61158 PROFINET Real-Time & DCP (Ethernet 0x8892 / UDP 34964) (`profinet`, EtherType 0x8892 (or UDP 34964))."},{"role":"assistant","content":"Uses the strict-lowercase `profinet` builder (MAC-Only or IP). Sets Ethernet II EtherType to `0x8892` on Layer 2 frames, or encapsulates inside IPv4/IPv6 + UDP `dstport 34964` when `transport udp` is specified.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-goose","task_type":"protocol_quickstart","protocols":["goose"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEC 61850-8-1 Generic Object Oriented Substation Events (`goose`, EtherType 0x88b8).","completion":"Uses the strict-lowercase `goose` builder (MAC-Only or IP). Sets Ethernet II EtherType to `0x88b8` and targets IEC 61850 GOOSE multicast `01:0c:cd:01:00:01` when `dstmac` / peer MAC is default.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEC 61850-8-1 Generic Object Oriented Substation Events (`goose`, EtherType 0x88b8)."},{"role":"assistant","content":"Uses the strict-lowercase `goose` builder (MAC-Only or IP). Sets Ethernet II EtherType to `0x88b8` and targets IEC 61850 GOOSE multicast `01:0c:cd:01:00:01` when `dstmac` / peer MAC is default.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-sv","task_type":"protocol_quickstart","protocols":["sv"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEC 61850-9-2 Substation Sampled Values (Process Bus) (`sv`, EtherType 0x88ba).","completion":"Uses the strict-lowercase `sv` builder (MAC-Only or IP). Sets Ethernet II EtherType to `0x88ba` (IEC 61850 Sampled Values), defaults `APPID` to `0x4000`, and sets bit `0x8000` in `Reserved1` when `simulation` is present.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEC 61850-9-2 Substation Sampled Values (Process Bus) (`sv`, EtherType 0x88ba)."},{"role":"assistant","content":"Uses the strict-lowercase `sv` builder (MAC-Only or IP). Sets Ethernet II EtherType to `0x88ba` (IEC 61850 Sampled Values), defaults `APPID` to `0x4000`, and sets bit `0x8000` in `Reserved1` when `simulation` is present.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-ethercat","task_type":"protocol_quickstart","protocols":["ethercat"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEC 61158 EtherCAT Industrial Ethernet Fieldbus (0x88a4 / UDP 34980) (`ethercat`, EtherType 0x88a4 (or UDP 34980)).","completion":"Uses the strict-lowercase `ethercat` builder (MAC-Only or IP). Sets Ethernet II EtherType to `0x88a4` (or IPv4/IPv6 + UDP `dstport 34980` when `transport udp` is specified).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEC 61158 EtherCAT Industrial Ethernet Fieldbus (0x88a4 / UDP 34980) (`ethercat`, EtherType 0x88a4 (or UDP 34980))."},{"role":"assistant","content":"Uses the strict-lowercase `ethercat` builder (MAC-Only or IP). Sets Ethernet II EtherType to `0x88a4` (or IPv4/IPv6 + UDP `dstport 34980` when `transport udp` is specified).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-icmp","task_type":"protocol_quickstart","protocols":["icmp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Internet Control Message Protocol v4 & Dual-Stack ICMPv6 (`icmp`, IP Proto 1 (v4) / NextHdr 58 (v6)).","completion":"Uses the strict-lowercase `icmp` builder (Dual-Stack Morphing (v4/v6)). Automatically selects IPv4 Protocol `1` (`0x0800`) over IPv4 endpoints or ICMPv6 Next Header `58` (`0x86dd`) over IPv6 endpoints.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Internet Control Message Protocol v4 & Dual-Stack ICMPv6 (`icmp`, IP Proto 1 (v4) / NextHdr 58 (v6))."},{"role":"assistant","content":"Uses the strict-lowercase `icmp` builder (Dual-Stack Morphing (v4/v6)). Automatically selects IPv4 Protocol `1` (`0x0800`) over IPv4 endpoints or ICMPv6 Next Header `58` (`0x86dd`) over IPv6 endpoints.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-ndp","task_type":"protocol_quickstart","protocols":["ndp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IPv6 Neighbor Discovery Protocol (`ndp`, ICMPv6 NextHdr 58 (Hop Limit 255)).","completion":"Uses the strict-lowercase `ndp` builder (IPv6-Only). Enforces IPv6 Hop Limit `255` (`ttl 255`) by default in accordance with RFC 4861 §6.1.2 / §7.1.1.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IPv6 Neighbor Discovery Protocol (`ndp`, ICMPv6 NextHdr 58 (Hop Limit 255))."},{"role":"assistant","content":"Uses the strict-lowercase `ndp` builder (IPv6-Only). Enforces IPv6 Hop Limit `255` (`ttl 255`) by default in accordance with RFC 4861 §6.1.2 / §7.1.1.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-igmp","task_type":"protocol_quickstart","protocols":["igmp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Internet Group Management Protocol v1, v2 & v3 (`igmp`, IPv4 Proto 2 (TTL 1)).","completion":"Uses the strict-lowercase `igmp` builder (IPv4-Only). Encapsulates inside IPv4 Protocol `2` with link-local `ttl 1` by default.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Internet Group Management Protocol v1, v2 & v3 (`igmp`, IPv4 Proto 2 (TTL 1))."},{"role":"assistant","content":"Uses the strict-lowercase `igmp` builder (IPv4-Only). Encapsulates inside IPv4 Protocol `2` with link-local `ttl 1` by default.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-mld","task_type":"protocol_quickstart","protocols":["mld"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Multicast Listener Discovery v1 & v2 (IPv6) (`mld`, ICMPv6 NextHdr 58 (Hop Limit 1)).","completion":"Uses the strict-lowercase `mld` builder (IPv6-Only). Sets IPv6 Next Header to `58` (ICMPv6) and defaults Hop Limit (`ttl`) to `1` per RFC 2710.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Multicast Listener Discovery v1 & v2 (IPv6) (`mld`, ICMPv6 NextHdr 58 (Hop Limit 1))."},{"role":"assistant","content":"Uses the strict-lowercase `mld` builder (IPv6-Only). Sets IPv6 Next Header to `58` (ICMPv6) and defaults Hop Limit (`ttl`) to `1` per RFC 2710.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-gre","task_type":"protocol_quickstart","protocols":["gre"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Generic Routing Encapsulation (GRE, GRETAP & NVGRE) (`gre`, IP Proto 47).","completion":"Uses the strict-lowercase `gre` builder (Dual-Stack IPv4/IPv6). Sets outer IPv4 Protocol or IPv6 Next Header to `47` and defaults `greproto` to `0x0800` (IPv4) with an inner probe header when `payload` is omitted.\n\n```frameassembly\nhost branch_wan { ip 203.0.113.10 }\nhost hub_wan    { ip 198.51.100.1 }\n\ncompile {\n    branch_wan -> hub_wan gre grekey 1001 greseq 1 checksum payload \"gre-keepalive\"\n}\n```","frasm_code":"host branch_wan { ip 203.0.113.10 }\nhost hub_wan    { ip 198.51.100.1 }\n\ncompile {\n    branch_wan -> hub_wan gre grekey 1001 greseq 1 checksum payload \"gre-keepalive\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Generic Routing Encapsulation (GRE, GRETAP & NVGRE) (`gre`, IP Proto 47)."},{"role":"assistant","content":"Uses the strict-lowercase `gre` builder (Dual-Stack IPv4/IPv6). Sets outer IPv4 Protocol or IPv6 Next Header to `47` and defaults `greproto` to `0x0800` (IPv4) with an inner probe header when `payload` is omitted.\n\n```frameassembly\nhost branch_wan { ip 203.0.113.10 }\nhost hub_wan    { ip 198.51.100.1 }\n\ncompile {\n    branch_wan -> hub_wan gre grekey 1001 greseq 1 checksum payload \"gre-keepalive\"\n}\n```"}]}
{"id":"sft-quickstart-vxlan","task_type":"protocol_quickstart","protocols":["vxlan"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Virtual eXtensible Local Area Network Overlay (`vxlan`, UDP 4789 (VNI 1)).","completion":"Uses the strict-lowercase `vxlan` builder (Dual-Stack IPv4/IPv6). Wraps the packet in UDP `dstport 4789` with ephemeral outer `srcport` and computes the outer IPv4/IPv6 + UDP checksums.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Virtual eXtensible Local Area Network Overlay (`vxlan`, UDP 4789 (VNI 1))."},{"role":"assistant","content":"Uses the strict-lowercase `vxlan` builder (Dual-Stack IPv4/IPv6). Wraps the packet in UDP `dstport 4789` with ephemeral outer `srcport` and computes the outer IPv4/IPv6 + UDP checksums.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-geneve","task_type":"protocol_quickstart","protocols":["geneve"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Generic Network Virtualization Encapsulation (`geneve`, UDP 6081 (Proto 0x6558)).","completion":"Uses the strict-lowercase `geneve` builder (Dual-Stack IPv4/IPv6). Encapsulates over UDP `dstport 6081` with computed IPv4/IPv6 and UDP pseudo-header checksums.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Generic Network Virtualization Encapsulation (`geneve`, UDP 6081 (Proto 0x6558))."},{"role":"assistant","content":"Uses the strict-lowercase `geneve` builder (Dual-Stack IPv4/IPv6). Encapsulates over UDP `dstport 6081` with computed IPv4/IPv6 and UDP pseudo-header checksums.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-ipip","task_type":"protocol_quickstart","protocols":["ipip"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IP-in-IP & IPv6-in-IPv4 Tunneling (`ipip`, IP Proto 4 (IPv4) / 41 (IPv6)).","completion":"Uses the strict-lowercase `ipip` builder (Dual-Stack IPv4/IPv6). Sets outer IPv4 Protocol / IPv6 Next Header to `4` (`IPIP`) when the inner header is IPv4 or `41` (`IPv6` encapsulation) when `v6` / `version 6` or IPv6 `srcip`/`dstip` is selected.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IP-in-IP & IPv6-in-IPv4 Tunneling (`ipip`, IP Proto 4 (IPv4) / 41 (IPv6))."},{"role":"assistant","content":"Uses the strict-lowercase `ipip` builder (Dual-Stack IPv4/IPv6). Sets outer IPv4 Protocol / IPv6 Next Header to `4` (`IPIP`) when the inner header is IPv4 or `41` (`IPv6` encapsulation) when `v6` / `version 6` or IPv6 `srcip`/`dstip` is selected.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-srv6","task_type":"protocol_quickstart","protocols":["srv6"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Segment Routing over IPv6 — Segment Routing Header (`srv6`, IPv6 NextHdr 43 (Routing Type 4)).","completion":"Uses the strict-lowercase `srv6` builder (IPv6-Only). Sets the outer IPv6 Next Header field to `43` (Routing Header) and initializes the SRH fixed 8-byte header with `Routing Type = 4` (SRH).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Segment Routing over IPv6 — Segment Routing Header (`srv6`, IPv6 NextHdr 43 (Routing Type 4))."},{"role":"assistant","content":"Uses the strict-lowercase `srv6` builder (IPv6-Only). Sets the outer IPv6 Next Header field to `43` (Routing Header) and initializes the SRH fixed 8-byte header with `Routing Type = 4` (SRH).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-erspan","task_type":"protocol_quickstart","protocols":["erspan"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Cisco Encapsulated Remote SPAN Port Mirroring (Type II & Type III) (`erspan`, IP Proto 47 (GRE 0x88be v2 / 0x22eb v3)).","completion":"Uses the strict-lowercase `erspan` builder (Dual-Stack IPv4/IPv6). Encapsulates inside IP Protocol `47` (GRE with `S=1` 32-bit `greseq`) using GRE Protocol `0x88be` for Type II (`v2`, default) or `0x22eb` for Type III (`v3`).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Cisco Encapsulated Remote SPAN Port Mirroring (Type II & Type III) (`erspan`, IP Proto 47 (GRE 0x88be v2 / 0x22eb v3))."},{"role":"assistant","content":"Uses the strict-lowercase `erspan` builder (Dual-Stack IPv4/IPv6). Encapsulates inside IP Protocol `47` (GRE with `S=1` 32-bit `greseq`) using GRE Protocol `0x88be` for Type II (`v2`, default) or `0x22eb` for Type III (`v3`).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-ipsec","task_type":"protocol_quickstart","protocols":["ipsec"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IPsec Encapsulating Security Payload (Protocol Alias) (`ipsec`, IP Proto 50 (ESP)).","completion":"Uses the strict-lowercase `ipsec` builder (Dual-Stack IPv4/IPv6). Sets outer IPv4 Protocol or IPv6 Next Header to `50` (ESP).\n\n```frameassembly\nhost vpn_branch { ip 198.51.100.10 }\nhost vpn_hq     { ip 203.0.113.20 }\n\ncompile {\n    vpn_branch -> vpn_hq ipsec spi 0x00001001 seq 1\n}\n```","frasm_code":"host vpn_branch { ip 198.51.100.10 }\nhost vpn_hq     { ip 203.0.113.20 }\n\ncompile {\n    vpn_branch -> vpn_hq ipsec spi 0x00001001 seq 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IPsec Encapsulating Security Payload (Protocol Alias) (`ipsec`, IP Proto 50 (ESP))."},{"role":"assistant","content":"Uses the strict-lowercase `ipsec` builder (Dual-Stack IPv4/IPv6). Sets outer IPv4 Protocol or IPv6 Next Header to `50` (ESP).\n\n```frameassembly\nhost vpn_branch { ip 198.51.100.10 }\nhost vpn_hq     { ip 203.0.113.20 }\n\ncompile {\n    vpn_branch -> vpn_hq ipsec spi 0x00001001 seq 1\n}\n```"}]}
{"id":"sft-quickstart-esp","task_type":"protocol_quickstart","protocols":["esp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IPsec Encapsulating Security Payload (`esp`, IP Proto 50).","completion":"Uses the strict-lowercase `esp` builder (Dual-Stack IPv4/IPv6). Emits IPv4 Protocol `50` or IPv6 Next Header `50` with computed outer IPv4 header checksum and exact payload length.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IPsec Encapsulating Security Payload (`esp`, IP Proto 50)."},{"role":"assistant","content":"Uses the strict-lowercase `esp` builder (Dual-Stack IPv4/IPv6). Emits IPv4 Protocol `50` or IPv6 Next Header `50` with computed outer IPv4 header checksum and exact payload length.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-ah","task_type":"protocol_quickstart","protocols":["ah"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IPsec Authentication Header (`ah`, IP Proto 51).","completion":"Uses the strict-lowercase `ah` builder (Dual-Stack IPv4/IPv6). Sets outer IPv4 Protocol or IPv6 Next Header to `51` (Authentication Header).\n\n```frameassembly\nhost rtr_core1 { ip 10.0.51.1 }\nhost rtr_core2 { ip 10.0.51.2 }\n\ncompile {\n    rtr_core1 -> rtr_core2 ah spi 0x00002001 seq 1\n}\n```","frasm_code":"host rtr_core1 { ip 10.0.51.1 }\nhost rtr_core2 { ip 10.0.51.2 }\n\ncompile {\n    rtr_core1 -> rtr_core2 ah spi 0x00002001 seq 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IPsec Authentication Header (`ah`, IP Proto 51)."},{"role":"assistant","content":"Uses the strict-lowercase `ah` builder (Dual-Stack IPv4/IPv6). Sets outer IPv4 Protocol or IPv6 Next Header to `51` (Authentication Header).\n\n```frameassembly\nhost rtr_core1 { ip 10.0.51.1 }\nhost rtr_core2 { ip 10.0.51.2 }\n\ncompile {\n    rtr_core1 -> rtr_core2 ah spi 0x00002001 seq 1\n}\n```"}]}
{"id":"sft-quickstart-ikev2","task_type":"protocol_quickstart","protocols":["ikev2"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Internet Key Exchange Protocol Version 2 (`ikev2`, UDP 500 -> 500 (NAT-T 4500)).","completion":"Uses the strict-lowercase `ikev2` builder (Dual-Stack IPv4/IPv6). Defaults both `srcport` and `dstport` to IANA IKE port `500` (avoiding ephemeral `49152` source ports blocked by strict VPN ACLs).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Internet Key Exchange Protocol Version 2 (`ikev2`, UDP 500 -> 500 (NAT-T 4500))."},{"role":"assistant","content":"Uses the strict-lowercase `ikev2` builder (Dual-Stack IPv4/IPv6). Defaults both `srcport` and `dstport` to IANA IKE port `500` (avoiding ephemeral `49152` source ports blocked by strict VPN ACLs).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-wireguard","task_type":"protocol_quickstart","protocols":["wireguard"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for WireGuard Noise_IK Secure Network Tunnel (`wireguard`, UDP 51820).","completion":"Uses the strict-lowercase `wireguard` builder (Dual-Stack IPv4/IPv6). Defaults UDP `dstport` to `51820` and writes the 4-byte WireGuard message header (`Type` `1..4` followed by three mandatory `0x00` reserved bytes).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for WireGuard Noise_IK Secure Network Tunnel (`wireguard`, UDP 51820)."},{"role":"assistant","content":"Uses the strict-lowercase `wireguard` builder (Dual-Stack IPv4/IPv6). Defaults UDP `dstport` to `51820` and writes the 4-byte WireGuard message header (`Type` `1..4` followed by three mandatory `0x00` reserved bytes).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-ospf","task_type":"protocol_quickstart","protocols":["ospf"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Open Shortest Path First — OSPFv2 & Dual-Stack OSPFv3 (`ospf`, IP Proto 89 (TTL 1)).","completion":"Uses the strict-lowercase `ospf` builder (Dual-Stack Morphing (v4/v6)). Selects OSPFv2 (24B header, IPv4 Proto `89`) over IPv4 hosts or OSPFv3 (16B header, IPv6 Next Header `89`, IPv6 pseudo-header checksum) over IPv6 hosts.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Open Shortest Path First — OSPFv2 & Dual-Stack OSPFv3 (`ospf`, IP Proto 89 (TTL 1))."},{"role":"assistant","content":"Uses the strict-lowercase `ospf` builder (Dual-Stack Morphing (v4/v6)). Selects OSPFv2 (24B header, IPv4 Proto `89`) over IPv4 hosts or OSPFv3 (16B header, IPv6 Next Header `89`, IPv6 pseudo-header checksum) over IPv6 hosts.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-bgp","task_type":"protocol_quickstart","protocols":["bgp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Border Gateway Protocol 4 & 4-Byte ASN Capability (`bgp`, TCP 179).","completion":"Uses the strict-lowercase `bgp` builder (Dual-Stack IPv4/IPv6). Tracks TCP sequence and acknowledgment numbers automatically on port `179` (`psh ack` flags set by default) and prepends the 16-byte `ff..ff` BGP marker.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Border Gateway Protocol 4 & 4-Byte ASN Capability (`bgp`, TCP 179)."},{"role":"assistant","content":"Uses the strict-lowercase `bgp` builder (Dual-Stack IPv4/IPv6). Tracks TCP sequence and acknowledgment numbers automatically on port `179` (`psh ack` flags set by default) and prepends the 16-byte `ff..ff` BGP marker.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-rip","task_type":"protocol_quickstart","protocols":["rip"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Routing Information Protocol — RIPv2 & Dual-Stack RIPng (`rip`, UDP 520 (RIPv2) / UDP 521 (RIPng)).","completion":"Uses the strict-lowercase `rip` builder (Dual-Stack Morphing (v4/v6)). Selects RIPv2 on UDP `520 -> 520` over IPv4 hosts or RIPng on UDP `521 -> 521` over IPv6 hosts.\n\n```frameassembly\nhost branch_rtr { ip 10.10.0.1 }\nhost edge_rtr   { ip 10.10.0.2 }\n\ncompile {\n    branch_rtr -> edge_rtr rip request wait 2ms\n    branch_rtr <- edge_rtr rip response prefix 10.200.0.0 metric 2 tag 100\n}\n```","frasm_code":"host branch_rtr { ip 10.10.0.1 }\nhost edge_rtr   { ip 10.10.0.2 }\n\ncompile {\n    branch_rtr -> edge_rtr rip request wait 2ms\n    branch_rtr <- edge_rtr rip response prefix 10.200.0.0 metric 2 tag 100\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Routing Information Protocol — RIPv2 & Dual-Stack RIPng (`rip`, UDP 520 (RIPv2) / UDP 521 (RIPng))."},{"role":"assistant","content":"Uses the strict-lowercase `rip` builder (Dual-Stack Morphing (v4/v6)). Selects RIPv2 on UDP `520 -> 520` over IPv4 hosts or RIPng on UDP `521 -> 521` over IPv6 hosts.\n\n```frameassembly\nhost branch_rtr { ip 10.10.0.1 }\nhost edge_rtr   { ip 10.10.0.2 }\n\ncompile {\n    branch_rtr -> edge_rtr rip request wait 2ms\n    branch_rtr <- edge_rtr rip response prefix 10.200.0.0 metric 2 tag 100\n}\n```"}]}
{"id":"sft-quickstart-pim","task_type":"protocol_quickstart","protocols":["pim"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Protocol Independent Multicast — Sparse Mode (`pim`, IP Proto 103).","completion":"Uses the strict-lowercase `pim` builder (Dual-Stack IPv4/IPv6). Encapsulates over IPv4 Protocol `103` or IPv6 Next Header `103` with PIM Version `2` (`0x20`).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Protocol Independent Multicast — Sparse Mode (`pim`, IP Proto 103)."},{"role":"assistant","content":"Uses the strict-lowercase `pim` builder (Dual-Stack IPv4/IPv6). Encapsulates over IPv4 Protocol `103` or IPv6 Next Header `103` with PIM Version `2` (`0x20`).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-vrrp","task_type":"protocol_quickstart","protocols":["vrrp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Virtual Router Redundancy Protocol v2 & v3 (`vrrp`, IP Proto 112 (TTL 255)).","completion":"Uses the strict-lowercase `vrrp` builder (Dual-Stack Morphing (v4/v6)). Sets IPv4 Protocol / IPv6 Next Header to `112` and defaults `ttl` / Hop Limit to `255` per RFC 3768 / RFC 5798.\n\n```frameassembly\nhost gw_master { ip 10.10.1.2 mac 00:00:5e:00:01:0a }\nhost vrrp_all  { ip 224.0.0.18 }\n\ncompile {\n    gw_master -> vrrp_all vrrp vrid 10 priority 150 advint 1 vip 10.10.1.1\n}\n```","frasm_code":"host gw_master { ip 10.10.1.2 mac 00:00:5e:00:01:0a }\nhost vrrp_all  { ip 224.0.0.18 }\n\ncompile {\n    gw_master -> vrrp_all vrrp vrid 10 priority 150 advint 1 vip 10.10.1.1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Virtual Router Redundancy Protocol v2 & v3 (`vrrp`, IP Proto 112 (TTL 255))."},{"role":"assistant","content":"Uses the strict-lowercase `vrrp` builder (Dual-Stack Morphing (v4/v6)). Sets IPv4 Protocol / IPv6 Next Header to `112` and defaults `ttl` / Hop Limit to `255` per RFC 3768 / RFC 5798.\n\n```frameassembly\nhost gw_master { ip 10.10.1.2 mac 00:00:5e:00:01:0a }\nhost vrrp_all  { ip 224.0.0.18 }\n\ncompile {\n    gw_master -> vrrp_all vrrp vrid 10 priority 150 advint 1 vip 10.10.1.1\n}\n```"}]}
{"id":"sft-quickstart-hsrp","task_type":"protocol_quickstart","protocols":["hsrp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Cisco Hot Standby Router Protocol v1 & v2 (`hsrp`, UDP 1985 (v1) / UDP 2029 (v2)).","completion":"Uses the strict-lowercase `hsrp` builder (Dual-Stack Morphing (v4/v6)). Defaults UDP source and destination ports to `1985 -> 1985` on IPv4 (HSRPv1) or `2029 -> 2029` on IPv6 (HSRPv2 TLV).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Cisco Hot Standby Router Protocol v1 & v2 (`hsrp`, UDP 1985 (v1) / UDP 2029 (v2))."},{"role":"assistant","content":"Uses the strict-lowercase `hsrp` builder (Dual-Stack Morphing (v4/v6)). Defaults UDP source and destination ports to `1985 -> 1985` on IPv4 (HSRPv1) or `2029 -> 2029` on IPv6 (HSRPv2 TLV).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-glbp","task_type":"protocol_quickstart","protocols":["glbp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Cisco Gateway Load Balancing Protocol (`glbp`, UDP 3222 (Multicast 224.0.0.102, TTL 1)).","completion":"Uses the strict-lowercase `glbp` builder (Dual-Stack IPv4/IPv6). Defaults UDP source and destination ports to `3222`, sets IPv4 TTL / IPv6 Hop Limit to `1`, and targets `224.0.0.102` (`01:00:5e:00:00:66`) over IPv4 or `ff02::66` over IPv6 unless overridden.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Cisco Gateway Load Balancing Protocol (`glbp`, UDP 3222 (Multicast 224.0.0.102, TTL 1))."},{"role":"assistant","content":"Uses the strict-lowercase `glbp` builder (Dual-Stack IPv4/IPv6). Defaults UDP source and destination ports to `3222`, sets IPv4 TTL / IPv6 Hop Limit to `1`, and targets `224.0.0.102` (`01:00:5e:00:00:66`) over IPv4 or `ff02::66` over IPv6 unless overridden.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-bfd","task_type":"protocol_quickstart","protocols":["bfd"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Bidirectional Forwarding Detection Control Packet (`bfd`, UDP 3784 (Multihop 4784, TTL 255)).","completion":"Uses the strict-lowercase `bfd` builder (Dual-Stack IPv4/IPv6). Defaults UDP `srcport` to RFC 5881 range (`49152+`), `dstport` to `3784`, and IP `ttl` / Hop Limit to `255`.\n\n```frameassembly\nhost rtr_leaf  { ip 172.16.0.1 }\nhost rtr_spine { ip 172.16.0.2 }\n\ncompile {\n    rtr_leaf -> rtr_spine bfd state 3 mydisc 101 yourdisc 202 mintx 50000 minrx 50000 mult 3 wait 50ms\n    rtr_leaf <- rtr_spine bfd state 3 mydisc 202 yourdisc 101 mintx 50000 minrx 50000 mult 3\n}\n```","frasm_code":"host rtr_leaf  { ip 172.16.0.1 }\nhost rtr_spine { ip 172.16.0.2 }\n\ncompile {\n    rtr_leaf -> rtr_spine bfd state 3 mydisc 101 yourdisc 202 mintx 50000 minrx 50000 mult 3 wait 50ms\n    rtr_leaf <- rtr_spine bfd state 3 mydisc 202 yourdisc 101 mintx 50000 minrx 50000 mult 3\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Bidirectional Forwarding Detection Control Packet (`bfd`, UDP 3784 (Multihop 4784, TTL 255))."},{"role":"assistant","content":"Uses the strict-lowercase `bfd` builder (Dual-Stack IPv4/IPv6). Defaults UDP `srcport` to RFC 5881 range (`49152+`), `dstport` to `3784`, and IP `ttl` / Hop Limit to `255`.\n\n```frameassembly\nhost rtr_leaf  { ip 172.16.0.1 }\nhost rtr_spine { ip 172.16.0.2 }\n\ncompile {\n    rtr_leaf -> rtr_spine bfd state 3 mydisc 101 yourdisc 202 mintx 50000 minrx 50000 mult 3 wait 50ms\n    rtr_leaf <- rtr_spine bfd state 3 mydisc 202 yourdisc 101 mintx 50000 minrx 50000 mult 3\n}\n```"}]}
{"id":"sft-quickstart-openflow","task_type":"protocol_quickstart","protocols":["openflow"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for OpenFlow SDN Control Channel (OpenFlow 1.3 / 1.4) (`openflow`, TCP 6653).","completion":"Uses the strict-lowercase `openflow` builder (Dual-Stack IPv4/IPv6). Defaults to IANA OpenFlow port TCP `6653`, Version `4` (`0x04` = OpenFlow 1.3), and shares stateful 4-tuple TCP `seq`/`acknum` progression.\n\n```frameassembly\nhost sdn_ctrl { ip 10.90.0.10 }\nhost ovs_br0  { ip 10.90.0.21 }\n\ncompile {\n    sdn_ctrl -> ovs_br0 openflow hello xid 1 wait 1ms\n    sdn_ctrl <- ovs_br0 openflow hello xid 1 wait 1ms\n    sdn_ctrl -> ovs_br0 openflow featuresreq xid 2 wait 1ms\n    sdn_ctrl <- ovs_br0 openflow featuresreply xid 2 dpid 0x0000001c73000001\n}\n```","frasm_code":"host sdn_ctrl { ip 10.90.0.10 }\nhost ovs_br0  { ip 10.90.0.21 }\n\ncompile {\n    sdn_ctrl -> ovs_br0 openflow hello xid 1 wait 1ms\n    sdn_ctrl <- ovs_br0 openflow hello xid 1 wait 1ms\n    sdn_ctrl -> ovs_br0 openflow featuresreq xid 2 wait 1ms\n    sdn_ctrl <- ovs_br0 openflow featuresreply xid 2 dpid 0x0000001c73000001\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for OpenFlow SDN Control Channel (OpenFlow 1.3 / 1.4) (`openflow`, TCP 6653)."},{"role":"assistant","content":"Uses the strict-lowercase `openflow` builder (Dual-Stack IPv4/IPv6). Defaults to IANA OpenFlow port TCP `6653`, Version `4` (`0x04` = OpenFlow 1.3), and shares stateful 4-tuple TCP `seq`/`acknum` progression.\n\n```frameassembly\nhost sdn_ctrl { ip 10.90.0.10 }\nhost ovs_br0  { ip 10.90.0.21 }\n\ncompile {\n    sdn_ctrl -> ovs_br0 openflow hello xid 1 wait 1ms\n    sdn_ctrl <- ovs_br0 openflow hello xid 1 wait 1ms\n    sdn_ctrl -> ovs_br0 openflow featuresreq xid 2 wait 1ms\n    sdn_ctrl <- ovs_br0 openflow featuresreply xid 2 dpid 0x0000001c73000001\n}\n```"}]}
{"id":"sft-quickstart-rsvp","task_type":"protocol_quickstart","protocols":["rsvp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Resource Reservation Protocol — Traffic Engineering (`rsvp`, IP Proto 46 (Router Alert Optional)).","completion":"Uses the strict-lowercase `rsvp` builder (Dual-Stack IPv4/IPv6). Sets outer IPv4 Protocol / IPv6 Next Header to `46` (`RSVP`) and computes the 16-bit ones'-complement RSVP message checksum over all appended Class-Num / C-Type objects.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Resource Reservation Protocol — Traffic Engineering (`rsvp`, IP Proto 46 (Router Alert Optional))."},{"role":"assistant","content":"Uses the strict-lowercase `rsvp` builder (Dual-Stack IPv4/IPv6). Sets outer IPv4 Protocol / IPv6 Next Header to `46` (`RSVP`) and computes the 16-bit ones'-complement RSVP message checksum over all appended Class-Num / C-Type objects.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-ldp","task_type":"protocol_quickstart","protocols":["ldp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Label Distribution Protocol (`ldp`, TCP 646 (Session) / UDP 646 (transport udp Hello)).","completion":"Uses the strict-lowercase `ldp` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `646` for session messages and switches seamlessly to UDP port `646` when `transport udp` is added for link/targeted `hello` discovery.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Label Distribution Protocol (`ldp`, TCP 646 (Session) / UDP 646 (transport udp Hello))."},{"role":"assistant","content":"Uses the strict-lowercase `ldp` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `646` for session messages and switches seamlessly to UDP port `646` when `transport udp` is added for link/targeted `hello` discovery.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-bmp","task_type":"protocol_quickstart","protocols":["bmp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for BGP Monitoring Protocol v3 (`bmp`, TCP 1790).","completion":"Uses the strict-lowercase `bmp` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP `dstport 1790` and computes the 32-bit big-endian BMP `Message Length` across the 6-byte Common Header, 42-byte Per-Peer Header, and embedded BGP PDU or TLVs.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for BGP Monitoring Protocol v3 (`bmp`, TCP 1790)."},{"role":"assistant","content":"Uses the strict-lowercase `bmp` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP `dstport 1790` and computes the 32-bit big-endian BMP `Message Length` across the 6-byte Common Header, 42-byte Per-Peer Header, and embedded BGP PDU or TLVs.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-rpkirtr","task_type":"protocol_quickstart","protocols":["rpkirtr"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for RPKI-Router Origin Validation Protocol (`rpkirtr`, TCP 323).","completion":"Uses the strict-lowercase `rpkirtr` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP `dstport 323` and RFC 8210 `version 1` (including the 12 extra refresh/retry/expire interval bytes on v1 `endofdata` vs 12-byte v0 `endofdata`).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for RPKI-Router Origin Validation Protocol (`rpkirtr`, TCP 323)."},{"role":"assistant","content":"Uses the strict-lowercase `rpkirtr` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP `dstport 323` and RFC 8210 `version 1` (including the 12 extra refresh/retry/expire interval bytes on v1 `endofdata` vs 12-byte v0 `endofdata`).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-l2tp","task_type":"protocol_quickstart","protocols":["l2tp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Layer Two Tunneling Protocol v2 & v3 (`l2tp`, UDP 1701 (v2) / IP Proto 115 or transport udp (v3)).","completion":"Uses the strict-lowercase `l2tp` builder (Dual-Stack IPv4/IPv6). Uses UDP `1701` automatically for `v2` (RFC 2661, 16-bit IDs) and switches to raw IP Protocol `115` for `v3` (RFC 3931, 32-bit IDs) unless `transport udp` is specified.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Layer Two Tunneling Protocol v2 & v3 (`l2tp`, UDP 1701 (v2) / IP Proto 115 or transport udp (v3))."},{"role":"assistant","content":"Uses the strict-lowercase `l2tp` builder (Dual-Stack IPv4/IPv6). Uses UDP `1701` automatically for `v2` (RFC 2661, 16-bit IDs) and switches to raw IP Protocol `115` for `v3` (RFC 3931, 32-bit IDs) unless `transport udp` is specified.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-lisp","task_type":"protocol_quickstart","protocols":["lisp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Locator/ID Separation Protocol (Data & Control Plane) (`lisp`, UDP 4341 (Data) / UDP 4342 (Control)).","completion":"Uses the strict-lowercase `lisp` builder (Dual-Stack IPv4/IPv6). Selects UDP `dstport 4341` automatically for `lisp data` (`lisp-data` dissector) and UDP `dstport 4342` for `maprequest`, `mapreply`, `mapregister`, `mapnotify`, and `ecm` (`lisp` dissector).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Locator/ID Separation Protocol (Data & Control Plane) (`lisp`, UDP 4341 (Data) / UDP 4342 (Control))."},{"role":"assistant","content":"Uses the strict-lowercase `lisp` builder (Dual-Stack IPv4/IPv6). Selects UDP `dstport 4341` automatically for `lisp data` (`lisp-data` dissector) and UDP `dstport 4342` for `maprequest`, `mapreply`, `mapregister`, `mapnotify`, and `ecm` (`lisp` dissector).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-gtpu","task_type":"protocol_quickstart","protocols":["gtpu"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for GPRS Tunneling Protocol User Plane (4G S1-U & 5G N3/N9) (`gtpu`, UDP 2152).","completion":"Uses the strict-lowercase `gtpu` builder (Dual-Stack IPv4/IPv6). Defaults UDP `dstport` to `2152` and computes the 16-bit GTPv1-U `Length` field (bytes following the mandatory 8-byte header, including extension headers and inner G-PDU payload).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for GPRS Tunneling Protocol User Plane (4G S1-U & 5G N3/N9) (`gtpu`, UDP 2152)."},{"role":"assistant","content":"Uses the strict-lowercase `gtpu` builder (Dual-Stack IPv4/IPv6). Defaults UDP `dstport` to `2152` and computes the 16-bit GTPv1-U `Length` field (bytes following the mandatory 8-byte header, including extension headers and inner G-PDU payload).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-tcp","task_type":"protocol_quickstart","protocols":["tcp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Transmission Control Protocol & RFC 7323 Options (`tcp`, IP Proto 6 (Default dstport 80)).","completion":"Uses the strict-lowercase `tcp` builder (Dual-Stack IPv4/IPv6). Tracks 4-tuple `(src_ip, dst_ip, src_port, dst_port)` sequence state starting at `seq 1000`—advancing `seq` by `+1` for `syn`/`fin` and `+payload_len` for data without manual arithmetic.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Transmission Control Protocol & RFC 7323 Options (`tcp`, IP Proto 6 (Default dstport 80))."},{"role":"assistant","content":"Uses the strict-lowercase `tcp` builder (Dual-Stack IPv4/IPv6). Tracks 4-tuple `(src_ip, dst_ip, src_port, dst_port)` sequence state starting at `seq 1000`—advancing `seq` by `+1` for `syn`/`fin` and `+payload_len` for data without manual arithmetic.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-udp","task_type":"protocol_quickstart","protocols":["udp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for User Datagram Protocol (`udp`, IP Proto 17 (Default dstport 80)).","completion":"Uses the strict-lowercase `udp` builder (Dual-Stack IPv4/IPv6). Computes the 16-bit UDP Length (`8 + payload bytes`) and outer IPv4 Total Length / IPv6 Payload Length automatically.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for User Datagram Protocol (`udp`, IP Proto 17 (Default dstport 80))."},{"role":"assistant","content":"Uses the strict-lowercase `udp` builder (Dual-Stack IPv4/IPv6). Computes the 16-bit UDP Length (`8 + payload bytes`) and outer IPv4 Total Length / IPv6 Payload Length automatically.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-sctp","task_type":"protocol_quickstart","protocols":["sctp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Stream Control Transmission Protocol (`sctp`, IP Proto 132 (38412 NGAP / 36412 S1AP)).","completion":"Uses the strict-lowercase `sctp` builder (Dual-Stack IPv4/IPv6). Computes the 32-bit reflected Castagnoli CRC-32c checksum across the 12-byte SCTP Common Header and all padded chunk bytes.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Stream Control Transmission Protocol (`sctp`, IP Proto 132 (38412 NGAP / 36412 S1AP))."},{"role":"assistant","content":"Uses the strict-lowercase `sctp` builder (Dual-Stack IPv4/IPv6). Computes the 32-bit reflected Castagnoli CRC-32c checksum across the 12-byte SCTP Common Header and all padded chunk bytes.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-snmp1","task_type":"protocol_quickstart","protocols":["snmp1"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Simple Network Management Protocol v1 (`snmp1`, UDP/TCP 162 (trap) / 161 (get/set)).","completion":"Uses the strict-lowercase `snmp1` builder (Dual-Stack IPv4/IPv6). Selects UDP `dstport 162` automatically for `trap` (the default PDU) and UDP `161` (with `161 -> ephemeral` port reversal on `<- response`) for `get`, `getnext`, `set`, and `response`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Simple Network Management Protocol v1 (`snmp1`, UDP/TCP 162 (trap) / 161 (get/set))."},{"role":"assistant","content":"Uses the strict-lowercase `snmp1` builder (Dual-Stack IPv4/IPv6). Selects UDP `dstport 162` automatically for `trap` (the default PDU) and UDP `161` (with `161 -> ephemeral` port reversal on `<- response`) for `get`, `getnext`, `set`, and `response`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-snmp2","task_type":"protocol_quickstart","protocols":["snmp2"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Simple Network Management Protocol v2c (`snmp2`, UDP/TCP 162 (trap/inform) / 161 (get/getbulk)).","completion":"Uses the strict-lowercase `snmp2` builder (Dual-Stack IPv4/IPv6). Encodes `GetBulkRequest` (`0xa5`) overloading the BER error-status and error-index slots with `nonrepeaters` (default `0`) and `maxrepetitions` (default `10`) per RFC 3416.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Simple Network Management Protocol v2c (`snmp2`, UDP/TCP 162 (trap/inform) / 161 (get/getbulk))."},{"role":"assistant","content":"Uses the strict-lowercase `snmp2` builder (Dual-Stack IPv4/IPv6). Encodes `GetBulkRequest` (`0xa5`) overloading the BER error-status and error-index slots with `nonrepeaters` (default `0`) and `maxrepetitions` (default `10`) per RFC 3416.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-snmp3","task_type":"protocol_quickstart","protocols":["snmp3"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Simple Network Management Protocol v3 with USM Auth & Privacy (`snmp3`, UDP/TCP 162 (trap/inform/report) / 161 (get/getbulk)).","completion":"Uses the strict-lowercase `snmp3` builder (Dual-Stack IPv4/IPv6). Derives `msgFlags` automatically from provided credentials: `noAuthNoPriv` (neither set), `authNoPriv` (`auth` only), or `authPriv` (`auth` + `priv`, setting `0x03`, plus `0x04` Reportable on requests/informs).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Simple Network Management Protocol v3 with USM Auth & Privacy (`snmp3`, UDP/TCP 162 (trap/inform/report) / 161 (get/getbulk))."},{"role":"assistant","content":"Uses the strict-lowercase `snmp3` builder (Dual-Stack IPv4/IPv6). Derives `msgFlags` automatically from provided credentials: `noAuthNoPriv` (neither set), `authNoPriv` (`auth` only), or `authPriv` (`auth` + `priv`, setting `0x03`, plus `0x04` Reportable on requests/informs).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-dns","task_type":"protocol_quickstart","protocols":["dns"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Domain Name System over UDP or TCP (`dns`, UDP 53 (or TCP 53 via transport tcp)).","completion":"Uses the strict-lowercase `dns` builder (Dual-Stack IPv4/IPv6). Encodes dotted `qname` strings into RFC 1035 length-prefixed labels (`\\x03api...\\x00`) and validates RFC label (`<= 63`B) and total length (`<= 253`B) limits at compile time.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Domain Name System over UDP or TCP (`dns`, UDP 53 (or TCP 53 via transport tcp))."},{"role":"assistant","content":"Uses the strict-lowercase `dns` builder (Dual-Stack IPv4/IPv6). Encodes dotted `qname` strings into RFC 1035 length-prefixed labels (`\\x03api...\\x00`) and validates RFC label (`<= 63`B) and total length (`<= 253`B) limits at compile time.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-mdns","task_type":"protocol_quickstart","protocols":["mdns"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Multicast DNS Zero-Configuration Discovery (`mdns`, UDP 5353 -> 5353 (224.0.0.251 / ff02::fb)).","completion":"Uses the strict-lowercase `mdns` builder (Dual-Stack IPv4/IPv6). Overrides the L3 destination IP to link-local multicast `224.0.0.251` (IPv4) or `ff02::fb` (IPv6) with matching multicast Ethernet MAC (`01:00:5e:00:00:fb` / `33:33:00:00:00:fb`).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Multicast DNS Zero-Configuration Discovery (`mdns`, UDP 5353 -> 5353 (224.0.0.251 / ff02::fb))."},{"role":"assistant","content":"Uses the strict-lowercase `mdns` builder (Dual-Stack IPv4/IPv6). Overrides the L3 destination IP to link-local multicast `224.0.0.251` (IPv4) or `ff02::fb` (IPv6) with matching multicast Ethernet MAC (`01:00:5e:00:00:fb` / `33:33:00:00:00:fb`).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-dhcp","task_type":"protocol_quickstart","protocols":["dhcp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Dynamic Host Configuration Protocol — DHCPv4 & DHCPv6 (`dhcp`, UDP 68/67 (DHCPv4) · UDP 546/547 (DHCPv6)).","completion":"Uses the strict-lowercase `dhcp` builder (Dual-Stack Morphing (v4/v6)). Selects UDP `68 -> 67` for client messages (`discover`, `request`, `release`) and UDP `67 -> 68` for server messages (`offer`, `ack`) on IPv4—or UDP `546 <-> 547` on IPv6.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Dynamic Host Configuration Protocol — DHCPv4 & DHCPv6 (`dhcp`, UDP 68/67 (DHCPv4) · UDP 546/547 (DHCPv6))."},{"role":"assistant","content":"Uses the strict-lowercase `dhcp` builder (Dual-Stack Morphing (v4/v6)). Selects UDP `68 -> 67` for client messages (`discover`, `request`, `release`) and UDP `67 -> 68` for server messages (`offer`, `ack`) on IPv4—or UDP `546 <-> 547` on IPv6.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-ntp","task_type":"protocol_quickstart","protocols":["ntp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Network Time Protocol v1–v4 (`ntp`, UDP 123 (or transport tcp)).","completion":"Uses the strict-lowercase `ntp` builder (Dual-Stack IPv4/IPv6). Packs the first byte `(li << 6) | (vn << 3) | mode` cleanly (`0x23` for `li 0 vn 4 mode 3` client; `0x24` for `mode 4` server) inside a 48-byte RFC 5905 header.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Network Time Protocol v1–v4 (`ntp`, UDP 123 (or transport tcp))."},{"role":"assistant","content":"Uses the strict-lowercase `ntp` builder (Dual-Stack IPv4/IPv6). Packs the first byte `(li << 6) | (vn << 3) | mode` cleanly (`0x23` for `li 0 vn 4 mode 3` client; `0x24` for `mode 4` server) inside a 48-byte RFC 5905 header.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-ptp","task_type":"protocol_quickstart","protocols":["ptp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEEE 1588 Precision Time Protocol v2 (`ptp`, UDP 319 (Event) / UDP 320 (General)).","completion":"Uses the strict-lowercase `ptp` builder (Dual-Stack IPv4/IPv6). Routes time-critical Event messages (`sync`, `delayreq`) to UDP `319` and General messages (`followup`, `delayresp`, `announce`) to UDP `320` automatically.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEEE 1588 Precision Time Protocol v2 (`ptp`, UDP 319 (Event) / UDP 320 (General))."},{"role":"assistant","content":"Uses the strict-lowercase `ptp` builder (Dual-Stack IPv4/IPv6). Routes time-critical Event messages (`sync`, `delayreq`) to UDP `319` and General messages (`followup`, `delayresp`, `announce`) to UDP `320` automatically.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-radius","task_type":"protocol_quickstart","protocols":["radius"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Remote Authentication Dial-In User Service (Auth & Accounting) (`radius`, UDP/TCP 1812 (Auth) / 1813 (Accounting)).","completion":"Uses the strict-lowercase `radius` builder (Dual-Stack IPv4/IPv6). Picks UDP destination port `1812` for `accessrequest`, `accessaccept`, `accessreject`, and `accesschallenge`, or UDP `1813` for `accountingrequest` and `accountingresponse`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Remote Authentication Dial-In User Service (Auth & Accounting) (`radius`, UDP/TCP 1812 (Auth) / 1813 (Accounting))."},{"role":"assistant","content":"Uses the strict-lowercase `radius` builder (Dual-Stack IPv4/IPv6). Picks UDP destination port `1812` for `accessrequest`, `accessaccept`, `accessreject`, and `accesschallenge`, or UDP `1813` for `accountingrequest` and `accountingresponse`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-tacacs","task_type":"protocol_quickstart","protocols":["tacacs"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Terminal Access Controller Access-Control System Plus (`tacacs`, TCP 49).","completion":"Uses the strict-lowercase `tacacs` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `49` (`psh ack`), TACACS+ version `0xc0`, and calculates the 32-bit payload `length` field automatically.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Terminal Access Controller Access-Control System Plus (`tacacs`, TCP 49)."},{"role":"assistant","content":"Uses the strict-lowercase `tacacs` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `49` (`psh ack`), TACACS+ version `0xc0`, and calculates the 32-bit payload `length` field automatically.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-syslog","task_type":"protocol_quickstart","protocols":["syslog"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Syslog Event Logging over UDP or TCP (`syslog`, UDP 514 (or TCP 514 via transport tcp)).","completion":"Uses the strict-lowercase `syslog` builder (Dual-Stack IPv4/IPv6). Computes `<PRI> = facility * 8 + severity` automatically (default `facility 16` `local0`, `severity 6` `info` -> `<134>`).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Syslog Event Logging over UDP or TCP (`syslog`, UDP 514 (or TCP 514 via transport tcp))."},{"role":"assistant","content":"Uses the strict-lowercase `syslog` builder (Dual-Stack IPv4/IPv6). Computes `<PRI> = facility * 8 + severity` automatically (default `facility 16` `local0`, `severity 6` `info` -> `<134>`).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-netflow","task_type":"protocol_quickstart","protocols":["netflow"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Cisco NetFlow Version 5 Flow Export (`netflow`, UDP 2055).","completion":"Uses the strict-lowercase `netflow` builder (Dual-Stack IPv4/IPv6). Defaults UDP destination port to `2055` and builds the exact 24-byte NetFlow v5 header + 48-byte flow record (`72` UDP payload bytes).\n\n```frameassembly\nhost core_rtr  { ip 10.0.0.1 }\nhost collector { ip 10.0.50.20 }\n\ncompile {\n    core_rtr -> collector netflow srcip 10.10.1.25 dstip 198.51.100.40 srcport 52410 dstport 443 proto 6 packets 120 octets 164000\n}\n```","frasm_code":"host core_rtr  { ip 10.0.0.1 }\nhost collector { ip 10.0.50.20 }\n\ncompile {\n    core_rtr -> collector netflow srcip 10.10.1.25 dstip 198.51.100.40 srcport 52410 dstport 443 proto 6 packets 120 octets 164000\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Cisco NetFlow Version 5 Flow Export (`netflow`, UDP 2055)."},{"role":"assistant","content":"Uses the strict-lowercase `netflow` builder (Dual-Stack IPv4/IPv6). Defaults UDP destination port to `2055` and builds the exact 24-byte NetFlow v5 header + 48-byte flow record (`72` UDP payload bytes).\n\n```frameassembly\nhost core_rtr  { ip 10.0.0.1 }\nhost collector { ip 10.0.50.20 }\n\ncompile {\n    core_rtr -> collector netflow srcip 10.10.1.25 dstip 198.51.100.40 srcport 52410 dstport 443 proto 6 packets 120 octets 164000\n}\n```"}]}
{"id":"sft-quickstart-ipfix","task_type":"protocol_quickstart","protocols":["ipfix"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IP Flow Information Export (NetFlow v10) (`ipfix`, UDP 4739).","completion":"Uses the strict-lowercase `ipfix` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `4739` and builds the 16-byte IPFIX Version `0x000a` header with exact total message length and Observation Domain ID.\n\n```frameassembly\nhost leaf_sw   { ip 10.30.0.1 }\nhost collector { ip 10.30.0.100 }\n\ncompile {\n    leaf_sw -> collector ipfix domainid 100 srcip 10.30.10.25 dstip 198.51.100.50 srcport 51200 dstport 443 proto 6 packets 60 octets 72000\n}\n```","frasm_code":"host leaf_sw   { ip 10.30.0.1 }\nhost collector { ip 10.30.0.100 }\n\ncompile {\n    leaf_sw -> collector ipfix domainid 100 srcip 10.30.10.25 dstip 198.51.100.50 srcport 51200 dstport 443 proto 6 packets 60 octets 72000\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IP Flow Information Export (NetFlow v10) (`ipfix`, UDP 4739)."},{"role":"assistant","content":"Uses the strict-lowercase `ipfix` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `4739` and builds the 16-byte IPFIX Version `0x000a` header with exact total message length and Observation Domain ID.\n\n```frameassembly\nhost leaf_sw   { ip 10.30.0.1 }\nhost collector { ip 10.30.0.100 }\n\ncompile {\n    leaf_sw -> collector ipfix domainid 100 srcip 10.30.10.25 dstip 198.51.100.50 srcport 51200 dstport 443 proto 6 packets 60 octets 72000\n}\n```"}]}
{"id":"sft-quickstart-sflow","task_type":"protocol_quickstart","protocols":["sflow"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for sFlow Version 5 Switched & Routed Packet Sampling (`sflow`, UDP 6343).","completion":"Uses the strict-lowercase `sflow` builder (Dual-Stack IPv4/IPv6). Defaults UDP destination port to `6343` and aligns all fields to 4-byte XDR boundaries per the sFlow v5 specification.\n\n```frameassembly\nhost tor_sw01  { ip 10.40.0.11 }\nhost sflow_col { ip 10.40.0.200 }\n\ncompile {\n    tor_sw01 -> sflow_col sflow agentip 10.40.0.11 subagentid 1 seq 1 uptime 360000 samples 1\n}\n```","frasm_code":"host tor_sw01  { ip 10.40.0.11 }\nhost sflow_col { ip 10.40.0.200 }\n\ncompile {\n    tor_sw01 -> sflow_col sflow agentip 10.40.0.11 subagentid 1 seq 1 uptime 360000 samples 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for sFlow Version 5 Switched & Routed Packet Sampling (`sflow`, UDP 6343)."},{"role":"assistant","content":"Uses the strict-lowercase `sflow` builder (Dual-Stack IPv4/IPv6). Defaults UDP destination port to `6343` and aligns all fields to 4-byte XDR boundaries per the sFlow v5 specification.\n\n```frameassembly\nhost tor_sw01  { ip 10.40.0.11 }\nhost sflow_col { ip 10.40.0.200 }\n\ncompile {\n    tor_sw01 -> sflow_col sflow agentip 10.40.0.11 subagentid 1 seq 1 uptime 360000 samples 1\n}\n```"}]}
{"id":"sft-quickstart-http","task_type":"protocol_quickstart","protocols":["http"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Hypertext Transfer Protocol HTTP/1.1 (`http`, TCP 80).","completion":"Uses the strict-lowercase `http` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `80` with `psh ack` flags and advances TCP `seq` by the exact HTTP header + body byte count.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Hypertext Transfer Protocol HTTP/1.1 (`http`, TCP 80)."},{"role":"assistant","content":"Uses the strict-lowercase `http` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `80` with `psh ack` flags and advances TCP `seq` by the exact HTTP header + body byte count.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-http2","task_type":"protocol_quickstart","protocols":["http2"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Hypertext Transfer Protocol Version 2 Binary Framing (`http2`, TCP 443).","completion":"Uses the strict-lowercase `http2` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `443` (`psh ack`) and keeps TCP `seq` / `acknum` synchronized across multiplexed frames.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Hypertext Transfer Protocol Version 2 Binary Framing (`http2`, TCP 443)."},{"role":"assistant","content":"Uses the strict-lowercase `http2` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `443` (`psh ack`) and keeps TCP `seq` / `acknum` synchronized across multiplexed frames.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-grpc","task_type":"protocol_quickstart","protocols":["grpc"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for gRPC Remote Procedure Calls over HTTP/2 (`grpc`, TCP 50051).","completion":"Uses the strict-lowercase `grpc` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `50051` (`psh ack`) and formats HTTP/2 `HEADERS` (`:method POST`, `:path /<service>/<method>`, `content-type: application/grpc`).\n\n```frameassembly\nhost caller  { ip 10.42.0.15 }\nhost backend { ip 10.42.0.50 }\n\ncompile {\n    caller -> backend grpc service \"inventory.StockService\" method \"CheckItem\" wait 2ms\n    caller <- backend grpc grpcstatus 0\n}\n```","frasm_code":"host caller  { ip 10.42.0.15 }\nhost backend { ip 10.42.0.50 }\n\ncompile {\n    caller -> backend grpc service \"inventory.StockService\" method \"CheckItem\" wait 2ms\n    caller <- backend grpc grpcstatus 0\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for gRPC Remote Procedure Calls over HTTP/2 (`grpc`, TCP 50051)."},{"role":"assistant","content":"Uses the strict-lowercase `grpc` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `50051` (`psh ack`) and formats HTTP/2 `HEADERS` (`:method POST`, `:path /<service>/<method>`, `content-type: application/grpc`).\n\n```frameassembly\nhost caller  { ip 10.42.0.15 }\nhost backend { ip 10.42.0.50 }\n\ncompile {\n    caller -> backend grpc service \"inventory.StockService\" method \"CheckItem\" wait 2ms\n    caller <- backend grpc grpcstatus 0\n}\n```"}]}
{"id":"sft-quickstart-websocket","task_type":"protocol_quickstart","protocols":["websocket"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for WebSocket Framed Bidirectional Messaging (`websocket`, TCP 80).","completion":"Uses the strict-lowercase `websocket` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `80` (`psh ack`), `text` frame (`opcode 0x1`), and `finbit 1` (complete unfragmented message).\n\n```frameassembly\nhost browser { ip 10.10.2.15 }\nhost ws_srv  { ip 10.10.2.80 }\n\ncompile {\n    browser -> ws_srv websocket text maskkey 0x37fa213d payload \"{\\\"subscribe\\\":\\\"alerts\\\"}\" wait 2ms\n    browser <- ws_srv websocket text payload \"{\\\"event\\\":\\\"link_up\\\"}\"\n}\n```","frasm_code":"host browser { ip 10.10.2.15 }\nhost ws_srv  { ip 10.10.2.80 }\n\ncompile {\n    browser -> ws_srv websocket text maskkey 0x37fa213d payload \"{\\\"subscribe\\\":\\\"alerts\\\"}\" wait 2ms\n    browser <- ws_srv websocket text payload \"{\\\"event\\\":\\\"link_up\\\"}\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for WebSocket Framed Bidirectional Messaging (`websocket`, TCP 80)."},{"role":"assistant","content":"Uses the strict-lowercase `websocket` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `80` (`psh ack`), `text` frame (`opcode 0x1`), and `finbit 1` (complete unfragmented message).\n\n```frameassembly\nhost browser { ip 10.10.2.15 }\nhost ws_srv  { ip 10.10.2.80 }\n\ncompile {\n    browser -> ws_srv websocket text maskkey 0x37fa213d payload \"{\\\"subscribe\\\":\\\"alerts\\\"}\" wait 2ms\n    browser <- ws_srv websocket text payload \"{\\\"event\\\":\\\"link_up\\\"}\"\n}\n```"}]}
{"id":"sft-quickstart-tls","task_type":"protocol_quickstart","protocols":["tls"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Transport Layer Security Record & Handshake Layer (`tls`, TCP 443).","completion":"Uses the strict-lowercase `tls` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `443` (`psh ack`), TLS record version `0x0303` (RFC 8446 compatibility layer), and TLS 1.3 cipher suite `0x1301` (`TLS_AES_128_GCM_SHA256`).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Transport Layer Security Record & Handshake Layer (`tls`, TCP 443)."},{"role":"assistant","content":"Uses the strict-lowercase `tls` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `443` (`psh ack`), TLS record version `0x0303` (RFC 8446 compatibility layer), and TLS 1.3 cipher suite `0x1301` (`TLS_AES_128_GCM_SHA256`).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-quic","task_type":"protocol_quickstart","protocols":["quic"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for QUIC v1 & v2 Encrypted UDP Transport (`quic`, UDP 443).","completion":"Uses the strict-lowercase `quic` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `443`, QUIC v1 (`version 1` `0x00000001`), and sets the mandatory Fixed Bit (`0x40`) in byte 0.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for QUIC v1 & v2 Encrypted UDP Transport (`quic`, UDP 443)."},{"role":"assistant","content":"Uses the strict-lowercase `quic` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `443`, QUIC v1 (`version 1` `0x00000001`), and sets the mandatory Fixed Bit (`0x40`) in byte 0.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-ssh","task_type":"protocol_quickstart","protocols":["ssh"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Secure Shell Transport Layer Protocol (`ssh`, TCP 22).","completion":"Uses the strict-lowercase `ssh` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `22` (`psh ack`) and appends standard RFC 4253 `\r\n` terminators to `banner` strings.\n\n```frameassembly\nhost jump_box { ip 10.10.99.5 }\nhost core_sw  { ip 10.10.0.1 }\n\ncompile {\n    jump_box -> core_sw tcp syn srcport 51022 dstport 22 wait 1ms\n    jump_box <- core_sw tcp syn ack wait 1ms\n    jump_box -> core_sw tcp ack wait 1ms\n    jump_box -> core_sw ssh banner \"SSH-2.0-OpenSSH_9.7\" wait 1ms\n    jump_box <- core_sw ssh banner \"SSH-2.0-Cisco-2.0\"\n}\n```","frasm_code":"host jump_box { ip 10.10.99.5 }\nhost core_sw  { ip 10.10.0.1 }\n\ncompile {\n    jump_box -> core_sw tcp syn srcport 51022 dstport 22 wait 1ms\n    jump_box <- core_sw tcp syn ack wait 1ms\n    jump_box -> core_sw tcp ack wait 1ms\n    jump_box -> core_sw ssh banner \"SSH-2.0-OpenSSH_9.7\" wait 1ms\n    jump_box <- core_sw ssh banner \"SSH-2.0-Cisco-2.0\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Secure Shell Transport Layer Protocol (`ssh`, TCP 22)."},{"role":"assistant","content":"Uses the strict-lowercase `ssh` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `22` (`psh ack`) and appends standard RFC 4253 `\r\n` terminators to `banner` strings.\n\n```frameassembly\nhost jump_box { ip 10.10.99.5 }\nhost core_sw  { ip 10.10.0.1 }\n\ncompile {\n    jump_box -> core_sw tcp syn srcport 51022 dstport 22 wait 1ms\n    jump_box <- core_sw tcp syn ack wait 1ms\n    jump_box -> core_sw tcp ack wait 1ms\n    jump_box -> core_sw ssh banner \"SSH-2.0-OpenSSH_9.7\" wait 1ms\n    jump_box <- core_sw ssh banner \"SSH-2.0-Cisco-2.0\"\n}\n```"}]}
{"id":"sft-quickstart-telnet","task_type":"protocol_quickstart","protocols":["telnet"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Telnet Cleartext Terminal & IAC Negotiation (`telnet`, TCP 23).","completion":"Uses the strict-lowercase `telnet` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `23` (`psh ack`) and tracks TCP sequence numbers automatically.\n\n```frameassembly\nhost audit_pc  { ip 10.10.10.50 }\nhost legacy_sw { ip 10.10.10.2 }\n\ncompile {\n    audit_pc -> legacy_sw tcp syn srcport 51023 dstport 23 wait 1ms\n    audit_pc <- legacy_sw tcp syn ack wait 1ms\n    audit_pc -> legacy_sw tcp ack wait 1ms\n    audit_pc <- legacy_sw telnet will 1 do 24 data \"User Access Verification\\r\\nUsername: \" wait 3ms\n    audit_pc -> legacy_sw telnet do 1 wont 24 data \"operator\\r\\n\"\n}\n```","frasm_code":"host audit_pc  { ip 10.10.10.50 }\nhost legacy_sw { ip 10.10.10.2 }\n\ncompile {\n    audit_pc -> legacy_sw tcp syn srcport 51023 dstport 23 wait 1ms\n    audit_pc <- legacy_sw tcp syn ack wait 1ms\n    audit_pc -> legacy_sw tcp ack wait 1ms\n    audit_pc <- legacy_sw telnet will 1 do 24 data \"User Access Verification\\r\\nUsername: \" wait 3ms\n    audit_pc -> legacy_sw telnet do 1 wont 24 data \"operator\\r\\n\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Telnet Cleartext Terminal & IAC Negotiation (`telnet`, TCP 23)."},{"role":"assistant","content":"Uses the strict-lowercase `telnet` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `23` (`psh ack`) and tracks TCP sequence numbers automatically.\n\n```frameassembly\nhost audit_pc  { ip 10.10.10.50 }\nhost legacy_sw { ip 10.10.10.2 }\n\ncompile {\n    audit_pc -> legacy_sw tcp syn srcport 51023 dstport 23 wait 1ms\n    audit_pc <- legacy_sw tcp syn ack wait 1ms\n    audit_pc -> legacy_sw tcp ack wait 1ms\n    audit_pc <- legacy_sw telnet will 1 do 24 data \"User Access Verification\\r\\nUsername: \" wait 3ms\n    audit_pc -> legacy_sw telnet do 1 wont 24 data \"operator\\r\\n\"\n}\n```"}]}
{"id":"sft-quickstart-tftp","task_type":"protocol_quickstart","protocols":["tftp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Trivial File Transfer Protocol (`tftp`, UDP 69).","completion":"Uses the strict-lowercase `tftp` builder (Dual-Stack IPv4/IPv6). Defaults UDP destination port to `69` and writes NUL-terminated (`0x00`) `filename` and transfer `mode` (`\"octet\"` or `\"netascii\"`) strings on `rrq`/`wrq`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Trivial File Transfer Protocol (`tftp`, UDP 69)."},{"role":"assistant","content":"Uses the strict-lowercase `tftp` builder (Dual-Stack IPv4/IPv6). Defaults UDP destination port to `69` and writes NUL-terminated (`0x00`) `filename` and transfer `mode` (`\"octet\"` or `\"netascii\"`) strings on `rrq`/`wrq`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-ftp","task_type":"protocol_quickstart","protocols":["ftp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for File Transfer Protocol Control Channel (`ftp`, TCP 21).","completion":"Uses the strict-lowercase `ftp` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `21` (`psh ack`) and terminates every command or reply with standard `\r\n` CRLF.\n\n```frameassembly\nhost client  { ip 10.10.4.20 }\nhost ftp_srv { ip 10.10.4.21 }\n\ncompile {\n    client -> ftp_srv tcp syn srcport 51021 dstport 21 wait 1ms\n    client <- ftp_srv tcp syn ack wait 1ms\n    client -> ftp_srv tcp ack wait 1ms\n    client <- ftp_srv ftp code 220 reply \"vsFTPd 3.0.5\" wait 2ms\n    client -> ftp_srv ftp cmd \"USER\" arg \"anonymous\" wait 2ms\n    client <- ftp_srv ftp code 331 reply \"Please specify the password.\"\n}\n```","frasm_code":"host client  { ip 10.10.4.20 }\nhost ftp_srv { ip 10.10.4.21 }\n\ncompile {\n    client -> ftp_srv tcp syn srcport 51021 dstport 21 wait 1ms\n    client <- ftp_srv tcp syn ack wait 1ms\n    client -> ftp_srv tcp ack wait 1ms\n    client <- ftp_srv ftp code 220 reply \"vsFTPd 3.0.5\" wait 2ms\n    client -> ftp_srv ftp cmd \"USER\" arg \"anonymous\" wait 2ms\n    client <- ftp_srv ftp code 331 reply \"Please specify the password.\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for File Transfer Protocol Control Channel (`ftp`, TCP 21)."},{"role":"assistant","content":"Uses the strict-lowercase `ftp` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `21` (`psh ack`) and terminates every command or reply with standard `\r\n` CRLF.\n\n```frameassembly\nhost client  { ip 10.10.4.20 }\nhost ftp_srv { ip 10.10.4.21 }\n\ncompile {\n    client -> ftp_srv tcp syn srcport 51021 dstport 21 wait 1ms\n    client <- ftp_srv tcp syn ack wait 1ms\n    client -> ftp_srv tcp ack wait 1ms\n    client <- ftp_srv ftp code 220 reply \"vsFTPd 3.0.5\" wait 2ms\n    client -> ftp_srv ftp cmd \"USER\" arg \"anonymous\" wait 2ms\n    client <- ftp_srv ftp code 331 reply \"Please specify the password.\"\n}\n```"}]}
{"id":"sft-quickstart-whois","task_type":"protocol_quickstart","protocols":["whois"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for WHOIS Domain & IP Directory Query Protocol (`whois`, TCP 43).","completion":"Uses the strict-lowercase `whois` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `43` (`psh ack`) and appends `\r\n` to `domain` on `query` frames.\n\n```frameassembly\nhost soar_runner { ip 10.30.10.15 }\nhost whois_srv   { ip 199.7.51.74 }\n\ncompile {\n    soar_runner -> whois_srv tcp syn srcport 53043 dstport 43 wait 1ms\n    soar_runner <- whois_srv tcp syn ack wait 1ms\n    soar_runner -> whois_srv tcp ack wait 1ms\n    soar_runner -> whois_srv whois query domain \"example.org\" wait 3ms\n    soar_runner <- whois_srv whois response domain \"example.org\" registrar \"RESERVED-Internet Assigned Numbers Authority\"\n}\n```","frasm_code":"host soar_runner { ip 10.30.10.15 }\nhost whois_srv   { ip 199.7.51.74 }\n\ncompile {\n    soar_runner -> whois_srv tcp syn srcport 53043 dstport 43 wait 1ms\n    soar_runner <- whois_srv tcp syn ack wait 1ms\n    soar_runner -> whois_srv tcp ack wait 1ms\n    soar_runner -> whois_srv whois query domain \"example.org\" wait 3ms\n    soar_runner <- whois_srv whois response domain \"example.org\" registrar \"RESERVED-Internet Assigned Numbers Authority\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for WHOIS Domain & IP Directory Query Protocol (`whois`, TCP 43)."},{"role":"assistant","content":"Uses the strict-lowercase `whois` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `43` (`psh ack`) and appends `\r\n` to `domain` on `query` frames.\n\n```frameassembly\nhost soar_runner { ip 10.30.10.15 }\nhost whois_srv   { ip 199.7.51.74 }\n\ncompile {\n    soar_runner -> whois_srv tcp syn srcport 53043 dstport 43 wait 1ms\n    soar_runner <- whois_srv tcp syn ack wait 1ms\n    soar_runner -> whois_srv tcp ack wait 1ms\n    soar_runner -> whois_srv whois query domain \"example.org\" wait 3ms\n    soar_runner <- whois_srv whois response domain \"example.org\" registrar \"RESERVED-Internet Assigned Numbers Authority\"\n}\n```"}]}
{"id":"sft-quickstart-sip","task_type":"protocol_quickstart","protocols":["sip"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Session Initiation Protocol VoIP Signaling (`sip`, UDP 5060 (or TCP 5060 via transport tcp)).","completion":"Uses the strict-lowercase `sip` builder (Dual-Stack IPv4/IPv6). Defaults to UDP `5060` (`SIP/2.0/UDP`) or switches `Via` and Layer 4 to TCP `5060` (`SIP/2.0/TCP`) when `transport tcp` is added.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Session Initiation Protocol VoIP Signaling (`sip`, UDP 5060 (or TCP 5060 via transport tcp))."},{"role":"assistant","content":"Uses the strict-lowercase `sip` builder (Dual-Stack IPv4/IPv6). Defaults to UDP `5060` (`SIP/2.0/UDP`) or switches `Via` and Layer 4 to TCP `5060` (`SIP/2.0/TCP`) when `transport tcp` is added.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-rtp","task_type":"protocol_quickstart","protocols":["rtp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Real-time Transport Protocol Audio & Video Streams (`rtp`, UDP 5004).","completion":"Uses the strict-lowercase `rtp` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `5004` and writes RTP Version `2` (`0x80`) in the upper bits of byte 0.\n\n```frameassembly\nhost handset_a { ip 10.30.1.101 }\nhost handset_b { ip 10.30.1.102 }\n\ncompile {\n    handset_a -> handset_b rtp pt 0 seq 1 timestamp 160 ssrc 0x12345678 marker 1 dscp 46 payload \"frame-1\" wait 20ms\n    handset_a -> handset_b rtp pt 0 seq 2 timestamp 320 ssrc 0x12345678 marker 0 dscp 46 payload \"frame-2\" wait 20ms\n    handset_a -> handset_b rtp pt 0 seq 3 timestamp 480 ssrc 0x12345678 marker 0 dscp 46 payload \"frame-3\"\n}\n```","frasm_code":"host handset_a { ip 10.30.1.101 }\nhost handset_b { ip 10.30.1.102 }\n\ncompile {\n    handset_a -> handset_b rtp pt 0 seq 1 timestamp 160 ssrc 0x12345678 marker 1 dscp 46 payload \"frame-1\" wait 20ms\n    handset_a -> handset_b rtp pt 0 seq 2 timestamp 320 ssrc 0x12345678 marker 0 dscp 46 payload \"frame-2\" wait 20ms\n    handset_a -> handset_b rtp pt 0 seq 3 timestamp 480 ssrc 0x12345678 marker 0 dscp 46 payload \"frame-3\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Real-time Transport Protocol Audio & Video Streams (`rtp`, UDP 5004)."},{"role":"assistant","content":"Uses the strict-lowercase `rtp` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `5004` and writes RTP Version `2` (`0x80`) in the upper bits of byte 0.\n\n```frameassembly\nhost handset_a { ip 10.30.1.101 }\nhost handset_b { ip 10.30.1.102 }\n\ncompile {\n    handset_a -> handset_b rtp pt 0 seq 1 timestamp 160 ssrc 0x12345678 marker 1 dscp 46 payload \"frame-1\" wait 20ms\n    handset_a -> handset_b rtp pt 0 seq 2 timestamp 320 ssrc 0x12345678 marker 0 dscp 46 payload \"frame-2\" wait 20ms\n    handset_a -> handset_b rtp pt 0 seq 3 timestamp 480 ssrc 0x12345678 marker 0 dscp 46 payload \"frame-3\"\n}\n```"}]}
{"id":"sft-quickstart-rtsp","task_type":"protocol_quickstart","protocols":["rtsp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Real Time Streaming Protocol IP Camera & Media Control (`rtsp`, TCP 554 (or transport udp)).","completion":"Uses the strict-lowercase `rtsp` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `554` (`psh ack`) and writes `\r\n`-terminated `RTSP/1.0` lines with `CSeq`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Real Time Streaming Protocol IP Camera & Media Control (`rtsp`, TCP 554 (or transport udp))."},{"role":"assistant","content":"Uses the strict-lowercase `rtsp` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `554` (`psh ack`) and writes `\r\n`-terminated `RTSP/1.0` lines with `CSeq`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-stun","task_type":"protocol_quickstart","protocols":["stun"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Session Traversal Utilities for NAT (`stun`, UDP 3478).","completion":"Uses the strict-lowercase `stun` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `3478` and writes the mandatory RFC 5389 magic cookie `0x2112a442` in bytes 4..7.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Session Traversal Utilities for NAT (`stun`, UDP 3478)."},{"role":"assistant","content":"Uses the strict-lowercase `stun` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `3478` and writes the mandatory RFC 5389 magic cookie `0x2112a442` in bytes 4..7.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-ssdp","task_type":"protocol_quickstart","protocols":["ssdp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Simple Service Discovery Protocol & UPnP Multicast (`ssdp`, UDP 1900 (239.255.255.250 / ff02::c)).","completion":"Uses the strict-lowercase `ssdp` builder (Dual-Stack IPv4/IPv6). Defaults UDP destination port to `1900` and automatically derives the RFC 1112 multicast MAC `01:00:5e:7f:ff:fa` when sending to `239.255.255.250`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Simple Service Discovery Protocol & UPnP Multicast (`ssdp`, UDP 1900 (239.255.255.250 / ff02::c))."},{"role":"assistant","content":"Uses the strict-lowercase `ssdp` builder (Dual-Stack IPv4/IPv6). Defaults UDP destination port to `1900` and automatically derives the RFC 1112 multicast MAC `01:00:5e:7f:ff:fa` when sending to `239.255.255.250`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-gtpc","task_type":"protocol_quickstart","protocols":["gtpc"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for GPRS Tunneling Protocol v2 Control Plane (4G S11 / S5-C) (`gtpc`, UDP 2123).","completion":"Uses the strict-lowercase `gtpc` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `2123` (swapping ports automatically on `<-` responses) and computes the 16-bit GTPv2-C `Message Length` (excluding the initial 4 octets per 3GPP TS 29.274).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for GPRS Tunneling Protocol v2 Control Plane (4G S11 / S5-C) (`gtpc`, UDP 2123)."},{"role":"assistant","content":"Uses the strict-lowercase `gtpc` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `2123` (swapping ports automatically on `<-` responses) and computes the 16-bit GTPv2-C `Message Length` (excluding the initial 4 octets per 3GPP TS 29.274).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-pfcp","task_type":"protocol_quickstart","protocols":["pfcp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Packet Forwarding Control Protocol (5G N4 / 4G Sxa-Sxb CUPS) (`pfcp`, UDP 8805).","completion":"Uses the strict-lowercase `pfcp` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `8805` and auto-toggles the PFCP header `S` flag (`S=0` 8-byte node header on Heartbeat/Association; `S=1` 16-byte session header with 64-bit `seid` on Session messages).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Packet Forwarding Control Protocol (5G N4 / 4G Sxa-Sxb CUPS) (`pfcp`, UDP 8805)."},{"role":"assistant","content":"Uses the strict-lowercase `pfcp` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `8805` and auto-toggles the PFCP header `S` flag (`S=0` 8-byte node header on Heartbeat/Association; `S=1` 16-byte session header with 64-bit `seid` on Session messages).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-diameter","task_type":"protocol_quickstart","protocols":["diameter"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Diameter Base, Credit-Control & 3GPP S6a/Gx/Gy AAA Signaling (`diameter`, TCP 3868 (or SCTP 3868 / PPID 46 via transport sctp)).","completion":"Uses the strict-lowercase `diameter` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `3868`, or switches to SCTP port `3868` (`DATA` chunk `PPID = 46`, Castagnoli CRC-32c) when `transport sctp` is added.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Diameter Base, Credit-Control & 3GPP S6a/Gx/Gy AAA Signaling (`diameter`, TCP 3868 (or SCTP 3868 / PPID 46 via transport sctp))."},{"role":"assistant","content":"Uses the strict-lowercase `diameter` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `3868`, or switches to SCTP port `3868` (`DATA` chunk `PPID = 46`, Castagnoli CRC-32c) when `transport sctp` is added.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-ngap","task_type":"protocol_quickstart","protocols":["ngap"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for 5G Next Generation Application Protocol (N2 gNB <-> AMF over SCTP) (`ngap`, SCTP 38412 (PPID 60)).","completion":"Uses the strict-lowercase `ngap` builder (Dual-Stack IPv4/IPv6). Encapsulates every PDU inside IP Protocol `132` **SCTP (`dstport 38412`, `DATA` chunk `PPID = 60`)** with automatic Castagnoli CRC-32c and SCTP Verification Tag / TSN progression.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for 5G Next Generation Application Protocol (N2 gNB <-> AMF over SCTP) (`ngap`, SCTP 38412 (PPID 60))."},{"role":"assistant","content":"Uses the strict-lowercase `ngap` builder (Dual-Stack IPv4/IPv6). Encapsulates every PDU inside IP Protocol `132` **SCTP (`dstport 38412`, `DATA` chunk `PPID = 60`)** with automatic Castagnoli CRC-32c and SCTP Verification Tag / TSN progression.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-s1ap","task_type":"protocol_quickstart","protocols":["s1ap"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for 4G LTE S1 Application Protocol (S1-MME eNB <-> MME over SCTP) (`s1ap`, SCTP 36412 (PPID 18)).","completion":"Uses the strict-lowercase `s1ap` builder (Dual-Stack IPv4/IPv6). Wraps every S1AP message inside IP Protocol `132` **SCTP (`dstport 36412`, `DATA` chunk `PPID = 18`)** with valid Castagnoli CRC-32c.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for 4G LTE S1 Application Protocol (S1-MME eNB <-> MME over SCTP) (`s1ap`, SCTP 36412 (PPID 18))."},{"role":"assistant","content":"Uses the strict-lowercase `s1ap` builder (Dual-Stack IPv4/IPv6). Wraps every S1AP message inside IP Protocol `132` **SCTP (`dstport 36412`, `DATA` chunk `PPID = 18`)** with valid Castagnoli CRC-32c.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-smtp","task_type":"protocol_quickstart","protocols":["smtp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Simple Mail Transfer Protocol (`smtp`, TCP 25 (or dstport 587 Submission)).","completion":"Uses the strict-lowercase `smtp` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `25` (`psh ack`; use `dstport 587` for submission) and terminates SMTP lines with `\r\n`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Simple Mail Transfer Protocol (`smtp`, TCP 25 (or dstport 587 Submission))."},{"role":"assistant","content":"Uses the strict-lowercase `smtp` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `25` (`psh ack`; use `dstport 587` for submission) and terminates SMTP lines with `\r\n`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-imap","task_type":"protocol_quickstart","protocols":["imap"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Internet Message Access Protocol IMAP4rev1 (`imap`, TCP 143).","completion":"Uses the strict-lowercase `imap` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `143` (`psh ack`) and appends `\r\n` to every IMAP command or response line.\n\n```frameassembly\nhost mail_app { ip 10.20.15.30 }\nhost imap_srv { ip 10.20.15.143 }\n\ncompile {\n    mail_app -> imap_srv tcp syn srcport 51143 dstport 143 wait 1ms\n    mail_app <- imap_srv tcp syn ack wait 1ms\n    mail_app -> imap_srv tcp ack wait 1ms\n    mail_app <- imap_srv imap tag \"*\" status \"OK\" response \"Dovecot ready.\" wait 2ms\n    mail_app -> imap_srv imap tag \"A01\" cmd \"CAPABILITY\" wait 2ms\n    mail_app <- imap_srv imap tag \"A01\" status \"OK\" response \"CAPABILITY completed\"\n}\n```","frasm_code":"host mail_app { ip 10.20.15.30 }\nhost imap_srv { ip 10.20.15.143 }\n\ncompile {\n    mail_app -> imap_srv tcp syn srcport 51143 dstport 143 wait 1ms\n    mail_app <- imap_srv tcp syn ack wait 1ms\n    mail_app -> imap_srv tcp ack wait 1ms\n    mail_app <- imap_srv imap tag \"*\" status \"OK\" response \"Dovecot ready.\" wait 2ms\n    mail_app -> imap_srv imap tag \"A01\" cmd \"CAPABILITY\" wait 2ms\n    mail_app <- imap_srv imap tag \"A01\" status \"OK\" response \"CAPABILITY completed\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Internet Message Access Protocol IMAP4rev1 (`imap`, TCP 143)."},{"role":"assistant","content":"Uses the strict-lowercase `imap` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `143` (`psh ack`) and appends `\r\n` to every IMAP command or response line.\n\n```frameassembly\nhost mail_app { ip 10.20.15.30 }\nhost imap_srv { ip 10.20.15.143 }\n\ncompile {\n    mail_app -> imap_srv tcp syn srcport 51143 dstport 143 wait 1ms\n    mail_app <- imap_srv tcp syn ack wait 1ms\n    mail_app -> imap_srv tcp ack wait 1ms\n    mail_app <- imap_srv imap tag \"*\" status \"OK\" response \"Dovecot ready.\" wait 2ms\n    mail_app -> imap_srv imap tag \"A01\" cmd \"CAPABILITY\" wait 2ms\n    mail_app <- imap_srv imap tag \"A01\" status \"OK\" response \"CAPABILITY completed\"\n}\n```"}]}
{"id":"sft-quickstart-pop3","task_type":"protocol_quickstart","protocols":["pop3"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Post Office Protocol Version 3 (`pop3`, TCP 110).","completion":"Uses the strict-lowercase `pop3` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `110` (`psh ack`) and appends `\r\n` per RFC 1939.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Post Office Protocol Version 3 (`pop3`, TCP 110)."},{"role":"assistant","content":"Uses the strict-lowercase `pop3` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `110` (`psh ack`) and appends `\r\n` per RFC 1939.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-kerberos","task_type":"protocol_quickstart","protocols":["kerberos"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Kerberos Network Authentication Service v5 (Active Directory) (`kerberos`, UDP 88 (or TCP 88 via transport tcp)).","completion":"Uses the strict-lowercase `kerberos` builder (Dual-Stack IPv4/IPv6). Encodes valid ASN.1 DER RFC 4120 `APPLICATION` tags (`10` AS-REQ, `11` AS-REP, `12` TGS-REQ, `13` TGS-REP, `30` KRB-ERROR) with `pvno = 5`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Kerberos Network Authentication Service v5 (Active Directory) (`kerberos`, UDP 88 (or TCP 88 via transport tcp))."},{"role":"assistant","content":"Uses the strict-lowercase `kerberos` builder (Dual-Stack IPv4/IPv6). Encodes valid ASN.1 DER RFC 4120 `APPLICATION` tags (`10` AS-REQ, `11` AS-REP, `12` TGS-REQ, `13` TGS-REP, `30` KRB-ERROR) with `pvno = 5`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-ldap","task_type":"protocol_quickstart","protocols":["ldap"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Lightweight Directory Access Protocol v3 (ASN.1 BER) (`ldap`, TCP 389 (or CLDAP transport udp)).","completion":"Uses the strict-lowercase `ldap` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `389` (`psh ack`) and wraps every operation in an ASN.1 BER `SEQUENCE` (`0x30`) with exact definite-length tags.\n\n```frameassembly\nhost app_srv { ip 10.10.30.25 }\nhost dc01    { ip 10.10.0.10 }\n\ncompile {\n    app_srv -> dc01 tcp syn srcport 51389 dstport 389 wait 1ms\n    app_srv <- dc01 tcp syn ack wait 1ms\n    app_srv -> dc01 tcp ack wait 1ms\n    app_srv -> dc01 ldap bindreq msgid 1 basedn \"cn=svc_portal,ou=Services,dc=corp,dc=internal\" wait 2ms\n    app_srv <- dc01 ldap bindres msgid 1 resultcode 0\n}\n```","frasm_code":"host app_srv { ip 10.10.30.25 }\nhost dc01    { ip 10.10.0.10 }\n\ncompile {\n    app_srv -> dc01 tcp syn srcport 51389 dstport 389 wait 1ms\n    app_srv <- dc01 tcp syn ack wait 1ms\n    app_srv -> dc01 tcp ack wait 1ms\n    app_srv -> dc01 ldap bindreq msgid 1 basedn \"cn=svc_portal,ou=Services,dc=corp,dc=internal\" wait 2ms\n    app_srv <- dc01 ldap bindres msgid 1 resultcode 0\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Lightweight Directory Access Protocol v3 (ASN.1 BER) (`ldap`, TCP 389 (or CLDAP transport udp))."},{"role":"assistant","content":"Uses the strict-lowercase `ldap` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `389` (`psh ack`) and wraps every operation in an ASN.1 BER `SEQUENCE` (`0x30`) with exact definite-length tags.\n\n```frameassembly\nhost app_srv { ip 10.10.30.25 }\nhost dc01    { ip 10.10.0.10 }\n\ncompile {\n    app_srv -> dc01 tcp syn srcport 51389 dstport 389 wait 1ms\n    app_srv <- dc01 tcp syn ack wait 1ms\n    app_srv -> dc01 tcp ack wait 1ms\n    app_srv -> dc01 ldap bindreq msgid 1 basedn \"cn=svc_portal,ou=Services,dc=corp,dc=internal\" wait 2ms\n    app_srv <- dc01 ldap bindres msgid 1 resultcode 0\n}\n```"}]}
{"id":"sft-quickstart-smb","task_type":"protocol_quickstart","protocols":["smb"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Server Message Block SMB2 & SMB3 File Sharing (`smb`, TCP 445).","completion":"Uses the strict-lowercase `smb` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `445` (`psh ack`) and prepends the 4-byte big-endian NetBIOS Session length header (`0x00` + 24-bit size).\n\n```frameassembly\nhost client_pc { ip 10.10.20.31 }\nhost file_srv  { ip 10.10.1.45 }\n\ncompile {\n    client_pc -> file_srv tcp syn srcport 51445 dstport 445 wait 1ms\n    client_pc <- file_srv tcp syn ack wait 1ms\n    client_pc -> file_srv tcp ack wait 1ms\n    client_pc -> file_srv smb negotiate msgid 0 wait 1ms\n    client_pc <- file_srv smb negotiate msgid 0 status 0 wait 2ms\n    client_pc -> file_srv smb treeconnect sessionid 0x1001 msgid 1 share \"\\\\\\\\file_srv\\\\Engineering\"\n}\n```","frasm_code":"host client_pc { ip 10.10.20.31 }\nhost file_srv  { ip 10.10.1.45 }\n\ncompile {\n    client_pc -> file_srv tcp syn srcport 51445 dstport 445 wait 1ms\n    client_pc <- file_srv tcp syn ack wait 1ms\n    client_pc -> file_srv tcp ack wait 1ms\n    client_pc -> file_srv smb negotiate msgid 0 wait 1ms\n    client_pc <- file_srv smb negotiate msgid 0 status 0 wait 2ms\n    client_pc -> file_srv smb treeconnect sessionid 0x1001 msgid 1 share \"\\\\\\\\file_srv\\\\Engineering\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Server Message Block SMB2 & SMB3 File Sharing (`smb`, TCP 445)."},{"role":"assistant","content":"Uses the strict-lowercase `smb` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `445` (`psh ack`) and prepends the 4-byte big-endian NetBIOS Session length header (`0x00` + 24-bit size).\n\n```frameassembly\nhost client_pc { ip 10.10.20.31 }\nhost file_srv  { ip 10.10.1.45 }\n\ncompile {\n    client_pc -> file_srv tcp syn srcport 51445 dstport 445 wait 1ms\n    client_pc <- file_srv tcp syn ack wait 1ms\n    client_pc -> file_srv tcp ack wait 1ms\n    client_pc -> file_srv smb negotiate msgid 0 wait 1ms\n    client_pc <- file_srv smb negotiate msgid 0 status 0 wait 2ms\n    client_pc -> file_srv smb treeconnect sessionid 0x1001 msgid 1 share \"\\\\\\\\file_srv\\\\Engineering\"\n}\n```"}]}
{"id":"sft-quickstart-nfs","task_type":"protocol_quickstart","protocols":["nfs"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Network File System over ONC RPC (`nfs`, TCP 2049 (or UDP 2049 via transport udp)).","completion":"Uses the strict-lowercase `nfs` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `2049` (`vers 4`, RPC Program `100003`) and prepends the 4-byte ONC RPC Record Marking header (`0x80000000 | length`) over TCP (omitting it cleanly when `transport udp` is selected).\n\n```frameassembly\nhost esxi_node { ip 10.40.10.21 }\nhost nas_filer { ip 10.40.10.100 }\n\ncompile {\n    esxi_node -> nas_filer tcp syn srcport 892 dstport 2049 wait 1ms\n    esxi_node <- nas_filer tcp syn ack wait 1ms\n    esxi_node -> nas_filer tcp ack wait 1ms\n    esxi_node -> nas_filer nfs vers 4 compound xid 0x55001122 tag \"lookup-datastore\" path \"/vol/vmstore01\"\n}\n```","frasm_code":"host esxi_node { ip 10.40.10.21 }\nhost nas_filer { ip 10.40.10.100 }\n\ncompile {\n    esxi_node -> nas_filer tcp syn srcport 892 dstport 2049 wait 1ms\n    esxi_node <- nas_filer tcp syn ack wait 1ms\n    esxi_node -> nas_filer tcp ack wait 1ms\n    esxi_node -> nas_filer nfs vers 4 compound xid 0x55001122 tag \"lookup-datastore\" path \"/vol/vmstore01\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Network File System over ONC RPC (`nfs`, TCP 2049 (or UDP 2049 via transport udp))."},{"role":"assistant","content":"Uses the strict-lowercase `nfs` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `2049` (`vers 4`, RPC Program `100003`) and prepends the 4-byte ONC RPC Record Marking header (`0x80000000 | length`) over TCP (omitting it cleanly when `transport udp` is selected).\n\n```frameassembly\nhost esxi_node { ip 10.40.10.21 }\nhost nas_filer { ip 10.40.10.100 }\n\ncompile {\n    esxi_node -> nas_filer tcp syn srcport 892 dstport 2049 wait 1ms\n    esxi_node <- nas_filer tcp syn ack wait 1ms\n    esxi_node -> nas_filer tcp ack wait 1ms\n    esxi_node -> nas_filer nfs vers 4 compound xid 0x55001122 tag \"lookup-datastore\" path \"/vol/vmstore01\"\n}\n```"}]}
{"id":"sft-quickstart-iscsi","task_type":"protocol_quickstart","protocols":["iscsi"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Internet Small Computer Systems Interface Block SAN (`iscsi`, TCP 3260).","completion":"Uses the strict-lowercase `iscsi` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `3260` (`psh ack`, automatic `seq`/`acknum` progression across 48-byte BHS + padded data segments).\n\n```frameassembly\nhost esxi_host  { ip 10.70.20.11 }\nhost san_target { ip 10.70.20.50 }\n\ncompile {\n    esxi_host -> san_target tcp syn srcport 51320 dstport 3260 win 65535 mss 8960 wait 1ms\n    esxi_host <- san_target tcp syn ack win 65535 mss 8960 wait 1ms\n    esxi_host -> san_target tcp ack wait 1ms\n    esxi_host -> san_target iscsi login initiator \"iqn.2026-01.corp.vm:esxi01\" target \"iqn.2026-01.corp.san:datastore01\" itt 1 cmdsn 1 wait 2ms\n    esxi_host <- san_target iscsi response opcode 0x23 itt 1 statsn 1 status 0\n}\n```","frasm_code":"host esxi_host  { ip 10.70.20.11 }\nhost san_target { ip 10.70.20.50 }\n\ncompile {\n    esxi_host -> san_target tcp syn srcport 51320 dstport 3260 win 65535 mss 8960 wait 1ms\n    esxi_host <- san_target tcp syn ack win 65535 mss 8960 wait 1ms\n    esxi_host -> san_target tcp ack wait 1ms\n    esxi_host -> san_target iscsi login initiator \"iqn.2026-01.corp.vm:esxi01\" target \"iqn.2026-01.corp.san:datastore01\" itt 1 cmdsn 1 wait 2ms\n    esxi_host <- san_target iscsi response opcode 0x23 itt 1 statsn 1 status 0\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Internet Small Computer Systems Interface Block SAN (`iscsi`, TCP 3260)."},{"role":"assistant","content":"Uses the strict-lowercase `iscsi` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `3260` (`psh ack`, automatic `seq`/`acknum` progression across 48-byte BHS + padded data segments).\n\n```frameassembly\nhost esxi_host  { ip 10.70.20.11 }\nhost san_target { ip 10.70.20.50 }\n\ncompile {\n    esxi_host -> san_target tcp syn srcport 51320 dstport 3260 win 65535 mss 8960 wait 1ms\n    esxi_host <- san_target tcp syn ack win 65535 mss 8960 wait 1ms\n    esxi_host -> san_target tcp ack wait 1ms\n    esxi_host -> san_target iscsi login initiator \"iqn.2026-01.corp.vm:esxi01\" target \"iqn.2026-01.corp.san:datastore01\" itt 1 cmdsn 1 wait 2ms\n    esxi_host <- san_target iscsi response opcode 0x23 itt 1 statsn 1 status 0\n}\n```"}]}
{"id":"sft-quickstart-nvmetcp","task_type":"protocol_quickstart","protocols":["nvmetcp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for NVM Express over Fabrics TCP Transport (TP 8000) (`nvmetcp`, TCP 4420).","completion":"Uses the strict-lowercase `nvmetcp` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `4420` and calculates little-endian `HL` (Header Length), `PDO` (Payload Data Offset), and 32-bit `PLEN` (Total PDU Length) automatically for every PDU type.\n\n```frameassembly\nhost k8s_worker  { ip 10.80.44.11 }\nhost nvme_target { ip 10.80.44.50 }\n\ncompile {\n    k8s_worker -> nvme_target tcp syn srcport 52420 dstport 4420 win 65535 mss 8960 wait 1ms\n    k8s_worker <- nvme_target tcp syn ack win 65535 mss 8960 wait 1ms\n    k8s_worker -> nvme_target tcp ack wait 1ms\n    k8s_worker -> nvme_target nvmetcp icreq wait 1ms\n    k8s_worker <- nvme_target nvmetcp icresp wait 2ms\n    k8s_worker -> nvme_target nvmetcp read qid 1 reqid 10 nsid 1 offset 0 count 8 wait 1ms\n    k8s_worker <- nvme_target nvmetcp response qid 1 reqid 10 status 0\n}\n```","frasm_code":"host k8s_worker  { ip 10.80.44.11 }\nhost nvme_target { ip 10.80.44.50 }\n\ncompile {\n    k8s_worker -> nvme_target tcp syn srcport 52420 dstport 4420 win 65535 mss 8960 wait 1ms\n    k8s_worker <- nvme_target tcp syn ack win 65535 mss 8960 wait 1ms\n    k8s_worker -> nvme_target tcp ack wait 1ms\n    k8s_worker -> nvme_target nvmetcp icreq wait 1ms\n    k8s_worker <- nvme_target nvmetcp icresp wait 2ms\n    k8s_worker -> nvme_target nvmetcp read qid 1 reqid 10 nsid 1 offset 0 count 8 wait 1ms\n    k8s_worker <- nvme_target nvmetcp response qid 1 reqid 10 status 0\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for NVM Express over Fabrics TCP Transport (TP 8000) (`nvmetcp`, TCP 4420)."},{"role":"assistant","content":"Uses the strict-lowercase `nvmetcp` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `4420` and calculates little-endian `HL` (Header Length), `PDO` (Payload Data Offset), and 32-bit `PLEN` (Total PDU Length) automatically for every PDU type.\n\n```frameassembly\nhost k8s_worker  { ip 10.80.44.11 }\nhost nvme_target { ip 10.80.44.50 }\n\ncompile {\n    k8s_worker -> nvme_target tcp syn srcport 52420 dstport 4420 win 65535 mss 8960 wait 1ms\n    k8s_worker <- nvme_target tcp syn ack win 65535 mss 8960 wait 1ms\n    k8s_worker -> nvme_target tcp ack wait 1ms\n    k8s_worker -> nvme_target nvmetcp icreq wait 1ms\n    k8s_worker <- nvme_target nvmetcp icresp wait 2ms\n    k8s_worker -> nvme_target nvmetcp read qid 1 reqid 10 nsid 1 offset 0 count 8 wait 1ms\n    k8s_worker <- nvme_target nvmetcp response qid 1 reqid 10 status 0\n}\n```"}]}
{"id":"sft-quickstart-rocev2","task_type":"protocol_quickstart","protocols":["rocev2"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for RDMA over Converged Ethernet v2 (InfiniBand Annex A17) (`rocev2`, UDP 4791).","completion":"Uses the strict-lowercase `rocev2` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `4791` (`srcport` entropy for ECMP hashing) and writes the 12-byte InfiniBand Base Transport Header (`BTH`).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for RDMA over Converged Ethernet v2 (InfiniBand Annex A17) (`rocev2`, UDP 4791)."},{"role":"assistant","content":"Uses the strict-lowercase `rocev2` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `4791` (`srcport` entropy for ECMP hashing) and writes the 12-byte InfiniBand Base Transport Header (`BTH`).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-redis","task_type":"protocol_quickstart","protocols":["redis"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Redis Serialization Protocol Cache & Broker (`redis`, TCP 6379).","completion":"Uses the strict-lowercase `redis` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `6379` (`psh ack`) and formats exact `*N\r\n$<len>\r\n...` RESP multibulk wire arrays.\n\n```frameassembly\nhost api_pod   { ip 10.44.1.12 }\nhost redis_primary { ip 10.44.2.10 }\n\ncompile {\n    api_pod -> redis_primary tcp syn srcport 51637 dstport 6379 wait 1ms\n    api_pod <- redis_primary tcp syn ack wait 1ms\n    api_pod -> redis_primary tcp ack wait 1ms\n    api_pod -> redis_primary redis set key \"session:4821\" value \"active\" wait 1ms\n    api_pod <- redis_primary redis replytype \"ok\" value \"OK\"\n}\n```","frasm_code":"host api_pod   { ip 10.44.1.12 }\nhost redis_primary { ip 10.44.2.10 }\n\ncompile {\n    api_pod -> redis_primary tcp syn srcport 51637 dstport 6379 wait 1ms\n    api_pod <- redis_primary tcp syn ack wait 1ms\n    api_pod -> redis_primary tcp ack wait 1ms\n    api_pod -> redis_primary redis set key \"session:4821\" value \"active\" wait 1ms\n    api_pod <- redis_primary redis replytype \"ok\" value \"OK\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Redis Serialization Protocol Cache & Broker (`redis`, TCP 6379)."},{"role":"assistant","content":"Uses the strict-lowercase `redis` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `6379` (`psh ack`) and formats exact `*N\r\n$<len>\r\n...` RESP multibulk wire arrays.\n\n```frameassembly\nhost api_pod   { ip 10.44.1.12 }\nhost redis_primary { ip 10.44.2.10 }\n\ncompile {\n    api_pod -> redis_primary tcp syn srcport 51637 dstport 6379 wait 1ms\n    api_pod <- redis_primary tcp syn ack wait 1ms\n    api_pod -> redis_primary tcp ack wait 1ms\n    api_pod -> redis_primary redis set key \"session:4821\" value \"active\" wait 1ms\n    api_pod <- redis_primary redis replytype \"ok\" value \"OK\"\n}\n```"}]}
{"id":"sft-quickstart-memcached","task_type":"protocol_quickstart","protocols":["memcached"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Memcached ASCII & Binary Cache Protocol (`memcached`, UDP 11211 (or TCP 11211 via transport tcp)).","completion":"Uses the strict-lowercase `memcached` builder (Dual-Stack IPv4/IPv6). Prepends the mandatory 8-byte Memcached UDP frame header (`Request ID`, `Seq 0`, `Total Datagrams 1`, `Reserved 0`) automatically on UDP `11211`, and omits it cleanly when `transport tcp` is set.\n\n```frameassembly\nhost web_app    { ip 10.45.1.15 }\nhost cache_pool { ip 10.45.1.112 }\n\ncompile {\n    web_app -> cache_pool tcp syn srcport 51211 dstport 11211 wait 1ms\n    web_app <- cache_pool tcp syn ack wait 1ms\n    web_app -> cache_pool tcp ack wait 1ms\n    web_app -> cache_pool memcached set key \"user:profile:42\" value \"{\\\"tier\\\":\\\"pro\\\"}\" exptime 300 transport tcp\n}\n```","frasm_code":"host web_app    { ip 10.45.1.15 }\nhost cache_pool { ip 10.45.1.112 }\n\ncompile {\n    web_app -> cache_pool tcp syn srcport 51211 dstport 11211 wait 1ms\n    web_app <- cache_pool tcp syn ack wait 1ms\n    web_app -> cache_pool tcp ack wait 1ms\n    web_app -> cache_pool memcached set key \"user:profile:42\" value \"{\\\"tier\\\":\\\"pro\\\"}\" exptime 300 transport tcp\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Memcached ASCII & Binary Cache Protocol (`memcached`, UDP 11211 (or TCP 11211 via transport tcp))."},{"role":"assistant","content":"Uses the strict-lowercase `memcached` builder (Dual-Stack IPv4/IPv6). Prepends the mandatory 8-byte Memcached UDP frame header (`Request ID`, `Seq 0`, `Total Datagrams 1`, `Reserved 0`) automatically on UDP `11211`, and omits it cleanly when `transport tcp` is set.\n\n```frameassembly\nhost web_app    { ip 10.45.1.15 }\nhost cache_pool { ip 10.45.1.112 }\n\ncompile {\n    web_app -> cache_pool tcp syn srcport 51211 dstport 11211 wait 1ms\n    web_app <- cache_pool tcp syn ack wait 1ms\n    web_app -> cache_pool tcp ack wait 1ms\n    web_app -> cache_pool memcached set key \"user:profile:42\" value \"{\\\"tier\\\":\\\"pro\\\"}\" exptime 300 transport tcp\n}\n```"}]}
{"id":"sft-quickstart-mysql","task_type":"protocol_quickstart","protocols":["mysql"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for MySQL & MariaDB Wire Protocol v10 (`mysql`, TCP 3306).","completion":"Uses the strict-lowercase `mysql` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `3306` (`psh ack`) and computes the 3-byte little-endian MySQL packet length automatically.\n\n```frameassembly\nhost app_srv  { ip 10.50.1.20 }\nhost mysql_db { ip 10.50.2.33 }\n\ncompile {\n    app_srv -> mysql_db tcp syn srcport 53306 dstport 3306 wait 1ms\n    app_srv <- mysql_db tcp syn ack wait 1ms\n    app_srv -> mysql_db tcp ack wait 1ms\n    app_srv <- mysql_db mysql greeting serverversion \"8.0.36\" wait 2ms\n    app_srv -> mysql_db mysql login user \"app_rw\" db \"orders\" wait 2ms\n    app_srv <- mysql_db mysql ok\n}\n```","frasm_code":"host app_srv  { ip 10.50.1.20 }\nhost mysql_db { ip 10.50.2.33 }\n\ncompile {\n    app_srv -> mysql_db tcp syn srcport 53306 dstport 3306 wait 1ms\n    app_srv <- mysql_db tcp syn ack wait 1ms\n    app_srv -> mysql_db tcp ack wait 1ms\n    app_srv <- mysql_db mysql greeting serverversion \"8.0.36\" wait 2ms\n    app_srv -> mysql_db mysql login user \"app_rw\" db \"orders\" wait 2ms\n    app_srv <- mysql_db mysql ok\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for MySQL & MariaDB Wire Protocol v10 (`mysql`, TCP 3306)."},{"role":"assistant","content":"Uses the strict-lowercase `mysql` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `3306` (`psh ack`) and computes the 3-byte little-endian MySQL packet length automatically.\n\n```frameassembly\nhost app_srv  { ip 10.50.1.20 }\nhost mysql_db { ip 10.50.2.33 }\n\ncompile {\n    app_srv -> mysql_db tcp syn srcport 53306 dstport 3306 wait 1ms\n    app_srv <- mysql_db tcp syn ack wait 1ms\n    app_srv -> mysql_db tcp ack wait 1ms\n    app_srv <- mysql_db mysql greeting serverversion \"8.0.36\" wait 2ms\n    app_srv -> mysql_db mysql login user \"app_rw\" db \"orders\" wait 2ms\n    app_srv <- mysql_db mysql ok\n}\n```"}]}
{"id":"sft-quickstart-postgres","task_type":"protocol_quickstart","protocols":["postgres"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for PostgreSQL Frontend/Backend Wire Protocol v3.0 (`postgres`, TCP 5432).","completion":"Uses the strict-lowercase `postgres` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `5432` (`psh ack`) and writes Protocol Version `3.0` (`0x00030000`) inside `startup` frames.\n\n```frameassembly\nhost app_pod { ip 10.50.10.12 }\nhost pg_db   { ip 10.50.20.54 }\n\ncompile {\n    app_pod -> pg_db tcp syn srcport 55432 dstport 5432 wait 1ms\n    app_pod <- pg_db tcp syn ack wait 1ms\n    app_pod -> pg_db tcp ack wait 1ms\n    app_pod -> pg_db postgres startup user \"app_ro\" db \"inventory\" wait 2ms\n    app_pod <- pg_db postgres authok wait 1ms\n    app_pod <- pg_db postgres readyforquery wait 2ms\n    app_pod -> pg_db postgres query sql \"SELECT sku, qty FROM stock WHERE qty < 10;\"\n}\n```","frasm_code":"host app_pod { ip 10.50.10.12 }\nhost pg_db   { ip 10.50.20.54 }\n\ncompile {\n    app_pod -> pg_db tcp syn srcport 55432 dstport 5432 wait 1ms\n    app_pod <- pg_db tcp syn ack wait 1ms\n    app_pod -> pg_db tcp ack wait 1ms\n    app_pod -> pg_db postgres startup user \"app_ro\" db \"inventory\" wait 2ms\n    app_pod <- pg_db postgres authok wait 1ms\n    app_pod <- pg_db postgres readyforquery wait 2ms\n    app_pod -> pg_db postgres query sql \"SELECT sku, qty FROM stock WHERE qty < 10;\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for PostgreSQL Frontend/Backend Wire Protocol v3.0 (`postgres`, TCP 5432)."},{"role":"assistant","content":"Uses the strict-lowercase `postgres` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `5432` (`psh ack`) and writes Protocol Version `3.0` (`0x00030000`) inside `startup` frames.\n\n```frameassembly\nhost app_pod { ip 10.50.10.12 }\nhost pg_db   { ip 10.50.20.54 }\n\ncompile {\n    app_pod -> pg_db tcp syn srcport 55432 dstport 5432 wait 1ms\n    app_pod <- pg_db tcp syn ack wait 1ms\n    app_pod -> pg_db tcp ack wait 1ms\n    app_pod -> pg_db postgres startup user \"app_ro\" db \"inventory\" wait 2ms\n    app_pod <- pg_db postgres authok wait 1ms\n    app_pod <- pg_db postgres readyforquery wait 2ms\n    app_pod -> pg_db postgres query sql \"SELECT sku, qty FROM stock WHERE qty < 10;\"\n}\n```"}]}
{"id":"sft-quickstart-mqtt","task_type":"protocol_quickstart","protocols":["mqtt"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Message Queuing Telemetry Transport (IoT & IIoT) (`mqtt`, TCP 1883 (or transport udp)).","completion":"Uses the strict-lowercase `mqtt` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `1883` (`psh ack`) and encodes the multi-byte variable-length `Remaining Length` field per OASIS MQTT §2.2.3.\n\n```frameassembly\nhost edge_gw { ip 10.60.10.25 }\nhost broker  { ip 10.60.10.10 }\n\ncompile {\n    edge_gw -> broker tcp syn srcport 51883 dstport 1883 wait 1ms\n    edge_gw <- broker tcp syn ack wait 1ms\n    edge_gw -> broker tcp ack wait 1ms\n    edge_gw -> broker mqtt connect clientid \"gw-rack04\" keepalive 60 wait 2ms\n    edge_gw <- broker mqtt connack returncode 0 wait 2ms\n    edge_gw -> broker mqtt publish topic \"dc1/rack04/kw\" qos 0 retain payload \"4.85\"\n}\n```","frasm_code":"host edge_gw { ip 10.60.10.25 }\nhost broker  { ip 10.60.10.10 }\n\ncompile {\n    edge_gw -> broker tcp syn srcport 51883 dstport 1883 wait 1ms\n    edge_gw <- broker tcp syn ack wait 1ms\n    edge_gw -> broker tcp ack wait 1ms\n    edge_gw -> broker mqtt connect clientid \"gw-rack04\" keepalive 60 wait 2ms\n    edge_gw <- broker mqtt connack returncode 0 wait 2ms\n    edge_gw -> broker mqtt publish topic \"dc1/rack04/kw\" qos 0 retain payload \"4.85\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Message Queuing Telemetry Transport (IoT & IIoT) (`mqtt`, TCP 1883 (or transport udp))."},{"role":"assistant","content":"Uses the strict-lowercase `mqtt` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `1883` (`psh ack`) and encodes the multi-byte variable-length `Remaining Length` field per OASIS MQTT §2.2.3.\n\n```frameassembly\nhost edge_gw { ip 10.60.10.25 }\nhost broker  { ip 10.60.10.10 }\n\ncompile {\n    edge_gw -> broker tcp syn srcport 51883 dstport 1883 wait 1ms\n    edge_gw <- broker tcp syn ack wait 1ms\n    edge_gw -> broker tcp ack wait 1ms\n    edge_gw -> broker mqtt connect clientid \"gw-rack04\" keepalive 60 wait 2ms\n    edge_gw <- broker mqtt connack returncode 0 wait 2ms\n    edge_gw -> broker mqtt publish topic \"dc1/rack04/kw\" qos 0 retain payload \"4.85\"\n}\n```"}]}
{"id":"sft-quickstart-coap","task_type":"protocol_quickstart","protocols":["coap"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Constrained Application Protocol (`coap`, UDP 5683 (or RFC 8323 transport tcp)).","completion":"Uses the strict-lowercase `coap` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `5683` and packs CoAP Version `1`, 2-bit Type, Token Length (`TKL`), 1-byte `c.dd` Code (`(class << 5) | detail`), and 16-bit `msgid`.\n\n```frameassembly\nhost sensor_01 { ip 10.70.1.50 }\nhost iot_gw    { ip 10.70.1.1 }\n\ncompile {\n    sensor_01 -> iot_gw coap con post msgid 101 token 0x4a1b uripath \"telemetry/humidity\" contentformat 50 payload \"{\\\"rh\\\":48.2}\" wait 3ms\n    sensor_01 <- iot_gw coap ack changed msgid 101 token 0x4a1b\n}\n```","frasm_code":"host sensor_01 { ip 10.70.1.50 }\nhost iot_gw    { ip 10.70.1.1 }\n\ncompile {\n    sensor_01 -> iot_gw coap con post msgid 101 token 0x4a1b uripath \"telemetry/humidity\" contentformat 50 payload \"{\\\"rh\\\":48.2}\" wait 3ms\n    sensor_01 <- iot_gw coap ack changed msgid 101 token 0x4a1b\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Constrained Application Protocol (`coap`, UDP 5683 (or RFC 8323 transport tcp))."},{"role":"assistant","content":"Uses the strict-lowercase `coap` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `5683` and packs CoAP Version `1`, 2-bit Type, Token Length (`TKL`), 1-byte `c.dd` Code (`(class << 5) | detail`), and 16-bit `msgid`.\n\n```frameassembly\nhost sensor_01 { ip 10.70.1.50 }\nhost iot_gw    { ip 10.70.1.1 }\n\ncompile {\n    sensor_01 -> iot_gw coap con post msgid 101 token 0x4a1b uripath \"telemetry/humidity\" contentformat 50 payload \"{\\\"rh\\\":48.2}\" wait 3ms\n    sensor_01 <- iot_gw coap ack changed msgid 101 token 0x4a1b\n}\n```"}]}
{"id":"sft-quickstart-amqp","task_type":"protocol_quickstart","protocols":["amqp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Advanced Message Queuing Protocol (RabbitMQ) (`amqp`, TCP 5672).","completion":"Uses the strict-lowercase `amqp` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `5672` (`psh ack`) and appends the mandatory `0xce` frame-end octet to every AMQP 0-9-1 frame.\n\n```frameassembly\nhost producer { ip 10.65.1.15 }\nhost rabbitmq { ip 10.65.1.56 }\n\ncompile {\n    producer -> rabbitmq tcp syn srcport 55672 dstport 5672 wait 1ms\n    producer <- rabbitmq tcp syn ack wait 1ms\n    producer -> rabbitmq tcp ack wait 1ms\n    producer -> rabbitmq amqp protocolheader wait 1ms\n    producer <- rabbitmq amqp connectionstart channel 0 wait 2ms\n    producer -> rabbitmq amqp basicpublish channel 1 exchange \"orders\" routingkey \"order.created\" payload \"{\\\"id\\\":901}\"\n}\n```","frasm_code":"host producer { ip 10.65.1.15 }\nhost rabbitmq { ip 10.65.1.56 }\n\ncompile {\n    producer -> rabbitmq tcp syn srcport 55672 dstport 5672 wait 1ms\n    producer <- rabbitmq tcp syn ack wait 1ms\n    producer -> rabbitmq tcp ack wait 1ms\n    producer -> rabbitmq amqp protocolheader wait 1ms\n    producer <- rabbitmq amqp connectionstart channel 0 wait 2ms\n    producer -> rabbitmq amqp basicpublish channel 1 exchange \"orders\" routingkey \"order.created\" payload \"{\\\"id\\\":901}\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Advanced Message Queuing Protocol (RabbitMQ) (`amqp`, TCP 5672)."},{"role":"assistant","content":"Uses the strict-lowercase `amqp` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `5672` (`psh ack`) and appends the mandatory `0xce` frame-end octet to every AMQP 0-9-1 frame.\n\n```frameassembly\nhost producer { ip 10.65.1.15 }\nhost rabbitmq { ip 10.65.1.56 }\n\ncompile {\n    producer -> rabbitmq tcp syn srcport 55672 dstport 5672 wait 1ms\n    producer <- rabbitmq tcp syn ack wait 1ms\n    producer -> rabbitmq tcp ack wait 1ms\n    producer -> rabbitmq amqp protocolheader wait 1ms\n    producer <- rabbitmq amqp connectionstart channel 0 wait 2ms\n    producer -> rabbitmq amqp basicpublish channel 1 exchange \"orders\" routingkey \"order.created\" payload \"{\\\"id\\\":901}\"\n}\n```"}]}
{"id":"sft-quickstart-modbus","task_type":"protocol_quickstart","protocols":["modbus"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Modbus TCP / UDP Industrial Application Protocol (`modbus`, TCP 502 (or UDP 502 via transport udp)).","completion":"Uses the strict-lowercase `modbus` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `502` (`psh ack`), Protocol ID `0`, `unitid 1`, and computes the 16-bit MBAP `Length` (`unitid + PDU bytes`) automatically.\n\n```frameassembly\nhost scada_hmi { ip 192.168.100.10 }\nhost plc_pump1 { ip 192.168.100.50 }\n\ncompile {\n    scada_hmi -> plc_pump1 tcp syn srcport 50502 dstport 502 wait 1ms\n    scada_hmi <- plc_pump1 tcp syn ack wait 1ms\n    scada_hmi -> plc_pump1 tcp ack wait 1ms\n    scada_hmi -> plc_pump1 modbus readholdingregisters txid 1 unitid 1 addr 100 count 2 wait 3ms\n    scada_hmi <- plc_pump1 modbus readholdingregisters txid 1 unitid 1 count 2 value 1500 isresponse\n}\n```","frasm_code":"host scada_hmi { ip 192.168.100.10 }\nhost plc_pump1 { ip 192.168.100.50 }\n\ncompile {\n    scada_hmi -> plc_pump1 tcp syn srcport 50502 dstport 502 wait 1ms\n    scada_hmi <- plc_pump1 tcp syn ack wait 1ms\n    scada_hmi -> plc_pump1 tcp ack wait 1ms\n    scada_hmi -> plc_pump1 modbus readholdingregisters txid 1 unitid 1 addr 100 count 2 wait 3ms\n    scada_hmi <- plc_pump1 modbus readholdingregisters txid 1 unitid 1 count 2 value 1500 isresponse\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Modbus TCP / UDP Industrial Application Protocol (`modbus`, TCP 502 (or UDP 502 via transport udp))."},{"role":"assistant","content":"Uses the strict-lowercase `modbus` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `502` (`psh ack`), Protocol ID `0`, `unitid 1`, and computes the 16-bit MBAP `Length` (`unitid + PDU bytes`) automatically.\n\n```frameassembly\nhost scada_hmi { ip 192.168.100.10 }\nhost plc_pump1 { ip 192.168.100.50 }\n\ncompile {\n    scada_hmi -> plc_pump1 tcp syn srcport 50502 dstport 502 wait 1ms\n    scada_hmi <- plc_pump1 tcp syn ack wait 1ms\n    scada_hmi -> plc_pump1 tcp ack wait 1ms\n    scada_hmi -> plc_pump1 modbus readholdingregisters txid 1 unitid 1 addr 100 count 2 wait 3ms\n    scada_hmi <- plc_pump1 modbus readholdingregisters txid 1 unitid 1 count 2 value 1500 isresponse\n}\n```"}]}
{"id":"sft-quickstart-bacnet","task_type":"protocol_quickstart","protocols":["bacnet"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for BACnet/IP Building Automation & Control Networks (`bacnet`, UDP 47808 (0xbac0)).","completion":"Uses the strict-lowercase `bacnet` builder (Dual-Stack IPv4/IPv6). Defaults to UDP source and destination port `47808` (`0xbac0`) and sets BVLC Function to `0x0b` (`Original-Broadcast-NPDU`) on `whois`/`iam` or `0x0a` (`Original-Unicast-NPDU`) on `readproperty`/`writeproperty`.\n\n```frameassembly\nhost bms_srv     { ip 10.80.10.10 }\nhost chiller_ahu { ip 10.80.10.55 }\n\ncompile {\n    bms_srv -> chiller_ahu bacnet whois wait 3ms\n    bms_srv <- chiller_ahu bacnet iam objecttype 8 objectinstance 1055 wait 3ms\n    bms_srv -> chiller_ahu bacnet readproperty invokeid 1 objecttype 0 objectinstance 1 propertyid 85\n}\n```","frasm_code":"host bms_srv     { ip 10.80.10.10 }\nhost chiller_ahu { ip 10.80.10.55 }\n\ncompile {\n    bms_srv -> chiller_ahu bacnet whois wait 3ms\n    bms_srv <- chiller_ahu bacnet iam objecttype 8 objectinstance 1055 wait 3ms\n    bms_srv -> chiller_ahu bacnet readproperty invokeid 1 objecttype 0 objectinstance 1 propertyid 85\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for BACnet/IP Building Automation & Control Networks (`bacnet`, UDP 47808 (0xbac0))."},{"role":"assistant","content":"Uses the strict-lowercase `bacnet` builder (Dual-Stack IPv4/IPv6). Defaults to UDP source and destination port `47808` (`0xbac0`) and sets BVLC Function to `0x0b` (`Original-Broadcast-NPDU`) on `whois`/`iam` or `0x0a` (`Original-Unicast-NPDU`) on `readproperty`/`writeproperty`.\n\n```frameassembly\nhost bms_srv     { ip 10.80.10.10 }\nhost chiller_ahu { ip 10.80.10.55 }\n\ncompile {\n    bms_srv -> chiller_ahu bacnet whois wait 3ms\n    bms_srv <- chiller_ahu bacnet iam objecttype 8 objectinstance 1055 wait 3ms\n    bms_srv -> chiller_ahu bacnet readproperty invokeid 1 objecttype 0 objectinstance 1 propertyid 85\n}\n```"}]}
{"id":"sft-quickstart-dnp3","task_type":"protocol_quickstart","protocols":["dnp3"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Distributed Network Protocol 3 (Electric & Water Utilities) (`dnp3`, TCP 20000 (or UDP 20000 via transport udp)).","completion":"Uses the strict-lowercase `dnp3` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `20000` (`transport udp` switches to UDP `20000`) and builds the `0x0564` Data Link + Transport (`FIN|FIR`) + Application headers.\n\n```frameassembly\nhost scada_master { ip 10.100.1.10 }\nhost sub_rtu_10   { ip 10.100.2.10 }\n\ncompile {\n    scada_master -> sub_rtu_10 tcp syn srcport 52000 dstport 20000 wait 1ms\n    scada_master <- sub_rtu_10 tcp syn ack wait 1ms\n    scada_master -> sub_rtu_10 tcp ack wait 1ms\n    scada_master -> sub_rtu_10 dnp3 read src 1 dst 10 group 30 variation 1 wait 3ms\n    scada_master <- sub_rtu_10 dnp3 response src 10 dst 1 group 30 variation 1\n}\n```","frasm_code":"host scada_master { ip 10.100.1.10 }\nhost sub_rtu_10   { ip 10.100.2.10 }\n\ncompile {\n    scada_master -> sub_rtu_10 tcp syn srcport 52000 dstport 20000 wait 1ms\n    scada_master <- sub_rtu_10 tcp syn ack wait 1ms\n    scada_master -> sub_rtu_10 tcp ack wait 1ms\n    scada_master -> sub_rtu_10 dnp3 read src 1 dst 10 group 30 variation 1 wait 3ms\n    scada_master <- sub_rtu_10 dnp3 response src 10 dst 1 group 30 variation 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Distributed Network Protocol 3 (Electric & Water Utilities) (`dnp3`, TCP 20000 (or UDP 20000 via transport udp))."},{"role":"assistant","content":"Uses the strict-lowercase `dnp3` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `20000` (`transport udp` switches to UDP `20000`) and builds the `0x0564` Data Link + Transport (`FIN|FIR`) + Application headers.\n\n```frameassembly\nhost scada_master { ip 10.100.1.10 }\nhost sub_rtu_10   { ip 10.100.2.10 }\n\ncompile {\n    scada_master -> sub_rtu_10 tcp syn srcport 52000 dstport 20000 wait 1ms\n    scada_master <- sub_rtu_10 tcp syn ack wait 1ms\n    scada_master -> sub_rtu_10 tcp ack wait 1ms\n    scada_master -> sub_rtu_10 dnp3 read src 1 dst 10 group 30 variation 1 wait 3ms\n    scada_master <- sub_rtu_10 dnp3 response src 10 dst 1 group 30 variation 1\n}\n```"}]}
{"id":"sft-quickstart-s7comm","task_type":"protocol_quickstart","protocols":["s7comm"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Siemens S7 Communication Protocol over ISO-on-TCP (`s7comm`, TCP 102 (ISO-on-TCP)).","completion":"Uses the strict-lowercase `s7comm` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `102` (`psh ack`) and computes the outer 4-byte TPKT (`0x03 0x00 <len>`) + 3-byte COTP DT (`0x02 0xf0 0x80`) framing automatically.\n\n```frameassembly\nhost wincc_hmi { ip 192.168.10.20 }\nhost s7_plc    { ip 192.168.10.100 }\n\ncompile {\n    wincc_hmi -> s7_plc tcp syn srcport 50102 dstport 102 wait 1ms\n    wincc_hmi <- s7_plc tcp syn ack wait 1ms\n    wincc_hmi -> s7_plc tcp ack wait 1ms\n    wincc_hmi -> s7_plc s7comm rosctr \"job\" setupcomm pduref 1 wait 2ms\n    wincc_hmi <- s7_plc s7comm rosctr \"ackdata\" setupcomm pduref 1 wait 2ms\n    wincc_hmi -> s7_plc s7comm rosctr \"job\" readvar pduref 2 area 0x84 dbnum 1 offset 0 count 4\n}\n```","frasm_code":"host wincc_hmi { ip 192.168.10.20 }\nhost s7_plc    { ip 192.168.10.100 }\n\ncompile {\n    wincc_hmi -> s7_plc tcp syn srcport 50102 dstport 102 wait 1ms\n    wincc_hmi <- s7_plc tcp syn ack wait 1ms\n    wincc_hmi -> s7_plc tcp ack wait 1ms\n    wincc_hmi -> s7_plc s7comm rosctr \"job\" setupcomm pduref 1 wait 2ms\n    wincc_hmi <- s7_plc s7comm rosctr \"ackdata\" setupcomm pduref 1 wait 2ms\n    wincc_hmi -> s7_plc s7comm rosctr \"job\" readvar pduref 2 area 0x84 dbnum 1 offset 0 count 4\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Siemens S7 Communication Protocol over ISO-on-TCP (`s7comm`, TCP 102 (ISO-on-TCP))."},{"role":"assistant","content":"Uses the strict-lowercase `s7comm` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `102` (`psh ack`) and computes the outer 4-byte TPKT (`0x03 0x00 <len>`) + 3-byte COTP DT (`0x02 0xf0 0x80`) framing automatically.\n\n```frameassembly\nhost wincc_hmi { ip 192.168.10.20 }\nhost s7_plc    { ip 192.168.10.100 }\n\ncompile {\n    wincc_hmi -> s7_plc tcp syn srcport 50102 dstport 102 wait 1ms\n    wincc_hmi <- s7_plc tcp syn ack wait 1ms\n    wincc_hmi -> s7_plc tcp ack wait 1ms\n    wincc_hmi -> s7_plc s7comm rosctr \"job\" setupcomm pduref 1 wait 2ms\n    wincc_hmi <- s7_plc s7comm rosctr \"ackdata\" setupcomm pduref 1 wait 2ms\n    wincc_hmi -> s7_plc s7comm rosctr \"job\" readvar pduref 2 area 0x84 dbnum 1 offset 0 count 4\n}\n```"}]}
{"id":"sft-quickstart-s7commplus","task_type":"protocol_quickstart","protocols":["s7commplus"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Siemens SIMATIC S7-1200 / S7-1500 S7commPlus OMS Protocol (`s7commplus`, TCP 102 (TPKT + COTP + 0x72)).","completion":"Uses the strict-lowercase `s7commplus` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `102` and prepends the 4-byte RFC 1006 `TPKT` (`03 00 <len>`) + 3-byte ISO 8073 `COTP DT Data` (`02 f0 80`) headers automatically.\n\n```frameassembly\nhost tia_portal { ip 192.168.10.20 }\nhost s7_1500    { ip 192.168.10.100 }\n\ncompile {\n    tia_portal -> s7_1500 tcp syn srcport 51102 dstport 102 wait 1ms\n    tia_portal <- s7_1500 tcp syn ack wait 1ms\n    tia_portal -> s7_1500 tcp ack wait 1ms\n    tia_portal -> s7_1500 s7commplus version 2 opcode 0x31 func \"createobject\" seqnum 1 sessionid 0 wait 2ms\n    tia_portal <- s7_1500 s7commplus version 2 isresponse func \"createobject\" seqnum 1 sessionid 0x000003e8\n}\n```","frasm_code":"host tia_portal { ip 192.168.10.20 }\nhost s7_1500    { ip 192.168.10.100 }\n\ncompile {\n    tia_portal -> s7_1500 tcp syn srcport 51102 dstport 102 wait 1ms\n    tia_portal <- s7_1500 tcp syn ack wait 1ms\n    tia_portal -> s7_1500 tcp ack wait 1ms\n    tia_portal -> s7_1500 s7commplus version 2 opcode 0x31 func \"createobject\" seqnum 1 sessionid 0 wait 2ms\n    tia_portal <- s7_1500 s7commplus version 2 isresponse func \"createobject\" seqnum 1 sessionid 0x000003e8\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Siemens SIMATIC S7-1200 / S7-1500 S7commPlus OMS Protocol (`s7commplus`, TCP 102 (TPKT + COTP + 0x72))."},{"role":"assistant","content":"Uses the strict-lowercase `s7commplus` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `102` and prepends the 4-byte RFC 1006 `TPKT` (`03 00 <len>`) + 3-byte ISO 8073 `COTP DT Data` (`02 f0 80`) headers automatically.\n\n```frameassembly\nhost tia_portal { ip 192.168.10.20 }\nhost s7_1500    { ip 192.168.10.100 }\n\ncompile {\n    tia_portal -> s7_1500 tcp syn srcport 51102 dstport 102 wait 1ms\n    tia_portal <- s7_1500 tcp syn ack wait 1ms\n    tia_portal -> s7_1500 tcp ack wait 1ms\n    tia_portal -> s7_1500 s7commplus version 2 opcode 0x31 func \"createobject\" seqnum 1 sessionid 0 wait 2ms\n    tia_portal <- s7_1500 s7commplus version 2 isresponse func \"createobject\" seqnum 1 sessionid 0x000003e8\n}\n```"}]}
{"id":"sft-quickstart-ethernetip","task_type":"protocol_quickstart","protocols":["ethernetip"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for ODVA EtherNet/IP & Common Industrial Protocol (Rockwell) (`ethernetip`, TCP 44818 (Explicit) / UDP 2222 (Implicit I/O)).","completion":"Uses the strict-lowercase `ethernetip` builder (Dual-Stack IPv4/IPv6). Selects TCP port `44818` for explicit encapsulation commands (`registersession`, `listidentity`, `sendrrdata`) and automatically switches to UDP port `2222` on `sendunitdata` or `transport udp`.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for ODVA EtherNet/IP & Common Industrial Protocol (Rockwell) (`ethernetip`, TCP 44818 (Explicit) / UDP 2222 (Implicit I/O))."},{"role":"assistant","content":"Uses the strict-lowercase `ethernetip` builder (Dual-Stack IPv4/IPv6). Selects TCP port `44818` for explicit encapsulation commands (`registersession`, `listidentity`, `sendrrdata`) and automatically switches to UDP port `2222` on `sendunitdata` or `transport udp`.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-opcua","task_type":"protocol_quickstart","protocols":["opcua"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for OPC Unified Architecture Binary TCP Protocol (`opcua`, TCP 4840).","completion":"Uses the strict-lowercase `opcua` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `4840` (`psh ack`), `msgtype \"HEL\"`, `chunktype \"F\"`, and calculates the 4-byte little-endian `MessageSize` across the entire OPC UA frame.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for OPC Unified Architecture Binary TCP Protocol (`opcua`, TCP 4840)."},{"role":"assistant","content":"Uses the strict-lowercase `opcua` builder (Dual-Stack IPv4/IPv6). Defaults to TCP destination port `4840` (`psh ack`), `msgtype \"HEL\"`, `chunktype \"F\"`, and calculates the 4-byte little-endian `MessageSize` across the entire OPC UA frame.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-iec104","task_type":"protocol_quickstart","protocols":["iec104"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEC 60870-5-104 Substation Telecontrol Over TCP/IP (`iec104`, TCP 2404).","completion":"Uses the strict-lowercase `iec104` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `2404` and formats the `0x68` Start Byte + exact `APDU Length` (`4` for U/S-frames, `4 + ASDU_len` for I-frames).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEC 60870-5-104 Substation Telecontrol Over TCP/IP (`iec104`, TCP 2404)."},{"role":"assistant","content":"Uses the strict-lowercase `iec104` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `2404` and formats the `0x68` Start Byte + exact `APDU Length` (`4` for U/S-frames, `4 + ASDU_len` for I-frames).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-mms","task_type":"protocol_quickstart","protocols":["mms"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Manufacturing Message Specification (IEC 61850 Station Bus) (`mms`, TCP 102 (TPKT + COTP + OSI Session/Pres/ACSE)).","completion":"Uses the strict-lowercase `mms` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `102` and constructs the full RFC 1006 `TPKT` + ISO 8073 `COTP DT` + ISO 8327 `Session` + ISO 8823 `Presentation` (+ `ACSE` on `init`/`initack`) stack.\n\n```frameassembly\nhost station_hmi { ip 10.61.85.10 }\nhost relay_ied01 { ip 10.61.85.51 }\n\ncompile {\n    station_hmi -> relay_ied01 tcp syn srcport 52102 dstport 102 wait 1ms\n    station_hmi <- relay_ied01 tcp syn ack wait 1ms\n    station_hmi -> relay_ied01 tcp ack wait 1ms\n    station_hmi -> relay_ied01 mms read invokeid 1 domain \"IED1LD0\" item \"MMXU1$MX$TotW\" wait 3ms\n    station_hmi <- relay_ied01 mms read isresponse invokeid 1 value 1450\n}\n```","frasm_code":"host station_hmi { ip 10.61.85.10 }\nhost relay_ied01 { ip 10.61.85.51 }\n\ncompile {\n    station_hmi -> relay_ied01 tcp syn srcport 52102 dstport 102 wait 1ms\n    station_hmi <- relay_ied01 tcp syn ack wait 1ms\n    station_hmi -> relay_ied01 tcp ack wait 1ms\n    station_hmi -> relay_ied01 mms read invokeid 1 domain \"IED1LD0\" item \"MMXU1$MX$TotW\" wait 3ms\n    station_hmi <- relay_ied01 mms read isresponse invokeid 1 value 1450\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Manufacturing Message Specification (IEC 61850 Station Bus) (`mms`, TCP 102 (TPKT + COTP + OSI Session/Pres/ACSE))."},{"role":"assistant","content":"Uses the strict-lowercase `mms` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `102` and constructs the full RFC 1006 `TPKT` + ISO 8073 `COTP DT` + ISO 8327 `Session` + ISO 8823 `Presentation` (+ `ACSE` on `init`/`initack`) stack.\n\n```frameassembly\nhost station_hmi { ip 10.61.85.10 }\nhost relay_ied01 { ip 10.61.85.51 }\n\ncompile {\n    station_hmi -> relay_ied01 tcp syn srcport 52102 dstport 102 wait 1ms\n    station_hmi <- relay_ied01 tcp syn ack wait 1ms\n    station_hmi -> relay_ied01 tcp ack wait 1ms\n    station_hmi -> relay_ied01 mms read invokeid 1 domain \"IED1LD0\" item \"MMXU1$MX$TotW\" wait 3ms\n    station_hmi <- relay_ied01 mms read isresponse invokeid 1 value 1450\n}\n```"}]}
{"id":"sft-quickstart-synchrophasor","task_type":"protocol_quickstart","protocols":["synchrophasor"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEEE C37.118.2 PMU / PDC Wide-Area Grid Synchrophasor Telemetry (`synchrophasor`, TCP 4712 (or UDP 4712/4713 via transport udp)).","completion":"Uses the strict-lowercase `synchrophasor` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `4712` (`transport udp` switches to UDP `4712`, or pair with `dstport 4713` for spontaneous UDP data streams).\n\n```frameassembly\nhost regional_pdc { ip 10.118.1.10 }\nhost sub_pmu_01   { ip 10.118.2.50 }\n\ncompile {\n    regional_pdc -> sub_pmu_01 tcp syn srcport 54712 dstport 4712 wait 1ms\n    regional_pdc <- sub_pmu_01 tcp syn ack wait 1ms\n    regional_pdc -> sub_pmu_01 tcp ack wait 1ms\n    regional_pdc -> sub_pmu_01 synchrophasor cmd \"dataon\" id 101 timestamp 1735689600 wait 3ms\n    regional_pdc <- sub_pmu_01 synchrophasor msgtype \"data\" id 101 timestamp 1735689600 fracsec 0 status 0x0000\n}\n```","frasm_code":"host regional_pdc { ip 10.118.1.10 }\nhost sub_pmu_01   { ip 10.118.2.50 }\n\ncompile {\n    regional_pdc -> sub_pmu_01 tcp syn srcport 54712 dstport 4712 wait 1ms\n    regional_pdc <- sub_pmu_01 tcp syn ack wait 1ms\n    regional_pdc -> sub_pmu_01 tcp ack wait 1ms\n    regional_pdc -> sub_pmu_01 synchrophasor cmd \"dataon\" id 101 timestamp 1735689600 wait 3ms\n    regional_pdc <- sub_pmu_01 synchrophasor msgtype \"data\" id 101 timestamp 1735689600 fracsec 0 status 0x0000\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for IEEE C37.118.2 PMU / PDC Wide-Area Grid Synchrophasor Telemetry (`synchrophasor`, TCP 4712 (or UDP 4712/4713 via transport udp))."},{"role":"assistant","content":"Uses the strict-lowercase `synchrophasor` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `4712` (`transport udp` switches to UDP `4712`, or pair with `dstport 4713` for spontaneous UDP data streams).\n\n```frameassembly\nhost regional_pdc { ip 10.118.1.10 }\nhost sub_pmu_01   { ip 10.118.2.50 }\n\ncompile {\n    regional_pdc -> sub_pmu_01 tcp syn srcport 54712 dstport 4712 wait 1ms\n    regional_pdc <- sub_pmu_01 tcp syn ack wait 1ms\n    regional_pdc -> sub_pmu_01 tcp ack wait 1ms\n    regional_pdc -> sub_pmu_01 synchrophasor cmd \"dataon\" id 101 timestamp 1735689600 wait 3ms\n    regional_pdc <- sub_pmu_01 synchrophasor msgtype \"data\" id 101 timestamp 1735689600 fracsec 0 status 0x0000\n}\n```"}]}
{"id":"sft-quickstart-hartip","task_type":"protocol_quickstart","protocols":["hartip"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Highway Addressable Remote Transducer Over IP (Process Field Instruments) (`hartip`, UDP 5094 (or TCP 5094 via transport tcp)).","completion":"Uses the strict-lowercase `hartip` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `5094` (`transport tcp` switches to stateful TCP `5094`) and computes the big-endian 16-bit `Byte Count` (including the 8-byte header) automatically.\n\n```frameassembly\nhost ams_server { ip 10.94.1.10 }\nhost whart_gw   { ip 10.94.2.50 }\n\ncompile {\n    ams_server -> whart_gw hartip init txid 1 mode 1 holdtime 60000 wait 3ms\n    ams_server <- whart_gw hartip init isresponse txid 1 status 0 mode 1 holdtime 60000 wait 5ms\n    ams_server -> whart_gw hartip msgid 3 txid 2 addr 0 cmd 1 wait 4ms\n    ams_server <- whart_gw hartip msgid 3 isresponse txid 2 status 0 addr 0 cmd 1\n}\n```","frasm_code":"host ams_server { ip 10.94.1.10 }\nhost whart_gw   { ip 10.94.2.50 }\n\ncompile {\n    ams_server -> whart_gw hartip init txid 1 mode 1 holdtime 60000 wait 3ms\n    ams_server <- whart_gw hartip init isresponse txid 1 status 0 mode 1 holdtime 60000 wait 5ms\n    ams_server -> whart_gw hartip msgid 3 txid 2 addr 0 cmd 1 wait 4ms\n    ams_server <- whart_gw hartip msgid 3 isresponse txid 2 status 0 addr 0 cmd 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Highway Addressable Remote Transducer Over IP (Process Field Instruments) (`hartip`, UDP 5094 (or TCP 5094 via transport tcp))."},{"role":"assistant","content":"Uses the strict-lowercase `hartip` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `5094` (`transport tcp` switches to stateful TCP `5094`) and computes the big-endian 16-bit `Byte Count` (including the 8-byte header) automatically.\n\n```frameassembly\nhost ams_server { ip 10.94.1.10 }\nhost whart_gw   { ip 10.94.2.50 }\n\ncompile {\n    ams_server -> whart_gw hartip init txid 1 mode 1 holdtime 60000 wait 3ms\n    ams_server <- whart_gw hartip init isresponse txid 1 status 0 mode 1 holdtime 60000 wait 5ms\n    ams_server -> whart_gw hartip msgid 3 txid 2 addr 0 cmd 1 wait 4ms\n    ams_server <- whart_gw hartip msgid 3 isresponse txid 2 status 0 addr 0 cmd 1\n}\n```"}]}
{"id":"sft-quickstart-fins","task_type":"protocol_quickstart","protocols":["fins"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Omron Factory Interface Network Service (NJ/NX/CJ/CS PLC Protocol) (`fins`, UDP 9600 (or TCP 9600 via transport tcp)).","completion":"Uses the strict-lowercase `fins` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `9600`; when `transport tcp` is specified, switches to stateful TCP `9600` and prepends the mandatory 16-byte `\"FINS\"` (`0x46494e53`, `Command = 2`, `Error = 0`) FINS/TCP wrapper.\n\n```frameassembly\nhost scada_hmi { ip 192.168.250.10 }\nhost omron_cj2 { ip 192.168.250.1 }\n\ncompile {\n    scada_hmi -> omron_cj2 fins read da1 1 sa1 10 sid 1 area \"DM\" addr 100 count 2 wait 2ms\n    scada_hmi <- omron_cj2 fins read response da1 10 sa1 1 sid 1 errcode 0x0000 value 1250\n}\n```","frasm_code":"host scada_hmi { ip 192.168.250.10 }\nhost omron_cj2 { ip 192.168.250.1 }\n\ncompile {\n    scada_hmi -> omron_cj2 fins read da1 1 sa1 10 sid 1 area \"DM\" addr 100 count 2 wait 2ms\n    scada_hmi <- omron_cj2 fins read response da1 10 sa1 1 sid 1 errcode 0x0000 value 1250\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Omron Factory Interface Network Service (NJ/NX/CJ/CS PLC Protocol) (`fins`, UDP 9600 (or TCP 9600 via transport tcp))."},{"role":"assistant","content":"Uses the strict-lowercase `fins` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `9600`; when `transport tcp` is specified, switches to stateful TCP `9600` and prepends the mandatory 16-byte `\"FINS\"` (`0x46494e53`, `Command = 2`, `Error = 0`) FINS/TCP wrapper.\n\n```frameassembly\nhost scada_hmi { ip 192.168.250.10 }\nhost omron_cj2 { ip 192.168.250.1 }\n\ncompile {\n    scada_hmi -> omron_cj2 fins read da1 1 sa1 10 sid 1 area \"DM\" addr 100 count 2 wait 2ms\n    scada_hmi <- omron_cj2 fins read response da1 10 sa1 1 sid 1 errcode 0x0000 value 1250\n}\n```"}]}
{"id":"sft-quickstart-melsec","task_type":"protocol_quickstart","protocols":["melsec"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Mitsubishi Electric MELSEC Communication Protocol (QnA / iQ-R 3E Frame) (`melsec`, TCP 5000 (or UDP 5000 via transport udp)).","completion":"Uses the strict-lowercase `melsec` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `5000` (`transport udp` switches to UDP `5000`) and writes Subheader `50 00` on requests or `d0 00` on `response`/`isresponse` frames.\n\n```frameassembly\nhost got_hmi  { ip 192.168.3.10 }\nhost iqr_plc  { ip 192.168.3.39 }\n\ncompile {\n    got_hmi -> iqr_plc tcp syn srcport 51500 dstport 5000 wait 1ms\n    got_hmi <- iqr_plc tcp syn ack wait 1ms\n    got_hmi -> iqr_plc tcp ack wait 1ms\n    got_hmi -> iqr_plc melsec read device \"D\" addr 100 count 4 wait 2ms\n    got_hmi <- iqr_plc melsec read response endcode 0x0000 value 2500\n}\n```","frasm_code":"host got_hmi  { ip 192.168.3.10 }\nhost iqr_plc  { ip 192.168.3.39 }\n\ncompile {\n    got_hmi -> iqr_plc tcp syn srcport 51500 dstport 5000 wait 1ms\n    got_hmi <- iqr_plc tcp syn ack wait 1ms\n    got_hmi -> iqr_plc tcp ack wait 1ms\n    got_hmi -> iqr_plc melsec read device \"D\" addr 100 count 4 wait 2ms\n    got_hmi <- iqr_plc melsec read response endcode 0x0000 value 2500\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Mitsubishi Electric MELSEC Communication Protocol (QnA / iQ-R 3E Frame) (`melsec`, TCP 5000 (or UDP 5000 via transport udp))."},{"role":"assistant","content":"Uses the strict-lowercase `melsec` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `5000` (`transport udp` switches to UDP `5000`) and writes Subheader `50 00` on requests or `d0 00` on `response`/`isresponse` frames.\n\n```frameassembly\nhost got_hmi  { ip 192.168.3.10 }\nhost iqr_plc  { ip 192.168.3.39 }\n\ncompile {\n    got_hmi -> iqr_plc tcp syn srcport 51500 dstport 5000 wait 1ms\n    got_hmi <- iqr_plc tcp syn ack wait 1ms\n    got_hmi -> iqr_plc tcp ack wait 1ms\n    got_hmi -> iqr_plc melsec read device \"D\" addr 100 count 4 wait 2ms\n    got_hmi <- iqr_plc melsec read response endcode 0x0000 value 2500\n}\n```"}]}
{"id":"sft-quickstart-someip","task_type":"protocol_quickstart","protocols":["someip"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Scalable service-Oriented MiddlewarE over IP & Service Discovery (`someip`, UDP 30490 (or TCP 30490 via transport tcp)).","completion":"Uses the strict-lowercase `someip` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `30490` (`transport tcp` switches to stateful TCP) and calculates the 32-bit SOME/IP `Length` field (`8 + payload_len`) automatically.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Scalable service-Oriented MiddlewarE over IP & Service Discovery (`someip`, UDP 30490 (or TCP 30490 via transport tcp))."},{"role":"assistant","content":"Uses the strict-lowercase `someip` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `30490` (`transport tcp` switches to stateful TCP) and calculates the 32-bit SOME/IP `Length` field (`8 + payload_len`) automatically.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-doip","task_type":"protocol_quickstart","protocols":["doip"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Diagnostics over Internet Protocol (Automotive UDS Transport) (`doip`, TCP 13400 (or UDP 13400 via transport udp)).","completion":"Uses the strict-lowercase `doip` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `13400` (`transport udp` switches to UDP `13400` for ISO 13400-2 vehicle discovery) and computes the 32-bit `Payload Length` automatically.\n\n```frameassembly\nhost diag_tester { ip 169.254.10.50 }\nhost veh_gateway { ip 169.254.10.1 }\n\ncompile {\n    diag_tester -> veh_gateway doip vehicleid transport udp wait 3ms\n    diag_tester <- veh_gateway doip announcement vin \"WVWZZZ1JZXW000001\" src 0x0100 eid 02:11:22:33:44:55 gid 02:11:22:33:44:55 transport udp\n}\n```","frasm_code":"host diag_tester { ip 169.254.10.50 }\nhost veh_gateway { ip 169.254.10.1 }\n\ncompile {\n    diag_tester -> veh_gateway doip vehicleid transport udp wait 3ms\n    diag_tester <- veh_gateway doip announcement vin \"WVWZZZ1JZXW000001\" src 0x0100 eid 02:11:22:33:44:55 gid 02:11:22:33:44:55 transport udp\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Diagnostics over Internet Protocol (Automotive UDS Transport) (`doip`, TCP 13400 (or UDP 13400 via transport udp))."},{"role":"assistant","content":"Uses the strict-lowercase `doip` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `13400` (`transport udp` switches to UDP `13400` for ISO 13400-2 vehicle discovery) and computes the 32-bit `Payload Length` automatically.\n\n```frameassembly\nhost diag_tester { ip 169.254.10.50 }\nhost veh_gateway { ip 169.254.10.1 }\n\ncompile {\n    diag_tester -> veh_gateway doip vehicleid transport udp wait 3ms\n    diag_tester <- veh_gateway doip announcement vin \"WVWZZZ1JZXW000001\" src 0x0100 eid 02:11:22:33:44:55 gid 02:11:22:33:44:55 transport udp\n}\n```"}]}
{"id":"sft-quickstart-c1222","task_type":"protocol_quickstart","protocols":["c1222"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for ANSI C12.22 / IEEE 1703 Smart-Meter Utility AMI Application Protocol (`c1222`, UDP 1153 (or TCP 1153 via transport tcp)).","completion":"Uses the strict-lowercase `c1222` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `1153` (`transport tcp` switches to stateful TCP `1153`) and formats the outer ASN.1 BER `0x60` (`AARE`/`AARQ` C12.22 ACSE PDU) envelope.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for ANSI C12.22 / IEEE 1703 Smart-Meter Utility AMI Application Protocol (`c1222`, UDP 1153 (or TCP 1153 via transport tcp))."},{"role":"assistant","content":"Uses the strict-lowercase `c1222` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `1153` (`transport tcp` switches to stateful TCP `1153`) and formats the outer ASN.1 BER `0x60` (`AARE`/`AARQ` C12.22 ACSE PDU) envelope.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-gesrtp","task_type":"protocol_quickstart","protocols":["gesrtp"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for General Electric / Emerson Service Request Transport Protocol (`gesrtp`, TCP 18245).","completion":"Uses the strict-lowercase `gesrtp` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `18245` (`psh ack`, automatic TCP `seq`/`acknum` across 56-byte headers).\n\n```frameassembly\nhost ifix_scada { ip 10.182.1.10 }\nhost rx3i_plc   { ip 10.182.1.50 }\n\ncompile {\n    ifix_scada -> rx3i_plc tcp syn srcport 51245 dstport 18245 wait 1ms\n    ifix_scada <- rx3i_plc tcp syn ack wait 1ms\n    ifix_scada -> rx3i_plc tcp ack wait 1ms\n    ifix_scada -> rx3i_plc gesrtp init wait 2ms\n    ifix_scada <- rx3i_plc gesrtp initack wait 3ms\n    ifix_scada -> rx3i_plc gesrtp read seqnum 1 area \"R\" addr 1 count 4 wait 2ms\n    ifix_scada <- rx3i_plc gesrtp response seqnum 1 status 0 value 750\n}\n```","frasm_code":"host ifix_scada { ip 10.182.1.10 }\nhost rx3i_plc   { ip 10.182.1.50 }\n\ncompile {\n    ifix_scada -> rx3i_plc tcp syn srcport 51245 dstport 18245 wait 1ms\n    ifix_scada <- rx3i_plc tcp syn ack wait 1ms\n    ifix_scada -> rx3i_plc tcp ack wait 1ms\n    ifix_scada -> rx3i_plc gesrtp init wait 2ms\n    ifix_scada <- rx3i_plc gesrtp initack wait 3ms\n    ifix_scada -> rx3i_plc gesrtp read seqnum 1 area \"R\" addr 1 count 4 wait 2ms\n    ifix_scada <- rx3i_plc gesrtp response seqnum 1 status 0 value 750\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for General Electric / Emerson Service Request Transport Protocol (`gesrtp`, TCP 18245)."},{"role":"assistant","content":"Uses the strict-lowercase `gesrtp` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `18245` (`psh ack`, automatic TCP `seq`/`acknum` across 56-byte headers).\n\n```frameassembly\nhost ifix_scada { ip 10.182.1.10 }\nhost rx3i_plc   { ip 10.182.1.50 }\n\ncompile {\n    ifix_scada -> rx3i_plc tcp syn srcport 51245 dstport 18245 wait 1ms\n    ifix_scada <- rx3i_plc tcp syn ack wait 1ms\n    ifix_scada -> rx3i_plc tcp ack wait 1ms\n    ifix_scada -> rx3i_plc gesrtp init wait 2ms\n    ifix_scada <- rx3i_plc gesrtp initack wait 3ms\n    ifix_scada -> rx3i_plc gesrtp read seqnum 1 area \"R\" addr 1 count 4 wait 2ms\n    ifix_scada <- rx3i_plc gesrtp response seqnum 1 status 0 value 750\n}\n```"}]}
{"id":"sft-quickstart-rocplus","task_type":"protocol_quickstart","protocols":["rocplus"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Emerson Fisher ROC Plus Oil & Gas Pipeline RTU Protocol (`rocplus`, TCP 4000 (or UDP 4000 via transport udp)).","completion":"Uses the strict-lowercase `rocplus` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `4000` (`transport udp` switches to UDP `4000`) and calculates byte 5 (`Data Length`) automatically.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Emerson Fisher ROC Plus Oil & Gas Pipeline RTU Protocol (`rocplus`, TCP 4000 (or UDP 4000 via transport udp))."},{"role":"assistant","content":"Uses the strict-lowercase `rocplus` builder (Dual-Stack IPv4/IPv6). Defaults to stateful TCP port `4000` (`transport udp` switches to UDP `4000`) and calculates byte 5 (`Data Length`) automatically.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-bsap","task_type":"protocol_quickstart","protocols":["bsap"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Emerson / Bristol Babcock Synchronous Asynchronous Protocol (BSAP/IP) (`bsap`, UDP 1234 (or TCP 1234 via transport tcp)).","completion":"Uses the strict-lowercase `bsap` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `1234` (`transport tcp` switches to stateful TCP `1234`) and calculates the BSAP/IP message length header automatically.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for Emerson / Bristol Babcock Synchronous Asynchronous Protocol (BSAP/IP) (`bsap`, UDP 1234 (or TCP 1234 via transport tcp))."},{"role":"assistant","content":"Uses the strict-lowercase `bsap` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `1234` (`transport tcp` switches to stateful TCP `1234`) and calculates the BSAP/IP message length header automatically.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-quickstart-knxnetip","task_type":"protocol_quickstart","protocols":["knxnetip"],"version":"3.3.0","license":"MIT","prompt":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for KNXnet/IP Building Automation Tunneling & Group Telegrams (`knxnetip`, UDP 3671).","completion":"Uses the strict-lowercase `knxnetip` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `3671`, writes the `06 10` (`Header Len 6, KNXnet/IP v1.0`) preamble, and computes the big-endian 16-bit `Total Length` automatically.\n\n```frameassembly\nhost bms_server { ip 192.168.50.10 }\nhost knx_gw     { ip 192.168.50.200 }\n\ncompile {\n    bms_server -> knx_gw knxnetip connect wait 2ms\n    bms_server <- knx_gw knxnetip connack channel 1 status 0 wait 4ms\n    bms_server -> knx_gw knxnetip service \"tunnelreq\" channel 1 seqnum 0 src 0x1101 dst 0x0901 write value 1 wait 2ms\n    bms_server <- knx_gw knxnetip service \"tunnelack\" channel 1 seqnum 0 status 0\n}\n```","frasm_code":"host bms_server { ip 192.168.50.10 }\nhost knx_gw     { ip 192.168.50.200 }\n\ncompile {\n    bms_server -> knx_gw knxnetip connect wait 2ms\n    bms_server <- knx_gw knxnetip connack channel 1 status 0 wait 4ms\n    bms_server -> knx_gw knxnetip service \"tunnelreq\" channel 1 seqnum 0 src 0x1101 dst 0x0901 write value 1 wait 2ms\n    bms_server <- knx_gw knxnetip service \"tunnelack\" channel 1 seqnum 0 status 0\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Write a minimal 2-block (`host` + `compile`) FrameAssembly v3.3.0 (.frasm) quickstart capture for KNXnet/IP Building Automation Tunneling & Group Telegrams (`knxnetip`, UDP 3671)."},{"role":"assistant","content":"Uses the strict-lowercase `knxnetip` builder (Dual-Stack IPv4/IPv6). Defaults to UDP destination port `3671`, writes the `06 10` (`Header Len 6, KNXnet/IP v1.0`) preamble, and computes the big-endian 16-bit `Total Length` automatically.\n\n```frameassembly\nhost bms_server { ip 192.168.50.10 }\nhost knx_gw     { ip 192.168.50.200 }\n\ncompile {\n    bms_server -> knx_gw knxnetip connect wait 2ms\n    bms_server <- knx_gw knxnetip connack channel 1 status 0 wait 4ms\n    bms_server -> knx_gw knxnetip service \"tunnelreq\" channel 1 seqnum 0 src 0x1101 dst 0x0901 write value 1 wait 2ms\n    bms_server <- knx_gw knxnetip service \"tunnelack\" channel 1 seqnum 0 status 0\n}\n```"}]}
{"id":"sft-reverse-ex-l2-mac-only-lldp-rstp-lacp","task_type":"reverse_decompile","protocols":["lldp","stp","lacp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: MAC 001c.73aa.0001 -> MAC 001c.73bb.0001 | lldp chassisid \"leaf-sw1\" portid \"Ethernet49/1\" ttl 120 sysname \"leaf-sw1.dc1\"\nFrame 2 [t=0.002000000s]: MAC 001c.73bb.0001 -> MAC 001c.73aa.0001 | stp rstp rootid \"32768:00:1c:73:bb:00:01\" bridgeid \"32768:00:1c:73:bb:00:01\" portid 0x8001 cost 2000 hellotime 2\nFrame 3 [t=0.004000000s]: MAC 001c.73aa.0001 -> MAC 001c.73bb.0001 | lacp actorsys 00:1c:73:aa:00:01 actorkey 10 actorport 49 partnersys 00:1c:73:bb:00:01 partnerkey 10 partnerport 1\n```","completion":"Reconstructs the 3-frame capture (`lldp`, `stp`, `lacp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost leaf_sw1  { mac 001c.73aa.0001 }\nhost spine_sw1 { mac 001c.73bb.0001 }\n\ncompile {\n    leaf_sw1 -> spine_sw1 lldp chassisid \"leaf-sw1\" portid \"Ethernet49/1\" ttl 120 sysname \"leaf-sw1.dc1\" wait 2ms\n    spine_sw1 -> leaf_sw1 stp rstp rootid \"32768:00:1c:73:bb:00:01\" bridgeid \"32768:00:1c:73:bb:00:01\" portid 0x8001 cost 2000 hellotime 2 wait 2ms\n    leaf_sw1 -> spine_sw1 lacp actorsys 00:1c:73:aa:00:01 actorkey 10 actorport 49 partnersys 00:1c:73:bb:00:01 partnerkey 10 partnerport 1\n}\n```","frasm_code":"host leaf_sw1  { mac 001c.73aa.0001 }\nhost spine_sw1 { mac 001c.73bb.0001 }\n\ncompile {\n    leaf_sw1 -> spine_sw1 lldp chassisid \"leaf-sw1\" portid \"Ethernet49/1\" ttl 120 sysname \"leaf-sw1.dc1\" wait 2ms\n    spine_sw1 -> leaf_sw1 stp rstp rootid \"32768:00:1c:73:bb:00:01\" bridgeid \"32768:00:1c:73:bb:00:01\" portid 0x8001 cost 2000 hellotime 2 wait 2ms\n    leaf_sw1 -> spine_sw1 lacp actorsys 00:1c:73:aa:00:01 actorkey 10 actorport 49 partnersys 00:1c:73:bb:00:01 partnerkey 10 partnerport 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: MAC 001c.73aa.0001 -> MAC 001c.73bb.0001 | lldp chassisid \"leaf-sw1\" portid \"Ethernet49/1\" ttl 120 sysname \"leaf-sw1.dc1\"\nFrame 2 [t=0.002000000s]: MAC 001c.73bb.0001 -> MAC 001c.73aa.0001 | stp rstp rootid \"32768:00:1c:73:bb:00:01\" bridgeid \"32768:00:1c:73:bb:00:01\" portid 0x8001 cost 2000 hellotime 2\nFrame 3 [t=0.004000000s]: MAC 001c.73aa.0001 -> MAC 001c.73bb.0001 | lacp actorsys 00:1c:73:aa:00:01 actorkey 10 actorport 49 partnersys 00:1c:73:bb:00:01 partnerkey 10 partnerport 1\n```"},{"role":"assistant","content":"Reconstructs the 3-frame capture (`lldp`, `stp`, `lacp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost leaf_sw1  { mac 001c.73aa.0001 }\nhost spine_sw1 { mac 001c.73bb.0001 }\n\ncompile {\n    leaf_sw1 -> spine_sw1 lldp chassisid \"leaf-sw1\" portid \"Ethernet49/1\" ttl 120 sysname \"leaf-sw1.dc1\" wait 2ms\n    spine_sw1 -> leaf_sw1 stp rstp rootid \"32768:00:1c:73:bb:00:01\" bridgeid \"32768:00:1c:73:bb:00:01\" portid 0x8001 cost 2000 hellotime 2 wait 2ms\n    leaf_sw1 -> spine_sw1 lacp actorsys 00:1c:73:aa:00:01 actorkey 10 actorport 49 partnersys 00:1c:73:bb:00:01 partnerkey 10 partnerport 1\n}\n```"}]}
{"id":"sft-reverse-ex-l2-eapol-8021x-onboarding","task_type":"reverse_decompile","protocols":["eapol"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: MAC 00:24:9b:11:22:33 -> MAC 00:1c:73:00:10:01 | eapol version 2 start\nFrame 2 [t=0.003000000s]: MAC 00:1c:73:00:10:01 -> MAC 00:24:9b:11:22:33 | eapol version 2 eappacket eapcode 1 eapid 1 eapmethod 1\nFrame 3 [t=0.005000000s]: MAC 00:24:9b:11:22:33 -> MAC 00:1c:73:00:10:01 | eapol version 2 eappacket eapcode 2 eapid 1 eapmethod 1 identity \"host/wkstn-42.corp.internal\"\nFrame 4 [t=0.013000000s]: MAC 00:1c:73:00:10:01 -> MAC 00:24:9b:11:22:33 | eapol version 2 eappacket eapcode 3 eapid 1\nFrame 5 [t=0.015000000s]: MAC 00:1c:73:00:10:01 -> MAC 00:24:9b:11:22:33 | eapol version 2 key\n```","completion":"Reconstructs the 5-frame capture (`eapol`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost corp_laptop { mac 00:24:9b:11:22:33 }\nhost access_sw   { mac 00:1c:73:00:10:01 }\n\ncompile {\n    corp_laptop -> access_sw eapol version 2 start wait 3ms\n    corp_laptop <- access_sw eapol version 2 eappacket eapcode 1 eapid 1 eapmethod 1 wait 2ms\n    corp_laptop -> access_sw eapol version 2 eappacket eapcode 2 eapid 1 eapmethod 1 identity \"host/wkstn-42.corp.internal\" wait 8ms\n    corp_laptop <- access_sw eapol version 2 eappacket eapcode 3 eapid 1 wait 2ms\n    corp_laptop <- access_sw eapol version 2 key\n}\n```","frasm_code":"host corp_laptop { mac 00:24:9b:11:22:33 }\nhost access_sw   { mac 00:1c:73:00:10:01 }\n\ncompile {\n    corp_laptop -> access_sw eapol version 2 start wait 3ms\n    corp_laptop <- access_sw eapol version 2 eappacket eapcode 1 eapid 1 eapmethod 1 wait 2ms\n    corp_laptop -> access_sw eapol version 2 eappacket eapcode 2 eapid 1 eapmethod 1 identity \"host/wkstn-42.corp.internal\" wait 8ms\n    corp_laptop <- access_sw eapol version 2 eappacket eapcode 3 eapid 1 wait 2ms\n    corp_laptop <- access_sw eapol version 2 key\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: MAC 00:24:9b:11:22:33 -> MAC 00:1c:73:00:10:01 | eapol version 2 start\nFrame 2 [t=0.003000000s]: MAC 00:1c:73:00:10:01 -> MAC 00:24:9b:11:22:33 | eapol version 2 eappacket eapcode 1 eapid 1 eapmethod 1\nFrame 3 [t=0.005000000s]: MAC 00:24:9b:11:22:33 -> MAC 00:1c:73:00:10:01 | eapol version 2 eappacket eapcode 2 eapid 1 eapmethod 1 identity \"host/wkstn-42.corp.internal\"\nFrame 4 [t=0.013000000s]: MAC 00:1c:73:00:10:01 -> MAC 00:24:9b:11:22:33 | eapol version 2 eappacket eapcode 3 eapid 1\nFrame 5 [t=0.015000000s]: MAC 00:1c:73:00:10:01 -> MAC 00:24:9b:11:22:33 | eapol version 2 key\n```"},{"role":"assistant","content":"Reconstructs the 5-frame capture (`eapol`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost corp_laptop { mac 00:24:9b:11:22:33 }\nhost access_sw   { mac 00:1c:73:00:10:01 }\n\ncompile {\n    corp_laptop -> access_sw eapol version 2 start wait 3ms\n    corp_laptop <- access_sw eapol version 2 eappacket eapcode 1 eapid 1 eapmethod 1 wait 2ms\n    corp_laptop -> access_sw eapol version 2 eappacket eapcode 2 eapid 1 eapmethod 1 identity \"host/wkstn-42.corp.internal\" wait 8ms\n    corp_laptop <- access_sw eapol version 2 eappacket eapcode 3 eapid 1 wait 2ms\n    corp_laptop <- access_sw eapol version 2 key\n}\n```"}]}
{"id":"sft-reverse-ex-l2-mpls-exp-qos-ping","task_type":"reverse_decompile","protocols":["mpls","icmp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.254.0.1 (00:1c:73:10:00:01) -> 10.254.0.2 (00:1c:73:20:00:02) | mpls 16040 exp 5 bos 1 mplsttl 64 icmp echorequest id 0x0901 seq 1\nFrame 2 [t=0.004000000s]: 10.254.0.2 (00:1c:73:20:00:02) -> 10.254.0.1 (00:1c:73:10:00:01) | mpls 24010 exp 5 bos 1 mplsttl 63 icmp echoreply id 0x0901 seq 1\n```","completion":"Reconstructs the 2-frame capture (`mpls`, `icmp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost pe_west { ip 10.254.0.1 mac 00:1c:73:10:00:01 }\nhost pe_east { ip 10.254.0.2 mac 00:1c:73:20:00:02 }\n\ncompile {\n    pe_west -> pe_east mpls 16040 exp 5 bos 1 mplsttl 64 icmp echorequest id 0x0901 seq 1 wait 4ms\n    pe_west <- pe_east mpls 24010 exp 5 bos 1 mplsttl 63 icmp echoreply id 0x0901 seq 1\n}\n```","frasm_code":"host pe_west { ip 10.254.0.1 mac 00:1c:73:10:00:01 }\nhost pe_east { ip 10.254.0.2 mac 00:1c:73:20:00:02 }\n\ncompile {\n    pe_west -> pe_east mpls 16040 exp 5 bos 1 mplsttl 64 icmp echorequest id 0x0901 seq 1 wait 4ms\n    pe_west <- pe_east mpls 24010 exp 5 bos 1 mplsttl 63 icmp echoreply id 0x0901 seq 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.254.0.1 (00:1c:73:10:00:01) -> 10.254.0.2 (00:1c:73:20:00:02) | mpls 16040 exp 5 bos 1 mplsttl 64 icmp echorequest id 0x0901 seq 1\nFrame 2 [t=0.004000000s]: 10.254.0.2 (00:1c:73:20:00:02) -> 10.254.0.1 (00:1c:73:10:00:01) | mpls 24010 exp 5 bos 1 mplsttl 63 icmp echoreply id 0x0901 seq 1\n```"},{"role":"assistant","content":"Reconstructs the 2-frame capture (`mpls`, `icmp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost pe_west { ip 10.254.0.1 mac 00:1c:73:10:00:01 }\nhost pe_east { ip 10.254.0.2 mac 00:1c:73:20:00:02 }\n\ncompile {\n    pe_west -> pe_east mpls 16040 exp 5 bos 1 mplsttl 64 icmp echorequest id 0x0901 seq 1 wait 4ms\n    pe_west <- pe_east mpls 24010 exp 5 bos 1 mplsttl 63 icmp echoreply id 0x0901 seq 1\n}\n```"}]}
{"id":"sft-reverse-lib-scan-arp-lan-sweep","task_type":"reverse_decompile","protocols":["arp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 192.168.10.200 (00:1a:2b:00:00:aa) -> 192.168.10.1 (00:1c:73:00:00:01) | arp request senderip 192.168.10.200 targetip 192.168.10.1\nFrame 2 [t=0.001000000s]: 192.168.10.1 (00:1c:73:00:00:01) -> 192.168.10.200 (00:1a:2b:00:00:aa) | arp reply senderip 192.168.10.1 targetip 192.168.10.200\nFrame 3 [t=0.003000000s]: 192.168.10.200 (00:1a:2b:00:00:aa) -> 192.168.10.50 (00:11:32:aa:bb:cc) | arp request senderip 192.168.10.200 targetip 192.168.10.50\nFrame 4 [t=0.004000000s]: 192.168.10.50 (00:11:32:aa:bb:cc) -> 192.168.10.200 (00:1a:2b:00:00:aa) | arp reply senderip 192.168.10.50 targetip 192.168.10.200\nFrame 5 [t=0.006000000s]: 192.168.10.200 (00:1a:2b:00:00:aa) -> 192.168.10.51 (00:00:00:00:00:04) | arp request senderip 192.168.10.200 targetip 192.168.10.51\n```","completion":"Reconstructs the 5-frame capture (`arp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\n// Technician laptop scanning three local /24 addresses on the same VLAN\nhost tech_laptop { ip 192.168.10.200 mac 00:1a:2b:00:00:aa }\nhost router_gw   { ip 192.168.10.1   mac 00:1c:73:00:00:01 }\nhost nas_box     { ip 192.168.10.50  mac 00:11:32:aa:bb:cc }\nhost unused_ip   { ip 192.168.10.51 }\n\ncompile {\n    // Probe .1 -> Gateway answers with its MAC\n    tech_laptop -> router_gw arp request senderip 192.168.10.200 targetip 192.168.10.1 wait 1ms\n    tech_laptop <- router_gw arp reply senderip 192.168.10.1 targetip 192.168.10.200 wait 2ms\n\n    // Probe .50 -> NAS answers with its MAC\n    tech_laptop -> nas_box arp request senderip 192.168.10.200 targetip 192.168.10.50 wait 1ms\n    tech_laptop <- nas_box arp reply senderip 192.168.10.50 targetip 192.168.10.200 wait 2ms\n\n    // Probe .51 -> No host owns this IP, so no ARP reply comes back\n    tech_laptop -> unused_ip arp request senderip 192.168.10.200 targetip 192.168.10.51\n}\n```","frasm_code":"// Technician laptop scanning three local /24 addresses on the same VLAN\nhost tech_laptop { ip 192.168.10.200 mac 00:1a:2b:00:00:aa }\nhost router_gw   { ip 192.168.10.1   mac 00:1c:73:00:00:01 }\nhost nas_box     { ip 192.168.10.50  mac 00:11:32:aa:bb:cc }\nhost unused_ip   { ip 192.168.10.51 }\n\ncompile {\n    // Probe .1 -> Gateway answers with its MAC\n    tech_laptop -> router_gw arp request senderip 192.168.10.200 targetip 192.168.10.1 wait 1ms\n    tech_laptop <- router_gw arp reply senderip 192.168.10.1 targetip 192.168.10.200 wait 2ms\n\n    // Probe .50 -> NAS answers with its MAC\n    tech_laptop -> nas_box arp request senderip 192.168.10.200 targetip 192.168.10.50 wait 1ms\n    tech_laptop <- nas_box arp reply senderip 192.168.10.50 targetip 192.168.10.200 wait 2ms\n\n    // Probe .51 -> No host owns this IP, so no ARP reply comes back\n    tech_laptop -> unused_ip arp request senderip 192.168.10.200 targetip 192.168.10.51\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 192.168.10.200 (00:1a:2b:00:00:aa) -> 192.168.10.1 (00:1c:73:00:00:01) | arp request senderip 192.168.10.200 targetip 192.168.10.1\nFrame 2 [t=0.001000000s]: 192.168.10.1 (00:1c:73:00:00:01) -> 192.168.10.200 (00:1a:2b:00:00:aa) | arp reply senderip 192.168.10.1 targetip 192.168.10.200\nFrame 3 [t=0.003000000s]: 192.168.10.200 (00:1a:2b:00:00:aa) -> 192.168.10.50 (00:11:32:aa:bb:cc) | arp request senderip 192.168.10.200 targetip 192.168.10.50\nFrame 4 [t=0.004000000s]: 192.168.10.50 (00:11:32:aa:bb:cc) -> 192.168.10.200 (00:1a:2b:00:00:aa) | arp reply senderip 192.168.10.50 targetip 192.168.10.200\nFrame 5 [t=0.006000000s]: 192.168.10.200 (00:1a:2b:00:00:aa) -> 192.168.10.51 (00:00:00:00:00:04) | arp request senderip 192.168.10.200 targetip 192.168.10.51\n```"},{"role":"assistant","content":"Reconstructs the 5-frame capture (`arp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\n// Technician laptop scanning three local /24 addresses on the same VLAN\nhost tech_laptop { ip 192.168.10.200 mac 00:1a:2b:00:00:aa }\nhost router_gw   { ip 192.168.10.1   mac 00:1c:73:00:00:01 }\nhost nas_box     { ip 192.168.10.50  mac 00:11:32:aa:bb:cc }\nhost unused_ip   { ip 192.168.10.51 }\n\ncompile {\n    // Probe .1 -> Gateway answers with its MAC\n    tech_laptop -> router_gw arp request senderip 192.168.10.200 targetip 192.168.10.1 wait 1ms\n    tech_laptop <- router_gw arp reply senderip 192.168.10.1 targetip 192.168.10.200 wait 2ms\n\n    // Probe .50 -> NAS answers with its MAC\n    tech_laptop -> nas_box arp request senderip 192.168.10.200 targetip 192.168.10.50 wait 1ms\n    tech_laptop <- nas_box arp reply senderip 192.168.10.50 targetip 192.168.10.200 wait 2ms\n\n    // Probe .51 -> No host owns this IP, so no ARP reply comes back\n    tech_laptop -> unused_ip arp request senderip 192.168.10.200 targetip 192.168.10.51\n}\n```"}]}
{"id":"sft-reverse-lib-pentest-qinq-vlan-hop","task_type":"reverse_decompile","protocols":["qinq","vlan","icmp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.20.0.99 (02:aa:bb:cc:dd:01) -> 10.20.0.10 (00:1c:73:20:00:10) | qinq 100 innervlan 20 icmp echorequest id 0x1337 seq 1 payload \"vlan-hop-audit\"\nFrame 2 [t=0.003000000s]: 10.20.0.99 (02:aa:bb:cc:dd:01) -> 10.20.0.10 (00:1c:73:20:00:10) | vlan 20 icmp echorequest id 0x1337 seq 1 payload \"vlan-hop-audit\"\n```","completion":"Reconstructs the 2-frame capture (`qinq`, `vlan`, `icmp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\n// Lab test host on VLAN 100 auditing switch isolation toward restricted VLAN 20\nhost audit_port { ip 10.20.0.99 mac 02:aa:bb:cc:dd:01 }\nhost restricted { ip 10.20.0.10 mac 00:1c:73:20:00:10 }\n\ncompile {\n    // 1. Send double-tagged frame (outer S-Tag 100, inner C-Tag 20)\n    audit_port -> restricted qinq 100 innervlan 20 icmp echorequest id 0x1337 seq 1 payload \"vlan-hop-audit\" wait 3ms\n\n    // 2. Simulated misconfigured trunk stripping outer tag and delivering single-tagged VLAN 20 frame\n    audit_port -> restricted vlan 20 icmp echorequest id 0x1337 seq 1 payload \"vlan-hop-audit\"\n}\n```","frasm_code":"// Lab test host on VLAN 100 auditing switch isolation toward restricted VLAN 20\nhost audit_port { ip 10.20.0.99 mac 02:aa:bb:cc:dd:01 }\nhost restricted { ip 10.20.0.10 mac 00:1c:73:20:00:10 }\n\ncompile {\n    // 1. Send double-tagged frame (outer S-Tag 100, inner C-Tag 20)\n    audit_port -> restricted qinq 100 innervlan 20 icmp echorequest id 0x1337 seq 1 payload \"vlan-hop-audit\" wait 3ms\n\n    // 2. Simulated misconfigured trunk stripping outer tag and delivering single-tagged VLAN 20 frame\n    audit_port -> restricted vlan 20 icmp echorequest id 0x1337 seq 1 payload \"vlan-hop-audit\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.20.0.99 (02:aa:bb:cc:dd:01) -> 10.20.0.10 (00:1c:73:20:00:10) | qinq 100 innervlan 20 icmp echorequest id 0x1337 seq 1 payload \"vlan-hop-audit\"\nFrame 2 [t=0.003000000s]: 10.20.0.99 (02:aa:bb:cc:dd:01) -> 10.20.0.10 (00:1c:73:20:00:10) | vlan 20 icmp echorequest id 0x1337 seq 1 payload \"vlan-hop-audit\"\n```"},{"role":"assistant","content":"Reconstructs the 2-frame capture (`qinq`, `vlan`, `icmp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\n// Lab test host on VLAN 100 auditing switch isolation toward restricted VLAN 20\nhost audit_port { ip 10.20.0.99 mac 02:aa:bb:cc:dd:01 }\nhost restricted { ip 10.20.0.10 mac 00:1c:73:20:00:10 }\n\ncompile {\n    // 1. Send double-tagged frame (outer S-Tag 100, inner C-Tag 20)\n    audit_port -> restricted qinq 100 innervlan 20 icmp echorequest id 0x1337 seq 1 payload \"vlan-hop-audit\" wait 3ms\n\n    // 2. Simulated misconfigured trunk stripping outer tag and delivering single-tagged VLAN 20 frame\n    audit_port -> restricted vlan 20 icmp echorequest id 0x1337 seq 1 payload \"vlan-hop-audit\"\n}\n```"}]}
{"id":"sft-reverse-lib-pentest-garp-shadow-tls","task_type":"reverse_decompile","protocols":["arp","tcp","tls"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.20.5.99 (02:de:ad:be:ef:99) -> 10.20.5.1 (00:1c:73:05:00:01) | arp gratuitous senderip 10.20.5.1 sendermac 02:de:ad:be:ef:99\nFrame 2 [t=0.005000000s]: 10.20.5.99 (02:de:ad:be:ef:99) -> 198.51.100.77 (00:00:00:00:00:03) | tcp syn srcport 54900 dstport 443 win 65535 mss 1460\nFrame 3 [t=0.007000000s]: 198.51.100.77 (00:00:00:00:00:03) -> 10.20.5.99 (02:de:ad:be:ef:99) | tcp syn ack win 65535 mss 1460\nFrame 4 [t=0.009000000s]: 10.20.5.99 (02:de:ad:be:ef:99) -> 198.51.100.77 (00:00:00:00:00:03) | tcp ack\nFrame 5 [t=0.010000000s]: 10.20.5.99 (02:de:ad:be:ef:99) -> 198.51.100.77 (00:00:00:00:00:03) | tls clienthello sni \"unapproved-drop.example.net\" alpn \"h2\"\n```","completion":"Reconstructs the 5-frame capture (`arp`, `tcp`, `tls`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\n// Rogue lab device, default gateway IP, and external cloud endpoint\nhost rogue_box   { ip 10.20.5.99 mac 02:de:ad:be:ef:99 }\nhost vlan_gw     { ip 10.20.5.1  mac 00:1c:73:05:00:01 }\nhost ext_storage { ip 198.51.100.77 }\n\ncompile {\n    // 1. Gratuitous ARP announcement claiming the gateway's 10.20.5.1 IP (tests switch DAI)\n    rogue_box -> vlan_gw arp gratuitous senderip 10.20.5.1 sendermac 02:de:ad:be:ef:99 wait 5ms\n\n    // 2. Outbound TCP 443 + TLS ClientHello to test egress SNI filtering / DLP alerts\n    rogue_box -> ext_storage tcp syn srcport 54900 dstport 443 win 65535 mss 1460 wait 2ms\n    rogue_box <- ext_storage tcp syn ack win 65535 mss 1460 wait 2ms\n    rogue_box -> ext_storage tcp ack wait 1ms\n    rogue_box -> ext_storage tls clienthello sni \"unapproved-drop.example.net\" alpn \"h2\"\n}\n```","frasm_code":"// Rogue lab device, default gateway IP, and external cloud endpoint\nhost rogue_box   { ip 10.20.5.99 mac 02:de:ad:be:ef:99 }\nhost vlan_gw     { ip 10.20.5.1  mac 00:1c:73:05:00:01 }\nhost ext_storage { ip 198.51.100.77 }\n\ncompile {\n    // 1. Gratuitous ARP announcement claiming the gateway's 10.20.5.1 IP (tests switch DAI)\n    rogue_box -> vlan_gw arp gratuitous senderip 10.20.5.1 sendermac 02:de:ad:be:ef:99 wait 5ms\n\n    // 2. Outbound TCP 443 + TLS ClientHello to test egress SNI filtering / DLP alerts\n    rogue_box -> ext_storage tcp syn srcport 54900 dstport 443 win 65535 mss 1460 wait 2ms\n    rogue_box <- ext_storage tcp syn ack win 65535 mss 1460 wait 2ms\n    rogue_box -> ext_storage tcp ack wait 1ms\n    rogue_box -> ext_storage tls clienthello sni \"unapproved-drop.example.net\" alpn \"h2\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.20.5.99 (02:de:ad:be:ef:99) -> 10.20.5.1 (00:1c:73:05:00:01) | arp gratuitous senderip 10.20.5.1 sendermac 02:de:ad:be:ef:99\nFrame 2 [t=0.005000000s]: 10.20.5.99 (02:de:ad:be:ef:99) -> 198.51.100.77 (00:00:00:00:00:03) | tcp syn srcport 54900 dstport 443 win 65535 mss 1460\nFrame 3 [t=0.007000000s]: 198.51.100.77 (00:00:00:00:00:03) -> 10.20.5.99 (02:de:ad:be:ef:99) | tcp syn ack win 65535 mss 1460\nFrame 4 [t=0.009000000s]: 10.20.5.99 (02:de:ad:be:ef:99) -> 198.51.100.77 (00:00:00:00:00:03) | tcp ack\nFrame 5 [t=0.010000000s]: 10.20.5.99 (02:de:ad:be:ef:99) -> 198.51.100.77 (00:00:00:00:00:03) | tls clienthello sni \"unapproved-drop.example.net\" alpn \"h2\"\n```"},{"role":"assistant","content":"Reconstructs the 5-frame capture (`arp`, `tcp`, `tls`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\n// Rogue lab device, default gateway IP, and external cloud endpoint\nhost rogue_box   { ip 10.20.5.99 mac 02:de:ad:be:ef:99 }\nhost vlan_gw     { ip 10.20.5.1  mac 00:1c:73:05:00:01 }\nhost ext_storage { ip 198.51.100.77 }\n\ncompile {\n    // 1. Gratuitous ARP announcement claiming the gateway's 10.20.5.1 IP (tests switch DAI)\n    rogue_box -> vlan_gw arp gratuitous senderip 10.20.5.1 sendermac 02:de:ad:be:ef:99 wait 5ms\n\n    // 2. Outbound TCP 443 + TLS ClientHello to test egress SNI filtering / DLP alerts\n    rogue_box -> ext_storage tcp syn srcport 54900 dstport 443 win 65535 mss 1460 wait 2ms\n    rogue_box <- ext_storage tcp syn ack win 65535 mss 1460 wait 2ms\n    rogue_box -> ext_storage tcp ack wait 1ms\n    rogue_box -> ext_storage tls clienthello sni \"unapproved-drop.example.net\" alpn \"h2\"\n}\n```"}]}
{"id":"sft-reverse-proto-lab-arp","task_type":"reverse_decompile","protocols":["arp","vlan"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.10.10.50 (00:1b:21:10:00:50) -> 10.10.10.1 (00:00:5e:00:01:01) | arp request vlan 10 pcp 3\nFrame 2 [t=0.001000000s]: 10.10.10.1 (00:00:5e:00:01:01) -> 10.10.10.50 (00:1b:21:10:00:50) | arp reply vlan 10\nFrame 3 [t=0.006000000s]: 10.10.10.2 (00:1b:21:10:00:02) -> 10.10.10.50 (00:1b:21:10:00:50) | arp gratuitous sendermac 00:00:5e:00:01:01 senderip 10.10.10.1 vlan 10\n```","completion":"Reconstructs the 3-frame capture (`arp`, `vlan`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost workstation { ip 10.10.10.50 mac 00:1b:21:10:00:50 }\nhost rtr_active  { ip 10.10.10.1  mac 00:00:5e:00:01:01 }\nhost rtr_standby { ip 10.10.10.2  mac 00:1b:21:10:00:02 }\n\ncompile {\n    // 1. Broadcast ARP Who-Has on VLAN 10\n    workstation -> rtr_active arp request vlan 10 pcp 3 wait 1ms\n    // 2. Unicast ARP Is-At reply from active gateway\n    workstation <- rtr_active arp reply vlan 10 wait 5ms\n    // 3. Standby router takes over VIP 10.10.10.1 and broadcasts GARP\n    rtr_standby -> workstation arp gratuitous sendermac 00:00:5e:00:01:01 senderip 10.10.10.1 vlan 10\n}\n```","frasm_code":"host workstation { ip 10.10.10.50 mac 00:1b:21:10:00:50 }\nhost rtr_active  { ip 10.10.10.1  mac 00:00:5e:00:01:01 }\nhost rtr_standby { ip 10.10.10.2  mac 00:1b:21:10:00:02 }\n\ncompile {\n    // 1. Broadcast ARP Who-Has on VLAN 10\n    workstation -> rtr_active arp request vlan 10 pcp 3 wait 1ms\n    // 2. Unicast ARP Is-At reply from active gateway\n    workstation <- rtr_active arp reply vlan 10 wait 5ms\n    // 3. Standby router takes over VIP 10.10.10.1 and broadcasts GARP\n    rtr_standby -> workstation arp gratuitous sendermac 00:00:5e:00:01:01 senderip 10.10.10.1 vlan 10\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.10.10.50 (00:1b:21:10:00:50) -> 10.10.10.1 (00:00:5e:00:01:01) | arp request vlan 10 pcp 3\nFrame 2 [t=0.001000000s]: 10.10.10.1 (00:00:5e:00:01:01) -> 10.10.10.50 (00:1b:21:10:00:50) | arp reply vlan 10\nFrame 3 [t=0.006000000s]: 10.10.10.2 (00:1b:21:10:00:02) -> 10.10.10.50 (00:1b:21:10:00:50) | arp gratuitous sendermac 00:00:5e:00:01:01 senderip 10.10.10.1 vlan 10\n```"},{"role":"assistant","content":"Reconstructs the 3-frame capture (`arp`, `vlan`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost workstation { ip 10.10.10.50 mac 00:1b:21:10:00:50 }\nhost rtr_active  { ip 10.10.10.1  mac 00:00:5e:00:01:01 }\nhost rtr_standby { ip 10.10.10.2  mac 00:1b:21:10:00:02 }\n\ncompile {\n    // 1. Broadcast ARP Who-Has on VLAN 10\n    workstation -> rtr_active arp request vlan 10 pcp 3 wait 1ms\n    // 2. Unicast ARP Is-At reply from active gateway\n    workstation <- rtr_active arp reply vlan 10 wait 5ms\n    // 3. Standby router takes over VIP 10.10.10.1 and broadcasts GARP\n    rtr_standby -> workstation arp gratuitous sendermac 00:00:5e:00:01:01 senderip 10.10.10.1 vlan 10\n}\n```"}]}
{"id":"sft-reverse-proto-lab-vlan","task_type":"reverse_decompile","protocols":["vlan"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: MAC 00:1c:73:10:00:01 -> MAC 00:1c:73:20:00:01 | vlan 99 pcp 2 dei 0 ethertype 0x88b5 payload \"trunk-health\"\nFrame 2 [t=0.001000000s]: 10.50.20.11 (00:1c:73:50:00:11) -> 10.50.20.10 (00:1c:73:50:00:10) | arp request vlan 20 pcp 5\nFrame 3 [t=0.002000000s]: 10.50.20.10 (00:1c:73:50:00:10) -> 10.50.20.11 (00:1c:73:50:00:11) | arp reply vlan 20 pcp 5\nFrame 4 [t=0.004000000s]: 10.50.20.11 (00:1c:73:50:00:11) -> 10.50.20.10 (00:1c:73:50:00:10) | rtp pt 0 seq 1 timestamp 160 ssrc 0x10203040 vlan 20 pcp 5 dscp 46 payload \"g711-ulaw-sample\"\nFrame 5 [t=0.006000000s]: 10.50.20.11 (00:1c:73:50:00:11) -> 10.50.20.10 (00:1c:73:50:00:10) | ospf hello routerid 10.50.20.11 areaid 0 vlan 30 pcp 6\n```","completion":"Reconstructs the 5-frame capture (`vlan`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost sw_leaf  { mac 00:1c:73:10:00:01 }\nhost sw_spine { mac 00:1c:73:20:00:01 }\nhost phone_01 { ip 10.50.20.11 mac 00:1c:73:50:00:11 }\nhost pbx_core { ip 10.50.20.10 mac 00:1c:73:50:00:10 }\n\ncompile {\n    // Standalone L2 VLAN probe on management VLAN 99\n    sw_leaf -> sw_spine vlan 99 pcp 2 dei 0 ethertype 0x88b5 payload \"trunk-health\" wait 1ms\n    // Voice VLAN 20: ARP + CoS 5 / EF RTP media packet\n    phone_01 -> pbx_core arp request vlan 20 pcp 5 wait 1ms\n    phone_01 <- pbx_core arp reply vlan 20 pcp 5 wait 2ms\n    phone_01 -> pbx_core rtp pt 0 seq 1 timestamp 160 ssrc 0x10203040 vlan 20 pcp 5 dscp 46 payload \"g711-ulaw-sample\" wait 2ms\n    // Routing VLAN 30: Priority 6 OSPF Hello\n    phone_01 -> pbx_core ospf hello routerid 10.50.20.11 areaid 0 vlan 30 pcp 6\n}\n```","frasm_code":"host sw_leaf  { mac 00:1c:73:10:00:01 }\nhost sw_spine { mac 00:1c:73:20:00:01 }\nhost phone_01 { ip 10.50.20.11 mac 00:1c:73:50:00:11 }\nhost pbx_core { ip 10.50.20.10 mac 00:1c:73:50:00:10 }\n\ncompile {\n    // Standalone L2 VLAN probe on management VLAN 99\n    sw_leaf -> sw_spine vlan 99 pcp 2 dei 0 ethertype 0x88b5 payload \"trunk-health\" wait 1ms\n    // Voice VLAN 20: ARP + CoS 5 / EF RTP media packet\n    phone_01 -> pbx_core arp request vlan 20 pcp 5 wait 1ms\n    phone_01 <- pbx_core arp reply vlan 20 pcp 5 wait 2ms\n    phone_01 -> pbx_core rtp pt 0 seq 1 timestamp 160 ssrc 0x10203040 vlan 20 pcp 5 dscp 46 payload \"g711-ulaw-sample\" wait 2ms\n    // Routing VLAN 30: Priority 6 OSPF Hello\n    phone_01 -> pbx_core ospf hello routerid 10.50.20.11 areaid 0 vlan 30 pcp 6\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: MAC 00:1c:73:10:00:01 -> MAC 00:1c:73:20:00:01 | vlan 99 pcp 2 dei 0 ethertype 0x88b5 payload \"trunk-health\"\nFrame 2 [t=0.001000000s]: 10.50.20.11 (00:1c:73:50:00:11) -> 10.50.20.10 (00:1c:73:50:00:10) | arp request vlan 20 pcp 5\nFrame 3 [t=0.002000000s]: 10.50.20.10 (00:1c:73:50:00:10) -> 10.50.20.11 (00:1c:73:50:00:11) | arp reply vlan 20 pcp 5\nFrame 4 [t=0.004000000s]: 10.50.20.11 (00:1c:73:50:00:11) -> 10.50.20.10 (00:1c:73:50:00:10) | rtp pt 0 seq 1 timestamp 160 ssrc 0x10203040 vlan 20 pcp 5 dscp 46 payload \"g711-ulaw-sample\"\nFrame 5 [t=0.006000000s]: 10.50.20.11 (00:1c:73:50:00:11) -> 10.50.20.10 (00:1c:73:50:00:10) | ospf hello routerid 10.50.20.11 areaid 0 vlan 30 pcp 6\n```"},{"role":"assistant","content":"Reconstructs the 5-frame capture (`vlan`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost sw_leaf  { mac 00:1c:73:10:00:01 }\nhost sw_spine { mac 00:1c:73:20:00:01 }\nhost phone_01 { ip 10.50.20.11 mac 00:1c:73:50:00:11 }\nhost pbx_core { ip 10.50.20.10 mac 00:1c:73:50:00:10 }\n\ncompile {\n    // Standalone L2 VLAN probe on management VLAN 99\n    sw_leaf -> sw_spine vlan 99 pcp 2 dei 0 ethertype 0x88b5 payload \"trunk-health\" wait 1ms\n    // Voice VLAN 20: ARP + CoS 5 / EF RTP media packet\n    phone_01 -> pbx_core arp request vlan 20 pcp 5 wait 1ms\n    phone_01 <- pbx_core arp reply vlan 20 pcp 5 wait 2ms\n    phone_01 -> pbx_core rtp pt 0 seq 1 timestamp 160 ssrc 0x10203040 vlan 20 pcp 5 dscp 46 payload \"g711-ulaw-sample\" wait 2ms\n    // Routing VLAN 30: Priority 6 OSPF Hello\n    phone_01 -> pbx_core ospf hello routerid 10.50.20.11 areaid 0 vlan 30 pcp 6\n}\n```"}]}
{"id":"sft-reverse-proto-lab-qinq","task_type":"reverse_decompile","protocols":["qinq","tcp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 172.20.0.1 (00:1b:21:c1:00:01) -> 172.20.0.2 (00:1b:21:c1:00:02) | tcp syn srcport 51179 dstport 179 win 65535 mss 1452 qinq 1200 innervlan 100 pcp 6\nFrame 2 [t=0.001000000s]: 172.20.0.2 (00:1b:21:c1:00:02) -> 172.20.0.1 (00:1b:21:c1:00:01) | tcp syn ack win 65535 mss 1452 qinq 1200 innervlan 100 pcp 6\nFrame 3 [t=0.002000000s]: 172.20.0.1 (00:1b:21:c1:00:01) -> 172.20.0.2 (00:1b:21:c1:00:02) | tcp ack qinq 1200 innervlan 100 pcp 6\nFrame 4 [t=0.003000000s]: 172.20.0.1 (00:1b:21:c1:00:01) -> 172.20.0.2 (00:1b:21:c1:00:02) | bgp keepalive qinq 1200 innervlan 100 pcp 6\nFrame 5 [t=0.006000000s]: 2001:db8:200::1 (00:1b:21:c2:00:01) -> 2001:db8:200::2 (00:1b:21:c2:00:02) | icmp echorequest id 42 seq 1 qinq 1200 innervlan 200 pcp 3\nFrame 6 [t=0.007000000s]: 2001:db8:200::2 (00:1b:21:c2:00:02) -> 2001:db8:200::1 (00:1b:21:c2:00:01) | icmp echoreply id 42 seq 1 qinq 1200 innervlan 200 pcp 3\n```","completion":"Reconstructs the 6-frame capture (`qinq`, `tcp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost ce_v4_a { ip 172.20.0.1 mac 00:1b:21:c1:00:01 }\nhost ce_v4_b { ip 172.20.0.2 mac 00:1b:21:c1:00:02 }\nhost ce_v6_a { ip 2001:db8:200::1 mac 00:1b:21:c2:00:01 }\nhost ce_v6_b { ip 2001:db8:200::2 mac 00:1b:21:c2:00:02 }\n\ncompile {\n    // Tenant A: eBGP Keepalive inside S-VLAN 1200 / C-VLAN 100\n    ce_v4_a -> ce_v4_b tcp syn srcport 51179 dstport 179 win 65535 mss 1452 qinq 1200 innervlan 100 pcp 6 wait 1ms\n    ce_v4_a <- ce_v4_b tcp syn ack win 65535 mss 1452 qinq 1200 innervlan 100 pcp 6 wait 1ms\n    ce_v4_a -> ce_v4_b tcp ack qinq 1200 innervlan 100 pcp 6 wait 1ms\n    ce_v4_a -> ce_v4_b bgp keepalive qinq 1200 innervlan 100 pcp 6 wait 3ms\n    // Tenant B: IPv6 Echo inside S-VLAN 1200 / C-VLAN 200\n    ce_v6_a -> ce_v6_b icmp echorequest id 42 seq 1 qinq 1200 innervlan 200 pcp 3 wait 1ms\n    ce_v6_a <- ce_v6_b icmp echoreply id 42 seq 1 qinq 1200 innervlan 200 pcp 3\n}\n```","frasm_code":"host ce_v4_a { ip 172.20.0.1 mac 00:1b:21:c1:00:01 }\nhost ce_v4_b { ip 172.20.0.2 mac 00:1b:21:c1:00:02 }\nhost ce_v6_a { ip 2001:db8:200::1 mac 00:1b:21:c2:00:01 }\nhost ce_v6_b { ip 2001:db8:200::2 mac 00:1b:21:c2:00:02 }\n\ncompile {\n    // Tenant A: eBGP Keepalive inside S-VLAN 1200 / C-VLAN 100\n    ce_v4_a -> ce_v4_b tcp syn srcport 51179 dstport 179 win 65535 mss 1452 qinq 1200 innervlan 100 pcp 6 wait 1ms\n    ce_v4_a <- ce_v4_b tcp syn ack win 65535 mss 1452 qinq 1200 innervlan 100 pcp 6 wait 1ms\n    ce_v4_a -> ce_v4_b tcp ack qinq 1200 innervlan 100 pcp 6 wait 1ms\n    ce_v4_a -> ce_v4_b bgp keepalive qinq 1200 innervlan 100 pcp 6 wait 3ms\n    // Tenant B: IPv6 Echo inside S-VLAN 1200 / C-VLAN 200\n    ce_v6_a -> ce_v6_b icmp echorequest id 42 seq 1 qinq 1200 innervlan 200 pcp 3 wait 1ms\n    ce_v6_a <- ce_v6_b icmp echoreply id 42 seq 1 qinq 1200 innervlan 200 pcp 3\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 172.20.0.1 (00:1b:21:c1:00:01) -> 172.20.0.2 (00:1b:21:c1:00:02) | tcp syn srcport 51179 dstport 179 win 65535 mss 1452 qinq 1200 innervlan 100 pcp 6\nFrame 2 [t=0.001000000s]: 172.20.0.2 (00:1b:21:c1:00:02) -> 172.20.0.1 (00:1b:21:c1:00:01) | tcp syn ack win 65535 mss 1452 qinq 1200 innervlan 100 pcp 6\nFrame 3 [t=0.002000000s]: 172.20.0.1 (00:1b:21:c1:00:01) -> 172.20.0.2 (00:1b:21:c1:00:02) | tcp ack qinq 1200 innervlan 100 pcp 6\nFrame 4 [t=0.003000000s]: 172.20.0.1 (00:1b:21:c1:00:01) -> 172.20.0.2 (00:1b:21:c1:00:02) | bgp keepalive qinq 1200 innervlan 100 pcp 6\nFrame 5 [t=0.006000000s]: 2001:db8:200::1 (00:1b:21:c2:00:01) -> 2001:db8:200::2 (00:1b:21:c2:00:02) | icmp echorequest id 42 seq 1 qinq 1200 innervlan 200 pcp 3\nFrame 6 [t=0.007000000s]: 2001:db8:200::2 (00:1b:21:c2:00:02) -> 2001:db8:200::1 (00:1b:21:c2:00:01) | icmp echoreply id 42 seq 1 qinq 1200 innervlan 200 pcp 3\n```"},{"role":"assistant","content":"Reconstructs the 6-frame capture (`qinq`, `tcp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost ce_v4_a { ip 172.20.0.1 mac 00:1b:21:c1:00:01 }\nhost ce_v4_b { ip 172.20.0.2 mac 00:1b:21:c1:00:02 }\nhost ce_v6_a { ip 2001:db8:200::1 mac 00:1b:21:c2:00:01 }\nhost ce_v6_b { ip 2001:db8:200::2 mac 00:1b:21:c2:00:02 }\n\ncompile {\n    // Tenant A: eBGP Keepalive inside S-VLAN 1200 / C-VLAN 100\n    ce_v4_a -> ce_v4_b tcp syn srcport 51179 dstport 179 win 65535 mss 1452 qinq 1200 innervlan 100 pcp 6 wait 1ms\n    ce_v4_a <- ce_v4_b tcp syn ack win 65535 mss 1452 qinq 1200 innervlan 100 pcp 6 wait 1ms\n    ce_v4_a -> ce_v4_b tcp ack qinq 1200 innervlan 100 pcp 6 wait 1ms\n    ce_v4_a -> ce_v4_b bgp keepalive qinq 1200 innervlan 100 pcp 6 wait 3ms\n    // Tenant B: IPv6 Echo inside S-VLAN 1200 / C-VLAN 200\n    ce_v6_a -> ce_v6_b icmp echorequest id 42 seq 1 qinq 1200 innervlan 200 pcp 3 wait 1ms\n    ce_v6_a <- ce_v6_b icmp echoreply id 42 seq 1 qinq 1200 innervlan 200 pcp 3\n}\n```"}]}
{"id":"sft-reverse-proto-lab-lldp","task_type":"reverse_decompile","protocols":["lldp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: MAC 00:1c:73:11:22:01 -> MAC 00:1c:73:99:88:01 | lldp chassisid \"leaf-01.dc1\" portid \"Ethernet49/1\" ttl 120 sysname \"leaf-01.dc1.internal\" sysdesc \"EOS 4.32.1F\"\nFrame 2 [t=0.005000000s]: MAC 00:1c:73:99:88:01 -> MAC 00:1c:73:11:22:01 | lldp chassisid \"spine-01.dc1\" portid \"Ethernet1/1\" ttl 120 sysname \"spine-01.dc1.internal\" sysdesc \"EOS 4.32.1F\"\nFrame 3 [t=0.015000000s]: MAC 00:1c:73:11:22:01 -> MAC 00:1c:73:99:88:01 | lldp chassisid \"leaf-01.dc1\" portid \"Ethernet49/1\" ttl 0\n```","completion":"Reconstructs the 3-frame capture (`lldp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost leaf_01  { mac 00:1c:73:11:22:01 }\nhost spine_01 { mac 00:1c:73:99:88:01 }\n\ncompile {\n    leaf_01 -> spine_01 lldp chassisid \"leaf-01.dc1\" portid \"Ethernet49/1\" ttl 120 sysname \"leaf-01.dc1.internal\" sysdesc \"EOS 4.32.1F\" wait 5ms\n    spine_01 -> leaf_01 lldp chassisid \"spine-01.dc1\" portid \"Ethernet1/1\" ttl 120 sysname \"spine-01.dc1.internal\" sysdesc \"EOS 4.32.1F\" wait 10ms\n    // Graceful LLDP port shutdown advertisement (TTL = 0)\n    leaf_01 -> spine_01 lldp chassisid \"leaf-01.dc1\" portid \"Ethernet49/1\" ttl 0\n}\n```","frasm_code":"host leaf_01  { mac 00:1c:73:11:22:01 }\nhost spine_01 { mac 00:1c:73:99:88:01 }\n\ncompile {\n    leaf_01 -> spine_01 lldp chassisid \"leaf-01.dc1\" portid \"Ethernet49/1\" ttl 120 sysname \"leaf-01.dc1.internal\" sysdesc \"EOS 4.32.1F\" wait 5ms\n    spine_01 -> leaf_01 lldp chassisid \"spine-01.dc1\" portid \"Ethernet1/1\" ttl 120 sysname \"spine-01.dc1.internal\" sysdesc \"EOS 4.32.1F\" wait 10ms\n    // Graceful LLDP port shutdown advertisement (TTL = 0)\n    leaf_01 -> spine_01 lldp chassisid \"leaf-01.dc1\" portid \"Ethernet49/1\" ttl 0\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: MAC 00:1c:73:11:22:01 -> MAC 00:1c:73:99:88:01 | lldp chassisid \"leaf-01.dc1\" portid \"Ethernet49/1\" ttl 120 sysname \"leaf-01.dc1.internal\" sysdesc \"EOS 4.32.1F\"\nFrame 2 [t=0.005000000s]: MAC 00:1c:73:99:88:01 -> MAC 00:1c:73:11:22:01 | lldp chassisid \"spine-01.dc1\" portid \"Ethernet1/1\" ttl 120 sysname \"spine-01.dc1.internal\" sysdesc \"EOS 4.32.1F\"\nFrame 3 [t=0.015000000s]: MAC 00:1c:73:11:22:01 -> MAC 00:1c:73:99:88:01 | lldp chassisid \"leaf-01.dc1\" portid \"Ethernet49/1\" ttl 0\n```"},{"role":"assistant","content":"Reconstructs the 3-frame capture (`lldp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost leaf_01  { mac 00:1c:73:11:22:01 }\nhost spine_01 { mac 00:1c:73:99:88:01 }\n\ncompile {\n    leaf_01 -> spine_01 lldp chassisid \"leaf-01.dc1\" portid \"Ethernet49/1\" ttl 120 sysname \"leaf-01.dc1.internal\" sysdesc \"EOS 4.32.1F\" wait 5ms\n    spine_01 -> leaf_01 lldp chassisid \"spine-01.dc1\" portid \"Ethernet1/1\" ttl 120 sysname \"spine-01.dc1.internal\" sysdesc \"EOS 4.32.1F\" wait 10ms\n    // Graceful LLDP port shutdown advertisement (TTL = 0)\n    leaf_01 -> spine_01 lldp chassisid \"leaf-01.dc1\" portid \"Ethernet49/1\" ttl 0\n}\n```"}]}
{"id":"sft-reverse-proto-lab-stp","task_type":"reverse_decompile","protocols":["stp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: MAC 00:1c:73:01:00:01 -> MAC 00:1c:73:02:00:10 | stp rstp rootid \"32768:00:1c:73:01:00:01\" bridgeid \"32768:00:1c:73:01:00:01\" portid 0x8001 cost 0 flags 0x3c\nFrame 2 [t=2.000000000s]: MAC 00:1c:73:02:00:10 -> MAC 00:50:56:99:99:99 | stp rstp rootid \"32768:00:1c:73:01:00:01\" bridgeid \"32768:00:1c:73:02:00:10\" portid 0x8018 cost 20000 flags 0x3c\nFrame 3 [t=2.500000000s]: MAC 00:50:56:99:99:99 -> MAC 00:1c:73:02:00:10 | stp rstp rootid \"4096:00:50:56:99:99:99\" bridgeid \"4096:00:50:56:99:99:99\" portid 0x8001 cost 0 flags 0x0e\n```","completion":"Reconstructs the 3-frame capture (`stp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost dist_root  { mac 00:1c:73:01:00:01 }\nhost access_sw  { mac 00:1c:73:02:00:10 }\nhost rogue_port { mac 00:50:56:99:99:99 }\n\ncompile {\n    // Legitimate RSTP Proposal/Learning-Forwarding BPDU from distribution root\n    dist_root -> access_sw stp rstp rootid \"32768:00:1c:73:01:00:01\" bridgeid \"32768:00:1c:73:01:00:01\" portid 0x8001 cost 0 flags 0x3c wait 2s\n    // Downstream access switch relaying root path cost 20000\n    access_sw -> rogue_port stp rstp rootid \"32768:00:1c:73:01:00:01\" bridgeid \"32768:00:1c:73:02:00:10\" portid 0x8018 cost 20000 flags 0x3c wait 500ms\n    // Rogue device injecting a superior Root ID (priority 4096, cost 0)\n    rogue_port -> access_sw stp rstp rootid \"4096:00:50:56:99:99:99\" bridgeid \"4096:00:50:56:99:99:99\" portid 0x8001 cost 0 flags 0x0e\n}\n```","frasm_code":"host dist_root  { mac 00:1c:73:01:00:01 }\nhost access_sw  { mac 00:1c:73:02:00:10 }\nhost rogue_port { mac 00:50:56:99:99:99 }\n\ncompile {\n    // Legitimate RSTP Proposal/Learning-Forwarding BPDU from distribution root\n    dist_root -> access_sw stp rstp rootid \"32768:00:1c:73:01:00:01\" bridgeid \"32768:00:1c:73:01:00:01\" portid 0x8001 cost 0 flags 0x3c wait 2s\n    // Downstream access switch relaying root path cost 20000\n    access_sw -> rogue_port stp rstp rootid \"32768:00:1c:73:01:00:01\" bridgeid \"32768:00:1c:73:02:00:10\" portid 0x8018 cost 20000 flags 0x3c wait 500ms\n    // Rogue device injecting a superior Root ID (priority 4096, cost 0)\n    rogue_port -> access_sw stp rstp rootid \"4096:00:50:56:99:99:99\" bridgeid \"4096:00:50:56:99:99:99\" portid 0x8001 cost 0 flags 0x0e\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: MAC 00:1c:73:01:00:01 -> MAC 00:1c:73:02:00:10 | stp rstp rootid \"32768:00:1c:73:01:00:01\" bridgeid \"32768:00:1c:73:01:00:01\" portid 0x8001 cost 0 flags 0x3c\nFrame 2 [t=2.000000000s]: MAC 00:1c:73:02:00:10 -> MAC 00:50:56:99:99:99 | stp rstp rootid \"32768:00:1c:73:01:00:01\" bridgeid \"32768:00:1c:73:02:00:10\" portid 0x8018 cost 20000 flags 0x3c\nFrame 3 [t=2.500000000s]: MAC 00:50:56:99:99:99 -> MAC 00:1c:73:02:00:10 | stp rstp rootid \"4096:00:50:56:99:99:99\" bridgeid \"4096:00:50:56:99:99:99\" portid 0x8001 cost 0 flags 0x0e\n```"},{"role":"assistant","content":"Reconstructs the 3-frame capture (`stp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost dist_root  { mac 00:1c:73:01:00:01 }\nhost access_sw  { mac 00:1c:73:02:00:10 }\nhost rogue_port { mac 00:50:56:99:99:99 }\n\ncompile {\n    // Legitimate RSTP Proposal/Learning-Forwarding BPDU from distribution root\n    dist_root -> access_sw stp rstp rootid \"32768:00:1c:73:01:00:01\" bridgeid \"32768:00:1c:73:01:00:01\" portid 0x8001 cost 0 flags 0x3c wait 2s\n    // Downstream access switch relaying root path cost 20000\n    access_sw -> rogue_port stp rstp rootid \"32768:00:1c:73:01:00:01\" bridgeid \"32768:00:1c:73:02:00:10\" portid 0x8018 cost 20000 flags 0x3c wait 500ms\n    // Rogue device injecting a superior Root ID (priority 4096, cost 0)\n    rogue_port -> access_sw stp rstp rootid \"4096:00:50:56:99:99:99\" bridgeid \"4096:00:50:56:99:99:99\" portid 0x8001 cost 0 flags 0x0e\n}\n```"}]}
{"id":"sft-reverse-proto-lab-lacp","task_type":"reverse_decompile","protocols":["lacp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: MAC 00:1b:21:44:55:01 -> MAC 00:1c:73:88:99:01 | lacp actorkey 10 actorport 1 actorstate 0x47 partnerkey 0 partnerport 0 partnerstate 0x00\nFrame 2 [t=0.005000000s]: MAC 00:1c:73:88:99:01 -> MAC 00:1b:21:44:55:01 | lacp actorkey 10 actorport 49 actorstate 0x0f partnersys 00:1b:21:44:55:01 partnerkey 10 partnerport 1 partnerstate 0x47\nFrame 3 [t=0.010000000s]: MAC 00:1b:21:44:55:01 -> MAC 00:1c:73:88:99:01 | lacp actorkey 10 actorport 1 actorstate 0x3f partnersys 00:1c:73:88:99:01 partnerkey 10 partnerport 49 partnerstate 0x0f\nFrame 4 [t=0.012000000s]: MAC 00:1c:73:88:99:01 -> MAC 00:1b:21:44:55:01 | lacp actorkey 10 actorport 49 actorstate 0x3f partnersys 00:1b:21:44:55:01 partnerkey 10 partnerport 1 partnerstate 0x3f\n```","completion":"Reconstructs the 4-frame capture (`lacp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost srv_bond0 { mac 00:1b:21:44:55:01 }\nhost tor_leaf1 { mac 00:1c:73:88:99:01 }\n\ncompile {\n    // 1. Initial server LACPDU: Active + ShortTimeout + Aggregatable + Defaulted (0x47)\n    srv_bond0 -> tor_leaf1 lacp actorkey 10 actorport 1 actorstate 0x47 partnerkey 0 partnerport 0 partnerstate 0x00 wait 5ms\n    // 2. Switch replies recognizing server Actor as Partner and setting In-Sync (0x0f)\n    tor_leaf1 -> srv_bond0 lacp actorkey 10 actorport 49 actorstate 0x0f partnersys 00:1b:21:44:55:01 partnerkey 10 partnerport 1 partnerstate 0x47 wait 5ms\n    // 3. Both sides enter Active + Fast + Aggregatable + Sync + Collecting + Distributing (0x3f)\n    srv_bond0 -> tor_leaf1 lacp actorkey 10 actorport 1 actorstate 0x3f partnersys 00:1c:73:88:99:01 partnerkey 10 partnerport 49 partnerstate 0x0f wait 2ms\n    tor_leaf1 -> srv_bond0 lacp actorkey 10 actorport 49 actorstate 0x3f partnersys 00:1b:21:44:55:01 partnerkey 10 partnerport 1 partnerstate 0x3f\n}\n```","frasm_code":"host srv_bond0 { mac 00:1b:21:44:55:01 }\nhost tor_leaf1 { mac 00:1c:73:88:99:01 }\n\ncompile {\n    // 1. Initial server LACPDU: Active + ShortTimeout + Aggregatable + Defaulted (0x47)\n    srv_bond0 -> tor_leaf1 lacp actorkey 10 actorport 1 actorstate 0x47 partnerkey 0 partnerport 0 partnerstate 0x00 wait 5ms\n    // 2. Switch replies recognizing server Actor as Partner and setting In-Sync (0x0f)\n    tor_leaf1 -> srv_bond0 lacp actorkey 10 actorport 49 actorstate 0x0f partnersys 00:1b:21:44:55:01 partnerkey 10 partnerport 1 partnerstate 0x47 wait 5ms\n    // 3. Both sides enter Active + Fast + Aggregatable + Sync + Collecting + Distributing (0x3f)\n    srv_bond0 -> tor_leaf1 lacp actorkey 10 actorport 1 actorstate 0x3f partnersys 00:1c:73:88:99:01 partnerkey 10 partnerport 49 partnerstate 0x0f wait 2ms\n    tor_leaf1 -> srv_bond0 lacp actorkey 10 actorport 49 actorstate 0x3f partnersys 00:1b:21:44:55:01 partnerkey 10 partnerport 1 partnerstate 0x3f\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: MAC 00:1b:21:44:55:01 -> MAC 00:1c:73:88:99:01 | lacp actorkey 10 actorport 1 actorstate 0x47 partnerkey 0 partnerport 0 partnerstate 0x00\nFrame 2 [t=0.005000000s]: MAC 00:1c:73:88:99:01 -> MAC 00:1b:21:44:55:01 | lacp actorkey 10 actorport 49 actorstate 0x0f partnersys 00:1b:21:44:55:01 partnerkey 10 partnerport 1 partnerstate 0x47\nFrame 3 [t=0.010000000s]: MAC 00:1b:21:44:55:01 -> MAC 00:1c:73:88:99:01 | lacp actorkey 10 actorport 1 actorstate 0x3f partnersys 00:1c:73:88:99:01 partnerkey 10 partnerport 49 partnerstate 0x0f\nFrame 4 [t=0.012000000s]: MAC 00:1c:73:88:99:01 -> MAC 00:1b:21:44:55:01 | lacp actorkey 10 actorport 49 actorstate 0x3f partnersys 00:1b:21:44:55:01 partnerkey 10 partnerport 1 partnerstate 0x3f\n```"},{"role":"assistant","content":"Reconstructs the 4-frame capture (`lacp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost srv_bond0 { mac 00:1b:21:44:55:01 }\nhost tor_leaf1 { mac 00:1c:73:88:99:01 }\n\ncompile {\n    // 1. Initial server LACPDU: Active + ShortTimeout + Aggregatable + Defaulted (0x47)\n    srv_bond0 -> tor_leaf1 lacp actorkey 10 actorport 1 actorstate 0x47 partnerkey 0 partnerport 0 partnerstate 0x00 wait 5ms\n    // 2. Switch replies recognizing server Actor as Partner and setting In-Sync (0x0f)\n    tor_leaf1 -> srv_bond0 lacp actorkey 10 actorport 49 actorstate 0x0f partnersys 00:1b:21:44:55:01 partnerkey 10 partnerport 1 partnerstate 0x47 wait 5ms\n    // 3. Both sides enter Active + Fast + Aggregatable + Sync + Collecting + Distributing (0x3f)\n    srv_bond0 -> tor_leaf1 lacp actorkey 10 actorport 1 actorstate 0x3f partnersys 00:1c:73:88:99:01 partnerkey 10 partnerport 49 partnerstate 0x0f wait 2ms\n    tor_leaf1 -> srv_bond0 lacp actorkey 10 actorport 49 actorstate 0x3f partnersys 00:1b:21:44:55:01 partnerkey 10 partnerport 1 partnerstate 0x3f\n}\n```"}]}
{"id":"sft-reverse-proto-lab-eapol","task_type":"reverse_decompile","protocols":["eapol"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: MAC 00:1b:21:55:66:77 -> 10.20.0.2 (00:1c:73:00:01:02) | eapol start version 2\nFrame 2 [t=0.002000000s]: 10.20.0.2 (00:1c:73:00:01:02) -> MAC 00:1b:21:55:66:77 | eapol eappacket version 2 eapcode 1 eapid 1 eapmethod 1 dstmac 00:1b:21:55:66:77\nFrame 3 [t=0.005000000s]: MAC 00:1b:21:55:66:77 -> 10.20.0.2 (00:1c:73:00:01:02) | eapol eappacket version 2 eapcode 2 eapid 1 eapmethod 1 identity \"corp\\\\jdoe\"\nFrame 4 [t=0.007000000s]: 10.20.0.2 (00:1c:73:00:01:02) -> 10.20.0.50 (00:50:56:00:00:50) | radius accessrequest id 10 user \"corp\\\\jdoe\" nasip 10.20.0.2\nFrame 5 [t=0.011000000s]: 10.20.0.50 (00:50:56:00:00:50) -> 10.20.0.2 (00:1c:73:00:01:02) | radius accessaccept id 10 framedip 10.20.100.45\nFrame 6 [t=0.013000000s]: 10.20.0.2 (00:1c:73:00:01:02) -> MAC 00:1b:21:55:66:77 | eapol eappacket version 2 eapcode 3 eapid 1 dstmac 00:1b:21:55:66:77\n```","completion":"Reconstructs the 6-frame capture (`eapol`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost laptop    { mac 00:1b:21:55:66:77 }\nhost access_sw { ip 10.20.0.2  mac 00:1c:73:00:01:02 }\nhost radius_srv { ip 10.20.0.50 mac 00:50:56:00:00:50 }\n\ncompile {\n    // 1. Supplicant initiates 802.1X on physical switch port\n    laptop -> access_sw eapol start version 2 wait 2ms\n    // 2. Switch Authenticator requests EAP Identity (eapcode 1 = Request, eapmethod 1 = Identity)\n    access_sw -> laptop eapol eappacket version 2 eapcode 1 eapid 1 eapmethod 1 dstmac 00:1b:21:55:66:77 wait 3ms\n    // 3. Supplicant responds with corporate identity\n    laptop -> access_sw eapol eappacket version 2 eapcode 2 eapid 1 eapmethod 1 identity \"corp\\\\jdoe\" wait 2ms\n    // 4. Switch forwards authentication upstream to RADIUS AAA server\n    access_sw -> radius_srv radius accessrequest id 10 user \"corp\\\\jdoe\" nasip 10.20.0.2 wait 4ms\n    access_sw <- radius_srv radius accessaccept id 10 framedip 10.20.100.45 wait 2ms\n    // 5. Switch grants port access with EAP-Success (eapcode 3)\n    access_sw -> laptop eapol eappacket version 2 eapcode 3 eapid 1 dstmac 00:1b:21:55:66:77\n}\n```","frasm_code":"host laptop    { mac 00:1b:21:55:66:77 }\nhost access_sw { ip 10.20.0.2  mac 00:1c:73:00:01:02 }\nhost radius_srv { ip 10.20.0.50 mac 00:50:56:00:00:50 }\n\ncompile {\n    // 1. Supplicant initiates 802.1X on physical switch port\n    laptop -> access_sw eapol start version 2 wait 2ms\n    // 2. Switch Authenticator requests EAP Identity (eapcode 1 = Request, eapmethod 1 = Identity)\n    access_sw -> laptop eapol eappacket version 2 eapcode 1 eapid 1 eapmethod 1 dstmac 00:1b:21:55:66:77 wait 3ms\n    // 3. Supplicant responds with corporate identity\n    laptop -> access_sw eapol eappacket version 2 eapcode 2 eapid 1 eapmethod 1 identity \"corp\\\\jdoe\" wait 2ms\n    // 4. Switch forwards authentication upstream to RADIUS AAA server\n    access_sw -> radius_srv radius accessrequest id 10 user \"corp\\\\jdoe\" nasip 10.20.0.2 wait 4ms\n    access_sw <- radius_srv radius accessaccept id 10 framedip 10.20.100.45 wait 2ms\n    // 5. Switch grants port access with EAP-Success (eapcode 3)\n    access_sw -> laptop eapol eappacket version 2 eapcode 3 eapid 1 dstmac 00:1b:21:55:66:77\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: MAC 00:1b:21:55:66:77 -> 10.20.0.2 (00:1c:73:00:01:02) | eapol start version 2\nFrame 2 [t=0.002000000s]: 10.20.0.2 (00:1c:73:00:01:02) -> MAC 00:1b:21:55:66:77 | eapol eappacket version 2 eapcode 1 eapid 1 eapmethod 1 dstmac 00:1b:21:55:66:77\nFrame 3 [t=0.005000000s]: MAC 00:1b:21:55:66:77 -> 10.20.0.2 (00:1c:73:00:01:02) | eapol eappacket version 2 eapcode 2 eapid 1 eapmethod 1 identity \"corp\\\\jdoe\"\nFrame 4 [t=0.007000000s]: 10.20.0.2 (00:1c:73:00:01:02) -> 10.20.0.50 (00:50:56:00:00:50) | radius accessrequest id 10 user \"corp\\\\jdoe\" nasip 10.20.0.2\nFrame 5 [t=0.011000000s]: 10.20.0.50 (00:50:56:00:00:50) -> 10.20.0.2 (00:1c:73:00:01:02) | radius accessaccept id 10 framedip 10.20.100.45\nFrame 6 [t=0.013000000s]: 10.20.0.2 (00:1c:73:00:01:02) -> MAC 00:1b:21:55:66:77 | eapol eappacket version 2 eapcode 3 eapid 1 dstmac 00:1b:21:55:66:77\n```"},{"role":"assistant","content":"Reconstructs the 6-frame capture (`eapol`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost laptop    { mac 00:1b:21:55:66:77 }\nhost access_sw { ip 10.20.0.2  mac 00:1c:73:00:01:02 }\nhost radius_srv { ip 10.20.0.50 mac 00:50:56:00:00:50 }\n\ncompile {\n    // 1. Supplicant initiates 802.1X on physical switch port\n    laptop -> access_sw eapol start version 2 wait 2ms\n    // 2. Switch Authenticator requests EAP Identity (eapcode 1 = Request, eapmethod 1 = Identity)\n    access_sw -> laptop eapol eappacket version 2 eapcode 1 eapid 1 eapmethod 1 dstmac 00:1b:21:55:66:77 wait 3ms\n    // 3. Supplicant responds with corporate identity\n    laptop -> access_sw eapol eappacket version 2 eapcode 2 eapid 1 eapmethod 1 identity \"corp\\\\jdoe\" wait 2ms\n    // 4. Switch forwards authentication upstream to RADIUS AAA server\n    access_sw -> radius_srv radius accessrequest id 10 user \"corp\\\\jdoe\" nasip 10.20.0.2 wait 4ms\n    access_sw <- radius_srv radius accessaccept id 10 framedip 10.20.100.45 wait 2ms\n    // 5. Switch grants port access with EAP-Success (eapcode 3)\n    access_sw -> laptop eapol eappacket version 2 eapcode 3 eapid 1 dstmac 00:1b:21:55:66:77\n}\n```"}]}
{"id":"sft-reverse-proto-lab-mpls","task_type":"reverse_decompile","protocols":["mpls","vlan","tcp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.100.1.10 (00:1c:73:10:01:01) -> 10.100.2.20 (00:1c:73:20:02:02) | mpls 16001 mpls 24010 exp 6 mplsttl 64 vlan 400 payload \"sr-oam-ping\"\nFrame 2 [t=0.002000000s]: 10.100.1.10 (00:1c:73:10:01:01) -> 10.100.2.20 (00:1c:73:20:02:02) | tcp syn srcport 52443 dstport 443 win 65535 mss 1440 vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63\nFrame 3 [t=0.003000000s]: 10.100.2.20 (00:1c:73:20:02:02) -> 10.100.1.10 (00:1c:73:10:01:01) | tcp syn ack win 65535 mss 1440 vlan 400 mpls 16001 mpls 24020 exp 4 mplsttl 63\nFrame 4 [t=0.004000000s]: 10.100.1.10 (00:1c:73:10:01:01) -> 10.100.2.20 (00:1c:73:20:02:02) | tcp ack vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63\nFrame 5 [t=0.005000000s]: 10.100.1.10 (00:1c:73:10:01:01) -> 10.100.2.20 (00:1c:73:20:02:02) | tls clienthello sni \"erp.vrf-prod.internal\" alpn \"h2\" vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63\nFrame 6 [t=0.007000000s]: 2001:db8:50::10 (00:1c:73:10:01:01) -> 2001:db8:60::20 (00:1c:73:20:02:02) | icmp echorequest id 9 seq 1 vlan 400 mpls 16002 mpls 24055 tc 5 mplsttl 62\n```","completion":"Reconstructs the 6-frame capture (`mpls`, `vlan`, `tcp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost pe1_v4 { ip 10.100.1.10 mac 00:1c:73:10:01:01 }\nhost pe2_v4 { ip 10.100.2.20 mac 00:1c:73:20:02:02 }\nhost ce1_v6 { ip 2001:db8:50::10 mac 00:1c:73:10:01:01 }\nhost ce2_v6 { ip 2001:db8:60::20 mac 00:1c:73:20:02:02 }\n\ncompile {\n    // 1. Standalone 2-label SR-MPLS OAM probe over VLAN 400 (outer Node SID 16001, inner VPN label 24010)\n    pe1_v4 -> pe2_v4 mpls 16001 mpls 24010 exp 6 mplsttl 64 vlan 400 payload \"sr-oam-ping\" wait 2ms\n    // 2. L3VPN IPv4 HTTPS TLS ClientHello inside outer label 16002 + inner VPN label 24010\n    pe1_v4 -> pe2_v4 tcp syn srcport 52443 dstport 443 win 65535 mss 1440 vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63 wait 1ms\n    pe1_v4 <- pe2_v4 tcp syn ack win 65535 mss 1440 vlan 400 mpls 16001 mpls 24020 exp 4 mplsttl 63 wait 1ms\n    pe1_v4 -> pe2_v4 tcp ack vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63 wait 1ms\n    pe1_v4 -> pe2_v4 tls clienthello sni \"erp.vrf-prod.internal\" alpn \"h2\" vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63 wait 2ms\n    // 3. 6VPE IPv6 ICMPv6 Echo inside MPLS label stack (16002 -> 24055)\n    ce1_v6 -> ce2_v6 icmp echorequest id 9 seq 1 vlan 400 mpls 16002 mpls 24055 tc 5 mplsttl 62\n}\n```","frasm_code":"host pe1_v4 { ip 10.100.1.10 mac 00:1c:73:10:01:01 }\nhost pe2_v4 { ip 10.100.2.20 mac 00:1c:73:20:02:02 }\nhost ce1_v6 { ip 2001:db8:50::10 mac 00:1c:73:10:01:01 }\nhost ce2_v6 { ip 2001:db8:60::20 mac 00:1c:73:20:02:02 }\n\ncompile {\n    // 1. Standalone 2-label SR-MPLS OAM probe over VLAN 400 (outer Node SID 16001, inner VPN label 24010)\n    pe1_v4 -> pe2_v4 mpls 16001 mpls 24010 exp 6 mplsttl 64 vlan 400 payload \"sr-oam-ping\" wait 2ms\n    // 2. L3VPN IPv4 HTTPS TLS ClientHello inside outer label 16002 + inner VPN label 24010\n    pe1_v4 -> pe2_v4 tcp syn srcport 52443 dstport 443 win 65535 mss 1440 vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63 wait 1ms\n    pe1_v4 <- pe2_v4 tcp syn ack win 65535 mss 1440 vlan 400 mpls 16001 mpls 24020 exp 4 mplsttl 63 wait 1ms\n    pe1_v4 -> pe2_v4 tcp ack vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63 wait 1ms\n    pe1_v4 -> pe2_v4 tls clienthello sni \"erp.vrf-prod.internal\" alpn \"h2\" vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63 wait 2ms\n    // 3. 6VPE IPv6 ICMPv6 Echo inside MPLS label stack (16002 -> 24055)\n    ce1_v6 -> ce2_v6 icmp echorequest id 9 seq 1 vlan 400 mpls 16002 mpls 24055 tc 5 mplsttl 62\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.100.1.10 (00:1c:73:10:01:01) -> 10.100.2.20 (00:1c:73:20:02:02) | mpls 16001 mpls 24010 exp 6 mplsttl 64 vlan 400 payload \"sr-oam-ping\"\nFrame 2 [t=0.002000000s]: 10.100.1.10 (00:1c:73:10:01:01) -> 10.100.2.20 (00:1c:73:20:02:02) | tcp syn srcport 52443 dstport 443 win 65535 mss 1440 vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63\nFrame 3 [t=0.003000000s]: 10.100.2.20 (00:1c:73:20:02:02) -> 10.100.1.10 (00:1c:73:10:01:01) | tcp syn ack win 65535 mss 1440 vlan 400 mpls 16001 mpls 24020 exp 4 mplsttl 63\nFrame 4 [t=0.004000000s]: 10.100.1.10 (00:1c:73:10:01:01) -> 10.100.2.20 (00:1c:73:20:02:02) | tcp ack vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63\nFrame 5 [t=0.005000000s]: 10.100.1.10 (00:1c:73:10:01:01) -> 10.100.2.20 (00:1c:73:20:02:02) | tls clienthello sni \"erp.vrf-prod.internal\" alpn \"h2\" vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63\nFrame 6 [t=0.007000000s]: 2001:db8:50::10 (00:1c:73:10:01:01) -> 2001:db8:60::20 (00:1c:73:20:02:02) | icmp echorequest id 9 seq 1 vlan 400 mpls 16002 mpls 24055 tc 5 mplsttl 62\n```"},{"role":"assistant","content":"Reconstructs the 6-frame capture (`mpls`, `vlan`, `tcp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost pe1_v4 { ip 10.100.1.10 mac 00:1c:73:10:01:01 }\nhost pe2_v4 { ip 10.100.2.20 mac 00:1c:73:20:02:02 }\nhost ce1_v6 { ip 2001:db8:50::10 mac 00:1c:73:10:01:01 }\nhost ce2_v6 { ip 2001:db8:60::20 mac 00:1c:73:20:02:02 }\n\ncompile {\n    // 1. Standalone 2-label SR-MPLS OAM probe over VLAN 400 (outer Node SID 16001, inner VPN label 24010)\n    pe1_v4 -> pe2_v4 mpls 16001 mpls 24010 exp 6 mplsttl 64 vlan 400 payload \"sr-oam-ping\" wait 2ms\n    // 2. L3VPN IPv4 HTTPS TLS ClientHello inside outer label 16002 + inner VPN label 24010\n    pe1_v4 -> pe2_v4 tcp syn srcport 52443 dstport 443 win 65535 mss 1440 vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63 wait 1ms\n    pe1_v4 <- pe2_v4 tcp syn ack win 65535 mss 1440 vlan 400 mpls 16001 mpls 24020 exp 4 mplsttl 63 wait 1ms\n    pe1_v4 -> pe2_v4 tcp ack vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63 wait 1ms\n    pe1_v4 -> pe2_v4 tls clienthello sni \"erp.vrf-prod.internal\" alpn \"h2\" vlan 400 mpls 16002 mpls 24010 exp 4 mplsttl 63 wait 2ms\n    // 3. 6VPE IPv6 ICMPv6 Echo inside MPLS label stack (16002 -> 24055)\n    ce1_v6 -> ce2_v6 icmp echorequest id 9 seq 1 vlan 400 mpls 16002 mpls 24055 tc 5 mplsttl 62\n}\n```"}]}
{"id":"sft-reverse-ex-l3-ipv4-manual-fragmentation","task_type":"reverse_decompile","protocols":["udp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 172.16.30.10 (00:00:00:00:00:01) -> 172.16.30.50 (00:00:00:00:00:02) | udp srcport 54100 dstport 9000 ipid 0x7788 mf fragoffset 0 payload \"FRAGMENT-PART-01\"\nFrame 2 [t=0.001000000s]: 172.16.30.10 (00:00:00:00:00:01) -> 172.16.30.50 (00:00:00:00:00:02) | udp srcport 54100 dstport 9000 ipid 0x7788 fragoffset 2 payload \"FRAGMENT-PART-02\"\n```","completion":"Reconstructs the 2-frame capture (`udp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost sender_box { ip 172.16.30.10 }\nhost dpi_sensor { ip 172.16.30.50 }\n\ncompile {\n    sender_box -> dpi_sensor udp srcport 54100 dstport 9000 ipid 0x7788 mf fragoffset 0 payload \"FRAGMENT-PART-01\" wait 1ms\n    sender_box -> dpi_sensor udp srcport 54100 dstport 9000 ipid 0x7788 fragoffset 2 payload \"FRAGMENT-PART-02\"\n}\n```","frasm_code":"host sender_box { ip 172.16.30.10 }\nhost dpi_sensor { ip 172.16.30.50 }\n\ncompile {\n    sender_box -> dpi_sensor udp srcport 54100 dstport 9000 ipid 0x7788 mf fragoffset 0 payload \"FRAGMENT-PART-01\" wait 1ms\n    sender_box -> dpi_sensor udp srcport 54100 dstport 9000 ipid 0x7788 fragoffset 2 payload \"FRAGMENT-PART-02\"\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 172.16.30.10 (00:00:00:00:00:01) -> 172.16.30.50 (00:00:00:00:00:02) | udp srcport 54100 dstport 9000 ipid 0x7788 mf fragoffset 0 payload \"FRAGMENT-PART-01\"\nFrame 2 [t=0.001000000s]: 172.16.30.10 (00:00:00:00:00:01) -> 172.16.30.50 (00:00:00:00:00:02) | udp srcport 54100 dstport 9000 ipid 0x7788 fragoffset 2 payload \"FRAGMENT-PART-02\"\n```"},{"role":"assistant","content":"Reconstructs the 2-frame capture (`udp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost sender_box { ip 172.16.30.10 }\nhost dpi_sensor { ip 172.16.30.50 }\n\ncompile {\n    sender_box -> dpi_sensor udp srcport 54100 dstport 9000 ipid 0x7788 mf fragoffset 0 payload \"FRAGMENT-PART-01\" wait 1ms\n    sender_box -> dpi_sensor udp srcport 54100 dstport 9000 ipid 0x7788 fragoffset 2 payload \"FRAGMENT-PART-02\"\n}\n```"}]}
{"id":"sft-reverse-ex-l3-traceroute-ttl-expiry","task_type":"reverse_decompile","protocols":["udp","icmp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.10.0.25 (00:00:00:00:00:01) -> 10.90.0.40 (00:00:00:00:00:03) | udp srcport 51200 dstport 33434 ttl 1 payload \"probe-hop-1\"\nFrame 2 [t=0.002000000s]: 10.10.0.1 (00:00:00:00:00:02) -> 10.10.0.25 (00:00:00:00:00:01) | icmp timeexceeded type 11 code 0\nFrame 3 [t=0.007000000s]: 10.10.0.25 (00:00:00:00:00:01) -> 10.90.0.40 (00:00:00:00:00:03) | udp srcport 51200 dstport 33435 ttl 2 payload \"probe-hop-2\"\nFrame 4 [t=0.010000000s]: 10.90.0.40 (00:00:00:00:00:03) -> 10.10.0.25 (00:00:00:00:00:01) | icmp destunreach type 3 code 3\n```","completion":"Reconstructs the 4-frame capture (`udp`, `icmp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost workstation { ip 10.10.0.25 }\nhost hop1_router { ip 10.10.0.1 }\nhost dest_server { ip 10.90.0.40 }\n\ncompile {\n    workstation -> dest_server udp srcport 51200 dstport 33434 ttl 1 payload \"probe-hop-1\" wait 2ms\n    hop1_router -> workstation icmp timeexceeded type 11 code 0 wait 5ms\n    workstation -> dest_server udp srcport 51200 dstport 33435 ttl 2 payload \"probe-hop-2\" wait 3ms\n    dest_server -> workstation icmp destunreach type 3 code 3\n}\n```","frasm_code":"host workstation { ip 10.10.0.25 }\nhost hop1_router { ip 10.10.0.1 }\nhost dest_server { ip 10.90.0.40 }\n\ncompile {\n    workstation -> dest_server udp srcport 51200 dstport 33434 ttl 1 payload \"probe-hop-1\" wait 2ms\n    hop1_router -> workstation icmp timeexceeded type 11 code 0 wait 5ms\n    workstation -> dest_server udp srcport 51200 dstport 33435 ttl 2 payload \"probe-hop-2\" wait 3ms\n    dest_server -> workstation icmp destunreach type 3 code 3\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.10.0.25 (00:00:00:00:00:01) -> 10.90.0.40 (00:00:00:00:00:03) | udp srcport 51200 dstport 33434 ttl 1 payload \"probe-hop-1\"\nFrame 2 [t=0.002000000s]: 10.10.0.1 (00:00:00:00:00:02) -> 10.10.0.25 (00:00:00:00:00:01) | icmp timeexceeded type 11 code 0\nFrame 3 [t=0.007000000s]: 10.10.0.25 (00:00:00:00:00:01) -> 10.90.0.40 (00:00:00:00:00:03) | udp srcport 51200 dstport 33435 ttl 2 payload \"probe-hop-2\"\nFrame 4 [t=0.010000000s]: 10.90.0.40 (00:00:00:00:00:03) -> 10.10.0.25 (00:00:00:00:00:01) | icmp destunreach type 3 code 3\n```"},{"role":"assistant","content":"Reconstructs the 4-frame capture (`udp`, `icmp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost workstation { ip 10.10.0.25 }\nhost hop1_router { ip 10.10.0.1 }\nhost dest_server { ip 10.90.0.40 }\n\ncompile {\n    workstation -> dest_server udp srcport 51200 dstport 33434 ttl 1 payload \"probe-hop-1\" wait 2ms\n    hop1_router -> workstation icmp timeexceeded type 11 code 0 wait 5ms\n    workstation -> dest_server udp srcport 51200 dstport 33435 ttl 2 payload \"probe-hop-2\" wait 3ms\n    dest_server -> workstation icmp destunreach type 3 code 3\n}\n```"}]}
{"id":"sft-reverse-ex-l3-ipv6-slaac-ndp-dad","task_type":"reverse_decompile","protocols":["ndp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: fe80::21a:2bff:fe3c:4d5e (00:1a:2b:3c:4d:5e) -> fe80::1 (00:1c:73:00:00:01) | ndp routersolicit slla 00:1a:2b:3c:4d:5e\nFrame 2 [t=0.003000000s]: fe80::1 (00:1c:73:00:00:01) -> fe80::21a:2bff:fe3c:4d5e (00:1a:2b:3c:4d:5e) | ndp routeradvert routerlifetime 1800 slla 00:1c:73:00:00:01\nFrame 3 [t=0.008000000s]: fe80::21a:2bff:fe3c:4d5e (00:1a:2b:3c:4d:5e) -> fe80::1 (00:1c:73:00:00:01) | ndp neighborsolicit target fe80::1 slla 00:1a:2b:3c:4d:5e\nFrame 4 [t=0.009000000s]: fe80::1 (00:1c:73:00:00:01) -> fe80::21a:2bff:fe3c:4d5e (00:1a:2b:3c:4d:5e) | ndp neighboradvert target fe80::1 tlla 00:1c:73:00:00:01\n```","completion":"Reconstructs the 4-frame capture (`ndp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost host_v6   { ip fe80::21a:2bff:fe3c:4d5e mac 00:1a:2b:3c:4d:5e }\nhost router_v6 { ip fe80::1                   mac 00:1c:73:00:00:01 }\n\ncompile {\n    host_v6 -> router_v6 ndp routersolicit slla 00:1a:2b:3c:4d:5e wait 3ms\n    host_v6 <- router_v6 ndp routeradvert routerlifetime 1800 slla 00:1c:73:00:00:01 wait 5ms\n    host_v6 -> router_v6 ndp neighborsolicit target fe80::1 slla 00:1a:2b:3c:4d:5e wait 1ms\n    host_v6 <- router_v6 ndp neighboradvert target fe80::1 tlla 00:1c:73:00:00:01\n}\n```","frasm_code":"host host_v6   { ip fe80::21a:2bff:fe3c:4d5e mac 00:1a:2b:3c:4d:5e }\nhost router_v6 { ip fe80::1                   mac 00:1c:73:00:00:01 }\n\ncompile {\n    host_v6 -> router_v6 ndp routersolicit slla 00:1a:2b:3c:4d:5e wait 3ms\n    host_v6 <- router_v6 ndp routeradvert routerlifetime 1800 slla 00:1c:73:00:00:01 wait 5ms\n    host_v6 -> router_v6 ndp neighborsolicit target fe80::1 slla 00:1a:2b:3c:4d:5e wait 1ms\n    host_v6 <- router_v6 ndp neighboradvert target fe80::1 tlla 00:1c:73:00:00:01\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: fe80::21a:2bff:fe3c:4d5e (00:1a:2b:3c:4d:5e) -> fe80::1 (00:1c:73:00:00:01) | ndp routersolicit slla 00:1a:2b:3c:4d:5e\nFrame 2 [t=0.003000000s]: fe80::1 (00:1c:73:00:00:01) -> fe80::21a:2bff:fe3c:4d5e (00:1a:2b:3c:4d:5e) | ndp routeradvert routerlifetime 1800 slla 00:1c:73:00:00:01\nFrame 3 [t=0.008000000s]: fe80::21a:2bff:fe3c:4d5e (00:1a:2b:3c:4d:5e) -> fe80::1 (00:1c:73:00:00:01) | ndp neighborsolicit target fe80::1 slla 00:1a:2b:3c:4d:5e\nFrame 4 [t=0.009000000s]: fe80::1 (00:1c:73:00:00:01) -> fe80::21a:2bff:fe3c:4d5e (00:1a:2b:3c:4d:5e) | ndp neighboradvert target fe80::1 tlla 00:1c:73:00:00:01\n```"},{"role":"assistant","content":"Reconstructs the 4-frame capture (`ndp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost host_v6   { ip fe80::21a:2bff:fe3c:4d5e mac 00:1a:2b:3c:4d:5e }\nhost router_v6 { ip fe80::1                   mac 00:1c:73:00:00:01 }\n\ncompile {\n    host_v6 -> router_v6 ndp routersolicit slla 00:1a:2b:3c:4d:5e wait 3ms\n    host_v6 <- router_v6 ndp routeradvert routerlifetime 1800 slla 00:1c:73:00:00:01 wait 5ms\n    host_v6 -> router_v6 ndp neighborsolicit target fe80::1 slla 00:1a:2b:3c:4d:5e wait 1ms\n    host_v6 <- router_v6 ndp neighboradvert target fe80::1 tlla 00:1c:73:00:00:01\n}\n```"}]}
{"id":"sft-reverse-lib-fw-pmtud-df-icmp","task_type":"reverse_decompile","protocols":["tcp","http","icmp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.25.1.15 (00:00:00:00:00:01) -> 10.90.5.80 (00:00:00:00:00:03) | tcp syn srcport 54210 dstport 80 win 65535 mss 1460 df\nFrame 2 [t=0.002000000s]: 10.90.5.80 (00:00:00:00:00:03) -> 10.25.1.15 (00:00:00:00:00:01) | tcp syn ack win 65535 mss 1460 df\nFrame 3 [t=0.004000000s]: 10.25.1.15 (00:00:00:00:00:01) -> 10.90.5.80 (00:00:00:00:00:03) | tcp ack df\nFrame 4 [t=0.005000000s]: 10.25.1.15 (00:00:00:00:00:01) -> 10.90.5.80 (00:00:00:00:00:03) | http post uri \"/upload\" hosthdr \"files.corp.internal\" body \"large-unfragmentable-payload-block\" df\nFrame 5 [t=0.007000000s]: 10.25.1.1 (00:00:00:00:00:02) -> 10.25.1.15 (00:00:00:00:00:01) | icmp destunreach type 3 code 4\n```","completion":"Reconstructs the 5-frame capture (`tcp`, `http`, `icmp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\n// Branch client, VPN tunnel router (1400-byte MTU), and remote web server\nhost branch_client { ip 10.25.1.15 }\nhost vpn_router    { ip 10.25.1.1 }\nhost remote_web    { ip 10.90.5.80 }\n\ncompile {\n    // 1. Normal TCP 3-way handshake succeeds (small 60-byte packets pass any MTU)\n    branch_client -> remote_web tcp syn srcport 54210 dstport 80 win 65535 mss 1460 df wait 2ms\n    branch_client <- remote_web tcp syn ack win 65535 mss 1460 df wait 2ms\n    branch_client -> remote_web tcp ack df wait 1ms\n\n    // 2. Client sends HTTP request with Don't-Fragment (df) flag set\n    branch_client -> remote_web http post uri \"/upload\" hosthdr \"files.corp.internal\" body \"large-unfragmentable-payload-block\" df wait 2ms\n\n    // 3. Tunnel router notifies client to lower its packet size (ICMP Type 3, Code 4)\n    vpn_router -> branch_client icmp destunreach type 3 code 4\n}\n```","frasm_code":"// Branch client, VPN tunnel router (1400-byte MTU), and remote web server\nhost branch_client { ip 10.25.1.15 }\nhost vpn_router    { ip 10.25.1.1 }\nhost remote_web    { ip 10.90.5.80 }\n\ncompile {\n    // 1. Normal TCP 3-way handshake succeeds (small 60-byte packets pass any MTU)\n    branch_client -> remote_web tcp syn srcport 54210 dstport 80 win 65535 mss 1460 df wait 2ms\n    branch_client <- remote_web tcp syn ack win 65535 mss 1460 df wait 2ms\n    branch_client -> remote_web tcp ack df wait 1ms\n\n    // 2. Client sends HTTP request with Don't-Fragment (df) flag set\n    branch_client -> remote_web http post uri \"/upload\" hosthdr \"files.corp.internal\" body \"large-unfragmentable-payload-block\" df wait 2ms\n\n    // 3. Tunnel router notifies client to lower its packet size (ICMP Type 3, Code 4)\n    vpn_router -> branch_client icmp destunreach type 3 code 4\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.25.1.15 (00:00:00:00:00:01) -> 10.90.5.80 (00:00:00:00:00:03) | tcp syn srcport 54210 dstport 80 win 65535 mss 1460 df\nFrame 2 [t=0.002000000s]: 10.90.5.80 (00:00:00:00:00:03) -> 10.25.1.15 (00:00:00:00:00:01) | tcp syn ack win 65535 mss 1460 df\nFrame 3 [t=0.004000000s]: 10.25.1.15 (00:00:00:00:00:01) -> 10.90.5.80 (00:00:00:00:00:03) | tcp ack df\nFrame 4 [t=0.005000000s]: 10.25.1.15 (00:00:00:00:00:01) -> 10.90.5.80 (00:00:00:00:00:03) | http post uri \"/upload\" hosthdr \"files.corp.internal\" body \"large-unfragmentable-payload-block\" df\nFrame 5 [t=0.007000000s]: 10.25.1.1 (00:00:00:00:00:02) -> 10.25.1.15 (00:00:00:00:00:01) | icmp destunreach type 3 code 4\n```"},{"role":"assistant","content":"Reconstructs the 5-frame capture (`tcp`, `http`, `icmp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\n// Branch client, VPN tunnel router (1400-byte MTU), and remote web server\nhost branch_client { ip 10.25.1.15 }\nhost vpn_router    { ip 10.25.1.1 }\nhost remote_web    { ip 10.90.5.80 }\n\ncompile {\n    // 1. Normal TCP 3-way handshake succeeds (small 60-byte packets pass any MTU)\n    branch_client -> remote_web tcp syn srcport 54210 dstport 80 win 65535 mss 1460 df wait 2ms\n    branch_client <- remote_web tcp syn ack win 65535 mss 1460 df wait 2ms\n    branch_client -> remote_web tcp ack df wait 1ms\n\n    // 2. Client sends HTTP request with Don't-Fragment (df) flag set\n    branch_client -> remote_web http post uri \"/upload\" hosthdr \"files.corp.internal\" body \"large-unfragmentable-payload-block\" df wait 2ms\n\n    // 3. Tunnel router notifies client to lower its packet size (ICMP Type 3, Code 4)\n    vpn_router -> branch_client icmp destunreach type 3 code 4\n}\n```"}]}
{"id":"sft-reverse-lib-scan-icmp-ping-sweep","task_type":"reverse_decompile","protocols":["icmp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.12.0.50 (00:00:00:00:00:01) -> 10.12.10.10 (00:00:00:00:00:03) | icmp echorequest id 300 seq 1\nFrame 2 [t=0.001000000s]: 10.12.10.10 (00:00:00:00:00:03) -> 10.12.0.50 (00:00:00:00:00:01) | icmp echoreply id 300 seq 1\nFrame 3 [t=0.004000000s]: 10.12.0.50 (00:00:00:00:00:01) -> 10.12.10.20 (00:00:00:00:00:04) | icmp echorequest id 300 seq 2\nFrame 4 [t=0.006000000s]: 10.12.10.20 (00:00:00:00:00:04) -> 10.12.0.50 (00:00:00:00:00:01) | icmp echoreply id 300 seq 2\nFrame 5 [t=0.009000000s]: 10.12.0.50 (00:00:00:00:00:01) -> 10.12.10.99 (00:00:00:00:00:05) | icmp echorequest id 300 seq 3\nFrame 6 [t=0.024000000s]: 10.12.10.1 (00:00:00:00:00:02) -> 10.12.0.50 (00:00:00:00:00:01) | icmp destunreach type 3 code 1\n```","completion":"Reconstructs the 6-frame capture (`icmp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\n// Admin workstation, branch router, and three target IPs\nhost admin_pc   { ip 10.12.0.50 }\nhost branch_rtr { ip 10.12.10.1 }\nhost dns_01     { ip 10.12.10.10 }\nhost print_01   { ip 10.12.10.20 }\nhost offline_pc { ip 10.12.10.99 }\n\ncompile {\n    // Target 1 (.10): Online DNS server replies in 1ms\n    admin_pc -> dns_01 icmp echorequest id 300 seq 1 wait 1ms\n    admin_pc <- dns_01 icmp echoreply id 300 seq 1 wait 3ms\n\n    // Target 2 (.20): Online printer replies in 2ms\n    admin_pc -> print_01 icmp echorequest id 300 seq 2 wait 2ms\n    admin_pc <- print_01 icmp echoreply id 300 seq 2 wait 3ms\n\n    // Target 3 (.99): Offline host -> Router returns ICMP Host Unreachable (Type 3, Code 1)\n    admin_pc -> offline_pc icmp echorequest id 300 seq 3 wait 15ms\n    branch_rtr -> admin_pc icmp destunreach type 3 code 1\n}\n```","frasm_code":"// Admin workstation, branch router, and three target IPs\nhost admin_pc   { ip 10.12.0.50 }\nhost branch_rtr { ip 10.12.10.1 }\nhost dns_01     { ip 10.12.10.10 }\nhost print_01   { ip 10.12.10.20 }\nhost offline_pc { ip 10.12.10.99 }\n\ncompile {\n    // Target 1 (.10): Online DNS server replies in 1ms\n    admin_pc -> dns_01 icmp echorequest id 300 seq 1 wait 1ms\n    admin_pc <- dns_01 icmp echoreply id 300 seq 1 wait 3ms\n\n    // Target 2 (.20): Online printer replies in 2ms\n    admin_pc -> print_01 icmp echorequest id 300 seq 2 wait 2ms\n    admin_pc <- print_01 icmp echoreply id 300 seq 2 wait 3ms\n\n    // Target 3 (.99): Offline host -> Router returns ICMP Host Unreachable (Type 3, Code 1)\n    admin_pc -> offline_pc icmp echorequest id 300 seq 3 wait 15ms\n    branch_rtr -> admin_pc icmp destunreach type 3 code 1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.12.0.50 (00:00:00:00:00:01) -> 10.12.10.10 (00:00:00:00:00:03) | icmp echorequest id 300 seq 1\nFrame 2 [t=0.001000000s]: 10.12.10.10 (00:00:00:00:00:03) -> 10.12.0.50 (00:00:00:00:00:01) | icmp echoreply id 300 seq 1\nFrame 3 [t=0.004000000s]: 10.12.0.50 (00:00:00:00:00:01) -> 10.12.10.20 (00:00:00:00:00:04) | icmp echorequest id 300 seq 2\nFrame 4 [t=0.006000000s]: 10.12.10.20 (00:00:00:00:00:04) -> 10.12.0.50 (00:00:00:00:00:01) | icmp echoreply id 300 seq 2\nFrame 5 [t=0.009000000s]: 10.12.0.50 (00:00:00:00:00:01) -> 10.12.10.99 (00:00:00:00:00:05) | icmp echorequest id 300 seq 3\nFrame 6 [t=0.024000000s]: 10.12.10.1 (00:00:00:00:00:02) -> 10.12.0.50 (00:00:00:00:00:01) | icmp destunreach type 3 code 1\n```"},{"role":"assistant","content":"Reconstructs the 6-frame capture (`icmp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\n// Admin workstation, branch router, and three target IPs\nhost admin_pc   { ip 10.12.0.50 }\nhost branch_rtr { ip 10.12.10.1 }\nhost dns_01     { ip 10.12.10.10 }\nhost print_01   { ip 10.12.10.20 }\nhost offline_pc { ip 10.12.10.99 }\n\ncompile {\n    // Target 1 (.10): Online DNS server replies in 1ms\n    admin_pc -> dns_01 icmp echorequest id 300 seq 1 wait 1ms\n    admin_pc <- dns_01 icmp echoreply id 300 seq 1 wait 3ms\n\n    // Target 2 (.20): Online printer replies in 2ms\n    admin_pc -> print_01 icmp echorequest id 300 seq 2 wait 2ms\n    admin_pc <- print_01 icmp echoreply id 300 seq 2 wait 3ms\n\n    // Target 3 (.99): Offline host -> Router returns ICMP Host Unreachable (Type 3, Code 1)\n    admin_pc -> offline_pc icmp echorequest id 300 seq 3 wait 15ms\n    branch_rtr -> admin_pc icmp destunreach type 3 code 1\n}\n```"}]}
{"id":"sft-reverse-proto-quickstart-icmp","task_type":"reverse_decompile","protocols":["icmp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.0.0.10 (00:00:00:00:00:01) -> 10.0.0.1 (00:00:00:00:00:02) | icmp echorequest\nFrame 2 [t=0.002000000s]: 10.0.0.1 (00:00:00:00:00:02) -> 10.0.0.10 (00:00:00:00:00:01) | icmp echoreply\n```","completion":"Reconstructs the 2-frame capture (`icmp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.0.0.10 (00:00:00:00:00:01) -> 10.0.0.1 (00:00:00:00:00:02) | icmp echorequest\nFrame 2 [t=0.002000000s]: 10.0.0.1 (00:00:00:00:00:02) -> 10.0.0.10 (00:00:00:00:00:01) | icmp echoreply\n```"},{"role":"assistant","content":"Reconstructs the 2-frame capture (`icmp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-reverse-proto-quickstart-ndp","task_type":"reverse_decompile","protocols":["ndp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 2001:db8:cafe::25 (00:1b:21:aa:00:25) -> 2001:db8:cafe::1 (00:1c:73:bb:00:01) | ndp neighborsolicit target 2001:db8:cafe::1 slla 00:1b:21:aa:00:25\nFrame 2 [t=0.001000000s]: 2001:db8:cafe::1 (00:1c:73:bb:00:01) -> 2001:db8:cafe::25 (00:1b:21:aa:00:25) | ndp neighboradvert target 2001:db8:cafe::1 tlla 00:1c:73:bb:00:01\n```","completion":"Reconstructs the 2-frame capture (`ndp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 2001:db8:cafe::25 (00:1b:21:aa:00:25) -> 2001:db8:cafe::1 (00:1c:73:bb:00:01) | ndp neighborsolicit target 2001:db8:cafe::1 slla 00:1b:21:aa:00:25\nFrame 2 [t=0.001000000s]: 2001:db8:cafe::1 (00:1c:73:bb:00:01) -> 2001:db8:cafe::25 (00:1b:21:aa:00:25) | ndp neighboradvert target 2001:db8:cafe::1 tlla 00:1c:73:bb:00:01\n```"},{"role":"assistant","content":"Reconstructs the 2-frame capture (`ndp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-reverse-proto-quickstart-igmp","task_type":"reverse_decompile","protocols":["igmp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.20.1.1 (00:00:00:00:00:01) -> 10.20.1.55 (00:00:00:00:00:02) | igmp v2 query group 224.0.0.1 maxresp 100\nFrame 2 [t=0.005000000s]: 10.20.1.55 (00:00:00:00:00:02) -> 10.20.1.1 (00:00:00:00:00:01) | igmp v2 report group 239.1.1.10\n```","completion":"Reconstructs the 2-frame capture (`igmp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.20.1.1 (00:00:00:00:00:01) -> 10.20.1.55 (00:00:00:00:00:02) | igmp v2 query group 224.0.0.1 maxresp 100\nFrame 2 [t=0.005000000s]: 10.20.1.55 (00:00:00:00:00:02) -> 10.20.1.1 (00:00:00:00:00:01) | igmp v2 report group 239.1.1.10\n```"},{"role":"assistant","content":"Reconstructs the 2-frame capture (`igmp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-reverse-proto-quickstart-mld","task_type":"reverse_decompile","protocols":["mld"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: fe80::1 (00:00:00:00:00:01) -> fe80::25 (00:00:00:00:00:02) | mld query maxrespdelay 10000\nFrame 2 [t=0.003000000s]: fe80::25 (00:00:00:00:00:02) -> fe80::1 (00:00:00:00:00:01) | mld report multicastaddr ff02::1:ff00:25\n```","completion":"Reconstructs the 2-frame capture (`mld`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: fe80::1 (00:00:00:00:00:01) -> fe80::25 (00:00:00:00:00:02) | mld query maxrespdelay 10000\nFrame 2 [t=0.003000000s]: fe80::25 (00:00:00:00:00:02) -> fe80::1 (00:00:00:00:00:01) | mld report multicastaddr ff02::1:ff00:25\n```"},{"role":"assistant","content":"Reconstructs the 2-frame capture (`mld`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-reverse-proto-lab-ndp","task_type":"reverse_decompile","protocols":["ndp","vlan"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: fe80::1b21:ff:feaa:10 (00:1b:21:aa:00:10) -> fe80::1c73:ff:febb:01 (00:1c:73:bb:00:01) | ndp routersolicit slla 00:1b:21:aa:00:10 vlan 100\nFrame 2 [t=0.002000000s]: fe80::1c73:ff:febb:01 (00:1c:73:bb:00:01) -> fe80::1b21:ff:feaa:10 (00:1b:21:aa:00:10) | ndp routeradvert routerlifetime 1800 slla 00:1c:73:bb:00:01 vlan 100\nFrame 3 [t=0.007000000s]: fe80::1b21:ff:feaa:10 (00:1b:21:aa:00:10) -> fe80::1c73:ff:febb:01 (00:1c:73:bb:00:01) | ndp neighborsolicit target fe80::1c73:ff:febb:01 slla 00:1b:21:aa:00:10 vlan 100\nFrame 4 [t=0.008000000s]: fe80::1c73:ff:febb:01 (00:1c:73:bb:00:01) -> fe80::1b21:ff:feaa:10 (00:1b:21:aa:00:10) | ndp neighboradvert target fe80::1c73:ff:febb:01 tlla 00:1c:73:bb:00:01 vlan 100\n```","completion":"Reconstructs the 4-frame capture (`ndp`, `vlan`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost leaf_node { ip fe80::1b21:ff:feaa:10 mac 00:1b:21:aa:00:10 }\nhost core_rtr  { ip fe80::1c73:ff:febb:01 mac 00:1c:73:bb:00:01 }\n\ncompile {\n    // 1. Host sends Router Solicitation with Source Link-Layer Address (SLLA)\n    leaf_node -> core_rtr ndp routersolicit slla 00:1b:21:aa:00:10 vlan 100 wait 2ms\n    // 2. Router replies with Router Advertisement (30-minute router lifetime)\n    core_rtr -> leaf_node ndp routeradvert routerlifetime 1800 slla 00:1c:73:bb:00:01 vlan 100 wait 5ms\n    // 3. Neighbor Solicitation & Solicited+Override Neighbor Advertisement\n    leaf_node -> core_rtr ndp neighborsolicit target fe80::1c73:ff:febb:01 slla 00:1b:21:aa:00:10 vlan 100 wait 1ms\n    leaf_node <- core_rtr ndp neighboradvert target fe80::1c73:ff:febb:01 tlla 00:1c:73:bb:00:01 vlan 100\n}\n```","frasm_code":"host leaf_node { ip fe80::1b21:ff:feaa:10 mac 00:1b:21:aa:00:10 }\nhost core_rtr  { ip fe80::1c73:ff:febb:01 mac 00:1c:73:bb:00:01 }\n\ncompile {\n    // 1. Host sends Router Solicitation with Source Link-Layer Address (SLLA)\n    leaf_node -> core_rtr ndp routersolicit slla 00:1b:21:aa:00:10 vlan 100 wait 2ms\n    // 2. Router replies with Router Advertisement (30-minute router lifetime)\n    core_rtr -> leaf_node ndp routeradvert routerlifetime 1800 slla 00:1c:73:bb:00:01 vlan 100 wait 5ms\n    // 3. Neighbor Solicitation & Solicited+Override Neighbor Advertisement\n    leaf_node -> core_rtr ndp neighborsolicit target fe80::1c73:ff:febb:01 slla 00:1b:21:aa:00:10 vlan 100 wait 1ms\n    leaf_node <- core_rtr ndp neighboradvert target fe80::1c73:ff:febb:01 tlla 00:1c:73:bb:00:01 vlan 100\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: fe80::1b21:ff:feaa:10 (00:1b:21:aa:00:10) -> fe80::1c73:ff:febb:01 (00:1c:73:bb:00:01) | ndp routersolicit slla 00:1b:21:aa:00:10 vlan 100\nFrame 2 [t=0.002000000s]: fe80::1c73:ff:febb:01 (00:1c:73:bb:00:01) -> fe80::1b21:ff:feaa:10 (00:1b:21:aa:00:10) | ndp routeradvert routerlifetime 1800 slla 00:1c:73:bb:00:01 vlan 100\nFrame 3 [t=0.007000000s]: fe80::1b21:ff:feaa:10 (00:1b:21:aa:00:10) -> fe80::1c73:ff:febb:01 (00:1c:73:bb:00:01) | ndp neighborsolicit target fe80::1c73:ff:febb:01 slla 00:1b:21:aa:00:10 vlan 100\nFrame 4 [t=0.008000000s]: fe80::1c73:ff:febb:01 (00:1c:73:bb:00:01) -> fe80::1b21:ff:feaa:10 (00:1b:21:aa:00:10) | ndp neighboradvert target fe80::1c73:ff:febb:01 tlla 00:1c:73:bb:00:01 vlan 100\n```"},{"role":"assistant","content":"Reconstructs the 4-frame capture (`ndp`, `vlan`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost leaf_node { ip fe80::1b21:ff:feaa:10 mac 00:1b:21:aa:00:10 }\nhost core_rtr  { ip fe80::1c73:ff:febb:01 mac 00:1c:73:bb:00:01 }\n\ncompile {\n    // 1. Host sends Router Solicitation with Source Link-Layer Address (SLLA)\n    leaf_node -> core_rtr ndp routersolicit slla 00:1b:21:aa:00:10 vlan 100 wait 2ms\n    // 2. Router replies with Router Advertisement (30-minute router lifetime)\n    core_rtr -> leaf_node ndp routeradvert routerlifetime 1800 slla 00:1c:73:bb:00:01 vlan 100 wait 5ms\n    // 3. Neighbor Solicitation & Solicited+Override Neighbor Advertisement\n    leaf_node -> core_rtr ndp neighborsolicit target fe80::1c73:ff:febb:01 slla 00:1b:21:aa:00:10 vlan 100 wait 1ms\n    leaf_node <- core_rtr ndp neighboradvert target fe80::1c73:ff:febb:01 tlla 00:1c:73:bb:00:01 vlan 100\n}\n```"}]}
{"id":"sft-reverse-proto-lab-igmp","task_type":"reverse_decompile","protocols":["igmp","vlan"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.50.0.1 (00:00:00:00:00:01) -> 224.0.0.1 (00:00:00:00:00:02) | igmp v2 query group 0.0.0.0 maxresp 100 vlan 50\nFrame 2 [t=0.004000000s]: 10.50.0.21 (00:00:00:00:00:03) -> 10.50.0.1 (00:00:00:00:00:01) | igmp v3 report group 239.255.10.1 vlan 50\nFrame 3 [t=0.007000000s]: 10.50.0.22 (00:00:00:00:00:04) -> 10.50.0.1 (00:00:00:00:00:01) | igmp v2 report group 239.255.10.2 vlan 50\nFrame 4 [t=0.027000000s]: 10.50.0.22 (00:00:00:00:00:04) -> 10.50.0.1 (00:00:00:00:00:01) | igmp v2 leave group 239.255.10.2 vlan 50\n```","completion":"Reconstructs the 4-frame capture (`igmp`, `vlan`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost mcast_rtr { ip 10.50.0.1 }\nhost all_hosts { ip 224.0.0.1 }\nhost decoder_1 { ip 10.50.0.21 }\nhost decoder_2 { ip 10.50.0.22 }\n\ncompile {\n    // 1. General Query to 224.0.0.1 (auto-derives MAC 01:00:5e:00:00:01)\n    mcast_rtr -> all_hosts igmp v2 query group 0.0.0.0 maxresp 100 vlan 50 wait 4ms\n    // 2. Receiver 1 sends IGMPv3 Membership Report for 239.255.10.1\n    decoder_1 -> mcast_rtr igmp v3 report group 239.255.10.1 vlan 50 wait 3ms\n    // 3. Receiver 2 joins and then leaves 239.255.10.2 via IGMPv2\n    decoder_2 -> mcast_rtr igmp v2 report group 239.255.10.2 vlan 50 wait 20ms\n    decoder_2 -> mcast_rtr igmp v2 leave group 239.255.10.2 vlan 50\n}\n```","frasm_code":"host mcast_rtr { ip 10.50.0.1 }\nhost all_hosts { ip 224.0.0.1 }\nhost decoder_1 { ip 10.50.0.21 }\nhost decoder_2 { ip 10.50.0.22 }\n\ncompile {\n    // 1. General Query to 224.0.0.1 (auto-derives MAC 01:00:5e:00:00:01)\n    mcast_rtr -> all_hosts igmp v2 query group 0.0.0.0 maxresp 100 vlan 50 wait 4ms\n    // 2. Receiver 1 sends IGMPv3 Membership Report for 239.255.10.1\n    decoder_1 -> mcast_rtr igmp v3 report group 239.255.10.1 vlan 50 wait 3ms\n    // 3. Receiver 2 joins and then leaves 239.255.10.2 via IGMPv2\n    decoder_2 -> mcast_rtr igmp v2 report group 239.255.10.2 vlan 50 wait 20ms\n    decoder_2 -> mcast_rtr igmp v2 leave group 239.255.10.2 vlan 50\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.50.0.1 (00:00:00:00:00:01) -> 224.0.0.1 (00:00:00:00:00:02) | igmp v2 query group 0.0.0.0 maxresp 100 vlan 50\nFrame 2 [t=0.004000000s]: 10.50.0.21 (00:00:00:00:00:03) -> 10.50.0.1 (00:00:00:00:00:01) | igmp v3 report group 239.255.10.1 vlan 50\nFrame 3 [t=0.007000000s]: 10.50.0.22 (00:00:00:00:00:04) -> 10.50.0.1 (00:00:00:00:00:01) | igmp v2 report group 239.255.10.2 vlan 50\nFrame 4 [t=0.027000000s]: 10.50.0.22 (00:00:00:00:00:04) -> 10.50.0.1 (00:00:00:00:00:01) | igmp v2 leave group 239.255.10.2 vlan 50\n```"},{"role":"assistant","content":"Reconstructs the 4-frame capture (`igmp`, `vlan`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost mcast_rtr { ip 10.50.0.1 }\nhost all_hosts { ip 224.0.0.1 }\nhost decoder_1 { ip 10.50.0.21 }\nhost decoder_2 { ip 10.50.0.22 }\n\ncompile {\n    // 1. General Query to 224.0.0.1 (auto-derives MAC 01:00:5e:00:00:01)\n    mcast_rtr -> all_hosts igmp v2 query group 0.0.0.0 maxresp 100 vlan 50 wait 4ms\n    // 2. Receiver 1 sends IGMPv3 Membership Report for 239.255.10.1\n    decoder_1 -> mcast_rtr igmp v3 report group 239.255.10.1 vlan 50 wait 3ms\n    // 3. Receiver 2 joins and then leaves 239.255.10.2 via IGMPv2\n    decoder_2 -> mcast_rtr igmp v2 report group 239.255.10.2 vlan 50 wait 20ms\n    decoder_2 -> mcast_rtr igmp v2 leave group 239.255.10.2 vlan 50\n}\n```"}]}
{"id":"sft-reverse-proto-lab-mld","task_type":"reverse_decompile","protocols":["mld","vlan"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: fe80::1c73:1 (00:00:00:00:00:01) -> ff02::1 (00:00:00:00:00:02) | mld query multicastaddr :: maxrespdelay 10000 vlan 200\nFrame 2 [t=0.004000000s]: fe80::1b21:50 (00:00:00:00:00:04) -> fe80::1c73:1 (00:00:00:00:00:01) | mld report multicastaddr ff05::100 maxrespdelay 0 vlan 200\nFrame 3 [t=0.029000000s]: fe80::1b21:50 (00:00:00:00:00:04) -> ff02::2 (00:00:00:00:00:03) | mld done multicastaddr ff05::100 vlan 200\n```","completion":"Reconstructs the 3-frame capture (`mld`, `vlan`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost querier_v6 { ip fe80::1c73:1 }\nhost all_nodes  { ip ff02::1 }\nhost all_rtrs   { ip ff02::2 }\nhost listener   { ip fe80::1b21:50 }\n\ncompile {\n    // 1. General MLD Query to ff02::1 (multicastaddr :: = all groups, 10000ms max delay)\n    querier_v6 -> all_nodes mld query multicastaddr :: maxrespdelay 10000 vlan 200 wait 4ms\n    // 2. Host joins site-local multicast stream ff05::100\n    listener -> querier_v6 mld report multicastaddr ff05::100 maxrespdelay 0 vlan 200 wait 25ms\n    // 3. Host sends MLD Done to all-routers multicast ff02::2 upon leaving\n    listener -> all_rtrs mld done multicastaddr ff05::100 vlan 200\n}\n```","frasm_code":"host querier_v6 { ip fe80::1c73:1 }\nhost all_nodes  { ip ff02::1 }\nhost all_rtrs   { ip ff02::2 }\nhost listener   { ip fe80::1b21:50 }\n\ncompile {\n    // 1. General MLD Query to ff02::1 (multicastaddr :: = all groups, 10000ms max delay)\n    querier_v6 -> all_nodes mld query multicastaddr :: maxrespdelay 10000 vlan 200 wait 4ms\n    // 2. Host joins site-local multicast stream ff05::100\n    listener -> querier_v6 mld report multicastaddr ff05::100 maxrespdelay 0 vlan 200 wait 25ms\n    // 3. Host sends MLD Done to all-routers multicast ff02::2 upon leaving\n    listener -> all_rtrs mld done multicastaddr ff05::100 vlan 200\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: fe80::1c73:1 (00:00:00:00:00:01) -> ff02::1 (00:00:00:00:00:02) | mld query multicastaddr :: maxrespdelay 10000 vlan 200\nFrame 2 [t=0.004000000s]: fe80::1b21:50 (00:00:00:00:00:04) -> fe80::1c73:1 (00:00:00:00:00:01) | mld report multicastaddr ff05::100 maxrespdelay 0 vlan 200\nFrame 3 [t=0.029000000s]: fe80::1b21:50 (00:00:00:00:00:04) -> ff02::2 (00:00:00:00:00:03) | mld done multicastaddr ff05::100 vlan 200\n```"},{"role":"assistant","content":"Reconstructs the 3-frame capture (`mld`, `vlan`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost querier_v6 { ip fe80::1c73:1 }\nhost all_nodes  { ip ff02::1 }\nhost all_rtrs   { ip ff02::2 }\nhost listener   { ip fe80::1b21:50 }\n\ncompile {\n    // 1. General MLD Query to ff02::1 (multicastaddr :: = all groups, 10000ms max delay)\n    querier_v6 -> all_nodes mld query multicastaddr :: maxrespdelay 10000 vlan 200 wait 4ms\n    // 2. Host joins site-local multicast stream ff05::100\n    listener -> querier_v6 mld report multicastaddr ff05::100 maxrespdelay 0 vlan 200 wait 25ms\n    // 3. Host sends MLD Done to all-routers multicast ff02::2 upon leaving\n    listener -> all_rtrs mld done multicastaddr ff05::100 vlan 200\n}\n```"}]}
{"id":"sft-reverse-ex-tcp-rfc7323-options-teardown","task_type":"reverse_decompile","protocols":["tcp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.30.1.15 (00:00:00:00:00:01) -> 10.30.2.80 (00:00:00:00:00:02) | tcp syn srcport 52843 dstport 8443 win 65535 mss 1460 wscale 7 sackperm tsval 1000 tsecr 0\nFrame 2 [t=0.001000000s]: 10.30.2.80 (00:00:00:00:00:02) -> 10.30.1.15 (00:00:00:00:00:01) | tcp syn ack win 65535 mss 1460 wscale 7 sackperm tsval 4000 tsecr 1000\nFrame 3 [t=0.002000000s]: 10.30.1.15 (00:00:00:00:00:01) -> 10.30.2.80 (00:00:00:00:00:02) | tcp ack tsval 1001 tsecr 4000\nFrame 4 [t=0.004000000s]: 10.30.1.15 (00:00:00:00:00:01) -> 10.30.2.80 (00:00:00:00:00:02) | tcp psh ack tsval 1003 tsecr 4000 payload \"PING-API-V1\"\nFrame 5 [t=0.006000000s]: 10.30.2.80 (00:00:00:00:00:02) -> 10.30.1.15 (00:00:00:00:00:01) | tcp psh ack tsval 4002 tsecr 1003 payload \"PONG-API-OK\"\nFrame 6 [t=0.008000000s]: 10.30.1.15 (00:00:00:00:00:01) -> 10.30.2.80 (00:00:00:00:00:02) | tcp fin ack tsval 1005 tsecr 4002\nFrame 7 [t=0.009000000s]: 10.30.2.80 (00:00:00:00:00:02) -> 10.30.1.15 (00:00:00:00:00:01) | tcp ack tsval 4003 tsecr 1005\nFrame 8 [t=0.010000000s]: 10.30.2.80 (00:00:00:00:00:02) -> 10.30.1.15 (00:00:00:00:00:01) | tcp fin ack tsval 4004 tsecr 1005\nFrame 9 [t=0.011000000s]: 10.30.1.15 (00:00:00:00:00:01) -> 10.30.2.80 (00:00:00:00:00:02) | tcp ack tsval 1006 tsecr 4004\n```","completion":"Reconstructs the 9-frame capture (`tcp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost app_client { ip 10.30.1.15 }\nhost api_srv    { ip 10.30.2.80 }\n\ncompile {\n    app_client -> api_srv tcp syn srcport 52843 dstport 8443 win 65535 mss 1460 wscale 7 sackperm tsval 1000 tsecr 0 wait 1ms\n    app_client <- api_srv tcp syn ack win 65535 mss 1460 wscale 7 sackperm tsval 4000 tsecr 1000 wait 1ms\n    app_client -> api_srv tcp ack tsval 1001 tsecr 4000 wait 2ms\n    app_client -> api_srv tcp psh ack tsval 1003 tsecr 4000 payload \"PING-API-V1\" wait 2ms\n    app_client <- api_srv tcp psh ack tsval 4002 tsecr 1003 payload \"PONG-API-OK\" wait 2ms\n    app_client -> api_srv tcp fin ack tsval 1005 tsecr 4002 wait 1ms\n    app_client <- api_srv tcp ack tsval 4003 tsecr 1005 wait 1ms\n    app_client <- api_srv tcp fin ack tsval 4004 tsecr 1005 wait 1ms\n    app_client -> api_srv tcp ack tsval 1006 tsecr 4004\n}\n```","frasm_code":"host app_client { ip 10.30.1.15 }\nhost api_srv    { ip 10.30.2.80 }\n\ncompile {\n    app_client -> api_srv tcp syn srcport 52843 dstport 8443 win 65535 mss 1460 wscale 7 sackperm tsval 1000 tsecr 0 wait 1ms\n    app_client <- api_srv tcp syn ack win 65535 mss 1460 wscale 7 sackperm tsval 4000 tsecr 1000 wait 1ms\n    app_client -> api_srv tcp ack tsval 1001 tsecr 4000 wait 2ms\n    app_client -> api_srv tcp psh ack tsval 1003 tsecr 4000 payload \"PING-API-V1\" wait 2ms\n    app_client <- api_srv tcp psh ack tsval 4002 tsecr 1003 payload \"PONG-API-OK\" wait 2ms\n    app_client -> api_srv tcp fin ack tsval 1005 tsecr 4002 wait 1ms\n    app_client <- api_srv tcp ack tsval 4003 tsecr 1005 wait 1ms\n    app_client <- api_srv tcp fin ack tsval 4004 tsecr 1005 wait 1ms\n    app_client -> api_srv tcp ack tsval 1006 tsecr 4004\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.30.1.15 (00:00:00:00:00:01) -> 10.30.2.80 (00:00:00:00:00:02) | tcp syn srcport 52843 dstport 8443 win 65535 mss 1460 wscale 7 sackperm tsval 1000 tsecr 0\nFrame 2 [t=0.001000000s]: 10.30.2.80 (00:00:00:00:00:02) -> 10.30.1.15 (00:00:00:00:00:01) | tcp syn ack win 65535 mss 1460 wscale 7 sackperm tsval 4000 tsecr 1000\nFrame 3 [t=0.002000000s]: 10.30.1.15 (00:00:00:00:00:01) -> 10.30.2.80 (00:00:00:00:00:02) | tcp ack tsval 1001 tsecr 4000\nFrame 4 [t=0.004000000s]: 10.30.1.15 (00:00:00:00:00:01) -> 10.30.2.80 (00:00:00:00:00:02) | tcp psh ack tsval 1003 tsecr 4000 payload \"PING-API-V1\"\nFrame 5 [t=0.006000000s]: 10.30.2.80 (00:00:00:00:00:02) -> 10.30.1.15 (00:00:00:00:00:01) | tcp psh ack tsval 4002 tsecr 1003 payload \"PONG-API-OK\"\nFrame 6 [t=0.008000000s]: 10.30.1.15 (00:00:00:00:00:01) -> 10.30.2.80 (00:00:00:00:00:02) | tcp fin ack tsval 1005 tsecr 4002\nFrame 7 [t=0.009000000s]: 10.30.2.80 (00:00:00:00:00:02) -> 10.30.1.15 (00:00:00:00:00:01) | tcp ack tsval 4003 tsecr 1005\nFrame 8 [t=0.010000000s]: 10.30.2.80 (00:00:00:00:00:02) -> 10.30.1.15 (00:00:00:00:00:01) | tcp fin ack tsval 4004 tsecr 1005\nFrame 9 [t=0.011000000s]: 10.30.1.15 (00:00:00:00:00:01) -> 10.30.2.80 (00:00:00:00:00:02) | tcp ack tsval 1006 tsecr 4004\n```"},{"role":"assistant","content":"Reconstructs the 9-frame capture (`tcp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost app_client { ip 10.30.1.15 }\nhost api_srv    { ip 10.30.2.80 }\n\ncompile {\n    app_client -> api_srv tcp syn srcport 52843 dstport 8443 win 65535 mss 1460 wscale 7 sackperm tsval 1000 tsecr 0 wait 1ms\n    app_client <- api_srv tcp syn ack win 65535 mss 1460 wscale 7 sackperm tsval 4000 tsecr 1000 wait 1ms\n    app_client -> api_srv tcp ack tsval 1001 tsecr 4000 wait 2ms\n    app_client -> api_srv tcp psh ack tsval 1003 tsecr 4000 payload \"PING-API-V1\" wait 2ms\n    app_client <- api_srv tcp psh ack tsval 4002 tsecr 1003 payload \"PONG-API-OK\" wait 2ms\n    app_client -> api_srv tcp fin ack tsval 1005 tsecr 4002 wait 1ms\n    app_client <- api_srv tcp ack tsval 4003 tsecr 1005 wait 1ms\n    app_client <- api_srv tcp fin ack tsval 4004 tsecr 1005 wait 1ms\n    app_client -> api_srv tcp ack tsval 1006 tsecr 4004\n}\n```"}]}
{"id":"sft-reverse-ex-tcp-out-of-order-gap-fill","task_type":"reverse_decompile","protocols":["tcp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.40.10.11 (00:00:00:00:00:01) -> 10.40.10.22 (00:00:00:00:00:02) | tcp syn srcport 54090 dstport 9090 seq 1000 win 65535 mss 1460\nFrame 2 [t=0.001000000s]: 10.40.10.22 (00:00:00:00:00:02) -> 10.40.10.11 (00:00:00:00:00:01) | tcp syn ack seq 5000 acknum 1001 win 65535 mss 1460\nFrame 3 [t=0.002000000s]: 10.40.10.11 (00:00:00:00:00:01) -> 10.40.10.22 (00:00:00:00:00:02) | tcp ack seq 1001 acknum 5001\nFrame 4 [t=0.003000000s]: 10.40.10.11 (00:00:00:00:00:01) -> 10.40.10.22 (00:00:00:00:00:02) | tcp psh ack seq 1009 acknum 5001 payload \"CHUNK-02\"\nFrame 5 [t=0.006000000s]: 10.40.10.11 (00:00:00:00:00:01) -> 10.40.10.22 (00:00:00:00:00:02) | tcp psh ack seq 1001 acknum 5001 payload \"CHUNK-01\"\nFrame 6 [t=0.008000000s]: 10.40.10.22 (00:00:00:00:00:02) -> 10.40.10.11 (00:00:00:00:00:01) | tcp ack seq 5001 acknum 1017\n```","completion":"Reconstructs the 6-frame capture (`tcp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost sender { ip 10.40.10.11 }\nhost sensor { ip 10.40.10.22 }\n\ncompile {\n    sender -> sensor tcp syn srcport 54090 dstport 9090 seq 1000 win 65535 mss 1460 wait 1ms\n    sender <- sensor tcp syn ack seq 5000 acknum 1001 win 65535 mss 1460 wait 1ms\n    sender -> sensor tcp ack seq 1001 acknum 5001 wait 1ms\n    // Send second 8-byte chunk first (seq 1009), then backfill missing gap (seq 1001)\n    sender -> sensor tcp psh ack seq 1009 acknum 5001 payload \"CHUNK-02\" wait 3ms\n    sender -> sensor tcp psh ack seq 1001 acknum 5001 payload \"CHUNK-01\" wait 2ms\n    sender <- sensor tcp ack seq 5001 acknum 1017\n}\n```","frasm_code":"host sender { ip 10.40.10.11 }\nhost sensor { ip 10.40.10.22 }\n\ncompile {\n    sender -> sensor tcp syn srcport 54090 dstport 9090 seq 1000 win 65535 mss 1460 wait 1ms\n    sender <- sensor tcp syn ack seq 5000 acknum 1001 win 65535 mss 1460 wait 1ms\n    sender -> sensor tcp ack seq 1001 acknum 5001 wait 1ms\n    // Send second 8-byte chunk first (seq 1009), then backfill missing gap (seq 1001)\n    sender -> sensor tcp psh ack seq 1009 acknum 5001 payload \"CHUNK-02\" wait 3ms\n    sender -> sensor tcp psh ack seq 1001 acknum 5001 payload \"CHUNK-01\" wait 2ms\n    sender <- sensor tcp ack seq 5001 acknum 1017\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.40.10.11 (00:00:00:00:00:01) -> 10.40.10.22 (00:00:00:00:00:02) | tcp syn srcport 54090 dstport 9090 seq 1000 win 65535 mss 1460\nFrame 2 [t=0.001000000s]: 10.40.10.22 (00:00:00:00:00:02) -> 10.40.10.11 (00:00:00:00:00:01) | tcp syn ack seq 5000 acknum 1001 win 65535 mss 1460\nFrame 3 [t=0.002000000s]: 10.40.10.11 (00:00:00:00:00:01) -> 10.40.10.22 (00:00:00:00:00:02) | tcp ack seq 1001 acknum 5001\nFrame 4 [t=0.003000000s]: 10.40.10.11 (00:00:00:00:00:01) -> 10.40.10.22 (00:00:00:00:00:02) | tcp psh ack seq 1009 acknum 5001 payload \"CHUNK-02\"\nFrame 5 [t=0.006000000s]: 10.40.10.11 (00:00:00:00:00:01) -> 10.40.10.22 (00:00:00:00:00:02) | tcp psh ack seq 1001 acknum 5001 payload \"CHUNK-01\"\nFrame 6 [t=0.008000000s]: 10.40.10.22 (00:00:00:00:00:02) -> 10.40.10.11 (00:00:00:00:00:01) | tcp ack seq 5001 acknum 1017\n```"},{"role":"assistant","content":"Reconstructs the 6-frame capture (`tcp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost sender { ip 10.40.10.11 }\nhost sensor { ip 10.40.10.22 }\n\ncompile {\n    sender -> sensor tcp syn srcport 54090 dstport 9090 seq 1000 win 65535 mss 1460 wait 1ms\n    sender <- sensor tcp syn ack seq 5000 acknum 1001 win 65535 mss 1460 wait 1ms\n    sender -> sensor tcp ack seq 1001 acknum 5001 wait 1ms\n    // Send second 8-byte chunk first (seq 1009), then backfill missing gap (seq 1001)\n    sender -> sensor tcp psh ack seq 1009 acknum 5001 payload \"CHUNK-02\" wait 3ms\n    sender -> sensor tcp psh ack seq 1001 acknum 5001 payload \"CHUNK-01\" wait 2ms\n    sender <- sensor tcp ack seq 5001 acknum 1017\n}\n```"}]}
{"id":"sft-reverse-ex-sctp-4way-cookie-heartbeat","task_type":"reverse_decompile","protocols":["sctp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.60.1.10 (00:00:00:00:00:01) -> 10.60.2.20 (00:00:00:00:00:02) | sctp init srcport 36412 dstport 36412 vtag 0 tsn 1000\nFrame 2 [t=0.001000000s]: 10.60.2.20 (00:00:00:00:00:02) -> 10.60.1.10 (00:00:00:00:00:01) | sctp initack vtag 0x11223344 tsn 2000\nFrame 3 [t=0.002000000s]: 10.60.1.10 (00:00:00:00:00:01) -> 10.60.2.20 (00:00:00:00:00:02) | sctp cookieecho vtag 0x11223344\nFrame 4 [t=0.003000000s]: 10.60.2.20 (00:00:00:00:00:02) -> 10.60.1.10 (00:00:00:00:00:01) | sctp cookieack vtag 0x55667788\nFrame 5 [t=0.005000000s]: 10.60.1.10 (00:00:00:00:00:01) -> 10.60.2.20 (00:00:00:00:00:02) | sctp data vtag 0x11223344 tsn 1000 stream 0 ssn 0 ppid 18 payload \"S1SetupRequest\"\nFrame 6 [t=0.007000000s]: 10.60.2.20 (00:00:00:00:00:02) -> 10.60.1.10 (00:00:00:00:00:01) | sctp sack vtag 0x55667788 tsn 1000\nFrame 7 [t=0.017000000s]: 10.60.1.10 (00:00:00:00:00:01) -> 10.60.2.20 (00:00:00:00:00:02) | sctp heartbeat vtag 0x11223344\nFrame 8 [t=0.018000000s]: 10.60.2.20 (00:00:00:00:00:02) -> 10.60.1.10 (00:00:00:00:00:01) | sctp heartbeatack vtag 0x55667788\nFrame 9 [t=0.020000000s]: 10.60.1.10 (00:00:00:00:00:01) -> 10.60.2.20 (00:00:00:00:00:02) | sctp shutdown vtag 0x11223344\nFrame 10 [t=0.021000000s]: 10.60.2.20 (00:00:00:00:00:02) -> 10.60.1.10 (00:00:00:00:00:01) | sctp shutdownack vtag 0x55667788\n```","completion":"Reconstructs the 10-frame capture (`sctp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost enodeb { ip 10.60.1.10 }\nhost mme_01 { ip 10.60.2.20 }\n\ncompile {\n    enodeb -> mme_01 sctp init srcport 36412 dstport 36412 vtag 0 tsn 1000 wait 1ms\n    enodeb <- mme_01 sctp initack vtag 0x11223344 tsn 2000 wait 1ms\n    enodeb -> mme_01 sctp cookieecho vtag 0x11223344 wait 1ms\n    enodeb <- mme_01 sctp cookieack vtag 0x55667788 wait 2ms\n    enodeb -> mme_01 sctp data vtag 0x11223344 tsn 1000 stream 0 ssn 0 ppid 18 payload \"S1SetupRequest\" wait 2ms\n    enodeb <- mme_01 sctp sack vtag 0x55667788 tsn 1000 wait 10ms\n    enodeb -> mme_01 sctp heartbeat vtag 0x11223344 wait 1ms\n    enodeb <- mme_01 sctp heartbeatack vtag 0x55667788 wait 2ms\n    enodeb -> mme_01 sctp shutdown vtag 0x11223344 wait 1ms\n    enodeb <- mme_01 sctp shutdownack vtag 0x55667788\n}\n```","frasm_code":"host enodeb { ip 10.60.1.10 }\nhost mme_01 { ip 10.60.2.20 }\n\ncompile {\n    enodeb -> mme_01 sctp init srcport 36412 dstport 36412 vtag 0 tsn 1000 wait 1ms\n    enodeb <- mme_01 sctp initack vtag 0x11223344 tsn 2000 wait 1ms\n    enodeb -> mme_01 sctp cookieecho vtag 0x11223344 wait 1ms\n    enodeb <- mme_01 sctp cookieack vtag 0x55667788 wait 2ms\n    enodeb -> mme_01 sctp data vtag 0x11223344 tsn 1000 stream 0 ssn 0 ppid 18 payload \"S1SetupRequest\" wait 2ms\n    enodeb <- mme_01 sctp sack vtag 0x55667788 tsn 1000 wait 10ms\n    enodeb -> mme_01 sctp heartbeat vtag 0x11223344 wait 1ms\n    enodeb <- mme_01 sctp heartbeatack vtag 0x55667788 wait 2ms\n    enodeb -> mme_01 sctp shutdown vtag 0x11223344 wait 1ms\n    enodeb <- mme_01 sctp shutdownack vtag 0x55667788\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.60.1.10 (00:00:00:00:00:01) -> 10.60.2.20 (00:00:00:00:00:02) | sctp init srcport 36412 dstport 36412 vtag 0 tsn 1000\nFrame 2 [t=0.001000000s]: 10.60.2.20 (00:00:00:00:00:02) -> 10.60.1.10 (00:00:00:00:00:01) | sctp initack vtag 0x11223344 tsn 2000\nFrame 3 [t=0.002000000s]: 10.60.1.10 (00:00:00:00:00:01) -> 10.60.2.20 (00:00:00:00:00:02) | sctp cookieecho vtag 0x11223344\nFrame 4 [t=0.003000000s]: 10.60.2.20 (00:00:00:00:00:02) -> 10.60.1.10 (00:00:00:00:00:01) | sctp cookieack vtag 0x55667788\nFrame 5 [t=0.005000000s]: 10.60.1.10 (00:00:00:00:00:01) -> 10.60.2.20 (00:00:00:00:00:02) | sctp data vtag 0x11223344 tsn 1000 stream 0 ssn 0 ppid 18 payload \"S1SetupRequest\"\nFrame 6 [t=0.007000000s]: 10.60.2.20 (00:00:00:00:00:02) -> 10.60.1.10 (00:00:00:00:00:01) | sctp sack vtag 0x55667788 tsn 1000\nFrame 7 [t=0.017000000s]: 10.60.1.10 (00:00:00:00:00:01) -> 10.60.2.20 (00:00:00:00:00:02) | sctp heartbeat vtag 0x11223344\nFrame 8 [t=0.018000000s]: 10.60.2.20 (00:00:00:00:00:02) -> 10.60.1.10 (00:00:00:00:00:01) | sctp heartbeatack vtag 0x55667788\nFrame 9 [t=0.020000000s]: 10.60.1.10 (00:00:00:00:00:01) -> 10.60.2.20 (00:00:00:00:00:02) | sctp shutdown vtag 0x11223344\nFrame 10 [t=0.021000000s]: 10.60.2.20 (00:00:00:00:00:02) -> 10.60.1.10 (00:00:00:00:00:01) | sctp shutdownack vtag 0x55667788\n```"},{"role":"assistant","content":"Reconstructs the 10-frame capture (`sctp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost enodeb { ip 10.60.1.10 }\nhost mme_01 { ip 10.60.2.20 }\n\ncompile {\n    enodeb -> mme_01 sctp init srcport 36412 dstport 36412 vtag 0 tsn 1000 wait 1ms\n    enodeb <- mme_01 sctp initack vtag 0x11223344 tsn 2000 wait 1ms\n    enodeb -> mme_01 sctp cookieecho vtag 0x11223344 wait 1ms\n    enodeb <- mme_01 sctp cookieack vtag 0x55667788 wait 2ms\n    enodeb -> mme_01 sctp data vtag 0x11223344 tsn 1000 stream 0 ssn 0 ppid 18 payload \"S1SetupRequest\" wait 2ms\n    enodeb <- mme_01 sctp sack vtag 0x55667788 tsn 1000 wait 10ms\n    enodeb -> mme_01 sctp heartbeat vtag 0x11223344 wait 1ms\n    enodeb <- mme_01 sctp heartbeatack vtag 0x55667788 wait 2ms\n    enodeb -> mme_01 sctp shutdown vtag 0x11223344 wait 1ms\n    enodeb <- mme_01 sctp shutdownack vtag 0x55667788\n}\n```"}]}
{"id":"sft-reverse-lib-fw-ssh-deny-rst","task_type":"reverse_decompile","protocols":["tcp","icmp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.10.40.85 (00:00:00:00:00:01) -> 10.99.0.10 (00:00:00:00:00:03) | tcp syn srcport 53110 dstport 22 win 65535 mss 1460\nFrame 2 [t=0.001000000s]: 10.99.0.10 (00:00:00:00:00:03) -> 10.10.40.85 (00:00:00:00:00:01) | tcp rst ack\nFrame 3 [t=0.011000000s]: 10.10.40.85 (00:00:00:00:00:01) -> 10.99.0.10 (00:00:00:00:00:03) | tcp syn srcport 53111 dstport 22 win 65535 mss 1460\nFrame 4 [t=0.013000000s]: 10.10.40.1 (00:00:00:00:00:02) -> 10.10.40.85 (00:00:00:00:00:01) | icmp destunreach type 3 code 13\n```","completion":"Reconstructs the 4-frame capture (`tcp`, `icmp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\n// User workstation, internal firewall interface, and protected core switch\nhost user_laptop { ip 10.10.40.85 }\nhost mgmt_fw     { ip 10.10.40.1 }\nhost core_sw     { ip 10.99.0.10 }\n\ncompile {\n    // Attempt #1: Workstation tries TCP 22 (SSH) -> Rejected inline with TCP RST-ACK\n    user_laptop -> core_sw tcp syn srcport 53110 dstport 22 win 65535 mss 1460 wait 1ms\n    user_laptop <- core_sw tcp rst ack wait 10ms\n\n    // Attempt #2: Workstation retries TCP 22 -> Firewall returns ICMP Admin Prohibited (Type 3, Code 13)\n    user_laptop -> core_sw tcp syn srcport 53111 dstport 22 win 65535 mss 1460 wait 2ms\n    mgmt_fw -> user_laptop icmp destunreach type 3 code 13\n}\n```","frasm_code":"// User workstation, internal firewall interface, and protected core switch\nhost user_laptop { ip 10.10.40.85 }\nhost mgmt_fw     { ip 10.10.40.1 }\nhost core_sw     { ip 10.99.0.10 }\n\ncompile {\n    // Attempt #1: Workstation tries TCP 22 (SSH) -> Rejected inline with TCP RST-ACK\n    user_laptop -> core_sw tcp syn srcport 53110 dstport 22 win 65535 mss 1460 wait 1ms\n    user_laptop <- core_sw tcp rst ack wait 10ms\n\n    // Attempt #2: Workstation retries TCP 22 -> Firewall returns ICMP Admin Prohibited (Type 3, Code 13)\n    user_laptop -> core_sw tcp syn srcport 53111 dstport 22 win 65535 mss 1460 wait 2ms\n    mgmt_fw -> user_laptop icmp destunreach type 3 code 13\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.10.40.85 (00:00:00:00:00:01) -> 10.99.0.10 (00:00:00:00:00:03) | tcp syn srcport 53110 dstport 22 win 65535 mss 1460\nFrame 2 [t=0.001000000s]: 10.99.0.10 (00:00:00:00:00:03) -> 10.10.40.85 (00:00:00:00:00:01) | tcp rst ack\nFrame 3 [t=0.011000000s]: 10.10.40.85 (00:00:00:00:00:01) -> 10.99.0.10 (00:00:00:00:00:03) | tcp syn srcport 53111 dstport 22 win 65535 mss 1460\nFrame 4 [t=0.013000000s]: 10.10.40.1 (00:00:00:00:00:02) -> 10.10.40.85 (00:00:00:00:00:01) | icmp destunreach type 3 code 13\n```"},{"role":"assistant","content":"Reconstructs the 4-frame capture (`tcp`, `icmp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\n// User workstation, internal firewall interface, and protected core switch\nhost user_laptop { ip 10.10.40.85 }\nhost mgmt_fw     { ip 10.10.40.1 }\nhost core_sw     { ip 10.99.0.10 }\n\ncompile {\n    // Attempt #1: Workstation tries TCP 22 (SSH) -> Rejected inline with TCP RST-ACK\n    user_laptop -> core_sw tcp syn srcport 53110 dstport 22 win 65535 mss 1460 wait 1ms\n    user_laptop <- core_sw tcp rst ack wait 10ms\n\n    // Attempt #2: Workstation retries TCP 22 -> Firewall returns ICMP Admin Prohibited (Type 3, Code 13)\n    user_laptop -> core_sw tcp syn srcport 53111 dstport 22 win 65535 mss 1460 wait 2ms\n    mgmt_fw -> user_laptop icmp destunreach type 3 code 13\n}\n```"}]}
{"id":"sft-reverse-lib-scan-tcp-syn-ports","task_type":"reverse_decompile","protocols":["tcp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.10.99.10 (00:00:00:00:00:01) -> 10.10.20.40 (00:00:00:00:00:02) | tcp syn srcport 55001 dstport 22 win 1024 mss 1460\nFrame 2 [t=0.001000000s]: 10.10.20.40 (00:00:00:00:00:02) -> 10.10.99.10 (00:00:00:00:00:01) | tcp syn ack win 65535 mss 1460\nFrame 3 [t=0.002000000s]: 10.10.99.10 (00:00:00:00:00:01) -> 10.10.20.40 (00:00:00:00:00:02) | tcp rst\nFrame 4 [t=0.004000000s]: 10.10.99.10 (00:00:00:00:00:01) -> 10.10.20.40 (00:00:00:00:00:02) | tcp syn srcport 55002 dstport 80 win 1024 mss 1460\nFrame 5 [t=0.005000000s]: 10.10.20.40 (00:00:00:00:00:02) -> 10.10.99.10 (00:00:00:00:00:01) | tcp rst ack\nFrame 6 [t=0.007000000s]: 10.10.99.10 (00:00:00:00:00:01) -> 10.10.20.40 (00:00:00:00:00:02) | tcp syn srcport 55003 dstport 443 win 1024 mss 1460\nFrame 7 [t=0.008000000s]: 10.10.20.40 (00:00:00:00:00:02) -> 10.10.99.10 (00:00:00:00:00:01) | tcp syn ack win 65535 mss 1460\nFrame 8 [t=0.009000000s]: 10.10.99.10 (00:00:00:00:00:01) -> 10.10.20.40 (00:00:00:00:00:02) | tcp rst\nFrame 9 [t=0.011000000s]: 10.10.99.10 (00:00:00:00:00:01) -> 10.10.20.40 (00:00:00:00:00:02) | tcp syn srcport 55004 dstport 3389 win 1024 mss 1460\nFrame 10 [t=0.012000000s]: 10.10.20.40 (00:00:00:00:00:02) -> 10.10.99.10 (00:00:00:00:00:01) | tcp rst ack\n```","completion":"Reconstructs the 10-frame capture (`tcp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\n// Vulnerability scanner checking common TCP ports on a Linux web server\nhost scanner { ip 10.10.99.10 }\nhost web_srv { ip 10.10.20.40 }\n\ncompile {\n    // Port 22 (SSH) -> Open: server sends SYN-ACK, scanner tears down with RST\n    scanner -> web_srv tcp syn srcport 55001 dstport 22 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    scanner -> web_srv tcp rst wait 2ms\n\n    // Port 80 (HTTP) -> Closed: server replies immediately with RST-ACK\n    scanner -> web_srv tcp syn srcport 55002 dstport 80 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp rst ack wait 2ms\n\n    // Port 443 (HTTPS) -> Open: server sends SYN-ACK, scanner tears down with RST\n    scanner -> web_srv tcp syn srcport 55003 dstport 443 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    scanner -> web_srv tcp rst wait 2ms\n\n    // Port 3389 (RDP) -> Closed: server replies with RST-ACK\n    scanner -> web_srv tcp syn srcport 55004 dstport 3389 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp rst ack\n}\n```","frasm_code":"// Vulnerability scanner checking common TCP ports on a Linux web server\nhost scanner { ip 10.10.99.10 }\nhost web_srv { ip 10.10.20.40 }\n\ncompile {\n    // Port 22 (SSH) -> Open: server sends SYN-ACK, scanner tears down with RST\n    scanner -> web_srv tcp syn srcport 55001 dstport 22 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    scanner -> web_srv tcp rst wait 2ms\n\n    // Port 80 (HTTP) -> Closed: server replies immediately with RST-ACK\n    scanner -> web_srv tcp syn srcport 55002 dstport 80 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp rst ack wait 2ms\n\n    // Port 443 (HTTPS) -> Open: server sends SYN-ACK, scanner tears down with RST\n    scanner -> web_srv tcp syn srcport 55003 dstport 443 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    scanner -> web_srv tcp rst wait 2ms\n\n    // Port 3389 (RDP) -> Closed: server replies with RST-ACK\n    scanner -> web_srv tcp syn srcport 55004 dstport 3389 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp rst ack\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.10.99.10 (00:00:00:00:00:01) -> 10.10.20.40 (00:00:00:00:00:02) | tcp syn srcport 55001 dstport 22 win 1024 mss 1460\nFrame 2 [t=0.001000000s]: 10.10.20.40 (00:00:00:00:00:02) -> 10.10.99.10 (00:00:00:00:00:01) | tcp syn ack win 65535 mss 1460\nFrame 3 [t=0.002000000s]: 10.10.99.10 (00:00:00:00:00:01) -> 10.10.20.40 (00:00:00:00:00:02) | tcp rst\nFrame 4 [t=0.004000000s]: 10.10.99.10 (00:00:00:00:00:01) -> 10.10.20.40 (00:00:00:00:00:02) | tcp syn srcport 55002 dstport 80 win 1024 mss 1460\nFrame 5 [t=0.005000000s]: 10.10.20.40 (00:00:00:00:00:02) -> 10.10.99.10 (00:00:00:00:00:01) | tcp rst ack\nFrame 6 [t=0.007000000s]: 10.10.99.10 (00:00:00:00:00:01) -> 10.10.20.40 (00:00:00:00:00:02) | tcp syn srcport 55003 dstport 443 win 1024 mss 1460\nFrame 7 [t=0.008000000s]: 10.10.20.40 (00:00:00:00:00:02) -> 10.10.99.10 (00:00:00:00:00:01) | tcp syn ack win 65535 mss 1460\nFrame 8 [t=0.009000000s]: 10.10.99.10 (00:00:00:00:00:01) -> 10.10.20.40 (00:00:00:00:00:02) | tcp rst\nFrame 9 [t=0.011000000s]: 10.10.99.10 (00:00:00:00:00:01) -> 10.10.20.40 (00:00:00:00:00:02) | tcp syn srcport 55004 dstport 3389 win 1024 mss 1460\nFrame 10 [t=0.012000000s]: 10.10.20.40 (00:00:00:00:00:02) -> 10.10.99.10 (00:00:00:00:00:01) | tcp rst ack\n```"},{"role":"assistant","content":"Reconstructs the 10-frame capture (`tcp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\n// Vulnerability scanner checking common TCP ports on a Linux web server\nhost scanner { ip 10.10.99.10 }\nhost web_srv { ip 10.10.20.40 }\n\ncompile {\n    // Port 22 (SSH) -> Open: server sends SYN-ACK, scanner tears down with RST\n    scanner -> web_srv tcp syn srcport 55001 dstport 22 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    scanner -> web_srv tcp rst wait 2ms\n\n    // Port 80 (HTTP) -> Closed: server replies immediately with RST-ACK\n    scanner -> web_srv tcp syn srcport 55002 dstport 80 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp rst ack wait 2ms\n\n    // Port 443 (HTTPS) -> Open: server sends SYN-ACK, scanner tears down with RST\n    scanner -> web_srv tcp syn srcport 55003 dstport 443 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    scanner -> web_srv tcp rst wait 2ms\n\n    // Port 3389 (RDP) -> Closed: server replies with RST-ACK\n    scanner -> web_srv tcp syn srcport 55004 dstport 3389 win 1024 mss 1460 wait 1ms\n    scanner <- web_srv tcp rst ack\n}\n```"}]}
{"id":"sft-reverse-lib-pentest-xmas-null-ids","task_type":"reverse_decompile","protocols":["tcp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 172.18.99.50 (00:00:00:00:00:01) -> 172.18.10.25 (00:00:00:00:00:02) | tcp fin psh urg srcport 56101 dstport 443 win 1024 urgent 0\nFrame 2 [t=0.002000000s]: 172.18.10.25 (00:00:00:00:00:02) -> 172.18.99.50 (00:00:00:00:00:01) | tcp rst ack\nFrame 3 [t=0.006000000s]: 172.18.99.50 (00:00:00:00:00:01) -> 172.18.10.25 (00:00:00:00:00:02) | tcp syn fin srcport 56102 dstport 80 win 1024\nFrame 4 [t=0.008000000s]: 172.18.10.25 (00:00:00:00:00:02) -> 172.18.99.50 (00:00:00:00:00:01) | tcp rst ack\nFrame 5 [t=0.012000000s]: 172.18.99.50 (00:00:00:00:00:01) -> 172.18.10.25 (00:00:00:00:00:02) | tcp fin srcport 56103 dstport 22 seq 5000 win 1024\n```","completion":"Reconstructs the 5-frame capture (`tcp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\n// Authorized purple-team host testing IDS/IPS abnormal TCP flag signatures\nhost red_lab_box { ip 172.18.99.50 }\nhost dmz_target  { ip 172.18.10.25 }\n\ncompile {\n    // 1. TCP Xmas Scan: lights up FIN + PSH + URG simultaneously on port 443\n    red_lab_box -> dmz_target tcp fin psh urg srcport 56101 dstport 443 win 1024 urgent 0 wait 2ms\n    red_lab_box <- dmz_target tcp rst ack wait 4ms\n\n    // 2. Illegal SYN + FIN combination: tests stateless ACL bypass rules on port 80\n    red_lab_box -> dmz_target tcp syn fin srcport 56102 dstport 80 win 1024 wait 2ms\n    red_lab_box <- dmz_target tcp rst ack wait 4ms\n\n    // 3. TCP FIN Stealth Scan (-sF): unsolicited lone FIN segment with custom seq 5000 on port 22\n    red_lab_box -> dmz_target tcp fin srcport 56103 dstport 22 seq 5000 win 1024\n}\n```","frasm_code":"// Authorized purple-team host testing IDS/IPS abnormal TCP flag signatures\nhost red_lab_box { ip 172.18.99.50 }\nhost dmz_target  { ip 172.18.10.25 }\n\ncompile {\n    // 1. TCP Xmas Scan: lights up FIN + PSH + URG simultaneously on port 443\n    red_lab_box -> dmz_target tcp fin psh urg srcport 56101 dstport 443 win 1024 urgent 0 wait 2ms\n    red_lab_box <- dmz_target tcp rst ack wait 4ms\n\n    // 2. Illegal SYN + FIN combination: tests stateless ACL bypass rules on port 80\n    red_lab_box -> dmz_target tcp syn fin srcport 56102 dstport 80 win 1024 wait 2ms\n    red_lab_box <- dmz_target tcp rst ack wait 4ms\n\n    // 3. TCP FIN Stealth Scan (-sF): unsolicited lone FIN segment with custom seq 5000 on port 22\n    red_lab_box -> dmz_target tcp fin srcport 56103 dstport 22 seq 5000 win 1024\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 172.18.99.50 (00:00:00:00:00:01) -> 172.18.10.25 (00:00:00:00:00:02) | tcp fin psh urg srcport 56101 dstport 443 win 1024 urgent 0\nFrame 2 [t=0.002000000s]: 172.18.10.25 (00:00:00:00:00:02) -> 172.18.99.50 (00:00:00:00:00:01) | tcp rst ack\nFrame 3 [t=0.006000000s]: 172.18.99.50 (00:00:00:00:00:01) -> 172.18.10.25 (00:00:00:00:00:02) | tcp syn fin srcport 56102 dstport 80 win 1024\nFrame 4 [t=0.008000000s]: 172.18.10.25 (00:00:00:00:00:02) -> 172.18.99.50 (00:00:00:00:00:01) | tcp rst ack\nFrame 5 [t=0.012000000s]: 172.18.99.50 (00:00:00:00:00:01) -> 172.18.10.25 (00:00:00:00:00:02) | tcp fin srcport 56103 dstport 22 seq 5000 win 1024\n```"},{"role":"assistant","content":"Reconstructs the 5-frame capture (`tcp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\n// Authorized purple-team host testing IDS/IPS abnormal TCP flag signatures\nhost red_lab_box { ip 172.18.99.50 }\nhost dmz_target  { ip 172.18.10.25 }\n\ncompile {\n    // 1. TCP Xmas Scan: lights up FIN + PSH + URG simultaneously on port 443\n    red_lab_box -> dmz_target tcp fin psh urg srcport 56101 dstport 443 win 1024 urgent 0 wait 2ms\n    red_lab_box <- dmz_target tcp rst ack wait 4ms\n\n    // 2. Illegal SYN + FIN combination: tests stateless ACL bypass rules on port 80\n    red_lab_box -> dmz_target tcp syn fin srcport 56102 dstport 80 win 1024 wait 2ms\n    red_lab_box <- dmz_target tcp rst ack wait 4ms\n\n    // 3. TCP FIN Stealth Scan (-sF): unsolicited lone FIN segment with custom seq 5000 on port 22\n    red_lab_box -> dmz_target tcp fin srcport 56103 dstport 22 seq 5000 win 1024\n}\n```"}]}
{"id":"sft-reverse-lib-troubleshoot-tcp-zero-window","task_type":"reverse_decompile","protocols":["tcp","http"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.10.15.30 (00:00:00:00:00:01) -> 10.10.80.40 (00:00:00:00:00:02) | tcp syn srcport 51800 dstport 8080 win 65535 mss 1460\nFrame 2 [t=0.001000000s]: 10.10.80.40 (00:00:00:00:00:02) -> 10.10.15.30 (00:00:00:00:00:01) | tcp syn ack win 65535 mss 1460\nFrame 3 [t=0.002000000s]: 10.10.15.30 (00:00:00:00:00:01) -> 10.10.80.40 (00:00:00:00:00:02) | tcp ack\nFrame 4 [t=0.003000000s]: 10.10.15.30 (00:00:00:00:00:01) -> 10.10.80.40 (00:00:00:00:00:02) | http post uri \"/ingest\" hosthdr \"reports.corp.local\" body \"batch-01-payload\"\nFrame 5 [t=0.203000000s]: 10.10.15.30 (00:00:00:00:00:01) -> 10.10.80.40 (00:00:00:00:00:02) | seq 1001 http post uri \"/ingest\" hosthdr \"reports.corp.local\" body \"batch-01-payload\"\nFrame 6 [t=0.205000000s]: 10.10.80.40 (00:00:00:00:00:02) -> 10.10.15.30 (00:00:00:00:00:01) | tcp ack win 0\nFrame 7 [t=0.355000000s]: 10.10.80.40 (00:00:00:00:00:02) -> 10.10.15.30 (00:00:00:00:00:01) | tcp ack win 32768\n```","completion":"Reconstructs the 7-frame capture (`tcp`, `http`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\n// Client uploading report data to a busy backend web server\nhost client_pc { ip 10.10.15.30 }\nhost busy_srv  { ip 10.10.80.40 }\n\ncompile {\n    // 1. Establish TCP connection on port 8080\n    client_pc -> busy_srv tcp syn srcport 51800 dstport 8080 win 65535 mss 1460 wait 1ms\n    client_pc <- busy_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    client_pc -> busy_srv tcp ack wait 1ms\n\n    // 2. Client sends HTTP POST; packet drops on WAN, so client retransmits same seq 1001 after 200ms\n    client_pc -> busy_srv http post uri \"/ingest\" hosthdr \"reports.corp.local\" body \"batch-01-payload\" wait 200ms\n    client_pc -> busy_srv seq 1001 http post uri \"/ingest\" hosthdr \"reports.corp.local\" body \"batch-01-payload\" wait 2ms\n\n    // 3. Overloaded server ACKs the data with win 0 (TCP ZeroWindow: socket buffer exhausted!)\n    client_pc <- busy_srv tcp ack win 0 wait 150ms\n\n    // 4. Server drains buffer and sends Window Update (win 32768) so transfer can resume\n    client_pc <- busy_srv tcp ack win 32768\n}\n```","frasm_code":"// Client uploading report data to a busy backend web server\nhost client_pc { ip 10.10.15.30 }\nhost busy_srv  { ip 10.10.80.40 }\n\ncompile {\n    // 1. Establish TCP connection on port 8080\n    client_pc -> busy_srv tcp syn srcport 51800 dstport 8080 win 65535 mss 1460 wait 1ms\n    client_pc <- busy_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    client_pc -> busy_srv tcp ack wait 1ms\n\n    // 2. Client sends HTTP POST; packet drops on WAN, so client retransmits same seq 1001 after 200ms\n    client_pc -> busy_srv http post uri \"/ingest\" hosthdr \"reports.corp.local\" body \"batch-01-payload\" wait 200ms\n    client_pc -> busy_srv seq 1001 http post uri \"/ingest\" hosthdr \"reports.corp.local\" body \"batch-01-payload\" wait 2ms\n\n    // 3. Overloaded server ACKs the data with win 0 (TCP ZeroWindow: socket buffer exhausted!)\n    client_pc <- busy_srv tcp ack win 0 wait 150ms\n\n    // 4. Server drains buffer and sends Window Update (win 32768) so transfer can resume\n    client_pc <- busy_srv tcp ack win 32768\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.10.15.30 (00:00:00:00:00:01) -> 10.10.80.40 (00:00:00:00:00:02) | tcp syn srcport 51800 dstport 8080 win 65535 mss 1460\nFrame 2 [t=0.001000000s]: 10.10.80.40 (00:00:00:00:00:02) -> 10.10.15.30 (00:00:00:00:00:01) | tcp syn ack win 65535 mss 1460\nFrame 3 [t=0.002000000s]: 10.10.15.30 (00:00:00:00:00:01) -> 10.10.80.40 (00:00:00:00:00:02) | tcp ack\nFrame 4 [t=0.003000000s]: 10.10.15.30 (00:00:00:00:00:01) -> 10.10.80.40 (00:00:00:00:00:02) | http post uri \"/ingest\" hosthdr \"reports.corp.local\" body \"batch-01-payload\"\nFrame 5 [t=0.203000000s]: 10.10.15.30 (00:00:00:00:00:01) -> 10.10.80.40 (00:00:00:00:00:02) | seq 1001 http post uri \"/ingest\" hosthdr \"reports.corp.local\" body \"batch-01-payload\"\nFrame 6 [t=0.205000000s]: 10.10.80.40 (00:00:00:00:00:02) -> 10.10.15.30 (00:00:00:00:00:01) | tcp ack win 0\nFrame 7 [t=0.355000000s]: 10.10.80.40 (00:00:00:00:00:02) -> 10.10.15.30 (00:00:00:00:00:01) | tcp ack win 32768\n```"},{"role":"assistant","content":"Reconstructs the 7-frame capture (`tcp`, `http`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\n// Client uploading report data to a busy backend web server\nhost client_pc { ip 10.10.15.30 }\nhost busy_srv  { ip 10.10.80.40 }\n\ncompile {\n    // 1. Establish TCP connection on port 8080\n    client_pc -> busy_srv tcp syn srcport 51800 dstport 8080 win 65535 mss 1460 wait 1ms\n    client_pc <- busy_srv tcp syn ack win 65535 mss 1460 wait 1ms\n    client_pc -> busy_srv tcp ack wait 1ms\n\n    // 2. Client sends HTTP POST; packet drops on WAN, so client retransmits same seq 1001 after 200ms\n    client_pc -> busy_srv http post uri \"/ingest\" hosthdr \"reports.corp.local\" body \"batch-01-payload\" wait 200ms\n    client_pc -> busy_srv seq 1001 http post uri \"/ingest\" hosthdr \"reports.corp.local\" body \"batch-01-payload\" wait 2ms\n\n    // 3. Overloaded server ACKs the data with win 0 (TCP ZeroWindow: socket buffer exhausted!)\n    client_pc <- busy_srv tcp ack win 0 wait 150ms\n\n    // 4. Server drains buffer and sends Window Update (win 32768) so transfer can resume\n    client_pc <- busy_srv tcp ack win 32768\n}\n```"}]}
{"id":"sft-reverse-proto-quickstart-tcp","task_type":"reverse_decompile","protocols":["tcp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.10.1.15 (00:00:00:00:00:01) -> 10.10.1.80 (00:00:00:00:00:02) | tcp syn srcport 52400 dstport 443 win 65535 mss 1460 wscale 7 sackperm\nFrame 2 [t=0.001000000s]: 10.10.1.80 (00:00:00:00:00:02) -> 10.10.1.15 (00:00:00:00:00:01) | tcp syn ack win 65535 mss 1460 wscale 7 sackperm\nFrame 3 [t=0.002000000s]: 10.10.1.15 (00:00:00:00:00:01) -> 10.10.1.80 (00:00:00:00:00:02) | tcp ack\n```","completion":"Reconstructs the 3-frame capture (`tcp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.10.1.15 (00:00:00:00:00:01) -> 10.10.1.80 (00:00:00:00:00:02) | tcp syn srcport 52400 dstport 443 win 65535 mss 1460 wscale 7 sackperm\nFrame 2 [t=0.001000000s]: 10.10.1.80 (00:00:00:00:00:02) -> 10.10.1.15 (00:00:00:00:00:01) | tcp syn ack win 65535 mss 1460 wscale 7 sackperm\nFrame 3 [t=0.002000000s]: 10.10.1.15 (00:00:00:00:00:01) -> 10.10.1.80 (00:00:00:00:00:02) | tcp ack\n```"},{"role":"assistant","content":"Reconstructs the 3-frame capture (`tcp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-reverse-proto-quickstart-udp","task_type":"reverse_decompile","protocols":["udp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.20.0.15 (00:00:00:00:00:01) -> 10.20.0.1 (00:00:00:00:00:02) | udp srcport 53100 dstport 9000 payload \"ping:seq=1\"\nFrame 2 [t=0.002000000s]: 10.20.0.1 (00:00:00:00:00:02) -> 10.20.0.15 (00:00:00:00:00:01) | udp payload \"pong:seq=1\"\n```","completion":"Reconstructs the 2-frame capture (`udp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.20.0.15 (00:00:00:00:00:01) -> 10.20.0.1 (00:00:00:00:00:02) | udp srcport 53100 dstport 9000 payload \"ping:seq=1\"\nFrame 2 [t=0.002000000s]: 10.20.0.1 (00:00:00:00:00:02) -> 10.20.0.15 (00:00:00:00:00:01) | udp payload \"pong:seq=1\"\n```"},{"role":"assistant","content":"Reconstructs the 2-frame capture (`udp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-reverse-proto-quickstart-sctp","task_type":"reverse_decompile","protocols":["sctp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.50.1.10 (00:00:00:00:00:01) -> 10.50.1.20 (00:00:00:00:00:02) | sctp init srcport 38412 dstport 38412 vtag 0 tsn 1000\nFrame 2 [t=0.001000000s]: 10.50.1.20 (00:00:00:00:00:02) -> 10.50.1.10 (00:00:00:00:00:01) | sctp initack vtag 0x11223344 tsn 2000\nFrame 3 [t=0.002000000s]: 10.50.1.10 (00:00:00:00:00:01) -> 10.50.1.20 (00:00:00:00:00:02) | sctp data vtag 0x22334455 tsn 1001 stream 0 ssn 0 ppid 60 hexpayload \"0015000900000100\"\n```","completion":"Reconstructs the 3-frame capture (`sctp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.50.1.10 (00:00:00:00:00:01) -> 10.50.1.20 (00:00:00:00:00:02) | sctp init srcport 38412 dstport 38412 vtag 0 tsn 1000\nFrame 2 [t=0.001000000s]: 10.50.1.20 (00:00:00:00:00:02) -> 10.50.1.10 (00:00:00:00:00:01) | sctp initack vtag 0x11223344 tsn 2000\nFrame 3 [t=0.002000000s]: 10.50.1.10 (00:00:00:00:00:01) -> 10.50.1.20 (00:00:00:00:00:02) | sctp data vtag 0x22334455 tsn 1001 stream 0 ssn 0 ppid 60 hexpayload \"0015000900000100\"\n```"},{"role":"assistant","content":"Reconstructs the 3-frame capture (`sctp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-reverse-proto-lab-tcp","task_type":"reverse_decompile","protocols":["tcp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 172.16.20.10 (00:00:00:00:00:01) -> 172.16.20.90 (00:00:00:00:00:02) | tcp syn srcport 54110 dstport 8443 win 65535 mss 1460 wscale 7 sackperm tsval 1000 tsecr 0\nFrame 2 [t=0.001000000s]: 172.16.20.90 (00:00:00:00:00:02) -> 172.16.20.10 (00:00:00:00:00:01) | tcp syn ack win 65535 mss 1460 wscale 7 sackperm tsval 5000 tsecr 1000\nFrame 3 [t=0.002000000s]: 172.16.20.10 (00:00:00:00:00:01) -> 172.16.20.90 (00:00:00:00:00:02) | tcp ack tsval 1001 tsecr 5000\nFrame 4 [t=0.004000000s]: 172.16.20.10 (00:00:00:00:00:01) -> 172.16.20.90 (00:00:00:00:00:02) | tcp psh ack tsval 1003 tsecr 5000 payload \"PING /healthz\\r\\n\"\nFrame 5 [t=0.006000000s]: 172.16.20.90 (00:00:00:00:00:02) -> 172.16.20.10 (00:00:00:00:00:01) | tcp psh ack tsval 5002 tsecr 1003 payload \"200 OK\\r\\n\"\nFrame 6 [t=0.009000000s]: 172.16.20.10 (00:00:00:00:00:01) -> 172.16.20.90 (00:00:00:00:00:02) | tcp fin ack tsval 1006 tsecr 5002\nFrame 7 [t=0.010000000s]: 172.16.20.90 (00:00:00:00:00:02) -> 172.16.20.10 (00:00:00:00:00:01) | tcp fin ack tsval 5003 tsecr 1007\nFrame 8 [t=0.011000000s]: 172.16.20.10 (00:00:00:00:00:01) -> 172.16.20.90 (00:00:00:00:00:02) | tcp ack tsval 1007 tsecr 5004\n```","completion":"Reconstructs the 8-frame capture (`tcp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost app_client { ip 172.16.20.10 }\nhost api_origin { ip 172.16.20.90 }\n\ncompile {\n    // 1. 3-way handshake negotiating MSS 1460, Window Scale 7, SACK, and Timestamps\n    app_client -> api_origin tcp syn srcport 54110 dstport 8443 win 65535 mss 1460 wscale 7 sackperm tsval 1000 tsecr 0 wait 1ms\n    app_client <- api_origin tcp syn ack win 65535 mss 1460 wscale 7 sackperm tsval 5000 tsecr 1000 wait 1ms\n    app_client -> api_origin tcp ack tsval 1001 tsecr 5000 wait 2ms\n    // 2. Bidirectional application payload (seq/acknum advance automatically by byte length)\n    app_client -> api_origin tcp psh ack tsval 1003 tsecr 5000 payload \"PING /healthz\\r\\n\" wait 2ms\n    app_client <- api_origin tcp psh ack tsval 5002 tsecr 1003 payload \"200 OK\\r\\n\" wait 3ms\n    // 3. Clean 3-packet FIN/ACK session close\n    app_client -> api_origin tcp fin ack tsval 1006 tsecr 5002 wait 1ms\n    app_client <- api_origin tcp fin ack tsval 5003 tsecr 1007 wait 1ms\n    app_client -> api_origin tcp ack tsval 1007 tsecr 5004\n}\n```","frasm_code":"host app_client { ip 172.16.20.10 }\nhost api_origin { ip 172.16.20.90 }\n\ncompile {\n    // 1. 3-way handshake negotiating MSS 1460, Window Scale 7, SACK, and Timestamps\n    app_client -> api_origin tcp syn srcport 54110 dstport 8443 win 65535 mss 1460 wscale 7 sackperm tsval 1000 tsecr 0 wait 1ms\n    app_client <- api_origin tcp syn ack win 65535 mss 1460 wscale 7 sackperm tsval 5000 tsecr 1000 wait 1ms\n    app_client -> api_origin tcp ack tsval 1001 tsecr 5000 wait 2ms\n    // 2. Bidirectional application payload (seq/acknum advance automatically by byte length)\n    app_client -> api_origin tcp psh ack tsval 1003 tsecr 5000 payload \"PING /healthz\\r\\n\" wait 2ms\n    app_client <- api_origin tcp psh ack tsval 5002 tsecr 1003 payload \"200 OK\\r\\n\" wait 3ms\n    // 3. Clean 3-packet FIN/ACK session close\n    app_client -> api_origin tcp fin ack tsval 1006 tsecr 5002 wait 1ms\n    app_client <- api_origin tcp fin ack tsval 5003 tsecr 1007 wait 1ms\n    app_client -> api_origin tcp ack tsval 1007 tsecr 5004\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 172.16.20.10 (00:00:00:00:00:01) -> 172.16.20.90 (00:00:00:00:00:02) | tcp syn srcport 54110 dstport 8443 win 65535 mss 1460 wscale 7 sackperm tsval 1000 tsecr 0\nFrame 2 [t=0.001000000s]: 172.16.20.90 (00:00:00:00:00:02) -> 172.16.20.10 (00:00:00:00:00:01) | tcp syn ack win 65535 mss 1460 wscale 7 sackperm tsval 5000 tsecr 1000\nFrame 3 [t=0.002000000s]: 172.16.20.10 (00:00:00:00:00:01) -> 172.16.20.90 (00:00:00:00:00:02) | tcp ack tsval 1001 tsecr 5000\nFrame 4 [t=0.004000000s]: 172.16.20.10 (00:00:00:00:00:01) -> 172.16.20.90 (00:00:00:00:00:02) | tcp psh ack tsval 1003 tsecr 5000 payload \"PING /healthz\\r\\n\"\nFrame 5 [t=0.006000000s]: 172.16.20.90 (00:00:00:00:00:02) -> 172.16.20.10 (00:00:00:00:00:01) | tcp psh ack tsval 5002 tsecr 1003 payload \"200 OK\\r\\n\"\nFrame 6 [t=0.009000000s]: 172.16.20.10 (00:00:00:00:00:01) -> 172.16.20.90 (00:00:00:00:00:02) | tcp fin ack tsval 1006 tsecr 5002\nFrame 7 [t=0.010000000s]: 172.16.20.90 (00:00:00:00:00:02) -> 172.16.20.10 (00:00:00:00:00:01) | tcp fin ack tsval 5003 tsecr 1007\nFrame 8 [t=0.011000000s]: 172.16.20.10 (00:00:00:00:00:01) -> 172.16.20.90 (00:00:00:00:00:02) | tcp ack tsval 1007 tsecr 5004\n```"},{"role":"assistant","content":"Reconstructs the 8-frame capture (`tcp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost app_client { ip 172.16.20.10 }\nhost api_origin { ip 172.16.20.90 }\n\ncompile {\n    // 1. 3-way handshake negotiating MSS 1460, Window Scale 7, SACK, and Timestamps\n    app_client -> api_origin tcp syn srcport 54110 dstport 8443 win 65535 mss 1460 wscale 7 sackperm tsval 1000 tsecr 0 wait 1ms\n    app_client <- api_origin tcp syn ack win 65535 mss 1460 wscale 7 sackperm tsval 5000 tsecr 1000 wait 1ms\n    app_client -> api_origin tcp ack tsval 1001 tsecr 5000 wait 2ms\n    // 2. Bidirectional application payload (seq/acknum advance automatically by byte length)\n    app_client -> api_origin tcp psh ack tsval 1003 tsecr 5000 payload \"PING /healthz\\r\\n\" wait 2ms\n    app_client <- api_origin tcp psh ack tsval 5002 tsecr 1003 payload \"200 OK\\r\\n\" wait 3ms\n    // 3. Clean 3-packet FIN/ACK session close\n    app_client -> api_origin tcp fin ack tsval 1006 tsecr 5002 wait 1ms\n    app_client <- api_origin tcp fin ack tsval 5003 tsecr 1007 wait 1ms\n    app_client -> api_origin tcp ack tsval 1007 tsecr 5004\n}\n```"}]}
{"id":"sft-reverse-proto-lab-sctp","task_type":"reverse_decompile","protocols":["sctp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 172.20.10.11 (00:00:00:00:00:01) -> 172.20.10.50 (00:00:00:00:00:02) | sctp init srcport 38412 dstport 38412 vtag 0 tsn 1000 dscp 46\nFrame 2 [t=0.001000000s]: 172.20.10.50 (00:00:00:00:00:02) -> 172.20.10.11 (00:00:00:00:00:01) | sctp initack vtag 0xa1b2c3d4 tsn 5000 dscp 46\nFrame 3 [t=0.002000000s]: 172.20.10.11 (00:00:00:00:00:01) -> 172.20.10.50 (00:00:00:00:00:02) | sctp cookieecho vtag 0x55667788 dscp 46\nFrame 4 [t=0.003000000s]: 172.20.10.50 (00:00:00:00:00:02) -> 172.20.10.11 (00:00:00:00:00:01) | sctp cookieack vtag 0xa1b2c3d4 dscp 46\nFrame 5 [t=0.005000000s]: 172.20.10.11 (00:00:00:00:00:01) -> 172.20.10.50 (00:00:00:00:00:02) | sctp data vtag 0x55667788 tsn 1000 stream 0 ssn 0 ppid 60 dscp 46 hexpayload \"00150014000002001b00080000f110000001\"\nFrame 6 [t=0.006000000s]: 172.20.10.50 (00:00:00:00:00:02) -> 172.20.10.11 (00:00:00:00:00:01) | sctp sack vtag 0xa1b2c3d4 tsn 1000 dscp 46\nFrame 7 [t=0.011000000s]: 172.20.10.11 (00:00:00:00:00:01) -> 172.20.10.50 (00:00:00:00:00:02) | sctp heartbeat vtag 0x55667788\nFrame 8 [t=0.012000000s]: 172.20.10.50 (00:00:00:00:00:02) -> 172.20.10.11 (00:00:00:00:00:01) | sctp heartbeatack vtag 0xa1b2c3d4\n```","completion":"Reconstructs the 8-frame capture (`sctp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost gnb_du { ip 172.20.10.11 }\nhost core_amf { ip 172.20.10.50 }\n\ncompile {\n    // 1. RFC 9260 4-way association handshake (INIT must carry vtag 0)\n    gnb_du -> core_amf sctp init srcport 38412 dstport 38412 vtag 0 tsn 1000 dscp 46 wait 1ms\n    gnb_du <- core_amf sctp initack vtag 0xa1b2c3d4 tsn 5000 dscp 46 wait 1ms\n    gnb_du -> core_amf sctp cookieecho vtag 0x55667788 dscp 46 wait 1ms\n    gnb_du <- core_amf sctp cookieack vtag 0xa1b2c3d4 dscp 46 wait 2ms\n    // 2. NGAP payload over Stream 0 (PPID 60 = 3GPP NGAP) + SACK acknowledgment\n    gnb_du -> core_amf sctp data vtag 0x55667788 tsn 1000 stream 0 ssn 0 ppid 60 dscp 46 hexpayload \"00150014000002001b00080000f110000001\" wait 1ms\n    gnb_du <- core_amf sctp sack vtag 0xa1b2c3d4 tsn 1000 dscp 46 wait 5ms\n    // 3. Path liveness probe\n    gnb_du -> core_amf sctp heartbeat vtag 0x55667788 wait 1ms\n    gnb_du <- core_amf sctp heartbeatack vtag 0xa1b2c3d4\n}\n```","frasm_code":"host gnb_du { ip 172.20.10.11 }\nhost core_amf { ip 172.20.10.50 }\n\ncompile {\n    // 1. RFC 9260 4-way association handshake (INIT must carry vtag 0)\n    gnb_du -> core_amf sctp init srcport 38412 dstport 38412 vtag 0 tsn 1000 dscp 46 wait 1ms\n    gnb_du <- core_amf sctp initack vtag 0xa1b2c3d4 tsn 5000 dscp 46 wait 1ms\n    gnb_du -> core_amf sctp cookieecho vtag 0x55667788 dscp 46 wait 1ms\n    gnb_du <- core_amf sctp cookieack vtag 0xa1b2c3d4 dscp 46 wait 2ms\n    // 2. NGAP payload over Stream 0 (PPID 60 = 3GPP NGAP) + SACK acknowledgment\n    gnb_du -> core_amf sctp data vtag 0x55667788 tsn 1000 stream 0 ssn 0 ppid 60 dscp 46 hexpayload \"00150014000002001b00080000f110000001\" wait 1ms\n    gnb_du <- core_amf sctp sack vtag 0xa1b2c3d4 tsn 1000 dscp 46 wait 5ms\n    // 3. Path liveness probe\n    gnb_du -> core_amf sctp heartbeat vtag 0x55667788 wait 1ms\n    gnb_du <- core_amf sctp heartbeatack vtag 0xa1b2c3d4\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 172.20.10.11 (00:00:00:00:00:01) -> 172.20.10.50 (00:00:00:00:00:02) | sctp init srcport 38412 dstport 38412 vtag 0 tsn 1000 dscp 46\nFrame 2 [t=0.001000000s]: 172.20.10.50 (00:00:00:00:00:02) -> 172.20.10.11 (00:00:00:00:00:01) | sctp initack vtag 0xa1b2c3d4 tsn 5000 dscp 46\nFrame 3 [t=0.002000000s]: 172.20.10.11 (00:00:00:00:00:01) -> 172.20.10.50 (00:00:00:00:00:02) | sctp cookieecho vtag 0x55667788 dscp 46\nFrame 4 [t=0.003000000s]: 172.20.10.50 (00:00:00:00:00:02) -> 172.20.10.11 (00:00:00:00:00:01) | sctp cookieack vtag 0xa1b2c3d4 dscp 46\nFrame 5 [t=0.005000000s]: 172.20.10.11 (00:00:00:00:00:01) -> 172.20.10.50 (00:00:00:00:00:02) | sctp data vtag 0x55667788 tsn 1000 stream 0 ssn 0 ppid 60 dscp 46 hexpayload \"00150014000002001b00080000f110000001\"\nFrame 6 [t=0.006000000s]: 172.20.10.50 (00:00:00:00:00:02) -> 172.20.10.11 (00:00:00:00:00:01) | sctp sack vtag 0xa1b2c3d4 tsn 1000 dscp 46\nFrame 7 [t=0.011000000s]: 172.20.10.11 (00:00:00:00:00:01) -> 172.20.10.50 (00:00:00:00:00:02) | sctp heartbeat vtag 0x55667788\nFrame 8 [t=0.012000000s]: 172.20.10.50 (00:00:00:00:00:02) -> 172.20.10.11 (00:00:00:00:00:01) | sctp heartbeatack vtag 0xa1b2c3d4\n```"},{"role":"assistant","content":"Reconstructs the 8-frame capture (`sctp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost gnb_du { ip 172.20.10.11 }\nhost core_amf { ip 172.20.10.50 }\n\ncompile {\n    // 1. RFC 9260 4-way association handshake (INIT must carry vtag 0)\n    gnb_du -> core_amf sctp init srcport 38412 dstport 38412 vtag 0 tsn 1000 dscp 46 wait 1ms\n    gnb_du <- core_amf sctp initack vtag 0xa1b2c3d4 tsn 5000 dscp 46 wait 1ms\n    gnb_du -> core_amf sctp cookieecho vtag 0x55667788 dscp 46 wait 1ms\n    gnb_du <- core_amf sctp cookieack vtag 0xa1b2c3d4 dscp 46 wait 2ms\n    // 2. NGAP payload over Stream 0 (PPID 60 = 3GPP NGAP) + SACK acknowledgment\n    gnb_du -> core_amf sctp data vtag 0x55667788 tsn 1000 stream 0 ssn 0 ppid 60 dscp 46 hexpayload \"00150014000002001b00080000f110000001\" wait 1ms\n    gnb_du <- core_amf sctp sack vtag 0xa1b2c3d4 tsn 1000 dscp 46 wait 5ms\n    // 3. Path liveness probe\n    gnb_du -> core_amf sctp heartbeat vtag 0x55667788 wait 1ms\n    gnb_du <- core_amf sctp heartbeatack vtag 0xa1b2c3d4\n}\n```"}]}
{"id":"sft-reverse-ex-routing-bgp-bfd-fast-failover","task_type":"reverse_decompile","protocols":["tcp","bgp","bfd"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 198.51.100.1 (00:00:00:00:00:01) -> 198.51.100.2 (00:00:00:00:00:02) | tcp syn srcport 54179 dstport 179 ttl 1 dscp 48\nFrame 2 [t=0.001000000s]: 198.51.100.2 (00:00:00:00:00:02) -> 198.51.100.1 (00:00:00:00:00:01) | tcp syn ack ttl 1 dscp 48\nFrame 3 [t=0.002000000s]: 198.51.100.1 (00:00:00:00:00:01) -> 198.51.100.2 (00:00:00:00:00:02) | tcp ack ttl 1 dscp 48\nFrame 4 [t=0.003000000s]: 198.51.100.1 (00:00:00:00:00:01) -> 198.51.100.2 (00:00:00:00:00:02) | bgp open asn 65001 holdtime 90 bgpid 198.51.100.1 ttl 1 dscp 48\nFrame 5 [t=0.005000000s]: 198.51.100.2 (00:00:00:00:00:02) -> 198.51.100.1 (00:00:00:00:00:01) | bgp open asn 65002 holdtime 90 bgpid 198.51.100.2 ttl 1 dscp 48\nFrame 6 [t=0.007000000s]: 198.51.100.1 (00:00:00:00:00:01) -> 198.51.100.2 (00:00:00:00:00:02) | bgp keepalive ttl 1 dscp 48\nFrame 7 [t=0.008000000s]: 198.51.100.2 (00:00:00:00:00:02) -> 198.51.100.1 (00:00:00:00:00:01) | bgp keepalive ttl 1 dscp 48\nFrame 8 [t=0.010000000s]: 198.51.100.1 (00:00:00:00:00:01) -> 198.51.100.2 (00:00:00:00:00:02) | bgp update prefix \"203.0.113.0/24\" nexthop 198.51.100.1 asn 65001 ttl 1 dscp 48\nFrame 9 [t=0.015000000s]: 198.51.100.1 (00:00:00:00:00:01) -> 198.51.100.2 (00:00:00:00:00:02) | bfd state 3 diag 0 mydisc 0x1001 yourdisc 0x2002 mintx 50000 minrx 50000 mult 3 ttl 255\nFrame 10 [t=0.065000000s]: 198.51.100.2 (00:00:00:00:00:02) -> 198.51.100.1 (00:00:00:00:00:01) | bfd state 3 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 ttl 255\n```","completion":"Reconstructs the 10-frame capture (`tcp`, `bgp`, `bfd`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost edge_rtr1 { ip 198.51.100.1 }\nhost isp_rtr2  { ip 198.51.100.2 }\n\ncompile {\n    edge_rtr1 -> isp_rtr2 tcp syn srcport 54179 dstport 179 ttl 1 dscp 48 wait 1ms\n    edge_rtr1 <- isp_rtr2 tcp syn ack ttl 1 dscp 48 wait 1ms\n    edge_rtr1 -> isp_rtr2 tcp ack ttl 1 dscp 48 wait 1ms\n    edge_rtr1 -> isp_rtr2 bgp open asn 65001 holdtime 90 bgpid 198.51.100.1 ttl 1 dscp 48 wait 2ms\n    edge_rtr1 <- isp_rtr2 bgp open asn 65002 holdtime 90 bgpid 198.51.100.2 ttl 1 dscp 48 wait 2ms\n    edge_rtr1 -> isp_rtr2 bgp keepalive ttl 1 dscp 48 wait 1ms\n    edge_rtr1 <- isp_rtr2 bgp keepalive ttl 1 dscp 48 wait 2ms\n    edge_rtr1 -> isp_rtr2 bgp update prefix \"203.0.113.0/24\" nexthop 198.51.100.1 asn 65001 ttl 1 dscp 48 wait 5ms\n    edge_rtr1 -> isp_rtr2 bfd state 3 diag 0 mydisc 0x1001 yourdisc 0x2002 mintx 50000 minrx 50000 mult 3 ttl 255 wait 50ms\n    edge_rtr1 <- isp_rtr2 bfd state 3 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 ttl 255\n}\n```","frasm_code":"host edge_rtr1 { ip 198.51.100.1 }\nhost isp_rtr2  { ip 198.51.100.2 }\n\ncompile {\n    edge_rtr1 -> isp_rtr2 tcp syn srcport 54179 dstport 179 ttl 1 dscp 48 wait 1ms\n    edge_rtr1 <- isp_rtr2 tcp syn ack ttl 1 dscp 48 wait 1ms\n    edge_rtr1 -> isp_rtr2 tcp ack ttl 1 dscp 48 wait 1ms\n    edge_rtr1 -> isp_rtr2 bgp open asn 65001 holdtime 90 bgpid 198.51.100.1 ttl 1 dscp 48 wait 2ms\n    edge_rtr1 <- isp_rtr2 bgp open asn 65002 holdtime 90 bgpid 198.51.100.2 ttl 1 dscp 48 wait 2ms\n    edge_rtr1 -> isp_rtr2 bgp keepalive ttl 1 dscp 48 wait 1ms\n    edge_rtr1 <- isp_rtr2 bgp keepalive ttl 1 dscp 48 wait 2ms\n    edge_rtr1 -> isp_rtr2 bgp update prefix \"203.0.113.0/24\" nexthop 198.51.100.1 asn 65001 ttl 1 dscp 48 wait 5ms\n    edge_rtr1 -> isp_rtr2 bfd state 3 diag 0 mydisc 0x1001 yourdisc 0x2002 mintx 50000 minrx 50000 mult 3 ttl 255 wait 50ms\n    edge_rtr1 <- isp_rtr2 bfd state 3 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 ttl 255\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 198.51.100.1 (00:00:00:00:00:01) -> 198.51.100.2 (00:00:00:00:00:02) | tcp syn srcport 54179 dstport 179 ttl 1 dscp 48\nFrame 2 [t=0.001000000s]: 198.51.100.2 (00:00:00:00:00:02) -> 198.51.100.1 (00:00:00:00:00:01) | tcp syn ack ttl 1 dscp 48\nFrame 3 [t=0.002000000s]: 198.51.100.1 (00:00:00:00:00:01) -> 198.51.100.2 (00:00:00:00:00:02) | tcp ack ttl 1 dscp 48\nFrame 4 [t=0.003000000s]: 198.51.100.1 (00:00:00:00:00:01) -> 198.51.100.2 (00:00:00:00:00:02) | bgp open asn 65001 holdtime 90 bgpid 198.51.100.1 ttl 1 dscp 48\nFrame 5 [t=0.005000000s]: 198.51.100.2 (00:00:00:00:00:02) -> 198.51.100.1 (00:00:00:00:00:01) | bgp open asn 65002 holdtime 90 bgpid 198.51.100.2 ttl 1 dscp 48\nFrame 6 [t=0.007000000s]: 198.51.100.1 (00:00:00:00:00:01) -> 198.51.100.2 (00:00:00:00:00:02) | bgp keepalive ttl 1 dscp 48\nFrame 7 [t=0.008000000s]: 198.51.100.2 (00:00:00:00:00:02) -> 198.51.100.1 (00:00:00:00:00:01) | bgp keepalive ttl 1 dscp 48\nFrame 8 [t=0.010000000s]: 198.51.100.1 (00:00:00:00:00:01) -> 198.51.100.2 (00:00:00:00:00:02) | bgp update prefix \"203.0.113.0/24\" nexthop 198.51.100.1 asn 65001 ttl 1 dscp 48\nFrame 9 [t=0.015000000s]: 198.51.100.1 (00:00:00:00:00:01) -> 198.51.100.2 (00:00:00:00:00:02) | bfd state 3 diag 0 mydisc 0x1001 yourdisc 0x2002 mintx 50000 minrx 50000 mult 3 ttl 255\nFrame 10 [t=0.065000000s]: 198.51.100.2 (00:00:00:00:00:02) -> 198.51.100.1 (00:00:00:00:00:01) | bfd state 3 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 ttl 255\n```"},{"role":"assistant","content":"Reconstructs the 10-frame capture (`tcp`, `bgp`, `bfd`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost edge_rtr1 { ip 198.51.100.1 }\nhost isp_rtr2  { ip 198.51.100.2 }\n\ncompile {\n    edge_rtr1 -> isp_rtr2 tcp syn srcport 54179 dstport 179 ttl 1 dscp 48 wait 1ms\n    edge_rtr1 <- isp_rtr2 tcp syn ack ttl 1 dscp 48 wait 1ms\n    edge_rtr1 -> isp_rtr2 tcp ack ttl 1 dscp 48 wait 1ms\n    edge_rtr1 -> isp_rtr2 bgp open asn 65001 holdtime 90 bgpid 198.51.100.1 ttl 1 dscp 48 wait 2ms\n    edge_rtr1 <- isp_rtr2 bgp open asn 65002 holdtime 90 bgpid 198.51.100.2 ttl 1 dscp 48 wait 2ms\n    edge_rtr1 -> isp_rtr2 bgp keepalive ttl 1 dscp 48 wait 1ms\n    edge_rtr1 <- isp_rtr2 bgp keepalive ttl 1 dscp 48 wait 2ms\n    edge_rtr1 -> isp_rtr2 bgp update prefix \"203.0.113.0/24\" nexthop 198.51.100.1 asn 65001 ttl 1 dscp 48 wait 5ms\n    edge_rtr1 -> isp_rtr2 bfd state 3 diag 0 mydisc 0x1001 yourdisc 0x2002 mintx 50000 minrx 50000 mult 3 ttl 255 wait 50ms\n    edge_rtr1 <- isp_rtr2 bfd state 3 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 ttl 255\n}\n```"}]}
{"id":"sft-reverse-ex-routing-fhrp-vrrp-and-hsrp","task_type":"reverse_decompile","protocols":["vlan","vrrp","hsrp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.10.0.2 (00:00:5e:00:01:0a) -> 224.0.0.18 (00:00:00:00:00:02) | vlan 10 vrrp vrid 10 priority 120 advint 1 vip 10.10.0.1\nFrame 2 [t=0.005000000s]: 10.20.0.2 (00:00:0c:07:ac:14) -> 224.0.0.2 (00:00:00:00:00:04) | vlan 20 hsrp group 20 priority 110 state 16 hellotime 3 vip 10.20.0.1\n```","completion":"Reconstructs the 2-frame capture (`vlan`, `vrrp`, `hsrp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost core_gw_a  { ip 10.10.0.2 mac 00:00:5e:00:01:0a }\nhost vrrp_mcast { ip 224.0.0.18 }\nhost dist_gw_a  { ip 10.20.0.2 mac 00:00:0c:07:ac:14 }\nhost hsrp_mcast { ip 224.0.0.2 }\n\ncompile {\n    core_gw_a -> vrrp_mcast vlan 10 vrrp vrid 10 priority 120 advint 1 vip 10.10.0.1 wait 5ms\n    dist_gw_a -> hsrp_mcast vlan 20 hsrp group 20 priority 110 state 16 hellotime 3 vip 10.20.0.1\n}\n```","frasm_code":"host core_gw_a  { ip 10.10.0.2 mac 00:00:5e:00:01:0a }\nhost vrrp_mcast { ip 224.0.0.18 }\nhost dist_gw_a  { ip 10.20.0.2 mac 00:00:0c:07:ac:14 }\nhost hsrp_mcast { ip 224.0.0.2 }\n\ncompile {\n    core_gw_a -> vrrp_mcast vlan 10 vrrp vrid 10 priority 120 advint 1 vip 10.10.0.1 wait 5ms\n    dist_gw_a -> hsrp_mcast vlan 20 hsrp group 20 priority 110 state 16 hellotime 3 vip 10.20.0.1\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.10.0.2 (00:00:5e:00:01:0a) -> 224.0.0.18 (00:00:00:00:00:02) | vlan 10 vrrp vrid 10 priority 120 advint 1 vip 10.10.0.1\nFrame 2 [t=0.005000000s]: 10.20.0.2 (00:00:0c:07:ac:14) -> 224.0.0.2 (00:00:00:00:00:04) | vlan 20 hsrp group 20 priority 110 state 16 hellotime 3 vip 10.20.0.1\n```"},{"role":"assistant","content":"Reconstructs the 2-frame capture (`vlan`, `vrrp`, `hsrp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost core_gw_a  { ip 10.10.0.2 mac 00:00:5e:00:01:0a }\nhost vrrp_mcast { ip 224.0.0.18 }\nhost dist_gw_a  { ip 10.20.0.2 mac 00:00:0c:07:ac:14 }\nhost hsrp_mcast { ip 224.0.0.2 }\n\ncompile {\n    core_gw_a -> vrrp_mcast vlan 10 vrrp vrid 10 priority 120 advint 1 vip 10.10.0.1 wait 5ms\n    dist_gw_a -> hsrp_mcast vlan 20 hsrp group 20 priority 110 state 16 hellotime 3 vip 10.20.0.1\n}\n```"}]}
{"id":"sft-reverse-proto-quickstart-bgp","task_type":"reverse_decompile","protocols":["bgp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.255.0.1 (00:00:00:00:00:01) -> 10.255.0.2 (00:00:00:00:00:02) | bgp open asn 65001 holdtime 90 bgpid 10.255.0.1\nFrame 2 [t=0.002000000s]: 10.255.0.2 (00:00:00:00:00:02) -> 10.255.0.1 (00:00:00:00:00:01) | bgp open asn 65101 holdtime 90 bgpid 10.255.0.2\nFrame 3 [t=0.004000000s]: 10.255.0.1 (00:00:00:00:00:01) -> 10.255.0.2 (00:00:00:00:00:02) | bgp keepalive\n```","completion":"Reconstructs the 3-frame capture (`bgp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.255.0.1 (00:00:00:00:00:01) -> 10.255.0.2 (00:00:00:00:00:02) | bgp open asn 65001 holdtime 90 bgpid 10.255.0.1\nFrame 2 [t=0.002000000s]: 10.255.0.2 (00:00:00:00:00:02) -> 10.255.0.1 (00:00:00:00:00:01) | bgp open asn 65101 holdtime 90 bgpid 10.255.0.2\nFrame 3 [t=0.004000000s]: 10.255.0.1 (00:00:00:00:00:01) -> 10.255.0.2 (00:00:00:00:00:02) | bgp keepalive\n```"},{"role":"assistant","content":"Reconstructs the 3-frame capture (`bgp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-reverse-proto-quickstart-ospf","task_type":"reverse_decompile","protocols":["ospf"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.0.0.1 (00:00:00:00:00:01) -> 10.0.0.2 (00:00:00:00:00:02) | ospf hello routerid 1.1.1.1 areaid 0\n```","completion":"Reconstructs the 1-frame capture (`ospf`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.0.0.1 (00:00:00:00:00:01) -> 10.0.0.2 (00:00:00:00:00:02) | ospf hello routerid 1.1.1.1 areaid 0\n```"},{"role":"assistant","content":"Reconstructs the 1-frame capture (`ospf`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-reverse-proto-quickstart-bfd","task_type":"reverse_decompile","protocols":["bfd"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 172.16.0.1 (00:00:00:00:00:01) -> 172.16.0.2 (00:00:00:00:00:02) | bfd state 3 mydisc 101 yourdisc 202 mintx 50000 minrx 50000 mult 3\nFrame 2 [t=0.050000000s]: 172.16.0.2 (00:00:00:00:00:02) -> 172.16.0.1 (00:00:00:00:00:01) | bfd state 3 mydisc 202 yourdisc 101 mintx 50000 minrx 50000 mult 3\n```","completion":"Reconstructs the 2-frame capture (`bfd`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost rtr_leaf  { ip 172.16.0.1 }\nhost rtr_spine { ip 172.16.0.2 }\n\ncompile {\n    rtr_leaf -> rtr_spine bfd state 3 mydisc 101 yourdisc 202 mintx 50000 minrx 50000 mult 3 wait 50ms\n    rtr_leaf <- rtr_spine bfd state 3 mydisc 202 yourdisc 101 mintx 50000 minrx 50000 mult 3\n}\n```","frasm_code":"host rtr_leaf  { ip 172.16.0.1 }\nhost rtr_spine { ip 172.16.0.2 }\n\ncompile {\n    rtr_leaf -> rtr_spine bfd state 3 mydisc 101 yourdisc 202 mintx 50000 minrx 50000 mult 3 wait 50ms\n    rtr_leaf <- rtr_spine bfd state 3 mydisc 202 yourdisc 101 mintx 50000 minrx 50000 mult 3\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 172.16.0.1 (00:00:00:00:00:01) -> 172.16.0.2 (00:00:00:00:00:02) | bfd state 3 mydisc 101 yourdisc 202 mintx 50000 minrx 50000 mult 3\nFrame 2 [t=0.050000000s]: 172.16.0.2 (00:00:00:00:00:02) -> 172.16.0.1 (00:00:00:00:00:01) | bfd state 3 mydisc 202 yourdisc 101 mintx 50000 minrx 50000 mult 3\n```"},{"role":"assistant","content":"Reconstructs the 2-frame capture (`bfd`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost rtr_leaf  { ip 172.16.0.1 }\nhost rtr_spine { ip 172.16.0.2 }\n\ncompile {\n    rtr_leaf -> rtr_spine bfd state 3 mydisc 101 yourdisc 202 mintx 50000 minrx 50000 mult 3 wait 50ms\n    rtr_leaf <- rtr_spine bfd state 3 mydisc 202 yourdisc 101 mintx 50000 minrx 50000 mult 3\n}\n```"}]}
{"id":"sft-reverse-proto-lab-ospf","task_type":"reverse_decompile","protocols":["ospf"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 172.16.0.1 (00:00:00:00:00:01) -> 172.16.0.2 (00:00:00:00:00:02) | ospf hello routerid 1.1.1.1 areaid 0 hellointerval 10 deadinterval 40 priority 100 dscp 48\nFrame 2 [t=0.002000000s]: 172.16.0.2 (00:00:00:00:00:02) -> 172.16.0.1 (00:00:00:00:00:01) | ospf hello routerid 2.2.2.2 areaid 0 hellointerval 10 deadinterval 40 priority 1 dscp 48\nFrame 3 [t=0.004000000s]: 172.16.0.1 (00:00:00:00:00:01) -> 172.16.0.2 (00:00:00:00:00:02) | ospf dbd routerid 1.1.1.1 areaid 0 dscp 48\nFrame 4 [t=0.005000000s]: 172.16.0.2 (00:00:00:00:00:02) -> 172.16.0.1 (00:00:00:00:00:01) | ospf lsr routerid 2.2.2.2 areaid 0 dscp 48\nFrame 5 [t=0.006000000s]: 172.16.0.1 (00:00:00:00:00:01) -> 172.16.0.2 (00:00:00:00:00:02) | ospf lsu routerid 1.1.1.1 areaid 0 dscp 48\nFrame 6 [t=0.007000000s]: 172.16.0.2 (00:00:00:00:00:02) -> 172.16.0.1 (00:00:00:00:00:01) | ospf lsack routerid 2.2.2.2 areaid 0 dscp 48\nFrame 7 [t=0.011000000s]: fe80::1c73:1 (00:00:00:00:00:04) -> ff02::5 (00:00:00:00:00:03) | ospf hello routerid 1.1.1.1 areaid 0.0.0.0 hellointerval 10 deadinterval 40\n```","completion":"Reconstructs the 7-frame capture (`ospf`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost core_1_v4 { ip 172.16.0.1 }\nhost core_2_v4 { ip 172.16.0.2 }\nhost allspf_v6 { ip ff02::5 }\nhost core_1_v6 { ip fe80::1c73:1 }\n\ncompile {\n    // 1. OSPFv2 Area 0 adjacency bring-up and LSA exchange\n    core_1_v4 -> core_2_v4 ospf hello routerid 1.1.1.1 areaid 0 hellointerval 10 deadinterval 40 priority 100 dscp 48 wait 2ms\n    core_1_v4 <- core_2_v4 ospf hello routerid 2.2.2.2 areaid 0 hellointerval 10 deadinterval 40 priority 1 dscp 48 wait 2ms\n    core_1_v4 -> core_2_v4 ospf dbd routerid 1.1.1.1 areaid 0 dscp 48 wait 1ms\n    core_1_v4 <- core_2_v4 ospf lsr routerid 2.2.2.2 areaid 0 dscp 48 wait 1ms\n    core_1_v4 -> core_2_v4 ospf lsu routerid 1.1.1.1 areaid 0 dscp 48 wait 1ms\n    core_1_v4 <- core_2_v4 ospf lsack routerid 2.2.2.2 areaid 0 dscp 48 wait 4ms\n    // 2. OSPFv3 over IPv6 multicast ff02::5 (routerid stays 32-bit dotted-quad!)\n    core_1_v6 -> allspf_v6 ospf hello routerid 1.1.1.1 areaid 0.0.0.0 hellointerval 10 deadinterval 40\n}\n```","frasm_code":"host core_1_v4 { ip 172.16.0.1 }\nhost core_2_v4 { ip 172.16.0.2 }\nhost allspf_v6 { ip ff02::5 }\nhost core_1_v6 { ip fe80::1c73:1 }\n\ncompile {\n    // 1. OSPFv2 Area 0 adjacency bring-up and LSA exchange\n    core_1_v4 -> core_2_v4 ospf hello routerid 1.1.1.1 areaid 0 hellointerval 10 deadinterval 40 priority 100 dscp 48 wait 2ms\n    core_1_v4 <- core_2_v4 ospf hello routerid 2.2.2.2 areaid 0 hellointerval 10 deadinterval 40 priority 1 dscp 48 wait 2ms\n    core_1_v4 -> core_2_v4 ospf dbd routerid 1.1.1.1 areaid 0 dscp 48 wait 1ms\n    core_1_v4 <- core_2_v4 ospf lsr routerid 2.2.2.2 areaid 0 dscp 48 wait 1ms\n    core_1_v4 -> core_2_v4 ospf lsu routerid 1.1.1.1 areaid 0 dscp 48 wait 1ms\n    core_1_v4 <- core_2_v4 ospf lsack routerid 2.2.2.2 areaid 0 dscp 48 wait 4ms\n    // 2. OSPFv3 over IPv6 multicast ff02::5 (routerid stays 32-bit dotted-quad!)\n    core_1_v6 -> allspf_v6 ospf hello routerid 1.1.1.1 areaid 0.0.0.0 hellointerval 10 deadinterval 40\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 172.16.0.1 (00:00:00:00:00:01) -> 172.16.0.2 (00:00:00:00:00:02) | ospf hello routerid 1.1.1.1 areaid 0 hellointerval 10 deadinterval 40 priority 100 dscp 48\nFrame 2 [t=0.002000000s]: 172.16.0.2 (00:00:00:00:00:02) -> 172.16.0.1 (00:00:00:00:00:01) | ospf hello routerid 2.2.2.2 areaid 0 hellointerval 10 deadinterval 40 priority 1 dscp 48\nFrame 3 [t=0.004000000s]: 172.16.0.1 (00:00:00:00:00:01) -> 172.16.0.2 (00:00:00:00:00:02) | ospf dbd routerid 1.1.1.1 areaid 0 dscp 48\nFrame 4 [t=0.005000000s]: 172.16.0.2 (00:00:00:00:00:02) -> 172.16.0.1 (00:00:00:00:00:01) | ospf lsr routerid 2.2.2.2 areaid 0 dscp 48\nFrame 5 [t=0.006000000s]: 172.16.0.1 (00:00:00:00:00:01) -> 172.16.0.2 (00:00:00:00:00:02) | ospf lsu routerid 1.1.1.1 areaid 0 dscp 48\nFrame 6 [t=0.007000000s]: 172.16.0.2 (00:00:00:00:00:02) -> 172.16.0.1 (00:00:00:00:00:01) | ospf lsack routerid 2.2.2.2 areaid 0 dscp 48\nFrame 7 [t=0.011000000s]: fe80::1c73:1 (00:00:00:00:00:04) -> ff02::5 (00:00:00:00:00:03) | ospf hello routerid 1.1.1.1 areaid 0.0.0.0 hellointerval 10 deadinterval 40\n```"},{"role":"assistant","content":"Reconstructs the 7-frame capture (`ospf`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost core_1_v4 { ip 172.16.0.1 }\nhost core_2_v4 { ip 172.16.0.2 }\nhost allspf_v6 { ip ff02::5 }\nhost core_1_v6 { ip fe80::1c73:1 }\n\ncompile {\n    // 1. OSPFv2 Area 0 adjacency bring-up and LSA exchange\n    core_1_v4 -> core_2_v4 ospf hello routerid 1.1.1.1 areaid 0 hellointerval 10 deadinterval 40 priority 100 dscp 48 wait 2ms\n    core_1_v4 <- core_2_v4 ospf hello routerid 2.2.2.2 areaid 0 hellointerval 10 deadinterval 40 priority 1 dscp 48 wait 2ms\n    core_1_v4 -> core_2_v4 ospf dbd routerid 1.1.1.1 areaid 0 dscp 48 wait 1ms\n    core_1_v4 <- core_2_v4 ospf lsr routerid 2.2.2.2 areaid 0 dscp 48 wait 1ms\n    core_1_v4 -> core_2_v4 ospf lsu routerid 1.1.1.1 areaid 0 dscp 48 wait 1ms\n    core_1_v4 <- core_2_v4 ospf lsack routerid 2.2.2.2 areaid 0 dscp 48 wait 4ms\n    // 2. OSPFv3 over IPv6 multicast ff02::5 (routerid stays 32-bit dotted-quad!)\n    core_1_v6 -> allspf_v6 ospf hello routerid 1.1.1.1 areaid 0.0.0.0 hellointerval 10 deadinterval 40\n}\n```"}]}
{"id":"sft-reverse-proto-lab-bgp","task_type":"reverse_decompile","protocols":["bgp","tcp"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 172.16.255.1 (00:00:00:00:00:01) -> 172.16.255.2 (00:00:00:00:00:02) | tcp syn srcport 53179 dstport 179 win 65535 mss 1460 ttl 255 dscp 48\nFrame 2 [t=0.001000000s]: 172.16.255.2 (00:00:00:00:00:02) -> 172.16.255.1 (00:00:00:00:00:01) | tcp syn ack win 65535 mss 1460 ttl 255 dscp 48\nFrame 3 [t=0.002000000s]: 172.16.255.1 (00:00:00:00:00:01) -> 172.16.255.2 (00:00:00:00:00:02) | tcp ack ttl 255 dscp 48\nFrame 4 [t=0.003000000s]: 172.16.255.1 (00:00:00:00:00:01) -> 172.16.255.2 (00:00:00:00:00:02) | bgp open asn 4200000101 holdtime 90 bgpid 10.0.1.1 ttl 255 dscp 48\nFrame 5 [t=0.005000000s]: 172.16.255.2 (00:00:00:00:00:02) -> 172.16.255.1 (00:00:00:00:00:01) | bgp open asn 4200000001 holdtime 90 bgpid 10.0.0.1 ttl 255 dscp 48\nFrame 6 [t=0.007000000s]: 172.16.255.1 (00:00:00:00:00:01) -> 172.16.255.2 (00:00:00:00:00:02) | bgp keepalive ttl 255 dscp 48\nFrame 7 [t=0.008000000s]: 172.16.255.2 (00:00:00:00:00:02) -> 172.16.255.1 (00:00:00:00:00:01) | bgp keepalive ttl 255 dscp 48\nFrame 8 [t=0.010000000s]: 172.16.255.1 (00:00:00:00:00:01) -> 172.16.255.2 (00:00:00:00:00:02) | bgp update asn 4200000101 prefix \"10.100.0.0/16\" nexthop 172.16.255.1 ttl 255 dscp 48\n```","completion":"Reconstructs the 8-frame capture (`bgp`, `tcp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost leaf_tor  { ip 172.16.255.1 }\nhost spine_agg { ip 172.16.255.2 }\n\ncompile {\n    // 1. Stateful TCP 3-way handshake on port 179 with GTSM (ttl 255) and CS6 (dscp 48)\n    leaf_tor -> spine_agg tcp syn srcport 53179 dstport 179 win 65535 mss 1460 ttl 255 dscp 48 wait 1ms\n    leaf_tor <- spine_agg tcp syn ack win 65535 mss 1460 ttl 255 dscp 48 wait 1ms\n    leaf_tor -> spine_agg tcp ack ttl 255 dscp 48 wait 1ms\n    // 2. 4-Byte ASN OPEN negotiation (auto-encodes AS_TRANS 23456 + Capability 65)\n    leaf_tor -> spine_agg bgp open asn 4200000101 holdtime 90 bgpid 10.0.1.1 ttl 255 dscp 48 wait 2ms\n    leaf_tor <- spine_agg bgp open asn 4200000001 holdtime 90 bgpid 10.0.0.1 ttl 255 dscp 48 wait 2ms\n    leaf_tor -> spine_agg bgp keepalive ttl 255 dscp 48 wait 1ms\n    leaf_tor <- spine_agg bgp keepalive ttl 255 dscp 48 wait 2ms\n    // 3. Advertise tenant CIDR 10.100.0.0/16 via BGP UPDATE\n    leaf_tor -> spine_agg bgp update asn 4200000101 prefix \"10.100.0.0/16\" nexthop 172.16.255.1 ttl 255 dscp 48\n}\n```","frasm_code":"host leaf_tor  { ip 172.16.255.1 }\nhost spine_agg { ip 172.16.255.2 }\n\ncompile {\n    // 1. Stateful TCP 3-way handshake on port 179 with GTSM (ttl 255) and CS6 (dscp 48)\n    leaf_tor -> spine_agg tcp syn srcport 53179 dstport 179 win 65535 mss 1460 ttl 255 dscp 48 wait 1ms\n    leaf_tor <- spine_agg tcp syn ack win 65535 mss 1460 ttl 255 dscp 48 wait 1ms\n    leaf_tor -> spine_agg tcp ack ttl 255 dscp 48 wait 1ms\n    // 2. 4-Byte ASN OPEN negotiation (auto-encodes AS_TRANS 23456 + Capability 65)\n    leaf_tor -> spine_agg bgp open asn 4200000101 holdtime 90 bgpid 10.0.1.1 ttl 255 dscp 48 wait 2ms\n    leaf_tor <- spine_agg bgp open asn 4200000001 holdtime 90 bgpid 10.0.0.1 ttl 255 dscp 48 wait 2ms\n    leaf_tor -> spine_agg bgp keepalive ttl 255 dscp 48 wait 1ms\n    leaf_tor <- spine_agg bgp keepalive ttl 255 dscp 48 wait 2ms\n    // 3. Advertise tenant CIDR 10.100.0.0/16 via BGP UPDATE\n    leaf_tor -> spine_agg bgp update asn 4200000101 prefix \"10.100.0.0/16\" nexthop 172.16.255.1 ttl 255 dscp 48\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 172.16.255.1 (00:00:00:00:00:01) -> 172.16.255.2 (00:00:00:00:00:02) | tcp syn srcport 53179 dstport 179 win 65535 mss 1460 ttl 255 dscp 48\nFrame 2 [t=0.001000000s]: 172.16.255.2 (00:00:00:00:00:02) -> 172.16.255.1 (00:00:00:00:00:01) | tcp syn ack win 65535 mss 1460 ttl 255 dscp 48\nFrame 3 [t=0.002000000s]: 172.16.255.1 (00:00:00:00:00:01) -> 172.16.255.2 (00:00:00:00:00:02) | tcp ack ttl 255 dscp 48\nFrame 4 [t=0.003000000s]: 172.16.255.1 (00:00:00:00:00:01) -> 172.16.255.2 (00:00:00:00:00:02) | bgp open asn 4200000101 holdtime 90 bgpid 10.0.1.1 ttl 255 dscp 48\nFrame 5 [t=0.005000000s]: 172.16.255.2 (00:00:00:00:00:02) -> 172.16.255.1 (00:00:00:00:00:01) | bgp open asn 4200000001 holdtime 90 bgpid 10.0.0.1 ttl 255 dscp 48\nFrame 6 [t=0.007000000s]: 172.16.255.1 (00:00:00:00:00:01) -> 172.16.255.2 (00:00:00:00:00:02) | bgp keepalive ttl 255 dscp 48\nFrame 7 [t=0.008000000s]: 172.16.255.2 (00:00:00:00:00:02) -> 172.16.255.1 (00:00:00:00:00:01) | bgp keepalive ttl 255 dscp 48\nFrame 8 [t=0.010000000s]: 172.16.255.1 (00:00:00:00:00:01) -> 172.16.255.2 (00:00:00:00:00:02) | bgp update asn 4200000101 prefix \"10.100.0.0/16\" nexthop 172.16.255.1 ttl 255 dscp 48\n```"},{"role":"assistant","content":"Reconstructs the 8-frame capture (`bgp`, `tcp`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost leaf_tor  { ip 172.16.255.1 }\nhost spine_agg { ip 172.16.255.2 }\n\ncompile {\n    // 1. Stateful TCP 3-way handshake on port 179 with GTSM (ttl 255) and CS6 (dscp 48)\n    leaf_tor -> spine_agg tcp syn srcport 53179 dstport 179 win 65535 mss 1460 ttl 255 dscp 48 wait 1ms\n    leaf_tor <- spine_agg tcp syn ack win 65535 mss 1460 ttl 255 dscp 48 wait 1ms\n    leaf_tor -> spine_agg tcp ack ttl 255 dscp 48 wait 1ms\n    // 2. 4-Byte ASN OPEN negotiation (auto-encodes AS_TRANS 23456 + Capability 65)\n    leaf_tor -> spine_agg bgp open asn 4200000101 holdtime 90 bgpid 10.0.1.1 ttl 255 dscp 48 wait 2ms\n    leaf_tor <- spine_agg bgp open asn 4200000001 holdtime 90 bgpid 10.0.0.1 ttl 255 dscp 48 wait 2ms\n    leaf_tor -> spine_agg bgp keepalive ttl 255 dscp 48 wait 1ms\n    leaf_tor <- spine_agg bgp keepalive ttl 255 dscp 48 wait 2ms\n    // 3. Advertise tenant CIDR 10.100.0.0/16 via BGP UPDATE\n    leaf_tor -> spine_agg bgp update asn 4200000101 prefix \"10.100.0.0/16\" nexthop 172.16.255.1 ttl 255 dscp 48\n}\n```"}]}
{"id":"sft-reverse-proto-lab-rip","task_type":"reverse_decompile","protocols":["rip"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 172.16.10.2 (00:00:00:00:00:01) -> 224.0.0.9 (00:00:00:00:00:02) | rip response prefix 10.50.10.0 nexthop 0.0.0.0 metric 2 tag 65010 ttl 2\nFrame 2 [t=0.010000000s]: 172.16.10.2 (00:00:00:00:00:01) -> 224.0.0.9 (00:00:00:00:00:02) | rip response prefix 10.50.10.0 nexthop 0.0.0.0 metric 16 tag 65010 ttl 2\nFrame 3 [t=0.015000000s]: fe80::10:1 (00:00:00:00:00:03) -> ff02::9 (00:00:00:00:00:04) | rip response prefix 2001:db8:50:: metric 1 tag 100 ttl 255\n```","completion":"Reconstructs the 3-frame capture (`rip`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost rtr_branch { ip 172.16.10.2 }\nhost rip_mcast  { ip 224.0.0.9 }\nhost rtr6_a     { ip fe80::10:1 }\nhost ripng_all  { ip ff02::9 }\n\ncompile {\n    // 1. Periodic RIPv2 multicast advertisement (metric 2, route tag 65010)\n    rtr_branch -> rip_mcast rip response prefix 10.50.10.0 nexthop 0.0.0.0 metric 2 tag 65010 ttl 2 wait 10ms\n    // 2. Triggered route-poison update (metric 16 = infinity / unreachable)\n    rtr_branch -> rip_mcast rip response prefix 10.50.10.0 nexthop 0.0.0.0 metric 16 tag 65010 ttl 2 wait 5ms\n    // 3. IPv6 RIPng advertisement on UDP 521 -> 521 to ff02::9\n    rtr6_a -> ripng_all rip response prefix 2001:db8:50:: metric 1 tag 100 ttl 255\n}\n```","frasm_code":"host rtr_branch { ip 172.16.10.2 }\nhost rip_mcast  { ip 224.0.0.9 }\nhost rtr6_a     { ip fe80::10:1 }\nhost ripng_all  { ip ff02::9 }\n\ncompile {\n    // 1. Periodic RIPv2 multicast advertisement (metric 2, route tag 65010)\n    rtr_branch -> rip_mcast rip response prefix 10.50.10.0 nexthop 0.0.0.0 metric 2 tag 65010 ttl 2 wait 10ms\n    // 2. Triggered route-poison update (metric 16 = infinity / unreachable)\n    rtr_branch -> rip_mcast rip response prefix 10.50.10.0 nexthop 0.0.0.0 metric 16 tag 65010 ttl 2 wait 5ms\n    // 3. IPv6 RIPng advertisement on UDP 521 -> 521 to ff02::9\n    rtr6_a -> ripng_all rip response prefix 2001:db8:50:: metric 1 tag 100 ttl 255\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 172.16.10.2 (00:00:00:00:00:01) -> 224.0.0.9 (00:00:00:00:00:02) | rip response prefix 10.50.10.0 nexthop 0.0.0.0 metric 2 tag 65010 ttl 2\nFrame 2 [t=0.010000000s]: 172.16.10.2 (00:00:00:00:00:01) -> 224.0.0.9 (00:00:00:00:00:02) | rip response prefix 10.50.10.0 nexthop 0.0.0.0 metric 16 tag 65010 ttl 2\nFrame 3 [t=0.015000000s]: fe80::10:1 (00:00:00:00:00:03) -> ff02::9 (00:00:00:00:00:04) | rip response prefix 2001:db8:50:: metric 1 tag 100 ttl 255\n```"},{"role":"assistant","content":"Reconstructs the 3-frame capture (`rip`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost rtr_branch { ip 172.16.10.2 }\nhost rip_mcast  { ip 224.0.0.9 }\nhost rtr6_a     { ip fe80::10:1 }\nhost ripng_all  { ip ff02::9 }\n\ncompile {\n    // 1. Periodic RIPv2 multicast advertisement (metric 2, route tag 65010)\n    rtr_branch -> rip_mcast rip response prefix 10.50.10.0 nexthop 0.0.0.0 metric 2 tag 65010 ttl 2 wait 10ms\n    // 2. Triggered route-poison update (metric 16 = infinity / unreachable)\n    rtr_branch -> rip_mcast rip response prefix 10.50.10.0 nexthop 0.0.0.0 metric 16 tag 65010 ttl 2 wait 5ms\n    // 3. IPv6 RIPng advertisement on UDP 521 -> 521 to ff02::9\n    rtr6_a -> ripng_all rip response prefix 2001:db8:50:: metric 1 tag 100 ttl 255\n}\n```"}]}
{"id":"sft-reverse-proto-lab-pim","task_type":"reverse_decompile","protocols":["pim"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.40.1.1 (00:00:00:00:00:02) -> 224.0.0.13 (00:00:00:00:00:03) | pim hello holdtime 105 drpriority 200 ttl 1 dscp 48\nFrame 2 [t=0.002000000s]: 10.40.1.50 (00:00:00:00:00:01) -> 10.40.1.1 (00:00:00:00:00:02) | igmp v3 report group 232.10.10.5\nFrame 3 [t=0.004000000s]: 10.40.1.1 (00:00:00:00:00:02) -> 172.16.255.1 (00:00:00:00:00:04) | pim joinprune group 232.10.10.5 source 10.10.5.100 holdtime 210 dscp 48\nFrame 4 [t=0.007000000s]: 10.40.1.1 (00:00:00:00:00:02) -> 172.16.255.1 (00:00:00:00:00:04) | pim register group 239.20.20.1 source 10.40.1.50 rp 172.16.255.1 ttl 64 dscp 48\n```","completion":"Reconstructs the 4-frame capture (`pim`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost receiver_01 { ip 10.40.1.50 }\nhost lhr_router  { ip 10.40.1.1 }\nhost pim_mcast   { ip 224.0.0.13 }\nhost core_rp     { ip 172.16.255.1 }\n\ncompile {\n    // 1. PIMv2 Hello on multicast 224.0.0.13 electing DR (drpriority 200)\n    lhr_router -> pim_mcast pim hello holdtime 105 drpriority 200 ttl 1 dscp 48 wait 2ms\n    // 2. Receiver joins SSM channel 232.10.10.5 on LAN\n    receiver_01 -> lhr_router igmp v3 report group 232.10.10.5 wait 2ms\n    // 3. Last-Hop Router sends PIM Join/Prune upstream toward source 10.10.5.100\n    lhr_router -> core_rp pim joinprune group 232.10.10.5 source 10.10.5.100 holdtime 210 dscp 48 wait 3ms\n    // 4. Unicast PIM Register encapsulated to Rendezvous Point\n    lhr_router -> core_rp pim register group 239.20.20.1 source 10.40.1.50 rp 172.16.255.1 ttl 64 dscp 48\n}\n```","frasm_code":"host receiver_01 { ip 10.40.1.50 }\nhost lhr_router  { ip 10.40.1.1 }\nhost pim_mcast   { ip 224.0.0.13 }\nhost core_rp     { ip 172.16.255.1 }\n\ncompile {\n    // 1. PIMv2 Hello on multicast 224.0.0.13 electing DR (drpriority 200)\n    lhr_router -> pim_mcast pim hello holdtime 105 drpriority 200 ttl 1 dscp 48 wait 2ms\n    // 2. Receiver joins SSM channel 232.10.10.5 on LAN\n    receiver_01 -> lhr_router igmp v3 report group 232.10.10.5 wait 2ms\n    // 3. Last-Hop Router sends PIM Join/Prune upstream toward source 10.10.5.100\n    lhr_router -> core_rp pim joinprune group 232.10.10.5 source 10.10.5.100 holdtime 210 dscp 48 wait 3ms\n    // 4. Unicast PIM Register encapsulated to Rendezvous Point\n    lhr_router -> core_rp pim register group 239.20.20.1 source 10.40.1.50 rp 172.16.255.1 ttl 64 dscp 48\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.40.1.1 (00:00:00:00:00:02) -> 224.0.0.13 (00:00:00:00:00:03) | pim hello holdtime 105 drpriority 200 ttl 1 dscp 48\nFrame 2 [t=0.002000000s]: 10.40.1.50 (00:00:00:00:00:01) -> 10.40.1.1 (00:00:00:00:00:02) | igmp v3 report group 232.10.10.5\nFrame 3 [t=0.004000000s]: 10.40.1.1 (00:00:00:00:00:02) -> 172.16.255.1 (00:00:00:00:00:04) | pim joinprune group 232.10.10.5 source 10.10.5.100 holdtime 210 dscp 48\nFrame 4 [t=0.007000000s]: 10.40.1.1 (00:00:00:00:00:02) -> 172.16.255.1 (00:00:00:00:00:04) | pim register group 239.20.20.1 source 10.40.1.50 rp 172.16.255.1 ttl 64 dscp 48\n```"},{"role":"assistant","content":"Reconstructs the 4-frame capture (`pim`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost receiver_01 { ip 10.40.1.50 }\nhost lhr_router  { ip 10.40.1.1 }\nhost pim_mcast   { ip 224.0.0.13 }\nhost core_rp     { ip 172.16.255.1 }\n\ncompile {\n    // 1. PIMv2 Hello on multicast 224.0.0.13 electing DR (drpriority 200)\n    lhr_router -> pim_mcast pim hello holdtime 105 drpriority 200 ttl 1 dscp 48 wait 2ms\n    // 2. Receiver joins SSM channel 232.10.10.5 on LAN\n    receiver_01 -> lhr_router igmp v3 report group 232.10.10.5 wait 2ms\n    // 3. Last-Hop Router sends PIM Join/Prune upstream toward source 10.10.5.100\n    lhr_router -> core_rp pim joinprune group 232.10.10.5 source 10.10.5.100 holdtime 210 dscp 48 wait 3ms\n    // 4. Unicast PIM Register encapsulated to Rendezvous Point\n    lhr_router -> core_rp pim register group 239.20.20.1 source 10.40.1.50 rp 172.16.255.1 ttl 64 dscp 48\n}\n```"}]}
{"id":"sft-reverse-proto-lab-vrrp","task_type":"reverse_decompile","protocols":["vrrp","vlan"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.10.10.2 (00:00:5e:00:01:0a) -> 224.0.0.18 (00:00:00:00:00:03) | vrrp vrid 10 priority 150 advint 1 vip 10.10.10.1 vlan 10 pcp 6\nFrame 2 [t=0.005000000s]: 10.10.10.2 (00:00:5e:00:01:0a) -> 224.0.0.18 (00:00:00:00:00:03) | vrrp vrid 10 priority 0 advint 1 vip 10.10.10.1 vlan 10 pcp 6\nFrame 3 [t=0.007000000s]: 10.10.10.3 (00:00:5e:00:01:0a) -> 224.0.0.18 (00:00:00:00:00:03) | vrrp vrid 10 priority 120 advint 1 vip 10.10.10.1 vlan 10 pcp 6\nFrame 4 [t=0.008000000s]: 10.10.10.3 (00:00:5e:00:01:0a) -> 224.0.0.18 (00:00:00:00:00:03) | arp gratuitous sendermac 00:00:5e:00:01:0a senderip 10.10.10.1 vlan 10\nFrame 5 [t=0.011000000s]: fe80::10:2 (00:00:5e:00:02:0a) -> ff02::12 (00:00:00:00:00:05) | vrrp version 3 vrid 10 priority 150 advint 100 vip fe80::10:1 vlan 10\n```","completion":"Reconstructs the 5-frame capture (`vrrp`, `vlan`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost rtr_pri   { ip 10.10.10.2 mac 00:00:5e:00:01:0a }\nhost rtr_bkp   { ip 10.10.10.3 mac 00:00:5e:00:01:0a }\nhost vrrp_v4   { ip 224.0.0.18 }\nhost rtr6_pri  { ip fe80::10:2 mac 00:00:5e:00:02:0a }\nhost vrrp_v6   { ip ff02::12 }\n\ncompile {\n    // 1. Primary router steady-state VRRPv2 heartbeat (VRID 10, Priority 150)\n    rtr_pri -> vrrp_v4 vrrp vrid 10 priority 150 advint 1 vip 10.10.10.1 vlan 10 pcp 6 wait 5ms\n    // 2. Primary router initiates graceful shutdown (Priority 0 triggers immediate takeover)\n    rtr_pri -> vrrp_v4 vrrp vrid 10 priority 0 advint 1 vip 10.10.10.1 vlan 10 pcp 6 wait 2ms\n    // 3. Backup router promotes to Master (Priority 120) and broadcasts GARP for VIP\n    rtr_bkp -> vrrp_v4 vrrp vrid 10 priority 120 advint 1 vip 10.10.10.1 vlan 10 pcp 6 wait 1ms\n    rtr_bkp -> vrrp_v4 arp gratuitous sendermac 00:00:5e:00:01:0a senderip 10.10.10.1 vlan 10 wait 3ms\n    // 4. Dual-stack VRRPv3 over IPv6 (advint 100 = 100 centiseconds = 1.00s)\n    rtr6_pri -> vrrp_v6 vrrp version 3 vrid 10 priority 150 advint 100 vip fe80::10:1 vlan 10\n}\n```","frasm_code":"host rtr_pri   { ip 10.10.10.2 mac 00:00:5e:00:01:0a }\nhost rtr_bkp   { ip 10.10.10.3 mac 00:00:5e:00:01:0a }\nhost vrrp_v4   { ip 224.0.0.18 }\nhost rtr6_pri  { ip fe80::10:2 mac 00:00:5e:00:02:0a }\nhost vrrp_v6   { ip ff02::12 }\n\ncompile {\n    // 1. Primary router steady-state VRRPv2 heartbeat (VRID 10, Priority 150)\n    rtr_pri -> vrrp_v4 vrrp vrid 10 priority 150 advint 1 vip 10.10.10.1 vlan 10 pcp 6 wait 5ms\n    // 2. Primary router initiates graceful shutdown (Priority 0 triggers immediate takeover)\n    rtr_pri -> vrrp_v4 vrrp vrid 10 priority 0 advint 1 vip 10.10.10.1 vlan 10 pcp 6 wait 2ms\n    // 3. Backup router promotes to Master (Priority 120) and broadcasts GARP for VIP\n    rtr_bkp -> vrrp_v4 vrrp vrid 10 priority 120 advint 1 vip 10.10.10.1 vlan 10 pcp 6 wait 1ms\n    rtr_bkp -> vrrp_v4 arp gratuitous sendermac 00:00:5e:00:01:0a senderip 10.10.10.1 vlan 10 wait 3ms\n    // 4. Dual-stack VRRPv3 over IPv6 (advint 100 = 100 centiseconds = 1.00s)\n    rtr6_pri -> vrrp_v6 vrrp version 3 vrid 10 priority 150 advint 100 vip fe80::10:1 vlan 10\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.10.10.2 (00:00:5e:00:01:0a) -> 224.0.0.18 (00:00:00:00:00:03) | vrrp vrid 10 priority 150 advint 1 vip 10.10.10.1 vlan 10 pcp 6\nFrame 2 [t=0.005000000s]: 10.10.10.2 (00:00:5e:00:01:0a) -> 224.0.0.18 (00:00:00:00:00:03) | vrrp vrid 10 priority 0 advint 1 vip 10.10.10.1 vlan 10 pcp 6\nFrame 3 [t=0.007000000s]: 10.10.10.3 (00:00:5e:00:01:0a) -> 224.0.0.18 (00:00:00:00:00:03) | vrrp vrid 10 priority 120 advint 1 vip 10.10.10.1 vlan 10 pcp 6\nFrame 4 [t=0.008000000s]: 10.10.10.3 (00:00:5e:00:01:0a) -> 224.0.0.18 (00:00:00:00:00:03) | arp gratuitous sendermac 00:00:5e:00:01:0a senderip 10.10.10.1 vlan 10\nFrame 5 [t=0.011000000s]: fe80::10:2 (00:00:5e:00:02:0a) -> ff02::12 (00:00:00:00:00:05) | vrrp version 3 vrid 10 priority 150 advint 100 vip fe80::10:1 vlan 10\n```"},{"role":"assistant","content":"Reconstructs the 5-frame capture (`vrrp`, `vlan`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost rtr_pri   { ip 10.10.10.2 mac 00:00:5e:00:01:0a }\nhost rtr_bkp   { ip 10.10.10.3 mac 00:00:5e:00:01:0a }\nhost vrrp_v4   { ip 224.0.0.18 }\nhost rtr6_pri  { ip fe80::10:2 mac 00:00:5e:00:02:0a }\nhost vrrp_v6   { ip ff02::12 }\n\ncompile {\n    // 1. Primary router steady-state VRRPv2 heartbeat (VRID 10, Priority 150)\n    rtr_pri -> vrrp_v4 vrrp vrid 10 priority 150 advint 1 vip 10.10.10.1 vlan 10 pcp 6 wait 5ms\n    // 2. Primary router initiates graceful shutdown (Priority 0 triggers immediate takeover)\n    rtr_pri -> vrrp_v4 vrrp vrid 10 priority 0 advint 1 vip 10.10.10.1 vlan 10 pcp 6 wait 2ms\n    // 3. Backup router promotes to Master (Priority 120) and broadcasts GARP for VIP\n    rtr_bkp -> vrrp_v4 vrrp vrid 10 priority 120 advint 1 vip 10.10.10.1 vlan 10 pcp 6 wait 1ms\n    rtr_bkp -> vrrp_v4 arp gratuitous sendermac 00:00:5e:00:01:0a senderip 10.10.10.1 vlan 10 wait 3ms\n    // 4. Dual-stack VRRPv3 over IPv6 (advint 100 = 100 centiseconds = 1.00s)\n    rtr6_pri -> vrrp_v6 vrrp version 3 vrid 10 priority 150 advint 100 vip fe80::10:1 vlan 10\n}\n```"}]}
{"id":"sft-reverse-proto-lab-hsrp","task_type":"reverse_decompile","protocols":["hsrp","vlan"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.20.20.2 (00:00:0c:07:ac:14) -> 224.0.0.2 (00:00:00:00:00:03) | hsrp group 20 priority 110 state 16 hellotime 3 holdtime 10 auth \"corpkey1\" vip 10.20.20.1 vlan 20 ttl 1 dscp 48\nFrame 2 [t=0.003000000s]: 10.20.20.3 (00:1c:73:20:00:03) -> 224.0.0.2 (00:00:00:00:00:03) | hsrp group 20 priority 100 state 8 hellotime 3 holdtime 10 auth \"corpkey1\" vip 10.20.20.1 vlan 20 ttl 1 dscp 48\nFrame 3 [t=0.008000000s]: fe80::20:2 (00:05:73:a0:00:14) -> ff02::66 (00:00:00:00:00:05) | hsrp group 20 priority 110 state 16 hellotime 3 holdtime 10 vip 2001:db8:20::1 vlan 20 ttl 255\n```","completion":"Reconstructs the 3-frame capture (`hsrp`, `vlan`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost dist_a   { ip 10.20.20.2 mac 00:00:0c:07:ac:14 }\nhost dist_b   { ip 10.20.20.3 mac 00:1c:73:20:00:03 }\nhost hsrp_v4  { ip 224.0.0.2 }\nhost dist6_a  { ip fe80::20:2 mac 00:05:73:a0:00:14 }\nhost hsrp_v6  { ip ff02::66 }\n\ncompile {\n    // 1. Active router (state 16, priority 110, virtual MAC 00:00:0c:07:ac:14 for group 20)\n    dist_a -> hsrp_v4 hsrp group 20 priority 110 state 16 hellotime 3 holdtime 10 auth \"corpkey1\" vip 10.20.20.1 vlan 20 ttl 1 dscp 48 wait 3ms\n    // 2. Standby router (state 8, priority 100) monitoring Active peer\n    dist_b -> hsrp_v4 hsrp group 20 priority 100 state 8 hellotime 3 holdtime 10 auth \"corpkey1\" vip 10.20.20.1 vlan 20 ttl 1 dscp 48 wait 5ms\n    // 3. HSRPv2 over IPv6 on UDP 2029 -> ff02::66\n    dist6_a -> hsrp_v6 hsrp group 20 priority 110 state 16 hellotime 3 holdtime 10 vip 2001:db8:20::1 vlan 20 ttl 255\n}\n```","frasm_code":"host dist_a   { ip 10.20.20.2 mac 00:00:0c:07:ac:14 }\nhost dist_b   { ip 10.20.20.3 mac 00:1c:73:20:00:03 }\nhost hsrp_v4  { ip 224.0.0.2 }\nhost dist6_a  { ip fe80::20:2 mac 00:05:73:a0:00:14 }\nhost hsrp_v6  { ip ff02::66 }\n\ncompile {\n    // 1. Active router (state 16, priority 110, virtual MAC 00:00:0c:07:ac:14 for group 20)\n    dist_a -> hsrp_v4 hsrp group 20 priority 110 state 16 hellotime 3 holdtime 10 auth \"corpkey1\" vip 10.20.20.1 vlan 20 ttl 1 dscp 48 wait 3ms\n    // 2. Standby router (state 8, priority 100) monitoring Active peer\n    dist_b -> hsrp_v4 hsrp group 20 priority 100 state 8 hellotime 3 holdtime 10 auth \"corpkey1\" vip 10.20.20.1 vlan 20 ttl 1 dscp 48 wait 5ms\n    // 3. HSRPv2 over IPv6 on UDP 2029 -> ff02::66\n    dist6_a -> hsrp_v6 hsrp group 20 priority 110 state 16 hellotime 3 holdtime 10 vip 2001:db8:20::1 vlan 20 ttl 255\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.20.20.2 (00:00:0c:07:ac:14) -> 224.0.0.2 (00:00:00:00:00:03) | hsrp group 20 priority 110 state 16 hellotime 3 holdtime 10 auth \"corpkey1\" vip 10.20.20.1 vlan 20 ttl 1 dscp 48\nFrame 2 [t=0.003000000s]: 10.20.20.3 (00:1c:73:20:00:03) -> 224.0.0.2 (00:00:00:00:00:03) | hsrp group 20 priority 100 state 8 hellotime 3 holdtime 10 auth \"corpkey1\" vip 10.20.20.1 vlan 20 ttl 1 dscp 48\nFrame 3 [t=0.008000000s]: fe80::20:2 (00:05:73:a0:00:14) -> ff02::66 (00:00:00:00:00:05) | hsrp group 20 priority 110 state 16 hellotime 3 holdtime 10 vip 2001:db8:20::1 vlan 20 ttl 255\n```"},{"role":"assistant","content":"Reconstructs the 3-frame capture (`hsrp`, `vlan`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost dist_a   { ip 10.20.20.2 mac 00:00:0c:07:ac:14 }\nhost dist_b   { ip 10.20.20.3 mac 00:1c:73:20:00:03 }\nhost hsrp_v4  { ip 224.0.0.2 }\nhost dist6_a  { ip fe80::20:2 mac 00:05:73:a0:00:14 }\nhost hsrp_v6  { ip ff02::66 }\n\ncompile {\n    // 1. Active router (state 16, priority 110, virtual MAC 00:00:0c:07:ac:14 for group 20)\n    dist_a -> hsrp_v4 hsrp group 20 priority 110 state 16 hellotime 3 holdtime 10 auth \"corpkey1\" vip 10.20.20.1 vlan 20 ttl 1 dscp 48 wait 3ms\n    // 2. Standby router (state 8, priority 100) monitoring Active peer\n    dist_b -> hsrp_v4 hsrp group 20 priority 100 state 8 hellotime 3 holdtime 10 auth \"corpkey1\" vip 10.20.20.1 vlan 20 ttl 1 dscp 48 wait 5ms\n    // 3. HSRPv2 over IPv6 on UDP 2029 -> ff02::66\n    dist6_a -> hsrp_v6 hsrp group 20 priority 110 state 16 hellotime 3 holdtime 10 vip 2001:db8:20::1 vlan 20 ttl 255\n}\n```"}]}
{"id":"sft-reverse-proto-lab-bfd","task_type":"reverse_decompile","protocols":["bfd"],"version":"3.3.0","license":"MIT","prompt":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.255.1.1 (00:00:00:00:00:01) -> 10.255.1.2 (00:00:00:00:00:02) | bfd state 1 diag 0 mydisc 0x1001 yourdisc 0 mintx 1000000 minrx 1000000 mult 3 dscp 48\nFrame 2 [t=0.002000000s]: 10.255.1.2 (00:00:00:00:00:02) -> 10.255.1.1 (00:00:00:00:00:01) | bfd state 2 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 dscp 48\nFrame 3 [t=0.004000000s]: 10.255.1.1 (00:00:00:00:00:01) -> 10.255.1.2 (00:00:00:00:00:02) | bfd state 3 diag 0 mydisc 0x1001 yourdisc 0x2002 mintx 50000 minrx 50000 mult 3 dscp 48\nFrame 4 [t=0.054000000s]: 10.255.1.2 (00:00:00:00:00:02) -> 10.255.1.1 (00:00:00:00:00:01) | bfd state 3 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 dscp 48\nFrame 5 [t=0.204000000s]: 10.255.1.1 (00:00:00:00:00:01) -> 10.255.1.2 (00:00:00:00:00:02) | bfd state 1 diag 1 mydisc 0x1001 yourdisc 0x2002 mintx 1000000 minrx 1000000 mult 3 dscp 48\n```","completion":"Reconstructs the 5-frame capture (`bfd`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost pe_north { ip 10.255.1.1 }\nhost pe_south { ip 10.255.1.2 }\n\ncompile {\n    // 1. Initial Down packet (state 1, yourdisc 0 = peer unknown, slow 1s timer)\n    pe_north -> pe_south bfd state 1 diag 0 mydisc 0x1001 yourdisc 0 mintx 1000000 minrx 1000000 mult 3 dscp 48 wait 2ms\n    // 2. Peer sees 0x1001 and transitions to Init (state 2)\n    pe_north <- pe_south bfd state 2 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 dscp 48 wait 2ms\n    // 3. Both peers reach Up (state 3) at 50ms (50,000 us) intervals\n    pe_north -> pe_south bfd state 3 diag 0 mydisc 0x1001 yourdisc 0x2002 mintx 50000 minrx 50000 mult 3 dscp 48 wait 50ms\n    pe_north <- pe_south bfd state 3 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 dscp 48 wait 150ms\n    // 4. Link failure detected: state 1 (Down), diag 1 (Control Detection Time Expired)\n    pe_north -> pe_south bfd state 1 diag 1 mydisc 0x1001 yourdisc 0x2002 mintx 1000000 minrx 1000000 mult 3 dscp 48\n}\n```","frasm_code":"host pe_north { ip 10.255.1.1 }\nhost pe_south { ip 10.255.1.2 }\n\ncompile {\n    // 1. Initial Down packet (state 1, yourdisc 0 = peer unknown, slow 1s timer)\n    pe_north -> pe_south bfd state 1 diag 0 mydisc 0x1001 yourdisc 0 mintx 1000000 minrx 1000000 mult 3 dscp 48 wait 2ms\n    // 2. Peer sees 0x1001 and transitions to Init (state 2)\n    pe_north <- pe_south bfd state 2 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 dscp 48 wait 2ms\n    // 3. Both peers reach Up (state 3) at 50ms (50,000 us) intervals\n    pe_north -> pe_south bfd state 3 diag 0 mydisc 0x1001 yourdisc 0x2002 mintx 50000 minrx 50000 mult 3 dscp 48 wait 50ms\n    pe_north <- pe_south bfd state 3 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 dscp 48 wait 150ms\n    // 4. Link failure detected: state 1 (Down), diag 1 (Control Detection Time Expired)\n    pe_north -> pe_south bfd state 1 diag 1 mydisc 0x1001 yourdisc 0x2002 mintx 1000000 minrx 1000000 mult 3 dscp 48\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Reconstruct a clean, compilable FrameAssembly v3.3.0 (.frasm) source file matching the following packet capture timeline (as produced by `frameassembly reverse`):\n\n```text\nFrame 1 [t=0.000000000s]: 10.255.1.1 (00:00:00:00:00:01) -> 10.255.1.2 (00:00:00:00:00:02) | bfd state 1 diag 0 mydisc 0x1001 yourdisc 0 mintx 1000000 minrx 1000000 mult 3 dscp 48\nFrame 2 [t=0.002000000s]: 10.255.1.2 (00:00:00:00:00:02) -> 10.255.1.1 (00:00:00:00:00:01) | bfd state 2 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 dscp 48\nFrame 3 [t=0.004000000s]: 10.255.1.1 (00:00:00:00:00:01) -> 10.255.1.2 (00:00:00:00:00:02) | bfd state 3 diag 0 mydisc 0x1001 yourdisc 0x2002 mintx 50000 minrx 50000 mult 3 dscp 48\nFrame 4 [t=0.054000000s]: 10.255.1.2 (00:00:00:00:00:02) -> 10.255.1.1 (00:00:00:00:00:01) | bfd state 3 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 dscp 48\nFrame 5 [t=0.204000000s]: 10.255.1.1 (00:00:00:00:00:01) -> 10.255.1.2 (00:00:00:00:00:02) | bfd state 1 diag 1 mydisc 0x1001 yourdisc 0x2002 mintx 1000000 minrx 1000000 mult 3 dscp 48\n```"},{"role":"assistant","content":"Reconstructs the 5-frame capture (`bfd`) with exact relative `wait` timing and stateful headers.\n\n```frameassembly\nhost pe_north { ip 10.255.1.1 }\nhost pe_south { ip 10.255.1.2 }\n\ncompile {\n    // 1. Initial Down packet (state 1, yourdisc 0 = peer unknown, slow 1s timer)\n    pe_north -> pe_south bfd state 1 diag 0 mydisc 0x1001 yourdisc 0 mintx 1000000 minrx 1000000 mult 3 dscp 48 wait 2ms\n    // 2. Peer sees 0x1001 and transitions to Init (state 2)\n    pe_north <- pe_south bfd state 2 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 dscp 48 wait 2ms\n    // 3. Both peers reach Up (state 3) at 50ms (50,000 us) intervals\n    pe_north -> pe_south bfd state 3 diag 0 mydisc 0x1001 yourdisc 0x2002 mintx 50000 minrx 50000 mult 3 dscp 48 wait 50ms\n    pe_north <- pe_south bfd state 3 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 dscp 48 wait 150ms\n    // 4. Link failure detected: state 1 (Down), diag 1 (Control Detection Time Expired)\n    pe_north -> pe_south bfd state 1 diag 1 mydisc 0x1001 yourdisc 0x2002 mintx 1000000 minrx 1000000 mult 3 dscp 48\n}\n```"}]}
{"id":"sft-diag-e01","task_type":"diagnostic_fix","protocols":["icmp","vlan","qinq","tcp","tls"],"version":"3.3.0","license":"MIT","prompt":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `replace 'echo_request' with 'echorequest'` (E01: Uppercase, Underscore, or Hyphenated Built-In Keyword):\n\n```frameassembly\nhost 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}\n```","completion":"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.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `replace 'echo_request' with 'echorequest'` (E01: Uppercase, Underscore, or Hyphenated Built-In Keyword):\n\n```frameassembly\nhost 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}\n```"},{"role":"assistant","content":"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.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-diag-e02","task_type":"diagnostic_fix","protocols":["icmp","arp","tcp","ospf"],"version":"3.3.0","license":"MIT","prompt":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `expected plain IPv4 or IPv6 address literal inside host block` (E02: CIDR Subnet Mask (/24), Equals Sign, or Quotes Inside host Block):\n\n```frameassembly\nhost firewall { ip = \"10.10.1.1/24\" }\nhost server   { ip = \"10.10.1.20/24\" }\n\ncompile {\n    firewall -> server icmp echorequest\n}\n```","completion":"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.\n\n```frameassembly\nhost firewall { ip 10.10.1.1 }\nhost server   { ip 10.10.1.20 }\n\ncompile {\n    firewall -> server icmp echorequest\n}\n```","frasm_code":"host firewall { ip 10.10.1.1 }\nhost server   { ip 10.10.1.20 }\n\ncompile {\n    firewall -> server icmp echorequest\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `expected plain IPv4 or IPv6 address literal inside host block` (E02: CIDR Subnet Mask (/24), Equals Sign, or Quotes Inside host Block):\n\n```frameassembly\nhost firewall { ip = \"10.10.1.1/24\" }\nhost server   { ip = \"10.10.1.20/24\" }\n\ncompile {\n    firewall -> server icmp echorequest\n}\n```"},{"role":"assistant","content":"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.\n\n```frameassembly\nhost firewall { ip 10.10.1.1 }\nhost server   { ip 10.10.1.20 }\n\ncompile {\n    firewall -> server icmp echorequest\n}\n```"}]}
{"id":"sft-diag-e03","task_type":"diagnostic_fix","protocols":["dns","http","syslog","mqtt"],"version":"3.3.0","license":"MIT","prompt":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `unexpected character: use // for comments and \"...\" for text literals` (E03: Hash (#) Comments or Single-Quoted Strings):\n\n```frameassembly\n# 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}\n```","completion":"FrameAssembly uses // line comments and double-quoted UTF-8 strings (\"...\") exclusively so shell-style # comments and single quotes never create escaping ambiguity.\n\n```frameassembly\n// 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}\n```","frasm_code":"// 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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `unexpected character: use // for comments and \"...\" for text literals` (E03: Hash (#) Comments or Single-Quoted Strings):\n\n```frameassembly\n# 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}\n```"},{"role":"assistant","content":"FrameAssembly uses // line comments and double-quoted UTF-8 strings (\"...\") exclusively so shell-style # comments and single quotes never create escaping ambiguity.\n\n```frameassembly\n// 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}\n```"}]}
{"id":"sft-diag-e04","task_type":"diagnostic_fix","protocols":["tcp","udp","sctp","http"],"version":"3.3.0","license":"MIT","prompt":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `unknown modifier 'sport'; did you mean 'srcport'?` (E04: Using sport / dport Instead of srcport / dstport, or ack 1001 Instead of acknum 1001):\n\n```frameassembly\nhost 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}\n```","completion":"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.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `unknown modifier 'sport'; did you mean 'srcport'?` (E04: Using sport / dport Instead of srcport / dstport, or ack 1001 Instead of acknum 1001):\n\n```frameassembly\nhost 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}\n```"},{"role":"assistant","content":"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.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-diag-e05","task_type":"diagnostic_fix","protocols":["http","ssdp","rtsp"],"version":"3.3.0","license":"MIT","prompt":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `unexpected keyword 'host' inside frame statement; use 'hosthdr' for HTTP Host header` (E05: Writing host on HTTP/SSDP Instead of hosthdr, or transport on RTSP Instead of transporthdr):\n\n```frameassembly\nhost 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}\n```","completion":"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.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `unexpected keyword 'host' inside frame statement; use 'hosthdr' for HTTP Host header` (E05: Writing host on HTTP/SSDP Instead of hosthdr, or transport on RTSP Instead of transporthdr):\n\n```frameassembly\nhost 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}\n```"},{"role":"assistant","content":"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.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-diag-e06","task_type":"diagnostic_fix","protocols":["icmp","ptp","ntp","bfd"],"version":"3.3.0","license":"MIT","prompt":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `unexpected identifier 'loop' inside compile block; use 'repeat <count> { ... }'` (E06: Using Removed v1 loop Instead of repeat, Leading wait Before Frame 1, or Parameterless flow):\n\n```frameassembly\nhost 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}\n```","completion":"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.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `unexpected identifier 'loop' inside compile block; use 'repeat <count> { ... }'` (E06: Using Removed v1 loop Instead of repeat, Leading wait Before Frame 1, or Parameterless flow):\n\n```frameassembly\nhost 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}\n```"},{"role":"assistant","content":"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.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-diag-e07","task_type":"diagnostic_fix","protocols":["lldp","stp","eapol","ospf"],"version":"3.3.0","license":"MIT","prompt":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `protocol requires an IPv4 or IPv6 address on both source and destination hosts` (E07: MAC-Only Host Used on a Layer 3, Layer 4, or Layer 7 Protocol):\n\n```frameassembly\nhost 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}\n```","completion":"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.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `protocol requires an IPv4 or IPv6 address on both source and destination hosts` (E07: MAC-Only Host Used on a Layer 3, Layer 4, or Layer 7 Protocol):\n\n```frameassembly\nhost 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}\n```"},{"role":"assistant","content":"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.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-diag-e08","task_type":"diagnostic_fix","protocols":["tcp","icmp","dns","bgp"],"version":"3.3.0","license":"MIT","prompt":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `source and destination hosts must share the same IP address family (both IPv4 or both IPv6)` (E08: Mixing an IPv4 Source Host with an IPv6 Destination Host):\n\n```frameassembly\nhost 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}\n```","completion":"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.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `source and destination hosts must share the same IP address family (both IPv4 or both IPv6)` (E08: Mixing an IPv4 Source Host with an IPv6 Destination Host):\n\n```frameassembly\nhost 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}\n```"},{"role":"assistant","content":"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.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-diag-e09","task_type":"diagnostic_fix","protocols":["igmp","mld","ndp","arp"],"version":"3.3.0","license":"MIT","prompt":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `igmp requires IPv4 endpoints (use mld for IPv6 multicast listener discovery)` (E09: Running igmp Over IPv6 Hosts or ndp / mld / srv6 Over IPv4 Hosts):\n\n```frameassembly\nhost 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}\n```","completion":"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.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `igmp requires IPv4 endpoints (use mld for IPv6 multicast listener discovery)` (E09: Running igmp Over IPv6 Hosts or ndp / mld / srv6 Over IPv4 Hosts):\n\n```frameassembly\nhost 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}\n```"},{"role":"assistant","content":"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.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-diag-e10","task_type":"diagnostic_fix","protocols":["dns","sip","syslog","modbus","kerberos"],"version":"3.3.0","license":"MIT","prompt":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `protocol 'vxlan' does not support 'transport tcp'` (E10: Using an Unsupported transport tcp|udp|sctp Override for a Fixed-Encapsulation Protocol):\n\n```frameassembly\nhost vtep1 { ip 10.0.0.10 }\nhost vtep2 { ip 10.0.0.20 }\n\ncompile {\n    vtep1 -> vtep2 vxlan vni 10010 transport tcp\n}\n```","completion":"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.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `protocol 'vxlan' does not support 'transport tcp'` (E10: Using an Unsupported transport tcp|udp|sctp Override for a Fixed-Encapsulation Protocol):\n\n```frameassembly\nhost vtep1 { ip 10.0.0.10 }\nhost vtep2 { ip 10.0.0.20 }\n\ncompile {\n    vtep1 -> vtep2 vxlan vni 10010 transport tcp\n}\n```"},{"role":"assistant","content":"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.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-diag-e11","task_type":"diagnostic_fix","protocols":["udp","tcp","quic","icmp"],"version":"3.3.0","license":"MIT","prompt":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `TCP header flags and options are only valid on tcp and TCP-based Layer 7 protocols` (E11: Applying TCP Flags/Options to Non-TCP Frames or nochecksum to Non-UDP Frames):\n\n```frameassembly\nhost 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}\n```","completion":"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.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `TCP header flags and options are only valid on tcp and TCP-based Layer 7 protocols` (E11: Applying TCP Flags/Options to Non-TCP Frames or nochecksum to Non-UDP Frames):\n\n```frameassembly\nhost 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}\n```"},{"role":"assistant","content":"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.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-diag-e12","task_type":"diagnostic_fix","protocols":["vlan","qinq","mpls","bgp"],"version":"3.3.0","license":"MIT","prompt":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `vlan ID 5000 exceeds 12-bit IEEE 802.1Q maximum (0..=4095)` (E12: Out-of-Range VLAN ID (>4095), DSCP (>63), NSH TTL (>63), or Duplicate TCP Flag):\n\n```frameassembly\nhost 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}\n```","completion":"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).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `vlan ID 5000 exceeds 12-bit IEEE 802.1Q maximum (0..=4095)` (E12: Out-of-Range VLAN ID (>4095), DSCP (>63), NSH TTL (>63), or Duplicate TCP Flag):\n\n```frameassembly\nhost 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}\n```"},{"role":"assistant","content":"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).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-diag-e13","task_type":"diagnostic_fix","protocols":["snmp3","snmp2","snmp1"],"version":"3.3.0","license":"MIT","prompt":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `snmp3 engineid must contain an even number of hexadecimal digits` (E13: Odd-Length SNMPv3 engineid Hex or Invalid varbind Value Type):\n\n```frameassembly\nhost 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}\n```","completion":"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).\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `snmp3 engineid must contain an even number of hexadecimal digits` (E13: Odd-Length SNMPv3 engineid Hex or Invalid varbind Value Type):\n\n```frameassembly\nhost 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}\n```"},{"role":"assistant","content":"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).\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-diag-e14","task_type":"diagnostic_fix","protocols":["dns","mdns","udp"],"version":"3.3.0","license":"MIT","prompt":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `DNS label exceeds RFC 1035 maximum of 63 octets per label (253 total)` (E14: DNS / mDNS / LLMNR Label Longer Than 63 Bytes or Payload + HexPayload Collision):\n\n```frameassembly\nhost ws { ip 10.0.0.10 }\nhost ns { ip 10.0.0.53 }\n\ncompile {\n    ws -> ns dns query qname \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.internal\"\n}\n```","completion":"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.\n\n```frameassembly\nhost 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}\n```","frasm_code":"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}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Fix the following broken FrameAssembly (.frasm) snippet, which fails semantic/syntax validation with `DNS label exceeds RFC 1035 maximum of 63 octets per label (253 total)` (E14: DNS / mDNS / LLMNR Label Longer Than 63 Bytes or Payload + HexPayload Collision):\n\n```frameassembly\nhost ws { ip 10.0.0.10 }\nhost ns { ip 10.0.0.53 }\n\ncompile {\n    ws -> ns dns query qname \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.internal\"\n}\n```"},{"role":"assistant","content":"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.\n\n```frameassembly\nhost 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}\n```"}]}
{"id":"sft-usecase-mig-firewall-acl-testing","task_type":"tool_migration","protocols":["vlan","icmp","tcp","tls"],"version":"3.3.0","license":"MIT","prompt":"Replace this hping3 + Scapy (Raw Sockets) approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Poke Holes in a New Firewall Rulebase Before Live Traffic Does\":\n\n```text\n# hping3 fails stateful NGFW SNI checks; Scapy requires manual SEQ math + Dot1Q stacking:\nsyn = Ether()/Dot1Q(vlan=40)/IP(src=\"203.0.113.45\",dst=\"198.51.100.80\")/TCP(sport=52100,dport=443,flags=\"S\",seq=1000)\nsa  = Ether()/Dot1Q(vlan=40)/IP(src=\"198.51.100.80\",dst=\"203.0.113.45\")/TCP(sport=443,dport=52100,flags=\"SA\",seq=2000,ack=1001)\nack = Ether()/Dot1Q(vlan=40)/IP(src=\"203.0.113.45\",dst=\"198.51.100.80\")/TCP(sport=52100,dport=443,flags=\"A\",seq=1001,ack=2001)\n# ...plus 25 lines of TLSClientHello() extension boilerplate\n```","completion":"Rootless user-space compile: `->` and `<-` swap ports and advance 4-tuple SEQ/ACK automatically across `tcp` and `tls clienthello`, keeping `vlan 40` intact. Compile with `frameassembly firewall_acl_test.frasm`.\n\n```frameassembly\nhost outside_tester { ip 203.0.113.45  mac 00:0c:29:45:11:22 }\nhost dmz_proxy      { ip 198.51.100.80 mac 00:1b:21:80:aa:bb }\n\nflow allow_https_sni(ext, dmz) {\n    // 1. Permitted TCP 443 handshake + TLS 1.3 ClientHello SNI on VLAN 40\n    ext -> dmz vlan 40 tcp syn srcport 52100 dstport 443 win 64240 mss 1460 wscale 7 sackperm wait 1ms\n    ext <- dmz vlan 40 tcp syn ack win 65535 mss 1460 wscale 7 sackperm wait 1ms\n    ext -> dmz vlan 40 tcp ack wait 1ms\n    ext -> dmz vlan 40 tls clienthello sni \"portal.corp.example\" ciphersuite 4865 alpn \"h2\" wait 2ms\n}\n\nflow verify_firewall_blocks(ext, dmz) {\n    // 2. Blocked MySQL port 3306 rejected immediately with TCP RST+ACK\n    ext -> dmz vlan 40 tcp syn srcport 52101 dstport 3306 win 64240 mss 1460 wait 1ms\n    ext <- dmz vlan 40 tcp rst ack wait 5ms\n\n    // 3. Out-of-state TCP ACK probe on SSH port 22 (audits stateful session drop)\n    ext -> dmz vlan 40 tcp ack srcport 52102 dstport 22 seq 85000 acknum 42000 win 1024 wait 5ms\n\n    // 4. Blocked ICMP Echo answered with Code 13 (Administratively Prohibited)\n    ext -> dmz vlan 40 ttl 64 icmp echorequest id 900 seq 1 payload \"DMZ_ACL_AUDIT\" wait 1ms\n    ext <- dmz vlan 40 ttl 64 icmp destunreach code 13 wait 1ms\n}\n\ncompile {\n    allow_https_sni(outside_tester, dmz_proxy)\n    verify_firewall_blocks(outside_tester, dmz_proxy)\n}\n```","frasm_code":"host outside_tester { ip 203.0.113.45  mac 00:0c:29:45:11:22 }\nhost dmz_proxy      { ip 198.51.100.80 mac 00:1b:21:80:aa:bb }\n\nflow allow_https_sni(ext, dmz) {\n    // 1. Permitted TCP 443 handshake + TLS 1.3 ClientHello SNI on VLAN 40\n    ext -> dmz vlan 40 tcp syn srcport 52100 dstport 443 win 64240 mss 1460 wscale 7 sackperm wait 1ms\n    ext <- dmz vlan 40 tcp syn ack win 65535 mss 1460 wscale 7 sackperm wait 1ms\n    ext -> dmz vlan 40 tcp ack wait 1ms\n    ext -> dmz vlan 40 tls clienthello sni \"portal.corp.example\" ciphersuite 4865 alpn \"h2\" wait 2ms\n}\n\nflow verify_firewall_blocks(ext, dmz) {\n    // 2. Blocked MySQL port 3306 rejected immediately with TCP RST+ACK\n    ext -> dmz vlan 40 tcp syn srcport 52101 dstport 3306 win 64240 mss 1460 wait 1ms\n    ext <- dmz vlan 40 tcp rst ack wait 5ms\n\n    // 3. Out-of-state TCP ACK probe on SSH port 22 (audits stateful session drop)\n    ext -> dmz vlan 40 tcp ack srcport 52102 dstport 22 seq 85000 acknum 42000 win 1024 wait 5ms\n\n    // 4. Blocked ICMP Echo answered with Code 13 (Administratively Prohibited)\n    ext -> dmz vlan 40 ttl 64 icmp echorequest id 900 seq 1 payload \"DMZ_ACL_AUDIT\" wait 1ms\n    ext <- dmz vlan 40 ttl 64 icmp destunreach code 13 wait 1ms\n}\n\ncompile {\n    allow_https_sni(outside_tester, dmz_proxy)\n    verify_firewall_blocks(outside_tester, dmz_proxy)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Replace this hping3 + Scapy (Raw Sockets) approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Poke Holes in a New Firewall Rulebase Before Live Traffic Does\":\n\n```text\n# hping3 fails stateful NGFW SNI checks; Scapy requires manual SEQ math + Dot1Q stacking:\nsyn = Ether()/Dot1Q(vlan=40)/IP(src=\"203.0.113.45\",dst=\"198.51.100.80\")/TCP(sport=52100,dport=443,flags=\"S\",seq=1000)\nsa  = Ether()/Dot1Q(vlan=40)/IP(src=\"198.51.100.80\",dst=\"203.0.113.45\")/TCP(sport=443,dport=52100,flags=\"SA\",seq=2000,ack=1001)\nack = Ether()/Dot1Q(vlan=40)/IP(src=\"203.0.113.45\",dst=\"198.51.100.80\")/TCP(sport=52100,dport=443,flags=\"A\",seq=1001,ack=2001)\n# ...plus 25 lines of TLSClientHello() extension boilerplate\n```"},{"role":"assistant","content":"Rootless user-space compile: `->` and `<-` swap ports and advance 4-tuple SEQ/ACK automatically across `tcp` and `tls clienthello`, keeping `vlan 40` intact. Compile with `frameassembly firewall_acl_test.frasm`.\n\n```frameassembly\nhost outside_tester { ip 203.0.113.45  mac 00:0c:29:45:11:22 }\nhost dmz_proxy      { ip 198.51.100.80 mac 00:1b:21:80:aa:bb }\n\nflow allow_https_sni(ext, dmz) {\n    // 1. Permitted TCP 443 handshake + TLS 1.3 ClientHello SNI on VLAN 40\n    ext -> dmz vlan 40 tcp syn srcport 52100 dstport 443 win 64240 mss 1460 wscale 7 sackperm wait 1ms\n    ext <- dmz vlan 40 tcp syn ack win 65535 mss 1460 wscale 7 sackperm wait 1ms\n    ext -> dmz vlan 40 tcp ack wait 1ms\n    ext -> dmz vlan 40 tls clienthello sni \"portal.corp.example\" ciphersuite 4865 alpn \"h2\" wait 2ms\n}\n\nflow verify_firewall_blocks(ext, dmz) {\n    // 2. Blocked MySQL port 3306 rejected immediately with TCP RST+ACK\n    ext -> dmz vlan 40 tcp syn srcport 52101 dstport 3306 win 64240 mss 1460 wait 1ms\n    ext <- dmz vlan 40 tcp rst ack wait 5ms\n\n    // 3. Out-of-state TCP ACK probe on SSH port 22 (audits stateful session drop)\n    ext -> dmz vlan 40 tcp ack srcport 52102 dstport 22 seq 85000 acknum 42000 win 1024 wait 5ms\n\n    // 4. Blocked ICMP Echo answered with Code 13 (Administratively Prohibited)\n    ext -> dmz vlan 40 ttl 64 icmp echorequest id 900 seq 1 payload \"DMZ_ACL_AUDIT\" wait 1ms\n    ext <- dmz vlan 40 ttl 64 icmp destunreach code 13 wait 1ms\n}\n\ncompile {\n    allow_https_sni(outside_tester, dmz_proxy)\n    verify_firewall_blocks(outside_tester, dmz_proxy)\n}\n```"}]}
{"id":"sft-usecase-mig-simulate-snmpv3-trap","task_type":"tool_migration","protocols":["vlan","snmp3"],"version":"3.3.0","license":"MIT","prompt":"Replace this Net-SNMP snmptrap + Scapy approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Test Encrypted SNMPv3 Traps Before an Actual Outage\":\n\n```text\n# Net-SNMP sends from your laptop IP (cannot spoof router IP 10.250.1.1 or VLAN 20):\nsnmptrap -v 3 -e 0x8000000903001c73a00001 -u noc_sha256_aes \\\n  -a SHA-256 -A 'AuthKey_SHA256_99!' -x AES -X 'PrivKey_AES128_99!' \\\n  -l authPriv 10.250.100.50 86400 1.3.6.1.6.3.1.1.5.3\n```","completion":"Computes RFC 3414 / RFC 7860 `Ku -> Kul` key localization, HMAC-SHA-256, and AES-128-CFB privacy natively in user space from exact router IP + VLAN 20. Compile with `frameassembly snmpv3_trap_test.frasm`.\n\n```frameassembly\nhost edge_router   { ip 10.250.1.1    mac 00:1c:73:a0:00:01 }\nhost nms_collector { ip 10.250.100.50 mac 00:50:56:a0:00:50 }\n\nflow link_flap_snmpv3_traps(rtr, nms) {\n    // 1. Encrypted SNMPv3 authPriv linkDown trap (ifOperStatus = 2 down) on Mgmt VLAN 20\n    rtr -> nms vlan 20 snmp3 trap user \"noc_sha256_aes\" engineid \"8000000903001c73a00001\"\n        engineboots 12 enginetime 86400\n        auth sha256 \"AuthKey_SHA256_99!\" priv aes \"PrivKey_AES128_99!\"\n        oid 1.3.6.1.6.3.1.1.5.3\n        varbind 1.3.6.1.2.1.1.5.0 string \"edge-rtr-01.dc1\"\n        varbind 1.3.6.1.2.1.2.2.1.2.5 string \"TenGigabitEthernet0/1/0\"\n        varbind 1.3.6.1.2.1.2.2.1.8.5 int 2 wait 10s\n\n    // 2. Recovery SNMPv3 authPriv linkUp trap 10s later (ifOperStatus = 1 up)\n    rtr -> nms vlan 20 snmp3 trap user \"noc_sha256_aes\" engineid \"8000000903001c73a00001\"\n        engineboots 12 enginetime 86410\n        auth sha256 \"AuthKey_SHA256_99!\" priv aes \"PrivKey_AES128_99!\"\n        oid 1.3.6.1.6.3.1.1.5.4\n        varbind 1.3.6.1.2.1.1.5.0 string \"edge-rtr-01.dc1\"\n        varbind 1.3.6.1.2.1.2.2.1.2.5 string \"TenGigabitEthernet0/1/0\"\n        varbind 1.3.6.1.2.1.2.2.1.8.5 int 1 wait 5ms\n}\n\ncompile {\n    link_flap_snmpv3_traps(edge_router, nms_collector)\n}\n```","frasm_code":"host edge_router   { ip 10.250.1.1    mac 00:1c:73:a0:00:01 }\nhost nms_collector { ip 10.250.100.50 mac 00:50:56:a0:00:50 }\n\nflow link_flap_snmpv3_traps(rtr, nms) {\n    // 1. Encrypted SNMPv3 authPriv linkDown trap (ifOperStatus = 2 down) on Mgmt VLAN 20\n    rtr -> nms vlan 20 snmp3 trap user \"noc_sha256_aes\" engineid \"8000000903001c73a00001\"\n        engineboots 12 enginetime 86400\n        auth sha256 \"AuthKey_SHA256_99!\" priv aes \"PrivKey_AES128_99!\"\n        oid 1.3.6.1.6.3.1.1.5.3\n        varbind 1.3.6.1.2.1.1.5.0 string \"edge-rtr-01.dc1\"\n        varbind 1.3.6.1.2.1.2.2.1.2.5 string \"TenGigabitEthernet0/1/0\"\n        varbind 1.3.6.1.2.1.2.2.1.8.5 int 2 wait 10s\n\n    // 2. Recovery SNMPv3 authPriv linkUp trap 10s later (ifOperStatus = 1 up)\n    rtr -> nms vlan 20 snmp3 trap user \"noc_sha256_aes\" engineid \"8000000903001c73a00001\"\n        engineboots 12 enginetime 86410\n        auth sha256 \"AuthKey_SHA256_99!\" priv aes \"PrivKey_AES128_99!\"\n        oid 1.3.6.1.6.3.1.1.5.4\n        varbind 1.3.6.1.2.1.1.5.0 string \"edge-rtr-01.dc1\"\n        varbind 1.3.6.1.2.1.2.2.1.2.5 string \"TenGigabitEthernet0/1/0\"\n        varbind 1.3.6.1.2.1.2.2.1.8.5 int 1 wait 5ms\n}\n\ncompile {\n    link_flap_snmpv3_traps(edge_router, nms_collector)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Replace this Net-SNMP snmptrap + Scapy approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Test Encrypted SNMPv3 Traps Before an Actual Outage\":\n\n```text\n# Net-SNMP sends from your laptop IP (cannot spoof router IP 10.250.1.1 or VLAN 20):\nsnmptrap -v 3 -e 0x8000000903001c73a00001 -u noc_sha256_aes \\\n  -a SHA-256 -A 'AuthKey_SHA256_99!' -x AES -X 'PrivKey_AES128_99!' \\\n  -l authPriv 10.250.100.50 86400 1.3.6.1.6.3.1.1.5.3\n```"},{"role":"assistant","content":"Computes RFC 3414 / RFC 7860 `Ku -> Kul` key localization, HMAC-SHA-256, and AES-128-CFB privacy natively in user space from exact router IP + VLAN 20. Compile with `frameassembly snmpv3_trap_test.frasm`.\n\n```frameassembly\nhost edge_router   { ip 10.250.1.1    mac 00:1c:73:a0:00:01 }\nhost nms_collector { ip 10.250.100.50 mac 00:50:56:a0:00:50 }\n\nflow link_flap_snmpv3_traps(rtr, nms) {\n    // 1. Encrypted SNMPv3 authPriv linkDown trap (ifOperStatus = 2 down) on Mgmt VLAN 20\n    rtr -> nms vlan 20 snmp3 trap user \"noc_sha256_aes\" engineid \"8000000903001c73a00001\"\n        engineboots 12 enginetime 86400\n        auth sha256 \"AuthKey_SHA256_99!\" priv aes \"PrivKey_AES128_99!\"\n        oid 1.3.6.1.6.3.1.1.5.3\n        varbind 1.3.6.1.2.1.1.5.0 string \"edge-rtr-01.dc1\"\n        varbind 1.3.6.1.2.1.2.2.1.2.5 string \"TenGigabitEthernet0/1/0\"\n        varbind 1.3.6.1.2.1.2.2.1.8.5 int 2 wait 10s\n\n    // 2. Recovery SNMPv3 authPriv linkUp trap 10s later (ifOperStatus = 1 up)\n    rtr -> nms vlan 20 snmp3 trap user \"noc_sha256_aes\" engineid \"8000000903001c73a00001\"\n        engineboots 12 enginetime 86410\n        auth sha256 \"AuthKey_SHA256_99!\" priv aes \"PrivKey_AES128_99!\"\n        oid 1.3.6.1.6.3.1.1.5.4\n        varbind 1.3.6.1.2.1.1.5.0 string \"edge-rtr-01.dc1\"\n        varbind 1.3.6.1.2.1.2.2.1.2.5 string \"TenGigabitEthernet0/1/0\"\n        varbind 1.3.6.1.2.1.2.2.1.8.5 int 1 wait 5ms\n}\n\ncompile {\n    link_flap_snmpv3_traps(edge_router, nms_collector)\n}\n```"}]}
{"id":"sft-usecase-mig-network-pentesting-pcap","task_type":"tool_migration","protocols":["qinq","icmp","tcp","kerberos","ldap","smb"],"version":"3.3.0","license":"MIT","prompt":"Replace this Impacket / Scapy ASN.1 Layers approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"VLAN Hopping, Kerberoasting & SMB ADMIN$ Without Locking Out AD\":\n\n```text\n# Live Impacket requires real AD credentials + triggers endpoint EDR:\nGetUserSPNs.py corp.local/svc_audit:'Password!' -dc-ip 10.20.1.10 -request\n# Or in Scapy: manual Dot1AD(vlan=10)/Dot1Q(vlan=20) + KRB_TGS_REQ ASN.1 trees + SMB2_Header\n```","completion":"Zero AD credentials and zero EDR triggers: 15 readable lines encode valid ASN.1 Kerberos, BER LDAPv3, UTF-16LE SMB2, and 802.1ad QinQ frames. Compile with `frameassembly pentest_lateral_audit.frasm`.\n\n```frameassembly\nhost jump_box { ip 10.20.5.101 mac 00:50:56:20:05:65 }\nhost corp_dc  { ip 10.20.1.10  mac 00:50:56:20:01:0a }\nhost file_srv { ip 10.20.1.50  mac 00:50:56:20:01:32 }\n\nflow l2_vlan_hop_and_stealth_scan(box, srv) {\n    // 1. 802.1ad double-tagged VLAN-hopping probe (outer VLAN 10 -> inner VLAN 20)\n    box -> srv qinq 10 innervlan 20 icmp echorequest id 404 seq 1 payload \"VLAN_HOP_AUDIT\" wait 2ms\n\n    // 2. Stealth TCP Xmas scan (FIN + PSH + URG) against RDP port 3389\n    box -> srv tcp fin psh urg srcport 59100 dstport 3389 win 1024 urgent 1 wait 5ms\n}\n\nflow ad_kerberoast_and_smb_lateral(box, dc, srv) {\n    // 3. RC4-HMAC (etype 23) Kerberoast TGS-REQ + stateful LDAP SPN enumeration\n    box -> dc kerberos tgsreq realm \"CORP.LOCAL\" cname \"svc_audit\" sname \"mssqlsvc/sql01.corp.local\" etype 23 wait 2ms\n    box <- dc kerberos tgsrep realm \"CORP.LOCAL\" cname \"svc_audit\" sname \"mssqlsvc/sql01.corp.local\" etype 23 wait 2ms\n    box -> dc tcp syn srcport 51389 dstport 389 win 64240 mss 1460 wait 1ms\n    box <- dc tcp syn ack win 64240 mss 1460 wait 1ms\n    box -> dc tcp ack wait 1ms\n    box -> dc ldap searchreq msgid 2 basedn \"dc=corp,dc=local\" filter \"(servicePrincipalName=*)\" wait 2ms\n    box <- dc ldap searchdone msgid 2 resultcode 0 wait 2ms\n\n    // 4. SMB2 lateral-movement probe to ADMIN$ share on TCP 445\n    box -> srv tcp syn srcport 51445 dstport 445 win 64240 mss 1460 wait 1ms\n    box <- srv tcp syn ack win 64240 mss 1460 wait 1ms\n    box -> srv tcp ack wait 1ms\n    box -> srv smb negotiate msgid 0 wait 1ms\n    box -> srv smb treeconnect msgid 1 sessionid 0x0001000000000001 share \"\\\\\\\\10.20.1.50\\\\ADMIN$\" wait 2ms\n    box <- srv smb treeconnect msgid 1 sessionid 0x0001000000000001 treeid 1 status 0xc0000022 wait 1ms\n}\n\ncompile {\n    l2_vlan_hop_and_stealth_scan(jump_box, file_srv)\n    ad_kerberoast_and_smb_lateral(jump_box, corp_dc, file_srv)\n}\n```","frasm_code":"host jump_box { ip 10.20.5.101 mac 00:50:56:20:05:65 }\nhost corp_dc  { ip 10.20.1.10  mac 00:50:56:20:01:0a }\nhost file_srv { ip 10.20.1.50  mac 00:50:56:20:01:32 }\n\nflow l2_vlan_hop_and_stealth_scan(box, srv) {\n    // 1. 802.1ad double-tagged VLAN-hopping probe (outer VLAN 10 -> inner VLAN 20)\n    box -> srv qinq 10 innervlan 20 icmp echorequest id 404 seq 1 payload \"VLAN_HOP_AUDIT\" wait 2ms\n\n    // 2. Stealth TCP Xmas scan (FIN + PSH + URG) against RDP port 3389\n    box -> srv tcp fin psh urg srcport 59100 dstport 3389 win 1024 urgent 1 wait 5ms\n}\n\nflow ad_kerberoast_and_smb_lateral(box, dc, srv) {\n    // 3. RC4-HMAC (etype 23) Kerberoast TGS-REQ + stateful LDAP SPN enumeration\n    box -> dc kerberos tgsreq realm \"CORP.LOCAL\" cname \"svc_audit\" sname \"mssqlsvc/sql01.corp.local\" etype 23 wait 2ms\n    box <- dc kerberos tgsrep realm \"CORP.LOCAL\" cname \"svc_audit\" sname \"mssqlsvc/sql01.corp.local\" etype 23 wait 2ms\n    box -> dc tcp syn srcport 51389 dstport 389 win 64240 mss 1460 wait 1ms\n    box <- dc tcp syn ack win 64240 mss 1460 wait 1ms\n    box -> dc tcp ack wait 1ms\n    box -> dc ldap searchreq msgid 2 basedn \"dc=corp,dc=local\" filter \"(servicePrincipalName=*)\" wait 2ms\n    box <- dc ldap searchdone msgid 2 resultcode 0 wait 2ms\n\n    // 4. SMB2 lateral-movement probe to ADMIN$ share on TCP 445\n    box -> srv tcp syn srcport 51445 dstport 445 win 64240 mss 1460 wait 1ms\n    box <- srv tcp syn ack win 64240 mss 1460 wait 1ms\n    box -> srv tcp ack wait 1ms\n    box -> srv smb negotiate msgid 0 wait 1ms\n    box -> srv smb treeconnect msgid 1 sessionid 0x0001000000000001 share \"\\\\\\\\10.20.1.50\\\\ADMIN$\" wait 2ms\n    box <- srv smb treeconnect msgid 1 sessionid 0x0001000000000001 treeid 1 status 0xc0000022 wait 1ms\n}\n\ncompile {\n    l2_vlan_hop_and_stealth_scan(jump_box, file_srv)\n    ad_kerberoast_and_smb_lateral(jump_box, corp_dc, file_srv)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Replace this Impacket / Scapy ASN.1 Layers approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"VLAN Hopping, Kerberoasting & SMB ADMIN$ Without Locking Out AD\":\n\n```text\n# Live Impacket requires real AD credentials + triggers endpoint EDR:\nGetUserSPNs.py corp.local/svc_audit:'Password!' -dc-ip 10.20.1.10 -request\n# Or in Scapy: manual Dot1AD(vlan=10)/Dot1Q(vlan=20) + KRB_TGS_REQ ASN.1 trees + SMB2_Header\n```"},{"role":"assistant","content":"Zero AD credentials and zero EDR triggers: 15 readable lines encode valid ASN.1 Kerberos, BER LDAPv3, UTF-16LE SMB2, and 802.1ad QinQ frames. Compile with `frameassembly pentest_lateral_audit.frasm`.\n\n```frameassembly\nhost jump_box { ip 10.20.5.101 mac 00:50:56:20:05:65 }\nhost corp_dc  { ip 10.20.1.10  mac 00:50:56:20:01:0a }\nhost file_srv { ip 10.20.1.50  mac 00:50:56:20:01:32 }\n\nflow l2_vlan_hop_and_stealth_scan(box, srv) {\n    // 1. 802.1ad double-tagged VLAN-hopping probe (outer VLAN 10 -> inner VLAN 20)\n    box -> srv qinq 10 innervlan 20 icmp echorequest id 404 seq 1 payload \"VLAN_HOP_AUDIT\" wait 2ms\n\n    // 2. Stealth TCP Xmas scan (FIN + PSH + URG) against RDP port 3389\n    box -> srv tcp fin psh urg srcport 59100 dstport 3389 win 1024 urgent 1 wait 5ms\n}\n\nflow ad_kerberoast_and_smb_lateral(box, dc, srv) {\n    // 3. RC4-HMAC (etype 23) Kerberoast TGS-REQ + stateful LDAP SPN enumeration\n    box -> dc kerberos tgsreq realm \"CORP.LOCAL\" cname \"svc_audit\" sname \"mssqlsvc/sql01.corp.local\" etype 23 wait 2ms\n    box <- dc kerberos tgsrep realm \"CORP.LOCAL\" cname \"svc_audit\" sname \"mssqlsvc/sql01.corp.local\" etype 23 wait 2ms\n    box -> dc tcp syn srcport 51389 dstport 389 win 64240 mss 1460 wait 1ms\n    box <- dc tcp syn ack win 64240 mss 1460 wait 1ms\n    box -> dc tcp ack wait 1ms\n    box -> dc ldap searchreq msgid 2 basedn \"dc=corp,dc=local\" filter \"(servicePrincipalName=*)\" wait 2ms\n    box <- dc ldap searchdone msgid 2 resultcode 0 wait 2ms\n\n    // 4. SMB2 lateral-movement probe to ADMIN$ share on TCP 445\n    box -> srv tcp syn srcport 51445 dstport 445 win 64240 mss 1460 wait 1ms\n    box <- srv tcp syn ack win 64240 mss 1460 wait 1ms\n    box -> srv tcp ack wait 1ms\n    box -> srv smb negotiate msgid 0 wait 1ms\n    box -> srv smb treeconnect msgid 1 sessionid 0x0001000000000001 share \"\\\\\\\\10.20.1.50\\\\ADMIN$\" wait 2ms\n    box <- srv smb treeconnect msgid 1 sessionid 0x0001000000000001 treeid 1 status 0xc0000022 wait 1ms\n}\n\ncompile {\n    l2_vlan_hop_and_stealth_scan(jump_box, file_srv)\n    ad_kerberoast_and_smb_lateral(jump_box, corp_dc, file_srv)\n}\n```"}]}
{"id":"sft-usecase-mig-suricata-ids-testing","task_type":"tool_migration","protocols":["tcp","udp","dns","http","tls"],"version":"3.3.0","license":"MIT","prompt":"Replace this Scapy wrpcap() + Binary Git Blobs approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Feed Suricata, Snort & Zeek Streams They Won’t Silently Drop\":\n\n```text\n# Scapy manual TCP stream: changing HTTP payload length breaks subsequent ack/seq!\nreq_raw = b\"POST /admin/export HTTP/1.1\\r\\nHost: portal.local\\r\\n...\"\npkt4 = IP(src=c,dst=s)/TCP(sport=53080,dport=80,flags=\"PA\",seq=1001,ack=2001)/Raw(req_raw)\npkt5 = IP(src=s,dst=c)/TCP(sport=80,dport=53080,flags=\"PA\",seq=2001,ack=1001+len(req_raw))/Raw(resp)\n```","completion":"Edit `uri`, `useragent`, `body`, or `sni` to any length—FrameAssembly recomputes TCP `seq`/`acknum`, `Content-Length`, and checksums automatically. Compile with `frameassembly ids_scan_test.frasm`.\n\n```frameassembly\nhost scanner { ip 172.18.99.10 }\nhost target  { ip 172.18.10.50 }\n\nflow dns_tls_and_waf_check(src, dst) {\n    src -> dst dns query txid 0x4401 qname \"c2-beacon.bad-domain.test\" qtype \"A\" wait 1ms\n    src <- dst dns response txid 0x4401 qname \"c2-beacon.bad-domain.test\" qtype \"A\" rcode 5 wait 2ms\n    src -> dst tcp syn srcport 53443 dstport 443 win 65535 mss 1460 wait 1ms\n    src <- dst tcp syn ack win 65535 mss 1460 wait 1ms\n    src -> dst tcp ack wait 1ms\n    src -> dst tls clienthello sni \"shadow-upload.example.net\" ciphersuite 4866 alpn \"h2\" wait 2ms\n    src -> dst tcp syn srcport 53080 dstport 80 win 65535 mss 1460 wait 1ms\n    src <- dst tcp syn ack win 65535 mss 1460 wait 1ms\n    src -> dst tcp ack wait 1ms\n    src -> dst http post uri \"/admin/export\" hosthdr \"portal.local\" useragent \"ScannerBot/2.1\" body \"{\\\"dump\\\":true}\" wait 2ms\n    src <- dst http status 403 reason \"Forbidden\" body \"{\\\"error\\\":\\\"blocked_by_waf\\\"}\" wait 2ms\n}\n\nflow syn_scan_and_fragments(src, dst) {\n    src -> dst tcp syn srcport 61001 dstport 21 wait 1ms\n    src -> dst tcp syn srcport 61002 dstport 22 wait 1ms\n    src -> dst tcp syn srcport 61003 dstport 80 wait 1ms\n    src -> dst udp dstport 161 ipid 4421 mf fragoffset 0 wait 1ms\n    src -> dst udp dstport 161 ipid 4421 fragoffset 185 wait 1ms\n}\n\ncompile {\n    dns_tls_and_waf_check(scanner, target)\n    syn_scan_and_fragments(scanner, target)\n}\n```","frasm_code":"host scanner { ip 172.18.99.10 }\nhost target  { ip 172.18.10.50 }\n\nflow dns_tls_and_waf_check(src, dst) {\n    src -> dst dns query txid 0x4401 qname \"c2-beacon.bad-domain.test\" qtype \"A\" wait 1ms\n    src <- dst dns response txid 0x4401 qname \"c2-beacon.bad-domain.test\" qtype \"A\" rcode 5 wait 2ms\n    src -> dst tcp syn srcport 53443 dstport 443 win 65535 mss 1460 wait 1ms\n    src <- dst tcp syn ack win 65535 mss 1460 wait 1ms\n    src -> dst tcp ack wait 1ms\n    src -> dst tls clienthello sni \"shadow-upload.example.net\" ciphersuite 4866 alpn \"h2\" wait 2ms\n    src -> dst tcp syn srcport 53080 dstport 80 win 65535 mss 1460 wait 1ms\n    src <- dst tcp syn ack win 65535 mss 1460 wait 1ms\n    src -> dst tcp ack wait 1ms\n    src -> dst http post uri \"/admin/export\" hosthdr \"portal.local\" useragent \"ScannerBot/2.1\" body \"{\\\"dump\\\":true}\" wait 2ms\n    src <- dst http status 403 reason \"Forbidden\" body \"{\\\"error\\\":\\\"blocked_by_waf\\\"}\" wait 2ms\n}\n\nflow syn_scan_and_fragments(src, dst) {\n    src -> dst tcp syn srcport 61001 dstport 21 wait 1ms\n    src -> dst tcp syn srcport 61002 dstport 22 wait 1ms\n    src -> dst tcp syn srcport 61003 dstport 80 wait 1ms\n    src -> dst udp dstport 161 ipid 4421 mf fragoffset 0 wait 1ms\n    src -> dst udp dstport 161 ipid 4421 fragoffset 185 wait 1ms\n}\n\ncompile {\n    dns_tls_and_waf_check(scanner, target)\n    syn_scan_and_fragments(scanner, target)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Replace this Scapy wrpcap() + Binary Git Blobs approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Feed Suricata, Snort & Zeek Streams They Won’t Silently Drop\":\n\n```text\n# Scapy manual TCP stream: changing HTTP payload length breaks subsequent ack/seq!\nreq_raw = b\"POST /admin/export HTTP/1.1\\r\\nHost: portal.local\\r\\n...\"\npkt4 = IP(src=c,dst=s)/TCP(sport=53080,dport=80,flags=\"PA\",seq=1001,ack=2001)/Raw(req_raw)\npkt5 = IP(src=s,dst=c)/TCP(sport=80,dport=53080,flags=\"PA\",seq=2001,ack=1001+len(req_raw))/Raw(resp)\n```"},{"role":"assistant","content":"Edit `uri`, `useragent`, `body`, or `sni` to any length—FrameAssembly recomputes TCP `seq`/`acknum`, `Content-Length`, and checksums automatically. Compile with `frameassembly ids_scan_test.frasm`.\n\n```frameassembly\nhost scanner { ip 172.18.99.10 }\nhost target  { ip 172.18.10.50 }\n\nflow dns_tls_and_waf_check(src, dst) {\n    src -> dst dns query txid 0x4401 qname \"c2-beacon.bad-domain.test\" qtype \"A\" wait 1ms\n    src <- dst dns response txid 0x4401 qname \"c2-beacon.bad-domain.test\" qtype \"A\" rcode 5 wait 2ms\n    src -> dst tcp syn srcport 53443 dstport 443 win 65535 mss 1460 wait 1ms\n    src <- dst tcp syn ack win 65535 mss 1460 wait 1ms\n    src -> dst tcp ack wait 1ms\n    src -> dst tls clienthello sni \"shadow-upload.example.net\" ciphersuite 4866 alpn \"h2\" wait 2ms\n    src -> dst tcp syn srcport 53080 dstport 80 win 65535 mss 1460 wait 1ms\n    src <- dst tcp syn ack win 65535 mss 1460 wait 1ms\n    src -> dst tcp ack wait 1ms\n    src -> dst http post uri \"/admin/export\" hosthdr \"portal.local\" useragent \"ScannerBot/2.1\" body \"{\\\"dump\\\":true}\" wait 2ms\n    src <- dst http status 403 reason \"Forbidden\" body \"{\\\"error\\\":\\\"blocked_by_waf\\\"}\" wait 2ms\n}\n\nflow syn_scan_and_fragments(src, dst) {\n    src -> dst tcp syn srcport 61001 dstport 21 wait 1ms\n    src -> dst tcp syn srcport 61002 dstport 22 wait 1ms\n    src -> dst tcp syn srcport 61003 dstport 80 wait 1ms\n    src -> dst udp dstport 161 ipid 4421 mf fragoffset 0 wait 1ms\n    src -> dst udp dstport 161 ipid 4421 fragoffset 185 wait 1ms\n}\n\ncompile {\n    dns_tls_and_waf_check(scanner, target)\n    syn_scan_and_fragments(scanner, target)\n}\n```"}]}
{"id":"sft-usecase-mig-edit-sanitize-pcap","task_type":"tool_migration","protocols":["vlan","radius","tacacs","syslog"],"version":"3.3.0","license":"MIT","prompt":"Replace this tcprewrite + editcap / TraceWrangler approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Edit & Sanitize a .pcap File Before Sending It to Vendor Support\":\n\n```text\n# tcprewrite maps outer IPs only — employee RADIUS username & Syslog text remain exposed!\ntcprewrite --infile=outage.pcap --outfile=half_scrubbed.pcap \\\n  --pnat=10.0.0.0/8:192.0.2.0/24 --enet-vlan=add --enet-vlan-tag=100 --fixcsum\n```","completion":"`frameassembly reverse` turns the entire binary `.pcap` into plain text so you can `Ctrl+H` redact variable-length L7 usernames, SNIs, and IPs and recompile valid lengths + checksums. Compile with `frameassembly redacted_radius.frasm`.\n\n```frameassembly\nhost branch_gw { ip 192.0.2.1     mac 0011.22aa.bb01 }\nhost auth_srv  { ip 198.51.100.10 mac 0011.22cc.dd10 }\n\nflow redacted_radius_repro(gw, srv) {\n    gw -> srv vlan 100 radius accessrequest id 10 user \"redacted_user\" nasip 192.0.2.1 wait 10ms\n    gw <- srv vlan 100 radius accessaccept  id 10 wait 5ms\n    gw -> srv vlan 100 syslog facility 1 severity 6 hostname \"branch-gw\" app \"tacacs\" msg \"User authenticated via 802.1X\" wait 2ms\n}\n\ncompile {\n    redacted_radius_repro(branch_gw, auth_srv)\n}\n```","frasm_code":"host branch_gw { ip 192.0.2.1     mac 0011.22aa.bb01 }\nhost auth_srv  { ip 198.51.100.10 mac 0011.22cc.dd10 }\n\nflow redacted_radius_repro(gw, srv) {\n    gw -> srv vlan 100 radius accessrequest id 10 user \"redacted_user\" nasip 192.0.2.1 wait 10ms\n    gw <- srv vlan 100 radius accessaccept  id 10 wait 5ms\n    gw -> srv vlan 100 syslog facility 1 severity 6 hostname \"branch-gw\" app \"tacacs\" msg \"User authenticated via 802.1X\" wait 2ms\n}\n\ncompile {\n    redacted_radius_repro(branch_gw, auth_srv)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Replace this tcprewrite + editcap / TraceWrangler approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Edit & Sanitize a .pcap File Before Sending It to Vendor Support\":\n\n```text\n# tcprewrite maps outer IPs only — employee RADIUS username & Syslog text remain exposed!\ntcprewrite --infile=outage.pcap --outfile=half_scrubbed.pcap \\\n  --pnat=10.0.0.0/8:192.0.2.0/24 --enet-vlan=add --enet-vlan-tag=100 --fixcsum\n```"},{"role":"assistant","content":"`frameassembly reverse` turns the entire binary `.pcap` into plain text so you can `Ctrl+H` redact variable-length L7 usernames, SNIs, and IPs and recompile valid lengths + checksums. Compile with `frameassembly redacted_radius.frasm`.\n\n```frameassembly\nhost branch_gw { ip 192.0.2.1     mac 0011.22aa.bb01 }\nhost auth_srv  { ip 198.51.100.10 mac 0011.22cc.dd10 }\n\nflow redacted_radius_repro(gw, srv) {\n    gw -> srv vlan 100 radius accessrequest id 10 user \"redacted_user\" nasip 192.0.2.1 wait 10ms\n    gw <- srv vlan 100 radius accessaccept  id 10 wait 5ms\n    gw -> srv vlan 100 syslog facility 1 severity 6 hostname \"branch-gw\" app \"tacacs\" msg \"User authenticated via 802.1X\" wait 2ms\n}\n\ncompile {\n    redacted_radius_repro(branch_gw, auth_srv)\n}\n```"}]}
{"id":"sft-usecase-mig-shadow-it-detection-pcap","task_type":"tool_migration","protocols":["tcp","dns","mdns","tls","quic","ssdp"],"version":"3.3.0","license":"MIT","prompt":"Replace this curl --resolve + Scapy QUIC/mDNS approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Check Shadow IT & Rogue-Gadget Sensors Without Getting Flagged by HR\":\n\n```text\n# Scapy requires manual multicast MAC calculation + raw hex QUIC Long Header assembly:\nmcast_mac = \"01:00:5e:00:00:fb\"\npkt = Ether(dst=mcast_mac)/IP(dst=\"224.0.0.251\",ttl=255)/UDP(sport=5353,dport=5353)/DNS(...)\n```","completion":"Safe offline `.pcap` synthesis: combines stateful TLS 1.3 SNI, RFC 9000 `quic initial`, and auto-derived multicast MAC `mdns`/`ssdp` frames in 9 lines. Compile with `frameassembly shadow_it_detection.frasm`.\n\n```frameassembly\nhost employee_pc { ip 10.30.15.42 }\nhost corp_gw     { ip 10.30.15.1 }\nhost mdns_group  { ip 224.0.0.251 }\nhost ssdp_group  { ip 239.255.255.250 }\n\nflow unmanaged_saas_and_ai(ws, gw) {\n    ws -> gw dns query txid 0x7101 qname \"personal-cloud-sync.example.io\" qtype \"A\" wait 1ms\n    ws <- gw dns response txid 0x7101 qname \"personal-cloud-sync.example.io\" qtype \"A\" rdata \"198.51.100.77\" wait 1ms\n    ws -> gw tcp syn srcport 53443 dstport 443 win 65535 mss 1460 wait 1ms\n    ws <- gw tcp syn ack win 65535 mss 1460 wait 1ms\n    ws -> gw tcp ack wait 1ms\n    ws -> gw tls clienthello sni \"unmanaged-ai-assistant.example.io\" ciphersuite 4865 alpn \"h2\" wait 2ms\n    ws -> gw dstport 443 quic initial version 1 dcid \"a1b2c3d4e5f60708\" scid \"1122334455667788\" pktnum 1 payload \"QUIC_DOH_BYPASS\" wait 2ms\n}\n\nflow rogue_device_discovery(ws, mcast_dns, mcast_upnp) {\n    ws -> mcast_dns mdns query qname \"rogue-office-nas.local\" qtype \"A\" wait 2ms\n    ws -> mcast_upnp ssdp msearch st \"ssdp:all\" mx 3 wait 2ms\n}\n\ncompile {\n    unmanaged_saas_and_ai(employee_pc, corp_gw)\n    rogue_device_discovery(employee_pc, mdns_group, ssdp_group)\n}\n```","frasm_code":"host employee_pc { ip 10.30.15.42 }\nhost corp_gw     { ip 10.30.15.1 }\nhost mdns_group  { ip 224.0.0.251 }\nhost ssdp_group  { ip 239.255.255.250 }\n\nflow unmanaged_saas_and_ai(ws, gw) {\n    ws -> gw dns query txid 0x7101 qname \"personal-cloud-sync.example.io\" qtype \"A\" wait 1ms\n    ws <- gw dns response txid 0x7101 qname \"personal-cloud-sync.example.io\" qtype \"A\" rdata \"198.51.100.77\" wait 1ms\n    ws -> gw tcp syn srcport 53443 dstport 443 win 65535 mss 1460 wait 1ms\n    ws <- gw tcp syn ack win 65535 mss 1460 wait 1ms\n    ws -> gw tcp ack wait 1ms\n    ws -> gw tls clienthello sni \"unmanaged-ai-assistant.example.io\" ciphersuite 4865 alpn \"h2\" wait 2ms\n    ws -> gw dstport 443 quic initial version 1 dcid \"a1b2c3d4e5f60708\" scid \"1122334455667788\" pktnum 1 payload \"QUIC_DOH_BYPASS\" wait 2ms\n}\n\nflow rogue_device_discovery(ws, mcast_dns, mcast_upnp) {\n    ws -> mcast_dns mdns query qname \"rogue-office-nas.local\" qtype \"A\" wait 2ms\n    ws -> mcast_upnp ssdp msearch st \"ssdp:all\" mx 3 wait 2ms\n}\n\ncompile {\n    unmanaged_saas_and_ai(employee_pc, corp_gw)\n    rogue_device_discovery(employee_pc, mdns_group, ssdp_group)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Replace this curl --resolve + Scapy QUIC/mDNS approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Check Shadow IT & Rogue-Gadget Sensors Without Getting Flagged by HR\":\n\n```text\n# Scapy requires manual multicast MAC calculation + raw hex QUIC Long Header assembly:\nmcast_mac = \"01:00:5e:00:00:fb\"\npkt = Ether(dst=mcast_mac)/IP(dst=\"224.0.0.251\",ttl=255)/UDP(sport=5353,dport=5353)/DNS(...)\n```"},{"role":"assistant","content":"Safe offline `.pcap` synthesis: combines stateful TLS 1.3 SNI, RFC 9000 `quic initial`, and auto-derived multicast MAC `mdns`/`ssdp` frames in 9 lines. Compile with `frameassembly shadow_it_detection.frasm`.\n\n```frameassembly\nhost employee_pc { ip 10.30.15.42 }\nhost corp_gw     { ip 10.30.15.1 }\nhost mdns_group  { ip 224.0.0.251 }\nhost ssdp_group  { ip 239.255.255.250 }\n\nflow unmanaged_saas_and_ai(ws, gw) {\n    ws -> gw dns query txid 0x7101 qname \"personal-cloud-sync.example.io\" qtype \"A\" wait 1ms\n    ws <- gw dns response txid 0x7101 qname \"personal-cloud-sync.example.io\" qtype \"A\" rdata \"198.51.100.77\" wait 1ms\n    ws -> gw tcp syn srcport 53443 dstport 443 win 65535 mss 1460 wait 1ms\n    ws <- gw tcp syn ack win 65535 mss 1460 wait 1ms\n    ws -> gw tcp ack wait 1ms\n    ws -> gw tls clienthello sni \"unmanaged-ai-assistant.example.io\" ciphersuite 4865 alpn \"h2\" wait 2ms\n    ws -> gw dstport 443 quic initial version 1 dcid \"a1b2c3d4e5f60708\" scid \"1122334455667788\" pktnum 1 payload \"QUIC_DOH_BYPASS\" wait 2ms\n}\n\nflow rogue_device_discovery(ws, mcast_dns, mcast_upnp) {\n    ws -> mcast_dns mdns query qname \"rogue-office-nas.local\" qtype \"A\" wait 2ms\n    ws -> mcast_upnp ssdp msearch st \"ssdp:all\" mx 3 wait 2ms\n}\n\ncompile {\n    unmanaged_saas_and_ai(employee_pc, corp_gw)\n    rogue_device_discovery(employee_pc, mdns_group, ssdp_group)\n}\n```"}]}
{"id":"sft-usecase-mig-vlan-qinq-mpls-qos","task_type":"tool_migration","protocols":["vlan","qinq","mpls","tls","rtp"],"version":"3.3.0","license":"MIT","prompt":"Replace this OS Sub-Interfaces + Scapy contrib.mpls approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Stamp 802.1Q VLAN, Double-Tagged QinQ & MPLS Without an IXIA Rack\":\n\n```text\nfrom scapy.contrib.mpls import MPLS\nframe = (Ether(type=0x88a8)/Dot1Q(vlan=2000,type=0x8100)/Dot1Q(vlan=150,type=0x8847)\n         /MPLS(label=40960,cos=5,s=1,ttl=64)/IP(src=\"10.220.1.10\",dst=\"10.220.1.200\")/TCP(...))\n```","completion":"Drop `qinq 2000 innervlan 150 mpls 40960 exp 5` onto any L3–L7 statement—no root sub-interfaces, no NIC tag stripping, and exact EtherType chaining. Compile with `frameassembly qinq_mpls_trunk.frasm`.\n\n```frameassembly\nhost branch_cpe { ip 10.220.1.10 }\nhost hq_gateway { ip 10.220.1.200 }\n\nflow metro_trunk(cpe, hq) {\n    cpe -> hq vlan 110 pcp 5 dei 0 dscp 46 rtp pt 0 seq 1 timestamp 160 payload \"G711_VOICE_EF\" wait 5ms\n    cpe -> hq qinq 2000 innervlan 150 mpls 40960 exp 5 tls clienthello sni \"wan.example.com\" wait 5ms\n    cpe <- hq qinq 2000 innervlan 150 mpls 40960 exp 5 tls serverhello wait 5ms\n}\n\ncompile {\n    metro_trunk(branch_cpe, hq_gateway)\n}\n```","frasm_code":"host branch_cpe { ip 10.220.1.10 }\nhost hq_gateway { ip 10.220.1.200 }\n\nflow metro_trunk(cpe, hq) {\n    cpe -> hq vlan 110 pcp 5 dei 0 dscp 46 rtp pt 0 seq 1 timestamp 160 payload \"G711_VOICE_EF\" wait 5ms\n    cpe -> hq qinq 2000 innervlan 150 mpls 40960 exp 5 tls clienthello sni \"wan.example.com\" wait 5ms\n    cpe <- hq qinq 2000 innervlan 150 mpls 40960 exp 5 tls serverhello wait 5ms\n}\n\ncompile {\n    metro_trunk(branch_cpe, hq_gateway)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Replace this OS Sub-Interfaces + Scapy contrib.mpls approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Stamp 802.1Q VLAN, Double-Tagged QinQ & MPLS Without an IXIA Rack\":\n\n```text\nfrom scapy.contrib.mpls import MPLS\nframe = (Ether(type=0x88a8)/Dot1Q(vlan=2000,type=0x8100)/Dot1Q(vlan=150,type=0x8847)\n         /MPLS(label=40960,cos=5,s=1,ttl=64)/IP(src=\"10.220.1.10\",dst=\"10.220.1.200\")/TCP(...))\n```"},{"role":"assistant","content":"Drop `qinq 2000 innervlan 150 mpls 40960 exp 5` onto any L3–L7 statement—no root sub-interfaces, no NIC tag stripping, and exact EtherType chaining. Compile with `frameassembly qinq_mpls_trunk.frasm`.\n\n```frameassembly\nhost branch_cpe { ip 10.220.1.10 }\nhost hq_gateway { ip 10.220.1.200 }\n\nflow metro_trunk(cpe, hq) {\n    cpe -> hq vlan 110 pcp 5 dei 0 dscp 46 rtp pt 0 seq 1 timestamp 160 payload \"G711_VOICE_EF\" wait 5ms\n    cpe -> hq qinq 2000 innervlan 150 mpls 40960 exp 5 tls clienthello sni \"wan.example.com\" wait 5ms\n    cpe <- hq qinq 2000 innervlan 150 mpls 40960 exp 5 tls serverhello wait 5ms\n}\n\ncompile {\n    metro_trunk(branch_cpe, hq_gateway)\n}\n```"}]}
{"id":"sft-usecase-mig-industrial-ot-modbus-dnp3","task_type":"tool_migration","protocols":["tcp","udp","modbus","bacnet","dnp3"],"version":"3.3.0","license":"MIT","prompt":"Replace this pymodbus / Scapy Raw DNP3 CRC-16 approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Poke OT / SCADA Firewalls Without Opening a Substation Breaker\":\n\n```text\n# DNP3 requires 0x0564 sync + header CRC-16 + per-16-byte-chunk CRC-16 (poly 0x3D65):\ndnp3_hdr = b\"\\x05\\x64\\x14\\xc4\\x0a\\x00\\x01\\x00\" + calc_dnp3_crc(hdr)\n# Missing or bad chunk CRC causes Claroty / Dragos / Palo Alto OT to drop the frame!\n```","completion":"Built-in Modbus MBAP framing, IEEE 1815 DNP3 per-chunk CRC-16 calculation, and BACnet APDU encoding in one offline `.frasm` file. Compile with `frameassembly scada_modbus.frasm`.\n\n```frameassembly\nhost scada_hmi { ip 10.80.20.10 }\nhost plc_node  { ip 10.80.10.50 }\n\nflow modbus_and_ot_poll(hmi, plc) {\n    hmi -> plc tcp syn srcport 50200 dstport 502 wait 1ms\n    hmi <- plc tcp syn ack wait 1ms\n    hmi -> plc tcp ack wait 1ms\n    hmi -> plc modbus readholdingregisters txid 101 unitid 1 addr 40001 count 4 wait 5ms\n    hmi <- plc modbus readholdingregisters txid 101 unitid 1 count 4 isresponse wait 5ms\n    hmi -> plc modbus writesingleregister txid 102 unitid 1 addr 40001 value 1500 wait 5ms\n    hmi -> plc transport udp dnp3 select src 1 dst 10 group 12 variation 1 wait 2ms\n    hmi -> plc transport udp dnp3 operate src 1 dst 10 group 12 variation 1 wait 2ms\n    hmi -> plc bacnet readproperty invokeid 10 objecttype 0 objectinstance 1 propertyid 85 wait 2ms\n}\n\ncompile {\n    modbus_and_ot_poll(scada_hmi, plc_node)\n}\n```","frasm_code":"host scada_hmi { ip 10.80.20.10 }\nhost plc_node  { ip 10.80.10.50 }\n\nflow modbus_and_ot_poll(hmi, plc) {\n    hmi -> plc tcp syn srcport 50200 dstport 502 wait 1ms\n    hmi <- plc tcp syn ack wait 1ms\n    hmi -> plc tcp ack wait 1ms\n    hmi -> plc modbus readholdingregisters txid 101 unitid 1 addr 40001 count 4 wait 5ms\n    hmi <- plc modbus readholdingregisters txid 101 unitid 1 count 4 isresponse wait 5ms\n    hmi -> plc modbus writesingleregister txid 102 unitid 1 addr 40001 value 1500 wait 5ms\n    hmi -> plc transport udp dnp3 select src 1 dst 10 group 12 variation 1 wait 2ms\n    hmi -> plc transport udp dnp3 operate src 1 dst 10 group 12 variation 1 wait 2ms\n    hmi -> plc bacnet readproperty invokeid 10 objecttype 0 objectinstance 1 propertyid 85 wait 2ms\n}\n\ncompile {\n    modbus_and_ot_poll(scada_hmi, plc_node)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Replace this pymodbus / Scapy Raw DNP3 CRC-16 approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Poke OT / SCADA Firewalls Without Opening a Substation Breaker\":\n\n```text\n# DNP3 requires 0x0564 sync + header CRC-16 + per-16-byte-chunk CRC-16 (poly 0x3D65):\ndnp3_hdr = b\"\\x05\\x64\\x14\\xc4\\x0a\\x00\\x01\\x00\" + calc_dnp3_crc(hdr)\n# Missing or bad chunk CRC causes Claroty / Dragos / Palo Alto OT to drop the frame!\n```"},{"role":"assistant","content":"Built-in Modbus MBAP framing, IEEE 1815 DNP3 per-chunk CRC-16 calculation, and BACnet APDU encoding in one offline `.frasm` file. Compile with `frameassembly scada_modbus.frasm`.\n\n```frameassembly\nhost scada_hmi { ip 10.80.20.10 }\nhost plc_node  { ip 10.80.10.50 }\n\nflow modbus_and_ot_poll(hmi, plc) {\n    hmi -> plc tcp syn srcport 50200 dstport 502 wait 1ms\n    hmi <- plc tcp syn ack wait 1ms\n    hmi -> plc tcp ack wait 1ms\n    hmi -> plc modbus readholdingregisters txid 101 unitid 1 addr 40001 count 4 wait 5ms\n    hmi <- plc modbus readholdingregisters txid 101 unitid 1 count 4 isresponse wait 5ms\n    hmi -> plc modbus writesingleregister txid 102 unitid 1 addr 40001 value 1500 wait 5ms\n    hmi -> plc transport udp dnp3 select src 1 dst 10 group 12 variation 1 wait 2ms\n    hmi -> plc transport udp dnp3 operate src 1 dst 10 group 12 variation 1 wait 2ms\n    hmi -> plc bacnet readproperty invokeid 10 objecttype 0 objectinstance 1 propertyid 85 wait 2ms\n}\n\ncompile {\n    modbus_and_ot_poll(scada_hmi, plc_node)\n}\n```"}]}
{"id":"sft-usecase-mig-bgp-ospf-bfd-routing-pcap","task_type":"tool_migration","protocols":["ospf","bgp","bfd","tcp"],"version":"3.3.0","license":"MIT","prompt":"Replace this Containerlab / GNS3 + Scapy contrib.bgp approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Test eBGP 4-Byte ASN Peering, OSPF & BFD Without Router VMs\":\n\n```text\nfrom scapy.contrib.bgp import BGPHeader, BGPOpen, BGPOptParam, BGPCapFourBytesASN\n# Must manually substitute AS_TRANS (23456) whenever ASN > 65535:\nopen_msg = BGPHeader(type=1)/BGPOpen(my_as=23456, hold_time=90, bgp_id=\"198.51.100.1\",\n    opt_params=[BGPOptParam(param_value=BGPCapFourBytesASN(asn=4200000001))])\n```","completion":"Write `bgp open asn 4200000001` directly—RFC 6793 `AS_TRANS` + Capability 65, 16-byte `0xff` markers, and OSPF `01:00:5e:00:00:05` MACs are automatic. Compile with `frameassembly bgp_ospf_bfd_lab.frasm`.\n\n```frameassembly\nhost dc_border { ip 198.51.100.1 mac 00:1c:73:b0:00:01 }\nhost isp_edge  { ip 198.51.100.2 mac 00:1c:73:b0:00:02 }\nhost ospf_all  { ip 224.0.0.5 }\n\nflow ebgp_peering_and_nlri(local_rtr, peer_rtr) {\n    // 1. Stateful TCP 179 handshake + 4-byte ASN eBGP OPEN, KEEPALIVE, and NLRI UPDATE\n    local_rtr -> peer_rtr dscp 48 ttl 1 tcp syn srcport 51179 dstport 179 win 65535 mss 1460 wait 1ms\n    local_rtr <- peer_rtr dscp 48 ttl 1 tcp syn ack win 65535 mss 1460 wait 1ms\n    local_rtr -> peer_rtr dscp 48 ttl 1 tcp ack wait 1ms\n    local_rtr -> peer_rtr dscp 48 ttl 1 bgp open asn 4200000001 holdtime 90 bgpid 198.51.100.1 wait 2ms\n    local_rtr <- peer_rtr dscp 48 ttl 1 bgp open asn 64512 holdtime 90 bgpid 198.51.100.2 wait 2ms\n    local_rtr -> peer_rtr dscp 48 ttl 1 bgp keepalive wait 1ms\n    local_rtr <- peer_rtr dscp 48 ttl 1 bgp keepalive wait 2ms\n    local_rtr -> peer_rtr dscp 48 ttl 1 bgp update asn 4200000001 prefix \"203.0.113.0/24\" nexthop 198.51.100.1 wait 5ms\n}\n\nflow igp_and_bfd_liveness(local_rtr, peer_rtr, mcast_ospf) {\n    // 2. OSPFv2 multicast Hello (224.0.0.5 -> 01:00:5e:00:00:05) + unicast LSAck\n    local_rtr -> mcast_ospf dscp 48 ttl 1 ospf hello routerid 198.51.100.1 areaid 0.0.0.0 hellointerval 10 deadinterval 40 priority 100 wait 2ms\n    local_rtr <- peer_rtr dscp 48 ttl 1 ospf lsack routerid 198.51.100.2 areaid 0.0.0.0 wait 2ms\n\n    // 3. Sub-second BFD Control Up session (state 3, TTL 255) on UDP 3784\n    local_rtr -> peer_rtr dscp 48 ttl 255 bfd state 3 diag 0 mydisc 0x1001 yourdisc 0x2002 mintx 50000 minrx 50000 mult 3 wait 2ms\n    local_rtr <- peer_rtr dscp 48 ttl 255 bfd state 3 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 wait 2ms\n}\n\ncompile {\n    ebgp_peering_and_nlri(dc_border, isp_edge)\n    igp_and_bfd_liveness(dc_border, isp_edge, ospf_all)\n}\n```","frasm_code":"host dc_border { ip 198.51.100.1 mac 00:1c:73:b0:00:01 }\nhost isp_edge  { ip 198.51.100.2 mac 00:1c:73:b0:00:02 }\nhost ospf_all  { ip 224.0.0.5 }\n\nflow ebgp_peering_and_nlri(local_rtr, peer_rtr) {\n    // 1. Stateful TCP 179 handshake + 4-byte ASN eBGP OPEN, KEEPALIVE, and NLRI UPDATE\n    local_rtr -> peer_rtr dscp 48 ttl 1 tcp syn srcport 51179 dstport 179 win 65535 mss 1460 wait 1ms\n    local_rtr <- peer_rtr dscp 48 ttl 1 tcp syn ack win 65535 mss 1460 wait 1ms\n    local_rtr -> peer_rtr dscp 48 ttl 1 tcp ack wait 1ms\n    local_rtr -> peer_rtr dscp 48 ttl 1 bgp open asn 4200000001 holdtime 90 bgpid 198.51.100.1 wait 2ms\n    local_rtr <- peer_rtr dscp 48 ttl 1 bgp open asn 64512 holdtime 90 bgpid 198.51.100.2 wait 2ms\n    local_rtr -> peer_rtr dscp 48 ttl 1 bgp keepalive wait 1ms\n    local_rtr <- peer_rtr dscp 48 ttl 1 bgp keepalive wait 2ms\n    local_rtr -> peer_rtr dscp 48 ttl 1 bgp update asn 4200000001 prefix \"203.0.113.0/24\" nexthop 198.51.100.1 wait 5ms\n}\n\nflow igp_and_bfd_liveness(local_rtr, peer_rtr, mcast_ospf) {\n    // 2. OSPFv2 multicast Hello (224.0.0.5 -> 01:00:5e:00:00:05) + unicast LSAck\n    local_rtr -> mcast_ospf dscp 48 ttl 1 ospf hello routerid 198.51.100.1 areaid 0.0.0.0 hellointerval 10 deadinterval 40 priority 100 wait 2ms\n    local_rtr <- peer_rtr dscp 48 ttl 1 ospf lsack routerid 198.51.100.2 areaid 0.0.0.0 wait 2ms\n\n    // 3. Sub-second BFD Control Up session (state 3, TTL 255) on UDP 3784\n    local_rtr -> peer_rtr dscp 48 ttl 255 bfd state 3 diag 0 mydisc 0x1001 yourdisc 0x2002 mintx 50000 minrx 50000 mult 3 wait 2ms\n    local_rtr <- peer_rtr dscp 48 ttl 255 bfd state 3 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 wait 2ms\n}\n\ncompile {\n    ebgp_peering_and_nlri(dc_border, isp_edge)\n    igp_and_bfd_liveness(dc_border, isp_edge, ospf_all)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Replace this Containerlab / GNS3 + Scapy contrib.bgp approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Test eBGP 4-Byte ASN Peering, OSPF & BFD Without Router VMs\":\n\n```text\nfrom scapy.contrib.bgp import BGPHeader, BGPOpen, BGPOptParam, BGPCapFourBytesASN\n# Must manually substitute AS_TRANS (23456) whenever ASN > 65535:\nopen_msg = BGPHeader(type=1)/BGPOpen(my_as=23456, hold_time=90, bgp_id=\"198.51.100.1\",\n    opt_params=[BGPOptParam(param_value=BGPCapFourBytesASN(asn=4200000001))])\n```"},{"role":"assistant","content":"Write `bgp open asn 4200000001` directly—RFC 6793 `AS_TRANS` + Capability 65, 16-byte `0xff` markers, and OSPF `01:00:5e:00:00:05` MACs are automatic. Compile with `frameassembly bgp_ospf_bfd_lab.frasm`.\n\n```frameassembly\nhost dc_border { ip 198.51.100.1 mac 00:1c:73:b0:00:01 }\nhost isp_edge  { ip 198.51.100.2 mac 00:1c:73:b0:00:02 }\nhost ospf_all  { ip 224.0.0.5 }\n\nflow ebgp_peering_and_nlri(local_rtr, peer_rtr) {\n    // 1. Stateful TCP 179 handshake + 4-byte ASN eBGP OPEN, KEEPALIVE, and NLRI UPDATE\n    local_rtr -> peer_rtr dscp 48 ttl 1 tcp syn srcport 51179 dstport 179 win 65535 mss 1460 wait 1ms\n    local_rtr <- peer_rtr dscp 48 ttl 1 tcp syn ack win 65535 mss 1460 wait 1ms\n    local_rtr -> peer_rtr dscp 48 ttl 1 tcp ack wait 1ms\n    local_rtr -> peer_rtr dscp 48 ttl 1 bgp open asn 4200000001 holdtime 90 bgpid 198.51.100.1 wait 2ms\n    local_rtr <- peer_rtr dscp 48 ttl 1 bgp open asn 64512 holdtime 90 bgpid 198.51.100.2 wait 2ms\n    local_rtr -> peer_rtr dscp 48 ttl 1 bgp keepalive wait 1ms\n    local_rtr <- peer_rtr dscp 48 ttl 1 bgp keepalive wait 2ms\n    local_rtr -> peer_rtr dscp 48 ttl 1 bgp update asn 4200000001 prefix \"203.0.113.0/24\" nexthop 198.51.100.1 wait 5ms\n}\n\nflow igp_and_bfd_liveness(local_rtr, peer_rtr, mcast_ospf) {\n    // 2. OSPFv2 multicast Hello (224.0.0.5 -> 01:00:5e:00:00:05) + unicast LSAck\n    local_rtr -> mcast_ospf dscp 48 ttl 1 ospf hello routerid 198.51.100.1 areaid 0.0.0.0 hellointerval 10 deadinterval 40 priority 100 wait 2ms\n    local_rtr <- peer_rtr dscp 48 ttl 1 ospf lsack routerid 198.51.100.2 areaid 0.0.0.0 wait 2ms\n\n    // 3. Sub-second BFD Control Up session (state 3, TTL 255) on UDP 3784\n    local_rtr -> peer_rtr dscp 48 ttl 255 bfd state 3 diag 0 mydisc 0x1001 yourdisc 0x2002 mintx 50000 minrx 50000 mult 3 wait 2ms\n    local_rtr <- peer_rtr dscp 48 ttl 255 bfd state 3 diag 0 mydisc 0x2002 yourdisc 0x1001 mintx 50000 minrx 50000 mult 3 wait 2ms\n}\n\ncompile {\n    ebgp_peering_and_nlri(dc_border, isp_edge)\n    igp_and_bfd_liveness(dc_border, isp_edge, ospf_all)\n}\n```"}]}
{"id":"sft-usecase-mig-vxlan-wireguard-ipsec-tunnel-pcap","task_type":"tool_migration","protocols":["icmp","vxlan","geneve","esp","ikev2","wireguard","udp"],"version":"3.3.0","license":"MIT","prompt":"Replace this strongSwan / wg-quick + Scapy Overlays approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Debug VXLAN, Geneve, WireGuard & IPsec Tunnel MTU Black Holes Offline\":\n\n```text\n# WireGuard dissectors reject packets unless Initiation=148B and Response=92B exact:\nwg_init = IP(dst=peer)/UDP(sport=51820,dport=51820)/Raw(b\"\\x01\\x00\\x00\\x00\" + sender_le + b\"\\x00\"*140)\n# Plus separate Scapy contrib imports for VXLAN, GENEVE, IKEv2, and ESP\n```","completion":"Native `vxlan`, `geneve`, `ikev2`, `esp`, and exact-size `wireguard` builders plus `df` / `icmp destunreach code 4` in one rootless file. Compile with `frameassembly overlay_vpn_mtu.frasm`.\n\n```frameassembly\nhost spine_vtep  { ip 172.16.254.10 mac 00:1c:73:c0:00:10 }\nhost remote_vtep { ip 172.16.254.20 mac 00:1c:73:c0:00:20 }\n\nflow dc_overlays_and_pmtud(local_gw, peer_gw) {\n    // 1. EVPN VXLAN (UDP 4789, VNI 10400) & Cilium/GWLB Geneve (UDP 6081, VNI 20800)\n    local_gw -> peer_gw df vxlan vni 10400 payload \"INNER_TENANT_FRAME\" wait 1ms\n    local_gw -> peer_gw df geneve vni 20800 optclass 0x0104 opttype 1 protocoltype 0x6558 wait 2ms\n\n    // 2. Path MTU Discovery (DF=1 probe -> ICMP Type 3 Code 4 Fragmentation Needed)\n    local_gw -> peer_gw df ipid 9001 udp srcport 54000 dstport 4789 payload \"OVERSIZED_TUNNEL_DF_PROBE\" wait 1ms\n    local_gw <- peer_gw icmp destunreach code 4 wait 3ms\n}\n\nflow site_to_site_ipsec_and_wireguard(local_gw, peer_gw) {\n    // 3. IKEv2 SA_INIT (UDP 500) -> NAT-T float (UDP 4500 AUTH) + IPsec ESP (Proto 50)\n    local_gw -> peer_gw ikev2 sainit initiatorspi 0xa1b2c3d4e5f60102 responderspi 0 msgid 0 flags 0x08 nextpayload 33 wait 2ms\n    local_gw <- peer_gw ikev2 sainit initiatorspi 0xa1b2c3d4e5f60102 responderspi 0x1122334455667788 msgid 0 flags 0x20 nextpayload 33 wait 2ms\n    local_gw -> peer_gw ikev2 auth srcport 4500 dstport 4500 initiatorspi 0xa1b2c3d4e5f60102 responderspi 0x1122334455667788 msgid 1 flags 0x08 nextpayload 46 wait 2ms\n    local_gw <- peer_gw ikev2 auth srcport 4500 dstport 4500 initiatorspi 0xa1b2c3d4e5f60102 responderspi 0x1122334455667788 msgid 1 flags 0x20 nextpayload 46 wait 2ms\n    local_gw -> peer_gw esp spi 0xc0ffee01 seq 1 iv \"0011223344556677\" icv \"8899aabbccddeeff00112233\" wait 2ms\n\n    // 4. WireGuard 1-RTT handshake (148B Initiation -> 92B Response) + AEAD Data\n    local_gw -> peer_gw wireguard initiation sender 0x01020304 wait 1ms\n    local_gw <- peer_gw wireguard response sender 0x05060708 receiver 0x01020304 wait 1ms\n    local_gw -> peer_gw wireguard data receiver 0x05060708 counter 0 payload \"WG_INNER_PACKET\" wait 1ms\n}\n\ncompile {\n    dc_overlays_and_pmtud(spine_vtep, remote_vtep)\n    site_to_site_ipsec_and_wireguard(spine_vtep, remote_vtep)\n}\n```","frasm_code":"host spine_vtep  { ip 172.16.254.10 mac 00:1c:73:c0:00:10 }\nhost remote_vtep { ip 172.16.254.20 mac 00:1c:73:c0:00:20 }\n\nflow dc_overlays_and_pmtud(local_gw, peer_gw) {\n    // 1. EVPN VXLAN (UDP 4789, VNI 10400) & Cilium/GWLB Geneve (UDP 6081, VNI 20800)\n    local_gw -> peer_gw df vxlan vni 10400 payload \"INNER_TENANT_FRAME\" wait 1ms\n    local_gw -> peer_gw df geneve vni 20800 optclass 0x0104 opttype 1 protocoltype 0x6558 wait 2ms\n\n    // 2. Path MTU Discovery (DF=1 probe -> ICMP Type 3 Code 4 Fragmentation Needed)\n    local_gw -> peer_gw df ipid 9001 udp srcport 54000 dstport 4789 payload \"OVERSIZED_TUNNEL_DF_PROBE\" wait 1ms\n    local_gw <- peer_gw icmp destunreach code 4 wait 3ms\n}\n\nflow site_to_site_ipsec_and_wireguard(local_gw, peer_gw) {\n    // 3. IKEv2 SA_INIT (UDP 500) -> NAT-T float (UDP 4500 AUTH) + IPsec ESP (Proto 50)\n    local_gw -> peer_gw ikev2 sainit initiatorspi 0xa1b2c3d4e5f60102 responderspi 0 msgid 0 flags 0x08 nextpayload 33 wait 2ms\n    local_gw <- peer_gw ikev2 sainit initiatorspi 0xa1b2c3d4e5f60102 responderspi 0x1122334455667788 msgid 0 flags 0x20 nextpayload 33 wait 2ms\n    local_gw -> peer_gw ikev2 auth srcport 4500 dstport 4500 initiatorspi 0xa1b2c3d4e5f60102 responderspi 0x1122334455667788 msgid 1 flags 0x08 nextpayload 46 wait 2ms\n    local_gw <- peer_gw ikev2 auth srcport 4500 dstport 4500 initiatorspi 0xa1b2c3d4e5f60102 responderspi 0x1122334455667788 msgid 1 flags 0x20 nextpayload 46 wait 2ms\n    local_gw -> peer_gw esp spi 0xc0ffee01 seq 1 iv \"0011223344556677\" icv \"8899aabbccddeeff00112233\" wait 2ms\n\n    // 4. WireGuard 1-RTT handshake (148B Initiation -> 92B Response) + AEAD Data\n    local_gw -> peer_gw wireguard initiation sender 0x01020304 wait 1ms\n    local_gw <- peer_gw wireguard response sender 0x05060708 receiver 0x01020304 wait 1ms\n    local_gw -> peer_gw wireguard data receiver 0x05060708 counter 0 payload \"WG_INNER_PACKET\" wait 1ms\n}\n\ncompile {\n    dc_overlays_and_pmtud(spine_vtep, remote_vtep)\n    site_to_site_ipsec_and_wireguard(spine_vtep, remote_vtep)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Replace this strongSwan / wg-quick + Scapy Overlays approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Debug VXLAN, Geneve, WireGuard & IPsec Tunnel MTU Black Holes Offline\":\n\n```text\n# WireGuard dissectors reject packets unless Initiation=148B and Response=92B exact:\nwg_init = IP(dst=peer)/UDP(sport=51820,dport=51820)/Raw(b\"\\x01\\x00\\x00\\x00\" + sender_le + b\"\\x00\"*140)\n# Plus separate Scapy contrib imports for VXLAN, GENEVE, IKEv2, and ESP\n```"},{"role":"assistant","content":"Native `vxlan`, `geneve`, `ikev2`, `esp`, and exact-size `wireguard` builders plus `df` / `icmp destunreach code 4` in one rootless file. Compile with `frameassembly overlay_vpn_mtu.frasm`.\n\n```frameassembly\nhost spine_vtep  { ip 172.16.254.10 mac 00:1c:73:c0:00:10 }\nhost remote_vtep { ip 172.16.254.20 mac 00:1c:73:c0:00:20 }\n\nflow dc_overlays_and_pmtud(local_gw, peer_gw) {\n    // 1. EVPN VXLAN (UDP 4789, VNI 10400) & Cilium/GWLB Geneve (UDP 6081, VNI 20800)\n    local_gw -> peer_gw df vxlan vni 10400 payload \"INNER_TENANT_FRAME\" wait 1ms\n    local_gw -> peer_gw df geneve vni 20800 optclass 0x0104 opttype 1 protocoltype 0x6558 wait 2ms\n\n    // 2. Path MTU Discovery (DF=1 probe -> ICMP Type 3 Code 4 Fragmentation Needed)\n    local_gw -> peer_gw df ipid 9001 udp srcport 54000 dstport 4789 payload \"OVERSIZED_TUNNEL_DF_PROBE\" wait 1ms\n    local_gw <- peer_gw icmp destunreach code 4 wait 3ms\n}\n\nflow site_to_site_ipsec_and_wireguard(local_gw, peer_gw) {\n    // 3. IKEv2 SA_INIT (UDP 500) -> NAT-T float (UDP 4500 AUTH) + IPsec ESP (Proto 50)\n    local_gw -> peer_gw ikev2 sainit initiatorspi 0xa1b2c3d4e5f60102 responderspi 0 msgid 0 flags 0x08 nextpayload 33 wait 2ms\n    local_gw <- peer_gw ikev2 sainit initiatorspi 0xa1b2c3d4e5f60102 responderspi 0x1122334455667788 msgid 0 flags 0x20 nextpayload 33 wait 2ms\n    local_gw -> peer_gw ikev2 auth srcport 4500 dstport 4500 initiatorspi 0xa1b2c3d4e5f60102 responderspi 0x1122334455667788 msgid 1 flags 0x08 nextpayload 46 wait 2ms\n    local_gw <- peer_gw ikev2 auth srcport 4500 dstport 4500 initiatorspi 0xa1b2c3d4e5f60102 responderspi 0x1122334455667788 msgid 1 flags 0x20 nextpayload 46 wait 2ms\n    local_gw -> peer_gw esp spi 0xc0ffee01 seq 1 iv \"0011223344556677\" icv \"8899aabbccddeeff00112233\" wait 2ms\n\n    // 4. WireGuard 1-RTT handshake (148B Initiation -> 92B Response) + AEAD Data\n    local_gw -> peer_gw wireguard initiation sender 0x01020304 wait 1ms\n    local_gw <- peer_gw wireguard response sender 0x05060708 receiver 0x01020304 wait 1ms\n    local_gw -> peer_gw wireguard data receiver 0x05060708 counter 0 payload \"WG_INNER_PACKET\" wait 1ms\n}\n\ncompile {\n    dc_overlays_and_pmtud(spine_vtep, remote_vtep)\n    site_to_site_ipsec_and_wireguard(spine_vtep, remote_vtep)\n}\n```"}]}
{"id":"sft-usecase-mig-voip-sip-rtp-qos-pcap","task_type":"tool_migration","protocols":["vlan","sip","rtp","stun"],"version":"3.3.0","license":"MIT","prompt":"Replace this SIPp XML Scenarios + Raw STUN XOR Math approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Diagnose One-Way VoIP Audio, SIP ALGs & WAN DSCP Stripping\":\n\n```text\n<!-- SIPp requires multi-file XML scenarios + manual Content-Length + live UDP sockets -->\n<send retrans=\"500\"><![CDATA[\n  INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n  Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]\n]]></send>\n```","completion":"Computes STUN `0x2112A442` XOR-mapped NAT addresses, RFC 3261 `z9hG4bK` SIP headers + `Content-Length`, and `vlan 110 pcp 5 dscp 46` RTP in 10 lines. Compile with `frameassembly voip_sip_rtp_qos.frasm`.\n\n```frameassembly\nhost desk_phone { ip 10.110.20.45  mac 00:04:f2:aa:20:45 }\nhost cloud_sbc  { ip 198.51.100.60 mac 00:1c:73:60:00:01 }\n\nflow nat_stun_discovery(phone, sbc) {\n    // 1. RFC 5389 STUN NAT discovery returning XOR-masked public IP 203.0.113.45\n    phone -> sbc vlan 110 stun bindingrequest txid 0x20459001 software \"PolyEdge-B\" wait 2ms\n    phone <- sbc vlan 110 stun bindingresponse txid 0x20459001 xormappedaddr 203.0.113.45 wait 3ms\n}\n\nflow sip_call_and_ef_rtp(phone, sbc) {\n    // 2. SIP call setup (CS3 dscp 24) with SDP offer sharing callid \"voip-call-901\"\n    phone -> sbc vlan 110 pcp 3 dscp 24 sip invite uri \"sip:18005550199@sbc.example.net\" from \"sip:2045@corp.example.net\" to \"sip:18005550199@sbc.example.net\" callid \"voip-call-901\" cseq 1 contenttype \"application/sdp\" body \"v=0\\r\\no=- 1 1 IN IP4 203.0.113.45\\r\\ns=-\\r\\nc=IN IP4 203.0.113.45\\r\\nt=0 0\\r\\nm=audio 16400 RTP/AVP 0\\r\\n\" wait 2ms\n    phone <- sbc vlan 110 pcp 3 dscp 24 sip status 180 reason \"Ringing\" callid \"voip-call-901\" cseq 1 wait 20ms\n    phone <- sbc vlan 110 pcp 3 dscp 24 sip status 200 reason \"OK\" callid \"voip-call-901\" cseq 1 wait 2ms\n    phone -> sbc vlan 110 pcp 3 dscp 24 sip ack uri \"sip:18005550199@sbc.example.net\" callid \"voip-call-901\" cseq 1 wait 5ms\n\n    // 3. Bidirectional G.711 PCMU RTP audio stamped with 802.1p PCP 5 + DSCP 46 (EF)\n    phone -> sbc vlan 110 pcp 5 dscp 46 srcport 16400 dstport 16400 rtp pt 0 seq 100 timestamp 160 ssrc 0x11223344 marker 1 payload \"G711_TX_AUDIO\" wait 20ms\n    phone <- sbc vlan 110 pcp 5 dscp 46 rtp pt 0 seq 500 timestamp 160 ssrc 0x99887766 marker 1 payload \"G711_RX_AUDIO\" wait 20ms\n\n    // 4. Clean call hangup (BYE -> 200 OK)\n    phone -> sbc vlan 110 pcp 3 dscp 24 sip bye uri \"sip:18005550199@sbc.example.net\" callid \"voip-call-901\" cseq 2 wait 2ms\n    phone <- sbc vlan 110 pcp 3 dscp 24 sip status 200 reason \"OK\" callid \"voip-call-901\" cseq 2 wait 1ms\n}\n\ncompile {\n    nat_stun_discovery(desk_phone, cloud_sbc)\n    sip_call_and_ef_rtp(desk_phone, cloud_sbc)\n}\n```","frasm_code":"host desk_phone { ip 10.110.20.45  mac 00:04:f2:aa:20:45 }\nhost cloud_sbc  { ip 198.51.100.60 mac 00:1c:73:60:00:01 }\n\nflow nat_stun_discovery(phone, sbc) {\n    // 1. RFC 5389 STUN NAT discovery returning XOR-masked public IP 203.0.113.45\n    phone -> sbc vlan 110 stun bindingrequest txid 0x20459001 software \"PolyEdge-B\" wait 2ms\n    phone <- sbc vlan 110 stun bindingresponse txid 0x20459001 xormappedaddr 203.0.113.45 wait 3ms\n}\n\nflow sip_call_and_ef_rtp(phone, sbc) {\n    // 2. SIP call setup (CS3 dscp 24) with SDP offer sharing callid \"voip-call-901\"\n    phone -> sbc vlan 110 pcp 3 dscp 24 sip invite uri \"sip:18005550199@sbc.example.net\" from \"sip:2045@corp.example.net\" to \"sip:18005550199@sbc.example.net\" callid \"voip-call-901\" cseq 1 contenttype \"application/sdp\" body \"v=0\\r\\no=- 1 1 IN IP4 203.0.113.45\\r\\ns=-\\r\\nc=IN IP4 203.0.113.45\\r\\nt=0 0\\r\\nm=audio 16400 RTP/AVP 0\\r\\n\" wait 2ms\n    phone <- sbc vlan 110 pcp 3 dscp 24 sip status 180 reason \"Ringing\" callid \"voip-call-901\" cseq 1 wait 20ms\n    phone <- sbc vlan 110 pcp 3 dscp 24 sip status 200 reason \"OK\" callid \"voip-call-901\" cseq 1 wait 2ms\n    phone -> sbc vlan 110 pcp 3 dscp 24 sip ack uri \"sip:18005550199@sbc.example.net\" callid \"voip-call-901\" cseq 1 wait 5ms\n\n    // 3. Bidirectional G.711 PCMU RTP audio stamped with 802.1p PCP 5 + DSCP 46 (EF)\n    phone -> sbc vlan 110 pcp 5 dscp 46 srcport 16400 dstport 16400 rtp pt 0 seq 100 timestamp 160 ssrc 0x11223344 marker 1 payload \"G711_TX_AUDIO\" wait 20ms\n    phone <- sbc vlan 110 pcp 5 dscp 46 rtp pt 0 seq 500 timestamp 160 ssrc 0x99887766 marker 1 payload \"G711_RX_AUDIO\" wait 20ms\n\n    // 4. Clean call hangup (BYE -> 200 OK)\n    phone -> sbc vlan 110 pcp 3 dscp 24 sip bye uri \"sip:18005550199@sbc.example.net\" callid \"voip-call-901\" cseq 2 wait 2ms\n    phone <- sbc vlan 110 pcp 3 dscp 24 sip status 200 reason \"OK\" callid \"voip-call-901\" cseq 2 wait 1ms\n}\n\ncompile {\n    nat_stun_discovery(desk_phone, cloud_sbc)\n    sip_call_and_ef_rtp(desk_phone, cloud_sbc)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Replace this SIPp XML Scenarios + Raw STUN XOR Math approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Diagnose One-Way VoIP Audio, SIP ALGs & WAN DSCP Stripping\":\n\n```text\n<!-- SIPp requires multi-file XML scenarios + manual Content-Length + live UDP sockets -->\n<send retrans=\"500\"><![CDATA[\n  INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n  Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]\n]]></send>\n```"},{"role":"assistant","content":"Computes STUN `0x2112A442` XOR-mapped NAT addresses, RFC 3261 `z9hG4bK` SIP headers + `Content-Length`, and `vlan 110 pcp 5 dscp 46` RTP in 10 lines. Compile with `frameassembly voip_sip_rtp_qos.frasm`.\n\n```frameassembly\nhost desk_phone { ip 10.110.20.45  mac 00:04:f2:aa:20:45 }\nhost cloud_sbc  { ip 198.51.100.60 mac 00:1c:73:60:00:01 }\n\nflow nat_stun_discovery(phone, sbc) {\n    // 1. RFC 5389 STUN NAT discovery returning XOR-masked public IP 203.0.113.45\n    phone -> sbc vlan 110 stun bindingrequest txid 0x20459001 software \"PolyEdge-B\" wait 2ms\n    phone <- sbc vlan 110 stun bindingresponse txid 0x20459001 xormappedaddr 203.0.113.45 wait 3ms\n}\n\nflow sip_call_and_ef_rtp(phone, sbc) {\n    // 2. SIP call setup (CS3 dscp 24) with SDP offer sharing callid \"voip-call-901\"\n    phone -> sbc vlan 110 pcp 3 dscp 24 sip invite uri \"sip:18005550199@sbc.example.net\" from \"sip:2045@corp.example.net\" to \"sip:18005550199@sbc.example.net\" callid \"voip-call-901\" cseq 1 contenttype \"application/sdp\" body \"v=0\\r\\no=- 1 1 IN IP4 203.0.113.45\\r\\ns=-\\r\\nc=IN IP4 203.0.113.45\\r\\nt=0 0\\r\\nm=audio 16400 RTP/AVP 0\\r\\n\" wait 2ms\n    phone <- sbc vlan 110 pcp 3 dscp 24 sip status 180 reason \"Ringing\" callid \"voip-call-901\" cseq 1 wait 20ms\n    phone <- sbc vlan 110 pcp 3 dscp 24 sip status 200 reason \"OK\" callid \"voip-call-901\" cseq 1 wait 2ms\n    phone -> sbc vlan 110 pcp 3 dscp 24 sip ack uri \"sip:18005550199@sbc.example.net\" callid \"voip-call-901\" cseq 1 wait 5ms\n\n    // 3. Bidirectional G.711 PCMU RTP audio stamped with 802.1p PCP 5 + DSCP 46 (EF)\n    phone -> sbc vlan 110 pcp 5 dscp 46 srcport 16400 dstport 16400 rtp pt 0 seq 100 timestamp 160 ssrc 0x11223344 marker 1 payload \"G711_TX_AUDIO\" wait 20ms\n    phone <- sbc vlan 110 pcp 5 dscp 46 rtp pt 0 seq 500 timestamp 160 ssrc 0x99887766 marker 1 payload \"G711_RX_AUDIO\" wait 20ms\n\n    // 4. Clean call hangup (BYE -> 200 OK)\n    phone -> sbc vlan 110 pcp 3 dscp 24 sip bye uri \"sip:18005550199@sbc.example.net\" callid \"voip-call-901\" cseq 2 wait 2ms\n    phone <- sbc vlan 110 pcp 3 dscp 24 sip status 200 reason \"OK\" callid \"voip-call-901\" cseq 2 wait 1ms\n}\n\ncompile {\n    nat_stun_discovery(desk_phone, cloud_sbc)\n    sip_call_and_ef_rtp(desk_phone, cloud_sbc)\n}\n```"}]}
{"id":"sft-usecase-mig-ipv6-ndp-dhcpv6-dual-stack-pcap","task_type":"tool_migration","protocols":["vlan","ndp","tcp","dns","dhcp","http2"],"version":"3.3.0","license":"MIT","prompt":"Replace this Scapy IP() vs IPv6() Duplicate Scripts approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Verify IPv6 First-Hop Security (RA Guard, NDP, DHCPv6) & Dual-Stack\":\n\n```text\n# Scapy requires completely separate layer classes for IPv4 vs IPv6:\nra = Ether()/Dot1Q(vlan=60)/IPv6(hlim=255)/ICMPv6ND_RA(routerlifetime=1800)/ICMPv6NDOptSrcLLAddr(lladdr=mac)\n# Cannot pass an IPv4 host pair and an IPv6 host pair into the same L4/L7 flow function!\n```","completion":"One parameterized `flow dual_stack_http2(c, s)` compiles cleanly over both IPv4 and IPv6 host pairs with automatic 40-byte IPv6 pseudo-header checksums. Compile with `frameassembly ipv6_ndp_dualstack.frasm`.\n\n```frameassembly\nhost client_v4 { ip 10.60.1.25       mac 00:1b:21:60:00:25 }\nhost gw_v4     { ip 10.60.1.1        mac 00:1c:73:60:00:01 }\nhost client_v6 { ip 2001:db8:60::25  mac 00:1b:21:60:00:25 }\nhost gw_v6     { ip 2001:db8:60::1   mac 00:1c:73:60:00:01 }\n\nflow ipv6_first_hop_onboarding(host6, rtr6) {\n    // 1. RFC 4861 Neighbor Discovery (Hop Limit 255 + SLLA / TLLA options)\n    host6 -> rtr6 vlan 60 ndp routersolicit slla 00:1b:21:60:00:25 wait 2ms\n    host6 <- rtr6 vlan 60 ndp routeradvert routerlifetime 1800 slla 00:1c:73:60:00:01 wait 3ms\n    host6 -> rtr6 vlan 60 ndp neighborsolicit target 2001:db8:60::1 slla 00:1b:21:60:00:25 wait 1ms\n    host6 <- rtr6 vlan 60 ndp neighboradvert target 2001:db8:60::1 tlla 00:1c:73:60:00:01 wait 2ms\n\n    // 2. RFC 8415 Stateful DHCPv6 SARR on UDP 546 <-> 547 with IPv6 ECMP flowlabel\n    host6 -> rtr6 vlan 60 flowlabel 0x60200 dhcp solicit xid 0x006025 dnsserver 2001:db8:60::53 wait 2ms\n    host6 <- rtr6 vlan 60 flowlabel 0x60200 dhcp advertise xid 0x006025 dnsserver 2001:db8:60::53 wait 1ms\n    host6 -> rtr6 vlan 60 flowlabel 0x60200 dhcp request xid 0x006025 wait 1ms\n    host6 <- rtr6 vlan 60 flowlabel 0x60200 dhcp reply xid 0x006025 dnsserver 2001:db8:60::53 wait 4ms\n}\n\nflow dual_stack_http2(c, s) {\n    // 3. Reusable flow: automatically emits IPv4 or IPv6 + pseudo-header checksums\n    c -> s vlan 60 dscp 26 dns query txid 0x6001 qname \"api.dualstack.internal\" qtype \"AAAA\" wait 2ms\n    c -> s vlan 60 dscp 26 tcp syn srcport 52443 dstport 443 win 65535 mss 1440 wait 1ms\n    c <- s vlan 60 dscp 26 tcp syn ack win 65535 mss 1440 wait 1ms\n    c -> s vlan 60 dscp 26 tcp ack wait 1ms\n    c -> s vlan 60 dscp 26 http2 settings wait 2ms\n}\n\ncompile {\n    ipv6_first_hop_onboarding(client_v6, gw_v6)\n    dual_stack_http2(client_v4, gw_v4)\n    dual_stack_http2(client_v6, gw_v6)\n}\n```","frasm_code":"host client_v4 { ip 10.60.1.25       mac 00:1b:21:60:00:25 }\nhost gw_v4     { ip 10.60.1.1        mac 00:1c:73:60:00:01 }\nhost client_v6 { ip 2001:db8:60::25  mac 00:1b:21:60:00:25 }\nhost gw_v6     { ip 2001:db8:60::1   mac 00:1c:73:60:00:01 }\n\nflow ipv6_first_hop_onboarding(host6, rtr6) {\n    // 1. RFC 4861 Neighbor Discovery (Hop Limit 255 + SLLA / TLLA options)\n    host6 -> rtr6 vlan 60 ndp routersolicit slla 00:1b:21:60:00:25 wait 2ms\n    host6 <- rtr6 vlan 60 ndp routeradvert routerlifetime 1800 slla 00:1c:73:60:00:01 wait 3ms\n    host6 -> rtr6 vlan 60 ndp neighborsolicit target 2001:db8:60::1 slla 00:1b:21:60:00:25 wait 1ms\n    host6 <- rtr6 vlan 60 ndp neighboradvert target 2001:db8:60::1 tlla 00:1c:73:60:00:01 wait 2ms\n\n    // 2. RFC 8415 Stateful DHCPv6 SARR on UDP 546 <-> 547 with IPv6 ECMP flowlabel\n    host6 -> rtr6 vlan 60 flowlabel 0x60200 dhcp solicit xid 0x006025 dnsserver 2001:db8:60::53 wait 2ms\n    host6 <- rtr6 vlan 60 flowlabel 0x60200 dhcp advertise xid 0x006025 dnsserver 2001:db8:60::53 wait 1ms\n    host6 -> rtr6 vlan 60 flowlabel 0x60200 dhcp request xid 0x006025 wait 1ms\n    host6 <- rtr6 vlan 60 flowlabel 0x60200 dhcp reply xid 0x006025 dnsserver 2001:db8:60::53 wait 4ms\n}\n\nflow dual_stack_http2(c, s) {\n    // 3. Reusable flow: automatically emits IPv4 or IPv6 + pseudo-header checksums\n    c -> s vlan 60 dscp 26 dns query txid 0x6001 qname \"api.dualstack.internal\" qtype \"AAAA\" wait 2ms\n    c -> s vlan 60 dscp 26 tcp syn srcport 52443 dstport 443 win 65535 mss 1440 wait 1ms\n    c <- s vlan 60 dscp 26 tcp syn ack win 65535 mss 1440 wait 1ms\n    c -> s vlan 60 dscp 26 tcp ack wait 1ms\n    c -> s vlan 60 dscp 26 http2 settings wait 2ms\n}\n\ncompile {\n    ipv6_first_hop_onboarding(client_v6, gw_v6)\n    dual_stack_http2(client_v4, gw_v4)\n    dual_stack_http2(client_v6, gw_v6)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Replace this Scapy IP() vs IPv6() Duplicate Scripts approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Verify IPv6 First-Hop Security (RA Guard, NDP, DHCPv6) & Dual-Stack\":\n\n```text\n# Scapy requires completely separate layer classes for IPv4 vs IPv6:\nra = Ether()/Dot1Q(vlan=60)/IPv6(hlim=255)/ICMPv6ND_RA(routerlifetime=1800)/ICMPv6NDOptSrcLLAddr(lladdr=mac)\n# Cannot pass an IPv4 host pair and an IPv6 host pair into the same L4/L7 flow function!\n```"},{"role":"assistant","content":"One parameterized `flow dual_stack_http2(c, s)` compiles cleanly over both IPv4 and IPv6 host pairs with automatic 40-byte IPv6 pseudo-header checksums. Compile with `frameassembly ipv6_ndp_dualstack.frasm`.\n\n```frameassembly\nhost client_v4 { ip 10.60.1.25       mac 00:1b:21:60:00:25 }\nhost gw_v4     { ip 10.60.1.1        mac 00:1c:73:60:00:01 }\nhost client_v6 { ip 2001:db8:60::25  mac 00:1b:21:60:00:25 }\nhost gw_v6     { ip 2001:db8:60::1   mac 00:1c:73:60:00:01 }\n\nflow ipv6_first_hop_onboarding(host6, rtr6) {\n    // 1. RFC 4861 Neighbor Discovery (Hop Limit 255 + SLLA / TLLA options)\n    host6 -> rtr6 vlan 60 ndp routersolicit slla 00:1b:21:60:00:25 wait 2ms\n    host6 <- rtr6 vlan 60 ndp routeradvert routerlifetime 1800 slla 00:1c:73:60:00:01 wait 3ms\n    host6 -> rtr6 vlan 60 ndp neighborsolicit target 2001:db8:60::1 slla 00:1b:21:60:00:25 wait 1ms\n    host6 <- rtr6 vlan 60 ndp neighboradvert target 2001:db8:60::1 tlla 00:1c:73:60:00:01 wait 2ms\n\n    // 2. RFC 8415 Stateful DHCPv6 SARR on UDP 546 <-> 547 with IPv6 ECMP flowlabel\n    host6 -> rtr6 vlan 60 flowlabel 0x60200 dhcp solicit xid 0x006025 dnsserver 2001:db8:60::53 wait 2ms\n    host6 <- rtr6 vlan 60 flowlabel 0x60200 dhcp advertise xid 0x006025 dnsserver 2001:db8:60::53 wait 1ms\n    host6 -> rtr6 vlan 60 flowlabel 0x60200 dhcp request xid 0x006025 wait 1ms\n    host6 <- rtr6 vlan 60 flowlabel 0x60200 dhcp reply xid 0x006025 dnsserver 2001:db8:60::53 wait 4ms\n}\n\nflow dual_stack_http2(c, s) {\n    // 3. Reusable flow: automatically emits IPv4 or IPv6 + pseudo-header checksums\n    c -> s vlan 60 dscp 26 dns query txid 0x6001 qname \"api.dualstack.internal\" qtype \"AAAA\" wait 2ms\n    c -> s vlan 60 dscp 26 tcp syn srcport 52443 dstport 443 win 65535 mss 1440 wait 1ms\n    c <- s vlan 60 dscp 26 tcp syn ack win 65535 mss 1440 wait 1ms\n    c -> s vlan 60 dscp 26 tcp ack wait 1ms\n    c -> s vlan 60 dscp 26 http2 settings wait 2ms\n}\n\ncompile {\n    ipv6_first_hop_onboarding(client_v6, gw_v6)\n    dual_stack_http2(client_v4, gw_v4)\n    dual_stack_http2(client_v6, gw_v6)\n}\n```"}]}
{"id":"sft-usecase-mig-dhcp-dns-radius-nac-pcap","task_type":"tool_migration","protocols":["vlan","eapol","dns","dhcp","ntp","radius"],"version":"3.3.0","license":"MIT","prompt":"Replace this wpa_supplicant + radclient + dhcping approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Reproduce Full 802.1X NAC, RADIUS, DHCP DORA & DNS Onboarding\":\n\n```text\n# Scapy BOOTP + DHCP DORA requires manual 16-byte chaddr padding + (\"end\") sentinel:\ndisc = (Ether(dst=\"ff:ff:ff:ff:ff:ff\")/IP(src=\"0.0.0.0\",dst=\"255.255.255.255\")/UDP(sport=68,dport=67)\n        /BOOTP(chaddr=mac2str(mac),xid=0x30014200)/DHCP(options=[(\"message-type\",\"discover\"),\"end\"]))\n```","completion":"Models the entire `0.0.0.0 -> 10.30.0.142` onboarding journey—PAE multicast EAPOL, RADIUS, DHCPv4 DORA (`68 <-> 67` swap), DNS, and NTP—in 12 lines. Compile with `frameassembly campus_nac_dora.frasm`.\n\n```frameassembly\nhost boot_pc     { ip 0.0.0.0     mac 00:1b:21:30:01:42 }\nhost leased_pc   { ip 10.30.0.142 mac 00:1b:21:30:01:42 }\nhost access_sw   { ip 10.30.0.2   mac 00:1c:73:30:00:02 }\nhost ddi_aaa_srv { ip 10.30.0.10  mac 00:50:56:30:00:10 }\n\nflow dot1x_and_radius_auth(supplicant, sw, aaa) {\n    // 1. IEEE 802.1X EAPOL Start + EAP Identity Response on PAE group MAC\n    supplicant -> sw eapol start version 2 wait 2ms\n    supplicant -> sw eapol eappacket version 2 eapcode 2 eapid 1 eapmethod 1 identity \"corp\\\\jdoe\" wait 3ms\n\n    // 2. Switch relays credentials to RADIUS server (UDP 1812)\n    sw -> aaa vlan 30 radius accessrequest id 77 user \"corp\\\\jdoe\" nasip 10.30.0.2 wait 4ms\n    sw <- aaa vlan 30 radius accessaccept id 77 wait 2ms\n}\n\nflow dhcp_dora_dns_and_ntp(unconf_pc, ready_pc, infra) {\n    // 3. Full 4-packet DHCPv4 DORA lease negotiation (UDP 68 <-> 67)\n    unconf_pc -> infra vlan 30 dhcp discover xid 0x30014200 chaddr 00:1b:21:30:01:42 hostname \"branch-lt-42\" wait 2ms\n    unconf_pc <- infra vlan 30 dhcp offer xid 0x30014200 yiaddr 10.30.0.142 siaddr 10.30.0.10 chaddr 00:1b:21:30:01:42 subnetmask 255.255.255.0 router 10.30.0.1 dnsserver 10.30.0.10 leasetime 28800 wait 2ms\n    unconf_pc -> infra vlan 30 dhcp request xid 0x30014200 chaddr 00:1b:21:30:01:42 hostname \"branch-lt-42\" wait 1ms\n    unconf_pc <- infra vlan 30 dhcp ack xid 0x30014200 yiaddr 10.30.0.142 siaddr 10.30.0.10 chaddr 00:1b:21:30:01:42 subnetmask 255.255.255.0 router 10.30.0.1 dnsserver 10.30.0.10 leasetime 28800 wait 5ms\n\n    // 4. Post-lease split-horizon DNS lookup + Stratum-1 NTP clock sync\n    ready_pc -> infra vlan 30 dns query txid 0x8801 qname \"intranet.corp.example\" qtype \"A\" wait 2ms\n    ready_pc <- infra vlan 30 dns response txid 0x8801 qname \"intranet.corp.example\" qtype \"A\" rdata \"10.30.20.80\" wait 3ms\n    ready_pc -> infra vlan 30 ntp vn 4 mode 3 poll 6 wait 2ms\n    ready_pc <- infra vlan 30 ntp li 0 vn 4 mode 4 stratum 1 poll 6 refid \"GPS\" wait 1ms\n}\n\ncompile {\n    dot1x_and_radius_auth(boot_pc, access_sw, ddi_aaa_srv)\n    dhcp_dora_dns_and_ntp(boot_pc, leased_pc, ddi_aaa_srv)\n}\n```","frasm_code":"host boot_pc     { ip 0.0.0.0     mac 00:1b:21:30:01:42 }\nhost leased_pc   { ip 10.30.0.142 mac 00:1b:21:30:01:42 }\nhost access_sw   { ip 10.30.0.2   mac 00:1c:73:30:00:02 }\nhost ddi_aaa_srv { ip 10.30.0.10  mac 00:50:56:30:00:10 }\n\nflow dot1x_and_radius_auth(supplicant, sw, aaa) {\n    // 1. IEEE 802.1X EAPOL Start + EAP Identity Response on PAE group MAC\n    supplicant -> sw eapol start version 2 wait 2ms\n    supplicant -> sw eapol eappacket version 2 eapcode 2 eapid 1 eapmethod 1 identity \"corp\\\\jdoe\" wait 3ms\n\n    // 2. Switch relays credentials to RADIUS server (UDP 1812)\n    sw -> aaa vlan 30 radius accessrequest id 77 user \"corp\\\\jdoe\" nasip 10.30.0.2 wait 4ms\n    sw <- aaa vlan 30 radius accessaccept id 77 wait 2ms\n}\n\nflow dhcp_dora_dns_and_ntp(unconf_pc, ready_pc, infra) {\n    // 3. Full 4-packet DHCPv4 DORA lease negotiation (UDP 68 <-> 67)\n    unconf_pc -> infra vlan 30 dhcp discover xid 0x30014200 chaddr 00:1b:21:30:01:42 hostname \"branch-lt-42\" wait 2ms\n    unconf_pc <- infra vlan 30 dhcp offer xid 0x30014200 yiaddr 10.30.0.142 siaddr 10.30.0.10 chaddr 00:1b:21:30:01:42 subnetmask 255.255.255.0 router 10.30.0.1 dnsserver 10.30.0.10 leasetime 28800 wait 2ms\n    unconf_pc -> infra vlan 30 dhcp request xid 0x30014200 chaddr 00:1b:21:30:01:42 hostname \"branch-lt-42\" wait 1ms\n    unconf_pc <- infra vlan 30 dhcp ack xid 0x30014200 yiaddr 10.30.0.142 siaddr 10.30.0.10 chaddr 00:1b:21:30:01:42 subnetmask 255.255.255.0 router 10.30.0.1 dnsserver 10.30.0.10 leasetime 28800 wait 5ms\n\n    // 4. Post-lease split-horizon DNS lookup + Stratum-1 NTP clock sync\n    ready_pc -> infra vlan 30 dns query txid 0x8801 qname \"intranet.corp.example\" qtype \"A\" wait 2ms\n    ready_pc <- infra vlan 30 dns response txid 0x8801 qname \"intranet.corp.example\" qtype \"A\" rdata \"10.30.20.80\" wait 3ms\n    ready_pc -> infra vlan 30 ntp vn 4 mode 3 poll 6 wait 2ms\n    ready_pc <- infra vlan 30 ntp li 0 vn 4 mode 4 stratum 1 poll 6 refid \"GPS\" wait 1ms\n}\n\ncompile {\n    dot1x_and_radius_auth(boot_pc, access_sw, ddi_aaa_srv)\n    dhcp_dora_dns_and_ntp(boot_pc, leased_pc, ddi_aaa_srv)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Replace this wpa_supplicant + radclient + dhcping approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Reproduce Full 802.1X NAC, RADIUS, DHCP DORA & DNS Onboarding\":\n\n```text\n# Scapy BOOTP + DHCP DORA requires manual 16-byte chaddr padding + (\"end\") sentinel:\ndisc = (Ether(dst=\"ff:ff:ff:ff:ff:ff\")/IP(src=\"0.0.0.0\",dst=\"255.255.255.255\")/UDP(sport=68,dport=67)\n        /BOOTP(chaddr=mac2str(mac),xid=0x30014200)/DHCP(options=[(\"message-type\",\"discover\"),\"end\"]))\n```"},{"role":"assistant","content":"Models the entire `0.0.0.0 -> 10.30.0.142` onboarding journey—PAE multicast EAPOL, RADIUS, DHCPv4 DORA (`68 <-> 67` swap), DNS, and NTP—in 12 lines. Compile with `frameassembly campus_nac_dora.frasm`.\n\n```frameassembly\nhost boot_pc     { ip 0.0.0.0     mac 00:1b:21:30:01:42 }\nhost leased_pc   { ip 10.30.0.142 mac 00:1b:21:30:01:42 }\nhost access_sw   { ip 10.30.0.2   mac 00:1c:73:30:00:02 }\nhost ddi_aaa_srv { ip 10.30.0.10  mac 00:50:56:30:00:10 }\n\nflow dot1x_and_radius_auth(supplicant, sw, aaa) {\n    // 1. IEEE 802.1X EAPOL Start + EAP Identity Response on PAE group MAC\n    supplicant -> sw eapol start version 2 wait 2ms\n    supplicant -> sw eapol eappacket version 2 eapcode 2 eapid 1 eapmethod 1 identity \"corp\\\\jdoe\" wait 3ms\n\n    // 2. Switch relays credentials to RADIUS server (UDP 1812)\n    sw -> aaa vlan 30 radius accessrequest id 77 user \"corp\\\\jdoe\" nasip 10.30.0.2 wait 4ms\n    sw <- aaa vlan 30 radius accessaccept id 77 wait 2ms\n}\n\nflow dhcp_dora_dns_and_ntp(unconf_pc, ready_pc, infra) {\n    // 3. Full 4-packet DHCPv4 DORA lease negotiation (UDP 68 <-> 67)\n    unconf_pc -> infra vlan 30 dhcp discover xid 0x30014200 chaddr 00:1b:21:30:01:42 hostname \"branch-lt-42\" wait 2ms\n    unconf_pc <- infra vlan 30 dhcp offer xid 0x30014200 yiaddr 10.30.0.142 siaddr 10.30.0.10 chaddr 00:1b:21:30:01:42 subnetmask 255.255.255.0 router 10.30.0.1 dnsserver 10.30.0.10 leasetime 28800 wait 2ms\n    unconf_pc -> infra vlan 30 dhcp request xid 0x30014200 chaddr 00:1b:21:30:01:42 hostname \"branch-lt-42\" wait 1ms\n    unconf_pc <- infra vlan 30 dhcp ack xid 0x30014200 yiaddr 10.30.0.142 siaddr 10.30.0.10 chaddr 00:1b:21:30:01:42 subnetmask 255.255.255.0 router 10.30.0.1 dnsserver 10.30.0.10 leasetime 28800 wait 5ms\n\n    // 4. Post-lease split-horizon DNS lookup + Stratum-1 NTP clock sync\n    ready_pc -> infra vlan 30 dns query txid 0x8801 qname \"intranet.corp.example\" qtype \"A\" wait 2ms\n    ready_pc <- infra vlan 30 dns response txid 0x8801 qname \"intranet.corp.example\" qtype \"A\" rdata \"10.30.20.80\" wait 3ms\n    ready_pc -> infra vlan 30 ntp vn 4 mode 3 poll 6 wait 2ms\n    ready_pc <- infra vlan 30 ntp li 0 vn 4 mode 4 stratum 1 poll 6 refid \"GPS\" wait 1ms\n}\n\ncompile {\n    dot1x_and_radius_auth(boot_pc, access_sw, ddi_aaa_srv)\n    dhcp_dora_dns_and_ntp(boot_pc, leased_pc, ddi_aaa_srv)\n}\n```"}]}
{"id":"sft-usecase-mig-cicd-pcap-regression-testing","task_type":"tool_migration","protocols":["tcp","http2","grpc","postgres","mqtt"],"version":"3.3.0","license":"MIT","prompt":"Replace this Docker Compose + tcpdump Binary Fixtures approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Replace Mystery Binary .pcap Fixtures in Git & CI/CD With .frasm\":\n\n```text\n# In Git PRs, binary fixtures cannot be reviewed or edited safely:\n$ git diff tests/fixtures/grpc_postgres.pcap\nBinary files a/tests/fixtures/grpc_postgres.pcap and b/tests/fixtures/grpc_postgres.pcap differ\n```","completion":"100% deterministic, line-by-line reviewable `.frasm` source in Git that compiles to `.pcap` or `.pcapng` in `<1ms` via the rootless CLI or Rust crate. Compile with `frameassembly cicd_parser_suite.frasm`.\n\n```frameassembly\nhost app_gw     { ip 10.90.1.10 }\nhost backend_sv { ip 10.90.2.50 }\n\nflow grpc_mesh_fixture(c, s) {\n    // 1. HTTP/2 + gRPC call succeeding (0) and failing over (14 UNAVAILABLE) on TCP 50051\n    c -> s tcp syn srcport 55051 dstport 50051 win 65535 mss 1460 wait 1ms\n    c <- s tcp syn ack win 65535 mss 1460 wait 1ms\n    c -> s tcp ack wait 1ms\n    c -> s http2 settings wait 1ms\n    c -> s grpc service \"ledger.Payments\" method \"Authorize\" wait 2ms\n    c <- s grpc grpcstatus 0 wait 2ms\n    c -> s grpc service \"ledger.Payments\" method \"Settle\" wait 2ms\n    c <- s grpc grpcstatus 14 wait 3ms\n}\n\nflow postgres_and_mqtt_fixtures(c, s) {\n    // 2. PostgreSQL v3.0 Startup -> AuthOk -> SQL Query -> ErrorResponse on TCP 5432\n    c -> s tcp syn srcport 55432 dstport 5432 win 65535 mss 1460 wait 1ms\n    c <- s tcp syn ack win 65535 mss 1460 wait 1ms\n    c -> s tcp ack wait 1ms\n    c -> s postgres startup user \"ci_runner\" db \"ledger\" wait 1ms\n    c <- s postgres authok wait 1ms\n    c -> s postgres query sql \"SELECT tx_id, amount_cents FROM transfers LIMIT 5;\" wait 2ms\n    c <- s postgres errorresponse wait 3ms\n\n    // 3. OASIS MQTT v3.1.1 Connect -> ConnAck -> QoS 1 Publish -> PubAck on TCP 1883\n    c -> s tcp syn srcport 51883 dstport 1883 win 65535 mss 1460 wait 1ms\n    c <- s tcp syn ack win 65535 mss 1460 wait 1ms\n    c -> s tcp ack wait 1ms\n    c -> s mqtt connect clientid \"ci-sensor-01\" keepalive 30 wait 1ms\n    c <- s mqtt connack returncode 0 wait 1ms\n    c -> s mqtt publish topic \"ci/line1/watts\" qos 1 retain pktid 10 payload \"{\\\"w\\\":412.5}\" wait 1ms\n    c <- s mqtt puback pktid 10 wait 1ms\n}\n\ncompile {\n    grpc_mesh_fixture(app_gw, backend_sv)\n    postgres_and_mqtt_fixtures(app_gw, backend_sv)\n}\n```","frasm_code":"host app_gw     { ip 10.90.1.10 }\nhost backend_sv { ip 10.90.2.50 }\n\nflow grpc_mesh_fixture(c, s) {\n    // 1. HTTP/2 + gRPC call succeeding (0) and failing over (14 UNAVAILABLE) on TCP 50051\n    c -> s tcp syn srcport 55051 dstport 50051 win 65535 mss 1460 wait 1ms\n    c <- s tcp syn ack win 65535 mss 1460 wait 1ms\n    c -> s tcp ack wait 1ms\n    c -> s http2 settings wait 1ms\n    c -> s grpc service \"ledger.Payments\" method \"Authorize\" wait 2ms\n    c <- s grpc grpcstatus 0 wait 2ms\n    c -> s grpc service \"ledger.Payments\" method \"Settle\" wait 2ms\n    c <- s grpc grpcstatus 14 wait 3ms\n}\n\nflow postgres_and_mqtt_fixtures(c, s) {\n    // 2. PostgreSQL v3.0 Startup -> AuthOk -> SQL Query -> ErrorResponse on TCP 5432\n    c -> s tcp syn srcport 55432 dstport 5432 win 65535 mss 1460 wait 1ms\n    c <- s tcp syn ack win 65535 mss 1460 wait 1ms\n    c -> s tcp ack wait 1ms\n    c -> s postgres startup user \"ci_runner\" db \"ledger\" wait 1ms\n    c <- s postgres authok wait 1ms\n    c -> s postgres query sql \"SELECT tx_id, amount_cents FROM transfers LIMIT 5;\" wait 2ms\n    c <- s postgres errorresponse wait 3ms\n\n    // 3. OASIS MQTT v3.1.1 Connect -> ConnAck -> QoS 1 Publish -> PubAck on TCP 1883\n    c -> s tcp syn srcport 51883 dstport 1883 win 65535 mss 1460 wait 1ms\n    c <- s tcp syn ack win 65535 mss 1460 wait 1ms\n    c -> s tcp ack wait 1ms\n    c -> s mqtt connect clientid \"ci-sensor-01\" keepalive 30 wait 1ms\n    c <- s mqtt connack returncode 0 wait 1ms\n    c -> s mqtt publish topic \"ci/line1/watts\" qos 1 retain pktid 10 payload \"{\\\"w\\\":412.5}\" wait 1ms\n    c <- s mqtt puback pktid 10 wait 1ms\n}\n\ncompile {\n    grpc_mesh_fixture(app_gw, backend_sv)\n    postgres_and_mqtt_fixtures(app_gw, backend_sv)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Replace this Docker Compose + tcpdump Binary Fixtures approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Replace Mystery Binary .pcap Fixtures in Git & CI/CD With .frasm\":\n\n```text\n# In Git PRs, binary fixtures cannot be reviewed or edited safely:\n$ git diff tests/fixtures/grpc_postgres.pcap\nBinary files a/tests/fixtures/grpc_postgres.pcap and b/tests/fixtures/grpc_postgres.pcap differ\n```"},{"role":"assistant","content":"100% deterministic, line-by-line reviewable `.frasm` source in Git that compiles to `.pcap` or `.pcapng` in `<1ms` via the rootless CLI or Rust crate. Compile with `frameassembly cicd_parser_suite.frasm`.\n\n```frameassembly\nhost app_gw     { ip 10.90.1.10 }\nhost backend_sv { ip 10.90.2.50 }\n\nflow grpc_mesh_fixture(c, s) {\n    // 1. HTTP/2 + gRPC call succeeding (0) and failing over (14 UNAVAILABLE) on TCP 50051\n    c -> s tcp syn srcport 55051 dstport 50051 win 65535 mss 1460 wait 1ms\n    c <- s tcp syn ack win 65535 mss 1460 wait 1ms\n    c -> s tcp ack wait 1ms\n    c -> s http2 settings wait 1ms\n    c -> s grpc service \"ledger.Payments\" method \"Authorize\" wait 2ms\n    c <- s grpc grpcstatus 0 wait 2ms\n    c -> s grpc service \"ledger.Payments\" method \"Settle\" wait 2ms\n    c <- s grpc grpcstatus 14 wait 3ms\n}\n\nflow postgres_and_mqtt_fixtures(c, s) {\n    // 2. PostgreSQL v3.0 Startup -> AuthOk -> SQL Query -> ErrorResponse on TCP 5432\n    c -> s tcp syn srcport 55432 dstport 5432 win 65535 mss 1460 wait 1ms\n    c <- s tcp syn ack win 65535 mss 1460 wait 1ms\n    c -> s tcp ack wait 1ms\n    c -> s postgres startup user \"ci_runner\" db \"ledger\" wait 1ms\n    c <- s postgres authok wait 1ms\n    c -> s postgres query sql \"SELECT tx_id, amount_cents FROM transfers LIMIT 5;\" wait 2ms\n    c <- s postgres errorresponse wait 3ms\n\n    // 3. OASIS MQTT v3.1.1 Connect -> ConnAck -> QoS 1 Publish -> PubAck on TCP 1883\n    c -> s tcp syn srcport 51883 dstport 1883 win 65535 mss 1460 wait 1ms\n    c <- s tcp syn ack win 65535 mss 1460 wait 1ms\n    c -> s tcp ack wait 1ms\n    c -> s mqtt connect clientid \"ci-sensor-01\" keepalive 30 wait 1ms\n    c <- s mqtt connack returncode 0 wait 1ms\n    c -> s mqtt publish topic \"ci/line1/watts\" qos 1 retain pktid 10 payload \"{\\\"w\\\":412.5}\" wait 1ms\n    c <- s mqtt puback pktid 10 wait 1ms\n}\n\ncompile {\n    grpc_mesh_fixture(app_gw, backend_sv)\n    postgres_and_mqtt_fixtures(app_gw, backend_sv)\n}\n```"}]}
{"id":"sft-usecase-mig-tcp-retransmission-zero-window-pcap","task_type":"tool_migration","protocols":["tcp"],"version":"3.3.0","license":"MIT","prompt":"Replace this tc netem + Scapy Manual SEQ Math approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Reproduce TCP Retransmissions, Out-of-Order & Zero-Window Stalls\":\n\n```text\n# tc netem requires root + live sockets + produces non-deterministic packet order:\nsudo tc qdisc add dev eth0 root netem loss 10% reorder 25% delay 15ms\n# Cannot deterministically emit a win=0 ZeroWindow followed 25ms later by win=65535!\n```","completion":"Pin exact `seq`, `acknum`, `win 0`, and `wait 25ms` values per line—100% deterministic Wireshark `tcp.analysis.*` triggers with zero root privileges. Compile with `frameassembly tcp_anomalies_stall.frasm`.\n\n```frameassembly\nhost app_client { ip 10.44.1.15 mac 00:1b:21:44:01:15 }\nhost api_server { ip 10.44.2.80 mac 00:1c:73:44:02:80 }\n\nflow tcp_retransmit_and_zerowin(c, s) {\n    // 1. 3-way handshake negotiating MSS 1460, Window Scale 7, and SACK Permitted\n    c -> s tcp syn srcport 54120 dstport 8443 seq 1000 win 64240 mss 1460 wscale 7 sackperm wait 1ms\n    c <- s tcp syn ack seq 5000 acknum 1001 win 65535 mss 1460 wscale 7 sackperm wait 1ms\n    c -> s tcp ack seq 1001 acknum 5001 win 64240 wait 1ms\n\n    // 2. CHUNK_01 (seq 1001..1017), then CHUNK_03 arrives out-of-order at seq 1033\n    c -> s tcp psh ack seq 1001 acknum 5001 win 64240 payload \"CHUNK_01_16BYTES\" wait 2ms\n    c -> s tcp psh ack seq 1033 acknum 5001 win 64240 payload \"CHUNK_03_OUT_ORD\" wait 1ms\n\n    // 3. Server sends 2 Duplicate ACKs for 1017 -> Client fast-retransmits missing CHUNK_02\n    c <- s tcp ack seq 5001 acknum 1017 win 65535 wait 1ms\n    c <- s tcp ack seq 5001 acknum 1017 win 65535 wait 1ms\n    c -> s tcp psh ack seq 1017 acknum 5001 win 64240 payload \"CHUNK_02_RETRANS\" wait 2ms\n\n    // 4. Server buffer fills (ZeroWindow win 0) -> Client 1B probe -> Window Update -> RST\n    c <- s tcp ack seq 5001 acknum 1049 win 0 wait 25ms\n    c -> s tcp ack seq 1049 acknum 5001 win 64240 payload \"Z\" wait 5ms\n    c <- s tcp ack seq 5001 acknum 1050 win 65535 wait 2ms\n    c <- s tcp rst ack seq 5001 acknum 1050 win 0 wait 1ms\n}\n\ncompile {\n    tcp_retransmit_and_zerowin(app_client, api_server)\n}\n```","frasm_code":"host app_client { ip 10.44.1.15 mac 00:1b:21:44:01:15 }\nhost api_server { ip 10.44.2.80 mac 00:1c:73:44:02:80 }\n\nflow tcp_retransmit_and_zerowin(c, s) {\n    // 1. 3-way handshake negotiating MSS 1460, Window Scale 7, and SACK Permitted\n    c -> s tcp syn srcport 54120 dstport 8443 seq 1000 win 64240 mss 1460 wscale 7 sackperm wait 1ms\n    c <- s tcp syn ack seq 5000 acknum 1001 win 65535 mss 1460 wscale 7 sackperm wait 1ms\n    c -> s tcp ack seq 1001 acknum 5001 win 64240 wait 1ms\n\n    // 2. CHUNK_01 (seq 1001..1017), then CHUNK_03 arrives out-of-order at seq 1033\n    c -> s tcp psh ack seq 1001 acknum 5001 win 64240 payload \"CHUNK_01_16BYTES\" wait 2ms\n    c -> s tcp psh ack seq 1033 acknum 5001 win 64240 payload \"CHUNK_03_OUT_ORD\" wait 1ms\n\n    // 3. Server sends 2 Duplicate ACKs for 1017 -> Client fast-retransmits missing CHUNK_02\n    c <- s tcp ack seq 5001 acknum 1017 win 65535 wait 1ms\n    c <- s tcp ack seq 5001 acknum 1017 win 65535 wait 1ms\n    c -> s tcp psh ack seq 1017 acknum 5001 win 64240 payload \"CHUNK_02_RETRANS\" wait 2ms\n\n    // 4. Server buffer fills (ZeroWindow win 0) -> Client 1B probe -> Window Update -> RST\n    c <- s tcp ack seq 5001 acknum 1049 win 0 wait 25ms\n    c -> s tcp ack seq 1049 acknum 5001 win 64240 payload \"Z\" wait 5ms\n    c <- s tcp ack seq 5001 acknum 1050 win 65535 wait 2ms\n    c <- s tcp rst ack seq 5001 acknum 1050 win 0 wait 1ms\n}\n\ncompile {\n    tcp_retransmit_and_zerowin(app_client, api_server)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Replace this tc netem + Scapy Manual SEQ Math approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Reproduce TCP Retransmissions, Out-of-Order & Zero-Window Stalls\":\n\n```text\n# tc netem requires root + live sockets + produces non-deterministic packet order:\nsudo tc qdisc add dev eth0 root netem loss 10% reorder 25% delay 15ms\n# Cannot deterministically emit a win=0 ZeroWindow followed 25ms later by win=65535!\n```"},{"role":"assistant","content":"Pin exact `seq`, `acknum`, `win 0`, and `wait 25ms` values per line—100% deterministic Wireshark `tcp.analysis.*` triggers with zero root privileges. Compile with `frameassembly tcp_anomalies_stall.frasm`.\n\n```frameassembly\nhost app_client { ip 10.44.1.15 mac 00:1b:21:44:01:15 }\nhost api_server { ip 10.44.2.80 mac 00:1c:73:44:02:80 }\n\nflow tcp_retransmit_and_zerowin(c, s) {\n    // 1. 3-way handshake negotiating MSS 1460, Window Scale 7, and SACK Permitted\n    c -> s tcp syn srcport 54120 dstport 8443 seq 1000 win 64240 mss 1460 wscale 7 sackperm wait 1ms\n    c <- s tcp syn ack seq 5000 acknum 1001 win 65535 mss 1460 wscale 7 sackperm wait 1ms\n    c -> s tcp ack seq 1001 acknum 5001 win 64240 wait 1ms\n\n    // 2. CHUNK_01 (seq 1001..1017), then CHUNK_03 arrives out-of-order at seq 1033\n    c -> s tcp psh ack seq 1001 acknum 5001 win 64240 payload \"CHUNK_01_16BYTES\" wait 2ms\n    c -> s tcp psh ack seq 1033 acknum 5001 win 64240 payload \"CHUNK_03_OUT_ORD\" wait 1ms\n\n    // 3. Server sends 2 Duplicate ACKs for 1017 -> Client fast-retransmits missing CHUNK_02\n    c <- s tcp ack seq 5001 acknum 1017 win 65535 wait 1ms\n    c <- s tcp ack seq 5001 acknum 1017 win 65535 wait 1ms\n    c -> s tcp psh ack seq 1017 acknum 5001 win 64240 payload \"CHUNK_02_RETRANS\" wait 2ms\n\n    // 4. Server buffer fills (ZeroWindow win 0) -> Client 1B probe -> Window Update -> RST\n    c <- s tcp ack seq 5001 acknum 1049 win 0 wait 25ms\n    c -> s tcp ack seq 1049 acknum 5001 win 64240 payload \"Z\" wait 5ms\n    c <- s tcp ack seq 5001 acknum 1050 win 65535 wait 2ms\n    c <- s tcp rst ack seq 5001 acknum 1050 win 0 wait 1ms\n}\n\ncompile {\n    tcp_retransmit_and_zerowin(app_client, api_server)\n}\n```"}]}
{"id":"sft-usecase-mig-dns-nxdomain-traceroute-igmp-pcap","task_type":"tool_migration","protocols":["vlan","icmp","igmp","udp","dns"],"version":"3.3.0","license":"MIT","prompt":"Replace this Unbound Fault Injection + Scapy IGMPv3 approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Simulate DNS NXDOMAIN / SERVFAIL, Traceroute TTL Hops & IGMP Snooping\":\n\n```text\nfrom scapy.contrib.igmpv3 import IGMPv3, IGMPv3mr, IGMPv3gr\n# Must manually compute 01:00:5e MAC + IP proto=2, ttl=1 + nested Group Record list:\npkt = Ether(dst=\"01:00:5e:32:01:64\")/Dot1Q(vlan=50)/IP(ttl=1,dst=\"224.0.0.22\")/IGMPv3()/IGMPv3mr(records=[IGMPv3gr(maddr=\"239.50.1.100\")])\n```","completion":"One-line `dns response rcode 3`, `ttl 1` -> `icmp timeexceeded`, and `igmp v3 report group 239.50.1.100` with automatic RFC 1112 multicast MACs. Compile with `frameassembly dns_traceroute_igmp.frasm`.\n\n```frameassembly\nhost branch_client { ip 10.50.10.25  mac 00:1b:21:50:10:25 }\nhost hop1_router   { ip 10.50.10.1   mac 00:1c:73:50:10:01 }\nhost core_dns_vip  { ip 10.50.0.53   mac 00:50:56:50:00:53 }\nhost all_hosts_mc  { ip 224.0.0.1 }\nhost iptv_group_mc { ip 239.50.1.100 }\n\nflow dns_failures_and_traceroute(client, hop1, dns_srv) {\n    // 1. Negative DNS responses: RCODE 3 (NXDOMAIN) & RCODE 2 (SERVFAIL)\n    client -> dns_srv vlan 50 dns query txid 0x9101 qname \"retired-db.corp.example\" qtype \"A\" wait 2ms\n    client <- dns_srv vlan 50 dns response txid 0x9101 qname \"retired-db.corp.example\" qtype \"A\" rcode 3 wait 3ms\n    client -> dns_srv vlan 50 dns query txid 0x9102 qname \"broken-dnssec.partner.example\" qtype \"A\" wait 2ms\n    client <- dns_srv vlan 50 dns response txid 0x9102 qname \"broken-dnssec.partner.example\" qtype \"A\" rcode 2 wait 4ms\n\n    // 2. 2-hop UDP traceroute: TTL=1 expires at hop1 -> TTL=2 reaches core_dns_vip\n    client -> dns_srv vlan 50 ttl 1 udp srcport 53100 dstport 33434 payload \"TRACEROUTE_HOP_1\" wait 2ms\n    hop1 -> client vlan 50 ttl 64 icmp timeexceeded code 0 wait 2ms\n    client -> dns_srv vlan 50 ttl 2 udp srcport 53101 dstport 33435 payload \"TRACEROUTE_HOP_2\" wait 2ms\n    client <- dns_srv vlan 50 ttl 63 icmp destunreach code 3 wait 3ms\n}\n\nflow igmp_snooping_lifecycle(client, rtr, all_mc, group_mc) {\n    // 3. Switch IGMP Snooping: v2 General Query -> v3 Join Report -> v2 Fast Leave\n    rtr -> all_mc vlan 50 ttl 1 igmp v2 query group 0.0.0.0 maxresp 100 wait 3ms\n    client -> group_mc vlan 50 ttl 1 igmp v3 report group 239.50.1.100 wait 10ms\n    client -> group_mc vlan 50 ttl 1 igmp v2 leave group 239.50.1.100 wait 2ms\n}\n\ncompile {\n    dns_failures_and_traceroute(branch_client, hop1_router, core_dns_vip)\n    igmp_snooping_lifecycle(branch_client, hop1_router, all_hosts_mc, iptv_group_mc)\n}\n```","frasm_code":"host branch_client { ip 10.50.10.25  mac 00:1b:21:50:10:25 }\nhost hop1_router   { ip 10.50.10.1   mac 00:1c:73:50:10:01 }\nhost core_dns_vip  { ip 10.50.0.53   mac 00:50:56:50:00:53 }\nhost all_hosts_mc  { ip 224.0.0.1 }\nhost iptv_group_mc { ip 239.50.1.100 }\n\nflow dns_failures_and_traceroute(client, hop1, dns_srv) {\n    // 1. Negative DNS responses: RCODE 3 (NXDOMAIN) & RCODE 2 (SERVFAIL)\n    client -> dns_srv vlan 50 dns query txid 0x9101 qname \"retired-db.corp.example\" qtype \"A\" wait 2ms\n    client <- dns_srv vlan 50 dns response txid 0x9101 qname \"retired-db.corp.example\" qtype \"A\" rcode 3 wait 3ms\n    client -> dns_srv vlan 50 dns query txid 0x9102 qname \"broken-dnssec.partner.example\" qtype \"A\" wait 2ms\n    client <- dns_srv vlan 50 dns response txid 0x9102 qname \"broken-dnssec.partner.example\" qtype \"A\" rcode 2 wait 4ms\n\n    // 2. 2-hop UDP traceroute: TTL=1 expires at hop1 -> TTL=2 reaches core_dns_vip\n    client -> dns_srv vlan 50 ttl 1 udp srcport 53100 dstport 33434 payload \"TRACEROUTE_HOP_1\" wait 2ms\n    hop1 -> client vlan 50 ttl 64 icmp timeexceeded code 0 wait 2ms\n    client -> dns_srv vlan 50 ttl 2 udp srcport 53101 dstport 33435 payload \"TRACEROUTE_HOP_2\" wait 2ms\n    client <- dns_srv vlan 50 ttl 63 icmp destunreach code 3 wait 3ms\n}\n\nflow igmp_snooping_lifecycle(client, rtr, all_mc, group_mc) {\n    // 3. Switch IGMP Snooping: v2 General Query -> v3 Join Report -> v2 Fast Leave\n    rtr -> all_mc vlan 50 ttl 1 igmp v2 query group 0.0.0.0 maxresp 100 wait 3ms\n    client -> group_mc vlan 50 ttl 1 igmp v3 report group 239.50.1.100 wait 10ms\n    client -> group_mc vlan 50 ttl 1 igmp v2 leave group 239.50.1.100 wait 2ms\n}\n\ncompile {\n    dns_failures_and_traceroute(branch_client, hop1_router, core_dns_vip)\n    igmp_snooping_lifecycle(branch_client, hop1_router, all_hosts_mc, iptv_group_mc)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Replace this Unbound Fault Injection + Scapy IGMPv3 approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Simulate DNS NXDOMAIN / SERVFAIL, Traceroute TTL Hops & IGMP Snooping\":\n\n```text\nfrom scapy.contrib.igmpv3 import IGMPv3, IGMPv3mr, IGMPv3gr\n# Must manually compute 01:00:5e MAC + IP proto=2, ttl=1 + nested Group Record list:\npkt = Ether(dst=\"01:00:5e:32:01:64\")/Dot1Q(vlan=50)/IP(ttl=1,dst=\"224.0.0.22\")/IGMPv3()/IGMPv3mr(records=[IGMPv3gr(maddr=\"239.50.1.100\")])\n```"},{"role":"assistant","content":"One-line `dns response rcode 3`, `ttl 1` -> `icmp timeexceeded`, and `igmp v3 report group 239.50.1.100` with automatic RFC 1112 multicast MACs. Compile with `frameassembly dns_traceroute_igmp.frasm`.\n\n```frameassembly\nhost branch_client { ip 10.50.10.25  mac 00:1b:21:50:10:25 }\nhost hop1_router   { ip 10.50.10.1   mac 00:1c:73:50:10:01 }\nhost core_dns_vip  { ip 10.50.0.53   mac 00:50:56:50:00:53 }\nhost all_hosts_mc  { ip 224.0.0.1 }\nhost iptv_group_mc { ip 239.50.1.100 }\n\nflow dns_failures_and_traceroute(client, hop1, dns_srv) {\n    // 1. Negative DNS responses: RCODE 3 (NXDOMAIN) & RCODE 2 (SERVFAIL)\n    client -> dns_srv vlan 50 dns query txid 0x9101 qname \"retired-db.corp.example\" qtype \"A\" wait 2ms\n    client <- dns_srv vlan 50 dns response txid 0x9101 qname \"retired-db.corp.example\" qtype \"A\" rcode 3 wait 3ms\n    client -> dns_srv vlan 50 dns query txid 0x9102 qname \"broken-dnssec.partner.example\" qtype \"A\" wait 2ms\n    client <- dns_srv vlan 50 dns response txid 0x9102 qname \"broken-dnssec.partner.example\" qtype \"A\" rcode 2 wait 4ms\n\n    // 2. 2-hop UDP traceroute: TTL=1 expires at hop1 -> TTL=2 reaches core_dns_vip\n    client -> dns_srv vlan 50 ttl 1 udp srcport 53100 dstport 33434 payload \"TRACEROUTE_HOP_1\" wait 2ms\n    hop1 -> client vlan 50 ttl 64 icmp timeexceeded code 0 wait 2ms\n    client -> dns_srv vlan 50 ttl 2 udp srcport 53101 dstport 33435 payload \"TRACEROUTE_HOP_2\" wait 2ms\n    client <- dns_srv vlan 50 ttl 63 icmp destunreach code 3 wait 3ms\n}\n\nflow igmp_snooping_lifecycle(client, rtr, all_mc, group_mc) {\n    // 3. Switch IGMP Snooping: v2 General Query -> v3 Join Report -> v2 Fast Leave\n    rtr -> all_mc vlan 50 ttl 1 igmp v2 query group 0.0.0.0 maxresp 100 wait 3ms\n    client -> group_mc vlan 50 ttl 1 igmp v3 report group 239.50.1.100 wait 10ms\n    client -> group_mc vlan 50 ttl 1 igmp v2 leave group 239.50.1.100 wait 2ms\n}\n\ncompile {\n    dns_failures_and_traceroute(branch_client, hop1_router, core_dns_vip)\n    igmp_snooping_lifecycle(branch_client, hop1_router, all_hosts_mc, iptv_group_mc)\n}\n```"}]}
{"id":"sft-usecase-mig-netflow-ipfix-sflow-ptp-telemetry-pcap","task_type":"tool_migration","protocols":["ptp","netflow","ipfix","sflow"],"version":"3.3.0","license":"MIT","prompt":"Replace this softflowd / nprobe + linuxptp (ptp4l) approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Validate NetFlow v5, Dual-Stack IPFIX, sFlow & Nanosecond PTPv2\":\n\n```text\n# Classic .pcap truncates sub-microsecond PTP waits, and raw IPFIX fails without Template 2:\n# Wireshark warning on truncated captures:\n# [Expert Info (Warning/Undecoded): No template found for Data Set ID 256]\n```","completion":"Every `ipfix` packet embeds its own Template Set 2 + Data Set 256 (IPv4 or IPv6), and `.pcapng` output preserves `1ns` `IfTsResol(9)` PTPv2 timestamps. Compile with `frameassembly telemetry_ptp_suite.frasm`.\n\n```frameassembly\nhost spine_exporter { ip 172.20.0.1    mac 00:1c:73:d0:00:01 }\nhost telemetry_col  { ip 172.20.50.10  mac 00:50:56:d0:50:10 }\n\nflow flow_collectors_ingest(exp, col) {\n    // 1. Cisco NetFlow v5 (UDP 2055) + Dual-Stack Self-Templated IPFIX (UDP 4739)\n    exp -> col netflow srcip 10.20.5.14 dstip 203.0.113.80 srcport 54120 dstport 443 proto 6 packets 8500 octets 12240000 wait 2ms\n    exp -> col ipfix domainid 10 srcip 10.100.4.15 dstip 198.51.100.44 srcport 50112 dstport 443 proto 6 packets 420 octets 512000 wait 2ms\n    exp -> col ipfix domainid 20 srcip 2001:db8:20::15 dstip 2001:db8:99::5051 srcport 54200 dstport 50051 proto 6 packets 95 octets 84000 wait 2ms\n\n    // 2. Switch sFlow v5 XDR packet sampling on UDP 6343\n    exp -> col sflow agentip 172.20.0.1 subagentid 1 seq 101 uptime 450000 samples 1 wait 1ms\n    exp -> col sflow agentip 172.20.0.1 subagentid 1 seq 102 uptime 451000 samples 1 wait 2ms\n}\n\nflow ptpv2_twostep_nanosecond_sync(gm, slave) {\n    // 3. IEEE 1588v2 Two-Step PTP (UDP 320 General + UDP 319 Event) with us/ns precision\n    gm -> slave dscp 46 ptp announce domain 127 seqid 500 clockid \"ec4670fffe010203\" wait 250us\n    gm -> slave dscp 46 ptp sync domain 127 seqid 501 clockid \"ec4670fffe010203\" wait 500ns\n    gm -> slave dscp 46 ptp followup domain 127 seqid 501 clockid \"ec4670fffe010203\" wait 180us\n    slave -> gm dscp 46 ptp delayreq domain 127 seqid 88 clockid \"005056fffed05010\" wait 120us\n    gm -> slave dscp 46 ptp delayresp domain 127 seqid 88 clockid \"ec4670fffe010203\" wait 1ms\n}\n\ncompile {\n    flow_collectors_ingest(spine_exporter, telemetry_col)\n    ptpv2_twostep_nanosecond_sync(spine_exporter, telemetry_col)\n}\n```","frasm_code":"host spine_exporter { ip 172.20.0.1    mac 00:1c:73:d0:00:01 }\nhost telemetry_col  { ip 172.20.50.10  mac 00:50:56:d0:50:10 }\n\nflow flow_collectors_ingest(exp, col) {\n    // 1. Cisco NetFlow v5 (UDP 2055) + Dual-Stack Self-Templated IPFIX (UDP 4739)\n    exp -> col netflow srcip 10.20.5.14 dstip 203.0.113.80 srcport 54120 dstport 443 proto 6 packets 8500 octets 12240000 wait 2ms\n    exp -> col ipfix domainid 10 srcip 10.100.4.15 dstip 198.51.100.44 srcport 50112 dstport 443 proto 6 packets 420 octets 512000 wait 2ms\n    exp -> col ipfix domainid 20 srcip 2001:db8:20::15 dstip 2001:db8:99::5051 srcport 54200 dstport 50051 proto 6 packets 95 octets 84000 wait 2ms\n\n    // 2. Switch sFlow v5 XDR packet sampling on UDP 6343\n    exp -> col sflow agentip 172.20.0.1 subagentid 1 seq 101 uptime 450000 samples 1 wait 1ms\n    exp -> col sflow agentip 172.20.0.1 subagentid 1 seq 102 uptime 451000 samples 1 wait 2ms\n}\n\nflow ptpv2_twostep_nanosecond_sync(gm, slave) {\n    // 3. IEEE 1588v2 Two-Step PTP (UDP 320 General + UDP 319 Event) with us/ns precision\n    gm -> slave dscp 46 ptp announce domain 127 seqid 500 clockid \"ec4670fffe010203\" wait 250us\n    gm -> slave dscp 46 ptp sync domain 127 seqid 501 clockid \"ec4670fffe010203\" wait 500ns\n    gm -> slave dscp 46 ptp followup domain 127 seqid 501 clockid \"ec4670fffe010203\" wait 180us\n    slave -> gm dscp 46 ptp delayreq domain 127 seqid 88 clockid \"005056fffed05010\" wait 120us\n    gm -> slave dscp 46 ptp delayresp domain 127 seqid 88 clockid \"ec4670fffe010203\" wait 1ms\n}\n\ncompile {\n    flow_collectors_ingest(spine_exporter, telemetry_col)\n    ptpv2_twostep_nanosecond_sync(spine_exporter, telemetry_col)\n}","messages":[{"role":"system","content":"You write valid FrameAssembly v3.3.0 (.frasm, text/vnd.frameassembly) packet capture specifications. Follow strict v3.3.0 rules: (1) declare 1+ host <id> { ip <plain_ip> [mac <mac>] } blocks (no /24 CIDR suffixes or = signs), optional parameterized flow <name>(a, b) { ... } blocks, and 1 compile { ... } block (never loop); (2) built-in protocol names, modifiers, TCP flags, and time units (ns, us, ms, s, m) are strictly lowercase alphanumeric ([a-z0-9]+) with zero underscores and zero hyphens (e.g. echorequest, innervlan, sackperm, hosthdr, transporthdr, srcport, dstport, acknum); (3) comments use // and strings use \"...\" only; (4) wait <u32><ns|us|ms|s|m> is an inline post-packet modifier at the end of a frame statement."},{"role":"user","content":"Replace this softflowd / nprobe + linuxptp (ptp4l) approach with a deterministic FrameAssembly v3.3.0 (.frasm) capture for \"Validate NetFlow v5, Dual-Stack IPFIX, sFlow & Nanosecond PTPv2\":\n\n```text\n# Classic .pcap truncates sub-microsecond PTP waits, and raw IPFIX fails without Template 2:\n# Wireshark warning on truncated captures:\n# [Expert Info (Warning/Undecoded): No template found for Data Set ID 256]\n```"},{"role":"assistant","content":"Every `ipfix` packet embeds its own Template Set 2 + Data Set 256 (IPv4 or IPv6), and `.pcapng` output preserves `1ns` `IfTsResol(9)` PTPv2 timestamps. Compile with `frameassembly telemetry_ptp_suite.frasm`.\n\n```frameassembly\nhost spine_exporter { ip 172.20.0.1    mac 00:1c:73:d0:00:01 }\nhost telemetry_col  { ip 172.20.50.10  mac 00:50:56:d0:50:10 }\n\nflow flow_collectors_ingest(exp, col) {\n    // 1. Cisco NetFlow v5 (UDP 2055) + Dual-Stack Self-Templated IPFIX (UDP 4739)\n    exp -> col netflow srcip 10.20.5.14 dstip 203.0.113.80 srcport 54120 dstport 443 proto 6 packets 8500 octets 12240000 wait 2ms\n    exp -> col ipfix domainid 10 srcip 10.100.4.15 dstip 198.51.100.44 srcport 50112 dstport 443 proto 6 packets 420 octets 512000 wait 2ms\n    exp -> col ipfix domainid 20 srcip 2001:db8:20::15 dstip 2001:db8:99::5051 srcport 54200 dstport 50051 proto 6 packets 95 octets 84000 wait 2ms\n\n    // 2. Switch sFlow v5 XDR packet sampling on UDP 6343\n    exp -> col sflow agentip 172.20.0.1 subagentid 1 seq 101 uptime 450000 samples 1 wait 1ms\n    exp -> col sflow agentip 172.20.0.1 subagentid 1 seq 102 uptime 451000 samples 1 wait 2ms\n}\n\nflow ptpv2_twostep_nanosecond_sync(gm, slave) {\n    // 3. IEEE 1588v2 Two-Step PTP (UDP 320 General + UDP 319 Event) with us/ns precision\n    gm -> slave dscp 46 ptp announce domain 127 seqid 500 clockid \"ec4670fffe010203\" wait 250us\n    gm -> slave dscp 46 ptp sync domain 127 seqid 501 clockid \"ec4670fffe010203\" wait 500ns\n    gm -> slave dscp 46 ptp followup domain 127 seqid 501 clockid \"ec4670fffe010203\" wait 180us\n    slave -> gm dscp 46 ptp delayreq domain 127 seqid 88 clockid \"005056fffed05010\" wait 120us\n    gm -> slave dscp 46 ptp delayresp domain 127 seqid 88 clockid \"ec4670fffe010203\" wait 1ms\n}\n\ncompile {\n    flow_collectors_ingest(spine_exporter, telemetry_col)\n    ptpv2_twostep_nanosecond_sync(spine_exporter, telemetry_col)\n}\n```"}]}
