summaryrefslogtreecommitdiffhomepage
path: root/tools/go_stateify/main.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-06-11 13:46:56 -0700
committergVisor bot <gvisor-bot@google.com>2020-06-11 13:48:30 -0700
commit44575bf726a6ddb259a0c6419be4517a05c1b9bc (patch)
treeeacab879ab6edf2031e5094d1083db8e72154656 /tools/go_stateify/main.go
parentaf6ec7b7346eef56b3c74b8369b2f2a74f3dddc4 (diff)
Refactor packetimpact Connection types
Reorganize the Connection types such that the defined types no longer expose the lower-level functions SendFrame and CreateFrame. These methods are still exported on the underlying Connection type, and thus can be accessed via a type-cast. In future, defined types should have one or more type-safe versions of the send() method on Connection, e.g. UDPIPv4 has Send() which allows the UDP header to be overridden and SendIP() which allows both the IPv4 and UDP headers to be modified. testbench.Connection gets a SendFrameStateless method which sends frames without updating the state of any of the layers. This should be used when sending out-of-band control messages such as ICMP messages, as using the normal Send method can result in errors when attempting to update the TCP state using an ICMP packet. Also remove the localAddr field of testbench.Connection and instead compute it on the fly as needed for UDPIPv4 and TCPIPv4. PiperOrigin-RevId: 315969714
Diffstat (limited to 'tools/go_stateify/main.go')
0 files changed, 0 insertions, 0 deletions