Home
last modified time | relevance | path

Searched refs:val (Results 1 – 25 of 128) sorted by relevance

123456

/net/dccp/
Dfeat.c138 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 …]
Dproto.c470 u8 *val; in dccp_setsockopt_ccid() local
476 val = memdup_user(optval, optlen); in dccp_setsockopt_ccid()
477 if (IS_ERR(val)) in dccp_setsockopt_ccid()
478 return PTR_ERR(val); in dccp_setsockopt_ccid()
482 rc = dccp_feat_register_sp(sk, DCCPF_CCID, 1, val, optlen); in dccp_setsockopt_ccid()
485 rc = dccp_feat_register_sp(sk, DCCPF_CCID, 0, val, optlen); in dccp_setsockopt_ccid()
488 kfree(val); in dccp_setsockopt_ccid()
496 int val, err = 0; in do_dccp_setsockopt() local
515 if (get_user(val, (int __user *)optval)) in do_dccp_setsockopt()
519 return dccp_setsockopt_service(sk, val, optval, optlen); in do_dccp_setsockopt()
[all …]
/net/ipv6/
Dipv6_sockglue.c131 int val, valbool; in do_ipv6_setsockopt() local
135 val=0; in do_ipv6_setsockopt()
138 if (get_user(val, (int __user *) optval)) in do_ipv6_setsockopt()
141 val = 0; in do_ipv6_setsockopt()
144 valbool = (val!=0); in do_ipv6_setsockopt()
156 if (val == PF_INET) { in do_ipv6_setsockopt()
320 if (val < -1 || val > 0xff) in do_ipv6_setsockopt()
323 if (val == -1) in do_ipv6_setsockopt()
324 val = 0; in do_ipv6_setsockopt()
325 np->tclass = val; in do_ipv6_setsockopt()
[all …]
/net/sched/
Dem_cmp.c30 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()
Dem_meta.c83 unsigned long val; member
542 static inline struct meta_ops *meta_ops(struct meta_value *val) in meta_ops() argument
544 return &__meta_ops[meta_type(val)][meta_id(val)]; in meta_ops()
565 dst->val = (unsigned long)kmemdup(nla_data(nla), len, GFP_KERNEL); in meta_var_change()
566 if (dst->val == 0UL) in meta_var_change()
574 kfree((void *) v->val); in meta_var_destroy()
588 if (v->val && v->len && in meta_var_dump()
589 nla_put(skb, tlv, v->len, (void *) v->val)) in meta_var_dump()
617 dst->val = *(unsigned long *) nla_data(nla); in meta_int_change()
620 dst->val = nla_get_u32(nla); in meta_int_change()
[all …]
/net/netfilter/
Dnf_sockopt.c64 int val, int get) in nf_sockopt_find() argument
77 if (val >= ops->get_optmin && in nf_sockopt_find()
78 val < ops->get_optmax) in nf_sockopt_find()
81 if (val >= ops->set_optmin && in nf_sockopt_find()
82 val < ops->set_optmax) in nf_sockopt_find()
96 static int nf_sockopt(struct sock *sk, u_int8_t pf, int val, in nf_sockopt() argument
102 ops = nf_sockopt_find(sk, pf, val, get); in nf_sockopt()
107 ret = ops->get(sk, val, opt, len); in nf_sockopt()
109 ret = ops->set(sk, val, opt, *len); in nf_sockopt()
115 int nf_setsockopt(struct sock *sk, u_int8_t pf, int val, char __user *opt, in nf_setsockopt() argument
[all …]
Dxt_u32.c26 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()
Dxt_osf.c293 if (f->wss.val == 0 || window == f->wss.val) in xt_osf_match_packet()
305 if (window == f->wss.val * mss || in xt_osf_match_packet()
306 window == f->wss.val * SMART_MSS_1 || in xt_osf_match_packet()
307 window == f->wss.val * SMART_MSS_2) in xt_osf_match_packet()
311 if (window == f->wss.val * (mss + 40) || in xt_osf_match_packet()
312 window == f->wss.val * (SMART_MSS_1 + 40) || in xt_osf_match_packet()
313 window == f->wss.val * (SMART_MSS_2 + 40)) in xt_osf_match_packet()
317 if ((window % f->wss.val) == 0) in xt_osf_match_packet()
/net/ipv4/
Dip_sockglue.c459 int val = 0, err; in do_ip_setsockopt() local
484 if (get_user(val, (int __user *) optval)) in do_ip_setsockopt()
491 val = (int) ucval; in do_ip_setsockopt()
539 if (val) in do_ip_setsockopt()
545 if (val) in do_ip_setsockopt()
551 if (val) in do_ip_setsockopt()
557 if (val) in do_ip_setsockopt()
563 if (val) in do_ip_setsockopt()
569 if (val) in do_ip_setsockopt()
575 if (val) in do_ip_setsockopt()
[all …]
Dtcp_memcontrol.c77 static int tcp_update_limit(struct mem_cgroup *memcg, u64 val) in tcp_update_limit() argument
90 if (val > RESOURCE_MAX) in tcp_update_limit()
91 val = RESOURCE_MAX; in tcp_update_limit()
96 ret = res_counter_set_limit(&tcp->tcp_memory_allocated, val); in tcp_update_limit()
101 tcp->tcp_prot_mem[i] = min_t(long, val >> PAGE_SHIFT, in tcp_update_limit()
104 if (val == RESOURCE_MAX) in tcp_update_limit()
106 else if (val != RESOURCE_MAX) { in tcp_update_limit()
139 unsigned long long val; in tcp_cgroup_write() local
145 ret = res_counter_memparse_write_strategy(buffer, &val); in tcp_cgroup_write()
148 ret = tcp_update_limit(memcg, val); in tcp_cgroup_write()
[all …]
Dtcp_metrics.c65 u32 val) in tcp_metric_set() argument
67 tm->tcpm_vals[idx] = val; in tcp_metric_set()
72 u32 val) in tcp_metric_set_msecs() argument
74 tm->tcpm_vals[idx] = jiffies_to_msecs(val); in tcp_metric_set_msecs()
102 u32 val; in tcpm_suck_dst() local
106 val = 0; in tcpm_suck_dst()
108 val |= 1 << TCP_METRIC_RTT; in tcpm_suck_dst()
110 val |= 1 << TCP_METRIC_RTTVAR; in tcpm_suck_dst()
112 val |= 1 << TCP_METRIC_SSTHRESH; in tcpm_suck_dst()
114 val |= 1 << TCP_METRIC_CWND; in tcpm_suck_dst()
[all …]
Dtcp.c2388 int val; in do_tcp_setsockopt() local
2399 val = strncpy_from_user(name, optval, in do_tcp_setsockopt()
2401 if (val < 0) in do_tcp_setsockopt()
2403 name[val] = 0; in do_tcp_setsockopt()
2418 if (get_user(val, (int __user *)optval)) in do_tcp_setsockopt()
2428 if (val < TCP_MIN_MSS || val > MAX_TCP_WINDOW) { in do_tcp_setsockopt()
2432 tp->rx_opt.user_mss = val; in do_tcp_setsockopt()
2436 if (val) { in do_tcp_setsockopt()
2453 if (val < 0 || val > 1) in do_tcp_setsockopt()
2456 tp->thin_lto = val; in do_tcp_setsockopt()
[all …]
Dsysfs_net_ipv4.c36 int val, ret; \
37 ret = sscanf(buf, "%d", &val); \
40 if (val < 0) \
42 _var = val; \
/net/9p/
Dprotocol.c109 int8_t *val = va_arg(ap, int8_t *); in p9pdu_vreadf() local
110 if (pdu_read(pdu, val, sizeof(*val))) { in p9pdu_vreadf()
117 int16_t *val = va_arg(ap, int16_t *); in p9pdu_vreadf() local
123 *val = le16_to_cpu(le_val); in p9pdu_vreadf()
127 int32_t *val = va_arg(ap, int32_t *); in p9pdu_vreadf() local
133 *val = le32_to_cpu(le_val); in p9pdu_vreadf()
137 int64_t *val = va_arg(ap, int64_t *); in p9pdu_vreadf() local
143 *val = le64_to_cpu(le_val); in p9pdu_vreadf()
367 int8_t val = va_arg(ap, int); in p9pdu_vwritef() local
368 if (pdu_write(pdu, &val, sizeof(val))) in p9pdu_vwritef()
[all …]
/net/rds/
Dib_ring.c97 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()
Diw_ring.c97 u32 rds_iw_ring_alloc(struct rds_iw_work_ring *ring, u32 val, u32 *pos) in rds_iw_ring_alloc() argument
103 rdsdebug("ring %p val %u next %u free %u\n", ring, val, in rds_iw_ring_alloc()
106 if (val && avail) { in rds_iw_ring_alloc()
107 ret = min(val, avail); in rds_iw_ring_alloc()
117 void rds_iw_ring_free(struct rds_iw_work_ring *ring, u32 val) in rds_iw_ring_free() argument
119 ring->w_free_ptr = (ring->w_free_ptr + val) % ring->w_nr; in rds_iw_ring_free()
120 atomic_add(val, &ring->w_free_ctr); in rds_iw_ring_free()
127 void rds_iw_ring_unalloc(struct rds_iw_work_ring *ring, u32 val) in rds_iw_ring_unalloc() argument
129 ring->w_alloc_ptr = (ring->w_alloc_ptr - val) % ring->w_nr; in rds_iw_ring_unalloc()
130 ring->w_alloc_ctr -= val; in rds_iw_ring_unalloc()
/net/bridge/
Dbr_sysfs_br.c37 unsigned long val; in store_bridge_parm() local
43 val = simple_strtoul(buf, &endp, 0); in store_bridge_parm()
47 err = (*set)(br, val); in store_bridge_parm()
105 static int set_ageing_time(struct net_bridge *br, unsigned long val) in set_ageing_time() argument
107 br->ageing_time = clock_t_to_jiffies(val); in set_ageing_time()
134 unsigned long val; in store_stp_state() local
139 val = simple_strtoul(buf, &endp, 0); in store_stp_state()
145 br_stp_set_enabled(br, val); in store_stp_state()
167 unsigned long val; in store_group_fwd_mask() local
172 val = simple_strtoul(buf, &endp, 0); in store_group_fwd_mask()
[all …]
/net/bluetooth/
Dhci_sysfs.c275 unsigned int val; in store_idle_timeout() local
278 rv = kstrtouint(buf, 0, &val); in store_idle_timeout()
282 if (val != 0 && (val < 500 || val > 3600000)) in store_idle_timeout()
285 hdev->idle_timeout = val; in store_idle_timeout()
302 u16 val; in store_sniff_max_interval() local
305 rv = kstrtou16(buf, 0, &val); in store_sniff_max_interval()
309 if (val == 0 || val % 2 || val < hdev->sniff_min_interval) in store_sniff_max_interval()
312 hdev->sniff_max_interval = val; in store_sniff_max_interval()
329 u16 val; in store_sniff_min_interval() local
332 rv = kstrtou16(buf, 0, &val); in store_sniff_min_interval()
[all …]
/net/core/
Dsock.c625 int val; in sock_setsockopt() local
640 if (get_user(val, (int __user *)optval)) in sock_setsockopt()
643 valbool = val ? 1 : 0; in sock_setsockopt()
649 if (val && !capable(CAP_NET_ADMIN)) in sock_setsockopt()
678 val = min_t(u32, val, sysctl_wmem_max); in sock_setsockopt()
681 sk->sk_sndbuf = max_t(int, val * 2, SOCK_MIN_SNDBUF); in sock_setsockopt()
699 val = min_t(u32, val, sysctl_rmem_max); in sock_setsockopt()
717 sk->sk_rcvbuf = max_t(int, val * 2, SOCK_MIN_RCVBUF); in sock_setsockopt()
745 if ((val >= 0 && val <= 6) || in sock_setsockopt()
747 sk->sk_priority = val; in sock_setsockopt()
[all …]
Dutils.c58 unsigned int val; in in_aton() local
65 val = 0; in in_aton()
67 val *= 10; in in_aton()
68 val += *str - '0'; in in_aton()
71 l |= val; in in_aton()
93 int val; in xdigit2bin() local
102 val = hex_to_bin(c); in xdigit2bin()
103 if (val >= 0) in xdigit2bin()
104 return val | IN6PTON_XDIGIT | (val < 10 ? IN6PTON_DIGIT : 0); in xdigit2bin()
/net/mac80211/
Dmichael.c16 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/
Dl2tp_ppp.c1007 int val = (int) arg; in pppol2tp_session_ioctl() local
1073 if (get_user(val, (int __user *) arg)) in pppol2tp_session_ioctl()
1076 session->mru = val; in pppol2tp_session_ioctl()
1094 if (get_user(val, (int __user *) arg)) in pppol2tp_session_ioctl()
1096 ps->flags = val; in pppol2tp_session_ioctl()
1261 int optname, int val) in pppol2tp_tunnel_setsockopt() argument
1267 tunnel->debug = val; in pppol2tp_tunnel_setsockopt()
1284 int optname, int val) in pppol2tp_session_setsockopt() argument
1291 if ((val != 0) && (val != 1)) { in pppol2tp_session_setsockopt()
1295 session->recv_seq = val ? -1 : 0; in pppol2tp_session_setsockopt()
[all …]
/net/sctp/
Dsocket.c2152 int val; in sctp_setsockopt_disable_fragments() local
2157 if (get_user(val, (int __user *)optval)) in sctp_setsockopt_disable_fragments()
2160 sctp_sk(sk)->disable_fragments = (val == 0) ? 0 : 1; in sctp_setsockopt_disable_fragments()
2801 int val; in sctp_setsockopt_nodelay() local
2805 if (get_user(val, (int __user *)optval)) in sctp_setsockopt_nodelay()
2808 sctp_sk(sk)->nodelay = (val == 0) ? 0 : 1; in sctp_setsockopt_nodelay()
2951 int val; in sctp_setsockopt_mappedv4() local
2956 if (get_user(val, (int __user *)optval)) in sctp_setsockopt_mappedv4()
2958 if (val) in sctp_setsockopt_mappedv4()
2998 int val; in sctp_setsockopt_maxseg() local
[all …]
/net/packet/
Daf_packet.c3112 int val; in packet_setsockopt() local
3114 if (optlen != sizeof(val)) in packet_setsockopt()
3116 if (copy_from_user(&val, optval, sizeof(val))) in packet_setsockopt()
3119 pkt_sk(sk)->copy_thresh = val; in packet_setsockopt()
3124 int val; in packet_setsockopt() local
3126 if (optlen != sizeof(val)) in packet_setsockopt()
3128 if (copy_from_user(&val, optval, sizeof(val))) in packet_setsockopt()
3130 switch (val) { in packet_setsockopt()
3142 po->tp_version = val; in packet_setsockopt()
3150 unsigned int val; in packet_setsockopt() local
[all …]
/net/irda/irnet/
Dirnet_ppp.c645 int val; in dev_irnet_ioctl() local
663 if(get_user(val, (int __user *)argp)) in dev_irnet_ioctl()
665 if((val == N_SYNC_PPP) || (val == N_PPP)) in dev_irnet_ioctl()
820 val = 0; in dev_irnet_ioctl()
821 if(put_user(val, (int __user *)argp)) in dev_irnet_ioctl()
1026 int val; in ppp_irnet_ioctl() local
1041 val = ap->flags | ap->rbits; in ppp_irnet_ioctl()
1042 if(put_user(val, (int __user *) argp)) in ppp_irnet_ioctl()
1047 if(get_user(val, (int __user *) argp)) in ppp_irnet_ioctl()
1049 ap->flags = val & ~SC_RCV_BITS; in ppp_irnet_ioctl()
[all …]

123456