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

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

?? dhcp.h

?? 國外牛人公開的AVR代碼
?? H
字號:
/*! \file dhcp.h \brief DHCP Protocol Library. */
//*****************************************************************************
//
// File Name	: 'dhcp.h'
// Title		: DHCP Protocol Library
// Author		: Pascal Stang
// Created		: 9/17/2005
// Revised		: 9/17/2005
// Version		: 0.1
// Target MCU	: Atmel AVR series
// Editor Tabs	: 4
//
///	\ingroup network
///	\defgroup dhcp DHCP Protocol Library (dhcp.c)
///	\code #include "net/dhcp.h" \endcode
///	\par Description
///		This library provides a limited implementation of DHCP (Dynamic Host
///		Configuration Protocol) as described in RFC2131.  DHCP allows a
///		network device to automatically obtain an IP address and other network
///		configuration settings from a DHCP server.
///		
///	\note This code is currently below version 1.0, and therefore is considered
///	to be lacking in some functionality or documentation, or may not be fully
///	tested.  Nonetheless, you can expect most functions to work.
///
//	This code is distributed under the GNU Public License
//		which can be found at http://www.gnu.org/licenses/gpl.txt
//*****************************************************************************
//@{

#ifndef DHCP_H
#define DHCP_H

#include "global.h"
#include "net.h"

//#define DHCP_DEBUG_PRINT
//#define DHCP_DEBUG

/// Bootp Header (DHCP is transported by BOOTP/UDP/IP)
struct netBootpHeader
{
	uint8_t		op;			///< Message op-code / message type
	uint8_t		htype;		///< Hardware address type   (Ethernet=1)
	uint8_t		hlen;		///< Hardware address length (Ethernet=6 byte MAC addr)
	uint8_t		hops;		///< hop count (client set to zero)
	uint32_t	xid;		///< Transaction ID (randomly chosen by client, must remain same)
	uint16_t	secs;		///< Seconds elapsed since DHCP negotiation began (filled by client)
	uint16_t	flags;		///< Flags
	uint32_t	ciaddr;		///< Client IP address (filled only if already bound, renewing, or rebinding)
	uint32_t	yiaddr;		///< 'Your' IP address (client)
	uint32_t	siaddr;		///< Server IP address
	uint32_t	giaddr;		///< Gateway IP address
	uint8_t		chaddr[16];	///< Client Hardware Address
	uint8_t		sname[64];	///< Server Host Name
	uint8_t		file[128];	///< Boot file name (null-term string)
} GNUC_PACKED;

#define BOOTP_HEADER_LEN		236	///< length of BOOTP header not including options

#define BOOTP_OP_BOOTREQUEST	1	///< BOOTP Request operation (message from client to server)
#define BOOTP_OP_BOOTREPLY		2	///< BOOTP Reply operation (message from server to client)

#define BOOTP_HTYPE_ETHERNET	1
#define BOOTP_HLEN_ETHERNET		6

/// DHCP Header
struct netDhcpHeader
{
	struct netBootpHeader bootp;	///< BOOTP header
	uint32_t	cookie;				///< magic cookie value
	uint8_t		options[];			///< DHCP options
} GNUC_PACKED;

#define DHCP_HEADER_LEN			240	///< length of DHCP header not including options

#define DHCP_UDP_SERVER_PORT	67	///< UDP port where DHCP requests should be sent
#define DHCP_UDP_CLIENT_PORT	68	///< UDP port clients will receive DHCP replies


#define DHCP_OPT_PAD			0	///< token padding value (make be skipped)
#define DHCP_OPT_NETMASK		1	///< subnet mask client should use (4 byte mask)
#define DHCP_OPT_ROUTERS		3	///< routers client should use (IP addr list)
#define DHCP_OPT_TIMESERVERS	4	///< time servers client should use (IP addr list)
#define DHCP_OPT_NAMESERVERS	5	///< name servers client should use (IP addr list)
#define DHCP_OPT_DNSSERVERS		6	///< DNS servers client should use (IP addr list)
#define DHCP_OPT_HOSTNAME		12	///< host name client should use (string)
#define DHCP_OPT_DOMAINNAME		15	///< domain name client should use (string)
#define DHCP_OPT_REQUESTEDIP	50	///< IP address requested by client (IP address)
#define DHCP_OPT_LEASETIME		51	///< DHCP Lease Time (uint32 seconds)
#define DHCP_OPT_DHCPMSGTYPE	53	///< DHCP message type (1 byte)
#define DHCP_OPT_SERVERID		54	///< Server Identifier (IP address)
#define DHCP_OPT_PARAMREQLIST	55	///< Paramerter Request List (n OPT codes)
#define DHCP_OPT_RENEWALTIME	58	///< DHCP Lease Renewal Time (uint32 seconds)
#define DHCP_OPT_REBINDTIME		59	///< DHCP Lease Rebinding Time (uint32 seconds)
#define DHCP_OPT_END			255 ///< token end value (marks end of options list)

