__skb_append(skb, buff); 
__skb_append(skb, buff, &sk->sk_write_queue); 
static int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss_now){	struct tcp_sock *tp = tcp_sk(sk);	struct sk_buff *buff;	int nsize;	u16 flags;	nsize = skb_headlen(skb) - len;	if (nsize < 0)		nsize = 0;	if (skb_cloned(skb) &&	    skb_is_nonlinear(skb) &&	    pskb_expand_head(skb, 0, 0, GFP_ATOMIC))		return -ENOMEM;	/* Get a new skb... force flag on. */	buff = sk_stream_alloc_skb(sk, nsize, GFP_ATOMIC);	if (buff == NULL)		return -ENOMEM; /* We'll just try again later. */	sk_charge_skb(sk, buff);	/* Correct the sequence numbers. */	TCP_SKB_CB(buff)->seq = TCP_SKB_CB(skb)->seq + len;	TCP_SKB_CB(buff)->end_seq = TCP_SKB_CB(skb)->end_seq;	TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(buff)->seq;	/* PSH and FIN should only be set in the second packet. */	flags = TCP_SKB_CB(skb)->flags;	TCP_SKB_CB(skb)->flags = flags & ~(TCPCB_FLAG_FIN|TCPCB_FLAG_PSH);	TCP_SKB_CB(buff)->flags = flags;	TCP_SKB_CB(buff)->sacked =		(TCP_SKB_CB(skb)->sacked &		 (TCPCB_LOST | TCPCB_EVER_RETRANS | TCPCB_AT_TAIL));	TCP_SKB_CB(skb)->sacked &= ~TCPCB_AT_TAIL;	if (!skb_shinfo(skb)->nr_frags && skb->ip_summed != CHECKSUM_HW) {		/* Copy and checksum data tail into the new buffer. */		buff->csum = csum_partial_copy_nocheck(skb->data + len, skb_put(buff, nsize),						       nsize, 0);		skb_trim(skb, len);		skb->csum = csum_block_sub(skb->csum, buff->csum, len);	} else {		skb->ip_summed = CHECKSUM_HW;		skb_split(skb, buff, len);	}	buff->ip_summed = skb->ip_summed;	/* Looks stupid, but our code really uses when of	 * skbs, which it never sent before. --ANK	 */	TCP_SKB_CB(buff)->when = TCP_SKB_CB(skb)->when;	buff->stamp = skb->stamp;	if (TCP_SKB_CB(skb)->sacked & TCPCB_LOST) {		tp->lost_out -= tcp_skb_pcount(skb);		tp->left_out -= tcp_skb_pcount(skb);	}	/* Fix up tso_factor for both original and new SKB.  */	tcp_set_skb_tso_segs(sk, skb, mss_now);	tcp_set_skb_tso_segs(sk, buff, mss_now);	if (TCP_SKB_CB(skb)->sacked & TCPCB_LOST) {		tp->lost_out += tcp_skb_pcount(skb);		tp->left_out += tcp_skb_pcount(skb);	}	if (TCP_SKB_CB(buff)->sacked&TCPCB_LOST) {		tp->lost_out += tcp_skb_pcount(buff);		tp->left_out += tcp_skb_pcount(buff);	}	/* Link BUFF into the send queue. */	skb_header_release(buff);	__skb_append(skb, buff);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/8728b834b226ffcf2c94a58530090e292af2a7bf/tcp_output.c/clean/net/ipv4/tcp_output.c