The macro TCP_HDR builds a TCP header, as defined in
[RFC793]. The macro TCP_PCK prepends an IPv4
header to the TCP header.
The TCP flags can either be set through $tcp_flags, or through the
variables below. The values of $tcp_flags and the single-bit
variables are simply or-ed, so setting $tcp_flags and any of
the single-bit variables to a value other than zero may not yield the
desired result.
Example:
$tcp_sport=3445 /* ephemeral port */ $tcp_dport=80 /* HTTP */ send IP_HDR($ip_proto=IPPROTO_TCP $ip_tos=0xb8) TCP_HDR($tcp_SYN=1) send TCP_PCK($ip_tos=0xb8 $tcp_SYN=1) /* equivalent */