summaryrefslogtreecommitdiffhomepage
path: root/test/packetimpact/proto
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-04-07 17:48:06 -0700
committergVisor bot <gvisor-bot@google.com>2020-04-07 17:49:21 -0700
commitdbcc59af0b834b6295589a594fe4cc1c360e66f7 (patch)
treeea5e48327004da2f371a86a0c0333e6eda9acb3d /test/packetimpact/proto
parentacf0259255bae190759e39fbff3bac6c94122734 (diff)
Test TCP sender behavior against window shrinking
RFC 1122 Section 3.7: A sending TCP MUST be robust against window shrinking, which may cause the "useable window" to become negative. PiperOrigin-RevId: 305377072
Diffstat (limited to 'test/packetimpact/proto')
-rw-r--r--test/packetimpact/proto/posix_server.proto27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/packetimpact/proto/posix_server.proto b/test/packetimpact/proto/posix_server.proto
index 1565f31fa..4035e1ee6 100644
--- a/test/packetimpact/proto/posix_server.proto
+++ b/test/packetimpact/proto/posix_server.proto
@@ -93,6 +93,17 @@ message ListenResponse {
int32 errno_ = 2; // "errno" may fail to compile in c++.
}
+message SendRequest {
+ int32 sockfd = 1;
+ bytes buf = 2;
+ int32 flags = 3;
+}
+
+message SendResponse {
+ int32 ret = 1;
+ int32 errno_ = 2;
+}
+
message SetSockOptRequest {
int32 sockfd = 1;
int32 level = 2;
@@ -105,6 +116,18 @@ message SetSockOptResponse {
int32 errno_ = 2; // "errno" may fail to compile in c++.
}
+message SetSockOptIntRequest {
+ int32 sockfd = 1;
+ int32 level = 2;
+ int32 optname = 3;
+ int32 intval = 4;
+}
+
+message SetSockOptIntResponse {
+ int32 ret = 1;
+ int32 errno_ = 2;
+}
+
message SetSockOptTimevalRequest {
int32 sockfd = 1;
int32 level = 2;
@@ -151,11 +174,15 @@ service Posix {
rpc GetSockName(GetSockNameRequest) returns (GetSockNameResponse);
// Call listen() on the DUT.
rpc Listen(ListenRequest) returns (ListenResponse);
+ // Call send() on the DUT.
+ rpc Send(SendRequest) returns (SendResponse);
// Call setsockopt() on the DUT. You should prefer one of the other
// SetSockOpt* functions with a more structured optval or else you may get the
// encoding wrong, such as making a bad assumption about the server's word
// sizes or endianness.
rpc SetSockOpt(SetSockOptRequest) returns (SetSockOptResponse);
+ // Call setsockopt() on the DUT with an int optval.
+ rpc SetSockOptInt(SetSockOptIntRequest) returns (SetSockOptIntResponse);
// Call setsockopt() on the DUT with a Timeval optval.
rpc SetSockOptTimeval(SetSockOptTimevalRequest)
returns (SetSockOptTimevalResponse);