/net/sctp/ |
D | sctp_diag.c | 6 static void sctp_diag_get_info(struct sock *sk, struct inet_diag_msg *r, 10 static void inet_diag_msg_sctpasoc_fill(struct inet_diag_msg *r, in inet_diag_msg_sctpasoc_fill() argument 23 r->idiag_family = sk->sk_family; in inet_diag_msg_sctpasoc_fill() 24 r->id.idiag_sport = htons(asoc->base.bind_addr.port); in inet_diag_msg_sctpasoc_fill() 25 r->id.idiag_dport = htons(asoc->peer.port); in inet_diag_msg_sctpasoc_fill() 26 r->id.idiag_if = dst ? dst->dev->ifindex : 0; in inet_diag_msg_sctpasoc_fill() 27 sock_diag_save_cookie(sk, r->id.idiag_cookie); in inet_diag_msg_sctpasoc_fill() 31 *(struct in6_addr *)r->id.idiag_src = laddr.v6.sin6_addr; in inet_diag_msg_sctpasoc_fill() 32 *(struct in6_addr *)r->id.idiag_dst = paddr.v6.sin6_addr; in inet_diag_msg_sctpasoc_fill() 36 memset(&r->id.idiag_src, 0, sizeof(r->id.idiag_src)); in inet_diag_msg_sctpasoc_fill() [all …]
|
/net/ipv4/ |
D | raw_diag.c | 17 raw_get_hashinfo(const struct inet_diag_req_v2 *r) in raw_get_hashinfo() argument 19 if (r->sdiag_family == AF_INET) { in raw_get_hashinfo() 22 } else if (r->sdiag_family == AF_INET6) { in raw_get_hashinfo() 39 struct inet_diag_req_raw *r = (void *)req; in raw_lookup() local 42 if (r->sdiag_family == AF_INET) in raw_lookup() 43 sk = __raw_v4_lookup(net, from, r->sdiag_raw_protocol, in raw_lookup() 44 r->id.idiag_dst[0], in raw_lookup() 45 r->id.idiag_src[0], in raw_lookup() 46 r->id.idiag_if, 0); in raw_lookup() 49 sk = __raw_v6_lookup(net, from, r->sdiag_raw_protocol, in raw_lookup() [all …]
|
D | inet_diag.c | 71 void inet_diag_msg_common_fill(struct inet_diag_msg *r, struct sock *sk) in inet_diag_msg_common_fill() argument 73 r->idiag_family = sk->sk_family; in inet_diag_msg_common_fill() 75 r->id.idiag_sport = htons(sk->sk_num); in inet_diag_msg_common_fill() 76 r->id.idiag_dport = sk->sk_dport; in inet_diag_msg_common_fill() 77 r->id.idiag_if = sk->sk_bound_dev_if; in inet_diag_msg_common_fill() 78 sock_diag_save_cookie(sk, r->id.idiag_cookie); in inet_diag_msg_common_fill() 82 *(struct in6_addr *)r->id.idiag_src = sk->sk_v6_rcv_saddr; in inet_diag_msg_common_fill() 83 *(struct in6_addr *)r->id.idiag_dst = sk->sk_v6_daddr; in inet_diag_msg_common_fill() 87 memset(&r->id.idiag_src, 0, sizeof(r->id.idiag_src)); in inet_diag_msg_common_fill() 88 memset(&r->id.idiag_dst, 0, sizeof(r->id.idiag_dst)); in inet_diag_msg_common_fill() [all …]
|
D | arp.c | 999 static int arp_req_set_public(struct net *net, struct arpreq *r, in arp_req_set_public() argument 1002 __be32 ip = ((struct sockaddr_in *)&r->arp_pa)->sin_addr.s_addr; in arp_req_set_public() 1003 __be32 mask = ((struct sockaddr_in *)&r->arp_netmask)->sin_addr.s_addr; in arp_req_set_public() 1007 if (!dev && (r->arp_flags & ATF_COM)) { in arp_req_set_public() 1008 dev = dev_getbyhwaddr_rcu(net, r->arp_ha.sa_family, in arp_req_set_public() 1009 r->arp_ha.sa_data); in arp_req_set_public() 1022 static int arp_req_set(struct net *net, struct arpreq *r, in arp_req_set() argument 1029 if (r->arp_flags & ATF_PUBL) in arp_req_set() 1030 return arp_req_set_public(net, r, dev); in arp_req_set() 1032 ip = ((struct sockaddr_in *)&r->arp_pa)->sin_addr.s_addr; in arp_req_set() [all …]
|
D | udp_diag.c | 100 const struct inet_diag_req_v2 *r, struct nlattr *bc) in udp_dump() argument 126 if (!(r->idiag_states & (1 << sk->sk_state))) in udp_dump() 128 if (r->sdiag_family != AF_UNSPEC && in udp_dump() 129 sk->sk_family != r->sdiag_family) in udp_dump() 131 if (r->id.idiag_sport != inet->inet_sport && in udp_dump() 132 r->id.idiag_sport) in udp_dump() 134 if (r->id.idiag_dport != inet->inet_dport && in udp_dump() 135 r->id.idiag_dport) in udp_dump() 138 if (sk_diag_dump(sk, skb, cb, r, bc, net_admin) < 0) { in udp_dump() 153 const struct inet_diag_req_v2 *r, struct nlattr *bc) in udp_diag_dump() argument [all …]
|
/net/decnet/ |
D | dn_rules.c | 63 res->r = arg.rule; in dn_fib_lookup() 110 struct dn_fib_rule *r = (struct dn_fib_rule *)rule; in dn_fib_rule_match() local 115 if (((saddr ^ r->src) & r->srcmask) || in dn_fib_rule_match() 116 ((daddr ^ r->dst) & r->dstmask)) in dn_fib_rule_match() 127 struct dn_fib_rule *r = (struct dn_fib_rule *)rule; in dn_fib_rule_configure() local 147 r->src = nla_get_le16(tb[FRA_SRC]); in dn_fib_rule_configure() 150 r->dst = nla_get_le16(tb[FRA_DST]); in dn_fib_rule_configure() 152 r->src_len = frh->src_len; in dn_fib_rule_configure() 153 r->srcmask = dnet_make_mask(r->src_len); in dn_fib_rule_configure() 154 r->dst_len = frh->dst_len; in dn_fib_rule_configure() [all …]
|
D | dn_fib.c | 165 const struct rtmsg *r) in dn_fib_get_nhs() argument 176 nh->nh_flags = (r->rtm_flags&~0xFF) | nhp->rtnh_flags; in dn_fib_get_nhs() 195 static int dn_fib_check_nh(const struct rtmsg *r, struct dn_fib_info *fi, struct dn_fib_nh *nh) in dn_fib_check_nh() argument 206 if (r->rtm_scope >= RT_SCOPE_LINK) in dn_fib_check_nh() 223 fld.flowidn_scope = r->rtm_scope + 1; in dn_fib_check_nh() 267 struct dn_fib_info *dn_fib_create_info(const struct rtmsg *r, struct nlattr *attrs[], in dn_fib_create_info() argument 275 if (r->rtm_type > RTN_MAX) in dn_fib_create_info() 278 if (dn_fib_props[r->rtm_type].scope > r->rtm_scope) in dn_fib_create_info() 290 fi->fib_protocol = r->rtm_protocol; in dn_fib_create_info() 292 fi->fib_flags = r->rtm_flags; in dn_fib_create_info() [all …]
|
/net/nfc/hci/ |
D | core.c | 81 int r = 0; in nfc_hci_msg_tx_work() local 111 r = nfc_llc_xmit_from_hci(hdev->llc, skb); in nfc_hci_msg_tx_work() 112 if (r < 0) { in nfc_hci_msg_tx_work() 116 msg->cb(msg->cb_context, NULL, r); in nfc_hci_msg_tx_work() 122 if (r) in nfc_hci_msg_tx_work() 302 int r; in nfc_hci_target_discovered() local 312 r = nfc_hci_get_param(hdev, NFC_HCI_RF_READER_A_GATE, in nfc_hci_target_discovered() 314 if (r < 0) in nfc_hci_target_discovered() 317 r = nfc_hci_get_param(hdev, NFC_HCI_RF_READER_A_GATE, in nfc_hci_target_discovered() 319 if (r < 0) in nfc_hci_target_discovered() [all …]
|
D | command.c | 159 int r; in nfc_hci_set_param() local 179 r = nfc_hci_send_cmd(hdev, gate, NFC_HCI_ANY_SET_PARAMETER, in nfc_hci_set_param() 184 return r; in nfc_hci_set_param() 201 int r; in nfc_hci_open_pipe() local 205 r = nfc_hci_execute_cmd(hdev, pipe, NFC_HCI_ANY_OPEN_PIPE, in nfc_hci_open_pipe() 207 if (r == 0) { in nfc_hci_open_pipe() 215 return r; in nfc_hci_open_pipe() 283 int r; in nfc_hci_disconnect_gate() local 291 r = nfc_hci_close_pipe(hdev, pipe); in nfc_hci_disconnect_gate() 292 if (r < 0) in nfc_hci_disconnect_gate() [all …]
|
D | llc_shdlc.c | 154 int r; in llc_shdlc_send_s_frame() local 165 r = shdlc->xmit_to_drv(shdlc->hdev, skb); in llc_shdlc_send_s_frame() 169 return r; in llc_shdlc_send_s_frame() 177 int r; in llc_shdlc_send_u_frame() local 183 r = shdlc->xmit_to_drv(shdlc->hdev, skb); in llc_shdlc_send_u_frame() 187 return r; in llc_shdlc_send_u_frame() 354 static void llc_shdlc_connect_complete(struct llc_shdlc *shdlc, int r) in llc_shdlc_connect_complete() argument 356 pr_debug("result=%d\n", r); in llc_shdlc_connect_complete() 360 if (r == 0) { in llc_shdlc_connect_complete() 370 shdlc->connect_result = r; in llc_shdlc_connect_complete() [all …]
|
/net/sched/ |
D | cls_tcindex.c | 59 static inline int tcindex_filter_is_set(struct tcindex_filter_result *r) in tcindex_filter_is_set() argument 61 return tcf_exts_has_actions(&r->exts) || r->res.classid; in tcindex_filter_is_set() 116 struct tcindex_filter_result *r; in tcindex_get() local 121 r = tcindex_lookup(p, handle); in tcindex_get() 122 return r && tcindex_filter_is_set(r) ? r : NULL; in tcindex_get() 142 static void __tcindex_destroy_rexts(struct tcindex_filter_result *r) in __tcindex_destroy_rexts() argument 144 tcf_exts_destroy(&r->exts); in __tcindex_destroy_rexts() 145 tcf_exts_put_net(&r->exts); in __tcindex_destroy_rexts() 150 struct tcindex_filter_result *r; in tcindex_destroy_rexts_work() local 152 r = container_of(work, struct tcindex_filter_result, work); in tcindex_destroy_rexts_work() [all …]
|
/net/netfilter/ |
D | xt_limit.c | 70 const struct xt_rateinfo *r = par->matchinfo; in limit_mt() local 71 struct xt_limit_priv *priv = r->master; in limit_mt() 76 if (priv->credit > r->credit_cap) in limit_mt() 77 priv->credit = r->credit_cap; in limit_mt() 79 if (priv->credit >= r->cost) { in limit_mt() 81 priv->credit -= r->cost; in limit_mt() 103 struct xt_rateinfo *r = par->matchinfo; in limit_mt_check() local 107 if (r->burst == 0 in limit_mt_check() 108 || user2credits(r->avg * r->burst) < user2credits(r->avg)) { in limit_mt_check() 110 r->avg, r->burst); in limit_mt_check() [all …]
|
D | xt_time.c | 77 static inline unsigned int localtime_1(struct xtm *r, time_t time) in localtime_1() argument 83 r->second = v % 60; in localtime_1() 85 r->minute = w % 60; in localtime_1() 86 r->hour = w / 60; in localtime_1() 90 static inline void localtime_2(struct xtm *r, time_t time) in localtime_2() argument 96 r->dse = time / 86400; in localtime_2() 102 r->weekday = (4 + r->dse - 1) % 7 + 1; in localtime_2() 105 static void localtime_3(struct xtm *r, time_t time) in localtime_3() argument 107 unsigned int year, i, w = r->dse; in localtime_3() 143 r->monthday = w - days_since_leapyear[i] + 1; in localtime_3() [all …]
|
/net/can/ |
D | af_can.c | 466 struct receiver *r; in can_rx_register() local 480 r = kmem_cache_alloc(rcv_cache, GFP_KERNEL); in can_rx_register() 481 if (!r) in can_rx_register() 490 r->can_id = can_id; in can_rx_register() 491 r->mask = mask; in can_rx_register() 492 r->matches = 0; in can_rx_register() 493 r->func = func; in can_rx_register() 494 r->data = data; in can_rx_register() 495 r->ident = ident; in can_rx_register() 496 r->sk = sk; in can_rx_register() [all …]
|
/net/ipx/ |
D | ipx_route.c | 32 struct ipx_route *r; in ipxrtr_lookup() local 35 list_for_each_entry(r, &ipx_routes, node) in ipxrtr_lookup() 36 if (r->ir_net == net) { in ipxrtr_lookup() 37 ipxrtr_hold(r); in ipxrtr_lookup() 40 r = NULL; in ipxrtr_lookup() 43 return r; in ipxrtr_lookup() 93 struct ipx_route *r, *tmp; in ipxrtr_del_routes() local 96 list_for_each_entry_safe(r, tmp, &ipx_routes, node) in ipxrtr_del_routes() 97 if (r->ir_intrfc == intrfc) { in ipxrtr_del_routes() 98 list_del(&r->node); in ipxrtr_del_routes() [all …]
|
/net/nfc/nci/ |
D | hci.c | 159 int len, i, r; in nci_hci_send_data() local 192 r = nci_send_data(ndev, conn_info->conn_id, skb); in nci_hci_send_data() 193 if (r < 0) in nci_hci_send_data() 194 return r; in nci_hci_send_data() 241 int r; in nci_hci_send_cmd() local 257 r = nci_request(ndev, nci_hci_send_data_req, (unsigned long)&data, in nci_hci_send_cmd() 259 if (r == NCI_STATUS_OK) { in nci_hci_send_cmd() 261 r = nci_hci_result_to_errno( in nci_hci_send_cmd() 265 if (!r && skb) in nci_hci_send_cmd() 269 return r; in nci_hci_send_cmd() [all …]
|
/net/smc/ |
D | smc_diag.c | 37 static void smc_diag_msg_common_fill(struct smc_diag_msg *r, struct sock *sk) in smc_diag_msg_common_fill() argument 41 memset(r, 0, sizeof(*r)); in smc_diag_msg_common_fill() 42 r->diag_family = sk->sk_family; in smc_diag_msg_common_fill() 43 sock_diag_save_cookie(sk, r->id.idiag_cookie); in smc_diag_msg_common_fill() 46 r->id.idiag_sport = htons(smc->clcsock->sk->sk_num); in smc_diag_msg_common_fill() 47 r->id.idiag_dport = smc->clcsock->sk->sk_dport; in smc_diag_msg_common_fill() 48 r->id.idiag_if = smc->clcsock->sk->sk_bound_dev_if; in smc_diag_msg_common_fill() 49 r->id.idiag_src[0] = smc->clcsock->sk->sk_rcv_saddr; in smc_diag_msg_common_fill() 50 r->id.idiag_dst[0] = smc->clcsock->sk->sk_daddr; in smc_diag_msg_common_fill() 54 struct smc_diag_msg *r, in smc_diag_msg_attrs_fill() argument [all …]
|
/net/mac80211/ |
D | michael.c | 19 mctx->r ^= rol32(mctx->l, 17); in michael_block() 20 mctx->l += mctx->r; in michael_block() 21 mctx->r ^= ((mctx->l & 0xff00ff00) >> 8) | in michael_block() 23 mctx->l += mctx->r; in michael_block() 24 mctx->r ^= rol32(mctx->l, 3); in michael_block() 25 mctx->l += mctx->r; in michael_block() 26 mctx->r ^= ror32(mctx->l, 2); in michael_block() 27 mctx->l += mctx->r; in michael_block() 43 mctx->r = get_unaligned_le32(key + 4); in michael_mic_hdr() 85 put_unaligned_le32(mctx.r, mic + 4); in michael_mic()
|
D | rc80211_minstrel.c | 67 if (mi->r[i].rix == rix) in rix_to_ndx() 97 struct minstrel_rate_stats *cur_mrs = &mi->r[i].stats; in minstrel_sort_best_tp_rates() 100 tmp_mrs = &mi->r[tp_list[j - 1]].stats; in minstrel_sort_best_tp_rates() 101 if (minstrel_get_tp_avg(&mi->r[i], cur_mrs->prob_ewma) <= in minstrel_sort_best_tp_rates() 102 minstrel_get_tp_avg(&mi->r[tp_list[j - 1]], tmp_mrs->prob_ewma)) in minstrel_sort_best_tp_rates() 116 struct minstrel_rate *r = &mi->r[idx]; in minstrel_set_rate() local 118 ratetbl->rate[offset].idx = r->rix; in minstrel_set_rate() 119 ratetbl->rate[offset].count = r->adjusted_retry_count; in minstrel_set_rate() 120 ratetbl->rate[offset].count_cts = r->retry_count_cts; in minstrel_set_rate() 121 ratetbl->rate[offset].count_rts = r->stats.retry_count_rtscts; in minstrel_set_rate() [all …]
|
/net/core/ |
D | fib_rules.c | 43 struct fib_rule *r; in fib_default_rule_add() local 45 r = kzalloc(ops->rule_size, GFP_KERNEL); in fib_default_rule_add() 46 if (r == NULL) in fib_default_rule_add() 49 refcount_set(&r->refcnt, 1); in fib_default_rule_add() 50 r->action = FR_ACT_TO_TBL; in fib_default_rule_add() 51 r->pref = pref; in fib_default_rule_add() 52 r->table = table; in fib_default_rule_add() 53 r->flags = flags; in fib_default_rule_add() 54 r->fr_net = ops->fro_net; in fib_default_rule_add() 55 r->uid_range = fib_kuid_range_unset; in fib_default_rule_add() [all …]
|
/net/ipv6/ |
D | fib6_rules.c | 35 struct fib6_rule *r = container_of(rule, struct fib6_rule, common); in fib6_rule_matchall() local 37 if (r->dst.plen || r->src.plen || r->tclass) in fib6_rule_matchall() 135 struct fib6_rule *r = (struct fib6_rule *)rule; in fib6_rule_action() local 142 r->src.plen && !(flags & RT6_LOOKUP_F_HAS_SADDR)) { in fib6_rule_action() 151 if (!ipv6_prefix_equal(&saddr, &r->src.addr, in fib6_rule_action() 152 r->src.plen)) in fib6_rule_action() 202 struct fib6_rule *r = (struct fib6_rule *) rule; in fib6_rule_match() local 205 if (r->dst.plen && in fib6_rule_match() 206 !ipv6_prefix_equal(&fl6->daddr, &r->dst.addr, r->dst.plen)) in fib6_rule_match() 214 if (r->src.plen) { in fib6_rule_match() [all …]
|
/net/ceph/crush/ |
D | mapper.c | 76 int x, int r) in bucket_perm_choose() argument 78 unsigned int pr = r % bucket->size; in bucket_perm_choose() 130 bucket->size, x, r, pr, s); in bucket_perm_choose() 136 struct crush_work_bucket *work, int x, int r) in bucket_uniform_choose() argument 138 return bucket_perm_choose(&bucket->h, work, x, r); in bucket_uniform_choose() 143 int x, int r) in bucket_list_choose() argument 149 r, bucket->h.id); in bucket_list_choose() 153 i, x, r, bucket->h.items[i], bucket->item_weights[i], in bucket_list_choose() 197 int x, int r) in bucket_tree_choose() argument 210 t = (__u64)crush_hash32_4(bucket->h.hash, x, n, r, in bucket_tree_choose() [all …]
|
/net/appletalk/ |
D | atalk_proc.c | 83 struct atalk_route *r; in atalk_get_route_idx() local 85 for (r = atalk_routes; pos && r; r = r->next) in atalk_get_route_idx() 88 return r; in atalk_get_route_idx() 102 struct atalk_route *r; in atalk_seq_route_next() local 106 r = NULL; in atalk_seq_route_next() 108 r = atalk_routes; in atalk_seq_route_next() 111 r = v; in atalk_seq_route_next() 112 r = r->next; in atalk_seq_route_next() 114 return r; in atalk_seq_route_next()
|
/net/sunrpc/xprtrdma/ |
D | frwr_ops.c | 99 frwr_op_init_mr(struct rpcrdma_ia *ia, struct rpcrdma_mw *r) in frwr_op_init_mr() argument 102 struct rpcrdma_frmr *f = &r->frmr; in frwr_op_init_mr() 109 r->mw_sg = kcalloc(depth, sizeof(*r->mw_sg), GFP_KERNEL); in frwr_op_init_mr() 110 if (!r->mw_sg) in frwr_op_init_mr() 113 sg_init_table(r->mw_sg, depth); in frwr_op_init_mr() 132 frwr_op_release_mr(struct rpcrdma_mw *r) in frwr_op_release_mr() argument 137 if (!list_empty(&r->mw_list)) in frwr_op_release_mr() 138 list_del(&r->mw_list); in frwr_op_release_mr() 140 rc = ib_dereg_mr(r->frmr.fr_mr); in frwr_op_release_mr() 143 r, rc); in frwr_op_release_mr() [all …]
|
/net/bluetooth/bnep/ |
D | netdev.c | 55 struct bnep_set_filter_req *r; in bnep_net_set_mc_list() local 61 size = sizeof(*r) + (BNEP_MAX_MULTICAST_FILTERS + 1) * ETH_ALEN * 2; in bnep_net_set_mc_list() 68 r = (void *) skb->data; in bnep_net_set_mc_list() 69 __skb_put(skb, sizeof(*r)); in bnep_net_set_mc_list() 71 r->type = BNEP_CONTROL; in bnep_net_set_mc_list() 72 r->ctrl = BNEP_FILTER_MULTI_ADDR_SET; in bnep_net_set_mc_list() 80 r->len = htons(ETH_ALEN * 2); in bnep_net_set_mc_list() 101 r->len = htons(skb->len - len); in bnep_net_set_mc_list()
|