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

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

?? dhcp.h

?? Mavell 無線模塊原廠IC AP32源代碼。DHCP客戶端與服務端源代碼
?? H
字號:
#ifndef CYGONCE_NET_TCPIP_DHCP_H#define CYGONCE_NET_TCPIP_DHCP_H//==========================================================================////      include/dhcp.h////      DHCP protocol support////==========================================================================//####BSDCOPYRIGHTBEGIN####//// -------------------------------------------//// Portions of this software may have been derived from OpenBSD or other sources,// and are covered by the appropriate copyright disclaimers included herein.//// -------------------------------------------////####BSDCOPYRIGHTEND####//==========================================================================//#####DESCRIPTIONBEGIN####//// Author(s):    hmt// Contributors: gthomas// Date:         2000-07-01// Purpose:      Support DHCP initialization in eCos TCPIP stack// Description://////####DESCRIPTIONEND####////==========================================================================//// DHCP.  RFC2131, RFC1533, RFC1534// See also bootp.h//#include <pkgconf/system.h>#include <pkgconf/net.h>#ifdef CYGPKG_NET_DHCP#include <machine/types.h>#include <cyg/kernel/kapi.h>#include <bootp.h>/* std min packet size to transmit for DHCP relays to work */#define BP_STD_TX_MINPKTSZ     (300)// DHCP messages; these are sent in the tag TAG_DHCP_MESS_TYPE already// defined in bootp.h#define DHCPDISCOVER	1#define DHCPOFFER	2#define DHCPREQUEST	3#define DHCPDECLINE	4#define DHCPACK		5#define DHCPNAK		6#define DHCPRELEASE	7// DHCP interface state machine states; these are published so that app// code can know what to do... (see page 35 of RFC2131)// These we will use in the normal course of events#define DHCPSTATE_INIT		   1#define DHCPSTATE_SELECTING	   2 // wait for replies to b/c DISCOVER#define DHCPSTATE_REQUESTING	   3#define DHCPSTATE_REQUEST_RECV	   4 // wait for replies to b/c REQUEST#define DHCPSTATE_BOUND		   5#define DHCPSTATE_RENEWING	   6 // wait for replies to u/c REQUEST#define DHCPSTATE_RENEW_RECV	   7#define DHCPSTATE_REBINDING	   8 // wait for replies to b/c REQUEST#define DHCPSTATE_REBIND_RECV      9#define DHCPSTATE_BOOTP_FALLBACK  10 // fall back to plain bootp#define DHCPSTATE_NOTBOUND        11 // To let app tidy up#define DHCPSTATE_FAILED          12 // Net is down#define DHCPSTATE_DO_RELEASE      13 // Force release of the current lease // These we don't use//#define DHCPSTATE_INITREBOOT//#define DHCPSTATE_REBOOTING// These are to let the app inspect the state of the interfaces when// managing them itself, by analogy with eth0_up &c; eth0_bootp_data and so// on will still be used with DHCP.#ifdef CYGHWR_NET_DRIVER_ETH0extern cyg_uint8 eth0_dhcpstate;#endif#ifdef CYGHWR_NET_DRIVER_ETH1extern cyg_uint8 eth1_dhcpstate;#endif// This is public so the app can wait on it or poll it when managing DHCP// itself.  It will be zero while the app should wait, and posted when a// call to do_dhcp() is needed.  If, instead, the app wishes to manage DHCP// with a thread per interface somehow, then separate semaphores may be used.// See the dhcp_lease structure definition below.extern cyg_sem_t dhcp_needs_attention;cyg_sem_t ip_ready;// This routine is used at startup time, and after relinquishing leases or// after a lease timeout: it does DHCP or bootp or static setup according// to configuration.extern void init_all_network_interfaces(void);// This routine does the work of renewing leases &c.// return value: 1 => everything OK, no change.// 0 => close your connections, then call do_dhcp_halt() to halt the// interface(s) in question (it knows because the state will be NOTBOUND).// After that you can return to the start and use// init_all_network_interfaces() as usual.extern int dhcp_bind( void );// Shutdown any interface which is not already shut down - whether// initialized by DHCP or not.  Reason: because of the broadcast-while-not-// -fully-initialized nature of the DHCP conversation, all other interfaces// must be shut down during that.  So one down, all down, is required.extern int dhcp_halt( void );// Release (and set state to DHCPSTATE_NOTBOUND) all interfaces - we are// closing down.  (unlikely but useful for testing)// Interfaces are left up; use dhcp_halt() to bring them right down, then// call init_all_network_interfaces() as usual to restart all.extern int dhcp_release( void );// The intent with this API is that a simple DHCP client thread, which// maintains the state of the interfaces, can go as follows:// (after init_all_networks is called from elsewhere)////    while ( 1 ) {//        while ( 1 ) {//            cyg_semaphore_wait( &dhcp_needs_attention );//            if ( ! dhcp_bind() ) // a lease expired//                break; // If we need to re-bind//        }//        dhcp_halt(); // tear everything down//        init_all_network_interfaces(); // re-initialize//    }//// and if the application does not want to suffer the overhead of a// separate thread and its stack for this, this functionality can be placed// in the app's server loop in an obvious fashion.  That is the goal of// breaking out these internal elements.  For example, some server might// be arranged to poll DHCP from time to time like this:////    while ( 1 ) {//        init_all_network_interfaces();//        open-my-listen-sockets();//        while ( 1 ) {//            serve-one-request();//            // sleeps if no connections, but not forever; so this loop is//            // polled a few times a minute...//            if ( cyg_semaphore_trywait( &dhcp_needs_attention )) {//                if ( ! dhcp_bind() ) {//                    close-my-listen-sockets();//                    dhcp_halt();//                    break;//                }//            }//        }//    }//// ------------------------------------------------------------------------#ifdef CYGOPT_NET_DHCP_DHCP_THREAD // Then we provide such a thread...// Provide a separate thread to renew DHCP leases; otherwise the// application MUST periodically examine the semaphore dhcp_needs_attention// and call dhcp_bind() if it is signalled.  If enabled, this thread does// all that for you.  Independent of this option, initialization of the// interfaces still occurs in init_all_network_interfaces() and your// startup code must call that.  It will start the DHCP management thread// if necessary.  If a lease fails to be renewed, the management thread// will shut down all interfaces and attempt to initialize all the// interfaces again from scratch.  This may cause chaos in the app, which// is why managing the DHCP state in an application aware thread is// actually better, just far less convenient for testing.extern cyg_handle_t dhcp_mgt_thread_h; // To allow its external manipulation.extern cyg_thread dhcp_mgt_thread;   // The object itselfextern void dhcp_start_dhcp_mgt_thread( void );#endif// The function is provided unconditionally so that the app can put it in a// thread of its own.  If the parameter is true, it loops forever; if// false, the call returns if a lease expires, and the caller must tidy up// or reboot the whole machine.extern cyg_thread_entry_t dhcp_mgt_entry;extern void dhcp_mgt_entry( cyg_addrword_t loop_on_failure ); // the function// ---------------------------------------------------------------------------// These are rather more internal routines, internal to the protocol engine// in dhcp_prot.c - those above are in dhcp_support.c#define DHCP_LEASE_T1 1#define DHCP_LEASE_T2 2#define DHCP_LEASE_EX 4struct dhcp_lease{    // Client settable: Semaphore to signal when attention is needed:    cyg_sem_t *needs_attention;    // Initialize all the rest to zero:    cyg_tick_count_t t1, t2, expiry;    volatile cyg_uint8 next;    volatile cyg_uint8 which;    cyg_handle_t alarm;    // except this one, which is just some space:    cyg_alarm alarm_obj;};// These dhcp_lease objects are initialized to use//         extern cyg_sem_t dhcp_needs_attention;// for the semaphore.#ifdef CYGHWR_NET_DRIVER_ETH0extern struct dhcp_lease eth0_lease;#endif#ifdef CYGHWR_NET_DRIVER_ETH1extern struct dhcp_lease eth1_lease;#endifextern int    do_dhcp(const char *interface, struct bootp *res,            cyg_uint8 *pstate, struct dhcp_lease *lease);// NB *res and *pstate and *lease are all INOUT; *res must point to a valid// record from "last time".extern int    do_dhcp_down_net(const char *intf, struct bootp *res,                     cyg_uint8 *pstate, struct dhcp_lease *lease);extern int    do_dhcp_release(const char *intf, struct bootp *res,                    cyg_uint8 *pstate, struct dhcp_lease *lease);#endif // CYGPKG_NET_DHCP#endif // CYGONCE_NET_TCPIP_DHCP_H // EOF dhcp.h

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美国毛片一区二区| 精品久久久三级丝袜| 精品成人一区二区三区四区| 一区二区成人在线视频| 色婷婷久久久亚洲一区二区三区| 国产精品乱码一区二三区小蝌蚪| 成人丝袜18视频在线观看| 中文字幕第一区二区| 不卡的电影网站| 夜夜揉揉日日人人青青一国产精品| 欧美在线一区二区| 日韩国产精品久久| 久久毛片高清国产| 99久久综合精品| 香蕉久久夜色精品国产使用方法| 欧美高清www午色夜在线视频| 老色鬼精品视频在线观看播放| 国产亚洲欧洲997久久综合| av高清久久久| 天堂av在线一区| 久久精品欧美日韩精品| 色综合天天综合狠狠| 亚洲成av人片在线观看| 极品尤物av久久免费看| 精品欧美一区二区在线观看| 国产在线看一区| 欧美国产激情一区二区三区蜜月| 色综合欧美在线| 视频一区二区中文字幕| 日本一区二区三区电影| 欧美系列在线观看| 香蕉成人伊视频在线观看| 欧美日韩视频专区在线播放| 久久久www成人免费毛片麻豆 | 欧美成人三级电影在线| 成人免费黄色大片| 亚洲一二三区不卡| 久久久国际精品| 欧美性猛交xxxx乱大交退制版| 亚洲福利电影网| 欧美性欧美巨大黑白大战| 黄色日韩网站视频| 一区二区三区久久| 久久久九九九九| 欧美精品丝袜久久久中文字幕| 国产91综合一区在线观看| 午夜视频一区在线观看| 中文字幕第一页久久| 91精品久久久久久久91蜜桃| 91性感美女视频| 韩国三级电影一区二区| 尤物在线观看一区| 国产午夜精品一区二区三区嫩草| 欧美剧在线免费观看网站| av一二三不卡影片| 国产精品一区二区三区网站| 丝袜国产日韩另类美女| 亚洲女人****多毛耸耸8| 精品国产乱码久久久久久蜜臀| 欧美日韩国产美女| 色综合久久九月婷婷色综合| 国产电影一区在线| 精品一区二区久久久| 国产在线国偷精品产拍免费yy| 欧美一区二区三区影视| 99精品视频一区二区| 久久99最新地址| 日本亚洲视频在线| 五月激情综合婷婷| 亚洲在线一区二区三区| 亚洲人成网站精品片在线观看| 久久精品亚洲一区二区三区浴池| 日韩一级片在线观看| 7777精品伊人久久久大香线蕉经典版下载| 91美女福利视频| av成人免费在线| 99热99精品| 99久久777色| 一本大道av一区二区在线播放| 91在线视频观看| 99精品欧美一区二区三区综合在线| 99九九99九九九视频精品| 99免费精品视频| 色综合久久综合| 色综合天天在线| 一本一本久久a久久精品综合麻豆| 丁香桃色午夜亚洲一区二区三区| 国产成人免费av在线| 国产99精品在线观看| 高清国产一区二区三区| 成人福利视频在线| 97久久久精品综合88久久| 色综合久久久网| 欧美日韩综合不卡| 日韩欧美色电影| 亚洲精品一区二区三区精华液 | 26uuu亚洲综合色| 精品国产免费视频| 国产色婷婷亚洲99精品小说| 国产精品久久久久久亚洲伦| 亚洲色图欧洲色图| 亚洲mv大片欧洲mv大片精品| 男女男精品视频| 国产盗摄女厕一区二区三区| 97久久人人超碰| 91精品久久久久久久99蜜桃| 蜜臀久久99精品久久久久久9| 91精品国产色综合久久久蜜香臀| 制服丝袜激情欧洲亚洲| 精品成人一区二区三区四区| 中文字幕在线一区二区三区| 亚洲国产综合色| 韩国三级在线一区| 色综合一区二区| 日韩欧美一级特黄在线播放| 国产精品欧美极品| 丝袜国产日韩另类美女| 国产成人亚洲综合a∨婷婷图片| 99久久婷婷国产综合精品电影| 欧美日韩激情一区二区三区| 久久久久久久综合色一本| 亚洲激情第一区| 国产一区啦啦啦在线观看| 色综合色狠狠天天综合色| 欧美sm美女调教| 亚洲女与黑人做爰| 精品夜夜嗨av一区二区三区| 色婷婷激情综合| 国产亚洲成年网址在线观看| 亚洲成人av资源| 成人精品在线视频观看| 日韩欧美一级精品久久| 亚洲乱码国产乱码精品精的特点| 久久国产成人午夜av影院| 91国产福利在线| 国产日韩高清在线| 日韩精品一二三四| 色悠悠久久综合| 亚洲国产精品t66y| 久热成人在线视频| 欧美日韩视频在线一区二区| 国产精品久久久久久久久久久免费看 | 精品国产a毛片| 亚洲狠狠爱一区二区三区| a级高清视频欧美日韩| 精品国产一区二区三区忘忧草| 亚洲成人黄色小说| 91视频精品在这里| 国产精品免费免费| 国产乱码精品一区二区三| 8x8x8国产精品| 亚洲午夜国产一区99re久久| 91美女片黄在线| 国产精品国产三级国产普通话蜜臀 | 亚洲乱码中文字幕| 成人永久看片免费视频天堂| 精品国精品国产| 蜜桃一区二区三区在线观看| 欧美精品一级二级| 亚洲丶国产丶欧美一区二区三区| 99久久精品国产精品久久| 欧美国产一区在线| 国产成人综合视频| 2021中文字幕一区亚洲| 久久99久久99小草精品免视看| 欧美一区二区三区婷婷月色| 午夜在线电影亚洲一区| 欧美图区在线视频| 亚洲第一搞黄网站| 欧美日本视频在线| 午夜激情久久久| 欧美精品tushy高清| 亚洲午夜一区二区| 欧美日本在线一区| 青青草国产成人av片免费| 日韩一区二区三区观看| 久久99精品久久久| 久久久99久久精品欧美| 国产mv日韩mv欧美| 国产精品久久午夜夜伦鲁鲁| 成人av中文字幕| 亚洲免费观看高清完整| 在线观看视频一区| 日韩av一二三| 久久综合给合久久狠狠狠97色69| 亚洲在线中文字幕| 7777精品伊人久久久大香线蕉完整版| 日日夜夜免费精品| 久久噜噜亚洲综合| 成人高清在线视频| 伊人性伊人情综合网| 欧美欧美欧美欧美| 狠狠狠色丁香婷婷综合激情| 中文在线一区二区| 色老汉一区二区三区| 日韩精品福利网| 国产女主播一区| 亚洲综合偷拍欧美一区色| 欧美优质美女网站| 日韩成人一区二区|