Lines Matching refs:r
22 static void sctp_diag_get_info(struct sock *sk, struct inet_diag_msg *r,
26 static void inet_diag_msg_sctpasoc_fill(struct inet_diag_msg *r, in inet_diag_msg_sctpasoc_fill() argument
39 r->idiag_family = sk->sk_family; in inet_diag_msg_sctpasoc_fill()
40 r->id.idiag_sport = htons(asoc->base.bind_addr.port); in inet_diag_msg_sctpasoc_fill()
41 r->id.idiag_dport = htons(asoc->peer.port); in inet_diag_msg_sctpasoc_fill()
42 r->id.idiag_if = dst ? dst->dev->ifindex : 0; in inet_diag_msg_sctpasoc_fill()
43 sock_diag_save_cookie(sk, r->id.idiag_cookie); in inet_diag_msg_sctpasoc_fill()
47 *(struct in6_addr *)r->id.idiag_src = laddr.v6.sin6_addr; in inet_diag_msg_sctpasoc_fill()
48 *(struct in6_addr *)r->id.idiag_dst = paddr.v6.sin6_addr; in inet_diag_msg_sctpasoc_fill()
52 memset(&r->id.idiag_src, 0, sizeof(r->id.idiag_src)); in inet_diag_msg_sctpasoc_fill()
53 memset(&r->id.idiag_dst, 0, sizeof(r->id.idiag_dst)); in inet_diag_msg_sctpasoc_fill()
55 r->id.idiag_src[0] = laddr.v4.sin_addr.s_addr; in inet_diag_msg_sctpasoc_fill()
56 r->id.idiag_dst[0] = paddr.v4.sin_addr.s_addr; in inet_diag_msg_sctpasoc_fill()
59 r->idiag_state = asoc->state; in inet_diag_msg_sctpasoc_fill()
61 r->idiag_timer = SCTP_EVENT_TIMEOUT_T3_RTX; in inet_diag_msg_sctpasoc_fill()
62 r->idiag_retrans = asoc->rtx_data_chunks; in inet_diag_msg_sctpasoc_fill()
63 r->idiag_expires = jiffies_to_msecs(t3_rtx->expires - jiffies); in inet_diag_msg_sctpasoc_fill()
65 r->idiag_timer = 0; in inet_diag_msg_sctpasoc_fill()
66 r->idiag_retrans = 0; in inet_diag_msg_sctpasoc_fill()
67 r->idiag_expires = 0; in inet_diag_msg_sctpasoc_fill()
133 struct inet_diag_msg *r; in inet_sctp_diag_fill() local
139 nlh = nlmsg_put(skb, portid, seq, unlh->nlmsg_type, sizeof(*r), in inet_sctp_diag_fill()
144 r = nlmsg_data(nlh); in inet_sctp_diag_fill()
148 inet_diag_msg_sctpasoc_fill(r, sk, asoc); in inet_sctp_diag_fill()
150 inet_diag_msg_common_fill(r, sk); in inet_sctp_diag_fill()
151 r->idiag_state = sk->sk_state; in inet_sctp_diag_fill()
152 r->idiag_timer = 0; in inet_sctp_diag_fill()
153 r->idiag_retrans = 0; in inet_sctp_diag_fill()
156 if (inet_diag_msg_attrs_fill(sk, skb, r, ext, user_ns, net_admin)) in inet_sctp_diag_fill()
198 sctp_diag_get_info(sk, r, &infox); in inet_sctp_diag_fill()
224 const struct inet_diag_req_v2 *r; member
258 const struct inet_diag_req_v2 *req = commp->r; in sctp_tsp_dump_one()
306 const struct inet_diag_req_v2 *r = commp->r; in sctp_sock_dump() local
315 if (r->id.idiag_sport != htons(assoc->base.bind_addr.port) && in sctp_sock_dump()
316 r->id.idiag_sport) in sctp_sock_dump()
318 if (r->id.idiag_dport != htons(assoc->peer.port) && in sctp_sock_dump()
319 r->id.idiag_dport) in sctp_sock_dump()
323 inet_sctp_diag_fill(sk, NULL, skb, r, in sctp_sock_dump()
334 if (inet_sctp_diag_fill(sk, assoc, skb, r, in sctp_sock_dump()
358 const struct inet_diag_req_v2 *r = commp->r; in sctp_sock_filter() local
366 if (r->sdiag_family != AF_UNSPEC && sk->sk_family != r->sdiag_family) in sctp_sock_filter()
378 const struct inet_diag_req_v2 *r = commp->r; in sctp_ep_dump() local
389 if (!(r->idiag_states & TCPF_LISTEN) && !list_empty(&ep->asocs)) in sctp_ep_dump()
392 if (r->sdiag_family != AF_UNSPEC && in sctp_ep_dump()
393 sk->sk_family != r->sdiag_family) in sctp_ep_dump()
396 if (r->id.idiag_sport != inet->inet_sport && in sctp_ep_dump()
397 r->id.idiag_sport) in sctp_ep_dump()
400 if (r->id.idiag_dport != inet->inet_dport && in sctp_ep_dump()
401 r->id.idiag_dport) in sctp_ep_dump()
404 if (inet_sctp_diag_fill(sk, NULL, skb, r, in sctp_ep_dump()
419 static void sctp_diag_get_info(struct sock *sk, struct inet_diag_msg *r, in sctp_diag_get_info() argument
425 r->idiag_rqueue = atomic_read(&infox->asoc->rmem_alloc); in sctp_diag_get_info()
426 r->idiag_wqueue = infox->asoc->sndbuf_used; in sctp_diag_get_info()
428 r->idiag_rqueue = sk->sk_ack_backlog; in sctp_diag_get_info()
429 r->idiag_wqueue = sk->sk_max_ack_backlog; in sctp_diag_get_info()
443 .r = req, in sctp_diag_dump_one()
473 const struct inet_diag_req_v2 *r, struct nlattr *bc) in sctp_diag_dump() argument
475 u32 idiag_states = r->idiag_states; in sctp_diag_dump()
480 .r = r, in sctp_diag_dump()