nlh = NLMSG_PUT(skb, pid, seq, TCPDIAG_GETSOCK, sizeof(*r)); 
nlh = NLMSG_PUT(skb, pid, seq, unlh->nlmsg_type, sizeof(*r)); 
static int tcpdiag_fill_req(struct sk_buff *skb, struct sock *sk,			    struct request_sock *req,			    u32 pid, u32 seq){	const struct inet_request_sock *ireq = inet_rsk(req);	struct inet_sock *inet = inet_sk(sk);	unsigned char *b = skb->tail;	struct tcpdiagmsg *r;	struct nlmsghdr *nlh;	long tmo;	nlh = NLMSG_PUT(skb, pid, seq, TCPDIAG_GETSOCK, sizeof(*r));	nlh->nlmsg_flags = NLM_F_MULTI;	r = NLMSG_DATA(nlh);	r->tcpdiag_family = sk->sk_family;	r->tcpdiag_state = TCP_SYN_RECV;	r->tcpdiag_timer = 1;	r->tcpdiag_retrans = req->retrans;	r->id.tcpdiag_if = sk->sk_bound_dev_if;	r->id.tcpdiag_cookie[0] = (u32)(unsigned long)req;	r->id.tcpdiag_cookie[1] = (u32)(((unsigned long)req >> 31) >> 1);	tmo = req->expires - jiffies;	if (tmo < 0)		tmo = 0;	r->id.tcpdiag_sport = inet->sport;	r->id.tcpdiag_dport = ireq->rmt_port;	r->id.tcpdiag_src[0] = ireq->loc_addr;	r->id.tcpdiag_dst[0] = ireq->rmt_addr;	r->tcpdiag_expires = jiffies_to_msecs(tmo),	r->tcpdiag_rqueue = 0;	r->tcpdiag_wqueue = 0;	r->tcpdiag_uid = sock_i_uid(sk);	r->tcpdiag_inode = 0;#ifdef CONFIG_IP_TCPDIAG_IPV6	if (r->tcpdiag_family == AF_INET6) {		ipv6_addr_copy((struct in6_addr *)r->id.tcpdiag_src,			       &tcp6_rsk(req)->loc_addr);		ipv6_addr_copy((struct in6_addr *)r->id.tcpdiag_dst,			       &tcp6_rsk(req)->rmt_addr);	}#endif	nlh->nlmsg_len = skb->tail - b;	return skb->len;nlmsg_failure:	skb_trim(skb, b - skb->data);	return -1;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/540722ffc3a0d7e11d97a13e1ce6f3bc23b061c1/tcp_diag.c/buggy/net/ipv4/tcp_diag.c