Lines Matching refs:value
1589 __maybe_unused static int get_bool_option(bool option, int *value, size_t *len) in get_bool_option() argument
1591 if (value == NULL) { in get_bool_option()
1603 *((int *)value) = (int)option; in get_bool_option()
1608 __maybe_unused static int get_uint8_option(uint8_t option, uint8_t *value, size_t *len) in get_uint8_option() argument
1610 if (value == NULL) { in get_uint8_option()
1614 *value = option; in get_uint8_option()
1623 __maybe_unused static int get_uint16_option(uint16_t option, int *value, size_t *len) in get_uint16_option() argument
1625 if (value == NULL) { in get_uint16_option()
1629 *value = option; in get_uint16_option()
1639 void *value, size_t *len) in get_context_priority() argument
1643 value, len); in get_context_priority()
1646 ARG_UNUSED(value); in get_context_priority()
1654 void *value, size_t *len) in get_context_proxy() argument
1657 struct sockaddr *addr = (struct sockaddr *)value; in get_context_proxy()
1659 if (!value || !len) { in get_context_proxy()
1674 ARG_UNUSED(value); in get_context_proxy()
1682 void *value, size_t *len) in get_context_txtime() argument
1686 value, len); in get_context_txtime()
1689 ARG_UNUSED(value); in get_context_txtime()
1697 void *value, size_t *len) in get_context_rcvtimeo() argument
1700 *((k_timeout_t *)value) = context->options.rcvtimeo; in get_context_rcvtimeo()
1709 ARG_UNUSED(value); in get_context_rcvtimeo()
1717 void *value, size_t *len) in get_context_sndtimeo() argument
1720 *((k_timeout_t *)value) = context->options.sndtimeo; in get_context_sndtimeo()
1729 ARG_UNUSED(value); in get_context_sndtimeo()
1737 void *value, size_t *len) in get_context_rcvbuf() argument
1741 value, len); in get_context_rcvbuf()
1744 ARG_UNUSED(value); in get_context_rcvbuf()
1752 void *value, size_t *len) in get_context_sndbuf() argument
1756 value, len); in get_context_sndbuf()
1759 ARG_UNUSED(value); in get_context_sndbuf()
1767 void *value, size_t *len) in get_context_dscp_ecn() argument
1771 value, len); in get_context_dscp_ecn()
1774 ARG_UNUSED(value); in get_context_dscp_ecn()
1782 void *value, size_t *len) in get_context_ttl() argument
1785 *((int *)value) = context->ipv4_ttl; in get_context_ttl()
1794 ARG_UNUSED(value); in get_context_ttl()
1802 void *value, size_t *len) in get_context_mcast_ttl() argument
1805 *((int *)value) = context->ipv4_mcast_ttl; in get_context_mcast_ttl()
1814 ARG_UNUSED(value); in get_context_mcast_ttl()
1822 void *value, size_t *len) in get_context_ipv4_mcast_loop() argument
1825 return get_bool_option(context->options.ipv4_mcast_loop, value, len); in get_context_ipv4_mcast_loop()
1828 ARG_UNUSED(value); in get_context_ipv4_mcast_loop()
1835 void *value, size_t *len) in get_context_mcast_hop_limit() argument
1838 *((int *)value) = context->ipv6_mcast_hop_limit; in get_context_mcast_hop_limit()
1847 ARG_UNUSED(value); in get_context_mcast_hop_limit()
1855 void *value, size_t *len) in get_context_unicast_hop_limit() argument
1858 *((int *)value) = context->ipv6_hop_limit; in get_context_unicast_hop_limit()
1867 ARG_UNUSED(value); in get_context_unicast_hop_limit()
1875 void *value, size_t *len) in get_context_reuseaddr() argument
1879 value, len); in get_context_reuseaddr()
1882 ARG_UNUSED(value); in get_context_reuseaddr()
1890 void *value, size_t *len) in get_context_reuseport() argument
1894 value, len); in get_context_reuseport()
1897 ARG_UNUSED(value); in get_context_reuseport()
1905 void *value, size_t *len) in get_context_ipv6_v6only() argument
1909 value, len); in get_context_ipv6_v6only()
1912 ARG_UNUSED(value); in get_context_ipv6_v6only()
1920 void *value, size_t *len) in get_context_recv_pktinfo() argument
1924 value, len); in get_context_recv_pktinfo()
1927 ARG_UNUSED(value); in get_context_recv_pktinfo()
1935 void *value, size_t *len) in get_context_recv_hoplimit() argument
1939 value, len); in get_context_recv_hoplimit()
1942 ARG_UNUSED(value); in get_context_recv_hoplimit()
1950 void *value, size_t *len) in get_context_addr_preferences() argument
1954 value, len); in get_context_addr_preferences()
1957 ARG_UNUSED(value); in get_context_addr_preferences()
1965 void *value, size_t *len) in get_context_timestamping() argument
1968 *((uint8_t *)value) = context->options.timestamping; in get_context_timestamping()
1977 ARG_UNUSED(value); in get_context_timestamping()
1985 void *value, size_t *len) in get_context_mtu() argument
2017 *((int *)value) = mtu; in get_context_mtu()
2027 void *value, size_t *len) in get_context_mcast_ifindex() argument
2062 *((int *)value) = ifindex; in get_context_mcast_ifindex()
2064 *((int *)value) = context->options.ipv6_mcast_ifindex; in get_context_mcast_ifindex()
2077 ARG_UNUSED(value); in get_context_mcast_ifindex()
2085 void *value, size_t *len) in get_context_local_port_range() argument
2092 *((uint32_t *)value) = context->options.port_range; in get_context_local_port_range()
2097 ARG_UNUSED(value); in get_context_local_port_range()
2105 void *value, size_t *len) in get_context_ipv6_mcast_loop() argument
2108 return get_bool_option(context->options.ipv6_mcast_loop, value, len); in get_context_ipv6_mcast_loop()
2111 ARG_UNUSED(value); in get_context_ipv6_mcast_loop()
3295 __maybe_unused static int set_bool_option(bool *option, const void *value, size_t len) in set_bool_option() argument
3297 if (value == NULL) { in set_bool_option()
3305 *option = !!*((int *)value); in set_bool_option()
3310 __maybe_unused static int set_uint8_option(uint8_t *option, const void *value, size_t len) in set_uint8_option() argument
3312 if (value == NULL) { in set_uint8_option()
3320 *option = *((uint8_t *)value); in set_uint8_option()
3325 __maybe_unused static int set_uint16_option(uint16_t *option, const void *value, size_t len) in set_uint16_option() argument
3329 if (value == NULL) { in set_uint16_option()
3337 v = *((int *)value); in set_uint16_option()
3350 const void *value, size_t len) in set_context_priority() argument
3353 return set_uint8_option(&context->options.priority, value, len); in set_context_priority()
3356 ARG_UNUSED(value); in set_context_priority()
3364 const void *value, size_t len) in set_context_txtime() argument
3367 return set_bool_option(&context->options.txtime, value, len); in set_context_txtime()
3370 ARG_UNUSED(value); in set_context_txtime()
3378 const void *value, size_t len) in set_context_proxy() argument
3381 struct sockaddr *addr = (struct sockaddr *)value; in set_context_proxy()
3397 ARG_UNUSED(value); in set_context_proxy()
3405 const void *value, size_t len) in set_context_rcvtimeo() argument
3412 context->options.rcvtimeo = *((k_timeout_t *)value); in set_context_rcvtimeo()
3417 ARG_UNUSED(value); in set_context_rcvtimeo()
3425 const void *value, size_t len) in set_context_sndtimeo() argument
3432 context->options.sndtimeo = *((k_timeout_t *)value); in set_context_sndtimeo()
3437 ARG_UNUSED(value); in set_context_sndtimeo()
3445 const void *value, size_t len) in set_context_rcvbuf() argument
3448 return set_uint16_option(&context->options.rcvbuf, value, len); in set_context_rcvbuf()
3451 ARG_UNUSED(value); in set_context_rcvbuf()
3459 const void *value, size_t len) in set_context_sndbuf() argument
3462 return set_uint16_option(&context->options.sndbuf, value, len); in set_context_sndbuf()
3465 ARG_UNUSED(value); in set_context_sndbuf()
3473 const void *value, size_t len) in set_context_dscp_ecn() argument
3476 return set_uint8_option(&context->options.dscp_ecn, value, len); in set_context_dscp_ecn()
3479 ARG_UNUSED(value); in set_context_dscp_ecn()
3487 const void *value, size_t len) in set_context_ttl() argument
3490 uint8_t ttl = *((int *)value); in set_context_ttl()
3497 ARG_UNUSED(value); in set_context_ttl()
3505 const void *value, size_t len) in set_context_mcast_ttl() argument
3508 uint8_t mcast_ttl = *((int *)value); in set_context_mcast_ttl()
3515 ARG_UNUSED(value); in set_context_mcast_ttl()
3523 const void *value, size_t len) in set_context_ipv4_mcast_loop() argument
3526 return set_bool_option(&context->options.ipv4_mcast_loop, value, len); in set_context_ipv4_mcast_loop()
3529 ARG_UNUSED(value); in set_context_ipv4_mcast_loop()
3537 const void *value, size_t len) in set_context_mcast_hop_limit() argument
3540 int mcast_hop_limit = *((int *)value); in set_context_mcast_hop_limit()
3565 ARG_UNUSED(value); in set_context_mcast_hop_limit()
3573 const void *value, size_t len) in set_context_unicast_hop_limit() argument
3576 uint8_t unicast_hop_limit = *((int *)value); in set_context_unicast_hop_limit()
3584 ARG_UNUSED(value); in set_context_unicast_hop_limit()
3592 const void *value, size_t len) in set_context_ipv6_mcast_loop() argument
3595 return set_bool_option(&context->options.ipv6_mcast_loop, value, len); in set_context_ipv6_mcast_loop()
3598 ARG_UNUSED(value); in set_context_ipv6_mcast_loop()
3606 const void *value, size_t len) in set_context_reuseaddr() argument
3609 return set_bool_option(&context->options.reuseaddr, value, len); in set_context_reuseaddr()
3612 ARG_UNUSED(value); in set_context_reuseaddr()
3620 const void *value, size_t len) in set_context_reuseport() argument
3623 return set_bool_option(&context->options.reuseport, value, len); in set_context_reuseport()
3626 ARG_UNUSED(value); in set_context_reuseport()
3634 const void *value, size_t len) in set_context_ipv6_mtu() argument
3644 mtu = *((int *)value); in set_context_ipv6_mtu()
3675 ARG_UNUSED(value); in set_context_ipv6_mtu()
3683 const void *value, size_t len) in set_context_ipv6_v6only() argument
3686 return set_bool_option(&context->options.ipv6_v6only, value, len); in set_context_ipv6_v6only()
3689 ARG_UNUSED(value); in set_context_ipv6_v6only()
3697 const void *value, size_t len) in set_context_recv_pktinfo() argument
3700 return set_bool_option(&context->options.recv_pktinfo, value, len); in set_context_recv_pktinfo()
3703 ARG_UNUSED(value); in set_context_recv_pktinfo()
3711 const void *value, size_t len) in set_context_recv_hoplimit() argument
3715 return set_bool_option(&context->options.recv_hoplimit, value, len); in set_context_recv_hoplimit()
3721 ARG_UNUSED(value); in set_context_recv_hoplimit()
3729 const void *value, size_t len) in set_context_addr_preferences() argument
3733 value, len); in set_context_addr_preferences()
3736 ARG_UNUSED(value); in set_context_addr_preferences()
3744 const void *value, size_t len) in set_context_timestamping() argument
3747 uint8_t timestamping_flags = *((uint8_t *)value); in set_context_timestamping()
3753 ARG_UNUSED(value); in set_context_timestamping()
3761 const void *value, size_t len) in set_context_mcast_ifindex() argument
3765 int mcast_ifindex = *((int *)value); in set_context_mcast_ifindex()
3814 ARG_UNUSED(value); in set_context_mcast_ifindex()
3822 const void *value, size_t len) in set_context_local_port_range() argument
3832 port_range = *((uint32_t *)value); in set_context_local_port_range()
3853 ARG_UNUSED(value); in set_context_local_port_range()
3862 const void *value, size_t len) in net_context_set_option() argument
3876 ret = set_context_priority(context, value, len); in net_context_set_option()
3879 ret = set_context_txtime(context, value, len); in net_context_set_option()
3882 ret = set_context_proxy(context, value, len); in net_context_set_option()
3885 ret = set_context_rcvtimeo(context, value, len); in net_context_set_option()
3888 ret = set_context_sndtimeo(context, value, len); in net_context_set_option()
3891 ret = set_context_rcvbuf(context, value, len); in net_context_set_option()
3894 ret = set_context_sndbuf(context, value, len); in net_context_set_option()
3897 ret = set_context_dscp_ecn(context, value, len); in net_context_set_option()
3900 ret = set_context_ttl(context, value, len); in net_context_set_option()
3903 ret = set_context_mcast_ttl(context, value, len); in net_context_set_option()
3906 ret = set_context_mcast_hop_limit(context, value, len); in net_context_set_option()
3909 ret = set_context_unicast_hop_limit(context, value, len); in net_context_set_option()
3912 ret = set_context_reuseaddr(context, value, len); in net_context_set_option()
3915 ret = set_context_reuseport(context, value, len); in net_context_set_option()
3918 ret = set_context_ipv6_v6only(context, value, len); in net_context_set_option()
3921 ret = set_context_recv_pktinfo(context, value, len); in net_context_set_option()
3924 ret = set_context_addr_preferences(context, value, len); in net_context_set_option()
3927 ret = set_context_timestamping(context, value, len); in net_context_set_option()
3936 ret = set_context_ipv6_mtu(context, value, len); in net_context_set_option()
3941 ret = set_context_mcast_ifindex(context, value, len); in net_context_set_option()
3944 ret = set_context_local_port_range(context, value, len); in net_context_set_option()
3947 ret = set_context_ipv6_mcast_loop(context, value, len); in net_context_set_option()
3950 ret = set_context_ipv4_mcast_loop(context, value, len); in net_context_set_option()
3953 ret = set_context_recv_hoplimit(context, value, len); in net_context_set_option()
3964 void *value, size_t *len) in net_context_get_option() argument
3978 ret = get_context_priority(context, value, len); in net_context_get_option()
3981 ret = get_context_txtime(context, value, len); in net_context_get_option()
3984 ret = get_context_proxy(context, value, len); in net_context_get_option()
3987 ret = get_context_rcvtimeo(context, value, len); in net_context_get_option()
3990 ret = get_context_sndtimeo(context, value, len); in net_context_get_option()
3993 ret = get_context_rcvbuf(context, value, len); in net_context_get_option()
3996 ret = get_context_sndbuf(context, value, len); in net_context_get_option()
3999 ret = get_context_dscp_ecn(context, value, len); in net_context_get_option()
4002 ret = get_context_ttl(context, value, len); in net_context_get_option()
4005 ret = get_context_mcast_ttl(context, value, len); in net_context_get_option()
4008 ret = get_context_mcast_hop_limit(context, value, len); in net_context_get_option()
4011 ret = get_context_unicast_hop_limit(context, value, len); in net_context_get_option()
4014 ret = get_context_reuseaddr(context, value, len); in net_context_get_option()
4017 ret = get_context_reuseport(context, value, len); in net_context_get_option()
4020 ret = get_context_ipv6_v6only(context, value, len); in net_context_get_option()
4023 ret = get_context_recv_pktinfo(context, value, len); in net_context_get_option()
4026 ret = get_context_addr_preferences(context, value, len); in net_context_get_option()
4029 ret = get_context_timestamping(context, value, len); in net_context_get_option()
4032 ret = get_context_mtu(context, value, len); in net_context_get_option()
4035 ret = get_context_mcast_ifindex(context, value, len); in net_context_get_option()
4038 ret = get_context_local_port_range(context, value, len); in net_context_get_option()
4041 ret = get_context_ipv6_mcast_loop(context, value, len); in net_context_get_option()
4044 ret = get_context_ipv4_mcast_loop(context, value, len); in net_context_get_option()
4047 ret = get_context_recv_hoplimit(context, value, len); in net_context_get_option()