kernels/linux-2.4.0/net/decnet/dn_nsp_in.c
/*
 * This function is a universal ack processor.
 */
This function is a universal ack processor.
This function is a universal ack processor .
static int dn_process_ack(struct sock *sk, struct sk_buff *skb, int oth)
{
	unsigned short *ptr = (unsigned short *)skb->data;
	int len = 0;
	unsigned short ack;
	if (skb->len < 2)
		return len;
	if ((ack = dn_ntohs(*ptr)) & 0x8000) {
		skb_pull(skb, 2);
		ptr++;
		len += 2;
		if ((ack & 0x4000) == 0) {
			if (oth) 
				ack ^= 0x2000;
			dn_ack(sk, skb, ack);
		}
	}
	if (skb->len < 2)
		return len;
	if ((ack = dn_ntohs(*ptr)) & 0x8000) {
		skb_pull(skb, 2);
		len += 2;
		if ((ack & 0x4000) == 0) {
			if (oth) 
				ack ^= 0x2000;
			dn_ack(sk, skb, ack);
		}
	}
	return len;
}
static int dn_process_ack ( struct sock * sk , struct sk_buff * skb , int oth ) { unsigned short * ptr = ( unsigned short * ) skb -> data ; int len = 0 ; unsigned short ack ; if ( skb -> len < 2 ) return len ; if ( ( ack = dn_ntohs ( * ptr ) ) & 0x8000 ) { skb_pull ( skb , 2 ) ; ptr ++ ; len += 2 ; if ( ( ack & 0x4000 ) == 0 ) { if ( oth ) ack ^= 0x2000 ; dn_ack ( sk , skb , ack ) ; } } if ( skb -> len < 2 ) return len ; if ( ( ack = dn_ntohs ( * ptr ) ) & 0x8000 ) { skb_pull ( skb , 2 ) ; len += 2 ; if ( ( ack & 0x4000 ) == 0 ) { if ( oth ) ack ^= 0x2000 ; dn_ack ( sk , skb , ack ) ; } } return len ; }
This function is a universal ack processor.
This function is a universal ack processor .