Lines Matching defs:dst_sock
34 static int dst_sock = -1, sock = -1;
74 dst_sock = SAFE_SOCKET(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
75 SAFE_SETSOCKOPT_INT(dst_sock, SOL_PACKET, PACKET_VERSION, TPACKET_V2);
76 TEST(setsockopt(dst_sock, SOL_PACKET, PACKET_RESERVE, &val,
80 SAFE_CLOSE(dst_sock);
98 TEST(setsockopt(dst_sock, SOL_PACKET, PACKET_RX_RING, &tpreq,
100 SAFE_CLOSE(dst_sock);
140 dst_sock = SAFE_SOCKET(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
141 SAFE_SETSOCKOPT_INT(dst_sock, SOL_PACKET, PACKET_VERSION, TPACKET_V2);
142 SAFE_SETSOCKOPT_INT(dst_sock, SOL_PACKET, PACKET_VNET_HDR, 1);
143 SAFE_SETSOCKOPT_INT(dst_sock, SOL_PACKET, PACKET_RESERVE, 0xffff - 75);
144 TEST(setsockopt(dst_sock, SOL_PACKET, PACKET_RX_RING, &tpreq,
148 SAFE_CLOSE(dst_sock);
164 SAFE_BIND(dst_sock, (struct sockaddr *)&bind_addr, sizeof(addr));
171 SAFE_CLOSE(dst_sock);
195 if (dst_sock != -1)
196 SAFE_CLOSE(dst_sock);