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

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

?? ethernet.c

?? proteus avr單片米 tcp/ip 仿真
?? C
字號:
//********************************************************************************************
//
// File : ethernet.c implement for Ethernet Protocol
//
//********************************************************************************************
//
// Copyright (C) 2007
//
// This program is free software; you can redistribute it and/or modify it under
// the terms of the GNU General Public License as published by the Free Software
// Foundation; either version 2 of the License, or (at your option) any later
// version.
// This program is distributed in the hope that it will be useful, but
//
// WITHOUT ANY WARRANTY;
//
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE. See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the Free Software Foundation, Inc., 51
// Franklin St, Fifth Floor, Boston, MA 02110, USA
//
// http://www.gnu.de/gpl-ger.html
//
//********************************************************************************************
#include "includes.h"
//********************************************************************************************
//
// Ethernet is a large, diverse family of frame-based computer networking technologies 
// that operates at many speeds for local area networks (LANs). 
// The name comes from the physical concept of the ether. 
// It defines a number of wiring and signaling standards for the physical layer, 
// through means of network access at the Media Access Control (MAC)/Data Link Layer, 
// and a common addressing format.
//
// Ethernet has been standardized as IEEE 802.3. 
// The combination of the twisted pair versions of ethernet for connecting end systems to 
// the network with the fiber optic versions for site backbones 
// become the most widespread wired LAN technology in use from the 1990s to the present, 
// largely replacing competing LAN standards such as coaxial cable Ethernet, 
// token ring, FDDI, and ARCNET. In recent years, Wi-Fi, 
// the wireless LAN standardized by IEEE 802.11, 
// has been used instead of Ethernet for many home and small office networks 
// and in addition to Ethernet in larger installations.
//
//
//********************************************************************************************

//********************************************************************************************
//
// Function : eth_generate_header
// Description : generarete ethernet header, contain destination and source MAC address,
// ethernet type.
//
//********************************************************************************************void eth_generate_header ( BYTE *rxtx_buffer, WORD_BYTES type, BYTE *dest_mac ){	BYTE i;	//copy the destination mac from the source and fill my mac into src	for ( i=0; i<sizeof(MAC_ADDR); i++)
	{
		rxtx_buffer[ ETH_DST_MAC_P + i ] = dest_mac[i];
		rxtx_buffer[ ETH_SRC_MAC_P + i ] = avr_mac.byte[i];	}
	rxtx_buffer[ ETH_TYPE_H_P ] = type.byte.high;//HIGH(type);	rxtx_buffer[ ETH_TYPE_L_P ] = type.byte.low;//LOW(type);}
