Searched refs:sock (Results 1 – 6 of 6) sorted by relevance
/tools/testing/selftests/networking/timestamping/ |
D | timestamping.c | 137 static void sendpacket(int sock, struct sockaddr *addr, socklen_t addr_len) in sendpacket() argument 142 res = sendto(sock, sync, sizeof(sync), 0, in sendpacket() 155 int sock, int recvmsg_flags, in printpacket() argument 261 if (ioctl(sock, SIOCGSTAMP, &tv)) in printpacket() 269 if (ioctl(sock, SIOCGSTAMPNS, &ts)) in printpacket() 278 static void recvpacket(int sock, int recvmsg_flags, in recvpacket() argument 301 res = recvmsg(sock, &msg, recvmsg_flags|MSG_DONTWAIT); in recvpacket() 309 sock, recvmsg_flags, in recvpacket() 325 int sock; in main() local 367 sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); in main() [all …]
|
D | hwtstamp_config.c | 90 int sock; in main() local 107 sock = socket(AF_INET, SOCK_DGRAM, 0); in main() 108 if (sock < 0) { in main() 116 if (ioctl(sock, (argc == 2) ? SIOCGHWTSTAMP : SIOCSHWTSTAMP, &ifr)) { in main()
|
/tools/testing/selftests/net/ |
D | psock_tpacket.c | 83 void (*walk)(int sock, struct ring *ring); 113 int ret, sock = socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL)); in pfsocket() local 114 if (sock == -1) { in pfsocket() 119 ret = setsockopt(sock, SOL_PACKET, PACKET_VERSION, &ver, sizeof(ver)); in pfsocket() 125 return sock; in pfsocket() 232 static void walk_v1_v2_rx(int sock, struct ring *ring) in walk_v1_v2_rx() argument 242 pair_udp_setfilter(sock); in walk_v1_v2_rx() 245 pfd.fd = sock; in walk_v1_v2_rx() 339 static void __v1_v2_set_packet_loss_discard(int sock) in __v1_v2_set_packet_loss_discard() argument 343 ret = setsockopt(sock, SOL_PACKET, PACKET_LOSS, (void *) &discard, in __v1_v2_set_packet_loss_discard() [all …]
|
/tools/perf/util/ |
D | cpumap.h | 34 static inline int cpu_map__socket(struct cpu_map *sock, int s) in cpu_map__socket() argument 36 if (!sock || s > sock->nr || s < 0) in cpu_map__socket() 38 return sock->map[s]; in cpu_map__socket()
|
/tools/usb/usbip/src/ |
D | usbipd.c | 384 int sock; in listen_all_addrinfo() local 388 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); in listen_all_addrinfo() 389 if (sock < 0) { in listen_all_addrinfo() 395 usbip_net_set_reuseaddr(sock); in listen_all_addrinfo() 396 usbip_net_set_nodelay(sock); in listen_all_addrinfo() 399 usbip_net_set_v6only(sock); in listen_all_addrinfo() 401 if (sock >= FD_SETSIZE) { in listen_all_addrinfo() 403 ai_buf, sock, FD_SETSIZE); in listen_all_addrinfo() 404 close(sock); in listen_all_addrinfo() 408 ret = bind(sock, ai->ai_addr, ai->ai_addrlen); in listen_all_addrinfo() [all …]
|
/tools/net/ |
D | bpf_dbg.c | 500 int sock, ret, i; in bpf_runnable() local 506 sock = socket(AF_INET, SOCK_DGRAM, 0); in bpf_runnable() 507 if (sock < 0) { in bpf_runnable() 511 ret = setsockopt(sock, SOL_SOCKET, SO_ATTACH_FILTER, &bpf, sizeof(bpf)); in bpf_runnable() 512 close(sock); in bpf_runnable()
|