/net/bluetooth/ |
D | hci_debugfs.c | 227 u8 i, val[16]; in uuids_show() local 234 val[i] = uuid->uuid[15 - i]; in uuids_show() 236 seq_printf(f, "%pUb\n", val); in uuids_show() 284 static int conn_info_min_age_set(void *data, u64 val) in conn_info_min_age_set() argument 288 if (val == 0 || val > hdev->conn_info_max_age) in conn_info_min_age_set() 292 hdev->conn_info_min_age = val; in conn_info_min_age_set() 298 static int conn_info_min_age_get(void *data, u64 *val) in conn_info_min_age_get() argument 303 *val = hdev->conn_info_min_age; in conn_info_min_age_get() 312 static int conn_info_max_age_set(void *data, u64 val) in conn_info_max_age_set() argument 316 if (val == 0 || val < hdev->conn_info_min_age) in conn_info_max_age_set() [all …]
|
/net/dccp/ |
D | feat.c | 138 int (*activation_hdlr)(struct sock *sk, u64 val, bool rx); 257 static void dccp_feat_printval(u8 feat_num, dccp_feat_val const *val) in dccp_feat_printval() argument 261 if (val == NULL || (type == FEAT_SP && val->sp.vec == NULL)) in dccp_feat_printval() 264 for (i = 0; i < val->sp.len; i++) in dccp_feat_printval() 265 dccp_pr_debug_cat("%s%u", i ? " " : "", val->sp.vec[i]); in dccp_feat_printval() 267 dccp_pr_debug_cat("%llu", (unsigned long long)val->nn); in dccp_feat_printval() 286 dccp_feat_printval(entry->feat_num, &entry->val); in dccp_feat_print_entry() 291 #define dccp_feat_print_opt(opt, feat, val, len, mandatory) do { \ argument 293 dccp_feat_printvals(feat, val, len); \ 304 #define dccp_feat_print_opt(opt, feat, val, len, mandatory) argument [all …]
|
D | proto.c | 481 u8 *val; in dccp_setsockopt_ccid() local 487 val = memdup_user(optval, optlen); in dccp_setsockopt_ccid() 488 if (IS_ERR(val)) in dccp_setsockopt_ccid() 489 return PTR_ERR(val); in dccp_setsockopt_ccid() 493 rc = dccp_feat_register_sp(sk, DCCPF_CCID, 1, val, optlen); in dccp_setsockopt_ccid() 496 rc = dccp_feat_register_sp(sk, DCCPF_CCID, 0, val, optlen); in dccp_setsockopt_ccid() 499 kfree(val); in dccp_setsockopt_ccid() 507 int val, err = 0; in do_dccp_setsockopt() local 526 if (get_user(val, (int __user *)optval)) in do_dccp_setsockopt() 530 return dccp_setsockopt_service(sk, val, optval, optlen); in do_dccp_setsockopt() [all …]
|
/net/netfilter/ |
D | nf_sockopt.c | 62 int val, int get) in nf_sockopt_find() argument 73 if (val >= ops->get_optmin && in nf_sockopt_find() 74 val < ops->get_optmax) in nf_sockopt_find() 77 if (val >= ops->set_optmin && in nf_sockopt_find() 78 val < ops->set_optmax) in nf_sockopt_find() 92 static int nf_sockopt(struct sock *sk, u_int8_t pf, int val, in nf_sockopt() argument 98 ops = nf_sockopt_find(sk, pf, val, get); in nf_sockopt() 103 ret = ops->get(sk, val, opt, len); in nf_sockopt() 105 ret = ops->set(sk, val, opt, *len); in nf_sockopt() 111 int nf_setsockopt(struct sock *sk, u_int8_t pf, int val, char __user *opt, in nf_setsockopt() argument [all …]
|
D | xt_u32.c | 26 u_int32_t val; in u32_match_it() local 43 val = ntohl(n); in u32_match_it() 51 val &= number; in u32_match_it() 54 val <<= number; in u32_match_it() 57 val >>= number; in u32_match_it() 60 if (at + val < at) in u32_match_it() 62 at += val; in u32_match_it() 71 val = ntohl(n); in u32_match_it() 79 if (ct->value[i].min <= val && val <= ct->value[i].max) in u32_match_it()
|
/net/ipv6/ |
D | ipv6_sockglue.c | 145 int val, valbool; in do_ipv6_setsockopt() local 150 val = 0; in do_ipv6_setsockopt() 153 if (get_user(val, (int __user *) optval)) in do_ipv6_setsockopt() 156 val = 0; in do_ipv6_setsockopt() 159 valbool = (val != 0); in do_ipv6_setsockopt() 173 if (val == PF_INET) { in do_ipv6_setsockopt() 337 if (val < -1 || val > 0xff) in do_ipv6_setsockopt() 340 if (val == -1) in do_ipv6_setsockopt() 341 val = 0; in do_ipv6_setsockopt() 342 np->tclass = val; in do_ipv6_setsockopt() [all …]
|
/net/sched/ |
D | em_cmp.c | 30 u32 val = 0; in em_cmp_match() local 37 val = *ptr; in em_cmp_match() 41 val = get_unaligned_be16(ptr); in em_cmp_match() 44 val = be16_to_cpu(val); in em_cmp_match() 51 val = get_unaligned_be32(ptr); in em_cmp_match() 54 val = be32_to_cpu(val); in em_cmp_match() 62 val &= cmp->mask; in em_cmp_match() 66 return val == cmp->val; in em_cmp_match() 68 return val < cmp->val; in em_cmp_match() 70 return val > cmp->val; in em_cmp_match()
|
D | em_meta.c | 83 unsigned long val; member 675 static inline struct meta_ops *meta_ops(struct meta_value *val) in meta_ops() argument 677 return &__meta_ops[meta_type(val)][meta_id(val)]; in meta_ops() 698 dst->val = (unsigned long)kmemdup(nla_data(nla), len, GFP_KERNEL); in meta_var_change() 699 if (dst->val == 0UL) in meta_var_change() 707 kfree((void *) v->val); in meta_var_destroy() 721 if (v->val && v->len && in meta_var_dump() 722 nla_put(skb, tlv, v->len, (void *) v->val)) in meta_var_dump() 750 dst->val = *(unsigned long *) nla_data(nla); in meta_int_change() 753 dst->val = nla_get_u32(nla); in meta_int_change() [all …]
|
/net/ipv4/ |
D | ip_sockglue.c | 227 int err, val; in ip_cmsg_send() local 284 val = *(int *)CMSG_DATA(cmsg); in ip_cmsg_send() 285 if (val < 1 || val > 255) in ip_cmsg_send() 287 ipc->ttl = val; in ip_cmsg_send() 291 val = *(int *)CMSG_DATA(cmsg); in ip_cmsg_send() 293 val = *(u8 *)CMSG_DATA(cmsg); in ip_cmsg_send() 296 if (val < 0 || val > 255) in ip_cmsg_send() 298 ipc->tos = val; in ip_cmsg_send() 591 int val = 0, err; in do_ip_setsockopt() local 619 if (get_user(val, (int __user *) optval)) in do_ip_setsockopt() [all …]
|
D | tcp_metrics.c | 76 u32 val) in tcp_metric_set() argument 78 tm->tcpm_vals[idx] = val; in tcp_metric_set() 101 u32 val; in tcpm_suck_dst() local 105 val = 0; in tcpm_suck_dst() 107 val |= 1 << TCP_METRIC_RTT; in tcpm_suck_dst() 109 val |= 1 << TCP_METRIC_RTTVAR; in tcpm_suck_dst() 111 val |= 1 << TCP_METRIC_SSTHRESH; in tcpm_suck_dst() 113 val |= 1 << TCP_METRIC_CWND; in tcpm_suck_dst() 115 val |= 1 << TCP_METRIC_REORDERING; in tcpm_suck_dst() 116 tm->tcpm_lock = val; in tcpm_suck_dst() [all …]
|
D | tcp.c | 2452 int val; in do_tcp_setsockopt() local 2463 val = strncpy_from_user(name, optval, in do_tcp_setsockopt() 2465 if (val < 0) in do_tcp_setsockopt() 2467 name[val] = 0; in do_tcp_setsockopt() 2482 if (get_user(val, (int __user *)optval)) in do_tcp_setsockopt() 2492 if (val < TCP_MIN_MSS || val > MAX_TCP_WINDOW) { in do_tcp_setsockopt() 2496 tp->rx_opt.user_mss = val; in do_tcp_setsockopt() 2500 if (val) { in do_tcp_setsockopt() 2517 if (val < 0 || val > 1) in do_tcp_setsockopt() 2520 tp->thin_lto = val; in do_tcp_setsockopt() [all …]
|
D | sysfs_net_ipv4.c | 36 int val, ret; \ 37 ret = sscanf(buf, "%d", &val); \ 40 if (val < 0) \ 42 _var = val; \
|
/net/6lowpan/ |
D | debugfs.c | 23 static int lowpan_ctx_flag_active_set(void *data, u64 val) in lowpan_ctx_flag_active_set() argument 27 if (val != 0 && val != 1) in lowpan_ctx_flag_active_set() 30 if (val) in lowpan_ctx_flag_active_set() 38 static int lowpan_ctx_flag_active_get(void *data, u64 *val) in lowpan_ctx_flag_active_get() argument 40 *val = lowpan_iphc_ctx_is_active(data); in lowpan_ctx_flag_active_get() 48 static int lowpan_ctx_flag_c_set(void *data, u64 val) in lowpan_ctx_flag_c_set() argument 52 if (val != 0 && val != 1) in lowpan_ctx_flag_c_set() 55 if (val) in lowpan_ctx_flag_c_set() 63 static int lowpan_ctx_flag_c_get(void *data, u64 *val) in lowpan_ctx_flag_c_get() argument 65 *val = lowpan_iphc_ctx_is_compression(data); in lowpan_ctx_flag_c_get() [all …]
|
D | nhc_udp.c | 44 u8 tmp = 0, val = 0; in udp_uncompress() local 59 fail |= lowpan_fetch_skb(skb, &val, sizeof(val)); in udp_uncompress() 60 uh.dest = htons(val + LOWPAN_NHC_UDP_8BIT_PORT); in udp_uncompress() 63 fail |= lowpan_fetch_skb(skb, &val, sizeof(val)); in udp_uncompress() 64 uh.source = htons(val + LOWPAN_NHC_UDP_8BIT_PORT); in udp_uncompress() 68 fail |= lowpan_fetch_skb(skb, &val, sizeof(val)); in udp_uncompress() 69 uh.source = htons(LOWPAN_NHC_UDP_4BIT_PORT + (val >> 4)); in udp_uncompress() 70 uh.dest = htons(LOWPAN_NHC_UDP_4BIT_PORT + (val & 0x0f)); in udp_uncompress()
|
/net/9p/ |
D | protocol.c | 111 int8_t *val = va_arg(ap, int8_t *); in p9pdu_vreadf() local 112 if (pdu_read(pdu, val, sizeof(*val))) { in p9pdu_vreadf() 119 int16_t *val = va_arg(ap, int16_t *); in p9pdu_vreadf() local 125 *val = le16_to_cpu(le_val); in p9pdu_vreadf() 129 int32_t *val = va_arg(ap, int32_t *); in p9pdu_vreadf() local 135 *val = le32_to_cpu(le_val); in p9pdu_vreadf() 139 int64_t *val = va_arg(ap, int64_t *); in p9pdu_vreadf() local 145 *val = le64_to_cpu(le_val); in p9pdu_vreadf() 369 int8_t val = va_arg(ap, int); in p9pdu_vwritef() local 370 if (pdu_write(pdu, &val, sizeof(val))) in p9pdu_vwritef() [all …]
|
/net/bridge/ |
D | br_sysfs_br.c | 36 unsigned long val; in store_bridge_parm() local 42 val = simple_strtoul(buf, &endp, 0); in store_bridge_parm() 49 err = (*set)(br, val); in store_bridge_parm() 109 static int set_ageing_time(struct net_bridge *br, unsigned long val) in set_ageing_time() argument 111 return br_set_ageing_time(br, val); in set_ageing_time() 130 static int set_stp_state(struct net_bridge *br, unsigned long val) in set_stp_state() argument 132 br_stp_set_enabled(br, val); in set_stp_state() 153 static int set_group_fwd_mask(struct net_bridge *br, unsigned long val) in set_group_fwd_mask() argument 155 if (val & BR_GROUPFWD_RESTRICTED) in set_group_fwd_mask() 158 br->group_fwd_mask = val; in set_group_fwd_mask() [all …]
|
D | br_netlink.c | 983 u8 val; in br_changelink() local 985 val = nla_get_u8(data[IFLA_BR_MCAST_QUERY_USE_IFADDR]); in br_changelink() 986 br->multicast_query_use_ifaddr = !!val; in br_changelink() 998 u32 val = nla_get_u32(data[IFLA_BR_MCAST_HASH_ELASTICITY]); in br_changelink() local 1000 br->hash_elasticity = val; in br_changelink() 1012 u32 val = nla_get_u32(data[IFLA_BR_MCAST_LAST_MEMBER_CNT]); in br_changelink() local 1014 br->multicast_last_member_count = val; in br_changelink() 1018 u32 val = nla_get_u32(data[IFLA_BR_MCAST_STARTUP_QUERY_CNT]); in br_changelink() local 1020 br->multicast_startup_query_count = val; in br_changelink() 1024 u64 val = nla_get_u64(data[IFLA_BR_MCAST_LAST_MEMBER_INTVL]); in br_changelink() local [all …]
|
/net/rds/ |
D | ib_ring.c | 97 u32 rds_ib_ring_alloc(struct rds_ib_work_ring *ring, u32 val, u32 *pos) in rds_ib_ring_alloc() argument 103 rdsdebug("ring %p val %u next %u free %u\n", ring, val, in rds_ib_ring_alloc() 106 if (val && avail) { in rds_ib_ring_alloc() 107 ret = min(val, avail); in rds_ib_ring_alloc() 117 void rds_ib_ring_free(struct rds_ib_work_ring *ring, u32 val) in rds_ib_ring_free() argument 119 ring->w_free_ptr = (ring->w_free_ptr + val) % ring->w_nr; in rds_ib_ring_free() 120 atomic_add(val, &ring->w_free_ctr); in rds_ib_ring_free() 127 void rds_ib_ring_unalloc(struct rds_ib_work_ring *ring, u32 val) in rds_ib_ring_unalloc() argument 129 ring->w_alloc_ptr = (ring->w_alloc_ptr - val) % ring->w_nr; in rds_ib_ring_unalloc() 130 ring->w_alloc_ctr -= val; in rds_ib_ring_unalloc()
|
/net/core/ |
D | sock.c | 659 int val; in sock_setsockopt() local 674 if (get_user(val, (int __user *)optval)) in sock_setsockopt() 677 valbool = val ? 1 : 0; in sock_setsockopt() 683 if (val && !capable(CAP_NET_ADMIN)) in sock_setsockopt() 712 val = min_t(u32, val, sysctl_wmem_max); in sock_setsockopt() 715 sk->sk_sndbuf = max_t(int, val * 2, SOCK_MIN_SNDBUF); in sock_setsockopt() 733 val = min_t(u32, val, sysctl_rmem_max); in sock_setsockopt() 751 sk->sk_rcvbuf = max_t(int, val * 2, SOCK_MIN_RCVBUF); in sock_setsockopt() 779 if ((val >= 0 && val <= 6) || in sock_setsockopt() 781 sk->sk_priority = val; in sock_setsockopt() [all …]
|
D | utils.c | 55 unsigned int val; in in_aton() local 62 val = 0; in in_aton() 64 val *= 10; in in_aton() 65 val += *str - '0'; in in_aton() 68 l |= val; in in_aton() 90 int val; in xdigit2bin() local 99 val = hex_to_bin(c); in xdigit2bin() 100 if (val >= 0) in xdigit2bin() 101 return val | IN6PTON_XDIGIT | (val < 10 ? IN6PTON_DIGIT : 0); in xdigit2bin()
|
/net/mac80211/ |
D | michael.c | 16 static void michael_block(struct michael_mic_ctx *mctx, u32 val) in michael_block() argument 18 mctx->l ^= val; in michael_block() 59 u32 val; in michael_mic() local 74 val = 0x5a; in michael_mic() 76 val <<= 8; in michael_mic() 78 val |= data[blocks * 4 + left]; in michael_mic() 81 michael_block(&mctx, val); in michael_mic()
|
/net/l2tp/ |
D | l2tp_ppp.c | 993 int val = (int) arg; in pppol2tp_session_ioctl() local 1062 if (get_user(val, (int __user *) arg)) in pppol2tp_session_ioctl() 1065 session->mru = val; in pppol2tp_session_ioctl() 1083 if (get_user(val, (int __user *) arg)) in pppol2tp_session_ioctl() 1085 ps->flags = val; in pppol2tp_session_ioctl() 1257 int optname, int val) in pppol2tp_tunnel_setsockopt() argument 1263 tunnel->debug = val; in pppol2tp_tunnel_setsockopt() 1280 int optname, int val) in pppol2tp_session_setsockopt() argument 1287 if ((val != 0) && (val != 1)) { in pppol2tp_session_setsockopt() 1291 session->recv_seq = val ? -1 : 0; in pppol2tp_session_setsockopt() [all …]
|
/net/sctp/ |
D | socket.c | 2233 int val; in sctp_setsockopt_disable_fragments() local 2238 if (get_user(val, (int __user *)optval)) in sctp_setsockopt_disable_fragments() 2241 sctp_sk(sk)->disable_fragments = (val == 0) ? 0 : 1; in sctp_setsockopt_disable_fragments() 2930 int val; in sctp_setsockopt_nodelay() local 2934 if (get_user(val, (int __user *)optval)) in sctp_setsockopt_nodelay() 2937 sctp_sk(sk)->nodelay = (val == 0) ? 0 : 1; in sctp_setsockopt_nodelay() 3087 int val; in sctp_setsockopt_mappedv4() local 3092 if (get_user(val, (int __user *)optval)) in sctp_setsockopt_mappedv4() 3094 if (val) in sctp_setsockopt_mappedv4() 3134 int val; in sctp_setsockopt_maxseg() local [all …]
|
/net/vmw_vsock/ |
D | virtio_transport_common.c | 359 void virtio_transport_set_buffer_size(struct vsock_sock *vsk, u64 val) in virtio_transport_set_buffer_size() argument 363 if (val > VIRTIO_VSOCK_MAX_BUF_SIZE) in virtio_transport_set_buffer_size() 364 val = VIRTIO_VSOCK_MAX_BUF_SIZE; in virtio_transport_set_buffer_size() 365 if (val < vvs->buf_size_min) in virtio_transport_set_buffer_size() 366 vvs->buf_size_min = val; in virtio_transport_set_buffer_size() 367 if (val > vvs->buf_size_max) in virtio_transport_set_buffer_size() 368 vvs->buf_size_max = val; in virtio_transport_set_buffer_size() 369 vvs->buf_size = val; in virtio_transport_set_buffer_size() 370 vvs->buf_alloc = val; in virtio_transport_set_buffer_size() 374 void virtio_transport_set_min_buffer_size(struct vsock_sock *vsk, u64 val) in virtio_transport_set_min_buffer_size() argument [all …]
|
/net/packet/ |
D | af_packet.c | 1357 unsigned int val = atomic_inc_return(&f->rr_cur); in fanout_demux_lb() local 1359 return val % num; in fanout_demux_lb() 3691 int val; in packet_setsockopt() local 3693 if (optlen != sizeof(val)) in packet_setsockopt() 3695 if (copy_from_user(&val, optval, sizeof(val))) in packet_setsockopt() 3698 pkt_sk(sk)->copy_thresh = val; in packet_setsockopt() 3703 int val; in packet_setsockopt() local 3705 if (optlen != sizeof(val)) in packet_setsockopt() 3707 if (copy_from_user(&val, optval, sizeof(val))) in packet_setsockopt() 3709 switch (val) { in packet_setsockopt() [all …]
|