📄 minip.h
字号:
/*
* FILENAME: minip.h
*
* Copyright 2000 By InterNiche Technologies Inc. All rights reserved
*
* Mini-IP compatability file. This stubs out INET directory routines
* and variables expected by the rest of the libraries, checks for bogus
* option settings, and generaly makes mini-IP a drop-in
* replacment for the inet.lib
*
* This must be included AFTER the definitions in ipport.h - for example
* at the end of ipport.h
*
* MODULE: MINET
*
* PORTABLE: yes
*/
#ifndef _MINIP_H_
#define _MINIP_H_ 1
#ifndef _IPPORT_H_
#error This must be included AFTER the definitions in ipport.h
#endif
/* declare the global pointer to our one & only net iface */
/*struct net; predecl (yaxon del) */
extern struct net * m_netp;
/* map the IP interface calls to reflect that we only have one net */
#define if_netnumber(nptr) 0
#define ip_mymach(addr) (m_netp->n_ipaddr)
#define if_getbynum(int) (m_netp)
/* define away reg type - these drivers are required to recv IP and ARPs */
#define reg_type( type )
#ifdef USE_PPP
#define isbcast(ifc, address) (FALSE) /* PPP has no broadcast */
#define MaxLnh 4
#else
#define isbcast(ifc, address) m_isbcast(address)
#define MaxLnh (ETHHDR_SIZE)
#endif
/* sanity test the ipport.h_h settings */
#ifdef MINI_IP
#ifdef DYNAMIC_IFACES
#error DYNAMIC_IFACES option not allowed on mini build
#endif
#ifdef IP_MULTICAST
#error IP_MULTICAST option not allowed on mini build
#endif
#ifdef IP_FRAGMENTS
#error IP_FRAGMENTS option not allowed on mini build
#endif
#ifdef IP_ROUTING
#error IP_ROUTING option not allowed on mini build
#endif
#ifdef MULTI_HOMED
#error MULTI_HOMED option not allowed on mini build
#endif
#ifdef PING_APP
#error PING_APP option not allowed on mini build
#endif
#ifdef NATRT
#error NATRT option not allowed on mini build
#endif
#ifdef DHCP_SERVER
#error DHCP_SERVER option not allowed on mini build
#endif
#ifdef IP_LOOPBACK
#error IP_LOOPBACK option not allowed on mini build
#endif
#endif /* MINI_IP sanity test */
#endif /* _MINIP_H_ - end of file */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -