Lines Matching full:bind
5 * Rules to bind sockets to the same port when all ephemeral ports are
8 * 1. if there are TCP_LISTEN sockets on the port, fail to bind.
9 * 2. if there are sockets without SO_REUSEADDR, fail to bind.
10 * 3. if SO_REUSEADDR is disabled, fail to bind.
12 * succeed to bind.
15 * succeed to bind.
16 * 6. fail to bind.
73 if (bind(fd, (struct sockaddr *)&local_addr, len) == -1) { in bind_port()
92 ASSERT_NE(-1, fd[0]) TH_LOG("failed to bind."); in TEST()
93 EXPECT_EQ(-1, fd[1]) TH_LOG("should fail to bind."); in TEST()
112 ASSERT_NE(-1, fd[0]) TH_LOG("failed to bind."); in TEST()
115 EXPECT_EQ(-1, fd[1]) TH_LOG("should fail to bind because both sockets succeed to be listened."); in TEST()
117 EXPECT_NE(-1, fd[1]) TH_LOG("should succeed to bind to connect to different destinations."); in TEST()
145 ASSERT_NE(-1, fd[0]) TH_LOG("failed to bind."); in TEST()
146 …EXPECT_NE(-1, fd[1]) TH_LOG("should succeed to bind because one socket can be bound in each euid."… in TEST()