Home
last modified time | relevance | path

Searched refs:optval (Results 1 – 20 of 20) sorted by relevance

/xnu-11215/bsd/netinet/
H A Dtcp_usrreq.c2320 error = sooptcopyin(sopt, &optval, sizeof optval, in tcp_ctloutput()
2349 error = sooptcopyin(sopt, &optval, sizeof optval, in tcp_ctloutput()
2432 if (optval > 0 && optval <= tp->t_maxseg && in tcp_ctloutput()
2503 if (optval < 0 || optval > INT32_MAX) { in tcp_ctloutput()
2526 if (optval < 0 || optval > INT32_MAX) { in tcp_ctloutput()
2622 if (optval < 0 || optval > 1) { in tcp_ctloutput()
2636 if (optval < 0 || optval > 1) { in tcp_ctloutput()
2659 if (optval < 0 || optval > 1) { in tcp_ctloutput()
2683 if (optval < 0 || optval > 1) { in tcp_ctloutput()
2738 if (optval < 0 || optval > 1) { in tcp_ctloutput()
[all …]
H A Dmptcp_usrreq.c1714 error = sooptcopyin(sopt, &optval, sizeof(optval), in mptcp_setopt()
1739 error = sooptcopyin(sopt, &optval, sizeof(optval), in mptcp_setopt()
1744 if (optval < 0 || optval >= MPTCP_SVCTYPE_MAX) { in mptcp_setopt()
1760 error = sooptcopyin(sopt, &optval, sizeof(optval), in mptcp_setopt()
1766 if (optval < 0 || optval > UINT16_MAX) { in mptcp_setopt()
1776 error = sooptcopyin(sopt, &optval, sizeof(optval), in mptcp_setopt()
1782 if (optval < 0 || optval > 1) { in mptcp_setopt()
1795 error = sooptcopyin(sopt, &optval, sizeof(optval), in mptcp_setopt()
1801 if (optval != 0 && optval != 1) { in mptcp_setopt()
1879 if ((error = sooptcopyin(sopt, &optval, sizeof(optval), in mptcp_setopt()
[all …]
H A Dip_output.c2301 error = optval = 0; in ip_ctloutput()
2379 error = sooptcopyin(sopt, &optval, sizeof(optval), in ip_ctloutput()
2483 error = sooptcopyin(sopt, &optval, sizeof(optval), in ip_ctloutput()
2489 switch (optval) { in ip_ctloutput()
2584 error = sooptcopyin(sopt, &optval, sizeof(optval), in ip_ctloutput()
2601 error = sooptcopyin(sopt, &optval, sizeof(optval), in ip_ctloutput()
2699 optval = 0; in ip_ctloutput()
2714 error = sooptcopyout(sopt, &optval, sizeof(optval)); in ip_ctloutput()
2746 error = sooptcopyout(sopt, &optval, sizeof(optval)); in ip_ctloutput()
2751 error = sooptcopyout(sopt, &optval, sizeof(optval)); in ip_ctloutput()
[all …]
H A Draw_ip.c751 int error, optval; in rip_ctloutput() local
769 error = sooptcopyout(sopt, &optval, sizeof optval); in rip_ctloutput()
774 error = sooptcopyout(sopt, &optval, sizeof optval); in rip_ctloutput()
800 error = sooptcopyin(sopt, &optval, sizeof optval, in rip_ctloutput()
801 sizeof optval); in rip_ctloutput()
805 if (optval) { in rip_ctloutput()
813 error = sooptcopyin(sopt, &optval, sizeof optval, in rip_ctloutput()
814 sizeof optval); in rip_ctloutput()
818 if (optval) { in rip_ctloutput()
842 if ((error = sooptcopyin(sopt, &optval, sizeof(optval), in rip_ctloutput()
[all …]
H A Din_tclass.c916 if (optval < SO_TC_BE || optval > SO_TC_CTL) { in so_set_traffic_class()
919 switch (optval) { in so_set_traffic_class()
921 optval = SO_TC_BK; in so_set_traffic_class()
924 optval = SO_TC_VI; in so_set_traffic_class()
927 optval = SO_TC_VO; in so_set_traffic_class()
930 if (!SO_VALID_TC(optval)) { in so_set_traffic_class()
939 VERIFY(SO_VALID_TC(optval)); in so_set_traffic_class()
940 so->so_traffic_class = (uint16_t)optval; in so_set_traffic_class()
950 optval != oldval && (optval == SO_TC_BK_SYS || in so_set_traffic_class()
964 (optval == SO_TC_BK_SYS) ? "ON" : "OFF"); in so_set_traffic_class()
[all …]
H A Dudp_usrreq.c1020 int error = 0, optval = 0; in udp_ctloutput() local
1057 if ((error = sooptcopyin(sopt, &optval, sizeof(optval), in udp_ctloutput()
1058 sizeof(optval))) != 0) { in udp_ctloutput()
1062 if (optval != 0) { in udp_ctloutput()
1145 if ((error = sooptcopyin(sopt, &optval, sizeof(optval), in udp_ctloutput()
1146 sizeof(optval))) != 0) { in udp_ctloutput()
1150 error = inp_flush(inp, optval); in udp_ctloutput()
1162 optval = inp->inp_flags & INP_UDP_NOCKSUM; in udp_ctloutput()
1170 error = sooptcopyout(sopt, &optval, sizeof(optval)); in udp_ctloutput()
H A Din_mcast.c1912 int error, optval; in inp_getmoptions() local
1975 optval = coptval = IP_DEFAULT_MULTICAST_TTL; in inp_getmoptions()
1978 optval = coptval = imo->imo_multicast_ttl; in inp_getmoptions()
1984 error = sooptcopyout(sopt, &optval, sizeof(int)); in inp_getmoptions()
1990 optval = coptval = IP_DEFAULT_MULTICAST_LOOP; in inp_getmoptions()
1993 optval = coptval = imo->imo_multicast_loop; in inp_getmoptions()
1999 error = sooptcopyout(sopt, &optval, sizeof(int)); in inp_getmoptions()
H A Dmptcp_var.h625 extern int mptcp_set_notsent_lowat(struct mptses *mpte, int optval);
H A Din_pcb.c3743 inp_flush(struct inpcb *inp, int optval) in inp_flush() argument
3749 if (optval != SO_TC_ALL && !SO_VALID_TC(optval)) { in inp_flush()
3764 if_qflush_sc(rtifp, so_tc2msc(optval), flowhash, NULL, NULL, 0); in inp_flush()
3767 if_qflush_sc(oifp, so_tc2msc(optval), flowhash, NULL, NULL, 0); in inp_flush()
H A Dmptcp_subr.c6217 mptcp_set_notsent_lowat(struct mptses *mpte, int optval) in mptcp_set_notsent_lowat() argument
6227 mp_tp->mpt_notsent_lowat = optval; in mptcp_set_notsent_lowat()
/xnu-11215/bsd/netinet6/
H A Dip6_output.c2471 sizeof(optval), sizeof(optval)); in ip6_ctloutput()
2478 if (optval < -1 || optval >= 256) { in ip6_ctloutput()
2534 (u_char *)&optval, sizeof(optval), in ip6_ctloutput()
2642 sizeof(optval), sizeof(optval)); in ip6_ctloutput()
2678 sizeof(optval), sizeof(optval)); in ip6_ctloutput()
2764 sizeof(optval), sizeof(optval)); in ip6_ctloutput()
2823 sizeof(optval), sizeof(optval)); in ip6_ctloutput()
2840 sizeof(optval), sizeof(optval)); in ip6_ctloutput()
3140 error = sooptcopyin(sopt, &optval, sizeof(optval), in ip6_raw_ctloutput()
3284 return sooptcopyout(sopt, &optval, sizeof(optval)); in ip6_getpcbopt()
[all …]
H A Draw_ip6.c937 int error, optval; in rip6_ctloutput() local
977 if ((error = sooptcopyin(sopt, &optval, sizeof(optval), in rip6_ctloutput()
978 sizeof(optval))) != 0) { in rip6_ctloutput()
982 error = inp_flush(sotoinpcb(so), optval); in rip6_ctloutput()
H A Din6_mcast.c1840 u_int optval; in ip6_getmoptions() local
1860 optval = 0; in ip6_getmoptions()
1862 optval = im6o->im6o_multicast_ifp->if_index; in ip6_getmoptions()
1867 error = sooptcopyout(sopt, &optval, sizeof(u_int)); in ip6_getmoptions()
1872 optval = ip6_defmcasthlim; in ip6_getmoptions()
1875 optval = im6o->im6o_multicast_hlim; in ip6_getmoptions()
1878 error = sooptcopyout(sopt, &optval, sizeof(u_int)); in ip6_getmoptions()
1883 optval = in6_mcast_loop; /* XXX VIMAGE */ in ip6_getmoptions()
1886 optval = im6o->im6o_multicast_loop; in ip6_getmoptions()
1889 error = sooptcopyout(sopt, &optval, sizeof(u_int)); in ip6_getmoptions()
/xnu-11215/bsd/kern/
H A Duipc_socket.c4943 error = sooptcopyin(sopt, &optval, sizeof(optval), in sosetoptlock()
4962 error = sooptcopyin(sopt, &optval, sizeof(optval), in sosetoptlock()
5081 error = sooptcopyin(sopt, &optval, sizeof(optval), in sosetoptlock()
5094 error = sooptcopyin(sopt, &optval, sizeof(optval), in sosetoptlock()
5107 error = sooptcopyin(sopt, &optval, sizeof(optval), in sosetoptlock()
5124 error = sooptcopyin(sopt, &optval, sizeof(optval), in sosetoptlock()
5137 error = sooptcopyin(sopt, &optval, sizeof(optval), in sosetoptlock()
5152 error = sooptcopyin(sopt, &optval, sizeof(optval), in sosetoptlock()
5173 error = sooptcopyin(sopt, &optval, sizeof(optval), in sosetoptlock()
5196 error = sooptcopyin(sopt, &optval, sizeof(optval), in sosetoptlock()
[all …]
H A Dkpi_socket.c512 if (sock == NULL || optval == NULL || optlen == NULL) { in sock_getsockopt()
519 sopt.sopt_val = CAST_USER_ADDR_T(optval); in sock_getsockopt()
541 if (sock == NULL || optval == NULL) { in sock_setsockopt()
548 sopt.sopt_val = CAST_USER_ADDR_T(optval); in sock_setsockopt()
577 sock_settclassopt(socket_t sock, const void *optval, size_t optlen) in sock_settclassopt() argument
583 if (sock == NULL || optval == NULL || optlen != sizeof(int)) { in sock_settclassopt()
608 sotc = so_tc_from_dscp((uint8_t)((*(const int *)optval) >> 2)); in sock_settclassopt()
635 sopt.sopt_val = CAST_USER_ADDR_T(optval); in sock_settclassopt()
662 sock_gettclassopt(socket_t sock, void *optval, size_t *optlen) in sock_gettclassopt() argument
667 if (sock == NULL || optval == NULL || optlen == NULL) { in sock_gettclassopt()
[all …]
/xnu-11215/tests/
H A Dudp_kao_opt.c114 int optval = 10; in set_udp_kao_opt() local
117 &optval, sizeof(optval)), "setsockopt IPPROTO_IP, IP_TTL"); in set_udp_kao_opt()
120 &optval, sizeof(optval)), "setsockopt IPPROTO_IPV6, IPV6_UNICAST_HOPS"); in set_udp_kao_opt()
H A Drip_v4v6_input.c108 int optval; in close_raw_socket() local
109 socklen_t optlen = sizeof(optval); in close_raw_socket()
111 T_ASSERT_POSIX_SUCCESS(getsockopt(fd, SOL_SOCKET, SO_NUMRCVPKT, &optval, &optlen), in close_raw_socket()
114 T_LOG("fd %d SO_NUMRCVPKT %d", fd, optval); in close_raw_socket()
H A Dv4mappedv6_recvpktinfo.c68 int optval; in listener_thread() local
/xnu-11215/bsd/sys/
H A Dkpi_socket.h215 void *optval, int *optlen)
240 const void *optval, int optlen)
258 extern errno_t sock_settclassopt(socket_t so, const void* optval, size_t optlen);
273 extern errno_t sock_gettclassopt(socket_t so, void* optval, size_t* optlen);
/xnu-11215/bsd/net/
H A Dkctl_test.c123 static int optval = 0; variable
138 optval = *(int*)data; in kctl_test_setopt()
162 *(int*)data = optval; in kctl_test_getopt()