Home
last modified time | relevance | path

Searched refs:setsockopt (Results 1 – 25 of 342) sorted by relevance

12345678910>>...14

/external/strace/tests-mx32/
Dnet-icmp_filter.c43 setsockopt(-1, SOL_RAW, ICMP_FILTER, NULL, 0); in main()
55 setsockopt(-1, SOL_RAW, ICMP_FILTER, efault, sizeof(*f)); in main()
67 setsockopt(-1, SOL_RAW, ICMP_FILTER, f, -2); in main()
71 setsockopt(-1, SOL_RAW, ICMP_FILTER, f, sizeof(*f)); in main()
77 setsockopt(-1, SOL_RAW, ICMP_FILTER, f, sizeof(*f) * 2); in main()
Dip_mreq.c100 rc = setsockopt(0, short_any[i].level, short_any[i].optname, in main()
107 rc = setsockopt(0, short_any[i].level, short_any[i].optname, in main()
129 rc = setsockopt(0, SOL_IP, long_ip[i].optname, in main()
139 rc = setsockopt(0, SOL_IPV6, long_ipv6[i].optname, in main()
/external/strace/tests-m32/
Dnet-icmp_filter.c43 setsockopt(-1, SOL_RAW, ICMP_FILTER, NULL, 0); in main()
55 setsockopt(-1, SOL_RAW, ICMP_FILTER, efault, sizeof(*f)); in main()
67 setsockopt(-1, SOL_RAW, ICMP_FILTER, f, -2); in main()
71 setsockopt(-1, SOL_RAW, ICMP_FILTER, f, sizeof(*f)); in main()
77 setsockopt(-1, SOL_RAW, ICMP_FILTER, f, sizeof(*f) * 2); in main()
Dip_mreq.c100 rc = setsockopt(0, short_any[i].level, short_any[i].optname, in main()
107 rc = setsockopt(0, short_any[i].level, short_any[i].optname, in main()
129 rc = setsockopt(0, SOL_IP, long_ip[i].optname, in main()
139 rc = setsockopt(0, SOL_IPV6, long_ipv6[i].optname, in main()
/external/strace/tests/
Dnet-icmp_filter.c43 setsockopt(-1, SOL_RAW, ICMP_FILTER, NULL, 0); in main()
55 setsockopt(-1, SOL_RAW, ICMP_FILTER, efault, sizeof(*f)); in main()
67 setsockopt(-1, SOL_RAW, ICMP_FILTER, f, -2); in main()
71 setsockopt(-1, SOL_RAW, ICMP_FILTER, f, sizeof(*f)); in main()
77 setsockopt(-1, SOL_RAW, ICMP_FILTER, f, sizeof(*f) * 2); in main()
Dip_mreq.c100 rc = setsockopt(0, short_any[i].level, short_any[i].optname, in main()
107 rc = setsockopt(0, short_any[i].level, short_any[i].optname, in main()
129 rc = setsockopt(0, SOL_IP, long_ip[i].optname, in main()
139 rc = setsockopt(0, SOL_IPV6, long_ipv6[i].optname, in main()
/external/python/cpython2/Demo/sockets/
Dmcast.py39 s.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, ttl_bin)
41 s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_MULTICAST_HOPS, ttl_bin)
58 s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
67 s.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, mreq)
70 s.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_JOIN_GROUP, mreq)
/external/ltp/utils/sctp/func_tests/
Dtest_1_to_1_sockopt.c115 error = setsockopt(-1, IPPROTO_SCTP, 0, 0, 0); in main()
128 error = setsockopt(fd, IPPROTO_SCTP, 0, 0, 0); in main()
140 error = setsockopt(sk, -1, SCTP_RTOINFO, 0, 0); in main()
148 error = setsockopt(sk, IPPROTO_SCTP, SCTP_RTOINFO, in main()
157 error = setsockopt(sk, IPPROTO_SCTP, SCTP_AUTOCLOSE, 0, 0); in main()
281 error = setsockopt(sk2, SOL_SOCKET, SO_LINGER, &slinger, len); in main()
326 error = setsockopt(sk2, SOL_SOCKET, SO_RCVBUF, &rcvbuf_val_set, len); in main()
345 error = setsockopt(sk2, SOL_SOCKET, SO_SNDBUF, &sndbuf_val_set, len); in main()
387 error = setsockopt(sk2,IPPROTO_SCTP, SCTP_PRIMARY_ADDR, &sprimaddr, in main()
411 error = setsockopt(sk2, IPPROTO_SCTP, SCTP_ASSOCINFO, &sassocparams, in main()
/external/dnsmasq/src/
Dnetwork.c304 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1 || in create_ipv6_listener()
305 setsockopt(tcpfd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1 || in create_ipv6_listener()
306 setsockopt(fd, IPV6_LEVEL, IPV6_V6ONLY, &opt, sizeof(opt)) == -1 || in create_ipv6_listener()
307 setsockopt(tcpfd, IPV6_LEVEL, IPV6_V6ONLY, &opt, sizeof(opt)) == -1 || in create_ipv6_listener()
311 setsockopt(fd, IPV6_LEVEL, IPV6_RECVPKTINFO, &opt, sizeof(opt)) == -1 || in create_ipv6_listener()
313 setsockopt(fd, IPV6_LEVEL, IPV6_PKTINFO, &opt, sizeof(opt)) == -1 || in create_ipv6_listener()
354 if (setsockopt(tcpfd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1 || in create_wildcard_listeners()
361 setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1 || in create_wildcard_listeners()
364 setsockopt(fd, SOL_IP, IP_PKTINFO, &opt, sizeof(opt)) == -1 || in create_wildcard_listeners()
366 setsockopt(fd, IPPROTO_IP, IP_RECVDSTADDR, &opt, sizeof(opt)) == -1 || in create_wildcard_listeners()
[all …]
/external/ltp/testcases/network/multicast/mc_opts/
Dmc_verify_opts_error.c44 if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, &simr, in main()
59 if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, sizeof(ttl)) != 0) in main()
62 if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_LOOP, &do_loop, sizeof(char)) in main()
65 if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_LOOP, &no_loop, sizeof(char)) in main()
Dmc_verify_opts.c54 if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, in main()
93 if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_TTL, in main()
125 if (setsockopt(s, IPPROTO_IP, IP_MULTICAST_LOOP, &loop, sizeof(char)) != in main()
/external/iputils/
Dtracepath6.c480 if (setsockopt(fd, SOL_IPV6, IPV6_MTU_DISCOVER, &on, sizeof(on)) && in main()
482 setsockopt(fd, SOL_IPV6, IPV6_MTU_DISCOVER, &on, sizeof(on)))) { in main()
487 if (setsockopt(fd, SOL_IPV6, IPV6_RECVERR, &on, sizeof(on))) { in main()
493 setsockopt(fd, SOL_IPV6, IPV6_HOPLIMIT, &on, sizeof(on)) && in main()
494 setsockopt(fd, SOL_IPV6, IPV6_2292HOPLIMIT, &on, sizeof(on)) in main()
496 setsockopt(fd, SOL_IPV6, IPV6_HOPLIMIT, &on, sizeof(on)) in main()
514 if (setsockopt(fd, SOL_IP, IP_MTU_DISCOVER, &on, sizeof(on))) { in main()
519 if (setsockopt(fd, SOL_IP, IP_RECVERR, &on, sizeof(on))) { in main()
523 if (setsockopt(fd, SOL_IP, IP_RECVTTL, &on, sizeof(on))) { in main()
542 if (setsockopt(fd, SOL_IPV6, IPV6_UNICAST_HOPS, &on, sizeof(on))) { in main()
[all …]
Dtraceroute6.c500 setsockopt(icmp_sock, SOL_IPV6, IPV6_RECVPKTINFO, &on, sizeof(on)); in main()
501 setsockopt(icmp_sock, SOL_IPV6, IPV6_2292PKTINFO, &on, sizeof(on)); in main()
503 setsockopt(icmp_sock, SOL_IPV6, IPV6_PKTINFO, &on, sizeof(on)); in main()
507 setsockopt(icmp_sock, SOL_SOCKET, SO_DEBUG, in main()
510 setsockopt(icmp_sock, SOL_SOCKET, SO_DONTROUTE, in main()
515 if (setsockopt(icmp_sock, SOL_RAW, IPV6_CHECKSUM, &on, sizeof(on)) < 0) { in main()
528 if (setsockopt(sndsock, SOL_SOCKET, SO_SNDBUF, (char *)&datalen, in main()
536 (void) setsockopt(sndsock, SOL_SOCKET, SO_DEBUG, in main()
539 (void) setsockopt(sndsock, SOL_SOCKET, SO_DONTROUTE, in main()
551 if (setsockopt(probe_fd, SOL_SOCKET, SO_BINDTODEVICE, device, strlen(device)+1) == -1) in main()
[all …]
Dping.c163 (setsockopt(icmp_sock, IPPROTO_IP, IP_TOS, in main()
333 rc = setsockopt(probe_fd, SOL_SOCKET, SO_BINDTODEVICE, device, strlen(device)+1); in main()
345 if (setsockopt(probe_fd, SOL_IP, IP_MULTICAST_IF, &imr, sizeof(imr)) == -1) { in main()
357 setsockopt(probe_fd, IPPROTO_IP, IP_TOS, (char *)&settos, sizeof(int)) < 0) in main()
373 if (setsockopt(probe_fd, SOL_SOCKET, SO_BROADCAST, in main()
458 if (setsockopt(icmp_sock, SOL_IP, IP_MTU_DISCOVER, &pmtudisc, sizeof(pmtudisc)) == -1) { in main()
478 if (setsockopt(icmp_sock, SOL_RAW, ICMP_FILTER, (char*)&filt, sizeof(filt)) == -1) in main()
483 if (setsockopt(icmp_sock, SOL_IP, IP_RECVERR, (char *)&hold, sizeof(hold))) in main()
486 if (setsockopt(icmp_sock, SOL_IP, IP_RECVTTL, (char *)&hold, sizeof(hold))) in main()
488 if (setsockopt(icmp_sock, SOL_IP, IP_RETOPTS, (char *)&hold, sizeof(hold))) in main()
[all …]
/external/toybox/toys/pending/
Dtraceroute.c132 res = setsockopt(TT.snd_sock, IPPROTO_IP, IP_TTL, &ttl, sizeof(ttl)); in send_probe4()
151 if (setsockopt(TT.snd_sock, SOL_IPV6, IPV6_UNICAST_HOPS, &ttl, in send_probe6()
164 if ((toys.optflags & FLAG_d) && (setsockopt(sock,SOL_SOCKET, SO_DEBUG, in set_flag_dr()
167 if ((toys.optflags & FLAG_r) && (setsockopt(sock, SOL_SOCKET, SO_DONTROUTE, in set_flag_dr()
176 if (setsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, &ifr, sizeof(ifr))) in bind_to_interface()
515 setsockopt(TT.recv_sock, SOL_IPV6, IPV6_RECVPKTINFO, &set, in traceroute_main()
517 setsockopt(TT.recv_sock, SOL_IPV6, IPV6_2292PKTINFO, &set, in traceroute_main()
520 setsockopt(TT.recv_sock, SOL_IPV6, IPV6_PKTINFO, &set, sizeof(set)); in traceroute_main()
523 if (setsockopt(TT.recv_sock, SOL_RAW, IPV6_CHECKSUM, &two, in traceroute_main()
553 if (setsockopt(TT.snd_sock, IPPROTO_IP, IP_OPTIONS, in traceroute_main()
[all …]
/external/autotest/client/cros/netprotos/
Dinterface_host.py123 self._recv_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
124 self._recv_sock.setsockopt(socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP,
134 self._send_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
135 self._send_sock.setsockopt(socket.SOL_IP, socket.IP_MULTICAST_TTL,
/external/libmicrohttpd/src/microspdy/
Dio_raw.c76 ret = setsockopt(session->socket_fd, IPPROTO_TCP, TCP_NODELAY, &val, (socklen_t)sizeof(val)); in SPDYF_raw_new_session()
168 ret = setsockopt(session->socket_fd, IPPROTO_TCP, TCP_CORK, &val, (socklen_t)sizeof(val)); in SPDYF_raw_before_write()
187 ret = setsockopt(session->socket_fd, IPPROTO_TCP, TCP_CORK, &val, (socklen_t)sizeof(val)); in SPDYF_raw_after_write()
/external/netcat/
Dnetcat.c606 if (setsockopt(s, SOL_SOCKET, SO_RTABLE, &rtableid, in remote_connect()
618 setsockopt(s, SOL_SOCKET, SO_BINDANY, &on, sizeof(on)); in remote_connect()
721 if (setsockopt(s, IPPROTO_IP, SO_RTABLE, &rtableid, in local_listen()
728 ret = setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &x, sizeof(x)); in local_listen()
730 ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x)); in local_listen()
955 if (setsockopt(s, IPPROTO_TCP, TCP_MD5SIG, in set_common_sockopts()
961 if (setsockopt(s, SOL_SOCKET, SO_DEBUG, in set_common_sockopts()
967 if (setsockopt(s, SOL_SOCKET, SO_JUMBO, in set_common_sockopts()
972 if (setsockopt(s, IPPROTO_IP, IP_TOS, in set_common_sockopts()
978 if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, in set_common_sockopts()
[all …]
/external/linux-kselftest/tools/testing/selftests/net/
Dreuseport_bpf.c125 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_REUSEPORT_EBPF, &bpf_fd, in attach_ebpf()
147 if (setsockopt(fd, SOL_SOCKET, SO_ATTACH_REUSEPORT_CBPF, &p, sizeof(p))) in attach_cbpf()
164 if (setsockopt(fd[i], SOL_SOCKET, SO_REUSEPORT, &opt, in build_recv_group()
176 if (setsockopt(fd[i], SOL_TCP, TCP_FASTOPEN, &opt, in build_recv_group()
318 if (setsockopt(fd1, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt))) in test_extra_filter()
320 if (setsockopt(fd2, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt))) in test_extra_filter()
374 if (!setsockopt(fd, SOL_SOCKET, SO_ATTACH_REUSEPORT_EBPF, &bpf_fd, in test_filter_no_reuseport()
379 if (!setsockopt(fd, SOL_SOCKET, SO_ATTACH_REUSEPORT_CBPF, &cprog, in test_filter_no_reuseport()
397 if (setsockopt(fd1, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt))) in test_filter_without_bind()
399 if (setsockopt(fd2, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt))) in test_filter_without_bind()
Dpsock_fanout.c86 if (setsockopt(fd, SOL_PACKET, PACKET_FANOUT, &val, sizeof(val))) { in sock_fanout_open()
109 if (setsockopt(fd, SOL_PACKET, PACKET_FANOUT_DATA, &bpf_prog, in sock_fanout_set_cbpf()
150 if (setsockopt(fd, SOL_PACKET, PACKET_FANOUT_DATA, &pfd, sizeof(pfd))) { in sock_fanout_set_ebpf()
172 if (setsockopt(fd, SOL_PACKET, PACKET_VERSION, (void *) &val, in sock_fanout_open_ring()
177 if (setsockopt(fd, SOL_PACKET, PACKET_RX_RING, (void *) &req, in sock_fanout_open_ring()
/external/linux-kselftest/tools/testing/selftests/networking/timestamping/
Dtimestamping.c414 if (setsockopt(sock, IPPROTO_IP, IP_MULTICAST_IF, in main()
419 if (setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, in main()
423 if (setsockopt(sock, IPPROTO_IP, IP_MULTICAST_LOOP, in main()
430 setsockopt(sock, SOL_SOCKET, SO_TIMESTAMP, in main()
435 setsockopt(sock, SOL_SOCKET, SO_TIMESTAMPNS, in main()
440 setsockopt(sock, SOL_SOCKET, SO_TIMESTAMPING, in main()
446 if (setsockopt(sock, SOL_IP, IP_PKTINFO, in main()
/external/android-clat/
Dring.c40 if (setsockopt(packetsock, SOL_PACKET, PACKET_VERSION, (void *) &ver, sizeof(ver))) { in ring_create()
46 if (setsockopt(packetsock, SOL_PACKET, PACKET_LOSS, (void *) &on, sizeof(on))) { in ring_create()
62 if (setsockopt(packetsock, SOL_PACKET, PACKET_RX_RING, &req, sizeof(req)) < 0) { in ring_create()
/external/ltp/testcases/network/stress/ns-tools/
Dns-mcast_join.c369 if (setsockopt(sd, level, MCAST_JOIN_GROUP, grp_info, in join_group()
386 if (setsockopt in join_group()
463 if (setsockopt(sd, level, MCAST_JOIN_GROUP, grp_info, in join_leave_group()
468 if (setsockopt(sd, level, MCAST_MSFILTER, gsf, in join_leave_group()
476 if (setsockopt(sd, level, MCAST_LEAVE_GROUP, grp_info, in join_leave_group()
/external/libnl/lib/
Dsocket.c433 err = setsockopt(sk->s_fd, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, in nl_socket_add_memberships()
481 err = setsockopt(sk->s_fd, SOL_NETLINK, NETLINK_DROP_MEMBERSHIP, in nl_socket_drop_memberships()
688 err = setsockopt(sk->s_fd, SOL_SOCKET, SO_SNDBUF, in nl_socket_set_buffer_size()
693 err = setsockopt(sk->s_fd, SOL_SOCKET, SO_RCVBUF, in nl_socket_set_buffer_size()
747 err = setsockopt(sk->s_fd, SOL_SOCKET, SO_PASSCRED, in nl_socket_set_passcred()
774 err = setsockopt(sk->s_fd, SOL_NETLINK, NETLINK_PKTINFO, in nl_socket_recv_pktinfo()
/external/ltp/utils/sctp/lib/
Dconnectx.c74 return setsockopt(fd, SOL_SCTP, SCTP_SOCKOPT_CONNECTX_OLD, addrs, in __sctp_connectx()
90 status = setsockopt(fd, SOL_SCTP, SCTP_SOCKOPT_CONNECTX, addrs, in __connectx()
113 return setsockopt(fd, SOL_SCTP, SCTP_SOCKOPT_CONNECTX_OLD, in __connectx()

12345678910>>...14