//********************************************************************************************
//
// Function : software_checksum
// Description : 
// The Ip checksum is calculated over the ip header only starting// with the header length field and a total length of 20 bytes// unitl ip.dst// You must set the IP checksum field to zero before you start// the calculation.// len for ip is 20.//// For UDP/TCP we do not make up the required pseudo header. Instead we // use the ip.src and ip.dst fields of the real packet:// The udp checksum calculation starts with the ip.src field// Ip.src=4bytes,Ip.dst=4 bytes,Udp header=8bytes + data length=16+len// In other words the len here is 8 + length over which you actually// want to calculate the checksum.// You must set the checksum field to zero before you start// the calculation.// len for udp is: 8 + 8 + data length// len for tcp is: 4+4 + 20 + option len + data length//// For more information on how this algorithm works see:// http://www.netfor2.com/checksum.html// http://www.msc.uky.edu/ken/cs471/notes/chap3.htm// The RFC has also a C code example: http://www.faqs.org/rfcs/rfc1071.html
//
//********************************************************************************************
WORD software_checksum(BYTE *rxtx_buffer, WORD len, DWORD sum)
{	// build the sum of 16bit words	while(len>1)
	{		sum += 0xFFFF & (*rxtx_buffer<<8|*(rxtx_buffer+1));		rxtx_buffer+=2;		len-=2;	}	// if there is a byte left then add it (padded with zero)	if (len)
	{		sum += 0xFFFF & (*rxtx_buffer<<8);	}	// now calculate the sum over the bytes in the sum	// until the result is only 16bit long	while (sum>>16)
	{		sum = (sum & 0xFFFF)+(sum >> 16);	}	// build 1's complement:	return( (WORD) sum ^ 0xFFFF);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91猫先生在线| 欧美国产在线观看| 国产精品视频线看| 亚洲福利一二三区| 处破女av一区二区| 欧美一区二区三区在| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 午夜视频一区在线观看| 91小视频免费看| 久久久久久久电影| 日本欧美在线观看| 欧美三区在线观看| 亚洲欧美日韩电影| 成人在线视频一区二区| 日韩午夜小视频| 亚洲电影你懂得| 色天天综合久久久久综合片| 欧美国产综合一区二区| 国产精品99久久久久久有的能看| 欧美日韩精品一区二区| 一区二区三区视频在线看| av激情亚洲男人天堂| 中文字幕第一页久久| 精品一区二区免费在线观看| 欧美一区二区三区的| 亚洲成av人在线观看| 欧美性一区二区| 一区二区三区精品久久久| 91亚洲资源网| 亚洲男人的天堂一区二区| 91丨porny丨最新| 日韩毛片精品高清免费| 99久久精品免费| 中文字幕一区二区三区av| www.成人网.com| 国产精品美女久久久久av爽李琼| 成人性生交大片免费看中文| 国产精品人妖ts系列视频| aaa亚洲精品| 亚洲精品中文在线观看| 欧美亚洲综合在线| 丝袜亚洲精品中文字幕一区| 欧美日韩国产影片| 六月丁香婷婷久久| 久久久久99精品一区| 成人高清视频免费观看| 亚洲婷婷在线视频| 欧美午夜一区二区三区| 婷婷综合久久一区二区三区| 日韩一二三四区| 国产一区二区在线观看视频| 国产精品麻豆久久久| 91在线码无精品| 日产国产欧美视频一区精品 | 欧美精品国产精品| 蜜臂av日日欢夜夜爽一区| 欧美成人国产一区二区| 成人性视频网站| 亚洲国产中文字幕| 久久久九九九九| 日本高清不卡在线观看| 麻豆精品视频在线| 国产精品久久久久久久蜜臀| 欧美亚洲高清一区| 精品一区二区三区在线播放| 国产精品乱人伦中文| 精品视频999| 国产麻豆午夜三级精品| 亚洲精品综合在线| 日韩视频不卡中文| 99re66热这里只有精品3直播| 香蕉久久夜色精品国产使用方法| 欧美成人a在线| 欧美亚洲综合网| 国产在线麻豆精品观看| 亚洲精品视频免费看| 久久影院电视剧免费观看| 欧美在线一二三| 国产精品资源网站| 日本一区中文字幕| 亚洲欧美区自拍先锋| 亚洲精品一线二线三线无人区| 欧美不卡123| 92国产精品观看| 国产一区二区三区四区五区美女 | 日本韩国欧美一区二区三区| 麻豆国产欧美日韩综合精品二区 | 亚洲天堂av一区| 精品久久久久久久久久久久久久久| 99在线精品视频| 99久久夜色精品国产网站| 免费黄网站欧美| 亚洲一区二区视频在线观看| 国产农村妇女毛片精品久久麻豆| 欧美一区二区三区精品| 欧洲一区二区av| 北条麻妃一区二区三区| 国产福利一区二区三区在线视频| 日韩高清在线电影| 偷拍日韩校园综合在线| 亚洲伦理在线精品| 国产精品久久久久久一区二区三区| 日韩精品一区二区三区视频| 在线观看精品一区| 91色婷婷久久久久合中文| 国产精品伊人色| 国产精品综合一区二区三区| 韩国成人福利片在线播放| 日韩中文字幕av电影| 亚洲午夜在线视频| 午夜伊人狠狠久久| 亚洲一区二区三区中文字幕在线| 亚洲色图欧美激情| 亚洲激情在线激情| 一个色妞综合视频在线观看| 亚洲综合免费观看高清完整版在线 | 日韩伦理免费电影| 亚洲婷婷综合久久一本伊一区| 国产精品免费久久久久| 中文字幕在线一区免费| 亚洲图片你懂的| 一区二区在线电影| 亚洲精品中文在线影院| 亚洲黄网站在线观看| 亚洲第一精品在线| 日韩高清一区二区| 国产在线精品一区二区三区不卡| 六月丁香婷婷久久| 国产精品乡下勾搭老头1| 成人永久免费视频| 在线视频中文字幕一区二区| 欧美日韩一区二区在线观看 | 正在播放一区二区| 日韩欧美成人一区二区| 欧美一级免费大片| 国产精品青草综合久久久久99| 成人免费一区二区三区在线观看 | 中文字幕一区二区在线观看| 亚洲视频一区在线| 香蕉成人啪国产精品视频综合网 | 91啪亚洲精品| 在线成人免费视频| 久久女同性恋中文字幕| 一区二区三区欧美视频| 人人超碰91尤物精品国产| 久久99热这里只有精品| 国产成人aaaa| 精品视频色一区| 国产欧美一区二区精品秋霞影院 | 免费成人在线播放| 成人一区二区三区视频| 在线观看视频一区二区欧美日韩| 欧美xxxx在线观看| 亚洲色图在线播放| 久久精品国产亚洲a| 91浏览器打开| 日韩写真欧美这视频| 亚洲欧美日韩一区二区 | 国产亚洲精品aa| 亚洲午夜精品在线| 国产精品小仙女| 欧美军同video69gay| 国产精品视频在线看| 美腿丝袜亚洲一区| 日本不卡免费在线视频| 欧美在线观看18| 香蕉成人啪国产精品视频综合网| 欧美高清性hdvideosex| 日韩精品一区第一页| 在线看一区二区| 亚洲一区在线播放| 亚洲综合色视频| 欧美日韩日本视频| 这里是久久伊人| 欧美一级一区二区| 亚洲激情欧美激情| 色综合天天综合| 麻豆成人av在线| 天堂av在线一区| 久久精品视频网| 不卡一卡二卡三乱码免费网站| 亚洲欧洲日韩综合一区二区| 成人动漫一区二区在线| 国产99久久久国产精品免费看 | 亚洲一区二区综合| 亚洲成av人片一区二区三区 | www.久久久久久久久| 色哟哟日韩精品| 在线观看网站黄不卡| 欧美日韩五月天| 美女久久久精品| 国产九九视频一区二区三区| 成人午夜激情影院| 欧美写真视频网站| 欧美电影免费观看高清完整版在| 久久午夜免费电影| 亚洲同性同志一二三专区| 男女激情视频一区| 成人国产精品免费网站| 91麻豆精品国产无毒不卡在线观看|