亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
久久亚洲欧美国产精品乐播| 国产午夜三级一区二区三| 久久久久久久久99精品| 中文字幕在线不卡一区二区三区 | 欧美日本韩国一区| 精品国产自在久精品国产| 亚洲另类在线制服丝袜| 激情综合色播五月| 欧美军同video69gay| 椎名由奈av一区二区三区| 国产大片一区二区| 日韩欧美成人一区| 亚洲18女电影在线观看| 99久久精品一区二区| 久久久精品天堂| 麻豆国产欧美一区二区三区| 欧美三级电影网站| 亚洲一区二区在线免费看| 91亚洲精品一区二区乱码| 久久久久综合网| 韩国v欧美v日本v亚洲v| 91精品欧美久久久久久动漫| 亚洲自拍偷拍网站| 欧美色爱综合网| 亚洲国产综合人成综合网站| 欧美在线视频你懂得| 亚洲免费观看在线视频| 91同城在线观看| 亚洲欧美区自拍先锋| 成人高清av在线| 国产精品国产精品国产专区不蜜| 国产精品综合二区| 欧美精品一区二区三区蜜臀| 精品一区二区影视| 久久婷婷国产综合精品青草| 国产乱码字幕精品高清av| 久久精品欧美日韩精品 | 日韩欧美中文字幕精品| 日韩成人午夜精品| 欧美一区二区三区免费| 麻豆91免费观看| 精品久久一二三区| 欧美亚洲一区二区在线观看| 成人免费在线播放视频| 色婷婷综合五月| 亚洲二区在线视频| 欧美一区二区三区人| 激情文学综合插| 亚洲国产精品ⅴa在线观看| 91色在线porny| 亚洲福利一二三区| 日韩美一区二区三区| 国产福利一区二区| 一区二区三区在线免费视频| 欧美日韩精品一区视频| 蜜臀av在线播放一区二区三区| 欧美精品一区二区精品网| 国产成人超碰人人澡人人澡| 亚洲免费在线观看| 欧美一区二区播放| av亚洲产国偷v产偷v自拍| 亚洲国产中文字幕在线视频综合| 日韩一区二区高清| 成人丝袜高跟foot| 午夜精品在线看| 国产喂奶挤奶一区二区三区| 91在线精品一区二区| 日韩av一区二区三区四区| 亚洲国产电影在线观看| 欧美精三区欧美精三区| 成人性视频免费网站| 亚洲福利国产精品| 国产精品视频观看| 91精品综合久久久久久| 成人黄色在线视频| 天天av天天翘天天综合网色鬼国产| 久久精品亚洲国产奇米99| 欧美亚洲综合网| 成人黄色综合网站| 精品一区二区三区免费播放 | 亚洲第一搞黄网站| 国产欧美日韩中文久久| 91精品国产91久久综合桃花| 91色porny| 国产成人福利片| 久久综合综合久久综合| 亚洲一区二区三区视频在线| 欧美国产激情一区二区三区蜜月| 欧美老年两性高潮| 在线影院国内精品| 成人免费看视频| 激情六月婷婷综合| 日本欧美肥老太交大片| 一区二区欧美国产| 亚洲色欲色欲www| 欧美国产精品劲爆| 久久一留热品黄| 日韩欧美国产综合一区| 精品播放一区二区| 在线综合+亚洲+欧美中文字幕| av成人老司机| 高清免费成人av| 国产精品一品二品| 国产精品一区二区三区99| 日韩综合一区二区| 日本怡春院一区二区| 一区二区三区在线观看动漫 | 91黄视频在线观看| 国产不卡免费视频| 国产成人自拍在线| 国产精品538一区二区在线| 精品亚洲成a人| 国精品**一区二区三区在线蜜桃| 日韩精品每日更新| 日本成人在线不卡视频| 日本在线不卡视频| 麻豆国产欧美一区二区三区| 奇米在线7777在线精品| 美女网站一区二区| 久久99久久精品| 国内偷窥港台综合视频在线播放| 激情图区综合网| 国产成人精品免费一区二区| 国产精品77777| 99久久综合狠狠综合久久| 色综合久久88色综合天天| 欧美怡红院视频| 91.com视频| 精品va天堂亚洲国产| 中文字幕二三区不卡| 亚洲女同女同女同女同女同69| 又紧又大又爽精品一区二区| 亚洲图片欧美色图| 免费成人av资源网| 成人丝袜高跟foot| 欧美色综合久久| www一区二区| 亚洲图片另类小说| 日韩av中文在线观看| 国产真实精品久久二三区| 成人午夜免费av| 精品婷婷伊人一区三区三| 精品日韩一区二区三区免费视频| 久久精品欧美一区二区三区麻豆| 亚洲欧美国产77777| 日韩精品亚洲专区| 丁香天五香天堂综合| 欧美日韩国产影片| 国产女同性恋一区二区| 香蕉久久一区二区不卡无毒影院| 蜜臀久久99精品久久久久久9 | 国产精品久久久久久久久搜平片| 亚洲免费在线看| 精品一区二区三区影院在线午夜| 97久久超碰国产精品| 日韩欧美你懂的| 综合久久国产九一剧情麻豆| 日本中文字幕不卡| 在线观看免费一区| 国产精品视频免费看| 日韩精品一二三| 色综合久久久久综合体桃花网| 精品国产一区二区精华| 一区二区日韩av| 成人av综合一区| 久久综合久久久久88| 五月婷婷久久综合| 91麻豆国产精品久久| 久久久电影一区二区三区| 日韩专区一卡二卡| 欧美优质美女网站| 国产精品视频观看| 韩国一区二区三区| 91 com成人网| 亚洲尤物在线视频观看| 不卡视频在线观看| 国产网红主播福利一区二区| 蜜桃视频在线观看一区| 欧美午夜宅男影院| 亚洲图片另类小说| 不卡一二三区首页| 国产精品欧美一区二区三区| 精品在线视频一区| 欧美大片在线观看| 日韩精品久久久久久| 欧美性受xxxx黑人xyx性爽| 国产精品久久久久久福利一牛影视 | 成人h动漫精品一区二区| 久久网这里都是精品| 美女任你摸久久| 3atv一区二区三区| 日韩电影一二三区| 91麻豆精品国产91久久久| 亚洲电影在线播放| 欧美日韩日本视频| 五月婷婷另类国产| 欧美一级片在线看| 老汉av免费一区二区三区| 日韩精品中午字幕| 国产一区二区美女诱惑|