#define DHCP_MSG_DHCPDISCOVER	1	///< DISCOVER is broadcast by client to solicit OFFER from any/all DHCP servers.
#define DHCP_MSG_DHCPOFFER		2	///< OFFER(s) are made to client by server to offer IP address and config info.
#define DHCP_MSG_DHCPREQUEST	3	///< REQUEST is made my client in response to best/favorite OFFER message.
#define DHCP_MSG_DHCPDECLINE	4	///< DECLINE may be sent by client to server to indicate IP already in use.
#define DHCP_MSG_DHCPACK		5	///< ACK is sent to client by server in confirmation of REQUEST, contains config and IP.
#define DHCP_MSG_DHCPNAK		6	///< NAK is sent to client by server to indicate problem with REQUEST.
#define DHCP_MSG_DHCPRELEASE	7	///< RELEASE is sent by client to server to relinquish DHCP lease on IP address, etc.
#define DHCP_MSG_DHCPINFORM		8	///< INFORM is sent by client to server to request config info, IP address configured locally.


/*!	Initialize DHCP system.
	Prepares DHCP for use and initializes lease time to zero. */
void dhcpInit(void);

/*!	Processes incoming DHCP packets from UDP port 68.
	This function is to be called by the stack when a DHCP packet
	arrives over the network.  The DHCP packet will be parsed, handled,
	and a response will be generated and sent if needed.  When the DHCP
	process completes, the IP addressing will be automatically updated. */
void dhcpIn(unsigned int len, struct netDhcpHeader* packet);

/*!	Request DHCP assigned network parameters.
	This function begins the DHCP process.  The remainder of operations
	are handled in dhcpIn(). */
void dhcpRequest(void);

/*!	Release DHCP lease and assigned network parameters.
	This function releases the DHCP assigned address and allows the
	DHCP server to reallocate it. */
void dhcpRelease(void);

/*! Periodic DHCP maintenance.
	This function is to be called once per second and will 
	expire the DHCP lease. */
void dhcpTimer(void);

/*!	Get a DHCP option from the option list.
	\param options is a pointer to the options field of a DHCP packet.
	\param optcode is the desired option number to retrieve.
	\param optlen is the maximum data length that should be retrieved (less data will be retrieved if option is shorter).
	\param optvalptr is a pointer to where the option value will be stored.
	\return actual length of the option data, as stored in the options list. */
uint8_t dhcpGetOption(uint8_t* options, uint8_t optcode, uint8_t optlen, void* optvalptr);

/*!	Set a DHCP option in the option list.
	\param options is a pointer to the options field of a DHCP packet.
	\param optcode is the option number to write.
	\param optlen is the data length of the option value.
	\param optvalptr is a pointer to the option data to be read.
	\return pointer to write location of the next option. */
uint8_t* dhcpSetOption(uint8_t* options, uint8_t optcode, uint8_t optlen, void* optvalptr);

/*! Print diagnotic information about BOOTP/DHCP packet.
*/
void dhcpPrintHeader(struct netDhcpHeader* packet);

