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

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

?? dhcp.h

?? avr cpu 庫源代碼 對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一区二区三区免费野_久草精品视频
欧美一区二区三区在线| 亚洲精品日日夜夜| 亚洲一区二区三区免费视频| 麻豆精品一区二区综合av| 成人18精品视频| 7777精品伊人久久久大香线蕉最新版 | 免费在线看成人av| 欧美美女bb生活片| 日韩中文字幕区一区有砖一区| 欧美性淫爽ww久久久久无| 亚洲你懂的在线视频| 一本色道久久综合狠狠躁的推荐| 亚洲婷婷国产精品电影人久久| 97久久人人超碰| 五月激情丁香一区二区三区| 欧美性猛片xxxx免费看久爱| 亚洲天堂福利av| 色婷婷激情综合| 五月天中文字幕一区二区| 色婷婷狠狠综合| 国产欧美日韩三级| 欧美美女bb生活片| 91啪在线观看| 国产精品99久久久久久久vr| 亚洲香蕉伊在人在线观| 91精品国产综合久久精品app| 中文字幕av不卡| 欧美剧情电影在线观看完整版免费励志电影 | 九色综合狠狠综合久久| 亚洲免费观看高清完整版在线 | 东方欧美亚洲色图在线| 日韩中文欧美在线| 亚洲男人天堂av网| 久久久久国产精品麻豆| 欧美妇女性影城| 91视频一区二区三区| 国产乱码字幕精品高清av| 亚洲国产成人精品视频| 国产亚洲1区2区3区| 色一区在线观看| 亚洲精品v日韩精品| 成人国产一区二区三区精品| 久久er精品视频| 欧美www视频| 国产91精品一区二区麻豆网站| 国产日韩精品一区二区浪潮av| www.亚洲色图.com| 亚洲综合一区二区| 亚洲一区二区三区视频在线播放 | 中文字幕电影一区| 极品少妇xxxx偷拍精品少妇| 日韩一级大片在线| 麻豆一区二区三区| 日韩欧美高清一区| 精品一区二区三区影院在线午夜 | 欧美精品乱人伦久久久久久| 日韩精品亚洲专区| 欧美一级精品在线| 国内外成人在线视频| 久久色成人在线| 国产精品一区一区三区| 欧美国产日韩精品免费观看| 国产99久久精品| 国产精品动漫网站| 色婷婷精品大在线视频| 午夜婷婷国产麻豆精品| 日韩欧美电影一二三| 欧美性猛交xxxxxxxx| 婷婷六月综合亚洲| 精品国产乱码久久久久久影片| 国产高清在线观看免费不卡| 国产精品毛片大码女人| 在线精品视频免费观看| 丝袜美腿亚洲一区| 2020国产精品自拍| 99免费精品在线观看| 亚洲二区在线视频| 日韩写真欧美这视频| 国产精品一区二区无线| 国产精品美女视频| 欧美另类高清zo欧美| 国产乱国产乱300精品| 国产精品二区一区二区aⅴ污介绍| 欧美性感一类影片在线播放| 精品在线你懂的| 国产精品久久综合| 91精品国产乱码久久蜜臀| 国产盗摄女厕一区二区三区| 亚洲男同1069视频| 欧美xxxxx牲另类人与| 91浏览器入口在线观看| 日韩av电影免费观看高清完整版在线观看| 亚洲精品在线电影| 91网站最新地址| 免费三级欧美电影| 综合久久久久久久| 欧美草草影院在线视频| 91丨porny丨蝌蚪视频| 免费观看30秒视频久久| 日韩毛片一二三区| 日韩免费一区二区三区在线播放| av动漫一区二区| 麻豆精品视频在线| 亚洲欧美偷拍另类a∨色屁股| 日韩一区二区三区视频在线 | 图片区小说区区亚洲影院| 国产欧美综合在线观看第十页| 欧美日韩一区国产| 成人福利电影精品一区二区在线观看| 日韩制服丝袜先锋影音| 中文字幕日韩欧美一区二区三区| 91精品福利在线一区二区三区 | 夜夜夜精品看看| 久久久三级国产网站| 色成人在线视频| 国产成人精品免费| 毛片av一区二区| 亚洲欧美日韩国产成人精品影院 | 国产激情一区二区三区四区| 一区二区三区中文字幕| 精品国产伦一区二区三区观看方式| 99久久国产综合色|国产精品| 免费观看在线综合色| 亚洲午夜影视影院在线观看| 久久夜色精品国产欧美乱极品| 欧美综合视频在线观看| 国产毛片精品视频| 日韩精品免费专区| 亚洲最快最全在线视频| 国产日韩v精品一区二区| 4438x亚洲最大成人网| 色婷婷综合激情| 粉嫩嫩av羞羞动漫久久久| 久久精品国产99国产精品| 九九久久精品视频| 亚洲最色的网站| 欧美tk丨vk视频| 欧美色老头old∨ideo| 成人精品高清在线| 亚洲美女屁股眼交3| 日韩女优av电影| 欧美视频日韩视频在线观看| 97久久精品人人爽人人爽蜜臀| 国产在线看一区| 精品一区二区在线视频| 亚洲日本韩国一区| 亚洲欧洲av在线| 久久久国产精华| 精品国产一二三区| 欧美大胆一级视频| 欧美丰满嫩嫩电影| 337p亚洲精品色噜噜| 在线观看网站黄不卡| 色综合久久久久网| 成人午夜精品在线| 成人av午夜影院| 国产白丝精品91爽爽久久 | 欧美亚洲综合色| 99久久er热在这里只有精品15| 99视频在线观看一区三区| 国产自产视频一区二区三区| 男女性色大片免费观看一区二区| 亚洲成av人片www| 亚洲一卡二卡三卡四卡| 一区二区三区中文在线观看| 最新国产の精品合集bt伙计| 国产精品免费免费| 亚洲欧洲日韩综合一区二区| 国产欧美一区二区三区网站| www国产精品av| 欧美变态tickle挠乳网站| 欧美精品一区二区三区蜜桃| 精品日韩99亚洲| 日韩女优视频免费观看| 日韩欧美精品在线| 久久久亚洲精华液精华液精华液| 精品国产一区二区三区四区四| 日韩欧美一二三四区| 日韩欧美三级在线| 欧美一区二区三区不卡| 欧美一区二区三区四区高清| 日韩午夜电影在线观看| 日韩一区二区三区四区五区六区 | 韩国三级在线一区| 国模套图日韩精品一区二区| 激情综合色综合久久| 男男gaygay亚洲| 国产毛片精品视频| 粉嫩欧美一区二区三区高清影视| 成人午夜免费视频| 国产91精品免费| 在线观看视频91| 欧美日韩午夜精品| 91精品国产综合久久久久| 欧美亚一区二区| 精品久久久久一区| 欧美激情一区在线| 亚洲精品国产a| 亚洲成人久久影院| 激情偷乱视频一区二区三区|