skb_unlink(ack); 
skb_unlink(ack, q); 
int dn_nsp_check_xmit_queue(struct sock *sk, struct sk_buff *skb, struct sk_buff_head *q, unsigned short acknum){	struct dn_skb_cb *cb = DN_SKB_CB(skb);	struct dn_scp *scp = DN_SK(sk);	struct sk_buff *skb2, *list, *ack = NULL;	int wakeup = 0;	int try_retrans = 0;	unsigned long reftime = cb->stamp;	unsigned long pkttime;	unsigned short xmit_count;	unsigned short segnum;	skb2 = q->next;	list = (struct sk_buff *)q;	while(list != skb2) {		struct dn_skb_cb *cb2 = DN_SKB_CB(skb2);		if (dn_before_or_equal(cb2->segnum, acknum))			ack = skb2;		/* printk(KERN_DEBUG "ack: %s %04x %04x\n", ack ? "ACK" : "SKIP", (int)cb2->segnum, (int)acknum); */		skb2 = skb2->next;		if (ack == NULL)			continue;		/* printk(KERN_DEBUG "check_xmit_queue: %04x, %d\n", acknum, cb2->xmit_count); */		/* Does _last_ packet acked have xmit_count > 1 */		try_retrans = 0;		/* Remember to wake up the sending process */		wakeup = 1;		/* Keep various statistics */		pkttime = cb2->stamp;		xmit_count = cb2->xmit_count;		segnum = cb2->segnum;		/* Remove and drop ack'ed packet */		skb_unlink(ack);		kfree_skb(ack);		ack = NULL;		/*		 * We don't expect to see acknowledgements for packets we		 * haven't sent yet.		 */		WARN_ON(xmit_count == 0);		/*		 * If the packet has only been sent once, we can use it		 * to calculate the RTT and also open the window a little		 * further.		 */		if (xmit_count == 1) {			if (dn_equal(segnum, acknum)) 				dn_nsp_rtt(sk, (long)(pkttime - reftime));			if (scp->snd_window < scp->max_window)				scp->snd_window++;		}		/*		 * Packet has been sent more than once. If this is the last		 * packet to be acknowledged then we want to send the next		 * packet in the send queue again (assumes the remote host does		 * go-back-N error control).		 */		if (xmit_count > 1)			try_retrans = 1;	}	if (try_retrans)		dn_nsp_output(sk);	return wakeup;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/8728b834b226ffcf2c94a58530090e292af2a7bf/dn_nsp_out.c/clean/net/decnet/dn_nsp_out.c