• Home
  • Raw
  • Download

Lines Matching refs:r

80 	struct inet_diag_msg *r;  in inet_csk_diag_fill()  local
90 nlh = NLMSG_PUT(skb, pid, seq, unlh->nlmsg_type, sizeof(*r)); in inet_csk_diag_fill()
93 r = NLMSG_DATA(nlh); in inet_csk_diag_fill()
110 r->idiag_family = sk->sk_family; in inet_csk_diag_fill()
111 r->idiag_state = sk->sk_state; in inet_csk_diag_fill()
112 r->idiag_timer = 0; in inet_csk_diag_fill()
113 r->idiag_retrans = 0; in inet_csk_diag_fill()
115 r->id.idiag_if = sk->sk_bound_dev_if; in inet_csk_diag_fill()
116 r->id.idiag_cookie[0] = (u32)(unsigned long)sk; in inet_csk_diag_fill()
117 r->id.idiag_cookie[1] = (u32)(((unsigned long)sk >> 31) >> 1); in inet_csk_diag_fill()
119 r->id.idiag_sport = inet->sport; in inet_csk_diag_fill()
120 r->id.idiag_dport = inet->dport; in inet_csk_diag_fill()
121 r->id.idiag_src[0] = inet->rcv_saddr; in inet_csk_diag_fill()
122 r->id.idiag_dst[0] = inet->daddr; in inet_csk_diag_fill()
125 if (r->idiag_family == AF_INET6) { in inet_csk_diag_fill()
128 ipv6_addr_copy((struct in6_addr *)r->id.idiag_src, in inet_csk_diag_fill()
130 ipv6_addr_copy((struct in6_addr *)r->id.idiag_dst, in inet_csk_diag_fill()
138 r->idiag_timer = 1; in inet_csk_diag_fill()
139 r->idiag_retrans = icsk->icsk_retransmits; in inet_csk_diag_fill()
140 r->idiag_expires = EXPIRES_IN_MS(icsk->icsk_timeout); in inet_csk_diag_fill()
142 r->idiag_timer = 4; in inet_csk_diag_fill()
143 r->idiag_retrans = icsk->icsk_probes_out; in inet_csk_diag_fill()
144 r->idiag_expires = EXPIRES_IN_MS(icsk->icsk_timeout); in inet_csk_diag_fill()
146 r->idiag_timer = 2; in inet_csk_diag_fill()
147 r->idiag_retrans = icsk->icsk_probes_out; in inet_csk_diag_fill()
148 r->idiag_expires = EXPIRES_IN_MS(sk->sk_timer.expires); in inet_csk_diag_fill()
150 r->idiag_timer = 0; in inet_csk_diag_fill()
151 r->idiag_expires = 0; in inet_csk_diag_fill()
155 r->idiag_uid = sock_i_uid(sk); in inet_csk_diag_fill()
156 r->idiag_inode = sock_i_ino(sk); in inet_csk_diag_fill()
165 handler->idiag_get_info(sk, r, info); in inet_csk_diag_fill()
186 struct inet_diag_msg *r; in inet_twsk_diag_fill() local
189 unlh->nlmsg_type, sizeof(*r)); in inet_twsk_diag_fill()
191 r = NLMSG_DATA(nlh); in inet_twsk_diag_fill()
200 r->idiag_family = tw->tw_family; in inet_twsk_diag_fill()
201 r->idiag_state = tw->tw_state; in inet_twsk_diag_fill()
202 r->idiag_timer = 0; in inet_twsk_diag_fill()
203 r->idiag_retrans = 0; in inet_twsk_diag_fill()
204 r->id.idiag_if = tw->tw_bound_dev_if; in inet_twsk_diag_fill()
205 r->id.idiag_cookie[0] = (u32)(unsigned long)tw; in inet_twsk_diag_fill()
206 r->id.idiag_cookie[1] = (u32)(((unsigned long)tw >> 31) >> 1); in inet_twsk_diag_fill()
207 r->id.idiag_sport = tw->tw_sport; in inet_twsk_diag_fill()
208 r->id.idiag_dport = tw->tw_dport; in inet_twsk_diag_fill()
209 r->id.idiag_src[0] = tw->tw_rcv_saddr; in inet_twsk_diag_fill()
210 r->id.idiag_dst[0] = tw->tw_daddr; in inet_twsk_diag_fill()
211 r->idiag_state = tw->tw_substate; in inet_twsk_diag_fill()
212 r->idiag_timer = 3; in inet_twsk_diag_fill()
213 r->idiag_expires = DIV_ROUND_UP(tmo * 1000, HZ); in inet_twsk_diag_fill()
214 r->idiag_rqueue = 0; in inet_twsk_diag_fill()
215 r->idiag_wqueue = 0; in inet_twsk_diag_fill()
216 r->idiag_uid = 0; in inet_twsk_diag_fill()
217 r->idiag_inode = 0; in inet_twsk_diag_fill()
223 ipv6_addr_copy((struct in6_addr *)r->id.idiag_src, in inet_twsk_diag_fill()
225 ipv6_addr_copy((struct in6_addr *)r->id.idiag_dst, in inet_twsk_diag_fill()
492 struct inet_diag_req *r = NLMSG_DATA(cb->nlh); in inet_csk_diag_dump() local
494 if (cb->nlh->nlmsg_len > 4 + NLMSG_SPACE(sizeof(*r))) { in inet_csk_diag_dump()
496 struct rtattr *bc = (struct rtattr *)(r + 1); in inet_csk_diag_dump()
520 return inet_csk_diag_fill(sk, skb, r->idiag_ext, in inet_csk_diag_dump()
529 struct inet_diag_req *r = NLMSG_DATA(cb->nlh); in inet_twsk_diag_dump() local
531 if (cb->nlh->nlmsg_len > 4 + NLMSG_SPACE(sizeof(*r))) { in inet_twsk_diag_dump()
533 struct rtattr *bc = (struct rtattr *)(r + 1); in inet_twsk_diag_dump()
556 return inet_twsk_diag_fill(tw, skb, r->idiag_ext, in inet_twsk_diag_dump()
568 struct inet_diag_msg *r; in inet_diag_fill_req() local
572 nlh = NLMSG_PUT(skb, pid, seq, unlh->nlmsg_type, sizeof(*r)); in inet_diag_fill_req()
574 r = NLMSG_DATA(nlh); in inet_diag_fill_req()
576 r->idiag_family = sk->sk_family; in inet_diag_fill_req()
577 r->idiag_state = TCP_SYN_RECV; in inet_diag_fill_req()
578 r->idiag_timer = 1; in inet_diag_fill_req()
579 r->idiag_retrans = req->retrans; in inet_diag_fill_req()
581 r->id.idiag_if = sk->sk_bound_dev_if; in inet_diag_fill_req()
582 r->id.idiag_cookie[0] = (u32)(unsigned long)req; in inet_diag_fill_req()
583 r->id.idiag_cookie[1] = (u32)(((unsigned long)req >> 31) >> 1); in inet_diag_fill_req()
589 r->id.idiag_sport = inet->sport; in inet_diag_fill_req()
590 r->id.idiag_dport = ireq->rmt_port; in inet_diag_fill_req()
591 r->id.idiag_src[0] = ireq->loc_addr; in inet_diag_fill_req()
592 r->id.idiag_dst[0] = ireq->rmt_addr; in inet_diag_fill_req()
593 r->idiag_expires = jiffies_to_msecs(tmo); in inet_diag_fill_req()
594 r->idiag_rqueue = 0; in inet_diag_fill_req()
595 r->idiag_wqueue = 0; in inet_diag_fill_req()
596 r->idiag_uid = sock_i_uid(sk); in inet_diag_fill_req()
597 r->idiag_inode = 0; in inet_diag_fill_req()
599 if (r->idiag_family == AF_INET6) { in inet_diag_fill_req()
600 ipv6_addr_copy((struct in6_addr *)r->id.idiag_src, in inet_diag_fill_req()
602 ipv6_addr_copy((struct in6_addr *)r->id.idiag_dst, in inet_diag_fill_req()
619 struct inet_diag_req *r = NLMSG_DATA(cb->nlh); in inet_diag_dump_reqs() local
642 if (cb->nlh->nlmsg_len > 4 + NLMSG_SPACE(sizeof(*r))) { in inet_diag_dump_reqs()
643 bc = (struct rtattr *)(r + 1); in inet_diag_dump_reqs()
657 if (r->id.idiag_dport != ireq->rmt_port && in inet_diag_dump_reqs()
658 r->id.idiag_dport) in inet_diag_dump_reqs()
704 struct inet_diag_req *r = NLMSG_DATA(cb->nlh); in inet_diag_dump() local
718 if (!(r->idiag_states & (TCPF_LISTEN | TCPF_SYN_RECV))) in inet_diag_dump()
737 if (r->id.idiag_sport != inet->sport && in inet_diag_dump()
738 r->id.idiag_sport) in inet_diag_dump()
741 if (!(r->idiag_states & TCPF_LISTEN) || in inet_diag_dump()
742 r->id.idiag_dport || in inet_diag_dump()
752 if (!(r->idiag_states & TCPF_SYN_RECV)) in inet_diag_dump()
776 if (!(r->idiag_states & ~(TCPF_LISTEN | TCPF_SYN_RECV))) in inet_diag_dump()
800 if (!(r->idiag_states & (1 << sk->sk_state))) in inet_diag_dump()
802 if (r->id.idiag_sport != inet->sport && in inet_diag_dump()
803 r->id.idiag_sport) in inet_diag_dump()
805 if (r->id.idiag_dport != inet->dport && in inet_diag_dump()
806 r->id.idiag_dport) in inet_diag_dump()
816 if (r->idiag_states & TCPF_TIME_WAIT) { in inet_diag_dump()
824 if (r->id.idiag_sport != tw->tw_sport && in inet_diag_dump()
825 r->id.idiag_sport) in inet_diag_dump()
827 if (r->id.idiag_dport != tw->tw_dport && in inet_diag_dump()
828 r->id.idiag_dport) in inet_diag_dump()