#endif
//@}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久九九久久九九| 色偷偷久久一区二区三区| 91精品国产综合久久福利 | 欧美va在线播放| 九九热在线视频观看这里只有精品| 日韩一区二区视频| 狠狠v欧美v日韩v亚洲ⅴ| 久久久不卡影院| 99re亚洲国产精品| 日韩精品一二区| 精品久久一二三区| 成人免费毛片嘿嘿连载视频| 一区二区三区日韩精品视频| 7777精品伊人久久久大香线蕉| 国产综合久久久久久鬼色 | 精东粉嫩av免费一区二区三区| 欧美精品一区二区蜜臀亚洲| 成人国产精品免费观看| 亚洲国产中文字幕| 精品剧情在线观看| 91色视频在线| 青青草国产精品97视觉盛宴| 欧美高清在线视频| 在线观看视频一区二区欧美日韩| 日韩一区精品视频| 久久精品日产第一区二区三区高清版| 99久久99久久久精品齐齐| 丝袜美腿亚洲色图| 中文字幕久久午夜不卡| 欧美少妇bbb| 国产一区视频网站| 亚洲在线视频网站| 久久色视频免费观看| 日本精品一区二区三区高清| 久久9热精品视频| 伊人婷婷欧美激情| 国产午夜精品在线观看| 精品视频999| 成人av电影在线网| 久久精品国产在热久久| 一区二区三区欧美久久| 日本一区二区成人在线| 欧美一区二区三区的| 日本大香伊一区二区三区| 国产在线播放一区二区三区| 午夜精品福利久久久| 久久久一区二区三区捆绑**| 欧美怡红院视频| 国产91对白在线观看九色| 青青草国产成人av片免费| 一区二区免费视频| 久久久久久亚洲综合影院红桃 | 成人免费视频视频在线观看免费| 亚洲电影视频在线| 国产精品久久久久久久午夜片 | 国产精品国产成人国产三级| 精品国产精品网麻豆系列| 欧美日韩激情一区二区| 91麻豆福利精品推荐| 国产九九视频一区二区三区| 捆绑变态av一区二区三区| 亚洲国产一区在线观看| 亚洲欧美视频一区| 国产欧美一区在线| 精品久久久久久久一区二区蜜臀| 欧美日产在线观看| 91久久免费观看| 91丨porny丨国产入口| 成人蜜臀av电影| 高清在线不卡av| 高清视频一区二区| 风间由美一区二区三区在线观看 | 国产精品久久久爽爽爽麻豆色哟哟| 欧美成人a∨高清免费观看| 欧美日韩亚洲综合一区二区三区 | 在线不卡中文字幕| 欧美偷拍一区二区| 欧美影视一区二区三区| 欧美在线一二三四区| 欧美天天综合网| 欧美日韩一区不卡| 欧美福利一区二区| 4438x亚洲最大成人网| 在线91免费看| 欧美一级黄色大片| www久久精品| 日本一区二区三区dvd视频在线| 久久这里只有精品6| 国产网站一区二区| 国产精品毛片大码女人| 日韩美女视频一区| 亚洲大片精品永久免费| 久久精品国产免费| 国产不卡视频一区| 91首页免费视频| 欧美日韩精品一二三区| 日韩三级精品电影久久久 | 日本美女一区二区| 精一区二区三区| 国产99久久久久久免费看农村| 99热这里都是精品| 5858s免费视频成人| 日韩精品在线看片z| 久久久国产精华| 亚洲资源中文字幕| 久久精品免费看| 成人黄色av电影| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 7777女厕盗摄久久久| 国产亚洲欧美日韩日本| 亚洲精品一二三区| 裸体歌舞表演一区二区| 成人av电影在线| 正在播放一区二区| 国产精品日韩成人| 日本怡春院一区二区| 国产成人综合亚洲91猫咪| 欧美在线一区二区| 久久精品人人做人人爽97| 亚洲一级片在线观看| 狠狠狠色丁香婷婷综合激情| 一本大道久久a久久综合| 5858s免费视频成人| 综合亚洲深深色噜噜狠狠网站| 日韩不卡免费视频| 成人精品鲁一区一区二区| 欧美精品日日鲁夜夜添| 国产欧美日韩亚州综合| 五月激情综合网| 波多野结衣精品在线| 日韩免费一区二区三区在线播放| 国产精品久久久久天堂| 麻豆91在线播放免费| 在线观看三级视频欧美| 欧美激情在线观看视频免费| 日韩综合在线视频| 91蝌蚪porny九色| 国产亚洲一区二区三区| 调教+趴+乳夹+国产+精品| 99精品视频在线观看| 久久精品免视看| 久久99精品国产麻豆婷婷洗澡| 欧美系列亚洲系列| 中文字幕亚洲不卡| 国产成人一级电影| www精品美女久久久tv| 日本中文一区二区三区| 欧美日韩美少妇| 亚洲激情自拍视频| 99久久国产综合精品麻豆| 亚洲国产高清在线| 国产mv日韩mv欧美| 久久久一区二区三区捆绑**| 人人爽香蕉精品| 欧美视频自拍偷拍| 亚洲欧美另类图片小说| 成人av动漫在线| 中文字幕一区二区三区在线观看 | 美腿丝袜亚洲三区| 91精品国产91久久综合桃花 | 久久综合久久99| 国产制服丝袜一区| 精品成人一区二区三区四区| 麻豆精品久久久| 欧美一级片在线| 久久 天天综合| 精品国产乱码久久| 国产激情视频一区二区在线观看 | 亚洲电影在线免费观看| 色94色欧美sute亚洲线路一ni| 亚洲男人的天堂在线观看| 色狠狠综合天天综合综合| 亚洲精品成a人| 欧美美女喷水视频| 肉色丝袜一区二区| 日韩欧美国产一区在线观看| 久久精品国产99国产| 亚洲精品在线电影| 国产经典欧美精品| 中文字幕一区av| 在线日韩国产精品| 热久久久久久久| 久久久久久**毛片大全| 福利一区二区在线观看| 亚洲乱码国产乱码精品精可以看| 欧美在线视频日韩| 理论片日本一区| 久久久99精品久久| 北条麻妃一区二区三区| 亚洲影院久久精品| 日韩免费观看高清完整版在线观看| 久久99久久精品| 国产精品成人午夜| 欧美日韩精品一区视频| 激情小说亚洲一区| 亚洲人成网站精品片在线观看| 欧美性生交片4| 精品一区二区国语对白| 亚洲码国产岛国毛片在线| 69av一区二区三区|