亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? slhc.c

?? <Linux1.0核心游記>電子書+書后源碼+Linux1.0源碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
	if((deltaA = ntohl(th->ack_seq) - ntohl(oth->ack_seq)) != 0L){		if(deltaA > 0x0000ffff)			goto uncompressed;		cp = encode(cp,deltaA);		changes |= NEW_A;	}	if((deltaS = ntohl(th->seq) - ntohl(oth->seq)) != 0L){		if(deltaS > 0x0000ffff)			goto uncompressed;		cp = encode(cp,deltaS);		changes |= NEW_S;	}		switch(changes){	case 0:	/* Nothing changed. If this packet contains data and the		 * last one didn't, this is probably a data packet following		 * an ack (normal on an interactive connection) and we send		 * it compressed.  Otherwise it's probably a retransmit,		 * retransmitted ack or window probe.  Send it uncompressed		 * in case the other side missed the compressed version.		 */		if(ip->tot_len != cs->cs_ip.tot_len && 		   ntohs(cs->cs_ip.tot_len) == hlen)			break;		DPRINT(("comp: retrans\n"));		goto uncompressed;		break;	case SPECIAL_I:	case SPECIAL_D:		/* actual changes match one of our special case encodings --		 * send packet uncompressed.		 */		DPRINT(("comp: special\n"));		goto uncompressed;	case NEW_S|NEW_A:		if(deltaS == deltaA &&		    deltaS == ntohs(cs->cs_ip.tot_len) - hlen){			/* special case for echoed terminal traffic */			changes = SPECIAL_I;			cp = new_seq;		}		break;	case NEW_S:		if(deltaS == ntohs(cs->cs_ip.tot_len) - hlen){			/* special case for data xfer */			changes = SPECIAL_D;			cp = new_seq;		}		break;	}	deltaS = ntohs(ip->id) - ntohs(cs->cs_ip.id);	if(deltaS != 1){		cp = encode(cp,deltaS);		changes |= NEW_I;	}	if(th->psh)		changes |= TCP_PUSH_BIT;	/* Grab the cksum before we overwrite it below.  Then update our	 * state with this packet's header.	 */	deltaA = ntohs(th->check);	memcpy(&cs->cs_ip,ip,20);	memcpy(&cs->cs_tcp,th,20);	/* We want to use the original packet as our compressed packet.	 * (cp - new_seq) is the number of bytes we need for compressed	 * sequence numbers.  In addition we need one byte for the change	 * mask, one for the connection id and two for the tcp checksum.	 * So, (cp - new_seq) + 4 bytes of header are needed.	 */	deltaS = cp - new_seq;	if(compress_cid == 0 || comp->xmit_current != cs->cs_this){		cp = ocp;		*cpp = ocp;		*cp++ = changes | NEW_C;		*cp++ = cs->cs_this;		comp->xmit_current = cs->cs_this;	} else {		cp = ocp;		*cpp = ocp;		*cp++ = changes;	}	cp = put16(cp,(short)deltaA);	/* Write TCP checksum *//* deltaS is now the size of the change section of the compressed header */	DPRINT(("comp: %x %x %x %d %d\n", icp, cp, new_seq, hlen, deltaS));	memcpy(cp,new_seq,deltaS);	/* Write list of deltas */	memcpy(cp+deltaS,icp+hlen,isize-hlen);	comp->sls_o_compressed++;	ocp[0] |= SL_TYPE_COMPRESSED_TCP;	return isize - hlen + deltaS + (cp - ocp);	/* Update connection state cs & send uncompressed packet (i.e.,	 * a regular ip/tcp packet but with the 'conversation id' we hope	 * to use on future compressed packets in the protocol field).	 */uncompressed:	memcpy(&cs->cs_ip,ip,20);	memcpy(&cs->cs_tcp,th,20);	if (ip->ihl > 5)	  memcpy(cs->cs_ipopt, ip+1, ((ip->ihl) - 5) * 4);	if (th->doff > 5)	  memcpy(cs->cs_tcpopt, th+1, ((th->doff) - 5) * 4);	comp->xmit_current = cs->cs_this;	comp->sls_o_uncompressed++;	memcpy(ocp, icp, isize);	*cpp = ocp;	ocp[9] = cs->cs_this;	ocp[0] |= SL_TYPE_UNCOMPRESSED_TCP;	return isize;}intslhc_uncompress(struct slcompress *comp, unsigned char *icp, int isize){	register int changes;	long x;	register struct tcphdr *thp;	register struct iphdr *ip;	register struct cstate *cs;	int len, hdrlen;	unsigned char *cp = icp;	/* We've got a compressed packet; read the change byte */	comp->sls_i_compressed++;	if(isize < 3){		comp->sls_i_error++;		DPRINT(("uncomp: runt\n"));		return 0;	}	changes = *cp++;	if(changes & NEW_C){		/* Make sure the state index is in range, then grab the state.		 * If we have a good state index, clear the 'discard' flag.		 */		x = *cp++;	/* Read conn index */		if(x < 0 || x > comp->rslot_limit)			goto bad;		comp->flags &=~ SLF_TOSS;		comp->recv_current = x;	} else {		/* this packet has an implicit state index.  If we've		 * had a line error since the last time we got an		 * explicit state index, we have to toss the packet. */		if(comp->flags & SLF_TOSS){			comp->sls_i_tossed++;			DPRINT(("uncomp: toss\n"));			return 0;		}	}	cs = &comp->rstate[comp->recv_current];	thp = &cs->cs_tcp;	ip = &cs->cs_ip;	if((x = pull16(&cp)) == -1) {	/* Read the TCP checksum */		DPRINT(("uncomp: bad tcp chk\n"));		goto bad;        }	thp->check = htons(x);	thp->psh = (changes & TCP_PUSH_BIT) ? 1 : 0;/*  * we can use the same number for the length of the saved header and * the current one, because the packet wouldn't have been sent * as compressed unless the options were the same as the previous one */	hdrlen = ip->ihl * 4 + thp->doff * 4;	switch(changes & SPECIALS_MASK){	case SPECIAL_I:		/* Echoed terminal traffic */		{		register short i;		i = ntohs(ip->tot_len) - hdrlen;		thp->ack_seq = htonl( ntohl(thp->ack_seq) + i);		thp->seq = htonl( ntohl(thp->seq) + i);		}		break;	case SPECIAL_D:			/* Unidirectional data */		thp->seq = htonl( ntohl(thp->seq) +				  ntohs(ip->tot_len) - hdrlen);		break;	default:		if(changes & NEW_U){			thp->urg = 1;			if((x = decode(&cp)) == -1) {				DPRINT(("uncomp: bad U\n"));				goto bad;			}			thp->urg_ptr = htons(x);		} else			thp->urg = 0;		if(changes & NEW_W){			if((x = decode(&cp)) == -1) {				DPRINT(("uncomp: bad W\n"));				goto bad;			}				thp->window = htons( ntohs(thp->window) + x);		}		if(changes & NEW_A){			if((x = decode(&cp)) == -1) {				DPRINT(("uncomp: bad A\n"));				goto bad;			}			thp->ack_seq = htonl( ntohl(thp->ack_seq) + x);		}		if(changes & NEW_S){			if((x = decode(&cp)) == -1) {				DPRINT(("uncomp: bad S\n"));				goto bad;			}			thp->seq = htonl( ntohl(thp->seq) + x);		}		break;	}	if(changes & NEW_I){		if((x = decode(&cp)) == -1) {			DPRINT(("uncomp: bad I\n"));			goto bad;		}		ip->id = htons (ntohs (ip->id) + x);	} else		ip->id = htons (ntohs (ip->id) + 1);	/*	 * At this point, cp points to the first byte of data in the	 * packet.  Put the reconstructed TCP and IP headers back on the	 * packet.  Recalculate IP checksum (but not TCP checksum).	 */	len = isize - (cp - icp);	if (len < 0)		goto bad;	len += hdrlen;	ip->tot_len = htons(len);	ip->check = 0;	DPRINT(("uncomp: %d %d %d %d\n", cp - icp, hdrlen, isize, len));	memmove(icp + hdrlen, cp, len - hdrlen);	cp = icp;	memcpy(cp, ip, 20);	cp += 20;	if (ip->ihl > 5) {	  memcpy(cp, cs->cs_ipopt, ((ip->ihl) - 5) * 4);	  cp += ((ip->ihl) - 5) * 4;	}	((struct iphdr *)icp)->check = ip_csum((struct iphdr*)icp);	memcpy(cp, thp, 20);	cp += 20;	if (thp->doff > 5) {	  memcpy(cp, cs->cs_tcpopt, ((thp->doff) - 5) * 4);	  cp += ((thp->doff) - 5) * 4;	}if (inet_debug == DBG_SLIP) printk("\runcomp: change %x len %d\n", changes, len);	return len;bad:	comp->sls_i_error++;	return slhc_toss( comp );}intslhc_remember(struct slcompress *comp, unsigned char *icp, int isize){	register struct cstate *cs;	short ip_len;	struct iphdr *ip;	struct tcphdr *thp;	unsigned char index;	if(isize < 20) {		/* The packet is shorter than a legal IP header */		comp->sls_i_runt++;		return slhc_toss( comp );	}	/* Sneak a peek at the IP header's IHL field to find its length */	ip_len = (icp[0] & 0xf) << 2;	if(ip_len < 20){		/* The IP header length field is too small */		comp->sls_i_runt++;		return slhc_toss( comp );	}	index = icp[9];	icp[9] = IPPROTO_TCP;	ip = (struct iphdr *) icp;	if (ip_csum(ip)) {		/* Bad IP header checksum; discard */		comp->sls_i_badcheck++;		return slhc_toss( comp );	}	thp = (struct tcphdr *)(((unsigned char *)ip) + ip->ihl*4);	if(index > comp->rslot_limit) {		comp->sls_i_error++;		return slhc_toss(comp);	}	/* Update local state */	cs = &comp->rstate[comp->recv_current = index];	comp->flags &=~ SLF_TOSS;	memcpy(&cs->cs_ip,ip,20);	memcpy(&cs->cs_tcp,thp,20);	if (ip->ihl > 5)	  memcpy(cs->cs_ipopt, ip+1, ((ip->ihl) - 5) * 4);	if (thp->doff > 5)	  memcpy(cs->cs_tcpopt, thp+1, ((thp->doff) - 5) * 4);	cs->cs_hsize = ip->ihl*2 + thp->doff*2;	/* Put headers back on packet	 * Neither header checksum is recalculated	 */	comp->sls_i_uncompressed++;	return isize;}intslhc_toss(struct slcompress *comp){	if ( comp == NULLSLCOMPR )		return 0;	comp->flags |= SLF_TOSS;	return 0;}void slhc_i_status(struct slcompress *comp){	if (comp != NULLSLCOMPR) {		printk("\t%ld Cmp, %ld Uncmp, %ld Bad, %ld Tossed\n",			comp->sls_i_compressed,			comp->sls_i_uncompressed,			comp->sls_i_error,			comp->sls_i_tossed);	}}void slhc_o_status(struct slcompress *comp){	if (comp != NULLSLCOMPR) {		printk("\t%ld Cmp, %ld Uncmp, %ld AsIs, %ld NotTCP\n",			comp->sls_o_compressed,			comp->sls_o_uncompressed,			comp->sls_o_tcp,			comp->sls_o_nontcp);		printk("\t%10ld Searches, %10ld Misses\n",			comp->sls_o_searches,			comp->sls_o_misses);	}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人禁用看黄a在线| 亚洲午夜久久久久久久久电影院| 久久精品噜噜噜成人88aⅴ| 欧美欧美欧美欧美| 久久成人免费电影| 国产日韩三级在线| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 麻豆91小视频| 欧美精品一区视频| av成人老司机| 亚洲午夜激情av| 日韩欧美区一区二| 成人精品免费看| 一区二区三区四区高清精品免费观看 | 欧美四级电影网| 日本一不卡视频| 久久精品一区二区三区不卡 | 婷婷丁香激情综合| 精品福利一二区| www.亚洲人| 天堂一区二区在线| 国产日韩欧美精品综合| 91成人免费电影| 国产资源在线一区| 一区二区三区四区国产精品| 日韩欧美国产一区在线观看| av一本久道久久综合久久鬼色| 亚洲国产乱码最新视频 | 欧美激情在线一区二区三区| 在线精品国精品国产尤物884a| 美女任你摸久久| 自拍偷拍欧美激情| 欧美一激情一区二区三区| 国产成人精品一区二区三区四区 | 欧美成人在线直播| proumb性欧美在线观看| 午夜精品福利一区二区蜜股av| 久久久激情视频| 91精品欧美久久久久久动漫| 国产精品中文欧美| 日韩制服丝袜av| 综合在线观看色| 久久蜜桃av一区精品变态类天堂 | 国产成人免费视频精品含羞草妖精| 又紧又大又爽精品一区二区| 久久久久国产精品麻豆| 欧美精品v国产精品v日韩精品| a美女胸又www黄视频久久| 激情深爱一区二区| 亚洲成人免费影院| 亚洲日本va在线观看| 国产清纯在线一区二区www| 欧美日韩大陆在线| 91国偷自产一区二区三区观看 | 午夜精品成人在线| 亚洲欧美另类久久久精品| 欧美精品一区二| 日韩一级完整毛片| 欧美高清视频在线高清观看mv色露露十八| 国产成a人无v码亚洲福利| 久久成人精品无人区| 日韩电影在线观看一区| 亚洲一区在线观看视频| 亚洲男人的天堂在线aⅴ视频| 国产女人水真多18毛片18精品视频| 日韩欧美一级精品久久| 555夜色666亚洲国产免| 欧美精选午夜久久久乱码6080| 亚洲人成伊人成综合网小说| 欧美主播一区二区三区| 亚洲成人tv网| 亚洲欧洲国产专区| 中文字幕第一区| 国产喷白浆一区二区三区| 国产69精品久久777的优势| 国产精品美女视频| 国产丝袜美腿一区二区三区| 欧美成人猛片aaaaaaa| 日韩欧美视频一区| 欧美一区二区二区| 欧美成人aa大片| 精品免费日韩av| 国产午夜精品美女毛片视频| 国产欧美一区二区精品仙草咪| 久久久精品2019中文字幕之3| 久久亚洲精华国产精华液| 国产欧美日韩中文久久| 国产精品美女久久久久久久久| 国产精品不卡在线| 亚洲人一二三区| 日韩经典一区二区| 久久精品999| 粉嫩久久99精品久久久久久夜| 成人黄色国产精品网站大全在线免费观看 | 自拍偷拍国产亚洲| 亚洲一级不卡视频| 视频一区二区三区中文字幕| 免费人成在线不卡| 国产真实精品久久二三区| 成人av在线电影| 在线免费观看视频一区| 51精品国自产在线| 久久综合999| 亚洲欧美在线观看| 亚洲不卡在线观看| 韩国精品一区二区| 99精品国产热久久91蜜凸| 欧美精品v国产精品v日韩精品| 26uuu国产在线精品一区二区| 国产精品毛片大码女人| 亚洲va欧美va人人爽午夜| 美女免费视频一区二区| www.综合网.com| 欧美肥大bbwbbw高潮| 久久美女艺术照精彩视频福利播放 | 成人91在线观看| 欧美日韩国产在线播放网站| 欧美精品一区二区三| 一区二区视频在线| 久久精品国产99久久6| 成人av影视在线观看| 欧美精品久久一区二区三区| 国产精品全国免费观看高清| 五月开心婷婷久久| 成人97人人超碰人人99| 日韩视频永久免费| 亚洲男人的天堂av| 国产精品亚洲第一区在线暖暖韩国| 色菇凉天天综合网| 久久亚洲影视婷婷| 日韩电影在线免费| 91啪九色porn原创视频在线观看| 日韩免费高清av| 亚洲成av人片一区二区| 99久久777色| 久久久欧美精品sm网站| 青青草原综合久久大伊人精品优势| 99久久婷婷国产| 国产日韩欧美不卡在线| 久久av老司机精品网站导航| 91激情在线视频| 亚洲图片欧美激情| 国产大片一区二区| 精品国产精品一区二区夜夜嗨| 亚洲第一福利一区| 在线视频综合导航| 亚洲精品va在线观看| 成人在线视频一区| 国产日韩精品久久久| 久久国产尿小便嘘嘘尿| 欧美另类高清zo欧美| 一个色综合网站| 色诱亚洲精品久久久久久| 国产精品麻豆视频| 丁香另类激情小说| 久久久久97国产精华液好用吗| 美美哒免费高清在线观看视频一区二区| 在线看不卡av| 一区二区高清免费观看影视大全| 99国内精品久久| 国产精品久久久久久久久晋中| 国产99一区视频免费| 日本一区二区三区四区| 国产精品一区二区在线观看网站 | 欧美精品电影在线播放| 午夜精品久久久久久久99樱桃| 欧美图片一区二区三区| 亚洲午夜一区二区| 欧美日韩国产另类不卡| 丝袜a∨在线一区二区三区不卡| 欧美日韩中文字幕精品| 午夜精品福利一区二区三区蜜桃| 欧美精品在线一区二区三区| 日韩精品一二三区| 精品日本一线二线三线不卡| 男女性色大片免费观看一区二区 | 国产欧美中文在线| 成人激情免费视频| 亚洲色欲色欲www| 欧美日韩一级视频| 美腿丝袜亚洲三区| 久久午夜羞羞影院免费观看| 国产91精品露脸国语对白| 国产精品成人一区二区三区夜夜夜| 97精品久久久久中文字幕| 亚洲午夜电影网| 日韩一级在线观看| 成人在线视频一区二区| 亚洲乱码中文字幕综合| 欧美剧情电影在线观看完整版免费励志电影 | 韩国三级电影一区二区| 国产欧美日韩精品一区| 色综合天天狠狠| 日本vs亚洲vs韩国一区三区二区 | 不卡电影一区二区三区| 亚洲码国产岛国毛片在线| 91激情五月电影| 精品系列免费在线观看| 国产精品久久久久影院亚瑟| 欧美日韩激情一区二区|