From 49badf39a1454eae6a4f72ac9b735b70a5366390 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Fri, 29 Apr 2016 11:16:33 +0200 Subject: [PATCH 001/275] Fix bug #47805: dhcp_recv can dereference NULL pointer --- src/core/ipv4/dhcp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/ipv4/dhcp.c b/src/core/ipv4/dhcp.c index e0b78178..3c146755 100644 --- a/src/core/ipv4/dhcp.c +++ b/src/core/ipv4/dhcp.c @@ -1737,8 +1737,11 @@ dhcp_recv(void *arg, struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *addr, /* remember offered lease */ dhcp_handle_offer(netif); } + free_pbuf_and_return: - dhcp->msg_in = NULL; + if(dhcp != NULL) { + dhcp->msg_in = NULL; + } pbuf_free(p); } From 93665a7659c746f8c46958759c3f577a946efb4e Mon Sep 17 00:00:00 2001 From: goldsimon Date: Wed, 4 May 2016 10:03:48 +0200 Subject: [PATCH 002/275] Change version info from 1.5.0(dev) to 2.0.0(dev), added LWIP_VERSION_STRING ("1.2.3" with a suffix for git dev or rcX unless release version) --- src/include/lwip/init.h | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/include/lwip/init.h b/src/include/lwip/init.h index 70351b86..2dd642ab 100644 --- a/src/include/lwip/init.h +++ b/src/include/lwip/init.h @@ -39,28 +39,40 @@ extern "C" { #endif /** X.x.x: Major version of the stack */ -#define LWIP_VERSION_MAJOR 1U +#define LWIP_VERSION_MAJOR 2 /** x.X.x: Minor version of the stack */ -#define LWIP_VERSION_MINOR 5U +#define LWIP_VERSION_MINOR 0 /** x.x.X: Revision of the stack */ -#define LWIP_VERSION_REVISION 0U +#define LWIP_VERSION_REVISION 0 /** For release candidates, this is set to 1..254 * For official releases, this is set to 255 (LWIP_RC_RELEASE) * For development versions (Git), this is set to 0 (LWIP_RC_DEVELOPMENT) */ -#define LWIP_VERSION_RC 0U +#define LWIP_VERSION_RC 0 /** LWIP_VERSION_RC is set to LWIP_RC_RELEASE for official releases */ -#define LWIP_RC_RELEASE 255U +#define LWIP_RC_RELEASE 255 /** LWIP_VERSION_RC is set to LWIP_RC_DEVELOPMENT for Git versions */ -#define LWIP_RC_DEVELOPMENT 0U +#define LWIP_RC_DEVELOPMENT 0 #define LWIP_VERSION_IS_RELEASE (LWIP_VERSION_RC == LWIP_RC_RELEASE) #define LWIP_VERSION_IS_DEVELOPMENT (LWIP_VERSION_RC == LWIP_RC_DEVELOPMENT) #define LWIP_VERSION_IS_RC ((LWIP_VERSION_RC != LWIP_RC_RELEASE) && (LWIP_VERSION_RC != LWIP_RC_DEVELOPMENT)) +/* Some helper defines to get a version string +#define LWIP_VERSTR2(x) #x +#define LWIP_VERSTR(x) LWIP_VERSTR2(x) +#if LWIP_VERSION_IS_RELEASE +#define LWIP_VERSION_STRING_SUFFIX "" +#elif LWIP_VERSION_IS_DEVELOPMENT +#define LWIP_VERSION_STRING_SUFFIX "d" +#else +#define LWIP_VERSION_STRING_SUFFIX "rc" LWIP_VERSTR(LWIP_VERSION_RC) +#endif + /** Provides the version of the stack */ -#define LWIP_VERSION (LWIP_VERSION_MAJOR << 24 | LWIP_VERSION_MINOR << 16 | \ - LWIP_VERSION_REVISION << 8 | LWIP_VERSION_RC) +#define LWIP_VERSION (((u32_t)LWIP_VERSION_MAJOR) << 24 | ((u32_t)LWIP_VERSION_MINOR) << 16 | \ + ((u32_t)LWIP_VERSION_REVISION) << 8 | ((u32_t)LWIP_VERSION_RC)) +#define LWIP_VERSION_STRING LWIP_VERSTR(LWIP_VERSION_MAJOR) "." LWIP_VERSTR(LWIP_VERSION_MINOR) "." LWIP_VERSTR(LWIP_VERSION_REVISION) LWIP_VERSION_STRING_SUFFIX /* Modules initialization */ void lwip_init(void); From 05961a27cf243195e7b17fad633d18e8dbbfa306 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Wed, 4 May 2016 10:10:13 +0200 Subject: [PATCH 003/275] d'OH! (forgot end of comment) --- src/include/lwip/init.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/lwip/init.h b/src/include/lwip/init.h index 2dd642ab..216de2c0 100644 --- a/src/include/lwip/init.h +++ b/src/include/lwip/init.h @@ -58,7 +58,7 @@ extern "C" { #define LWIP_VERSION_IS_DEVELOPMENT (LWIP_VERSION_RC == LWIP_RC_DEVELOPMENT) #define LWIP_VERSION_IS_RC ((LWIP_VERSION_RC != LWIP_RC_RELEASE) && (LWIP_VERSION_RC != LWIP_RC_DEVELOPMENT)) -/* Some helper defines to get a version string +/* Some helper defines to get a version string */ #define LWIP_VERSTR2(x) #x #define LWIP_VERSTR(x) LWIP_VERSTR2(x) #if LWIP_VERSION_IS_RELEASE From 4a6c444a17ae4d18000fc3b1469e5e33eaeeb9cf Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 4 May 2016 10:24:12 +0200 Subject: [PATCH 004/275] httpd: Use newly created LWIP_VERSION_STRING --- src/apps/httpd/httpd.c | 1 + src/apps/httpd/makefsdata/makefsdata.c | 1 + src/include/lwip/apps/httpd_opts.h | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/apps/httpd/httpd.c b/src/apps/httpd/httpd.c index 4b2007ba..10603a5b 100644 --- a/src/apps/httpd/httpd.c +++ b/src/apps/httpd/httpd.c @@ -79,6 +79,7 @@ * about an unknown extension, make sure to add it (and its doctype) to * the 'g_psHTTPHeaders' list. */ +#include "lwip/init.h" #include "lwip/apps/httpd.h" #include "lwip/debug.h" #include "lwip/stats.h" diff --git a/src/apps/httpd/makefsdata/makefsdata.c b/src/apps/httpd/makefsdata/makefsdata.c index 1c4ba524..90a62862 100644 --- a/src/apps/httpd/makefsdata/makefsdata.c +++ b/src/apps/httpd/makefsdata/makefsdata.c @@ -108,6 +108,7 @@ int deflate_level = 10; /* default compression level, can be changed via command /* define this to get the header variables we use to build HTTP headers */ #define LWIP_HTTPD_DYNAMIC_HEADERS 1 #define LWIP_HTTPD_SSI 1 +#include "lwip/init.h" #include "../httpd_structs.h" #include "lwip/apps/fs.h" diff --git a/src/include/lwip/apps/httpd_opts.h b/src/include/lwip/apps/httpd_opts.h index e1e7c066..fd6b4145 100644 --- a/src/include/lwip/apps/httpd_opts.h +++ b/src/include/lwip/apps/httpd_opts.h @@ -87,7 +87,7 @@ /** This string is passed in the HTTP header as "Server: " */ #ifndef HTTPD_SERVER_AGENT -#define HTTPD_SERVER_AGENT "lwIP/1.3.1 (http://savannah.nongnu.org/projects/lwip)" +#define HTTPD_SERVER_AGENT "lwIP/"LWIP_VERSION_STRING" (http://savannah.nongnu.org/projects/lwip)" #endif /** Set this to 1 if you want to include code that creates HTTP headers From fc2701ae03d316afdf1e94b743cbd42b089f8005 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Sat, 7 May 2016 01:48:17 +0200 Subject: [PATCH 005/275] PPP, ppp_init function is back, re-add magic_init Work on PPP MEMPOOL re-added the previously removed ppp_init function because we considered it useless. Re-add magic_init which was previously in ppp_init and removed in commit 15fbfb7363, it does not hurt doing so and might fill the gap if we failed understanding the crypto implication about removing it. --- src/netif/ppp/ppp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index 106533cc..0a3b0431 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -594,6 +594,12 @@ int ppp_init(void) LWIP_MEMPOOL_INIT(PPP_PCB); + /* + * Initialize magic number generator now so that protocols may + * use magic numbers in initialization. + */ + magic_init(); + return 0; } From 73b8026cb97e6fb3e8a49eb1bdae6849377cb2ec Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Sat, 7 May 2016 01:51:52 +0200 Subject: [PATCH 006/275] PPP, code cleaning lwIP indentation is 2 characters, fix ppp_init indentation. --- src/netif/ppp/ppp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index 0a3b0431..480bbccb 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -580,19 +580,19 @@ err: int ppp_init(void) { #if PPPOS_SUPPORT - LWIP_MEMPOOL_INIT(PPPOS_PCB); + LWIP_MEMPOOL_INIT(PPPOS_PCB); #endif #if PPPOE_SUPPORT - LWIP_MEMPOOL_INIT(PPPOE_IF); + LWIP_MEMPOOL_INIT(PPPOE_IF); #endif #if PPPOL2TP_SUPPORT - LWIP_MEMPOOL_INIT(PPPOL2TP_PCB); + LWIP_MEMPOOL_INIT(PPPOL2TP_PCB); #endif #if LWIP_PPP_API && LWIP_MPU_COMPATIBLE - LWIP_MEMPOOL_INIT(PPPAPI_MSG); + LWIP_MEMPOOL_INIT(PPPAPI_MSG); #endif - LWIP_MEMPOOL_INIT(PPP_PCB); + LWIP_MEMPOOL_INIT(PPP_PCB); /* * Initialize magic number generator now so that protocols may @@ -600,7 +600,7 @@ int ppp_init(void) */ magic_init(); - return 0; + return 0; } /* From 1dcd5d31d7bbb9390b2ee45f32b3f7706bb39746 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Sun, 8 May 2016 03:09:51 +0200 Subject: [PATCH 007/275] pbuf: fix undefined PBUF_POOL_FREE_OOSEQ if TCP_QUEUE_OOSEQ is disabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit lwip/src/core/timers.c: In function ‘sys_check_timeouts’: lwip/src/core/timers.c:328:5: error: "PBUF_POOL_FREE_OOSEQ" is not defined [-Werror=undef] #if PBUF_POOL_FREE_OOSEQ Fix it by declaring an empty PBUF_CHECK_FREE_OOSEQ() function if feature is not enabled. --- src/core/timers.c | 2 -- src/include/lwip/pbuf.h | 9 +++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/core/timers.c b/src/core/timers.c index 6b257441..9c4bb7f8 100644 --- a/src/core/timers.c +++ b/src/core/timers.c @@ -325,9 +325,7 @@ sys_check_timeouts(void) /* this cares for wraparounds */ diff = now - timeouts_last_time; do { -#if PBUF_POOL_FREE_OOSEQ PBUF_CHECK_FREE_OOSEQ(); -#endif /* PBUF_POOL_FREE_OOSEQ */ had_one = 0; tmptimeout = next_timeout; if (tmptimeout && (tmptimeout->time <= diff)) { diff --git a/src/include/lwip/pbuf.h b/src/include/lwip/pbuf.h index 08dd8c77..fa0857dc 100644 --- a/src/include/lwip/pbuf.h +++ b/src/include/lwip/pbuf.h @@ -164,12 +164,11 @@ struct pbuf_custom { }; #endif /* LWIP_SUPPORT_CUSTOM_PBUF */ -#if LWIP_TCP && TCP_QUEUE_OOSEQ /** Define this to 0 to prevent freeing ooseq pbufs when the PBUF_POOL is empty */ #ifndef PBUF_POOL_FREE_OOSEQ #define PBUF_POOL_FREE_OOSEQ 1 #endif /* PBUF_POOL_FREE_OOSEQ */ -#if NO_SYS && PBUF_POOL_FREE_OOSEQ +#if LWIP_TCP && TCP_QUEUE_OOSEQ && NO_SYS && PBUF_POOL_FREE_OOSEQ extern volatile u8_t pbuf_free_ooseq_pending; void pbuf_free_ooseq(void); /** When not using sys_check_timeouts(), call PBUF_CHECK_FREE_OOSEQ() @@ -179,8 +178,10 @@ void pbuf_free_ooseq(void); /* pbuf_alloc() reported PBUF_POOL to be empty -> try to free some \ ooseq queued pbufs now */ \ pbuf_free_ooseq(); }}while(0) -#endif /* NO_SYS && PBUF_POOL_FREE_OOSEQ*/ -#endif /* LWIP_TCP && TCP_QUEUE_OOSEQ */ +#else /* LWIP_TCP && TCP_QUEUE_OOSEQ && NO_SYS && PBUF_POOL_FREE_OOSEQ */ + /* Otherwise declare an empty PBUF_CHECK_FREE_OOSEQ */ + #define PBUF_CHECK_FREE_OOSEQ() +#endif /* LWIP_TCP && TCP_QUEUE_OOSEQ && NO_SYS && PBUF_POOL_FREE_OOSEQ*/ /* Initializes the pbuf module. This call is empty for now, but may not be in future. */ #define pbuf_init() From 3417a02b256844a655adc00594d672bbbaa8264e Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Sun, 8 May 2016 19:26:08 +0200 Subject: [PATCH 008/275] PPP: add a function map for hashes and ciphers to prepare for mbed TLS support Unfortunately, all functions were renamed when PolarSSL was renamed to mbed TLS, breaking the API. In order to continue supporting our embedded PolarSSL copy while allowing our users to use mbed TLS, we need a function map to deal with the API break. This commit add a function map for all hashes and ciphers we are currently using. --- src/include/netif/ppp/mppe.h | 8 +- src/include/netif/ppp/ppp_opts.h | 3 +- src/include/netif/ppp/pppcrypt.h | 39 +++++++++ src/netif/ppp/chap-md5.c | 31 +++----- src/netif/ppp/chap_ms.c | 132 +++++++++++++------------------ src/netif/ppp/eap.c | 33 +++----- src/netif/ppp/magic.c | 28 +++---- src/netif/ppp/mppe.c | 37 +++------ src/netif/ppp/pppol2tp.c | 32 +++----- 9 files changed, 163 insertions(+), 180 deletions(-) diff --git a/src/include/netif/ppp/mppe.h b/src/include/netif/ppp/mppe.h index 75aefc18..551a47e5 100644 --- a/src/include/netif/ppp/mppe.h +++ b/src/include/netif/ppp/mppe.h @@ -39,11 +39,7 @@ #ifndef MPPE_H #define MPPE_H -#if LWIP_INCLUDED_POLARSSL_ARC4 -#include "netif/ppp/polarssl/arc4.h" -#else -#include "polarssl/arc4.h" -#endif +#include "netif/ppp/pppcrypt.h" #define MPPE_PAD 4 /* MPPE growth per frame */ #define MPPE_MAX_KEY_LEN 16 /* largest key length (128-bit) */ @@ -152,7 +148,7 @@ static const u8_t mppe_sha1_pad2[SHA1_PAD_SIZE] = { * State for an MPPE (de)compressor. */ typedef struct ppp_mppe_state { - arc4_context arc4; + lwip_arc4_context arc4; u8_t master_key[MPPE_MAX_KEY_LEN]; u8_t session_key[MPPE_MAX_KEY_LEN]; u8_t keylen; /* key length in bytes */ diff --git a/src/include/netif/ppp/ppp_opts.h b/src/include/netif/ppp/ppp_opts.h index 27943df1..7c7e79e9 100644 --- a/src/include/netif/ppp/ppp_opts.h +++ b/src/include/netif/ppp/ppp_opts.h @@ -331,6 +331,7 @@ * LWIP_INCLUDED_POLARSSL_MD5 ; Use lwIP internal PolarSSL for MD5 * LWIP_INCLUDED_POLARSSL_SHA1 ; Use lwIP internal PolarSSL for SHA1 * LWIP_INCLUDED_POLARSSL_DES ; Use lwIP internal PolarSSL for DES + * LWIP_INCLUDED_POLARSSL_ARC4 ; Use lwIP internal PolarSSL for ARC4 * * If set (=1), the default if required by another enabled PPP feature unless * explicitly set to 0, using included lwIP PolarSSL. @@ -344,7 +345,7 @@ /* CHAP, EAP, L2TP AUTH and MD5 Random require MD5 support */ #if CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT || PPP_MD5_RANDM #ifndef LWIP_INCLUDED_POLARSSL_MD5 -#define LWIP_INCLUDED_POLARSSL_MD5 1 +#define LWIP_INCLUDED_POLARSSL_MD5 1 #endif /* LWIP_INCLUDED_POLARSSL_MD5 */ #endif /* CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT || PPP_MD5_RANDM */ diff --git a/src/include/netif/ppp/pppcrypt.h b/src/include/netif/ppp/pppcrypt.h index a6cbd3fa..f0eddb07 100644 --- a/src/include/netif/ppp/pppcrypt.h +++ b/src/include/netif/ppp/pppcrypt.h @@ -33,9 +33,48 @@ #include "netif/ppp/ppp_opts.h" #if PPP_SUPPORT && MSCHAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ +/* This header file is included in all PPP modules needing hashes and/or ciphers */ + #ifndef PPPCRYPT_H #define PPPCRYPT_H +/* + * If included PolarSSL copy is not used, user is expected to include + * external libraries in arch/cc.h (which is included by lwip/arch.h). + */ +#include "lwip/arch.h" + +/* + * Map hashes and ciphers functions to PolarSSL + */ +#include "netif/ppp/polarssl/md4.h" +#define lwip_md4_context md4_context +#define lwip_md4_starts md4_starts +#define lwip_md4_update md4_update +#define lwip_md4_finish md4_finish + +#include "netif/ppp/polarssl/md5.h" +#define lwip_md5_context md5_context +#define lwip_md5_starts md5_starts +#define lwip_md5_update md5_update +#define lwip_md5_finish md5_finish + +#include "netif/ppp/polarssl/sha1.h" +#define lwip_sha1_context sha1_context +#define lwip_sha1_starts sha1_starts +#define lwip_sha1_update sha1_update +#define lwip_sha1_finish sha1_finish + +#include "netif/ppp/polarssl/des.h" +#define lwip_des_context des_context +#define lwip_des_setkey_enc des_setkey_enc +#define lwip_des_crypt_ecb des_crypt_ecb + +#include "netif/ppp/polarssl/arc4.h" +#define lwip_arc4_context arc4_context +#define lwip_arc4_setup arc4_setup +#define lwip_arc4_crypt arc4_crypt + void pppcrypt_56_to_64_bit_key(u_char *key, u_char *des_key); #endif /* PPPCRYPT_H */ diff --git a/src/netif/ppp/chap-md5.c b/src/netif/ppp/chap-md5.c index d92838f3..c7c8acff 100644 --- a/src/netif/ppp/chap-md5.c +++ b/src/netif/ppp/chap-md5.c @@ -41,12 +41,7 @@ #include "netif/ppp/chap-new.h" #include "netif/ppp/chap-md5.h" #include "netif/ppp/magic.h" - -#if LWIP_INCLUDED_POLARSSL_MD5 -#include "netif/ppp/polarssl/md5.h" -#else -#include "polarssl/md5.h" -#endif +#include "netif/ppp/pppcrypt.h" #define MD5_HASH_SIZE 16 #define MD5_MIN_CHALLENGE 17 @@ -67,7 +62,7 @@ static int chap_md5_verify_response(ppp_pcb *pcb, int id, const char *name, const unsigned char *secret, int secret_len, const unsigned char *challenge, const unsigned char *response, char *message, int message_space) { - md5_context ctx; + lwip_md5_context ctx; unsigned char idbyte = id; unsigned char hash[MD5_HASH_SIZE]; int challenge_len, response_len; @@ -78,11 +73,11 @@ static int chap_md5_verify_response(ppp_pcb *pcb, int id, const char *name, response_len = *response++; if (response_len == MD5_HASH_SIZE) { /* Generate hash of ID, secret, challenge */ - md5_starts(&ctx); - md5_update(&ctx, &idbyte, 1); - md5_update(&ctx, secret, secret_len); - md5_update(&ctx, challenge, challenge_len); - md5_finish(&ctx, hash); + lwip_md5_starts(&ctx); + lwip_md5_update(&ctx, &idbyte, 1); + lwip_md5_update(&ctx, secret, secret_len); + lwip_md5_update(&ctx, challenge, challenge_len); + lwip_md5_finish(&ctx, hash); /* Test if our hash matches the peer's response */ if (memcmp(hash, response, MD5_HASH_SIZE) == 0) { @@ -98,18 +93,18 @@ static int chap_md5_verify_response(ppp_pcb *pcb, int id, const char *name, static void chap_md5_make_response(ppp_pcb *pcb, unsigned char *response, int id, const char *our_name, const unsigned char *challenge, const char *secret, int secret_len, unsigned char *private_) { - md5_context ctx; + lwip_md5_context ctx; unsigned char idbyte = id; int challenge_len = *challenge++; LWIP_UNUSED_ARG(our_name); LWIP_UNUSED_ARG(private_); LWIP_UNUSED_ARG(pcb); - md5_starts(&ctx); - md5_update(&ctx, &idbyte, 1); - md5_update(&ctx, (const u_char *)secret, secret_len); - md5_update(&ctx, challenge, challenge_len); - md5_finish(&ctx, &response[1]); + lwip_md5_starts(&ctx); + lwip_md5_update(&ctx, &idbyte, 1); + lwip_md5_update(&ctx, (const u_char *)secret, secret_len); + lwip_md5_update(&ctx, challenge, challenge_len); + lwip_md5_finish(&ctx, &response[1]); response[0] = MD5_HASH_SIZE; } diff --git a/src/netif/ppp/chap_ms.c b/src/netif/ppp/chap_ms.c index 065e95a7..82877f8f 100644 --- a/src/netif/ppp/chap_ms.c +++ b/src/netif/ppp/chap_ms.c @@ -97,24 +97,6 @@ #include "netif/ppp/mppe.h" /* For mppe_sha1_pad*, mppe_set_key() */ #endif /* MPPE_SUPPORT */ -#if LWIP_INCLUDED_POLARSSL_MD4 -#include "netif/ppp/polarssl/md4.h" -#else -#include "polarssl/md4.h" -#endif - -#if LWIP_INCLUDED_POLARSSL_SHA1 -#include "netif/ppp/polarssl/sha1.h" -#else -#include "polarssl/sha1.h" -#endif - -#if LWIP_INCLUDED_POLARSSL_DES -#include "netif/ppp/polarssl/des.h" -#else -#include "polarssl/des.h" -#endif - #define SHA1_SIGNATURE_SIZE 20 #define MD4_SIGNATURE_SIZE 16 /* 16 bytes in a MD4 message digest */ #define MAX_NT_PASSWORD 256 /* Max (Unicode) chars in an NT pass */ @@ -515,7 +497,7 @@ static void ChallengeResponse(const u_char *challenge, const u_char PasswordHash[MD4_SIGNATURE_SIZE], u_char response[24]) { u_char ZPasswordHash[21]; - des_context des; + lwip_des_context des; u_char des_key[8]; BZERO(ZPasswordHash, sizeof(ZPasswordHash)); @@ -527,16 +509,16 @@ static void ChallengeResponse(const u_char *challenge, #endif pppcrypt_56_to_64_bit_key(ZPasswordHash + 0, des_key); - des_setkey_enc(&des, des_key); - des_crypt_ecb(&des, challenge, response +0); + lwip_des_setkey_enc(&des, des_key); + lwip_des_crypt_ecb(&des, challenge, response +0); pppcrypt_56_to_64_bit_key(ZPasswordHash + 7, des_key); - des_setkey_enc(&des, des_key); - des_crypt_ecb(&des, challenge, response +8); + lwip_des_setkey_enc(&des, des_key); + lwip_des_crypt_ecb(&des, challenge, response +8); pppcrypt_56_to_64_bit_key(ZPasswordHash + 14, des_key); - des_setkey_enc(&des, des_key); - des_crypt_ecb(&des, challenge, response +16); + lwip_des_setkey_enc(&des, des_key); + lwip_des_crypt_ecb(&des, challenge, response +16); #if 0 dbglog("ChallengeResponse - response %.24B", response); @@ -545,7 +527,7 @@ static void ChallengeResponse(const u_char *challenge, static void ChallengeHash(const u_char PeerChallenge[16], const u_char *rchallenge, const char *username, u_char Challenge[8]) { - sha1_context sha1Context; + lwip_sha1_context sha1Context; u_char sha1Hash[SHA1_SIGNATURE_SIZE]; const char *user; @@ -555,11 +537,11 @@ static void ChallengeHash(const u_char PeerChallenge[16], const u_char *rchallen else user = username; - sha1_starts(&sha1Context); - sha1_update(&sha1Context, PeerChallenge, 16); - sha1_update(&sha1Context, rchallenge, 16); - sha1_update(&sha1Context, (const unsigned char*)user, strlen(user)); - sha1_finish(&sha1Context, sha1Hash); + lwip_sha1_starts(&sha1Context); + lwip_sha1_update(&sha1Context, PeerChallenge, 16); + lwip_sha1_update(&sha1Context, rchallenge, 16); + lwip_sha1_update(&sha1Context, (const unsigned char*)user, strlen(user)); + lwip_sha1_finish(&sha1Context, sha1Hash); MEMCPY(Challenge, sha1Hash, 8); } @@ -580,11 +562,11 @@ static void ascii2unicode(const char ascii[], int ascii_len, u_char unicode[]) { } static void NTPasswordHash(u_char *secret, int secret_len, u_char hash[MD4_SIGNATURE_SIZE]) { - md4_context md4Context; + lwip_md4_context md4Context; - md4_starts(&md4Context); - md4_update(&md4Context, secret, secret_len); - md4_finish(&md4Context, hash); + lwip_md4_starts(&md4Context); + lwip_md4_update(&md4Context, secret, secret_len); + lwip_md4_finish(&md4Context, hash); } static void ChapMS_NT(const u_char *rchallenge, const char *secret, int secret_len, @@ -622,7 +604,7 @@ static void ChapMS_LANMan(u_char *rchallenge, char *secret, int secret_len, int i; u_char UcasePassword[MAX_NT_PASSWORD]; /* max is actually 14 */ u_char PasswordHash[MD4_SIGNATURE_SIZE]; - des_context des; + lwip_des_context des; u_char des_key[8]; /* LANMan password is case insensitive */ @@ -631,12 +613,12 @@ static void ChapMS_LANMan(u_char *rchallenge, char *secret, int secret_len, UcasePassword[i] = (u_char)toupper(secret[i]); pppcrypt_56_to_64_bit_key(UcasePassword +0, des_key); - des_setkey_enc(&des, des_key); - des_crypt_ecb(&des, StdText, PasswordHash +0); + lwip_des_setkey_enc(&des, des_key); + lwip_des_crypt_ecb(&des, StdText, PasswordHash +0); pppcrypt_56_to_64_bit_key(UcasePassword +7, des_key); - des_setkey_enc(&des, des_key); - des_crypt_ecb(&des, StdText, PasswordHash +8); + lwip_des_setkey_enc(&des, des_key); + lwip_des_crypt_ecb(&des, StdText, PasswordHash +8); ChallengeResponse(rchallenge, PasswordHash, &response[MS_CHAP_LANMANRESP]); } @@ -663,23 +645,23 @@ static void GenerateAuthenticatorResponse(const u_char PasswordHashHash[MD4_SIGN 0x6E }; int i; - sha1_context sha1Context; + lwip_sha1_context sha1Context; u_char Digest[SHA1_SIGNATURE_SIZE]; u_char Challenge[8]; - sha1_starts(&sha1Context); - sha1_update(&sha1Context, PasswordHashHash, MD4_SIGNATURE_SIZE); - sha1_update(&sha1Context, NTResponse, 24); - sha1_update(&sha1Context, Magic1, sizeof(Magic1)); - sha1_finish(&sha1Context, Digest); + lwip_sha1_starts(&sha1Context); + lwip_sha1_update(&sha1Context, PasswordHashHash, MD4_SIGNATURE_SIZE); + lwip_sha1_update(&sha1Context, NTResponse, 24); + lwip_sha1_update(&sha1Context, Magic1, sizeof(Magic1)); + lwip_sha1_finish(&sha1Context, Digest); ChallengeHash(PeerChallenge, rchallenge, username, Challenge); - sha1_starts(&sha1Context); - sha1_update(&sha1Context, Digest, sizeof(Digest)); - sha1_update(&sha1Context, Challenge, sizeof(Challenge)); - sha1_update(&sha1Context, Magic2, sizeof(Magic2)); - sha1_finish(&sha1Context, Digest); + lwip_sha1_starts(&sha1Context); + lwip_sha1_update(&sha1Context, Digest, sizeof(Digest)); + lwip_sha1_update(&sha1Context, Challenge, sizeof(Challenge)); + lwip_sha1_update(&sha1Context, Magic2, sizeof(Magic2)); + lwip_sha1_finish(&sha1Context, Digest); /* Convert to ASCII hex string. */ for (i = 0; i < LWIP_MAX((MS_AUTH_RESPONSE_LENGTH / 2), (int)sizeof(Digest)); i++) @@ -715,7 +697,7 @@ static void Set_Start_Key(ppp_pcb *pcb, const u_char *rchallenge, const char *se u_char unicodePassword[MAX_NT_PASSWORD * 2]; u_char PasswordHash[MD4_SIGNATURE_SIZE]; u_char PasswordHashHash[MD4_SIGNATURE_SIZE]; - sha1_context sha1Context; + lwip_sha1_context sha1Context; u_char Digest[SHA1_SIGNATURE_SIZE]; /* >= MPPE_MAX_KEY_LEN */ /* Hash (x2) the Unicode version of the secret (== password). */ @@ -723,11 +705,11 @@ static void Set_Start_Key(ppp_pcb *pcb, const u_char *rchallenge, const char *se NTPasswordHash(unicodePassword, secret_len * 2, PasswordHash); NTPasswordHash(PasswordHash, sizeof(PasswordHash), PasswordHashHash); - sha1_starts(&sha1Context); - sha1_update(&sha1Context, PasswordHashHash, MD4_SIGNATURE_SIZE); - sha1_update(&sha1Context, PasswordHashHash, MD4_SIGNATURE_SIZE); - sha1_update(&sha1Context, rchallenge, 8); - sha1_finish(&sha1Context, Digest); + lwip_sha1_starts(&sha1Context); + lwip_sha1_update(&sha1Context, PasswordHashHash, MD4_SIGNATURE_SIZE); + lwip_sha1_update(&sha1Context, PasswordHashHash, MD4_SIGNATURE_SIZE); + lwip_sha1_update(&sha1Context, rchallenge, 8); + lwip_sha1_finish(&sha1Context, Digest); /* Same key in both directions. */ mppe_set_key(pcb, &pcb->mppe_comp, Digest); @@ -743,7 +725,7 @@ static void SetMasterKeys(ppp_pcb *pcb, const char *secret, int secret_len, u_ch u_char unicodePassword[MAX_NT_PASSWORD * 2]; u_char PasswordHash[MD4_SIGNATURE_SIZE]; u_char PasswordHashHash[MD4_SIGNATURE_SIZE]; - sha1_context sha1Context; + lwip_sha1_context sha1Context; u_char MasterKey[SHA1_SIGNATURE_SIZE]; /* >= MPPE_MAX_KEY_LEN */ u_char Digest[SHA1_SIGNATURE_SIZE]; /* >= MPPE_MAX_KEY_LEN */ const u_char *s; @@ -783,11 +765,11 @@ static void SetMasterKeys(ppp_pcb *pcb, const char *secret, int secret_len, u_ch NTPasswordHash(unicodePassword, secret_len * 2, PasswordHash); NTPasswordHash(PasswordHash, sizeof(PasswordHash), PasswordHashHash); - sha1_starts(&sha1Context); - sha1_update(&sha1Context, PasswordHashHash, MD4_SIGNATURE_SIZE); - sha1_update(&sha1Context, NTResponse, 24); - sha1_update(&sha1Context, Magic1, sizeof(Magic1)); - sha1_finish(&sha1Context, MasterKey); + lwip_sha1_starts(&sha1Context); + lwip_sha1_update(&sha1Context, PasswordHashHash, MD4_SIGNATURE_SIZE); + lwip_sha1_update(&sha1Context, NTResponse, 24); + lwip_sha1_update(&sha1Context, Magic1, sizeof(Magic1)); + lwip_sha1_finish(&sha1Context, MasterKey); /* * generate send key @@ -796,12 +778,12 @@ static void SetMasterKeys(ppp_pcb *pcb, const char *secret, int secret_len, u_ch s = Magic3; else s = Magic2; - sha1_starts(&sha1Context); - sha1_update(&sha1Context, MasterKey, 16); - sha1_update(&sha1Context, mppe_sha1_pad1, SHA1_PAD_SIZE); - sha1_update(&sha1Context, s, 84); - sha1_update(&sha1Context, mppe_sha1_pad2, SHA1_PAD_SIZE); - sha1_finish(&sha1Context, Digest); + lwip_sha1_starts(&sha1Context); + lwip_sha1_update(&sha1Context, MasterKey, 16); + lwip_sha1_update(&sha1Context, mppe_sha1_pad1, SHA1_PAD_SIZE); + lwip_sha1_update(&sha1Context, s, 84); + lwip_sha1_update(&sha1Context, mppe_sha1_pad2, SHA1_PAD_SIZE); + lwip_sha1_finish(&sha1Context, Digest); mppe_set_key(pcb, &pcb->mppe_comp, Digest); @@ -812,12 +794,12 @@ static void SetMasterKeys(ppp_pcb *pcb, const char *secret, int secret_len, u_ch s = Magic2; else s = Magic3; - sha1_starts(&sha1Context); - sha1_update(&sha1Context, MasterKey, 16); - sha1_update(&sha1Context, mppe_sha1_pad1, SHA1_PAD_SIZE); - sha1_update(&sha1Context, s, 84); - sha1_update(&sha1Context, mppe_sha1_pad2, SHA1_PAD_SIZE); - sha1_finish(&sha1Context, Digest); + lwip_sha1_starts(&sha1Context); + lwip_sha1_update(&sha1Context, MasterKey, 16); + lwip_sha1_update(&sha1Context, mppe_sha1_pad1, SHA1_PAD_SIZE); + lwip_sha1_update(&sha1Context, s, 84); + lwip_sha1_update(&sha1Context, mppe_sha1_pad2, SHA1_PAD_SIZE); + lwip_sha1_finish(&sha1Context, Digest); mppe_set_key(pcb, &pcb->mppe_decomp, Digest); diff --git a/src/netif/ppp/eap.c b/src/netif/ppp/eap.c index 6569e16c..917d1e4c 100644 --- a/src/netif/ppp/eap.c +++ b/src/netif/ppp/eap.c @@ -47,21 +47,14 @@ #if PPP_SUPPORT && EAP_SUPPORT /* don't build if not configured for use in lwipopts.h */ #include "netif/ppp/ppp_impl.h" - -#if LWIP_INCLUDED_POLARSSL_MD5 -#include "netif/ppp/polarssl/md5.h" -#else -#include "polarssl/md5.h" -#endif - #include "netif/ppp/eap.h" #include "netif/ppp/magic.h" +#include "netif/ppp/pppcrypt.h" #ifdef USE_SRP #include #include #include -#include "netif/ppp/pppcrypt.h" #endif /* USE_SRP */ #ifndef SHA_DIGESTSIZE @@ -1321,7 +1314,7 @@ static void eap_request(ppp_pcb *pcb, u_char *inp, int id, int len) { int secret_len; char secret[MAXSECRETLEN]; char rhostname[MAXNAMELEN]; - md5_context mdContext; + lwip_md5_context mdContext; u_char hash[MD5_SIGNATURE_SIZE]; #ifdef USE_SRP struct t_client *tc; @@ -1450,13 +1443,13 @@ static void eap_request(ppp_pcb *pcb, u_char *inp, int id, int len) { eap_send_nak(pcb, id, EAPT_SRP); break; } - md5_starts(&mdContext); + lwip_md5_starts(&mdContext); typenum = id; - md5_update(&mdContext, &typenum, 1); - md5_update(&mdContext, (u_char *)secret, secret_len); + lwip_md5_update(&mdContext, &typenum, 1); + lwip_md5_update(&mdContext, (u_char *)secret, secret_len); BZERO(secret, sizeof (secret)); - md5_update(&mdContext, inp, vallen); - md5_finish(&mdContext, hash); + lwip_md5_update(&mdContext, inp, vallen); + lwip_md5_finish(&mdContext, hash); eap_chap_response(pcb, id, hash, pcb->eap.es_client.ea_name, pcb->eap.es_client.ea_namelen); break; @@ -1733,7 +1726,7 @@ static void eap_response(ppp_pcb *pcb, u_char *inp, int id, int len) { int secret_len; char secret[MAXSECRETLEN]; char rhostname[MAXNAMELEN]; - md5_context mdContext; + lwip_md5_context mdContext; u_char hash[MD5_SIGNATURE_SIZE]; #ifdef USE_SRP struct t_server *ts; @@ -1876,12 +1869,12 @@ static void eap_response(ppp_pcb *pcb, u_char *inp, int id, int len) { eap_send_failure(pcb); break; } - md5_starts(&mdContext); - md5_update(&mdContext, &pcb->eap.es_server.ea_id, 1); - md5_update(&mdContext, (u_char *)secret, secret_len); + lwip_md5_starts(&mdContext); + lwip_md5_update(&mdContext, &pcb->eap.es_server.ea_id, 1); + lwip_md5_update(&mdContext, (u_char *)secret, secret_len); BZERO(secret, sizeof (secret)); - md5_update(&mdContext, pcb->eap.es_challenge, pcb->eap.es_challen); - md5_finish(&mdContext, hash); + lwip_md5_update(&mdContext, pcb->eap.es_challenge, pcb->eap.es_challen); + lwip_md5_finish(&mdContext, hash); if (BCMP(hash, inp, MD5_SIGNATURE_SIZE) != 0) { eap_send_failure(pcb); break; diff --git a/src/netif/ppp/magic.c b/src/netif/ppp/magic.c index 1107b4e6..66bf2276 100644 --- a/src/netif/ppp/magic.c +++ b/src/netif/ppp/magic.c @@ -80,11 +80,7 @@ #if PPP_MD5_RANDM /* Using MD5 for better randomness if enabled */ -#if LWIP_INCLUDED_POLARSSL_MD5 -#include "netif/ppp/polarssl/md5.h" -#else -#include "polarssl/md5.h" -#endif +#include "netif/ppp/pppcrypt.h" #define MD5_HASH_SIZE 16 static char magic_randpool[MD5_HASH_SIZE]; /* Pool of randomness. */ @@ -102,13 +98,13 @@ static u32_t magic_randomseed; /* Seed used for random number generation. */ * Ref: Applied Cryptography 2nd Ed. by Bruce Schneier p. 427 */ static void magic_churnrand(char *rand_data, u32_t rand_len) { - md5_context md5_ctx; + lwip_md5_context md5_ctx; /* LWIP_DEBUGF(LOG_INFO, ("magic_churnrand: %u@%P\n", rand_len, rand_data)); */ - md5_starts(&md5_ctx); - md5_update(&md5_ctx, (u_char *)magic_randpool, sizeof(magic_randpool)); + lwip_md5_starts(&md5_ctx); + lwip_md5_update(&md5_ctx, (u_char *)magic_randpool, sizeof(magic_randpool)); if (rand_data) { - md5_update(&md5_ctx, (u_char *)rand_data, rand_len); + lwip_md5_update(&md5_ctx, (u_char *)rand_data, rand_len); } else { struct { /* INCLUDE fields for any system sources of randomness */ @@ -123,9 +119,9 @@ static void magic_churnrand(char *rand_data, u32_t rand_len) { sys_data.rand = LWIP_RAND(); #endif /* LWIP_RAND */ /* Load sys_data fields here. */ - md5_update(&md5_ctx, (u_char *)&sys_data, sizeof(sys_data)); + lwip_md5_update(&md5_ctx, (u_char *)&sys_data, sizeof(sys_data)); } - md5_finish(&md5_ctx, (u_char *)magic_randpool); + lwip_md5_finish(&md5_ctx, (u_char *)magic_randpool); /* LWIP_DEBUGF(LOG_INFO, ("magic_churnrand: -> 0\n")); */ } @@ -162,15 +158,15 @@ void magic_randomize(void) { * it was documented. */ void magic_random_bytes(unsigned char *buf, u32_t buf_len) { - md5_context md5_ctx; + lwip_md5_context md5_ctx; u_char tmp[MD5_HASH_SIZE]; u32_t n; while (buf_len > 0) { - md5_starts(&md5_ctx); - md5_update(&md5_ctx, (u_char *)magic_randpool, sizeof(magic_randpool)); - md5_update(&md5_ctx, (u_char *)&magic_randcount, sizeof(magic_randcount)); - md5_finish(&md5_ctx, tmp); + lwip_md5_starts(&md5_ctx); + lwip_md5_update(&md5_ctx, (u_char *)magic_randpool, sizeof(magic_randpool)); + lwip_md5_update(&md5_ctx, (u_char *)&magic_randcount, sizeof(magic_randcount)); + lwip_md5_finish(&md5_ctx, tmp); magic_randcount++; n = LWIP_MIN(buf_len, MD5_HASH_SIZE); MEMCPY(buf, tmp, n); diff --git a/src/netif/ppp/mppe.c b/src/netif/ppp/mppe.c index 4cdcbb67..216f587b 100644 --- a/src/netif/ppp/mppe.c +++ b/src/netif/ppp/mppe.c @@ -34,18 +34,7 @@ #include "netif/ppp/ccp.h" #include "netif/ppp/mppe.h" #include "netif/ppp/pppdebug.h" - -#if LWIP_INCLUDED_POLARSSL_SHA1 -#include "netif/ppp/polarssl/sha1.h" -#else -#include "polarssl/sha1.h" -#endif - -#if LWIP_INCLUDED_POLARSSL_ARC4 -#include "netif/ppp/polarssl/arc4.h" -#else -#include "polarssl/arc4.h" -#endif +#include "netif/ppp/pppcrypt.h" #define SHA1_SIGNATURE_SIZE 20 @@ -71,24 +60,24 @@ */ static void mppe_rekey(ppp_mppe_state * state, int initial_key) { - sha1_context sha1_ctx; + lwip_sha1_context sha1_ctx; u8_t sha1_digest[SHA1_SIGNATURE_SIZE]; /* * Key Derivation, from RFC 3078, RFC 3079. * Equivalent to Get_Key() for MS-CHAP as described in RFC 3079. */ - sha1_starts(&sha1_ctx); - sha1_update(&sha1_ctx, state->master_key, state->keylen); - sha1_update(&sha1_ctx, mppe_sha1_pad1, SHA1_PAD_SIZE); - sha1_update(&sha1_ctx, state->session_key, state->keylen); - sha1_update(&sha1_ctx, mppe_sha1_pad2, SHA1_PAD_SIZE); - sha1_finish(&sha1_ctx, sha1_digest); + lwip_sha1_starts(&sha1_ctx); + lwip_sha1_update(&sha1_ctx, state->master_key, state->keylen); + lwip_sha1_update(&sha1_ctx, mppe_sha1_pad1, SHA1_PAD_SIZE); + lwip_sha1_update(&sha1_ctx, state->session_key, state->keylen); + lwip_sha1_update(&sha1_ctx, mppe_sha1_pad2, SHA1_PAD_SIZE); + lwip_sha1_finish(&sha1_ctx, sha1_digest); MEMCPY(state->session_key, sha1_digest, state->keylen); if (!initial_key) { - arc4_setup(&state->arc4, sha1_digest, state->keylen); - arc4_crypt(&state->arc4, state->session_key, state->keylen); + lwip_arc4_setup(&state->arc4, sha1_digest, state->keylen); + lwip_arc4_crypt(&state->arc4, state->session_key, state->keylen); } if (state->keylen == 8) { /* See RFC 3078 */ @@ -96,7 +85,7 @@ static void mppe_rekey(ppp_mppe_state * state, int initial_key) state->session_key[1] = 0x26; state->session_key[2] = 0x9e; } - arc4_setup(&state->arc4, state->session_key, state->keylen); + lwip_arc4_setup(&state->arc4, state->session_key, state->keylen); } /* @@ -256,7 +245,7 @@ mppe_compress(ppp_pcb *pcb, ppp_mppe_state *state, struct pbuf **pb, u16_t proto /* Encrypt packet */ for (n = np; n != NULL; n = n->next) { - arc4_crypt(&state->arc4, (u8_t*)n->payload, n->len); + lwip_arc4_crypt(&state->arc4, (u8_t*)n->payload, n->len); if (n->tot_len == n->len) { break; } @@ -392,7 +381,7 @@ mppe_decompress(ppp_pcb *pcb, ppp_mppe_state *state, struct pbuf **pb) /* Decrypt the packet. */ for (n = n0; n != NULL; n = n->next) { - arc4_crypt(&state->arc4, (u8_t*)n->payload, n->len); + lwip_arc4_crypt(&state->arc4, (u8_t*)n->payload, n->len); if (n->tot_len == n->len) { break; } diff --git a/src/netif/ppp/pppol2tp.c b/src/netif/ppp/pppol2tp.c index 1d1ad8e3..de36c6fc 100644 --- a/src/netif/ppp/pppol2tp.c +++ b/src/netif/ppp/pppol2tp.c @@ -63,17 +63,9 @@ #include "netif/ppp/lcp.h" #include "netif/ppp/ipcp.h" #include "netif/ppp/pppol2tp.h" - +#include "netif/ppp/pppcrypt.h" #include "netif/ppp/magic.h" -#if PPPOL2TP_AUTH_SUPPORT -#if LWIP_INCLUDED_POLARSSL_MD5 -#include "netif/ppp/polarssl/md5.h" -#else -#include "polarssl/md5.h" -#endif -#endif /* PPPOL2TP_AUTH_SUPPORT */ - /* Memory pool */ LWIP_MEMPOOL_DECLARE(PPPOL2TP_PCB, MEMP_NUM_PPPOL2TP_INTERFACES, sizeof(pppol2tp_pcb), "PPPOL2TP_PCB") @@ -493,7 +485,7 @@ static void pppol2tp_dispatch_control_packet(pppol2tp_pcb *l2tp, u16_t port, str u16_t avplen, avpflags, vendorid, attributetype, messagetype=0; err_t err; #if PPPOL2TP_AUTH_SUPPORT - md5_context md5_ctx; + lwip_md5_context md5_ctx; u8_t md5_hash[16]; u8_t challenge_id = 0; #endif /* PPPOL2TP_AUTH_SUPPORT */ @@ -600,12 +592,12 @@ static void pppol2tp_dispatch_control_packet(pppol2tp_pcb *l2tp, u16_t port, str return; } /* Generate hash of ID, secret, challenge */ - md5_starts(&md5_ctx); + lwip_md5_starts(&md5_ctx); challenge_id = PPPOL2TP_MESSAGETYPE_SCCCN; - md5_update(&md5_ctx, &challenge_id, 1); - md5_update(&md5_ctx, l2tp->secret, l2tp->secret_len); - md5_update(&md5_ctx, inp, avplen); - md5_finish(&md5_ctx, l2tp->challenge_hash); + lwip_md5_update(&md5_ctx, &challenge_id, 1); + lwip_md5_update(&md5_ctx, l2tp->secret, l2tp->secret_len); + lwip_md5_update(&md5_ctx, inp, avplen); + lwip_md5_finish(&md5_ctx, l2tp->challenge_hash); l2tp->send_challenge = 1; goto skipavp; case PPPOL2TP_AVPTYPE_CHALLENGERESPONSE: @@ -614,12 +606,12 @@ static void pppol2tp_dispatch_control_packet(pppol2tp_pcb *l2tp, u16_t port, str return; } /* Generate hash of ID, secret, challenge */ - md5_starts(&md5_ctx); + lwip_md5_starts(&md5_ctx); challenge_id = PPPOL2TP_MESSAGETYPE_SCCRP; - md5_update(&md5_ctx, &challenge_id, 1); - md5_update(&md5_ctx, l2tp->secret, l2tp->secret_len); - md5_update(&md5_ctx, l2tp->secret_rv, sizeof(l2tp->secret_rv)); - md5_finish(&md5_ctx, md5_hash); + lwip_md5_update(&md5_ctx, &challenge_id, 1); + lwip_md5_update(&md5_ctx, l2tp->secret, l2tp->secret_len); + lwip_md5_update(&md5_ctx, l2tp->secret_rv, sizeof(l2tp->secret_rv)); + lwip_md5_finish(&md5_ctx, md5_hash); if ( memcmp(inp, md5_hash, sizeof(md5_hash)) ) { PPPDEBUG(LOG_DEBUG, ("pppol2tp: Received challenge response from peer and secret key do not match\n")); pppol2tp_abort_connect(l2tp); From 9f3aff0cdfecb06724a08765729d14c1d9cd99ed Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Sun, 8 May 2016 20:23:21 +0200 Subject: [PATCH 009/275] PPP: add a new LWIP_USE_EXTERNAL_POLARSSL PPP option In order to welcome mbed TLS, we need to ease the switch to: - embedded PolarSSL 0.10.1-bsd copy or - external PolarSSL or - external mbed TLS This change cleanup all our previously used LWIP_INCLUDED_POLARSSL_* defines, which were not really useful after all, making them internal build triggers only, and this change provides a new unique global flag to use an external PolarSSL copy. --- src/include/netif/ppp/ppp_opts.h | 121 +++++++++++++++---------------- src/netif/ppp/polarssl/README | 21 ++---- 2 files changed, 65 insertions(+), 77 deletions(-) diff --git a/src/include/netif/ppp/ppp_opts.h b/src/include/netif/ppp/ppp_opts.h index 7c7e79e9..77c7e793 100644 --- a/src/include/netif/ppp/ppp_opts.h +++ b/src/include/netif/ppp/ppp_opts.h @@ -311,82 +311,33 @@ #endif /** - * PolarSSL library, used if necessary and not previously disabled + * PolarSSL embedded library * * * lwIP contains some files fetched from the latest BSD release of - * the PolarSSL project for ciphers and encryption methods we need for lwIP - * PPP support. + * the PolarSSL project (PolarSSL 0.10.1-bsd) for ciphers and encryption + * methods we need for lwIP PPP support. * * The PolarSSL files were cleaned to contain only the necessary struct * fields and functions needed for lwIP. * * The PolarSSL API was not changed at all, so if you are already using * PolarSSL you can choose to skip the compilation of the included PolarSSL - * library into lwIP: + * library into lwIP. * - * The following defines are available for flexibility: - * - * LWIP_INCLUDED_POLARSSL_MD4 ; Use lwIP internal PolarSSL for MD4 - * LWIP_INCLUDED_POLARSSL_MD5 ; Use lwIP internal PolarSSL for MD5 - * LWIP_INCLUDED_POLARSSL_SHA1 ; Use lwIP internal PolarSSL for SHA1 - * LWIP_INCLUDED_POLARSSL_DES ; Use lwIP internal PolarSSL for DES - * LWIP_INCLUDED_POLARSSL_ARC4 ; Use lwIP internal PolarSSL for ARC4 - * - * If set (=1), the default if required by another enabled PPP feature unless - * explicitly set to 0, using included lwIP PolarSSL. - * - * If clear (=0), not needed or using external PolarSSL. + * If you are not using the embedded copy you must include external + * libraries into your arch/cc.h port file. * * Beware of the stack requirements which can be a lot larger if you are not * using our cleaned PolarSSL library. */ -/* CHAP, EAP, L2TP AUTH and MD5 Random require MD5 support */ -#if CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT || PPP_MD5_RANDM -#ifndef LWIP_INCLUDED_POLARSSL_MD5 -#define LWIP_INCLUDED_POLARSSL_MD5 1 -#endif /* LWIP_INCLUDED_POLARSSL_MD5 */ -#endif /* CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT || PPP_MD5_RANDM */ - -#if MSCHAP_SUPPORT -/* MSCHAP require MD4 support */ -#ifndef LWIP_INCLUDED_POLARSSL_MD4 -#define LWIP_INCLUDED_POLARSSL_MD4 1 -#endif /* LWIP_INCLUDED_POLARSSL_MD4 */ -/* MSCHAP require SHA1 support */ -#ifndef LWIP_INCLUDED_POLARSSL_SHA1 -#define LWIP_INCLUDED_POLARSSL_SHA1 1 -#endif /* LWIP_INCLUDED_POLARSSL_SHA1 */ -/* MSCHAP require DES support */ -#ifndef LWIP_INCLUDED_POLARSSL_DES -#define LWIP_INCLUDED_POLARSSL_DES 1 -#endif /* LWIP_INCLUDED_POLARSSL_DES */ -/* MS-CHAP support is required for MPPE */ -#if MPPE_SUPPORT -/* MPPE require ARC4 support */ -#ifndef LWIP_INCLUDED_POLARSSL_ARC4 -#define LWIP_INCLUDED_POLARSSL_ARC4 1 -#endif /* LWIP_INCLUDED_POLARSSL_ARC4*/ -#endif /* MPPE_SUPPORT */ -#endif /* MSCHAP_SUPPORT */ - -/* Default value if unset */ -#ifndef LWIP_INCLUDED_POLARSSL_MD4 -#define LWIP_INCLUDED_POLARSSL_MD4 0 -#endif /* LWIP_INCLUDED_POLARSSL_MD4 */ -#ifndef LWIP_INCLUDED_POLARSSL_MD5 -#define LWIP_INCLUDED_POLARSSL_MD5 0 -#endif /* LWIP_INCLUDED_POLARSSL_MD5 */ -#ifndef LWIP_INCLUDED_POLARSSL_SHA1 -#define LWIP_INCLUDED_POLARSSL_SHA1 0 -#endif /* LWIP_INCLUDED_POLARSSL_SHA1 */ -#ifndef LWIP_INCLUDED_POLARSSL_DES -#define LWIP_INCLUDED_POLARSSL_DES 0 -#endif /* LWIP_INCLUDED_POLARSSL_DES */ -#ifndef LWIP_INCLUDED_POLARSSL_ARC4 -#define LWIP_INCLUDED_POLARSSL_ARC4 0 -#endif /* LWIP_INCLUDED_POLARSSL_ARC4 */ +/** + * LWIP_USE_EXTERNAL_POLARSSL: Use external PolarSSL library + */ +#ifndef LWIP_USE_EXTERNAL_POLARSSL +#define LWIP_USE_EXTERNAL_POLARSSL 0 +#endif /* * PPP Timeouts @@ -582,6 +533,54 @@ #define MAXSECRETLEN 256 #endif +/* ------------------------------------------------------------------------- */ + +/* + * Build triggers for embedded PolarSSL + */ +#if !LWIP_USE_EXTERNAL_POLARSSL + +/* CHAP, EAP, L2TP AUTH and MD5 Random require MD5 support */ +#if CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT || PPP_MD5_RANDM +#define LWIP_INCLUDED_POLARSSL_MD5 1 +#endif /* CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT || PPP_MD5_RANDM */ + +#if MSCHAP_SUPPORT + +/* MSCHAP require MD4 support */ +#define LWIP_INCLUDED_POLARSSL_MD4 1 +/* MSCHAP require SHA1 support */ +#define LWIP_INCLUDED_POLARSSL_SHA1 1 +/* MSCHAP require DES support */ +#define LWIP_INCLUDED_POLARSSL_DES 1 + +/* MS-CHAP support is required for MPPE */ +#if MPPE_SUPPORT +/* MPPE require ARC4 support */ +#define LWIP_INCLUDED_POLARSSL_ARC4 1 +#endif /* MPPE_SUPPORT */ + +#endif /* MSCHAP_SUPPORT */ + +#endif /* !LWIP_USE_EXTERNAL_POLARSSL */ + +/* Default value if unset */ +#ifndef LWIP_INCLUDED_POLARSSL_MD4 +#define LWIP_INCLUDED_POLARSSL_MD4 0 +#endif /* LWIP_INCLUDED_POLARSSL_MD4 */ +#ifndef LWIP_INCLUDED_POLARSSL_MD5 +#define LWIP_INCLUDED_POLARSSL_MD5 0 +#endif /* LWIP_INCLUDED_POLARSSL_MD5 */ +#ifndef LWIP_INCLUDED_POLARSSL_SHA1 +#define LWIP_INCLUDED_POLARSSL_SHA1 0 +#endif /* LWIP_INCLUDED_POLARSSL_SHA1 */ +#ifndef LWIP_INCLUDED_POLARSSL_DES +#define LWIP_INCLUDED_POLARSSL_DES 0 +#endif /* LWIP_INCLUDED_POLARSSL_DES */ +#ifndef LWIP_INCLUDED_POLARSSL_ARC4 +#define LWIP_INCLUDED_POLARSSL_ARC4 0 +#endif /* LWIP_INCLUDED_POLARSSL_ARC4 */ + #endif /* PPP_SUPPORT */ #endif /* LWIP_PPP_OPTS_H */ diff --git a/src/netif/ppp/polarssl/README b/src/netif/ppp/polarssl/README index ff6e44db..3fdf159e 100644 --- a/src/netif/ppp/polarssl/README +++ b/src/netif/ppp/polarssl/README @@ -2,29 +2,18 @@ About PolarSSL files into lwIP PPP support ------------------------------------------ This folder contains some files fetched from the latest BSD release of -the PolarSSL project for ciphers and encryption methods we need for lwIP -PPP support. +the PolarSSL project (PolarSSL 0.10.1-bsd) for ciphers and encryption +methods we need for lwIP PPP support. The PolarSSL files were cleaned to contain only the necessary struct fields and functions needed for lwIP. - The PolarSSL API was not changed at all, so if you are already using PolarSSL you can choose to skip the compilation of the included PolarSSL -library into lwIP: +library into lwIP. -The following defines are available for flexibility: - -LWIP_INCLUDED_POLARSSL_MD4 ; Use lwIP internal PolarSSL for MD4 -LWIP_INCLUDED_POLARSSL_MD5 ; Use lwIP internal PolarSSL for MD5 -LWIP_INCLUDED_POLARSSL_SHA1 ; Use lwIP internal PolarSSL for SHA1 -LWIP_INCLUDED_POLARSSL_DES ; Use lwIP internal PolarSSL for DES -LWIP_INCLUDED_POLARSSL_ARC4 ; Use lwIP internal PolarSSL for ARC4 - -If set (=1), the default if required by another enabled PPP feature unless -explicitly set to 0, using included lwIP PolarSSL. - -If clear (=0), not needed or using external PolarSSL. +If you are not using the embedded copy you must include external +libraries into your arch/cc.h port file. Beware of the stack requirements which can be a lot larger if you are not using our cleaned PolarSSL library. From 5df4f70a96759cac3eef748de36db3618fdd0506 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Sun, 8 May 2016 21:26:19 +0200 Subject: [PATCH 010/275] PPP: add a new LWIP_USE_EXTERNAL_MBEDTLS PPP option PPP users can now choose to use an external mbed TLS copy instead of using our internal old version (but released under a BSDish license) PolarSSL copy. --- src/include/netif/ppp/ppp_opts.h | 11 +++++++++-- src/include/netif/ppp/pppcrypt.h | 34 ++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/src/include/netif/ppp/ppp_opts.h b/src/include/netif/ppp/ppp_opts.h index 77c7e793..75541f44 100644 --- a/src/include/netif/ppp/ppp_opts.h +++ b/src/include/netif/ppp/ppp_opts.h @@ -339,6 +339,13 @@ #define LWIP_USE_EXTERNAL_POLARSSL 0 #endif +/** + * LWIP_USE_EXTERNAL_MBEDTLS: Use external mbed TLS library + */ +#ifndef LWIP_USE_EXTERNAL_MBEDTLS +#define LWIP_USE_EXTERNAL_MBEDTLS 0 +#endif + /* * PPP Timeouts */ @@ -538,7 +545,7 @@ /* * Build triggers for embedded PolarSSL */ -#if !LWIP_USE_EXTERNAL_POLARSSL +#if !LWIP_USE_EXTERNAL_POLARSSL && !LWIP_USE_EXTERNAL_MBEDTLS /* CHAP, EAP, L2TP AUTH and MD5 Random require MD5 support */ #if CHAP_SUPPORT || EAP_SUPPORT || PPPOL2TP_AUTH_SUPPORT || PPP_MD5_RANDM @@ -562,7 +569,7 @@ #endif /* MSCHAP_SUPPORT */ -#endif /* !LWIP_USE_EXTERNAL_POLARSSL */ +#endif /* !LWIP_USE_EXTERNAL_POLARSSL && !LWIP_USE_EXTERNAL_MBEDTLS */ /* Default value if unset */ #ifndef LWIP_INCLUDED_POLARSSL_MD4 diff --git a/src/include/netif/ppp/pppcrypt.h b/src/include/netif/ppp/pppcrypt.h index f0eddb07..7d3982fd 100644 --- a/src/include/netif/ppp/pppcrypt.h +++ b/src/include/netif/ppp/pppcrypt.h @@ -47,6 +47,8 @@ /* * Map hashes and ciphers functions to PolarSSL */ +#if !LWIP_USE_EXTERNAL_MBEDTLS + #include "netif/ppp/polarssl/md4.h" #define lwip_md4_context md4_context #define lwip_md4_starts md4_starts @@ -75,6 +77,38 @@ #define lwip_arc4_setup arc4_setup #define lwip_arc4_crypt arc4_crypt +#endif /* !LWIP_USE_EXTERNAL_MBEDTLS */ + +/* + * Map hashes and ciphers functions to mbed TLS + */ +#if LWIP_USE_EXTERNAL_MBEDTLS + +#define lwip_md4_context mbedtls_md4_context +#define lwip_md4_starts mbedtls_md4_starts +#define lwip_md4_update mbedtls_md4_update +#define lwip_md4_finish mbedtls_md4_finish + +#define lwip_md5_context mbedtls_md5_context +#define lwip_md5_starts mbedtls_md5_starts +#define lwip_md5_update mbedtls_md5_update +#define lwip_md5_finish mbedtls_md5_finish + +#define lwip_sha1_context mbedtls_sha1_context +#define lwip_sha1_starts mbedtls_sha1_starts +#define lwip_sha1_update mbedtls_sha1_update +#define lwip_sha1_finish mbedtls_sha1_finish + +#define lwip_des_context mbedtls_des_context +#define lwip_des_setkey_enc mbedtls_des_setkey_enc +#define lwip_des_crypt_ecb mbedtls_des_crypt_ecb + +#define lwip_arc4_context mbedtls_arc4_context +#define lwip_arc4_setup mbedtls_arc4_setup +#define lwip_arc4_crypt(context, buffer, length) mbedtls_arc4_crypt(context, length, buffer, buffer) + +#endif /* LWIP_USE_EXTERNAL_MBEDTLS */ + void pppcrypt_56_to_64_bit_key(u_char *key, u_char *des_key); #endif /* PPPCRYPT_H */ From 33fc20cca2ed868cada7b8c151b62f651f243070 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Sun, 8 May 2016 21:58:56 +0200 Subject: [PATCH 011/275] PPP: use mbed TLS sanitize functions if available mbed TLS offers sanitize functions to zero-ise memory containing cryptographic keys, use them if built with external mbed TLS library. --- src/include/netif/ppp/pppcrypt.h | 20 ++++++++++++++++++++ src/netif/ppp/chap-md5.c | 4 ++++ src/netif/ppp/chap_ms.c | 26 ++++++++++++++++++++++++++ src/netif/ppp/eap.c | 4 ++++ src/netif/ppp/magic.c | 4 ++++ src/netif/ppp/mppe.c | 5 +++++ src/netif/ppp/pppol2tp.c | 4 ++++ 7 files changed, 67 insertions(+) diff --git a/src/include/netif/ppp/pppcrypt.h b/src/include/netif/ppp/pppcrypt.h index 7d3982fd..7790fe01 100644 --- a/src/include/netif/ppp/pppcrypt.h +++ b/src/include/netif/ppp/pppcrypt.h @@ -51,31 +51,41 @@ #include "netif/ppp/polarssl/md4.h" #define lwip_md4_context md4_context +#define lwip_md4_init(context) #define lwip_md4_starts md4_starts #define lwip_md4_update md4_update #define lwip_md4_finish md4_finish +#define lwip_md4_free(context) #include "netif/ppp/polarssl/md5.h" #define lwip_md5_context md5_context +#define lwip_md5_init(context) #define lwip_md5_starts md5_starts #define lwip_md5_update md5_update #define lwip_md5_finish md5_finish +#define lwip_md5_free(context) #include "netif/ppp/polarssl/sha1.h" #define lwip_sha1_context sha1_context +#define lwip_sha1_init(context) #define lwip_sha1_starts sha1_starts #define lwip_sha1_update sha1_update #define lwip_sha1_finish sha1_finish +#define lwip_sha1_free(context) #include "netif/ppp/polarssl/des.h" #define lwip_des_context des_context +#define lwip_des_init(context) #define lwip_des_setkey_enc des_setkey_enc #define lwip_des_crypt_ecb des_crypt_ecb +#define lwip_des_free(context) #include "netif/ppp/polarssl/arc4.h" #define lwip_arc4_context arc4_context +#define lwip_arc4_init(context) #define lwip_arc4_setup arc4_setup #define lwip_arc4_crypt arc4_crypt +#define lwip_arc4_free(context) #endif /* !LWIP_USE_EXTERNAL_MBEDTLS */ @@ -85,27 +95,37 @@ #if LWIP_USE_EXTERNAL_MBEDTLS #define lwip_md4_context mbedtls_md4_context +#define lwip_md4_init mbedtls_md4_init #define lwip_md4_starts mbedtls_md4_starts #define lwip_md4_update mbedtls_md4_update #define lwip_md4_finish mbedtls_md4_finish +#define lwip_md4_free mbedtls_md4_free #define lwip_md5_context mbedtls_md5_context +#define lwip_md5_init mbedtls_md5_init #define lwip_md5_starts mbedtls_md5_starts #define lwip_md5_update mbedtls_md5_update #define lwip_md5_finish mbedtls_md5_finish +#define lwip_md5_free mbedtls_md5_free #define lwip_sha1_context mbedtls_sha1_context +#define lwip_sha1_init mbedtls_sha1_init #define lwip_sha1_starts mbedtls_sha1_starts #define lwip_sha1_update mbedtls_sha1_update #define lwip_sha1_finish mbedtls_sha1_finish +#define lwip_sha1_free mbedtls_sha1_free #define lwip_des_context mbedtls_des_context +#define lwip_des_init mbedtls_des_init #define lwip_des_setkey_enc mbedtls_des_setkey_enc #define lwip_des_crypt_ecb mbedtls_des_crypt_ecb +#define lwip_des_free mbedtls_des_free #define lwip_arc4_context mbedtls_arc4_context +#define lwip_arc4_init mbedtls_arc4_init #define lwip_arc4_setup mbedtls_arc4_setup #define lwip_arc4_crypt(context, buffer, length) mbedtls_arc4_crypt(context, length, buffer, buffer) +#define lwip_arc4_free mbedtls_arc4_free #endif /* LWIP_USE_EXTERNAL_MBEDTLS */ diff --git a/src/netif/ppp/chap-md5.c b/src/netif/ppp/chap-md5.c index c7c8acff..88f069f0 100644 --- a/src/netif/ppp/chap-md5.c +++ b/src/netif/ppp/chap-md5.c @@ -73,11 +73,13 @@ static int chap_md5_verify_response(ppp_pcb *pcb, int id, const char *name, response_len = *response++; if (response_len == MD5_HASH_SIZE) { /* Generate hash of ID, secret, challenge */ + lwip_md5_init(&ctx); lwip_md5_starts(&ctx); lwip_md5_update(&ctx, &idbyte, 1); lwip_md5_update(&ctx, secret, secret_len); lwip_md5_update(&ctx, challenge, challenge_len); lwip_md5_finish(&ctx, hash); + lwip_md5_free(&ctx); /* Test if our hash matches the peer's response */ if (memcmp(hash, response, MD5_HASH_SIZE) == 0) { @@ -100,11 +102,13 @@ static void chap_md5_make_response(ppp_pcb *pcb, unsigned char *response, int id LWIP_UNUSED_ARG(private_); LWIP_UNUSED_ARG(pcb); + lwip_md5_init(&ctx); lwip_md5_starts(&ctx); lwip_md5_update(&ctx, &idbyte, 1); lwip_md5_update(&ctx, (const u_char *)secret, secret_len); lwip_md5_update(&ctx, challenge, challenge_len); lwip_md5_finish(&ctx, &response[1]); + lwip_md5_free(&ctx); response[0] = MD5_HASH_SIZE; } diff --git a/src/netif/ppp/chap_ms.c b/src/netif/ppp/chap_ms.c index 82877f8f..5a989c9b 100644 --- a/src/netif/ppp/chap_ms.c +++ b/src/netif/ppp/chap_ms.c @@ -509,16 +509,22 @@ static void ChallengeResponse(const u_char *challenge, #endif pppcrypt_56_to_64_bit_key(ZPasswordHash + 0, des_key); + lwip_des_init(&des); lwip_des_setkey_enc(&des, des_key); lwip_des_crypt_ecb(&des, challenge, response +0); + lwip_des_free(&des); pppcrypt_56_to_64_bit_key(ZPasswordHash + 7, des_key); + lwip_des_init(&des); lwip_des_setkey_enc(&des, des_key); lwip_des_crypt_ecb(&des, challenge, response +8); + lwip_des_free(&des); pppcrypt_56_to_64_bit_key(ZPasswordHash + 14, des_key); + lwip_des_init(&des); lwip_des_setkey_enc(&des, des_key); lwip_des_crypt_ecb(&des, challenge, response +16); + lwip_des_free(&des); #if 0 dbglog("ChallengeResponse - response %.24B", response); @@ -537,11 +543,13 @@ static void ChallengeHash(const u_char PeerChallenge[16], const u_char *rchallen else user = username; + lwip_sha1_init(&sha1Context); lwip_sha1_starts(&sha1Context); lwip_sha1_update(&sha1Context, PeerChallenge, 16); lwip_sha1_update(&sha1Context, rchallenge, 16); lwip_sha1_update(&sha1Context, (const unsigned char*)user, strlen(user)); lwip_sha1_finish(&sha1Context, sha1Hash); + lwip_sha1_free(&sha1Context); MEMCPY(Challenge, sha1Hash, 8); } @@ -564,9 +572,11 @@ static void ascii2unicode(const char ascii[], int ascii_len, u_char unicode[]) { static void NTPasswordHash(u_char *secret, int secret_len, u_char hash[MD4_SIGNATURE_SIZE]) { lwip_md4_context md4Context; + lwip_md4_init(&md4Context); lwip_md4_starts(&md4Context); lwip_md4_update(&md4Context, secret, secret_len); lwip_md4_finish(&md4Context, hash); + lwip_md4_free(&md4Context); } static void ChapMS_NT(const u_char *rchallenge, const char *secret, int secret_len, @@ -613,12 +623,16 @@ static void ChapMS_LANMan(u_char *rchallenge, char *secret, int secret_len, UcasePassword[i] = (u_char)toupper(secret[i]); pppcrypt_56_to_64_bit_key(UcasePassword +0, des_key); + lwip_des_init(&des); lwip_des_setkey_enc(&des, des_key); lwip_des_crypt_ecb(&des, StdText, PasswordHash +0); + lwip_des_free(&des); pppcrypt_56_to_64_bit_key(UcasePassword +7, des_key); + lwip_des_init(&des); lwip_des_setkey_enc(&des, des_key); lwip_des_crypt_ecb(&des, StdText, PasswordHash +8); + lwip_des_free(&des); ChallengeResponse(rchallenge, PasswordHash, &response[MS_CHAP_LANMANRESP]); } @@ -649,19 +663,23 @@ static void GenerateAuthenticatorResponse(const u_char PasswordHashHash[MD4_SIGN u_char Digest[SHA1_SIGNATURE_SIZE]; u_char Challenge[8]; + lwip_sha1_init(&sha1Context); lwip_sha1_starts(&sha1Context); lwip_sha1_update(&sha1Context, PasswordHashHash, MD4_SIGNATURE_SIZE); lwip_sha1_update(&sha1Context, NTResponse, 24); lwip_sha1_update(&sha1Context, Magic1, sizeof(Magic1)); lwip_sha1_finish(&sha1Context, Digest); + lwip_sha1_free(&sha1Context); ChallengeHash(PeerChallenge, rchallenge, username, Challenge); + lwip_sha1_init(&sha1Context); lwip_sha1_starts(&sha1Context); lwip_sha1_update(&sha1Context, Digest, sizeof(Digest)); lwip_sha1_update(&sha1Context, Challenge, sizeof(Challenge)); lwip_sha1_update(&sha1Context, Magic2, sizeof(Magic2)); lwip_sha1_finish(&sha1Context, Digest); + lwip_sha1_free(&sha1Context); /* Convert to ASCII hex string. */ for (i = 0; i < LWIP_MAX((MS_AUTH_RESPONSE_LENGTH / 2), (int)sizeof(Digest)); i++) @@ -705,11 +723,13 @@ static void Set_Start_Key(ppp_pcb *pcb, const u_char *rchallenge, const char *se NTPasswordHash(unicodePassword, secret_len * 2, PasswordHash); NTPasswordHash(PasswordHash, sizeof(PasswordHash), PasswordHashHash); + lwip_sha1_init(&sha1Context); lwip_sha1_starts(&sha1Context); lwip_sha1_update(&sha1Context, PasswordHashHash, MD4_SIGNATURE_SIZE); lwip_sha1_update(&sha1Context, PasswordHashHash, MD4_SIGNATURE_SIZE); lwip_sha1_update(&sha1Context, rchallenge, 8); lwip_sha1_finish(&sha1Context, Digest); + lwip_sha1_free(&sha1Context); /* Same key in both directions. */ mppe_set_key(pcb, &pcb->mppe_comp, Digest); @@ -765,11 +785,13 @@ static void SetMasterKeys(ppp_pcb *pcb, const char *secret, int secret_len, u_ch NTPasswordHash(unicodePassword, secret_len * 2, PasswordHash); NTPasswordHash(PasswordHash, sizeof(PasswordHash), PasswordHashHash); + lwip_sha1_init(&sha1Context); lwip_sha1_starts(&sha1Context); lwip_sha1_update(&sha1Context, PasswordHashHash, MD4_SIGNATURE_SIZE); lwip_sha1_update(&sha1Context, NTResponse, 24); lwip_sha1_update(&sha1Context, Magic1, sizeof(Magic1)); lwip_sha1_finish(&sha1Context, MasterKey); + lwip_sha1_free(&sha1Context); /* * generate send key @@ -778,12 +800,14 @@ static void SetMasterKeys(ppp_pcb *pcb, const char *secret, int secret_len, u_ch s = Magic3; else s = Magic2; + lwip_sha1_init(&sha1Context); lwip_sha1_starts(&sha1Context); lwip_sha1_update(&sha1Context, MasterKey, 16); lwip_sha1_update(&sha1Context, mppe_sha1_pad1, SHA1_PAD_SIZE); lwip_sha1_update(&sha1Context, s, 84); lwip_sha1_update(&sha1Context, mppe_sha1_pad2, SHA1_PAD_SIZE); lwip_sha1_finish(&sha1Context, Digest); + lwip_sha1_free(&sha1Context); mppe_set_key(pcb, &pcb->mppe_comp, Digest); @@ -794,12 +818,14 @@ static void SetMasterKeys(ppp_pcb *pcb, const char *secret, int secret_len, u_ch s = Magic2; else s = Magic3; + lwip_sha1_init(&sha1Context); lwip_sha1_starts(&sha1Context); lwip_sha1_update(&sha1Context, MasterKey, 16); lwip_sha1_update(&sha1Context, mppe_sha1_pad1, SHA1_PAD_SIZE); lwip_sha1_update(&sha1Context, s, 84); lwip_sha1_update(&sha1Context, mppe_sha1_pad2, SHA1_PAD_SIZE); lwip_sha1_finish(&sha1Context, Digest); + lwip_sha1_free(&sha1Context); mppe_set_key(pcb, &pcb->mppe_decomp, Digest); diff --git a/src/netif/ppp/eap.c b/src/netif/ppp/eap.c index 917d1e4c..5e044786 100644 --- a/src/netif/ppp/eap.c +++ b/src/netif/ppp/eap.c @@ -1443,6 +1443,7 @@ static void eap_request(ppp_pcb *pcb, u_char *inp, int id, int len) { eap_send_nak(pcb, id, EAPT_SRP); break; } + lwip_md5_init(&mdContext); lwip_md5_starts(&mdContext); typenum = id; lwip_md5_update(&mdContext, &typenum, 1); @@ -1450,6 +1451,7 @@ static void eap_request(ppp_pcb *pcb, u_char *inp, int id, int len) { BZERO(secret, sizeof (secret)); lwip_md5_update(&mdContext, inp, vallen); lwip_md5_finish(&mdContext, hash); + lwip_md5_free(&mdContext); eap_chap_response(pcb, id, hash, pcb->eap.es_client.ea_name, pcb->eap.es_client.ea_namelen); break; @@ -1869,12 +1871,14 @@ static void eap_response(ppp_pcb *pcb, u_char *inp, int id, int len) { eap_send_failure(pcb); break; } + lwip_md5_init(&mdContext); lwip_md5_starts(&mdContext); lwip_md5_update(&mdContext, &pcb->eap.es_server.ea_id, 1); lwip_md5_update(&mdContext, (u_char *)secret, secret_len); BZERO(secret, sizeof (secret)); lwip_md5_update(&mdContext, pcb->eap.es_challenge, pcb->eap.es_challen); lwip_md5_finish(&mdContext, hash); + lwip_md5_free(&mdContext); if (BCMP(hash, inp, MD5_SIGNATURE_SIZE) != 0) { eap_send_failure(pcb); break; diff --git a/src/netif/ppp/magic.c b/src/netif/ppp/magic.c index 66bf2276..d0d87c5e 100644 --- a/src/netif/ppp/magic.c +++ b/src/netif/ppp/magic.c @@ -101,6 +101,7 @@ static void magic_churnrand(char *rand_data, u32_t rand_len) { lwip_md5_context md5_ctx; /* LWIP_DEBUGF(LOG_INFO, ("magic_churnrand: %u@%P\n", rand_len, rand_data)); */ + lwip_md5_init(&md5_ctx); lwip_md5_starts(&md5_ctx); lwip_md5_update(&md5_ctx, (u_char *)magic_randpool, sizeof(magic_randpool)); if (rand_data) { @@ -122,6 +123,7 @@ static void magic_churnrand(char *rand_data, u32_t rand_len) { lwip_md5_update(&md5_ctx, (u_char *)&sys_data, sizeof(sys_data)); } lwip_md5_finish(&md5_ctx, (u_char *)magic_randpool); + lwip_md5_free(&md5_ctx); /* LWIP_DEBUGF(LOG_INFO, ("magic_churnrand: -> 0\n")); */ } @@ -163,10 +165,12 @@ void magic_random_bytes(unsigned char *buf, u32_t buf_len) { u32_t n; while (buf_len > 0) { + lwip_md5_init(&md5_ctx); lwip_md5_starts(&md5_ctx); lwip_md5_update(&md5_ctx, (u_char *)magic_randpool, sizeof(magic_randpool)); lwip_md5_update(&md5_ctx, (u_char *)&magic_randcount, sizeof(magic_randcount)); lwip_md5_finish(&md5_ctx, tmp); + lwip_md5_free(&md5_ctx); magic_randcount++; n = LWIP_MIN(buf_len, MD5_HASH_SIZE); MEMCPY(buf, tmp, n); diff --git a/src/netif/ppp/mppe.c b/src/netif/ppp/mppe.c index 216f587b..331039f8 100644 --- a/src/netif/ppp/mppe.c +++ b/src/netif/ppp/mppe.c @@ -67,17 +67,21 @@ static void mppe_rekey(ppp_mppe_state * state, int initial_key) * Key Derivation, from RFC 3078, RFC 3079. * Equivalent to Get_Key() for MS-CHAP as described in RFC 3079. */ + lwip_sha1_init(&sha1_ctx); lwip_sha1_starts(&sha1_ctx); lwip_sha1_update(&sha1_ctx, state->master_key, state->keylen); lwip_sha1_update(&sha1_ctx, mppe_sha1_pad1, SHA1_PAD_SIZE); lwip_sha1_update(&sha1_ctx, state->session_key, state->keylen); lwip_sha1_update(&sha1_ctx, mppe_sha1_pad2, SHA1_PAD_SIZE); lwip_sha1_finish(&sha1_ctx, sha1_digest); + lwip_sha1_free(&sha1_ctx); MEMCPY(state->session_key, sha1_digest, state->keylen); if (!initial_key) { + lwip_arc4_init(&state->arc4); lwip_arc4_setup(&state->arc4, sha1_digest, state->keylen); lwip_arc4_crypt(&state->arc4, state->session_key, state->keylen); + lwip_arc4_free(&state->arc4); } if (state->keylen == 8) { /* See RFC 3078 */ @@ -85,6 +89,7 @@ static void mppe_rekey(ppp_mppe_state * state, int initial_key) state->session_key[1] = 0x26; state->session_key[2] = 0x9e; } + lwip_arc4_init(&state->arc4); lwip_arc4_setup(&state->arc4, state->session_key, state->keylen); } diff --git a/src/netif/ppp/pppol2tp.c b/src/netif/ppp/pppol2tp.c index de36c6fc..1a6c31e2 100644 --- a/src/netif/ppp/pppol2tp.c +++ b/src/netif/ppp/pppol2tp.c @@ -592,12 +592,14 @@ static void pppol2tp_dispatch_control_packet(pppol2tp_pcb *l2tp, u16_t port, str return; } /* Generate hash of ID, secret, challenge */ + lwip_md5_init(&md5_ctx); lwip_md5_starts(&md5_ctx); challenge_id = PPPOL2TP_MESSAGETYPE_SCCCN; lwip_md5_update(&md5_ctx, &challenge_id, 1); lwip_md5_update(&md5_ctx, l2tp->secret, l2tp->secret_len); lwip_md5_update(&md5_ctx, inp, avplen); lwip_md5_finish(&md5_ctx, l2tp->challenge_hash); + lwip_md5_free(&md5_ctx); l2tp->send_challenge = 1; goto skipavp; case PPPOL2TP_AVPTYPE_CHALLENGERESPONSE: @@ -606,12 +608,14 @@ static void pppol2tp_dispatch_control_packet(pppol2tp_pcb *l2tp, u16_t port, str return; } /* Generate hash of ID, secret, challenge */ + lwip_md5_init(&md5_ctx); lwip_md5_starts(&md5_ctx); challenge_id = PPPOL2TP_MESSAGETYPE_SCCRP; lwip_md5_update(&md5_ctx, &challenge_id, 1); lwip_md5_update(&md5_ctx, l2tp->secret, l2tp->secret_len); lwip_md5_update(&md5_ctx, l2tp->secret_rv, sizeof(l2tp->secret_rv)); lwip_md5_finish(&md5_ctx, md5_hash); + lwip_md5_free(&md5_ctx); if ( memcmp(inp, md5_hash, sizeof(md5_hash)) ) { PPPDEBUG(LOG_DEBUG, ("pppol2tp: Received challenge response from peer and secret key do not match\n")); pppol2tp_abort_connect(l2tp); From b08f73be4405449f18ddc7b5ee64c3e8b7cf0f59 Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Tue, 10 May 2016 23:25:14 +0200 Subject: [PATCH 012/275] snmpv3: replace arch/cc.h to lwip/arch.h in included files Only "lwip/arch.h" is expected to include "arch/cc.h". This is the same spirit than "lwip/opt.h" for "lwipopts.h" and "lwip/sys.h" for "arch/sys_arch.h". --- src/apps/snmp/snmpv3_mbedtls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/snmp/snmpv3_mbedtls.c b/src/apps/snmp/snmpv3_mbedtls.c index 49311b98..2a0598ba 100644 --- a/src/apps/snmp/snmpv3_mbedtls.c +++ b/src/apps/snmp/snmpv3_mbedtls.c @@ -35,7 +35,7 @@ #include "lwip/apps/snmpv3.h" #include "snmpv3_priv.h" -#include "arch/cc.h" +#include "lwip/arch.h" #include "snmp_msg.h" #include "lwip/sys.h" #include From b9389c6eaf7274c3a4dd2a3cbdb4ca59ff2a647f Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Wed, 11 May 2016 00:19:27 +0200 Subject: [PATCH 013/275] PPP: remove sio.h from included files PPP is not using the SIO API anymore for quite a while. Remove now useless sio.h from included files. --- src/include/netif/ppp/ppp.h | 1 - src/include/netif/ppp/pppos.h | 1 - src/netif/ppp/ppp.c | 1 - 3 files changed, 3 deletions(-) diff --git a/src/include/netif/ppp/ppp.h b/src/include/netif/ppp/ppp.h index 718aa43b..ca4a4b81 100644 --- a/src/include/netif/ppp/ppp.h +++ b/src/include/netif/ppp/ppp.h @@ -42,7 +42,6 @@ #include "lwip/mem.h" #include "lwip/netif.h" #include "lwip/sys.h" -#include "lwip/sio.h" #include "lwip/timers.h" #if PPP_IPV6_SUPPORT #include "lwip/ip6_addr.h" diff --git a/src/include/netif/ppp/pppos.h b/src/include/netif/ppp/pppos.h index c18995c6..d924a9fc 100644 --- a/src/include/netif/ppp/pppos.h +++ b/src/include/netif/ppp/pppos.h @@ -38,7 +38,6 @@ #define PPPOS_H #include "lwip/sys.h" -#include "lwip/sio.h" #include "ppp.h" #include "vj.h" diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index 480bbccb..633a686d 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -88,7 +88,6 @@ #include "lwip/tcpip.h" #include "lwip/api.h" #include "lwip/snmp.h" -#include "lwip/sio.h" #include "lwip/sys.h" #include "lwip/ip4.h" /* for ip4_input() */ #if PPP_IPV6_SUPPORT From 45c6279bb0821ef088ae813d05e0b7b1fdf7f0db Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Wed, 11 May 2016 00:42:59 +0200 Subject: [PATCH 014/275] PPP, documentation, update next release version Next release will be 2.0.0 instead of 1.5.0, change that in the documentation. --- doc/ppp.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/ppp.txt b/doc/ppp.txt index f1b9107d..e789fcfd 100644 --- a/doc/ppp.txt +++ b/doc/ppp.txt @@ -8,7 +8,7 @@ Table of Contents: 2 - Raw API PPP example for all protocols 3 - PPPoS input path (raw API, IRQ safe API, TCPIP API) 4 - Thread safe PPP API (PPPAPI) -5 - Upgrading from lwIP <= 1.4.x to lwIP >= 1.5.x +5 - Upgrading from lwIP <= 1.4.x to lwIP >= 2.0.x @@ -365,10 +365,10 @@ this is actually pretty obvious. -5 Upgrading from lwIP <= 1.4.x to lwIP >= 1.5.x +5 Upgrading from lwIP <= 1.4.x to lwIP >= 2.0.x =============================================== -PPP API was fully reworked between 1.4.x and 1.5.x releases. However porting +PPP API was fully reworked between 1.4.x and 2.0.x releases. However porting from previous lwIP version is pretty easy: * Previous PPP API used an integer to identify PPP sessions, we are now From c6949d88d9fa136d4c66a58802fb900a00707316 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Wed, 11 May 2016 09:43:06 +0200 Subject: [PATCH 015/275] fixed unused variable warning in tcpip_api_call() for certain configurations --- src/api/tcpip.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/api/tcpip.c b/src/api/tcpip.c index 6c92c549..c4ad8a5b 100644 --- a/src/api/tcpip.c +++ b/src/api/tcpip.c @@ -363,16 +363,15 @@ tcpip_api_call(tcpip_api_call_fn fn, struct tcpip_api_call_data *call) return err; #else /* LWIP_TCPIP_CORE_LOCKING */ TCPIP_MSG_VAR_DECLARE(msg); - err_t err; - - LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); #if !LWIP_NETCONN_SEM_PER_THREAD - err = sys_sem_new(&call->sem, 0); + err_t err = sys_sem_new(&call->sem, 0); if (err != ERR_OK) { return err; } #endif /* LWIP_NETCONN_SEM_PER_THREAD */ + + LWIP_ASSERT("Invalid mbox", sys_mbox_valid_val(mbox)); TCPIP_MSG_VAR_ALLOC(msg); TCPIP_MSG_VAR_REF(msg).type = TCPIP_MSG_API_CALL; From 9f69bf82df6263aefa0be099e32c1d74483c201e Mon Sep 17 00:00:00 2001 From: Sylvain Rochet Date: Wed, 11 May 2016 10:48:01 +0200 Subject: [PATCH 016/275] PPP, documentation, updated to recent changes Fixed PPPAPI include path. Improved note about SIO's farewell. --- doc/ppp.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/ppp.txt b/doc/ppp.txt index e789fcfd..d9a927e1 100644 --- a/doc/ppp.txt +++ b/doc/ppp.txt @@ -360,8 +360,8 @@ void pppos_input_tcpip(ppp, buffer, buffer_len); ============================== There is a thread safe API for all corresponding ppp_* functions, you have to -enable LWIP_PPP_API in your lwipopts.h file, then see include/lwip/pppapi.h, -this is actually pretty obvious. +enable LWIP_PPP_API in your lwipopts.h file, then see +include/netif/ppp/pppapi.h, this is actually pretty obvious. @@ -392,7 +392,7 @@ from previous lwIP version is pretty easy: callback function * Only the following include files should now be used in user application: - #include "lwip/pppapi.h" + #include "netif/ppp/pppapi.h" #include "netif/ppp/pppos.h" #include "netif/ppp/pppoe.h" #include "netif/ppp/pppol2tp.h" @@ -418,6 +418,7 @@ from previous lwIP version is pretty easy: almost all cases. If you need it conditional contact us and we will made it conditional. -* PPPoS now requires a serial output callback +* PPPoS does not use the SIO API anymore, as such it now requires a serial + output callback in place of sio_write * PPP_MAXIDLEFLAG is now in ms instead of jiffies From 7e9377a9c776817921c3cca9a50dfeeaf49502ea Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Wed, 11 May 2016 10:38:08 +0800 Subject: [PATCH 017/275] dhcp: Use LWIP_ARRAYSIZE to get the number of array entries dhcp_discover_request_options is u8_t array, so the result is the same. But use LWIP_ARRAYSIZE to get the number of array entries is better because it works for all types. Signed-off-by: Axel Lin --- src/core/ipv4/dhcp.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/core/ipv4/dhcp.c b/src/core/ipv4/dhcp.c index 3c146755..42cf7c24 100644 --- a/src/core/ipv4/dhcp.c +++ b/src/core/ipv4/dhcp.c @@ -357,8 +357,8 @@ dhcp_select(struct netif *netif) dhcp_option(dhcp, DHCP_OPTION_SERVER_ID, 4); dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(ip_2_ip4(&dhcp->server_ip_addr)))); - dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, sizeof(dhcp_discover_request_options)); - for (i = 0; i < sizeof(dhcp_discover_request_options); i++) { + dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); + for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); } @@ -947,8 +947,8 @@ dhcp_discover(struct netif *netif) dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); - dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, sizeof(dhcp_discover_request_options)); - for (i = 0; i < sizeof(dhcp_discover_request_options); i++) { + dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); + for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); } dhcp_option_trailer(dhcp); @@ -1109,8 +1109,8 @@ dhcp_renew(struct netif *netif) dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); - dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, sizeof(dhcp_discover_request_options)); - for (i = 0; i < sizeof(dhcp_discover_request_options); i++) { + dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); + for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); } @@ -1161,8 +1161,8 @@ dhcp_rebind(struct netif *netif) dhcp_option(dhcp, DHCP_OPTION_MAX_MSG_SIZE, DHCP_OPTION_MAX_MSG_SIZE_LEN); dhcp_option_short(dhcp, DHCP_MAX_MSG_LEN(netif)); - dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, sizeof(dhcp_discover_request_options)); - for (i = 0; i < sizeof(dhcp_discover_request_options); i++) { + dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); + for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); } @@ -1214,8 +1214,8 @@ dhcp_reboot(struct netif *netif) dhcp_option(dhcp, DHCP_OPTION_REQUESTED_IP, 4); dhcp_option_long(dhcp, ntohl(ip4_addr_get_u32(&dhcp->offered_ip_addr))); - dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, sizeof(dhcp_discover_request_options)); - for (i = 0; i < sizeof(dhcp_discover_request_options); i++) { + dhcp_option(dhcp, DHCP_OPTION_PARAMETER_REQUEST_LIST, LWIP_ARRAYSIZE(dhcp_discover_request_options)); + for (i = 0; i < LWIP_ARRAYSIZE(dhcp_discover_request_options); i++) { dhcp_option_byte(dhcp, dhcp_discover_request_options[i]); } From 8c0f620d83f13078e087351351ca9f9890d521af Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Wed, 11 May 2016 16:24:50 +0800 Subject: [PATCH 018/275] dns: Use LWIP_ARRAYSIZE instead of open coded Signed-off-by: Axel Lin --- src/core/dns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/dns.c b/src/core/dns.c index 24ec717f..c1580f9b 100644 --- a/src/core/dns.c +++ b/src/core/dns.c @@ -463,7 +463,7 @@ dns_init_local(void) /* Dynamic: copy entries from DNS_LOCAL_HOSTLIST_INIT to list */ struct local_hostlist_entry local_hostlist_init[] = DNS_LOCAL_HOSTLIST_INIT; size_t namelen; - for (i = 0; i < sizeof(local_hostlist_init) / sizeof(struct local_hostlist_entry); i++) { + for (i = 0; i < LWIP_ARRAYSIZE(local_hostlist_init); i++) { struct local_hostlist_entry *init_entry = &local_hostlist_init[i]; LWIP_ASSERT("invalid host name (NULL)", init_entry->name != NULL); namelen = strlen(init_entry->name); @@ -508,7 +508,7 @@ dns_lookup_local(const char *hostname, ip_addr_t *addr LWIP_DNS_ADDRTYPE_ARG(u8_ } #else /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ size_t i; - for (i = 0; i < sizeof(local_hostlist_static) / sizeof(struct local_hostlist_entry); i++) { + for (i = 0; i < LWIP_ARRAYSIZE(local_hostlist_static); i++) { if ((LWIP_DNS_STRICMP(local_hostlist_static[i].name, hostname) == 0) && LWIP_DNS_ADDRTYPE_MATCH_IP(dns_addrtype, local_hostlist_static[i].addr)) { if (addr) { From ab989c3551ccf8bae5af0bc1ec3136fda599ff8d Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 12 May 2016 23:07:59 +0200 Subject: [PATCH 019/275] PPP: Use LWIP_ARRAYSIZE at appropriate places Use LWIP_ARRAYSIZE to simplify the code. Signed-off-by: Axel Lin Reviewed-by: Sylvain Rochet [Sylvain Rochet : added missing casts] Signed-off-by: Sylvain Rochet --- src/netif/ppp/ccp.c | 3 +-- src/netif/ppp/chap-new.c | 2 +- src/netif/ppp/eap.c | 11 ++++------- src/netif/ppp/ipcp.c | 2 +- src/netif/ppp/ipv6cp.c | 2 +- src/netif/ppp/lcp.c | 2 +- src/netif/ppp/upap.c | 2 +- 7 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/netif/ppp/ccp.c b/src/netif/ppp/ccp.c index 66b97de5..69b69592 100644 --- a/src/netif/ppp/ccp.c +++ b/src/netif/ppp/ccp.c @@ -1533,8 +1533,7 @@ static int ccp_printpkt(const u_char *p, int plen, void (*printer) (void *, cons if (len < HEADERLEN || len > plen) return 0; - if (code >= 1 && code <= (int)(sizeof(ccp_codenames) / sizeof(char *)) - && ccp_codenames[code-1] != NULL) + if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(ccp_codenames) && ccp_codenames[code-1] != NULL) printer(arg, " %s", ccp_codenames[code-1]); else printer(arg, " code=0x%x", code); diff --git a/src/netif/ppp/chap-new.c b/src/netif/ppp/chap-new.c index 475f22c5..9e7e66c5 100644 --- a/src/netif/ppp/chap-new.c +++ b/src/netif/ppp/chap-new.c @@ -604,7 +604,7 @@ static int chap_print_pkt(const unsigned char *p, int plen, if (len < CHAP_HDRLEN || len > plen) return 0; - if (code >= 1 && code <= (int)sizeof(chap_code_names) / (int)sizeof(char *)) + if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(chap_code_names)) printer(arg, " %s", chap_code_names[code-1]); else printer(arg, " code=0x%x", code); diff --git a/src/netif/ppp/eap.c b/src/netif/ppp/eap.c index 5e044786..8fb56368 100644 --- a/src/netif/ppp/eap.c +++ b/src/netif/ppp/eap.c @@ -2146,7 +2146,7 @@ static int eap_printpkt(const u_char *inp, int inlen, void (*printer) (void *, c if (len < EAP_HEADERLEN || len > inlen) return (0); - if (code >= 1 && code <= (int)sizeof(eap_codenames) / (int)sizeof(char *)) + if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(eap_codenames)) printer(arg, " %s", eap_codenames[code-1]); else printer(arg, " code=0x%x", code); @@ -2160,8 +2160,7 @@ static int eap_printpkt(const u_char *inp, int inlen, void (*printer) (void *, c } GETCHAR(rtype, inp); len--; - if (rtype >= 1 && - rtype <= (int)sizeof (eap_typenames) / (int)sizeof (char *)) + if (rtype >= 1 && rtype <= (int)LWIP_ARRAYSIZE(eap_typenames)) printer(arg, " %s", eap_typenames[rtype-1]); else printer(arg, " type=0x%x", rtype); @@ -2299,8 +2298,7 @@ static int eap_printpkt(const u_char *inp, int inlen, void (*printer) (void *, c break; GETCHAR(rtype, inp); len--; - if (rtype >= 1 && - rtype <= (int)sizeof (eap_typenames) / (int)sizeof (char *)) + if (rtype >= 1 && rtype <= (int)LWIP_ARRAYSIZE(eap_typenames)) printer(arg, " %s", eap_typenames[rtype-1]); else printer(arg, " type=0x%x", rtype); @@ -2323,8 +2321,7 @@ static int eap_printpkt(const u_char *inp, int inlen, void (*printer) (void *, c GETCHAR(rtype, inp); len--; printer(arg, " = 1 && - rtype < (int)sizeof (eap_typenames) / (int)sizeof (char *)) + if (rtype >= 1 && rtype < (int)LWIP_ARRAYSIZE(eap_typenames)) printer(arg, " (%s)", eap_typenames[rtype-1]); printer(arg, ">"); break; diff --git a/src/netif/ppp/ipcp.c b/src/netif/ppp/ipcp.c index 4b91424d..c42fdf76 100644 --- a/src/netif/ppp/ipcp.c +++ b/src/netif/ppp/ipcp.c @@ -2244,7 +2244,7 @@ static int ipcp_printpkt(const u_char *p, int plen, if (len < HEADERLEN || len > plen) return 0; - if (code >= 1 && code <= (int)sizeof(ipcp_codenames) / (int)sizeof(char *)) + if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(ipcp_codenames)) printer(arg, " %s", ipcp_codenames[code-1]); else printer(arg, " code=0x%x", code); diff --git a/src/netif/ppp/ipv6cp.c b/src/netif/ppp/ipv6cp.c index 61a26709..f02558e0 100644 --- a/src/netif/ppp/ipv6cp.c +++ b/src/netif/ppp/ipv6cp.c @@ -1416,7 +1416,7 @@ static int ipv6cp_printpkt(const u_char *p, int plen, if (len < HEADERLEN || len > plen) return 0; - if (code >= 1 && code <= (int)sizeof(ipv6cp_codenames) / (int)sizeof(char *)) + if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(ipv6cp_codenames)) printer(arg, " %s", ipv6cp_codenames[code-1]); else printer(arg, " code=0x%x", code); diff --git a/src/netif/ppp/lcp.c b/src/netif/ppp/lcp.c index d3df1ba5..233b68c9 100644 --- a/src/netif/ppp/lcp.c +++ b/src/netif/ppp/lcp.c @@ -2393,7 +2393,7 @@ static int lcp_printpkt(const u_char *p, int plen, if (len < HEADERLEN || len > plen) return 0; - if (code >= 1 && code <= (int)sizeof(lcp_codenames) / (int)sizeof(char *)) + if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(lcp_codenames)) printer(arg, " %s", lcp_codenames[code-1]); else printer(arg, " code=0x%x", code); diff --git a/src/netif/ppp/upap.c b/src/netif/ppp/upap.c index 524c996b..fd391af6 100644 --- a/src/netif/ppp/upap.c +++ b/src/netif/ppp/upap.c @@ -614,7 +614,7 @@ static int upap_printpkt(const u_char *p, int plen, void (*printer) (void *, con if (len < UPAP_HEADERLEN || len > plen) return 0; - if (code >= 1 && code <= (int)sizeof(upap_codenames) / (int)sizeof(char *)) + if (code >= 1 && code <= (int)LWIP_ARRAYSIZE(upap_codenames)) printer(arg, " %s", upap_codenames[code-1]); else printer(arg, " code=0x%x", code); From 8e7b8a32f960c1a7be56b810eda4965d6995b13b Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Sun, 15 May 2016 13:09:57 +0200 Subject: [PATCH 020/275] Rename LwipMibViewer to MibViewer since it does not depend on lwip specific code --- .gitignore | 4 ++-- .../LwipMibCompiler/CCodeGeneration/CCodeGeneration.csproj | 2 +- src/apps/snmp/LwipMibCompiler/LwipMibCompiler.sln | 2 +- .../LwipMibCompiler/LwipMibCompiler/LwipMibCompiler.csproj | 2 +- .../LwipSnmpCodeGeneration/LwipSnmpCodeGeneration.csproj | 2 +- .../{LwipMibViewer => MibViewer}/FormMain.Designer.cs | 0 .../LwipMibCompiler/{LwipMibViewer => MibViewer}/FormMain.cs | 0 .../{LwipMibViewer => MibViewer}/FormMain.resx | 0 .../LwipMibViewer.csproj => MibViewer/MibViewer.csproj} | 4 ++-- .../LwipMibCompiler/{LwipMibViewer => MibViewer}/Program.cs | 0 .../{LwipMibViewer => MibViewer}/Properties/AssemblyInfo.cs | 0 .../Properties/Resources.Designer.cs | 0 .../{LwipMibViewer => MibViewer}/Properties/Resources.resx | 0 .../Properties/Settings.Designer.cs | 0 .../{LwipMibViewer => MibViewer}/Properties/Settings.settings | 0 .../LwipMibCompiler/{LwipMibViewer => MibViewer}/app.config | 0 .../snmp/LwipMibCompiler/SharpSnmpLib/SharpSnmpLib.Mib.csproj | 1 + 17 files changed, 9 insertions(+), 8 deletions(-) rename src/apps/snmp/LwipMibCompiler/{LwipMibViewer => MibViewer}/FormMain.Designer.cs (100%) rename src/apps/snmp/LwipMibCompiler/{LwipMibViewer => MibViewer}/FormMain.cs (100%) rename src/apps/snmp/LwipMibCompiler/{LwipMibViewer => MibViewer}/FormMain.resx (100%) rename src/apps/snmp/LwipMibCompiler/{LwipMibViewer/LwipMibViewer.csproj => MibViewer/MibViewer.csproj} (97%) rename src/apps/snmp/LwipMibCompiler/{LwipMibViewer => MibViewer}/Program.cs (100%) rename src/apps/snmp/LwipMibCompiler/{LwipMibViewer => MibViewer}/Properties/AssemblyInfo.cs (100%) rename src/apps/snmp/LwipMibCompiler/{LwipMibViewer => MibViewer}/Properties/Resources.Designer.cs (100%) rename src/apps/snmp/LwipMibCompiler/{LwipMibViewer => MibViewer}/Properties/Resources.resx (100%) rename src/apps/snmp/LwipMibCompiler/{LwipMibViewer => MibViewer}/Properties/Settings.Designer.cs (100%) rename src/apps/snmp/LwipMibCompiler/{LwipMibViewer => MibViewer}/Properties/Settings.settings (100%) rename src/apps/snmp/LwipMibCompiler/{LwipMibViewer => MibViewer}/app.config (100%) diff --git a/.gitignore b/.gitignore index fa5fabba..c6888b63 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,8 @@ /src/apps/snmp/LwipMibCompiler/CCodeGeneration/obj/ /src/apps/snmp/LwipMibCompiler/LwipMibCompiler/bin/ /src/apps/snmp/LwipMibCompiler/LwipMibCompiler/obj/ -/src/apps/snmp/LwipMibCompiler/LwipMibViewer/bin/ -/src/apps/snmp/LwipMibCompiler/LwipMibViewer/obj/ +/src/apps/snmp/LwipMibCompiler/MibViewer/bin/ +/src/apps/snmp/LwipMibCompiler/MibViewer/obj/ /src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/bin/ /src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/obj/ /src/apps/snmp/LwipMibCompiler/SharpSnmpLib/bin/ diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/CCodeGeneration.csproj b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/CCodeGeneration.csproj index 06d5075e..639fed7c 100644 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/CCodeGeneration.csproj +++ b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/CCodeGeneration.csproj @@ -10,7 +10,7 @@ Properties CCodeGeneration CCodeGeneration - v4.0 + v4.5.1 512 diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler.sln b/src/apps/snmp/LwipMibCompiler/LwipMibCompiler.sln index 81e30546..ee041413 100644 --- a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler.sln +++ b/src/apps/snmp/LwipMibCompiler/LwipMibCompiler.sln @@ -9,7 +9,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CCodeGeneration", "CCodeGen EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpSnmpLib.Mib", "SharpSnmpLib\SharpSnmpLib.Mib.csproj", "{CBE20411-5DB7-487D-825D-7694267BB6F5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LwipMibViewer", "LwipMibViewer\LwipMibViewer.csproj", "{86CC0B65-7985-4017-A252-0A7A18DCAEF3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MibViewer", "MibViewer\MibViewer.csproj", "{86CC0B65-7985-4017-A252-0A7A18DCAEF3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/LwipMibCompiler.csproj b/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/LwipMibCompiler.csproj index 694263aa..6bd94995 100644 --- a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/LwipMibCompiler.csproj +++ b/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/LwipMibCompiler.csproj @@ -10,7 +10,7 @@ Properties LwipMibCompiler LwipMibCompiler - v4.0 + v4.5.1 512 diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/LwipSnmpCodeGeneration.csproj b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/LwipSnmpCodeGeneration.csproj index f4541c0c..de9d02df 100644 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/LwipSnmpCodeGeneration.csproj +++ b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/LwipSnmpCodeGeneration.csproj @@ -10,7 +10,7 @@ Properties LwipSnmpCodeGeneration LwipSnmpCodeGeneration - v4.0 + v4.5.1 512 diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibViewer/FormMain.Designer.cs b/src/apps/snmp/LwipMibCompiler/MibViewer/FormMain.Designer.cs similarity index 100% rename from src/apps/snmp/LwipMibCompiler/LwipMibViewer/FormMain.Designer.cs rename to src/apps/snmp/LwipMibCompiler/MibViewer/FormMain.Designer.cs diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibViewer/FormMain.cs b/src/apps/snmp/LwipMibCompiler/MibViewer/FormMain.cs similarity index 100% rename from src/apps/snmp/LwipMibCompiler/LwipMibViewer/FormMain.cs rename to src/apps/snmp/LwipMibCompiler/MibViewer/FormMain.cs diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibViewer/FormMain.resx b/src/apps/snmp/LwipMibCompiler/MibViewer/FormMain.resx similarity index 100% rename from src/apps/snmp/LwipMibCompiler/LwipMibViewer/FormMain.resx rename to src/apps/snmp/LwipMibCompiler/MibViewer/FormMain.resx diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibViewer/LwipMibViewer.csproj b/src/apps/snmp/LwipMibCompiler/MibViewer/MibViewer.csproj similarity index 97% rename from src/apps/snmp/LwipMibCompiler/LwipMibViewer/LwipMibViewer.csproj rename to src/apps/snmp/LwipMibCompiler/MibViewer/MibViewer.csproj index 9a7fd00a..96da2506 100644 --- a/src/apps/snmp/LwipMibCompiler/LwipMibViewer/LwipMibViewer.csproj +++ b/src/apps/snmp/LwipMibCompiler/MibViewer/MibViewer.csproj @@ -9,8 +9,8 @@ WinExe Properties LwipMibViewer - LwipMibViewer - v4.0 + MibViewer + v4.5.1 512 diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibViewer/Program.cs b/src/apps/snmp/LwipMibCompiler/MibViewer/Program.cs similarity index 100% rename from src/apps/snmp/LwipMibCompiler/LwipMibViewer/Program.cs rename to src/apps/snmp/LwipMibCompiler/MibViewer/Program.cs diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibViewer/Properties/AssemblyInfo.cs b/src/apps/snmp/LwipMibCompiler/MibViewer/Properties/AssemblyInfo.cs similarity index 100% rename from src/apps/snmp/LwipMibCompiler/LwipMibViewer/Properties/AssemblyInfo.cs rename to src/apps/snmp/LwipMibCompiler/MibViewer/Properties/AssemblyInfo.cs diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibViewer/Properties/Resources.Designer.cs b/src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Resources.Designer.cs similarity index 100% rename from src/apps/snmp/LwipMibCompiler/LwipMibViewer/Properties/Resources.Designer.cs rename to src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Resources.Designer.cs diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibViewer/Properties/Resources.resx b/src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Resources.resx similarity index 100% rename from src/apps/snmp/LwipMibCompiler/LwipMibViewer/Properties/Resources.resx rename to src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Resources.resx diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibViewer/Properties/Settings.Designer.cs b/src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Settings.Designer.cs similarity index 100% rename from src/apps/snmp/LwipMibCompiler/LwipMibViewer/Properties/Settings.Designer.cs rename to src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Settings.Designer.cs diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibViewer/Properties/Settings.settings b/src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Settings.settings similarity index 100% rename from src/apps/snmp/LwipMibCompiler/LwipMibViewer/Properties/Settings.settings rename to src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Settings.settings diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibViewer/app.config b/src/apps/snmp/LwipMibCompiler/MibViewer/app.config similarity index 100% rename from src/apps/snmp/LwipMibCompiler/LwipMibViewer/app.config rename to src/apps/snmp/LwipMibCompiler/MibViewer/app.config diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/SharpSnmpLib.Mib.csproj b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/SharpSnmpLib.Mib.csproj index e955426c..f1e724cf 100644 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/SharpSnmpLib.Mib.csproj +++ b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/SharpSnmpLib.Mib.csproj @@ -26,6 +26,7 @@ False + v4.5.1 true From ac0af0d7c79e4fa4c551a4e8f7a070533109fe4f Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Fri, 20 May 2016 11:02:02 +0200 Subject: [PATCH 021/275] Fix return value of sntp_getserver() call to return a pointer --- src/apps/sntp/sntp.c | 6 +++--- src/include/lwip/apps/sntp.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/apps/sntp/sntp.c b/src/apps/sntp/sntp.c index 3031b5be..619549b8 100644 --- a/src/apps/sntp/sntp.c +++ b/src/apps/sntp/sntp.c @@ -670,13 +670,13 @@ dhcp_set_ntp_servers(u8_t num, const ip4_addr_t *server) * @return IP address of the indexed NTP server or "ip_addr_any" if the NTP * server has not been configured by address (or at all). */ -ip_addr_t +const ip_addr_t* sntp_getserver(u8_t idx) { if (idx < SNTP_MAX_SERVERS) { - return sntp_servers[idx].addr; + return &sntp_servers[idx].addr; } - return *IP_ADDR_ANY; + return IP_ADDR_ANY; } #if SNTP_SERVER_DNS diff --git a/src/include/lwip/apps/sntp.h b/src/include/lwip/apps/sntp.h index fc5b431f..78999475 100644 --- a/src/include/lwip/apps/sntp.h +++ b/src/include/lwip/apps/sntp.h @@ -51,7 +51,7 @@ void sntp_stop(void); u8_t sntp_enabled(void); void sntp_setserver(u8_t idx, const ip_addr_t *addr); -ip_addr_t sntp_getserver(u8_t idx); +const ip_addr_t* sntp_getserver(u8_t idx); #if SNTP_SERVER_DNS void sntp_setservername(u8_t idx, char *server); From ac21a5f37076ea99422c959c63f62186c4a7d3cd Mon Sep 17 00:00:00 2001 From: Jan Breuer Date: Fri, 6 May 2016 16:15:20 +0200 Subject: [PATCH 022/275] nd6: add cleanup function --- src/core/ipv6/nd6.c | 25 +++++++++++++++++++++++++ src/core/netif.c | 8 ++++++++ src/include/lwip/nd6.h | 1 + 3 files changed, 34 insertions(+) diff --git a/src/core/ipv6/nd6.c b/src/core/ipv6/nd6.c index eb768847..77dab940 100644 --- a/src/core/ipv6/nd6.c +++ b/src/core/ipv6/nd6.c @@ -1843,4 +1843,29 @@ nd6_reachability_hint(const ip6_addr_t * ip6addr) } #endif /* LWIP_ND6_TCP_REACHABILITY_HINTS */ +void +nd6_cleanup_netif(struct netif * netif) +{ + u8_t i; + s8_t router_index; + for (i = 0; i < LWIP_ND6_NUM_PREFIXES; i++) { + if(prefix_list[i].netif == netif) { + prefix_list[i].netif = NULL; + prefix_list[i].flags = 0; + } + } + for (i = 0; i < LWIP_ND6_NUM_NEIGHBORS; i++) { + if(neighbor_cache[i].netif == netif) { + for (router_index = 0; router_index < LWIP_ND6_NUM_ROUTERS; router_index++) { + if (default_router_list[router_index].neighbor_entry == &neighbor_cache[i]) { + default_router_list[router_index].neighbor_entry = NULL; + default_router_list[router_index].flags = 0; + } + } + neighbor_cache[i].isrouter = 0; + nd6_free_neighbor_cache_entry(i); + } + } +} + #endif /* LWIP_IPV6 */ diff --git a/src/core/netif.c b/src/core/netif.c index ff6df4b2..49260432 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -68,6 +68,9 @@ #if LWIP_IPV6_MLD #include "lwip/mld6.h" #endif /* LWIP_IPV6_MLD */ +#if LWIP_IPV6 +#include "lwip/nd6.h" +#endif #if LWIP_NETIF_STATUS_CALLBACK #define NETIF_STATUS_CALLBACK(n) do{ if (n->status_callback) { (n->status_callback)(n); }}while(0) @@ -594,6 +597,11 @@ netif_set_down(struct netif *netif) etharp_cleanup_netif(netif); } #endif /* LWIP_IPV4 && LWIP_ARP */ + +#if LWIP_IPV6 + nd6_cleanup_netif(netif); +#endif /* LWIP_IPV6 */ + NETIF_STATUS_CALLBACK(netif); } } diff --git a/src/include/lwip/nd6.h b/src/include/lwip/nd6.h index d0646f1b..3f0ae298 100644 --- a/src/include/lwip/nd6.h +++ b/src/include/lwip/nd6.h @@ -351,6 +351,7 @@ err_t nd6_queue_packet(s8_t neighbor_index, struct pbuf * p); #if LWIP_ND6_TCP_REACHABILITY_HINTS void nd6_reachability_hint(const ip6_addr_t * ip6addr); #endif /* LWIP_ND6_TCP_REACHABILITY_HINTS */ +void nd6_cleanup_netif(struct netif * netif); #ifdef __cplusplus } From bd177ff38fffa32d1f3e3a228291ea413b446fc4 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Mon, 23 May 2016 09:47:14 +0200 Subject: [PATCH 023/275] added comment, fixed coding style --- src/core/ipv6/nd6.c | 5 +++++ src/netif/etharp.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/ipv6/nd6.c b/src/core/ipv6/nd6.c index 77dab940..fc85af66 100644 --- a/src/core/ipv6/nd6.c +++ b/src/core/ipv6/nd6.c @@ -1843,6 +1843,11 @@ nd6_reachability_hint(const ip6_addr_t * ip6addr) } #endif /* LWIP_ND6_TCP_REACHABILITY_HINTS */ +/** + * Remove all prefix, neighbor_cache and router entries of the specified netif. + * + * @param netif points to a network interface + */ void nd6_cleanup_netif(struct netif * netif) { diff --git a/src/netif/etharp.c b/src/netif/etharp.c index bf32b651..b82141dd 100644 --- a/src/netif/etharp.c +++ b/src/netif/etharp.c @@ -585,7 +585,8 @@ etharp_remove_static_entry(const ip4_addr_t *ipaddr) * * @param netif points to a network interface */ -void etharp_cleanup_netif(struct netif *netif) +void +etharp_cleanup_netif(struct netif *netif) { u8_t i; From ebd103775dcf1285c0eca87f83a0c48d0922da8b Mon Sep 17 00:00:00 2001 From: Jan Breuer Date: Wed, 11 May 2016 18:11:05 +0200 Subject: [PATCH 024/275] ipv6_addr: Render last zero in ip6addr_ntoa_r if not in first empty block --- src/core/ipv6/ip6_addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ipv6/ip6_addr.c b/src/core/ipv6/ip6_addr.c index 44d57607..7f14db44 100644 --- a/src/core/ipv6/ip6_addr.c +++ b/src/core/ipv6/ip6_addr.c @@ -207,7 +207,7 @@ ip6addr_ntoa_r(const ip6_addr_t *addr, char *buf, int buflen) /* Check for empty block. */ if (current_block_value == 0) { - if (current_block_index == 7) { + if (current_block_index == 7 && empty_block_flag == 1) { /* special case, we must render a ':' for the last block. */ buf[i++] = ':'; if (i >= buflen) { From 59af802fb6883970f013d6fea00bb089336c8812 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Mon, 23 May 2016 10:34:58 +0200 Subject: [PATCH 025/275] Add spaces around string concatenation macro (fixes compile on some compilers) --- src/include/lwip/apps/httpd_opts.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/lwip/apps/httpd_opts.h b/src/include/lwip/apps/httpd_opts.h index fd6b4145..871ced45 100644 --- a/src/include/lwip/apps/httpd_opts.h +++ b/src/include/lwip/apps/httpd_opts.h @@ -87,7 +87,7 @@ /** This string is passed in the HTTP header as "Server: " */ #ifndef HTTPD_SERVER_AGENT -#define HTTPD_SERVER_AGENT "lwIP/"LWIP_VERSION_STRING" (http://savannah.nongnu.org/projects/lwip)" +#define HTTPD_SERVER_AGENT "lwIP/" LWIP_VERSION_STRING " (http://savannah.nongnu.org/projects/lwip)" #endif /** Set this to 1 if you want to include code that creates HTTP headers From f4bf0dff854cccb84980cc0c824dbbf6d4774199 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Mon, 23 May 2016 20:16:20 +0200 Subject: [PATCH 026/275] Update doxygen file to work with recent doxygen versions --- .gitignore | 1 + doc/doxygen/generate.sh | 1 + doc/doxygen/lwip.Doxyfile | 2325 +++++++++++++++++++++++++++++++++++-- 3 files changed, 2260 insertions(+), 67 deletions(-) create mode 100755 doc/doxygen/generate.sh diff --git a/.gitignore b/.gitignore index c6888b63..0f13a3e8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/doc/doxygen/output /src/apps/snmp/LwipMibCompiler/CCodeGeneration/bin/ /src/apps/snmp/LwipMibCompiler/CCodeGeneration/obj/ /src/apps/snmp/LwipMibCompiler/LwipMibCompiler/bin/ diff --git a/doc/doxygen/generate.sh b/doc/doxygen/generate.sh new file mode 100755 index 00000000..99afb124 --- /dev/null +++ b/doc/doxygen/generate.sh @@ -0,0 +1 @@ +doxygen lwip.Doxyfile diff --git a/doc/doxygen/lwip.Doxyfile b/doc/doxygen/lwip.Doxyfile index 0c83ff03..a9ed15db 100644 --- a/doc/doxygen/lwip.Doxyfile +++ b/doc/doxygen/lwip.Doxyfile @@ -1,16 +1,123 @@ -# Doxyfile 1.5.4 +# Doxyfile 1.8.11 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + DOXYFILE_ENCODING = UTF-8 -PROJECT_NAME = "lwIP 1.3.0" -PROJECT_NUMBER = "lwIP 1.3.0" -OUTPUT_DIRECTORY = C:/OPENSOURCE/LwIP/doxygen + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "lwIP 2.0.0" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = "lwIP 2.0.0" + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = output + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + ABBREVIATE_BRIEF = "The $name class " \ "The $name widget " \ "The $name file " \ @@ -22,73 +129,683 @@ ABBREVIATE_BRIEF = "The $name class " \ a \ an \ the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + FULL_PATH_NAMES = YES -STRIP_FROM_PATH = C:\OPENSOURCE\lwip -STRIP_FROM_INC_PATH = C:\OPENSOURCE\lwip + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + MULTILINE_CPP_IS_BRIEF = NO -DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + TAB_SIZE = 8 -ALIASES = + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + HIDE_UNDOC_MEMBERS = YES + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + HIDE_UNDOC_CLASSES = YES + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO, these declarations will be +# included in the documentation. +# The default value is: NO. + HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + CASE_SENSE_NAMES = NO + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES, the +# scope will be hidden. +# The default value is: NO. + HIDE_SCOPE_NAMES = NO + +# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will +# append additional text to a page's title, such as Class Reference. If set to +# YES the compound reference will be hidden. +# The default value is: NO. + +HIDE_COMPOUND_REFERENCE= NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. +# The default value is: YES. + SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO, the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo +# list. This list is created by putting \todo commands in the documentation. +# The default value is: YES. + GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test +# list. This list is created by putting \test commands in the documentation. +# The default value is: YES. + GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + GENERATE_DEPRECATEDLIST= YES -ENABLED_SECTIONS = + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES, the +# list will mention the files that were used to generate the documentation. +# The default value is: YES. + SHOW_USED_FILES = YES -SHOW_DIRECTORIES = YES -FILE_VERSION_FILTER = + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + #--------------------------------------------------------------------------- -# configuration options related to warning and progress messages +# Configuration options related to warning and progress messages #--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO, doxygen will only warn about wrong or incomplete +# parameter documentation, but not about the absence of documentation. +# The default value is: NO. + WARN_NO_PARAMDOC = NO + +# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when +# a warning is encountered. +# The default value is: NO. + +WARN_AS_ERROR = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + WARN_FORMAT = "$file:$line: $text " -WARN_LOGFILE = + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + #--------------------------------------------------------------------------- -# configuration options related to the input files +# Configuration options related to the input files #--------------------------------------------------------------------------- -INPUT = C:\OPENSOURCE\lwip\lwip + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING +# Note: If this tag is empty the current directory is searched. + +INPUT = ../../src + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# read by doxygen. +# +# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp, +# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, +# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, +# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f, *.for, *.tcl, +# *.vhd, *.vhdl, *.ucf, *.qsf, *.as and *.js. + FILE_PATTERNS = *.c \ *.cc \ *.cxx \ @@ -107,122 +824,1250 @@ FILE_PATTERNS = *.c \ *.h++ \ *.idl \ *.odl \ - *.cs \ - *.php \ - *.php3 \ *.inc \ *.m \ *.mm \ *.dox + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + RECURSIVE = YES -EXCLUDE = + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + EXCLUDE_SYMLINKS = NO -EXCLUDE_PATTERNS = -EXCLUDE_SYMBOLS = -EXAMPLE_PATH = + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + EXAMPLE_PATTERNS = * + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + EXAMPLE_RECURSIVE = NO -IMAGE_PATH = -INPUT_FILTER = -FILTER_PATTERNS = + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. +# +# Note that for custom extensions or not directly supported extensions you also +# need to set EXTENSION_MAPPING for the extension otherwise the files are not +# properly processed by doxygen. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + #--------------------------------------------------------------------------- -# configuration options related to source browsing +# Configuration options related to source browsing #--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + SOURCE_BROWSER = NO + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + REFERENCED_BY_RELATION = NO + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + REFERENCES_RELATION = NO + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + VERBATIM_HEADERS = NO + +# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# generated with the -Duse-libclang=ON option for CMake. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + #--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index +# Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + ALPHABETICAL_INDEX = NO + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + COLS_IN_ALPHA_INDEX = 5 -IGNORE_PREFIX = + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + #--------------------------------------------------------------------------- -# configuration options related to the HTML output +# Configuration options related to the HTML output #--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output +# The default value is: YES. + GENERATE_HTML = YES -HTML_OUTPUT = C:/OPENSOURCE/lwIP/doxygen/output/html + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + HTML_FILE_EXTENSION = .html -HTML_HEADER = -HTML_FOOTER = -HTML_STYLESHEET = -HTML_ALIGN_MEMBERS = YES -GENERATE_HTMLHELP = NO + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefore more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra style sheet files is of importance (e.g. the last +# style sheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the style sheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to YES can help to show when doxygen was last run and thus if the +# documentation is up to date. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = NO + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + CHM_FILE = lwip.chm -HHC_LOCATION = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler (hhc.exe). If non-empty, +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated +# (YES) or that it should be included in the master .chm file (NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated +# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + DISABLE_INDEX = NO -ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + GENERATE_TREEVIEW = YES + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + TREEVIEW_WIDTH = 250 + +# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , / diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/LwipMibCompiler.csproj b/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/LwipMibCompiler.csproj index 6bd94995..694263aa 100644 --- a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/LwipMibCompiler.csproj +++ b/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/LwipMibCompiler.csproj @@ -10,7 +10,7 @@ Properties LwipMibCompiler LwipMibCompiler - v4.5.1 + v4.0 512 diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/LwipSnmpCodeGeneration.csproj b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/LwipSnmpCodeGeneration.csproj index de9d02df..f4541c0c 100644 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/LwipSnmpCodeGeneration.csproj +++ b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/LwipSnmpCodeGeneration.csproj @@ -10,7 +10,7 @@ Properties LwipSnmpCodeGeneration LwipSnmpCodeGeneration - v4.5.1 + v4.0 512 diff --git a/src/apps/snmp/LwipMibCompiler/MibViewer/MibViewer.csproj b/src/apps/snmp/LwipMibCompiler/MibViewer/MibViewer.csproj index 96da2506..957c058c 100644 --- a/src/apps/snmp/LwipMibCompiler/MibViewer/MibViewer.csproj +++ b/src/apps/snmp/LwipMibCompiler/MibViewer/MibViewer.csproj @@ -10,7 +10,7 @@ Properties LwipMibViewer MibViewer - v4.5.1 + v4.0 512 diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/SharpSnmpLib.Mib.csproj b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/SharpSnmpLib.Mib.csproj index f1e724cf..2cf86578 100644 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/SharpSnmpLib.Mib.csproj +++ b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/SharpSnmpLib.Mib.csproj @@ -26,7 +26,7 @@ False - v4.5.1 + v4.0 true From 10acd8303d3ec97dd78549971b0eb8ee71a8f325 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 26 Jul 2016 13:38:43 +0200 Subject: [PATCH 196/275] Start to document public RAW API via doxygen --- src/core/raw.c | 5 +++++ src/core/tcp.c | 35 +++++++++++++++++++++++++++++++---- src/core/udp.c | 25 ++++++++++++++++++++++--- 3 files changed, 58 insertions(+), 7 deletions(-) diff --git a/src/core/raw.c b/src/core/raw.c index 5033af41..a8fd7bad 100644 --- a/src/core/raw.c +++ b/src/core/raw.c @@ -38,6 +38,11 @@ * */ +/** + * @defgroup raw_api RAW API + * @see @ref rawapi + */ + #include "lwip/opt.h" #if LWIP_RAW /* don't build if not configured for use in lwipopts.h */ diff --git a/src/core/tcp.c b/src/core/tcp.c index 8962979d..52e94cec 100644 --- a/src/core/tcp.c +++ b/src/core/tcp.c @@ -41,6 +41,12 @@ * */ +/** + * @defgroup tcp_raw TCP + * @ingroup raw_api + * @see @ref rawapi + */ + #include "lwip/opt.h" #if LWIP_TCP /* don't build if not configured for use in lwipopts.h */ @@ -129,6 +135,7 @@ static u8_t tcp_timer_ctr; static u16_t tcp_new_port(void); /** + * @ingroup tcp_raw * Initialize this module. */ void @@ -189,7 +196,8 @@ tcp_listen_closed(struct tcp_pcb *pcb) } #if TCP_LISTEN_BACKLOG -/** Delay accepting a connection in respect to the listen backlog: +/** @ingroup tcp_raw + * Delay accepting a connection in respect to the listen backlog: * the number of outstanding connections is increased until * tcp_backlog_accepted() is called. * @@ -211,7 +219,8 @@ tcp_backlog_delayed(struct tcp_pcb* pcb) } } -/** A delayed-accept a connection is accepted (or closed/aborted): decreases +/** @ingroup tcp_raw + * A delayed-accept a connection is accepted (or closed/aborted): decreases * the number of outstanding connections after calling tcp_backlog_delayed(). * * ATTENTION: the caller is responsible for calling tcp_backlog_accepted() @@ -355,6 +364,7 @@ tcp_close_shutdown(struct tcp_pcb *pcb, u8_t rst_on_unacked_data) } /** + * @ingroup tcp_raw * Closes the connection held by the PCB. * * Listening pcbs are freed and may not be referenced any more. @@ -383,6 +393,7 @@ tcp_close(struct tcp_pcb *pcb) } /** + * @ingroup tcp_raw * Causes all or part of a full-duplex connection of this PCB to be shut down. * This doesn't deallocate the PCB unless shutting down both sides! * Shutting down both sides is the same as calling tcp_close, so if it succeds, @@ -497,6 +508,7 @@ tcp_abandon(struct tcp_pcb *pcb, int reset) } /** + * @ingroup tcp_raw * Aborts the connection by sending a RST (reset) segment to the remote * host. The pcb is deallocated. This function never fails. * @@ -513,6 +525,7 @@ tcp_abort(struct tcp_pcb *pcb) } /** + * @ingroup tcp_raw * Binds the connection to a local port number and IP address. If the * IP address is not given (i.e., ipaddr == NULL), the IP address of * the outgoing network interface is used instead. @@ -614,6 +627,7 @@ tcp_accept_null(void *arg, struct tcp_pcb *pcb, err_t err) #endif /* LWIP_CALLBACK_API */ /** + * @ingroup tcp_raw * Set the state of the connection to be LISTEN, which means that it * is able to accept incoming connections. The protocol control block * is reallocated in order to consume less memory. Setting the @@ -689,7 +703,8 @@ tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog) * Returns how much extra window would be advertised if we sent an * update now. */ -u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb) +u32_t +tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb) { u32_t new_right_edge = pcb->rcv_nxt + pcb->rcv_wnd; @@ -715,6 +730,7 @@ u32_t tcp_update_rcv_ann_wnd(struct tcp_pcb *pcb) } /** + * @ingroup tcp_raw * This function should be called by the application when it has * processed the data. The purpose is to advertise a larger window * when the data has been processed. @@ -792,6 +808,7 @@ again: } /** + * @ingroup tcp_raw * Connects to another host. The function given as the "connected" * argument will be called when the connection has been established. * @@ -1563,6 +1580,7 @@ tcp_alloc(u8_t prio) } /** + * @ingroup tcp_raw * Creates a new TCP protocol control block but doesn't place it on * any of the TCP PCB lists. * The pcb is not put on any list until binding using tcp_bind(). @@ -1581,6 +1599,7 @@ tcp_new(void) } /** + * @ingroup tcp_raw * Creates a new TCP protocol control block but doesn't * place it on any of the TCP PCB lists. * The pcb is not put on any list until binding using tcp_bind(). @@ -1605,6 +1624,7 @@ tcp_new_ip_type(u8_t type) } /** + * @ingroup tcp_raw * Used to specify the argument that should be passed callback * functions. * @@ -1623,6 +1643,7 @@ tcp_arg(struct tcp_pcb *pcb, void *arg) #if LWIP_CALLBACK_API /** + * @ingroup tcp_raw * Used to specify the function that should be called when a TCP * connection receives data. * @@ -1639,6 +1660,7 @@ tcp_recv(struct tcp_pcb *pcb, tcp_recv_fn recv) } /** + * @ingroup tcp_raw * Used to specify the function that should be called when TCP data * has been successfully delivered to the remote host. * @@ -1655,6 +1677,7 @@ tcp_sent(struct tcp_pcb *pcb, tcp_sent_fn sent) } /** + * @ingroup tcp_raw * Used to specify the function that should be called when a fatal error * has occurred on the connection. * @@ -1672,6 +1695,7 @@ tcp_err(struct tcp_pcb *pcb, tcp_err_fn err) } /** + * @ingroup tcp_raw * Used for specifying the function that should be called when a * LISTENing connection has been connected to another host. * @@ -1691,6 +1715,7 @@ tcp_accept(struct tcp_pcb *pcb, tcp_accept_fn accept) /** + * @ingroup tcp_raw * Used to specify the function that should be called periodically * from TCP. The interval is specified in terms of the TCP coarse * timer interval, which is called twice a second. @@ -1758,6 +1783,7 @@ tcp_pcb_purge(struct tcp_pcb *pcb) } /** + * @ingroup tcp_raw * Purges the PCB and removes it from a PCB list. Any delayed ACKs are sent first. * * @param pcblist PCB list to purge. @@ -1904,7 +1930,8 @@ tcp_netif_ipv4_addr_changed_pcblist(const ip4_addr_t* old_addr, struct tcp_pcb* * @param old_addr IPv4 address of the netif before change * @param new_addr IPv4 address of the netif after change or NULL if netif has been removed */ -void tcp_netif_ipv4_addr_changed(const ip4_addr_t* old_addr, const ip4_addr_t* new_addr) +void +tcp_netif_ipv4_addr_changed(const ip4_addr_t* old_addr, const ip4_addr_t* new_addr) { struct tcp_pcb_listen *lpcb, *next; diff --git a/src/core/udp.c b/src/core/udp.c index 217648b7..844ffcb8 100644 --- a/src/core/udp.c +++ b/src/core/udp.c @@ -37,6 +37,11 @@ * */ +/** + * @defgroup udp_raw UDP + * @ingroup raw_api + * @see @ref rawapi + */ /* udp.c * @@ -84,6 +89,7 @@ static u16_t udp_port = UDP_LOCAL_PORT_RANGE_START; struct udp_pcb *udp_pcbs; /** + * @ingroup udp_raw * Initialize this module. */ void @@ -460,6 +466,7 @@ chkerr: } /** + * @ingroup udp_raw * Send data using UDP. * * @param pcb UDP PCB used to send the data. @@ -490,7 +497,8 @@ udp_send(struct udp_pcb *pcb, struct pbuf *p) } #if LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP -/** Same as udp_send() but with checksum +/** @ingroup udp_raw + * Same as udp_send() but with checksum */ err_t udp_send_chksum(struct udp_pcb *pcb, struct pbuf *p, @@ -507,6 +515,7 @@ udp_send_chksum(struct udp_pcb *pcb, struct pbuf *p, #endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ /** + * @ingroup udp_raw * Send data to a specified address using UDP. * * @param pcb UDP PCB used to send the data. @@ -531,7 +540,8 @@ udp_sendto(struct udp_pcb *pcb, struct pbuf *p, return udp_sendto_chksum(pcb, p, dst_ip, dst_port, 0, 0); } -/** Same as udp_sendto(), but with checksum */ +/** @ingroup udp_raw + * Same as udp_sendto(), but with checksum */ err_t udp_sendto_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, u16_t dst_port, u8_t have_chksum, u16_t chksum) @@ -588,6 +598,7 @@ udp_sendto_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, } /** + * @ingroup udp_raw * Send data to a specified address using UDP. * The netif used for sending can be specified. * @@ -673,7 +684,8 @@ udp_sendto_if_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_i #endif /* LWIP_CHECKSUM_ON_COPY && CHECKSUM_GEN_UDP */ } -/** Same as udp_sendto_if(), but with source address */ +/** @ingroup udp_raw + * Same as @ref udp_sendto_if, but with source address */ err_t udp_sendto_if_src(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *dst_ip, u16_t dst_port, struct netif *netif, const ip_addr_t *src_ip) @@ -876,6 +888,7 @@ udp_sendto_if_src_chksum(struct udp_pcb *pcb, struct pbuf *p, const ip_addr_t *d } /** + * @ingroup udp_raw * Bind an UDP PCB. * * @param pcb UDP PCB to be bound with a local address ipaddr and port. @@ -976,6 +989,7 @@ udp_bind(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) } /** + * @ingroup udp_raw * Connect an UDP PCB. * * This will associate the UDP PCB with the remote address. @@ -1031,6 +1045,7 @@ udp_connect(struct udp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) } /** + * @ingroup udp_raw * Disconnect a UDP PCB * * @param pcb the udp pcb to disconnect. @@ -1054,6 +1069,7 @@ udp_disconnect(struct udp_pcb *pcb) } /** + * @ingroup udp_raw * Set a receive callback for a UDP PCB * * This callback will be called when receiving a datagram for the pcb. @@ -1071,6 +1087,7 @@ udp_recv(struct udp_pcb *pcb, udp_recv_fn recv, void *recv_arg) } /** + * @ingroup udp_raw * Remove an UDP PCB. * * @param pcb UDP PCB to be removed. The PCB is removed from the list of @@ -1103,6 +1120,7 @@ udp_remove(struct udp_pcb *pcb) } /** + * @ingroup udp_raw * Create a UDP PCB. * * @return The UDP PCB which was created. NULL if the PCB data structure @@ -1131,6 +1149,7 @@ udp_new(void) } /** + * @ingroup udp_raw * Create a UDP PCB for specific IP type. * * @param type IP address type, see IPADDR_TYPE_XX definitions. From 59295be4ef688786e6169e192b62c4638877392a Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 26 Jul 2016 13:53:59 +0200 Subject: [PATCH 197/275] Some more RAW API documentation updates Improve structure of documentation: PPP is now a module, too --- doc/doxygen/lwip.Doxyfile | 2 +- doc/doxygen/ppp.h | 2 +- doc/doxygen/rawapi.h | 4 ---- src/core/raw.c | 23 ++++++++++++++++++++--- src/core/tcp.c | 16 ++++++++-------- src/core/udp.c | 6 +++--- src/include/lwip/raw.h | 2 +- src/include/lwip/tcp.h | 2 +- src/include/lwip/udp.h | 2 +- 9 files changed, 36 insertions(+), 23 deletions(-) delete mode 100644 doc/doxygen/rawapi.h diff --git a/doc/doxygen/lwip.Doxyfile b/doc/doxygen/lwip.Doxyfile index 0af10249..18eca665 100644 --- a/doc/doxygen/lwip.Doxyfile +++ b/doc/doxygen/lwip.Doxyfile @@ -781,7 +781,7 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = ../../src main_page.h rawapi.h ppp.h contrib.h sys_arch.h +INPUT = ../../src main_page.h ppp.h contrib.h sys_arch.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/doc/doxygen/ppp.h b/doc/doxygen/ppp.h index f2624477..cbd50812 100644 --- a/doc/doxygen/ppp.h +++ b/doc/doxygen/ppp.h @@ -1,4 +1,4 @@ /** - * @page ppp PPP + * @defgroup ppp PPP * @verbinclude "ppp.txt" */ diff --git a/doc/doxygen/rawapi.h b/doc/doxygen/rawapi.h deleted file mode 100644 index f5203e5c..00000000 --- a/doc/doxygen/rawapi.h +++ /dev/null @@ -1,4 +0,0 @@ -/** - * @page rawapi RAW API - * @verbinclude "rawapi.txt" - */ diff --git a/src/core/raw.c b/src/core/raw.c index a8fd7bad..8747353f 100644 --- a/src/core/raw.c +++ b/src/core/raw.c @@ -3,7 +3,7 @@ * Implementation of raw protocol PCBs for low-level handling of * different types of protocols besides (or overriding) those * already available in lwIP.\n - * See also @ref rawapi + * See also @ref raw_raw */ /* @@ -40,7 +40,16 @@ /** * @defgroup raw_api RAW API - * @see @ref rawapi + * @verbinclude "rawapi.txt" + */ + +/** + * @defgroup raw_raw RAW + * @ingroup raw_api + * Implementation of raw protocol PCBs for low-level handling of + * different types of protocols besides (or overriding) those + * already available in lwIP.\n + * @see @ref raw_api */ #include "lwip/opt.h" @@ -190,6 +199,7 @@ raw_input(struct pbuf *p, struct netif *inp) } /** + * @ingroup raw_raw * Bind a RAW PCB. * * @param pcb RAW PCB to be bound with a local address ipaddr. @@ -214,6 +224,7 @@ raw_bind(struct raw_pcb *pcb, const ip_addr_t *ipaddr) } /** + * @ingroup raw_raw * Connect an RAW PCB. This function is required by upper layers * of lwip. Using the raw api you could use raw_sendto() instead * @@ -237,6 +248,7 @@ raw_connect(struct raw_pcb *pcb, const ip_addr_t *ipaddr) } /** + * @ingroup raw_raw * Set the callback function for received packets that match the * raw PCB's protocol and binding. * @@ -258,6 +270,7 @@ raw_recv(struct raw_pcb *pcb, raw_recv_fn recv, void *recv_arg) } /** + * @ingroup raw_raw * Send the raw IP packet to the given address. Note that actually you cannot * modify the IP headers (this is inconsistent with the receive callback where * you actually get the IP headers), you can only specify the IP payload here. @@ -383,6 +396,7 @@ raw_sendto(struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *ipaddr) } /** + * @ingroup raw_raw * Send the raw IP packet to the address given by raw_connect() * * @param pcb the raw pcb which to send @@ -396,6 +410,7 @@ raw_send(struct raw_pcb *pcb, struct pbuf *p) } /** + * @ingroup raw_raw * Remove an RAW PCB. * * @param pcb RAW PCB to be removed. The PCB is removed from the list of @@ -426,6 +441,7 @@ raw_remove(struct raw_pcb *pcb) } /** + * @ingroup raw_raw * Create a RAW PCB. * * @return The RAW PCB which was created. NULL if the PCB data structure @@ -456,7 +472,8 @@ raw_new(u8_t proto) } /** - * Create a RAW PCB for IPv6. + * @ingroup raw_raw + * Create a RAW PCB for specific IP type. * * @return The RAW PCB which was created. NULL if the PCB data structure * could not be allocated. diff --git a/src/core/tcp.c b/src/core/tcp.c index 52e94cec..0e46b27d 100644 --- a/src/core/tcp.c +++ b/src/core/tcp.c @@ -1,12 +1,7 @@ /** - * @file + * @file * Transmission Control Protocol for IP - * - * This file contains common functions for the TCP implementation, such as functinos - * for manipulating the data structures and the TCP timer functions. TCP functions - * related to input and output is found in tcp_in.c and tcp_out.c respectively.\n - * - * See also @ref rawapi + * See also @ref tcp_raw */ /* @@ -44,7 +39,12 @@ /** * @defgroup tcp_raw TCP * @ingroup raw_api - * @see @ref rawapi + * Transmission Control Protocol for IP\n + * @see @ref raw_api + * + * Common functions for the TCP implementation, such as functinos + * for manipulating the data structures and the TCP timer functions. TCP functions + * related to input and output is found in tcp_in.c and tcp_out.c respectively.\n */ #include "lwip/opt.h" diff --git a/src/core/udp.c b/src/core/udp.c index 844ffcb8..622c1a88 100644 --- a/src/core/udp.c +++ b/src/core/udp.c @@ -1,8 +1,7 @@ /** * @file * User Datagram Protocol module\n - * - * See also @ref rawapi + * See also @ref udp_raw */ /* @@ -40,7 +39,8 @@ /** * @defgroup udp_raw UDP * @ingroup raw_api - * @see @ref rawapi + * User Datagram Protocol module\n + * @see @ref raw_api */ /* udp.c diff --git a/src/include/lwip/raw.h b/src/include/lwip/raw.h index c70a6591..f92c8ee9 100644 --- a/src/include/lwip/raw.h +++ b/src/include/lwip/raw.h @@ -1,7 +1,7 @@ /** * @file * raw API (to be used from TCPIP thread)\n - * See also @ref rawapi + * See also @ref raw_raw */ /* diff --git a/src/include/lwip/tcp.h b/src/include/lwip/tcp.h index b18c6151..395692ac 100644 --- a/src/include/lwip/tcp.h +++ b/src/include/lwip/tcp.h @@ -1,7 +1,7 @@ /** * @file * TCP API (to be used from TCPIP thread)\n - * See also @ref rawapi + * See also @ref tcp_raw */ /* diff --git a/src/include/lwip/udp.h b/src/include/lwip/udp.h index d6156040..a0381ddd 100644 --- a/src/include/lwip/udp.h +++ b/src/include/lwip/udp.h @@ -1,7 +1,7 @@ /** * @file * UDP API (to be used from TCPIP thread)\n - * See also @ref rawapi + * See also @ref udp_raw */ /* From e030118750e3f2446a12ca2711b35cd56046be09 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Tue, 26 Jul 2016 15:01:39 +0200 Subject: [PATCH 198/275] moved MEM_LIBC_MALLOC code from mem.h to mem.c: - it's not worth littering mem.h just to save some bytes to prevent the additional call; - MEM_STATS now also work when MEM_LIBC_MALLOC is enabled --- src/core/mem.c | 107 ++++++++++++++++++++++++++++++++++++++--- src/core/memp.c | 7 ++- src/include/lwip/mem.h | 38 +++------------ 3 files changed, 111 insertions(+), 41 deletions(-) diff --git a/src/core/mem.c b/src/core/mem.c index b9991eb9..070d103a 100644 --- a/src/core/mem.c +++ b/src/core/mem.c @@ -54,9 +54,6 @@ */ #include "lwip/opt.h" - -#if !MEM_LIBC_MALLOC /* don't build if not configured for use in lwipopts.h */ - #include "lwip/def.h" #include "lwip/mem.h" #include "lwip/sys.h" @@ -65,7 +62,91 @@ #include -#if MEM_USE_POOLS +#if MEM_LIBC_MALLOC || MEM_USE_POOLS +/** mem_init is not used when using pools instead of a heap or using + * C library malloc(). + */ +void +mem_init(void) +{ +} + +/** mem_trim is not used when using pools instead of a heap or using + * C library malloc(): we can't free part of a pool element and the stack + * support mem_trim() to return a different pointer + */ +void* +mem_trim(void *mem, mem_size_t size) +{ + LWIP_UNUSED_ARG(size); + return mem; +} +#endif /* MEM_LIBC_MALLOC || MEM_USE_POOLS */ + +#if MEM_LIBC_MALLOC +/* lwIP heap implemented using C library malloc() */ + +/* in case C library malloc() needs extra protection, + * allow these defines to be overridden. + */ +#ifndef mem_clib_free +#define mem_clib_free free +#endif +#ifndef mem_clib_malloc +#define mem_clib_malloc malloc +#endif +#ifndef mem_clib_calloc +#define mem_clib_calloc calloc +#endif + +#if LWIP_STATS && MEM_STATS +#define MEM_LIBC_STATSHELPER_SIZE LWIP_MEM_ALIGN_SIZE(sizeof(mem_size_t)) +#else +#define MEM_LIBC_STATSHELPER_SIZE 0 +#endif + +/** + * Allocate a block of memory with a minimum of 'size' bytes. + * + * @param size is the minimum size of the requested block in bytes. + * @return pointer to allocated memory or NULL if no free memory was found. + * + * Note that the returned value must always be aligned (as defined by MEM_ALIGNMENT). + */ +void * +mem_malloc(mem_size_t size) +{ + void* ret = mem_clib_malloc(size + MEM_LIBC_STATSHELPER_SIZE); + if (ret == NULL) { + MEM_STATS_INC(err); + } else { + LWIP_ASSERT("malloc() must return aligned memory", LWIP_MEM_ALIGN(ret) == ret); +#if LWIP_STATS && MEM_STATS + *(mem_size_t*)ret = size; + ret = (u8_t*)ret + MEM_LIBC_STATSHELPER_SIZE; + MEM_STATS_INC_USED(used, size); +#endif + } + return ret; +} + +/** Put memory back on the heap + * + * @param rmem is the pointer as returned by a previous call to mem_malloc() + */ +void +mem_free(void *rmem) +{ + LWIP_ASSERT("rmem != NULL", (rmem != NULL)); + LWIP_ASSERT("rmem == MEM_ALIGN(rmem)", (rmem == LWIP_MEM_ALIGN(rmem))); +#if LWIP_STATS && MEM_STATS + rmem = (u8_t*)rmem - MEM_LIBC_STATSHELPER_SIZE; + MEM_STATS_DEC_USED(used, *(mem_size_t*)rmem); +#endif + mem_clib_free(rmem); +} + +#elif MEM_USE_POOLS /* lwIP heap implemented with different sized pools */ @@ -96,6 +177,7 @@ again: } if (poolnr > MEMP_POOL_LAST) { LWIP_ASSERT("mem_malloc(): no pool is that big!", 0); + MEM_STATS_INC(err); return NULL; } element = (struct memp_malloc_helper*)memp_malloc(poolnr); @@ -109,6 +191,7 @@ again: goto again; } #endif /* MEM_USE_POOLS_TRY_BIGGER_POOL */ + MEM_STATS_INC(err); return NULL; } @@ -509,7 +592,6 @@ mem_trim(void *rmem, mem_size_t newsize) } /** - * Adam's mem_malloc() plus solution for bug #17922 * Allocate a block of memory with a minimum of 'size' bytes. * * @param size is the minimum size of the requested block in bytes. @@ -660,6 +742,15 @@ mem_malloc_adjust_lfree: } #endif /* MEM_USE_POOLS */ + +#if MEM_LIBC_MALLOC && (!LWIP_STATS || !MEM_STATS) +void * +mem_calloc(mem_size_t count, mem_size_t size) +{ + return mem_clib_calloc(count, size); +} + +#else /* MEM_LIBC_MALLOC && (!LWIP_STATS || !MEM_STATS) */ /** * Contiguously allocates enough space for count objects that are size bytes * of memory each and returns a pointer to the allocated memory. @@ -670,7 +761,8 @@ mem_malloc_adjust_lfree: * @param size size of the objects to allocate * @return pointer to allocated memory / NULL pointer if there is an error */ -void *mem_calloc(mem_size_t count, mem_size_t size) +void * +mem_calloc(mem_size_t count, mem_size_t size) { void *p; @@ -682,5 +774,4 @@ void *mem_calloc(mem_size_t count, mem_size_t size) } return p; } - -#endif /* !MEM_LIBC_MALLOC */ +#endif /* MEM_LIBC_MALLOC && (!LWIP_STATS || !MEM_STATS) */ diff --git a/src/core/memp.c b/src/core/memp.c index 8a60fadb..97187d15 100644 --- a/src/core/memp.c +++ b/src/core/memp.c @@ -228,7 +228,9 @@ memp_overflow_init(const struct memp_desc *desc) void memp_init_pool(const struct memp_desc *desc) { -#if !MEMP_MEM_MALLOC +#if MEMP_MEM_MALLOC + LWIP_UNUSED_ARG(desc); +#else int i; struct memp *memp; @@ -277,7 +279,7 @@ memp_init(void) for (i = 0; i < LWIP_ARRAYSIZE(memp_pools); i++) { memp_init_pool(memp_pools[i]); -#if LWIP_STATS +#if LWIP_STATS && MEMP_STATS lwip_stats.memp[i] = memp_pools[i]->stats; #endif } @@ -436,6 +438,7 @@ do_memp_free_pool(const struct memp_desc* desc, void *mem) #endif #if MEMP_MEM_MALLOC + LWIP_UNUSED_ARG(desc); SYS_ARCH_UNPROTECT(old_level); mem_free(memp); #else /* MEMP_MEM_MALLOC */ diff --git a/src/include/lwip/mem.h b/src/include/lwip/mem.h index 791c5b94..e4f6a64d 100644 --- a/src/include/lwip/mem.h +++ b/src/include/lwip/mem.h @@ -46,30 +46,15 @@ extern "C" { #if MEM_LIBC_MALLOC #include /* for size_t */ - typedef size_t mem_size_t; #define MEM_SIZE_F SZT_F -/* aliases for C library malloc() */ -#define mem_init() -/* in case C library malloc() needs extra protection, - * allow these defines to be overridden. - */ -#ifndef mem_free -#define mem_free free -#endif -#ifndef mem_malloc -#define mem_malloc malloc -#endif -#ifndef mem_calloc -#define mem_calloc calloc -#endif -/* Since there is no C library allocation function to shrink memory without - moving it, define this to nothing. */ -#ifndef mem_trim -#define mem_trim(mem, size) (mem) -#endif -#else /* MEM_LIBC_MALLOC */ +#elif MEM_USE_POOLS + +typedef u16_t mem_size_t; +#define MEM_SIZE_F U16_F + +#else /* MEM_SIZE would have to be aligned, but using 64000 here instead of * 65535 leaves some room for alignment... @@ -81,22 +66,13 @@ typedef u32_t mem_size_t; typedef u16_t mem_size_t; #define MEM_SIZE_F U16_F #endif /* MEM_SIZE > 64000 */ +#endif -#if MEM_USE_POOLS -/** mem_init is not used when using pools instead of a heap */ -#define mem_init() -/** mem_trim is not used when using pools instead of a heap: - we can't free part of a pool element and don't want to copy the rest */ -#define mem_trim(mem, size) (mem) -#else /* MEM_USE_POOLS */ -/* lwIP alternative malloc */ void mem_init(void); void *mem_trim(void *mem, mem_size_t size); -#endif /* MEM_USE_POOLS */ void *mem_malloc(mem_size_t size); void *mem_calloc(mem_size_t count, mem_size_t size); void mem_free(void *mem); -#endif /* MEM_LIBC_MALLOC */ #ifdef __cplusplus } From 40bc80b551172d8c85752bc498ee9740c81e1405 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 26 Jul 2016 16:39:34 +0200 Subject: [PATCH 199/275] Fix compile of snmp_mib2_system.c after my last SNMP API change --- src/apps/snmp/snmp_mib2_system.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/apps/snmp/snmp_mib2_system.c b/src/apps/snmp/snmp_mib2_system.c index 0b3daa6c..53707ee8 100644 --- a/src/apps/snmp/snmp_mib2_system.c +++ b/src/apps/snmp/snmp_mib2_system.c @@ -223,7 +223,7 @@ system_get_value(const struct snmp_scalar_array_node_def *node, void *value) switch (node->oid) { case 1: /* sysDescr */ var = sysdescr; - var_len = (s16_t*)sysdescr_len; + var_len = (const s16_t*)sysdescr_len; break; case 2: /* sysObjectID */ { @@ -236,15 +236,15 @@ system_get_value(const struct snmp_scalar_array_node_def *node, void *value) return sizeof(u32_t); case 4: /* sysContact */ var = syscontact; - var_len = (s16_t*)syscontact_len; + var_len = (const s16_t*)syscontact_len; break; case 5: /* sysName */ var = sysname; - var_len = (s16_t*)sysname_len; + var_len = (const s16_t*)sysname_len; break; case 6: /* sysLocation */ var = syslocation; - var_len = (s16_t*)syslocation_len; + var_len = (const s16_t*)syslocation_len; break; case 7: /* sysServices */ *(s32_t*)value = SNMP_SYSSERVICES; From bd79f6c055acca80650f83695dc9e7ef64021a06 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 26 Jul 2016 16:40:13 +0200 Subject: [PATCH 200/275] Document DNS, memory pools and PBUFs as modules --- doc/doxygen/main_page.h | 2 +- src/core/dns.c | 33 +++++++++++++++++++++----------- src/core/memp.c | 4 ++++ src/core/pbuf.c | 42 ++++++++++++++++++++++++++++++++--------- src/core/tcp.c | 1 - src/core/udp.c | 1 - src/include/lwip/memp.h | 22 ++++++++++++++++----- 7 files changed, 77 insertions(+), 28 deletions(-) diff --git a/doc/doxygen/main_page.h b/doc/doxygen/main_page.h index 838ad6bc..4b2ccba4 100644 --- a/doc/doxygen/main_page.h +++ b/doc/doxygen/main_page.h @@ -47,7 +47,7 @@ * http://lists.nongnu.org/archive/html/lwip-devel/\n * \n * Continuous integration builds (GCC, clang):\n - * https://travis-ci.org/yarrick/lwip-merged + * https://travis-ci.org/yarrick/lwip-merged\n * \n * lwIP was originally written by Adam Dunkels:\n * http://dunkels.com/adam/\n diff --git a/src/core/dns.c b/src/core/dns.c index eabe8721..b04dbd75 100644 --- a/src/core/dns.c +++ b/src/core/dns.c @@ -1,18 +1,14 @@ /** * @file * DNS - host name to IP address resolver. - * */ -/** - - * This file implements a DNS host name to IP address resolver. - +/* * Port to lwIP from uIP * by Jim Pettinato April 2007 - + * * security fixes and more by Simon Goldschmidt - + * * uIP version Copyright (c) 2002-2003, Adam Dunkels. * All rights reserved. * @@ -39,9 +35,12 @@ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * @defgroup dns DNS * - * - * DNS.C + * Implements a DNS host name to IP address resolver. * * The lwIP DNS resolver functions are used to lookup a host name and * map it to a numerical IP address. It maintains a list of resolved @@ -59,6 +58,8 @@ * Once a hostname has been resolved (or found to be non-existent), * the resolver code calls a specified callback function (which * must be implemented by the module that uses the resolver). + * + * All functions must be called from TCPIP thread. */ /*----------------------------------------------------------------------------- @@ -408,6 +409,7 @@ dns_init(void) } /** + * @ingroup dns * Initialize one of the DNS servers. * * @param numdns the index of the DNS server to set must be < DNS_MAX_SERVERS @@ -426,6 +428,7 @@ dns_setserver(u8_t numdns, const ip_addr_t *dnsserver) } /** + * @ingroup dns * Obtain one of the currently configured DNS server. * * @param numdns the index of the DNS server @@ -484,6 +487,7 @@ dns_init_local(void) } /** + * @ingroup dns * Scans the local host-list for a hostname. * * @param hostname Hostname to look for in the local host-list @@ -522,7 +526,9 @@ dns_lookup_local(const char *hostname, ip_addr_t *addr LWIP_DNS_ADDRTYPE_ARG(u8_ } #if DNS_LOCAL_HOSTLIST_IS_DYNAMIC -/** Remove all entries from the local host-list for a specific hostname +/** + * @ingroup dns + * Remove all entries from the local host-list for a specific hostname * and/or IP address * * @param hostname hostname for which entries shall be removed from the local @@ -558,6 +564,7 @@ dns_local_removehost(const char *hostname, const ip_addr_t *addr) } /** + * @ingroup dns * Add a hostname/IP address pair to the local host-list. * Duplicates are not checked. * @@ -591,6 +598,7 @@ dns_local_addhost(const char *hostname, const ip_addr_t *addr) #endif /* DNS_LOCAL_HOSTLIST */ /** + * @ingroup dns * Look up a hostname in the array of known hostnames. * * @note This function only looks in the internal array of known @@ -1378,6 +1386,7 @@ dns_enqueue(const char *name, size_t hostnamelen, dns_found_callback found, } /** + * @ingroup dns * Resolve a hostname (string) into an IP address. * NON-BLOCKING callback version for use with raw API!!! * @@ -1403,7 +1412,9 @@ dns_gethostbyname(const char *hostname, ip_addr_t *addr, dns_found_callback foun return dns_gethostbyname_addrtype(hostname, addr, found, callback_arg, LWIP_DNS_ADDRTYPE_DEFAULT); } -/** Like dns_gethostbyname, but returned address type can be controlled: +/** + * @ingroup dns + * Like dns_gethostbyname, but returned address type can be controlled: * @param hostname the hostname that is to be queried * @param addr pointer to a ip_addr_t where to store the address if it is already * cached in the dns_table (only valid if ERR_OK is returned!) diff --git a/src/core/memp.c b/src/core/memp.c index 97187d15..b315ef0e 100644 --- a/src/core/memp.c +++ b/src/core/memp.c @@ -38,6 +38,10 @@ * */ +/** + * @defgroup mempool Memory pools + */ + #include "lwip/opt.h" #include "lwip/memp.h" diff --git a/src/core/pbuf.c b/src/core/pbuf.c index 1d64a7d5..9d9d6b86 100644 --- a/src/core/pbuf.c +++ b/src/core/pbuf.c @@ -1,6 +1,10 @@ /** * @file * Packet buffer management + */ + +/** + * @defgroup pbuf PBUF * * Packets are built from the pbuf data structure. It supports dynamic * memory allocation for packet contents or can reference externally @@ -165,6 +169,7 @@ pbuf_pool_is_empty(void) #endif /* !LWIP_TCP || !TCP_QUEUE_OOSEQ || !PBUF_POOL_FREE_OOSEQ */ /** + * @ingroup pbuf * Allocates a pbuf of the given type (possibly a chain for PBUF_POOL type). * * The actual memory allocated for the pbuf is determined by the @@ -346,7 +351,9 @@ pbuf_alloc(pbuf_layer layer, u16_t length, pbuf_type type) } #if LWIP_SUPPORT_CUSTOM_PBUF -/** Initialize a custom pbuf (already allocated). +/** + * @ingroup pbuf + * Initialize a custom pbuf (already allocated). * * @param l flag to define header size * @param length size of the pbuf's payload @@ -413,6 +420,7 @@ pbuf_alloced_custom(pbuf_layer l, u16_t length, pbuf_type type, struct pbuf_cust #endif /* LWIP_SUPPORT_CUSTOM_PBUF */ /** + * @ingroup pbuf * Shrink a pbuf chain to a desired length. * * @param p pbuf to shrink. @@ -616,6 +624,7 @@ pbuf_header_force(struct pbuf *p, s16_t header_size_increment) } /** + * @ingroup pbuf * Dereference a pbuf chain or queue and deallocate any no-longer-used * pbufs at the head of this chain or queue. * @@ -733,7 +742,6 @@ pbuf_free(struct pbuf *p) * @param p first pbuf of chain * @return the number of pbufs in a chain */ - u8_t pbuf_clen(struct pbuf *p) { @@ -748,6 +756,7 @@ pbuf_clen(struct pbuf *p) } /** + * @ingroup pbuf * Increment the reference count of the pbuf. * * @param p pbuf to increase reference counter of @@ -766,6 +775,7 @@ pbuf_ref(struct pbuf *p) } /** + * @ingroup pbuf * Concatenate two pbufs (each may be a pbuf chain) and take over * the caller's reference of the tail pbuf. * @@ -774,7 +784,6 @@ pbuf_ref(struct pbuf *p) * * @see pbuf_chain() */ - void pbuf_cat(struct pbuf *h, struct pbuf *t) { @@ -801,6 +810,7 @@ pbuf_cat(struct pbuf *h, struct pbuf *t) } /** + * @ingroup pbuf * Chain two pbufs (or pbuf chains) together. * * The caller MUST call pbuf_free(t) once it has stopped @@ -865,7 +875,7 @@ pbuf_dechain(struct pbuf *p) } /** - * + * @ingroup pbuf * Create PBUF_RAM copies of pbufs. * * Used to queue packets on behalf of the lwIP stack, such as @@ -938,6 +948,7 @@ pbuf_copy(struct pbuf *p_to, struct pbuf *p_from) } /** + * @ingroup pbuf * Copy (part of) the contents of a packet buffer * to an application supplied buffer. * @@ -1037,6 +1048,7 @@ void pbuf_split_64k(struct pbuf *p, struct pbuf **rest) #endif /* LWIP_TCP && TCP_QUEUE_OOSEQ && LWIP_WND_SCALE */ /** + * @ingroup pbuf * Skip a number of bytes at the start of a pbuf * * @param in input pbuf @@ -1062,6 +1074,7 @@ pbuf_skip(struct pbuf* in, u16_t in_offset, u16_t* out_offset) } /** + * @ingroup pbuf * Copy application supplied data into a pbuf. * This function can only be used to copy the equivalent of buf->tot_len data. * @@ -1105,6 +1118,7 @@ pbuf_take(struct pbuf *buf, const void *dataptr, u16_t len) } /** + * @ingroup pbuf * Same as pbuf_take() but puts data at an offset * * @param buf pbuf to fill with data @@ -1138,6 +1152,7 @@ pbuf_take_at(struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset) } /** + * @ingroup pbuf * Creates a single pbuf out of a queue of pbufs. * * @remark: Either the source pbuf 'p' is freed by this function or the original @@ -1209,7 +1224,9 @@ pbuf_fill_chksum(struct pbuf *p, u16_t start_offset, const void *dataptr, } #endif /* LWIP_CHECKSUM_ON_COPY */ - /** Get one byte from the specified position in a pbuf +/** + * @ingroup pbuf + * Get one byte from the specified position in a pbuf * WARNING: returns zero for offset >= p->tot_len * * @param p pbuf to parse @@ -1229,7 +1246,9 @@ pbuf_get_at(struct pbuf* p, u16_t offset) return 0; } - /** Put one byte to the specified position in a pbuf +/** + * @ingroup pbuf + * Put one byte to the specified position in a pbuf * WARNING: silently ignores offset >= p->tot_len * * @param p pbuf to fill @@ -1248,7 +1267,9 @@ pbuf_put_at(struct pbuf* p, u16_t offset, u8_t data) } } -/** Compare pbuf contents at specified offset with memory s2, both of length n +/** + * @ingroup pbuf + * Compare pbuf contents at specified offset with memory s2, both of length n * * @param p pbuf to compare * @param offset offset into p at which to start comparing @@ -1283,7 +1304,9 @@ pbuf_memcmp(struct pbuf* p, u16_t offset, const void* s2, u16_t n) return 0xffff; } -/** Find occurrence of mem (with length mem_len) in pbuf p, starting at offset +/** + * @ingroup pbuf + * Find occurrence of mem (with length mem_len) in pbuf p, starting at offset * start_offset. * * @param p pbuf to search, maximum length is 0xFFFE since 0xFFFF is used as @@ -1309,7 +1332,8 @@ pbuf_memfind(struct pbuf* p, const void* mem, u16_t mem_len, u16_t start_offset) return 0xFFFF; } -/** Find occurrence of substr with length substr_len in pbuf p, start at offset +/** + * Find occurrence of substr with length substr_len in pbuf p, start at offset * start_offset * WARNING: in contrast to strstr(), this one does not stop at the first \0 in * the pbuf/source string! diff --git a/src/core/tcp.c b/src/core/tcp.c index 0e46b27d..6a1f9149 100644 --- a/src/core/tcp.c +++ b/src/core/tcp.c @@ -135,7 +135,6 @@ static u8_t tcp_timer_ctr; static u16_t tcp_new_port(void); /** - * @ingroup tcp_raw * Initialize this module. */ void diff --git a/src/core/udp.c b/src/core/udp.c index 622c1a88..da5e7c8d 100644 --- a/src/core/udp.c +++ b/src/core/udp.c @@ -89,7 +89,6 @@ static u16_t udp_port = UDP_LOCAL_PORT_RANGE_START; struct udp_pcb *udp_pcbs; /** - * @ingroup udp_raw * Initialize this module. */ void diff --git a/src/include/lwip/memp.h b/src/include/lwip/memp.h index c9d906ca..8a555c89 100644 --- a/src/include/lwip/memp.h +++ b/src/include/lwip/memp.h @@ -70,12 +70,15 @@ extern const struct memp_desc* const memp_pools[MEMP_MAX]; #else /* MEMP_MEM_MALLOC */ -/** Declare a private memory pool +/** + * @ingroup mempool * Declare prototype for private memory pool if it is used in multiple files */ #define LWIP_MEMPOOL_PROTOTYPE(name) extern const struct memp_desc memp_ ## name -/** Declare a private memory pool +/** + * @ingroup mempool + * Declare a private memory pool * Private mempools example: * .h: only when pool is used in multiple .c files: LWIP_MEMPOOL_PROTOTYPE(my_private_pool); * .c: @@ -105,11 +108,20 @@ extern const struct memp_desc* const memp_pools[MEMP_MAX]; #endif /* MEMP_MEM_MALLOC */ -/** Initialize a private memory pool */ +/** + * @ingroup mempool + * Initialize a private memory pool + */ #define LWIP_MEMPOOL_INIT(name) memp_init_pool(&memp_ ## name) -/** Allocate from a private memory pool */ +/** + * @ingroup mempool + * Allocate from a private memory pool + */ #define LWIP_MEMPOOL_ALLOC(name) memp_malloc_pool(&memp_ ## name) -/** Free element from a private memory pool */ +/** + * @ingroup mempool + * Free element from a private memory pool + */ #define LWIP_MEMPOOL_FREE(name, x) memp_free_pool(&memp_ ## name, (x)) #if MEM_USE_POOLS From 8643782e5da0894b4a6b6ad646980fe2a77a4da7 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 26 Jul 2016 16:53:27 +0200 Subject: [PATCH 201/275] Document netif and lwIP in doxygen module style --- doc/doxygen/lwip.Doxyfile | 3 +++ src/core/init.c | 6 +++++- src/core/netif.c | 33 ++++++++++++++++++++++++++++----- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/doc/doxygen/lwip.Doxyfile b/doc/doxygen/lwip.Doxyfile index 18eca665..77b60c45 100644 --- a/doc/doxygen/lwip.Doxyfile +++ b/doc/doxygen/lwip.Doxyfile @@ -2083,10 +2083,13 @@ PREDEFINED = NO_SYS=0 \ MEMP_OVERFLOW_CHECK=0 \ MEMP_SANITY_CHECK=1 \ LWIP_ARP=1 \ + LWIP_HAVE_LOOPIF=1 \ LWIP_NETIF_HOSTNAME=1 \ LWIP_NETIF_API=1 \ LWIP_NETIF_CALLBACK=1 \ + LWIP_NETIF_REMOVE_CALLBACK=1 \ LWIP_NETIF_LINK_CALLBACK=1 \ + ENABLE_LOOPBACK=1 \ LWIP_AUTOIP=1 \ ARP_QUEUEING=1 \ LWIP_STATS=1 \ diff --git a/src/core/init.c b/src/core/init.c index 67e56bad..96aa02c7 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -33,7 +33,10 @@ * This file is part of the lwIP TCP/IP stack. * * Author: Adam Dunkels - * + */ + +/** + * @defgroup lwIP lwIP */ #include "lwip/opt.h" @@ -318,6 +321,7 @@ #endif /* !LWIP_DISABLE_TCP_SANITY_CHECKS */ /** + * @ingroup lwIP * Initialize all modules. */ void diff --git a/src/core/netif.c b/src/core/netif.c index fdf01926..f7cf758b 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -1,7 +1,6 @@ /** * @file * lwIP network interface abstraction - * */ /* @@ -33,7 +32,10 @@ * This file is part of the lwIP TCP/IP stack. * * Author: Adam Dunkels - * + */ + +/** + * @defgroup netif Network interface */ #include "lwip/opt.h" @@ -170,6 +172,7 @@ netif_init(void) } /** + * @ingroup netif * Add a network interface to the list of lwIP netifs. * * @param netif a pre-allocated netif structure @@ -293,6 +296,7 @@ netif_add(struct netif *netif, #if LWIP_IPV4 /** + * @ingroup netif * Change IP address configuration for a network interface (including netmask * and default gateway). * @@ -321,6 +325,7 @@ netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, const ip4_addr_t * #endif /* LWIP_IPV4*/ /** + * @ingroup netif * Remove a network interface from the list of lwIP netifs. * * @param netif the network interface to remove @@ -390,6 +395,7 @@ netif_remove(struct netif *netif) } /** + * @ingroup netif * Find a network interface by searching for its name * * @param name the name of the netif (like netif->name) plus concatenated number @@ -421,6 +427,7 @@ netif_find(const char *name) #if LWIP_IPV4 /** + * @ingroup netif * Change the IP address of a network interface * * @param netif the network interface to change @@ -465,6 +472,7 @@ netif_set_ipaddr(struct netif *netif, const ip4_addr_t *ipaddr) } /** + * @ingroup netif * Change the default gateway for a network interface * * @param netif the network interface to change @@ -486,6 +494,7 @@ netif_set_gw(struct netif *netif, const ip4_addr_t *gw) } /** + * @ingroup netif * Change the netmask of a network interface * * @param netif the network interface to change @@ -512,6 +521,7 @@ netif_set_netmask(struct netif *netif, const ip4_addr_t *netmask) #endif /* LWIP_IPV4 */ /** + * @ingroup netif * Set a network interface as the default network interface * (used to output all packets for which no specific route is found) * @@ -533,6 +543,7 @@ netif_set_default(struct netif *netif) } /** + * @ingroup netif * Bring an interface up, available for processing * traffic. */ @@ -591,6 +602,7 @@ netif_issue_reports(struct netif* netif, u8_t report_type) } /** + * @ingroup netif * Bring an interface down, disabling any traffic processing. */ void @@ -616,6 +628,7 @@ netif_set_down(struct netif *netif) #if LWIP_NETIF_STATUS_CALLBACK /** + * @ingroup netif * Set callback to be called when interface is brought up/down or address is changed while up */ void @@ -629,6 +642,7 @@ netif_set_status_callback(struct netif *netif, netif_status_callback_fn status_c #if LWIP_NETIF_REMOVE_CALLBACK /** + * @ingroup netif * Set callback to be called when the interface has been removed */ void @@ -641,6 +655,7 @@ netif_set_remove_callback(struct netif *netif, netif_status_callback_fn remove_c #endif /* LWIP_NETIF_REMOVE_CALLBACK */ /** + * @ingroup netif * Called by a driver when its link goes up */ void @@ -669,6 +684,7 @@ netif_set_link_up(struct netif *netif) } /** + * @ingroup netif * Called by a driver when its link goes down */ void @@ -682,6 +698,7 @@ netif_set_link_down(struct netif *netif ) #if LWIP_NETIF_LINK_CALLBACK /** + * @ingroup netif * Set callback to be called when link is brought up/down */ void @@ -695,6 +712,7 @@ netif_set_link_callback(struct netif *netif, netif_status_callback_fn link_callb #if ENABLE_LOOPBACK /** + * @ingroup netif * Send an IP packet to be received on the same netif (loopif-like). * The pbuf is simply copied and handed back to netif->input. * In multithreaded mode, this is done directly since netif->input must put @@ -900,7 +918,8 @@ netif_poll_all(void) #endif /* ENABLE_LOOPBACK */ #if LWIP_IPV6 -/** Checks if a specific address is assigned to the netif and returns its +/** + * Checks if a specific address is assigned to the netif and returns its * index. * * @param netif the netif to check @@ -921,7 +940,9 @@ netif_get_ip6_addr_match(struct netif *netif, const ip6_addr_t *ip6addr) return -1; } -/** Create a link-local IPv6 address on a netif (stored in slot 0) +/** + * @ingroup netif + * Create a link-local IPv6 address on a netif (stored in slot 0) * * @param netif the netif to create the address on * @param from_mac_48bit if != 0, assume hwadr is a 48-bit MAC address (std conversion) @@ -971,7 +992,9 @@ netif_create_ip6_linklocal_address(struct netif *netif, u8_t from_mac_48bit) #endif /* LWIP_IPV6_AUTOCONFIG */ } -/** This function allows for the easy addition of a new IPv6 address to an interface. +/** + * @ingroup netif + * This function allows for the easy addition of a new IPv6 address to an interface. * It takes care of finding an empty slot and then sets the address tentative * (to make sure that all the subsequent processing happens). * From ce19c59bb2761948c1405785d540461de4bf497f Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 26 Jul 2016 17:11:01 +0200 Subject: [PATCH 202/275] Document ip address function in doxygen module style --- src/core/ip.c | 18 ++++++++- src/include/lwip/ip_addr.h | 75 ++++++++++++++++++++++++++++++++------ 2 files changed, 81 insertions(+), 12 deletions(-) diff --git a/src/core/ip.c b/src/core/ip.c index aa42fba7..6e868d1f 100644 --- a/src/core/ip.c +++ b/src/core/ip.c @@ -36,6 +36,20 @@ * */ +/** + * @defgroup ipaddr IP address handling + */ + +/** + * @defgroup ip4addr IPv4 only + * @ingroup ipaddr + */ + +/** + * @defgroup ip6addr IPv6 only + * @ingroup ipaddr + */ + #include "lwip/opt.h" #if LWIP_IPV4 || LWIP_IPV6 @@ -50,7 +64,9 @@ struct ip_globals ip_data; const ip_addr_t ip_addr_any_type = IPADDR_ANY_TYPE_INIT; -/** Convert IP address string (both versions) to numeric. +/** + * @ingroup ipaddr + * Convert IP address string (both versions) to numeric. * The version is auto-detected from the string. * * @param cp IP address string to convert diff --git a/src/include/lwip/ip_addr.h b/src/include/lwip/ip_addr.h index f3be7662..d2690e8b 100644 --- a/src/include/lwip/ip_addr.h +++ b/src/include/lwip/ip_addr.h @@ -53,7 +53,9 @@ extern "C" { #define IPADDR_TYPE_ANY 46U #if LWIP_IPV4 && LWIP_IPV6 -/** A union struct for both IP version's addresses. +/** + * @ingroup ipaddr + * A union struct for both IP version's addresses. * ATTENTION: watch out for its size when adding IPv6 address scope! */ typedef struct _ip_addr { @@ -66,16 +68,25 @@ typedef struct _ip_addr { extern const ip_addr_t ip_addr_any_type; +/** @ingroup ip4addr */ #define IPADDR4_INIT(u32val) { { { { u32val, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_V4 } +/** @ingroup ip6addr */ #define IPADDR6_INIT(a, b, c, d) { { { { a, b, c, d } } }, IPADDR_TYPE_V6 } +/** @ingroup ipaddr */ #define IP_IS_ANY_TYPE_VAL(ipaddr) (IP_GET_TYPE(&ipaddr) == IPADDR_TYPE_ANY) +/** @ingroup ipaddr */ #define IPADDR_ANY_TYPE_INIT { { { { 0ul, 0ul, 0ul, 0ul } } }, IPADDR_TYPE_ANY } +/** @ingroup ip4addr */ #define IP_IS_V4_VAL(ipaddr) (IP_GET_TYPE(&ipaddr) == IPADDR_TYPE_V4) +/** @ingroup ip6addr */ #define IP_IS_V6_VAL(ipaddr) (IP_GET_TYPE(&ipaddr) == IPADDR_TYPE_V6) +/** @ingroup ip4addr */ #define IP_IS_V4(ipaddr) (((ipaddr) == NULL) || IP_IS_V4_VAL(*(ipaddr))) +/** @ingroup ip6addr */ #define IP_IS_V6(ipaddr) (((ipaddr) != NULL) && IP_IS_V6_VAL(*(ipaddr))) + #define IP_SET_TYPE_VAL(ipaddr, iptype) do { (ipaddr).type = (iptype); }while(0) #define IP_SET_TYPE(ipaddr, iptype) do { if((ipaddr) != NULL) { IP_SET_TYPE_VAL(*(ipaddr), iptype); }}while(0) #define IP_GET_TYPE(ipaddr) ((ipaddr)->type) @@ -83,70 +94,98 @@ extern const ip_addr_t ip_addr_any_type; #define IP_ADDR_PCB_VERSION_MATCH_EXACT(pcb, ipaddr) (IP_GET_TYPE(&pcb->local_ip) == IP_GET_TYPE(ipaddr)) #define IP_ADDR_PCB_VERSION_MATCH(pcb, ipaddr) (IP_IS_ANY_TYPE_VAL(pcb->local_ip) || IP_ADDR_PCB_VERSION_MATCH_EXACT(pcb, ipaddr)) -/** Convert generic ip address to specific protocol version */ +/** @ingroup ip6addr + * Convert generic ip address to specific protocol version + */ #define ip_2_ip6(ipaddr) (&((ipaddr)->u_addr.ip6)) -/** Convert generic ip address to specific protocol version */ +/** @ingroup ip4addr + * Convert generic ip address to specific protocol version + */ #define ip_2_ip4(ipaddr) (&((ipaddr)->u_addr.ip4)) +/** @ingroup ip4addr */ #define IP_ADDR4(ipaddr,a,b,c,d) do { IP4_ADDR(ip_2_ip4(ipaddr),a,b,c,d); \ IP_SET_TYPE_VAL(*(ipaddr), IPADDR_TYPE_V4); } while(0) +/** @ingroup ip6addr */ #define IP_ADDR6(ipaddr,i0,i1,i2,i3) do { IP6_ADDR(ip_2_ip6(ipaddr),i0,i1,i2,i3); \ IP_SET_TYPE_VAL(*(ipaddr), IPADDR_TYPE_V6); } while(0) +/** @ingroup ipaddr */ #define ip_addr_copy(dest, src) do{ IP_SET_TYPE_VAL(dest, IP_GET_TYPE(&src)); if(IP_IS_V6_VAL(src)){ \ ip6_addr_copy(*ip_2_ip6(&(dest)), *ip_2_ip6(&(src))); }else{ \ ip4_addr_copy(*ip_2_ip4(&(dest)), *ip_2_ip4(&(src))); }}while(0) +/** @ingroup ip6addr */ #define ip_addr_copy_from_ip6(dest, src) do{ \ ip6_addr_copy(*ip_2_ip6(&(dest)), src); IP_SET_TYPE_VAL(dest, IPADDR_TYPE_V6); }while(0) +/** @ingroup ip4addr */ #define ip_addr_copy_from_ip4(dest, src) do{ \ ip4_addr_copy(*ip_2_ip4(&(dest)), src); IP_SET_TYPE_VAL(dest, IPADDR_TYPE_V4); }while(0) +/** @ingroup ip4addr */ #define ip_addr_set_ip4_u32(ipaddr, val) do{if(ipaddr){ip4_addr_set_u32(ip_2_ip4(ipaddr), val); \ IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); }}while(0) +/** @ingroup ip4addr */ #define ip_addr_get_ip4_u32(ipaddr) (((ipaddr) && IP_IS_V4(ipaddr)) ? \ ip4_addr_get_u32(ip_2_ip4(ipaddr)) : 0) +/** @ingroup ipaddr */ #define ip_addr_set(dest, src) do{ IP_SET_TYPE(dest, IP_GET_TYPE(src)); if(IP_IS_V6(src)){ \ ip6_addr_set(ip_2_ip6(dest), ip_2_ip6(src)); }else{ \ ip4_addr_set(ip_2_ip4(dest), ip_2_ip4(src)); }}while(0) +/** @ingroup ipaddr */ #define ip_addr_set_ipaddr(dest, src) ip_addr_set(dest, src) +/** @ingroup ipaddr */ #define ip_addr_set_zero(ipaddr) do{ \ ip6_addr_set_zero(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, 0); }while(0) +/** @ingroup ip5addr */ #define ip_addr_set_zero_ip4(ipaddr) do{ \ ip6_addr_set_zero(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); }while(0) +/** @ingroup ip6addr */ #define ip_addr_set_zero_ip6(ipaddr) do{ \ ip6_addr_set_zero(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V6); }while(0) +/** @ingroup ipaddr */ #define ip_addr_set_any(is_ipv6, ipaddr) do{if(is_ipv6){ \ ip6_addr_set_any(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V6); }else{ \ ip4_addr_set_any(ip_2_ip4(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); }}while(0) +/** @ingroup ipaddr */ #define ip_addr_set_loopback(is_ipv6, ipaddr) do{if(is_ipv6){ \ ip6_addr_set_loopback(ip_2_ip6(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V6); }else{ \ ip4_addr_set_loopback(ip_2_ip4(ipaddr)); IP_SET_TYPE(ipaddr, IPADDR_TYPE_V4); }}while(0) +/** @ingroup ipaddr */ #define ip_addr_set_hton(dest, src) do{if(IP_IS_V6(src)){ \ ip6_addr_set_hton(ip_2_ip6(ipaddr), (src)); IP_SET_TYPE(dest, IPADDR_TYPE_V6); }else{ \ ip4_addr_set_hton(ip_2_ip4(ipaddr), (src)); IP_SET_TYPE(dest, IPADDR_TYPE_V4); }}while(0) +/** @ingroup ipaddr */ #define ip_addr_get_network(target, host, netmask) do{if(IP_IS_V6(host)){ \ ip4_addr_set_zero(ip_2_ip4(target)); IP_SET_TYPE(target, IPADDR_TYPE_V6); } else { \ ip4_addr_get_network(ip_2_ip4(target), ip_2_ip4(host), ip_2_ip4(netmask)); IP_SET_TYPE(target, IPADDR_TYPE_V4); }}while(0) +/** @ingroup ipaddr */ #define ip_addr_netcmp(addr1, addr2, mask) ((IP_IS_V6(addr1) && IP_IS_V6(addr2)) ? \ 0 : \ ip4_addr_netcmp(ip_2_ip4(addr1), ip_2_ip4(addr2), mask)) +/** @ingroup ipaddr */ #define ip_addr_cmp(addr1, addr2) ((IP_GET_TYPE(addr1) != IP_GET_TYPE(addr2)) ? 0 : (IP_IS_V6_VAL(*(addr1)) ? \ ip6_addr_cmp(ip_2_ip6(addr1), ip_2_ip6(addr2)) : \ ip4_addr_cmp(ip_2_ip4(addr1), ip_2_ip4(addr2)))) +/** @ingroup ipaddr */ #define ip_addr_isany(ipaddr) ((IP_IS_V6(ipaddr)) ? \ ip6_addr_isany(ip_2_ip6(ipaddr)) : \ ip4_addr_isany(ip_2_ip4(ipaddr))) +/** @ingroup ipaddr */ #define ip_addr_isany_val(ipaddr) ((IP_IS_V6_VAL(ipaddr)) ? \ ip6_addr_isany_val(*ip_2_ip6(&(ipaddr))) : \ ip4_addr_isany_val(*ip_2_ip4(&(ipaddr)))) +/** @ingroup ipaddr */ #define ip_addr_isbroadcast(ipaddr, netif) ((IP_IS_V6(ipaddr)) ? \ 0 : \ ip4_addr_isbroadcast(ip_2_ip4(ipaddr), netif)) +/** @ingroup ipaddr */ #define ip_addr_ismulticast(ipaddr) ((IP_IS_V6(ipaddr)) ? \ ip6_addr_ismulticast(ip_2_ip6(ipaddr)) : \ ip4_addr_ismulticast(ip_2_ip4(ipaddr))) +/** @ingroup ipaddr */ #define ip_addr_isloopback(ipaddr) ((IP_IS_V6(ipaddr)) ? \ ip6_addr_isloopback(ip_2_ip6(ipaddr)) : \ ip4_addr_isloopback(ip_2_ip4(ipaddr))) +/** @ingroup ipaddr */ #define ip_addr_islinklocal(ipaddr) ((IP_IS_V6(ipaddr)) ? \ ip6_addr_islinklocal(ip_2_ip6(ipaddr)) : \ ip4_addr_islinklocal(ip_2_ip4(ipaddr))) @@ -156,12 +195,15 @@ extern const ip_addr_t ip_addr_any_type; #define ip_addr_debug_print_val(debug, ipaddr) do { if(IP_IS_V6_VAL(ipaddr)) { \ ip6_addr_debug_print_val(debug, *ip_2_ip6(&(ipaddr))); } else { \ ip4_addr_debug_print_val(debug, *ip_2_ip4(&(ipaddr))); }}while(0) +/** @ingroup ipaddr */ #define ipaddr_ntoa(addr) (((addr) == NULL) ? "NULL" : \ ((IP_IS_V6(addr)) ? ip6addr_ntoa(ip_2_ip6(addr)) : ip4addr_ntoa(ip_2_ip4(addr)))) +/** @ingroup ipaddr */ #define ipaddr_ntoa_r(addr, buf, buflen) (((addr) == NULL) ? "NULL" : \ ((IP_IS_V6(addr)) ? ip6addr_ntoa_r(ip_2_ip6(addr), buf, buflen) : ip4addr_ntoa_r(ip_2_ip4(addr), buf, buflen))) int ipaddr_aton(const char *cp, ip_addr_t *addr); +/** @ingroup ipaddr */ #define IPADDR_STRLEN_MAX IP6ADDR_STRLEN_MAX #else /* LWIP_IPV4 && LWIP_IPV6 */ @@ -261,15 +303,21 @@ typedef ip6_addr_t ip_addr_t; extern const ip_addr_t ip_addr_any; extern const ip_addr_t ip_addr_broadcast; -/** IP_ADDR_ can be used as a fixed/const ip_addr_t - * for the IPv4 wildcard and the broadcast address +/** + * @ingroup ipaddr + * IP_ADDR_ can be used as a fixed/const ip_addr_t + * for the IPv4 wildcard and the broadcast address */ #define IP_ADDR_ANY (&ip_addr_any) +/** @ingroup ipaddr */ #define IP_ADDR_BROADCAST (&ip_addr_broadcast) -/** IP4_ADDR_ can be used as a fixed/const ip4_addr_t - * for the wildcard and the broadcast address +/** + * @ingroup ip4addr + * IP4_ADDR_ can be used as a fixed/const ip4_addr_t + * for the wildcard and the broadcast address */ #define IP4_ADDR_ANY (ip_2_ip4(&ip_addr_any)) +/** @ingroup ip4addr */ #define IP4_ADDR_BROADCAST (ip_2_ip4(&ip_addr_broadcast)) #endif /* LWIP_IPV4*/ @@ -278,12 +326,16 @@ extern const ip_addr_t ip_addr_broadcast; extern const ip_addr_t ip6_addr_any; -/** IP6_ADDR_ANY can be used as a fixed ip_addr_t - * for the IPv6 wildcard address +/** + * @ingroup ip6addr + * IP6_ADDR_ANY can be used as a fixed ip_addr_t + * for the IPv6 wildcard address */ #define IP6_ADDR_ANY (&ip6_addr_any) -/** IP6_ADDR_ANY6 can be used as a fixed ip6_addr_t - * for the IPv6 wildcard address +/** + * @ingroup ip6addr + * IP6_ADDR_ANY6 can be used as a fixed ip6_addr_t + * for the IPv6 wildcard address */ #define IP6_ADDR_ANY6 (ip_2_ip6(&ip6_addr_any)) @@ -295,6 +347,7 @@ extern const ip_addr_t ip6_addr_any; #endif #if LWIP_IPV4 && LWIP_IPV6 +/** @ingroup ipaddr */ #define IP_ANY_TYPE (&ip_addr_any_type) #else #define IP_ANY_TYPE IP_ADDR_ANY From 0fea2bc02e3856b44e5eff0376f90757d92e4328 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 26 Jul 2016 17:40:55 +0200 Subject: [PATCH 203/275] Document netconn API in doxygen module style --- src/api/api_lib.c | 44 ++++++++++++++++++++++++++++++++++++++++-- src/api/netbuf.c | 16 +++++++++++++++ src/core/netif.c | 2 +- src/core/pbuf.c | 2 +- src/include/lwip/api.h | 12 ++++++++++-- 5 files changed, 70 insertions(+), 6 deletions(-) diff --git a/src/api/api_lib.c b/src/api/api_lib.c index 82da791a..03f083dd 100644 --- a/src/api/api_lib.c +++ b/src/api/api_lib.c @@ -1,7 +1,6 @@ /** * @file * Sequential API External module - * */ /* @@ -33,7 +32,29 @@ * This file is part of the lwIP TCP/IP stack. * * Author: Adam Dunkels - * + */ + +/** + * @defgroup netconn Netconn API + * Thread-safe, to be called from non-TCPIP threads only. + * TX/RX handling based on @ref netbuf (containing @ref pbuf) + * to avoid copying data around. + * + * @defgroup netconn_common Common functions + * @ingroup netconn + * For use with TCP and UDP + * + * @defgroup netconn_tcp TCP only + * @ingroup netconn + * TCP only functions + * + * @defgroup netconn_udp UDP only + * @ingroup netconn + * UDP only functions + * + * @defgroup netconn_dns DNS + * @ingroup netconn + * DNS lookup */ /* This is the part of the API that is linked with @@ -94,6 +115,7 @@ netconn_apimsg(tcpip_callback_fn fn, struct api_msg *apimsg) } /** + * @ingroup netconn_common * Create a new netconn (of a specific type) that has a callback function. * The corresponding pcb is also created. * @@ -138,6 +160,7 @@ netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, netconn_cal } /** + * @ingroup netconn_common * Close a netconn 'connection' and free its resources. * UDP and RAW connection are completely closed, TCP pcbs might still be in a waitstate * after this returns. @@ -181,6 +204,7 @@ netconn_delete(struct netconn *conn) } /** + * @ingroup netconn_tcp * Get the local or remote IP address and port of a netconn. * For RAW netconns, this returns the protocol instead of a port! * @@ -219,6 +243,7 @@ netconn_getaddr(struct netconn *conn, ip_addr_t *addr, u16_t *port, u8_t local) } /** + * @ingroup netconn_common * Bind a netconn to a specific local IP address and port. * Binding one netconn twice might not always be checked correctly! * @@ -252,6 +277,7 @@ netconn_bind(struct netconn *conn, const ip_addr_t *addr, u16_t port) } /** + * @ingroup netconn_common * Connect a netconn to a specific remote IP address and port. * * @param conn the netconn to connect @@ -283,6 +309,7 @@ netconn_connect(struct netconn *conn, const ip_addr_t *addr, u16_t port) } /** + * @ingroup netconn_udp * Disconnect a netconn from its current peer (only valid for UDP netconns). * * @param conn the netconn to disconnect @@ -305,6 +332,7 @@ netconn_disconnect(struct netconn *conn) } /** + * @ingroup netconn_tcp * Set a TCP netconn into listen mode * * @param conn the tcp netconn to set to listen mode @@ -341,6 +369,7 @@ netconn_listen_with_backlog(struct netconn *conn, u8_t backlog) } /** + * @ingroup netconn_tcp * Accept a new connection on a TCP listening netconn. * * @param conn the TCP listen netconn @@ -429,6 +458,7 @@ netconn_accept(struct netconn *conn, struct netconn **new_conn) } /** + * @ingroup netconn_common * Receive data: actual implementation that doesn't care whether pbuf or netbuf * is received * @@ -553,6 +583,7 @@ netconn_recv_data(struct netconn *conn, void **new_buf) } /** + * @ingroup netconn_tcp * Receive data (in form of a pbuf) from a TCP netconn * * @param conn the netconn from which to receive data @@ -571,6 +602,7 @@ netconn_recv_tcp_pbuf(struct netconn *conn, struct pbuf **new_buf) } /** + * @ingroup netconn_common * Receive data (in form of a netbuf containing a packet buffer) from a netconn * * @param conn the netconn from which to receive data @@ -630,6 +662,7 @@ netconn_recv(struct netconn *conn, struct netbuf **new_buf) } /** + * @ingroup netconn_udp * Send data (in form of a netbuf) to a specific remote IP address and port. * Only to be used for UDP and RAW netconns (not TCP). * @@ -651,6 +684,7 @@ netconn_sendto(struct netconn *conn, struct netbuf *buf, const ip_addr_t *addr, } /** + * @ingroup netconn_udp * Send data over a UDP or RAW netconn (that is already connected). * * @param conn the UDP or RAW netconn over which to send data @@ -676,6 +710,7 @@ netconn_send(struct netconn *conn, struct netbuf *buf) } /** + * @ingroup netconn_tcp * Send data over a TCP netconn. * * @param conn the TCP netconn over which to send data @@ -747,6 +782,7 @@ netconn_write_partly(struct netconn *conn, const void *dataptr, size_t size, } /** + * @ingroup netconn_tcp * Close or shutdown a TCP netconn (doesn't delete it). * * @param conn the TCP netconn to close or shutdown @@ -783,6 +819,7 @@ netconn_close_shutdown(struct netconn *conn, u8_t how) } /** + * @ingroup netconn_tcp * Close a TCP netconn (doesn't delete it). * * @param conn the TCP netconn to close @@ -796,6 +833,7 @@ netconn_close(struct netconn *conn) } /** + * @ingroup netconn_tcp * Shut down one or both sides of a TCP netconn (doesn't delete it). * * @param conn the TCP netconn to shut down @@ -811,6 +849,7 @@ netconn_shutdown(struct netconn *conn, u8_t shut_rx, u8_t shut_tx) #if LWIP_IGMP || (LWIP_IPV6 && LWIP_IPV6_MLD) /** + * @ingroup netconn_udp * Join multicast groups for UDP netconns. * * @param conn the UDP netconn for which to change multicast addresses @@ -854,6 +893,7 @@ netconn_join_leave_group(struct netconn *conn, #if LWIP_DNS /** + * @ingroup netconn_dns * Execute a DNS query, only one IP address is returned * * @param name a string representation of the DNS host name to query diff --git a/src/api/netbuf.c b/src/api/netbuf.c index 9ab76a46..119ddafc 100644 --- a/src/api/netbuf.c +++ b/src/api/netbuf.c @@ -36,6 +36,13 @@ * */ +/** + * @defgroup netbuf Network buffers + * @ingroup netconn + * Network buffer descriptor for @ref netconn. Based on @ref pbuf internally + * to avoid copying data around. + */ + #include "lwip/opt.h" #if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */ @@ -46,6 +53,7 @@ #include /** + * @ingroup netbuf * Create (allocate) and initialize a new netbuf. * The netbuf doesn't yet contain a packet buffer! * @@ -79,6 +87,7 @@ netbuf *netbuf_new(void) } /** + * @ingroup netbuf * Deallocate a netbuf allocated by netbuf_new(). * * @param buf pointer to a netbuf allocated by netbuf_new() @@ -96,6 +105,7 @@ netbuf_delete(struct netbuf *buf) } /** + * @ingroup netbuf * Allocate memory for a packet buffer for a given netbuf. * * @param buf the netbuf for which to allocate a packet buffer @@ -123,6 +133,7 @@ netbuf_alloc(struct netbuf *buf, u16_t size) } /** + * @ingroup netbuf * Free the packet buffer included in a netbuf * * @param buf pointer to the netbuf which contains the packet buffer to free @@ -138,6 +149,7 @@ netbuf_free(struct netbuf *buf) } /** + * @ingroup netbuf * Let a netbuf reference existing (non-volatile) data. * * @param buf netbuf which should reference the data @@ -165,6 +177,7 @@ netbuf_ref(struct netbuf *buf, const void *dataptr, u16_t size) } /** + * @ingroup netbuf * Chain one netbuf to another (@see pbuf_chain) * * @param head the first netbuf @@ -181,6 +194,7 @@ netbuf_chain(struct netbuf *head, struct netbuf *tail) } /** + * @ingroup netbuf * Get the data pointer and length of the data inside a netbuf. * * @param buf netbuf to get the data from @@ -205,6 +219,7 @@ netbuf_data(struct netbuf *buf, void **dataptr, u16_t *len) } /** + * @ingroup netbuf * Move the current data pointer of a packet buffer contained in a netbuf * to the next part. * The packet buffer itself is not modified. @@ -229,6 +244,7 @@ netbuf_next(struct netbuf *buf) } /** + * @ingroup netbuf * Move the current data pointer of a packet buffer contained in a netbuf * to the beginning of the packet. * The packet buffer itself is not modified. diff --git a/src/core/netif.c b/src/core/netif.c index f7cf758b..7d368e9f 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -35,7 +35,7 @@ */ /** - * @defgroup netif Network interface + * @defgroup netif Network interface (NETIF) */ #include "lwip/opt.h" diff --git a/src/core/pbuf.c b/src/core/pbuf.c index 9d9d6b86..26d7c875 100644 --- a/src/core/pbuf.c +++ b/src/core/pbuf.c @@ -4,7 +4,7 @@ */ /** - * @defgroup pbuf PBUF + * @defgroup pbuf Payload buffers (PBUF) * * Packets are built from the pbuf data structure. It supports dynamic * memory allocation for packet contents or can reference externally diff --git a/src/include/lwip/api.h b/src/include/lwip/api.h index c24db85a..a919a2d1 100644 --- a/src/include/lwip/api.h +++ b/src/include/lwip/api.h @@ -81,7 +81,7 @@ extern "C" { #endif /* LWIP_IPV6 */ - /* Helpers to process several netconn_types by the same code */ +/* Helpers to process several netconn_types by the same code */ #define NETCONNTYPE_GROUP(t) ((t)&0xF0) #define NETCONNTYPE_DATAGRAM(t) ((t)&0xE0) #if LWIP_IPV6 @@ -94,7 +94,9 @@ extern "C" { #define NETCONNTYPE_ISUDPNOCHKSUM(t) ((t) == NETCONN_UDPNOCHKSUM) #endif /* LWIP_IPV6 */ -/** Protocol family and type of the netconn */ +/** @ingroup netconn_common + * Protocol family and type of the netconn + */ enum netconn_type { NETCONN_INVALID = 0, /* NETCONN_TCP Group */ @@ -252,7 +254,10 @@ struct netconn { }} while(0); /* Network connection functions: */ + +/** @ingroup netconn_common */ #define netconn_new(t) netconn_new_with_proto_and_callback(t, 0, NULL) +/** @ingroup netconn_common */ #define netconn_new_with_callback(t, c) netconn_new_with_proto_and_callback(t, 0, c) struct netconn *netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, netconn_callback callback); @@ -262,7 +267,9 @@ err_t netconn_delete(struct netconn *conn); err_t netconn_getaddr(struct netconn *conn, ip_addr_t *addr, u16_t *port, u8_t local); +/** @ingroup netconn_common */ #define netconn_peer(c,i,p) netconn_getaddr(c,i,p,0) +/** @ingroup netconn_common */ #define netconn_addr(c,i,p) netconn_getaddr(c,i,p,1) err_t netconn_bind(struct netconn *conn, const ip_addr_t *addr, u16_t port); @@ -278,6 +285,7 @@ err_t netconn_sendto(struct netconn *conn, struct netbuf *buf, err_t netconn_send(struct netconn *conn, struct netbuf *buf); err_t netconn_write_partly(struct netconn *conn, const void *dataptr, size_t size, u8_t apiflags, size_t *bytes_written); +/** @ingroup netconn_tcp */ #define netconn_write(conn, dataptr, size, apiflags) \ netconn_write_partly(conn, dataptr, size, apiflags, NULL) err_t netconn_close(struct netconn *conn); From 9c10daba93d2b8364c1722e59b30ce83d639919b Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 26 Jul 2016 17:53:07 +0200 Subject: [PATCH 204/275] Document netif API in doxygen module style --- src/api/netifapi.c | 8 ++++++++ src/core/dns.c | 2 ++ src/core/tcp.c | 2 +- src/core/udp.c | 2 +- src/include/lwip/netifapi.h | 6 ++++++ 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/api/netifapi.c b/src/api/netifapi.c index 6261569d..2c246802 100644 --- a/src/api/netifapi.c +++ b/src/api/netifapi.c @@ -31,6 +31,12 @@ * */ +/** + * @defgroup netifapi Thread-safe API + * @ingroup netif + * Thread-safe functions to be called from non-TCPIP threads + */ + #include "lwip/opt.h" #if LWIP_NETIF_API /* don't build if not configured for use in lwipopts.h */ @@ -108,6 +114,7 @@ netifapi_do_netif_common(struct tcpip_api_call_data *m) } /** + * @ingroup netifapi * Call netif_add() in a thread-safe way by running that function inside the * tcpip_thread context. * @@ -152,6 +159,7 @@ netifapi_netif_add(struct netif *netif, #if LWIP_IPV4 /** + * @ingroup netifapi * Call netif_set_addr() in a thread-safe way by running that function inside the * tcpip_thread context. * diff --git a/src/core/dns.c b/src/core/dns.c index b04dbd75..5ee482ce 100644 --- a/src/core/dns.c +++ b/src/core/dns.c @@ -60,6 +60,8 @@ * must be implemented by the module that uses the resolver). * * All functions must be called from TCPIP thread. + * + * @see @ref netconn_dns */ /*----------------------------------------------------------------------------- diff --git a/src/core/tcp.c b/src/core/tcp.c index 6a1f9149..e7281498 100644 --- a/src/core/tcp.c +++ b/src/core/tcp.c @@ -40,7 +40,7 @@ * @defgroup tcp_raw TCP * @ingroup raw_api * Transmission Control Protocol for IP\n - * @see @ref raw_api + * @see @ref raw_api and @ref netconn * * Common functions for the TCP implementation, such as functinos * for manipulating the data structures and the TCP timer functions. TCP functions diff --git a/src/core/udp.c b/src/core/udp.c index da5e7c8d..14130ab3 100644 --- a/src/core/udp.c +++ b/src/core/udp.c @@ -40,7 +40,7 @@ * @defgroup udp_raw UDP * @ingroup raw_api * User Datagram Protocol module\n - * @see @ref raw_api + * @see @ref raw_api and @ref netconn */ /* udp.c diff --git a/src/include/lwip/netifapi.h b/src/include/lwip/netifapi.h index 0071f921..b9f8104d 100644 --- a/src/include/lwip/netifapi.h +++ b/src/include/lwip/netifapi.h @@ -92,15 +92,21 @@ err_t netifapi_netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, err_t netifapi_netif_common(struct netif *netif, netifapi_void_fn voidfunc, netifapi_errt_fn errtfunc); +/** @ingroup netifapi */ #define netifapi_netif_remove(n) netifapi_netif_common(n, netif_remove, NULL) +/** @ingroup netifapi */ #define netifapi_netif_set_up(n) netifapi_netif_common(n, netif_set_up, NULL) +/** @ingroup netifapi */ #define netifapi_netif_set_down(n) netifapi_netif_common(n, netif_set_down, NULL) +/** @ingroup netifapi */ #define netifapi_netif_set_default(n) netifapi_netif_common(n, netif_set_default, NULL) + #define netifapi_dhcp_start(n) netifapi_netif_common(n, NULL, dhcp_start) #define netifapi_dhcp_stop(n) netifapi_netif_common(n, dhcp_stop, NULL) #define netifapi_dhcp_inform(n) netifapi_netif_common(n, dhcp_inform, NULL) #define netifapi_dhcp_renew(n) netifapi_netif_common(n, NULL, dhcp_renew) #define netifapi_dhcp_release(n) netifapi_netif_common(n, NULL, dhcp_release) + #define netifapi_autoip_start(n) netifapi_netif_common(n, NULL, autoip_start) #define netifapi_autoip_stop(n) netifapi_netif_common(n, NULL, autoip_stop) From dc0859b8d17c0a3bbc8e8d6926b2a87dae9fae31 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 26 Jul 2016 18:10:05 +0200 Subject: [PATCH 205/275] Document DHCP and AUTOIP API in doxygen module style --- src/api/netifapi.c | 11 +++++++---- src/core/ipv4/autoip.c | 12 +++++++++++- src/core/ipv4/dhcp.c | 19 +++++++++++++++++-- src/include/lwip/netifapi.h | 25 +++++++++++++++++++++---- 4 files changed, 56 insertions(+), 11 deletions(-) diff --git a/src/api/netifapi.c b/src/api/netifapi.c index 2c246802..9b1c048e 100644 --- a/src/api/netifapi.c +++ b/src/api/netifapi.c @@ -32,9 +32,12 @@ */ /** - * @defgroup netifapi Thread-safe API - * @ingroup netif + * @defgroup netifapi NETIF API * Thread-safe functions to be called from non-TCPIP threads + * + * @defgroup netifapi_netif NETIF related + * @ingroup netifapi + * To be called from non-TCPIP threads */ #include "lwip/opt.h" @@ -114,7 +117,7 @@ netifapi_do_netif_common(struct tcpip_api_call_data *m) } /** - * @ingroup netifapi + * @ingroup netifapi_netif * Call netif_add() in a thread-safe way by running that function inside the * tcpip_thread context. * @@ -159,7 +162,7 @@ netifapi_netif_add(struct netif *netif, #if LWIP_IPV4 /** - * @ingroup netifapi + * @ingroup netifapi_netif * Call netif_set_addr() in a thread-safe way by running that function inside the * tcpip_thread context. * diff --git a/src/core/ipv4/autoip.c b/src/core/ipv4/autoip.c index dbdec70a..a478f0ae 100644 --- a/src/core/ipv4/autoip.c +++ b/src/core/ipv4/autoip.c @@ -62,6 +62,12 @@ * */ +/** + * @defgroup autoip AUTOIP + * AUTOIP related functions + * @see netifapi_autoip + */ + #include "lwip/opt.h" #if LWIP_IPV4 && LWIP_AUTOIP /* don't build if not configured for use in lwipopts.h */ @@ -126,7 +132,9 @@ static err_t autoip_arp_announce(struct netif *netif); static void autoip_start_probing(struct netif *netif); -/** Set a statically allocated struct autoip to work with. +/** + * @ingroup autoip + * Set a statically allocated struct autoip to work with. * Using this prevents autoip_start to allocate it using mem_malloc. * * @param netif the netif for which to set the struct autoip @@ -268,6 +276,7 @@ autoip_bind(struct netif *netif) } /** + * @ingroup autoip * Start AutoIP client * * @param netif network interface on which start the AutoIP client @@ -359,6 +368,7 @@ autoip_network_changed(struct netif *netif) } /** + * @ingroup autoip * Stop AutoIP client * * @param netif network interface on which stop the AutoIP client diff --git a/src/core/ipv4/dhcp.c b/src/core/ipv4/dhcp.c index 862fa996..d63aea83 100644 --- a/src/core/ipv4/dhcp.c +++ b/src/core/ipv4/dhcp.c @@ -65,6 +65,12 @@ * */ +/** + * @defgroup dhcp4 DHCPv4 + * DHCP (IPv4) related functions + * @see netifapi_dhcp4 + */ + #include "lwip/opt.h" #if LWIP_IPV4 && LWIP_DHCP /* don't build if not configured for use in lwipopts.h */ @@ -643,7 +649,9 @@ dhcp_handle_ack(struct netif *netif) #endif /* LWIP_DNS */ } -/** Set a statically allocated struct dhcp to work with. +/** + * @ingroup dhcp4 + * Set a statically allocated struct dhcp to work with. * Using this prevents dhcp_start to allocate it using mem_malloc. * * @param netif the netif for which to set the struct dhcp @@ -662,7 +670,9 @@ dhcp_set_struct(struct netif *netif, struct dhcp *dhcp) netif->dhcp = dhcp; } -/** Removes a struct dhcp from a netif. +/** + * @ingroup dhcp4 + * Removes a struct dhcp from a netif. * * ATTENTION: Only use this when not using dhcp_set_struct() to allocate the * struct dhcp since the memory is passed back to the heap. @@ -680,6 +690,7 @@ void dhcp_cleanup(struct netif *netif) } /** + * @ingroup dhcp4 * Start DHCP negotiation for a network interface. * * If no DHCP client instance was attached to this interface, @@ -763,6 +774,7 @@ dhcp_start(struct netif *netif) } /** + * @ingroup dhcp4 * Inform a DHCP server of our manual configuration. * * This informs DHCP servers of our fixed IP address configuration @@ -1086,6 +1098,7 @@ dhcp_bind(struct netif *netif) } /** + * @ingroup dhcp4 * Renew an existing DHCP lease at the involved DHCP server. * * @param netif network interface which must renew its lease @@ -1238,6 +1251,7 @@ dhcp_reboot(struct netif *netif) /** + * @ingroup dhcp4 * Release a DHCP lease. * * @param netif network interface which must release its lease @@ -1300,6 +1314,7 @@ dhcp_release(struct netif *netif) } /** + * @ingroup dhcp4 * Remove the DHCP client from the interface. * * @param netif The network interface to stop DHCP on diff --git a/src/include/lwip/netifapi.h b/src/include/lwip/netifapi.h index b9f8104d..20f8bcaa 100644 --- a/src/include/lwip/netifapi.h +++ b/src/include/lwip/netifapi.h @@ -92,22 +92,39 @@ err_t netifapi_netif_set_addr(struct netif *netif, const ip4_addr_t *ipaddr, err_t netifapi_netif_common(struct netif *netif, netifapi_void_fn voidfunc, netifapi_errt_fn errtfunc); -/** @ingroup netifapi */ +/** @ingroup netifapi_netif */ #define netifapi_netif_remove(n) netifapi_netif_common(n, netif_remove, NULL) -/** @ingroup netifapi */ +/** @ingroup netifapi_netif */ #define netifapi_netif_set_up(n) netifapi_netif_common(n, netif_set_up, NULL) -/** @ingroup netifapi */ +/** @ingroup netifapi_netif */ #define netifapi_netif_set_down(n) netifapi_netif_common(n, netif_set_down, NULL) -/** @ingroup netifapi */ +/** @ingroup netifapi_netif */ #define netifapi_netif_set_default(n) netifapi_netif_common(n, netif_set_default, NULL) +/** + * @defgroup netifapi_dhcp4 DHCPv4 + * @ingroup netifapi + * To be called from non-TCPIP threads + */ +/** @ingroup netifapi_dhcp4 */ #define netifapi_dhcp_start(n) netifapi_netif_common(n, NULL, dhcp_start) +/** @ingroup netifapi_dhcp4 */ #define netifapi_dhcp_stop(n) netifapi_netif_common(n, dhcp_stop, NULL) +/** @ingroup netifapi_dhcp4 */ #define netifapi_dhcp_inform(n) netifapi_netif_common(n, dhcp_inform, NULL) +/** @ingroup netifapi_dhcp4 */ #define netifapi_dhcp_renew(n) netifapi_netif_common(n, NULL, dhcp_renew) +/** @ingroup netifapi_dhcp4 */ #define netifapi_dhcp_release(n) netifapi_netif_common(n, NULL, dhcp_release) +/** + * @defgroup netifapi_autoip AUTOIP + * @ingroup netifapi + * To be called from non-TCPIP threads + */ +/** @ingroup netifapi_autoip */ #define netifapi_autoip_start(n) netifapi_netif_common(n, NULL, autoip_start) +/** @ingroup netifapi_autoip */ #define netifapi_autoip_stop(n) netifapi_netif_common(n, NULL, autoip_stop) #ifdef __cplusplus From 67d674a59c6df7199704b3ff2ded3a1bf846c0bf Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 26 Jul 2016 18:20:30 +0200 Subject: [PATCH 206/275] Document IGMP and MLD6 API in doxygen module style --- src/core/ip.c | 12 ++++++------ src/core/ipv4/autoip.c | 1 + src/core/ipv4/dhcp.c | 1 + src/core/ipv4/igmp.c | 10 ++++++++++ src/core/ipv6/mld6.c | 15 ++++++++++++--- 5 files changed, 30 insertions(+), 9 deletions(-) diff --git a/src/core/ip.c b/src/core/ip.c index 6e868d1f..af6e36b3 100644 --- a/src/core/ip.c +++ b/src/core/ip.c @@ -37,15 +37,15 @@ */ /** + * @defgroup ip4 IPv4 + * + * @defgroup ip6 IPv6 + * * @defgroup ipaddr IP address handling - */ - -/** + * * @defgroup ip4addr IPv4 only * @ingroup ipaddr - */ - -/** + * * @defgroup ip6addr IPv6 only * @ingroup ipaddr */ diff --git a/src/core/ipv4/autoip.c b/src/core/ipv4/autoip.c index a478f0ae..8ca26712 100644 --- a/src/core/ipv4/autoip.c +++ b/src/core/ipv4/autoip.c @@ -64,6 +64,7 @@ /** * @defgroup autoip AUTOIP + * @ingroup ip4 * AUTOIP related functions * @see netifapi_autoip */ diff --git a/src/core/ipv4/dhcp.c b/src/core/ipv4/dhcp.c index d63aea83..b3307dac 100644 --- a/src/core/ipv4/dhcp.c +++ b/src/core/ipv4/dhcp.c @@ -67,6 +67,7 @@ /** * @defgroup dhcp4 DHCPv4 + * @ingroup ip4 * DHCP (IPv4) related functions * @see netifapi_dhcp4 */ diff --git a/src/core/ipv4/igmp.c b/src/core/ipv4/igmp.c index 4e8d25e2..50c5d9d0 100644 --- a/src/core/ipv4/igmp.c +++ b/src/core/ipv4/igmp.c @@ -38,6 +38,12 @@ * source code. */ +/** + * @defgroup igmp IGMP + * @ingroup ip4 + * To be called from TCPIP thread + */ + /*------------------------------------------------------------- Note 1) Although the rfc requires V1 AND V2 capability @@ -477,6 +483,7 @@ igmp_input(struct pbuf *p, struct netif *inp, const ip4_addr_t *dest) } /** + * @ingroup igmp * Join a group on one network interface. * * @param ifaddr ip address of the network interface which should join a new group @@ -513,6 +520,7 @@ igmp_joingroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr) } /** + * @ingroup igmp * Join a group on one network interface. * * @param netif the network interface which should join a new group @@ -571,6 +579,7 @@ igmp_joingroup_netif(struct netif *netif, const ip4_addr_t *groupaddr) } /** + * @ingroup igmp * Leave a group on one network interface. * * @param ifaddr ip address of the network interface which should leave a group @@ -606,6 +615,7 @@ igmp_leavegroup(const ip4_addr_t *ifaddr, const ip4_addr_t *groupaddr) } /** + * @ingroup igmp * Leave a group on one network interface. * * @param netif the network interface which should leave a group diff --git a/src/core/ipv6/mld6.c b/src/core/ipv6/mld6.c index cb1b71d7..ef854e76 100644 --- a/src/core/ipv6/mld6.c +++ b/src/core/ipv6/mld6.c @@ -1,8 +1,5 @@ /** * @file - * - * Multicast listener discovery for IPv6. Aims to be compliant with RFC 2710. - * No support for MLDv2. */ /* @@ -40,6 +37,14 @@ * */ +/** + * @defgroup mld6 MLD6 + * @ingroup ip6 + * Multicast listener discovery for IPv6. Aims to be compliant with RFC 2710. + * No support for MLDv2.\n + * To be called from TCPIP thread + */ + /* Based on igmp.c implementation of igmp v2 protocol */ #include "lwip/opt.h" @@ -310,6 +315,7 @@ mld6_input(struct pbuf *p, struct netif *inp) } /** + * @ingroup mld6 * Join a group on a network interface. * * @param srcaddr ipv6 address of the network interface which should @@ -343,6 +349,7 @@ mld6_joingroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr) } /** + * @ingroup mld6 * Join a group on a network interface. * * @param netif the network interface which should join a new group. @@ -381,6 +388,7 @@ mld6_joingroup_netif(struct netif *netif, const ip6_addr_t *groupaddr) } /** + * @ingroup mld6 * Leave a group on a network interface. * * @param srcaddr ipv6 address of the network interface which should @@ -414,6 +422,7 @@ mld6_leavegroup(const ip6_addr_t *srcaddr, const ip6_addr_t *groupaddr) } /** + * @ingroup mld6 * Leave a group on a network interface. * * @param netif the network interface which should leave the group. From 8140c77d7d0dd26e0be6dc4410445a6c2b6ebd59 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 26 Jul 2016 18:26:58 +0200 Subject: [PATCH 207/275] Document Socket API in doxygen module style --- src/api/sockets.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/api/sockets.c b/src/api/sockets.c index 1695d8f0..e0b072fe 100644 --- a/src/api/sockets.c +++ b/src/api/sockets.c @@ -38,6 +38,14 @@ * */ +/** + * @defgroup socket Socket API + * BSD-style socket API.\n + * Thread-safe, to be called from non-TCPIP threads only.\n + * Can be activated by defining LWIP_SOCKET to 1.\n + * Header is in posix/sys/socket.h\b + */ + #include "lwip/opt.h" #if LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ From 8a9de94b1f3835e58a1631aa867bc46cda17098f Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 26 Jul 2016 18:39:53 +0200 Subject: [PATCH 208/275] Restructure documentation. Create two top-level sections for thread-safe and callback-style APIs. --- doc/doxygen/main_page.h | 10 ++++++++++ src/api/api_lib.c | 2 +- src/api/netifapi.c | 1 + src/api/sockets.c | 1 + src/api/tcpip.c | 1 + src/core/dns.c | 1 + src/core/init.c | 1 + src/core/ip.c | 2 ++ src/core/netif.c | 1 + src/core/raw.c | 1 + src/include/lwip/api.h | 1 - 11 files changed, 20 insertions(+), 2 deletions(-) diff --git a/doc/doxygen/main_page.h b/doc/doxygen/main_page.h index 4b2ccba4..d70d8348 100644 --- a/doc/doxygen/main_page.h +++ b/doc/doxygen/main_page.h @@ -1,3 +1,13 @@ +/** + * @defgroup callbackstyle_api Callback-style APIs + * Non thread-safe APIs, callback style for maximum performance and minimum + * memory footprint. + * + * @defgroup threadsafe_api Thread-safe APIs + * Thread-safe APIs, blocking functions. More overhead, but can be called + * from any thread except TCPIP thread. + */ + /*! \mainpage lwIP Documentation * * \section intro_sec Introduction diff --git a/src/api/api_lib.c b/src/api/api_lib.c index 03f083dd..778cacb4 100644 --- a/src/api/api_lib.c +++ b/src/api/api_lib.c @@ -36,6 +36,7 @@ /** * @defgroup netconn Netconn API + * @ingroup threadsafe_api * Thread-safe, to be called from non-TCPIP threads only. * TX/RX handling based on @ref netbuf (containing @ref pbuf) * to avoid copying data around. @@ -115,7 +116,6 @@ netconn_apimsg(tcpip_callback_fn fn, struct api_msg *apimsg) } /** - * @ingroup netconn_common * Create a new netconn (of a specific type) that has a callback function. * The corresponding pcb is also created. * diff --git a/src/api/netifapi.c b/src/api/netifapi.c index 9b1c048e..3a02d521 100644 --- a/src/api/netifapi.c +++ b/src/api/netifapi.c @@ -33,6 +33,7 @@ /** * @defgroup netifapi NETIF API + * @ingroup threadsafe_api * Thread-safe functions to be called from non-TCPIP threads * * @defgroup netifapi_netif NETIF related diff --git a/src/api/sockets.c b/src/api/sockets.c index e0b072fe..6547182c 100644 --- a/src/api/sockets.c +++ b/src/api/sockets.c @@ -40,6 +40,7 @@ /** * @defgroup socket Socket API + * @ingroup threadsafe_api * BSD-style socket API.\n * Thread-safe, to be called from non-TCPIP threads only.\n * Can be activated by defining LWIP_SOCKET to 1.\n diff --git a/src/api/tcpip.c b/src/api/tcpip.c index 60452737..32abf5f8 100644 --- a/src/api/tcpip.c +++ b/src/api/tcpip.c @@ -441,6 +441,7 @@ tcpip_trycallback(struct tcpip_callback_msg* msg) } /** + * @ingroup lwIP * Initialize this module: * - initialize all sub modules * - start the tcpip_thread diff --git a/src/core/dns.c b/src/core/dns.c index 5ee482ce..75cf12ee 100644 --- a/src/core/dns.c +++ b/src/core/dns.c @@ -39,6 +39,7 @@ /** * @defgroup dns DNS + * @ingroup callbackstyle_api * * Implements a DNS host name to IP address resolver. * diff --git a/src/core/init.c b/src/core/init.c index 96aa02c7..3cf504f4 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -323,6 +323,7 @@ /** * @ingroup lwIP * Initialize all modules. + * Use this in NO_SYS mode. Use tcpip_init() otherwise. */ void lwip_init(void) diff --git a/src/core/ip.c b/src/core/ip.c index af6e36b3..4a36da18 100644 --- a/src/core/ip.c +++ b/src/core/ip.c @@ -38,8 +38,10 @@ /** * @defgroup ip4 IPv4 + * @ingroup callbackstyle_api * * @defgroup ip6 IPv6 + * @ingroup callbackstyle_api * * @defgroup ipaddr IP address handling * diff --git a/src/core/netif.c b/src/core/netif.c index 7d368e9f..1281fa63 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -36,6 +36,7 @@ /** * @defgroup netif Network interface (NETIF) + * @ingroup callbackstyle_api */ #include "lwip/opt.h" diff --git a/src/core/raw.c b/src/core/raw.c index 8747353f..90f2e302 100644 --- a/src/core/raw.c +++ b/src/core/raw.c @@ -40,6 +40,7 @@ /** * @defgroup raw_api RAW API + * @ingroup callbackstyle_api * @verbinclude "rawapi.txt" */ diff --git a/src/include/lwip/api.h b/src/include/lwip/api.h index a919a2d1..bbe45713 100644 --- a/src/include/lwip/api.h +++ b/src/include/lwip/api.h @@ -257,7 +257,6 @@ struct netconn { /** @ingroup netconn_common */ #define netconn_new(t) netconn_new_with_proto_and_callback(t, 0, NULL) -/** @ingroup netconn_common */ #define netconn_new_with_callback(t, c) netconn_new_with_proto_and_callback(t, 0, c) struct netconn *netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, netconn_callback callback); From c6831648e211546970eb9ff51ceaa2bfb5422eb8 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 26 Jul 2016 19:30:05 +0200 Subject: [PATCH 209/275] Document apps in doxygen module style, create more top-level categories to structure documentation --- doc/doxygen/lwip.Doxyfile | 1 + doc/doxygen/main_page.h | 6 +++++ doc/doxygen/ppp.h | 1 + src/apps/httpd/httpd.c | 7 +++++- src/apps/netbiosns/netbiosns.c | 18 ++++++++++++- src/apps/snmp/snmp_core.c | 42 +++++++++++++++++++++---------- src/apps/snmp/snmp_msg.c | 10 ++++++++ src/apps/snmp/snmp_raw.c | 1 + src/apps/snmp/snmp_traps.c | 32 ++++++++++++++++++----- src/apps/sntp/sntp.c | 34 +++++++++++++++++-------- src/core/ip.c | 1 + src/core/memp.c | 2 ++ src/core/pbuf.c | 1 + src/include/lwip/apps/netbiosns.h | 3 --- src/include/lwip/apps/snmp.h | 5 +++- 15 files changed, 128 insertions(+), 36 deletions(-) diff --git a/doc/doxygen/lwip.Doxyfile b/doc/doxygen/lwip.Doxyfile index 77b60c45..3c510a2d 100644 --- a/doc/doxygen/lwip.Doxyfile +++ b/doc/doxygen/lwip.Doxyfile @@ -2080,6 +2080,7 @@ PREDEFINED = NO_SYS=0 \ LWIP_IGMP=1 \ LWIP_TCP=1 \ LWIP_SNMP=1 \ + SNMP_USE_RAW=1 \ MEMP_OVERFLOW_CHECK=0 \ MEMP_SANITY_CHECK=1 \ LWIP_ARP=1 \ diff --git a/doc/doxygen/main_page.h b/doc/doxygen/main_page.h index d70d8348..c13a1d9d 100644 --- a/doc/doxygen/main_page.h +++ b/doc/doxygen/main_page.h @@ -6,6 +6,12 @@ * @defgroup threadsafe_api Thread-safe APIs * Thread-safe APIs, blocking functions. More overhead, but can be called * from any thread except TCPIP thread. + * + * @defgroup infrastructure Infrastructure + * + * @defgroup addons Addons + * + * @defgroup apps Applications */ /*! \mainpage lwIP Documentation diff --git a/doc/doxygen/ppp.h b/doc/doxygen/ppp.h index cbd50812..81e0856f 100644 --- a/doc/doxygen/ppp.h +++ b/doc/doxygen/ppp.h @@ -1,4 +1,5 @@ /** * @defgroup ppp PPP + * @ingroup addons * @verbinclude "ppp.txt" */ diff --git a/src/apps/httpd/httpd.c b/src/apps/httpd/httpd.c index 8bed6a1c..6be2573e 100644 --- a/src/apps/httpd/httpd.c +++ b/src/apps/httpd/httpd.c @@ -36,7 +36,11 @@ * */ -/* This httpd supports for a +/** + * @defgroup httpd HTTP server + * @ingroup apps + * + * This httpd supports for a * rudimentary server-side-include facility which will replace tags of the form * in any file whose extension is .shtml, .shtm or .ssi with * strings provided by an include handler whose pointer is provided to the @@ -2611,6 +2615,7 @@ http_accept(void *arg, struct tcp_pcb *pcb, err_t err) } /** + * @ingroup httpd * Initialize the httpd: set up a listening PCB and bind it to the defined port */ void diff --git a/src/apps/netbiosns/netbiosns.c b/src/apps/netbiosns/netbiosns.c index 627a1769..dd01c026 100644 --- a/src/apps/netbiosns/netbiosns.c +++ b/src/apps/netbiosns/netbiosns.c @@ -1,6 +1,11 @@ /** * @file * NetBIOS name service responder + */ + +/** + * @defgroup netbiosns NETBIOS responder + * @ingroup apps * * This is an example implementation of a NetBIOS name server. * It responds to name queries for a configurable name. @@ -308,6 +313,10 @@ netbiosns_recv(void *arg, struct udp_pcb *upcb, struct pbuf *p, const ip_addr_t } } +/** + * @ingroup netbiosns + * Init netbios responder + */ void netbiosns_init(void) { @@ -325,7 +334,10 @@ netbiosns_init(void) } #ifndef NETBIOS_LWIP_NAME -/* ATTENTION: the hostname must be <= 15 characters! */ +/** + * @ingroup netbiosns + * Set netbios name. ATTENTION: the hostname must be less than 15 characters! + */ void netbiosns_set_name(const char* hostname) { @@ -338,6 +350,10 @@ netbiosns_set_name(const char* hostname) } #endif +/** + * @ingroup netbiosns + * Stop netbios responder + */ void netbiosns_stop(void) { diff --git a/src/apps/snmp/snmp_core.c b/src/apps/snmp/snmp_core.c index a1a10a59..77883969 100644 --- a/src/apps/snmp/snmp_core.c +++ b/src/apps/snmp/snmp_core.c @@ -33,6 +33,17 @@ * Martin Hentschel */ +/** + * @defgroup snmp SNMPv2c agent + * @ingroup apps + * + * @defgroup snmp_core Core + * @ingroup snmp + * + * @defgroup snmp_traps Traps + * @ingroup snmp + */ + #include "lwip/apps/snmp_opts.h" #if LWIP_SNMP /* don't build if not configured for use in lwipopts.h */ @@ -72,6 +83,7 @@ static u8_t snmp_num_mibs = 0; static struct snmp_mib const * const *snmp_mibs = default_mibs; /** + * @ingroup snmp_core * Sets the MIBs to use. * Example: call snmp_set_mibs() as follows: * static const struct snmp_mib *my_snmp_mibs[] = { @@ -90,18 +102,19 @@ snmp_set_mibs(const struct snmp_mib **mibs, u8_t num_mibs) } /** -* 'device enterprise oid' is used for 'device OID' field in trap PDU's (for identification of generating device) -* as well as for value returned by MIB-2 'sysObjectID' field (if internal MIB2 implementation is used). -* The 'device enterprise oid' shall point to an OID located under 'private-enterprises' branch (1.3.6.1.4.1.XXX). If a vendor -* wants to provide a custom object there, he has to get its own enterprise oid from IANA (http://www.iana.org). It -* is not allowed to use LWIP enterprise ID! -* In order to identify a specific device it is recommended to create a dedicated OID for each device type under its own -* enterprise oid. -* e.g. -* device a > 1.3.6.1.4.1.XXX(ent-oid).1(devices).1(device a) -* device b > 1.3.6.1.4.1.XXX(ent-oid).1(devices).2(device b) -* for more details see description of 'sysObjectID' field in RFC1213-MIB -*/ + * @ingroup snmp_core + * 'device enterprise oid' is used for 'device OID' field in trap PDU's (for identification of generating device) + * as well as for value returned by MIB-2 'sysObjectID' field (if internal MIB2 implementation is used). + * The 'device enterprise oid' shall point to an OID located under 'private-enterprises' branch (1.3.6.1.4.1.XXX). If a vendor + * wants to provide a custom object there, he has to get its own enterprise oid from IANA (http://www.iana.org). It + * is not allowed to use LWIP enterprise ID! + * In order to identify a specific device it is recommended to create a dedicated OID for each device type under its own + * enterprise oid. + * e.g. + * device a > 1.3.6.1.4.1.XXX(ent-oid).1(devices).1(device a) + * device b > 1.3.6.1.4.1.XXX(ent-oid).1(devices).2(device b) + * for more details see description of 'sysObjectID' field in RFC1213-MIB + */ void snmp_set_device_enterprise_oid(const struct snmp_obj_id* device_enterprise_oid) { if (device_enterprise_oid == NULL) { @@ -111,7 +124,10 @@ void snmp_set_device_enterprise_oid(const struct snmp_obj_id* device_enterprise_ } } -/** Get 'device enterprise oid' */ +/** + * @ingroup snmp_core + * Get 'device enterprise oid' + */ const struct snmp_obj_id* snmp_get_device_enterprise_oid(void) { return snmp_device_enterprise_oid; diff --git a/src/apps/snmp/snmp_msg.c b/src/apps/snmp/snmp_msg.c index b1acbf56..48c08d5b 100644 --- a/src/apps/snmp/snmp_msg.c +++ b/src/apps/snmp/snmp_msg.c @@ -67,6 +67,7 @@ snmp_write_callback_fct snmp_write_callback = NULL; void* snmp_write_callback_arg = NULL; /** + * @ingroup snmp_core * Returns current SNMP community string. * @return current SNMP community string */ @@ -77,6 +78,7 @@ snmp_get_community(void) } /** + * @ingroup snmp_core * Sets SNMP community string. * The string itself (its storage) must be valid throughout the whole life of * program (or until it is changed to sth else). @@ -91,6 +93,7 @@ snmp_set_community(const char * const community) } /** + * @ingroup snmp_core * Returns current SNMP write-access community string. * @return current SNMP write-access community string */ @@ -101,6 +104,7 @@ snmp_get_community_write(void) } /** + * @ingroup snmp_traps * Returns current SNMP community string used for sending traps. * @return current SNMP community string used for sending traps */ @@ -111,6 +115,7 @@ snmp_get_community_trap(void) } /** + * @ingroup snmp_core * Sets SNMP community string for write-access. * The string itself (its storage) must be valid throughout the whole life of * program (or until it is changed to sth else). @@ -125,6 +130,7 @@ snmp_set_community_write(const char * const community) } /** + * @ingroup snmp_traps * Sets SNMP community string used for sending traps. * The string itself (its storage) must be valid throughout the whole life of * program (or until it is changed to sth else). @@ -138,6 +144,10 @@ snmp_set_community_trap(const char * const community) snmp_community_trap = community; } +/** + * @ingroup snmp_core + * Callback fired on every successful write access + */ void snmp_set_write_callback(snmp_write_callback_fct write_callback, void* callback_arg) { diff --git a/src/apps/snmp/snmp_raw.c b/src/apps/snmp/snmp_raw.c index 519a5c9b..8cfe77a6 100644 --- a/src/apps/snmp/snmp_raw.c +++ b/src/apps/snmp/snmp_raw.c @@ -78,6 +78,7 @@ snmp_get_local_ip_for_dst(void* handle, const ip_addr_t *dst, ip_addr_t *result) } /** + * @ingroup snmp_core * Starts SNMP Agent. * Allocates UDP pcb and binds it to IP_ADDR_ANY port 161. */ diff --git a/src/apps/snmp/snmp_traps.c b/src/apps/snmp/snmp_traps.c index eb5360ac..8061766e 100644 --- a/src/apps/snmp/snmp_traps.c +++ b/src/apps/snmp/snmp_traps.c @@ -98,6 +98,7 @@ static struct snmp_trap_dst trap_dst[SNMP_TRAP_DESTINATIONS]; static u8_t snmp_auth_traps_enabled = 0; /** + * @ingroup snmp_traps * Sets enable switch for this trap destination. * @param dst_idx index in 0 .. SNMP_TRAP_DESTINATIONS-1 * @param enable switch if 0 destination is disabled >0 enabled. @@ -111,6 +112,7 @@ snmp_trap_dst_enable(u8_t dst_idx, u8_t enable) } /** + * @ingroup snmp_traps * Sets IPv4 address for this trap destination. * @param dst_idx index in 0 .. SNMP_TRAP_DESTINATIONS-1 * @param dst IPv4 address in host order. @@ -123,14 +125,20 @@ snmp_trap_dst_ip_set(u8_t dst_idx, const ip_addr_t *dst) } } -/** Enable/disable authentication traps */ +/** + * @ingroup snmp_traps + * Enable/disable authentication traps + */ void snmp_set_auth_traps_enabled(u8_t enable) { snmp_auth_traps_enabled = enable; } -/** Get authentication traps enabled state */ +/** + * @ingroup snmp_traps + * Get authentication traps enabled state + */ u8_t snmp_get_auth_traps_enabled(void) { @@ -214,7 +222,10 @@ snmp_send_trap(const struct snmp_obj_id *device_enterprise_oid, s32_t generic_tr return err; } -/** Send generic SNMP trap */ +/** + * @ingroup snmp_traps + * Send generic SNMP trap + */ err_t snmp_send_trap_generic(s32_t generic_trap) { @@ -222,21 +233,30 @@ snmp_send_trap_generic(s32_t generic_trap) return snmp_send_trap(&oid, generic_trap, 0, NULL); } -/** Send specific SNMP trap with variable bindings */ +/** + *@ingroup snmp_traps + * Send specific SNMP trap with variable bindings + */ err_t snmp_send_trap_specific(s32_t specific_trap, struct snmp_varbind *varbinds) { return snmp_send_trap(NULL, SNMP_GENTRAP_ENTERPRISE_SPECIFIC, specific_trap, varbinds); } -/** Send coldstart trap */ +/** + * @ingroup snmp_traps + * Send coldstart trap + */ void snmp_coldstart_trap(void) { snmp_send_trap_generic(SNMP_GENTRAP_COLDSTART); } -/** Send authentication failure trap (used internally by agent) */ +/** + * @ingroup snmp_traps + * Send authentication failure trap (used internally by agent) + */ void snmp_authfail_trap(void) { diff --git a/src/apps/sntp/sntp.c b/src/apps/sntp/sntp.c index 365ac7ad..8d43eb0b 100644 --- a/src/apps/sntp/sntp.c +++ b/src/apps/sntp/sntp.c @@ -1,17 +1,6 @@ /** * @file * SNTP client module - * - * This is simple "SNTP" client for the lwIP raw API. - * It is a minimal implementation of SNTPv4 as specified in RFC 4330. - * - * For a list of some public NTP servers, see this link : - * http://support.ntp.org/bin/view/Servers/NTPPoolServers - * - * @todo: - * - set/change servers at runtime - * - complete SNTP_CHECK_RESPONSE checks 3 and 4 - * - support broadcast/multicast mode? */ /* @@ -45,6 +34,22 @@ * Author: Frédéric Bernon, Simon Goldschmidt */ + +/** + * @defgroup sntp SNTP + * @ingroup apps + * + * This is simple "SNTP" client for the lwIP raw API. + * It is a minimal implementation of SNTPv4 as specified in RFC 4330. + * + * For a list of some public NTP servers, see this link : + * http://support.ntp.org/bin/view/Servers/NTPPoolServers + * + * @todo: + * - set/change servers at runtime + * - complete SNTP_CHECK_RESPONSE checks 3 and 4 + */ + #include "lwip/apps/sntp.h" #include "lwip/opt.h" @@ -523,6 +528,7 @@ sntp_request(void *arg) } /** + * @ingroup sntp * Initialize this module. * Send out request instantly or after SNTP_STARTUP_DELAY(_FUNC). */ @@ -559,6 +565,7 @@ sntp_init(void) } /** + * @ingroup sntp * Stop this module. */ void @@ -572,6 +579,7 @@ sntp_stop(void) } /** + * @ingroup sntp * Get enabled state. */ u8_t sntp_enabled(void) @@ -580,6 +588,7 @@ u8_t sntp_enabled(void) } /** + * @ingroup sntp * Sets the operating mode. * @param operating_mode one of the available operating modes */ @@ -592,6 +601,7 @@ sntp_setoperatingmode(u8_t operating_mode) } /** + * @ingroup sntp * Gets the operating mode. */ u8_t @@ -616,6 +626,7 @@ sntp_servermode_dhcp(int set_servers_from_dhcp) #endif /* SNTP_GET_SERVERS_FROM_DHCP */ /** + * @ingroup sntp * Initialize one of the NTP servers by IP address * * @param idx the index of the NTP server to set must be < SNTP_MAX_SERVERS @@ -664,6 +675,7 @@ dhcp_set_ntp_servers(u8_t num, const ip4_addr_t *server) #endif /* LWIP_DHCP && SNTP_GET_SERVERS_FROM_DHCP */ /** + * @ingroup sntp * Obtain one of the currently configured by IP address (or DHCP) NTP servers * * @param idx the index of the NTP server diff --git a/src/core/ip.c b/src/core/ip.c index 4a36da18..b6e493b9 100644 --- a/src/core/ip.c +++ b/src/core/ip.c @@ -44,6 +44,7 @@ * @ingroup callbackstyle_api * * @defgroup ipaddr IP address handling + * @ingroup infrastructure * * @defgroup ip4addr IPv4 only * @ingroup ipaddr diff --git a/src/core/memp.c b/src/core/memp.c index b315ef0e..7ac52a11 100644 --- a/src/core/memp.c +++ b/src/core/memp.c @@ -40,6 +40,8 @@ /** * @defgroup mempool Memory pools + * @ingroup infrastructure + * Custom memory pools */ #include "lwip/opt.h" diff --git a/src/core/pbuf.c b/src/core/pbuf.c index 26d7c875..21bb8f0d 100644 --- a/src/core/pbuf.c +++ b/src/core/pbuf.c @@ -5,6 +5,7 @@ /** * @defgroup pbuf Payload buffers (PBUF) + * @ingroup infrastructure * * Packets are built from the pbuf data structure. It supports dynamic * memory allocation for packet contents or can reference externally diff --git a/src/include/lwip/apps/netbiosns.h b/src/include/lwip/apps/netbiosns.h index 5bfff8ce..c9f68d8d 100644 --- a/src/include/lwip/apps/netbiosns.h +++ b/src/include/lwip/apps/netbiosns.h @@ -34,13 +34,10 @@ #include "lwip/apps/netbiosns_opts.h" -/** Init netbios responder */ void netbiosns_init(void); #ifndef NETBIOS_LWIP_NAME -/** Set netbios name. ATTENTION: the hostname must be <= 15 characters! */ void netbiosns_set_name(const char* hostname); #endif -/** Stop netbios responder */ void netbiosns_stop(void); #endif /* LWIP_HDR_APPS_NETBIOS_H */ diff --git a/src/include/lwip/apps/snmp.h b/src/include/lwip/apps/snmp.h index 5bac25db..60ce9c92 100644 --- a/src/include/lwip/apps/snmp.h +++ b/src/include/lwip/apps/snmp.h @@ -69,7 +69,10 @@ struct snmp_varbind void *value; }; -/** Agent setup, start listening to port 161. */ +/** + * @ingroup snmp_core + * Agent setup, start listening to port 161. + */ void snmp_init(void); void snmp_set_mibs(const struct snmp_mib **mibs, u8_t num_mibs); From c7e20150f00597396ef0caff0708e5d945da851d Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 26 Jul 2016 19:42:16 +0200 Subject: [PATCH 210/275] Update and restructure docs of some lwip core functions --- src/api/tcpip.c | 2 +- src/core/init.c | 5 +++-- src/include/lwip/tcpip.h | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/api/tcpip.c b/src/api/tcpip.c index 32abf5f8..d9fcc700 100644 --- a/src/api/tcpip.c +++ b/src/api/tcpip.c @@ -441,7 +441,7 @@ tcpip_trycallback(struct tcpip_callback_msg* msg) } /** - * @ingroup lwIP + * @ingroup lwip * Initialize this module: * - initialize all sub modules * - start the tcpip_thread diff --git a/src/core/init.c b/src/core/init.c index 3cf504f4..8b8cf37c 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -36,7 +36,8 @@ */ /** - * @defgroup lwIP lwIP + * @defgroup lwip lwIP + * @ingroup infrastructure */ #include "lwip/opt.h" @@ -321,7 +322,7 @@ #endif /* !LWIP_DISABLE_TCP_SANITY_CHECKS */ /** - * @ingroup lwIP + * @ingroup lwip * Initialize all modules. * Use this in NO_SYS mode. Use tcpip_init() otherwise. */ diff --git a/src/include/lwip/tcpip.h b/src/include/lwip/tcpip.h index 49a732c5..29184bfa 100644 --- a/src/include/lwip/tcpip.h +++ b/src/include/lwip/tcpip.h @@ -76,6 +76,10 @@ err_t tcpip_inpkt(struct pbuf *p, struct netif *inp, netif_input_fn input_fn); err_t tcpip_input(struct pbuf *p, struct netif *inp); err_t tcpip_callback_with_block(tcpip_callback_fn function, void *ctx, u8_t block); +/** + * @ingroup lwip + * @see tcpip_callback_with_block + */ #define tcpip_callback(f, ctx) tcpip_callback_with_block(f, ctx, 1) struct tcpip_callback_msg* tcpip_callbackmsg_new(tcpip_callback_fn function, void *ctx); From 7f43fcab71d9105daaff44978ed3b6e7b52bec99 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 26 Jul 2016 20:03:04 +0200 Subject: [PATCH 211/275] Document system abstraction layer in doxygen module style --- doc/doxygen/lwip.Doxyfile | 2 +- doc/doxygen/sys_arch.h | 4 - doc/snmp_agent.txt | 3 + src/include/lwip/sys.h | 207 +++++++++++++++++++++++++++++--------- 4 files changed, 163 insertions(+), 53 deletions(-) delete mode 100644 doc/doxygen/sys_arch.h diff --git a/doc/doxygen/lwip.Doxyfile b/doc/doxygen/lwip.Doxyfile index 3c510a2d..0b9b8122 100644 --- a/doc/doxygen/lwip.Doxyfile +++ b/doc/doxygen/lwip.Doxyfile @@ -781,7 +781,7 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = ../../src main_page.h ppp.h contrib.h sys_arch.h +INPUT = ../../src main_page.h ppp.h contrib.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/doc/doxygen/sys_arch.h b/doc/doxygen/sys_arch.h deleted file mode 100644 index 213cec90..00000000 --- a/doc/doxygen/sys_arch.h +++ /dev/null @@ -1,4 +0,0 @@ -/** - * @page sys Porting (sys abstraction layer) - * @verbinclude "sys_arch.txt" - */ diff --git a/doc/snmp_agent.txt b/doc/snmp_agent.txt index 3d514cc3..224a986d 100644 --- a/doc/snmp_agent.txt +++ b/doc/snmp_agent.txt @@ -1,3 +1,6 @@ +* THIS DOCUMENTATION IS OUTDATED * +It was written before the agent was largely rewritten in 2015. + SNMPv1 agent for lwIP Author: Christiaan Simons diff --git a/src/include/lwip/sys.h b/src/include/lwip/sys.h index 380d03b0..cedaf8ef 100644 --- a/src/include/lwip/sys.h +++ b/src/include/lwip/sys.h @@ -33,8 +33,32 @@ * This file is part of the lwIP TCP/IP stack. * * Author: Adam Dunkels - * */ + +/** + * @defgroup sys_layer System abstraction layer + * @ingroup infrastructure + * @verbinclude "sys_arch.txt" + * + * @defgroup sys_sem Semaphores + * @ingroup sys_layer + * + * @defgroup sys_mutex Mutexes + * @ingroup sys_layer + * + * @defgroup sys_mbox Mailboxes + * @ingroup sys_layer + * + * @defgroup sys_time Time + * @ingroup sys_layer + * + * @defgroup sys_prot Critical sections + * @ingroup sys_layer + * + * @defgroup sys_thread Threads + * @ingroup sys_layer + */ + #ifndef LWIP_HDR_SYS_H #define LWIP_HDR_SYS_H @@ -121,130 +145,205 @@ typedef void (*lwip_thread_fn)(void *arg); #else /* LWIP_COMPAT_MUTEX */ -/** Create a new mutex +/** + * @ingroup sys_mutex + * Create a new mutex * @param mutex pointer to the mutex to create - * @return a new mutex */ + * @return a new mutex + */ err_t sys_mutex_new(sys_mutex_t *mutex); -/** Lock a mutex - * @param mutex the mutex to lock */ +/** + * @ingroup sys_mutex + * Lock a mutex + * @param mutex the mutex to lock + */ void sys_mutex_lock(sys_mutex_t *mutex); -/** Unlock a mutex - * @param mutex the mutex to unlock */ +/** + * @ingroup sys_mutex + * Unlock a mutex + * @param mutex the mutex to unlock + */ void sys_mutex_unlock(sys_mutex_t *mutex); -/** Delete a semaphore - * @param mutex the mutex to delete */ +/** + * @ingroup sys_mutex + * Delete a semaphore + * @param mutex the mutex to delete + */ void sys_mutex_free(sys_mutex_t *mutex); #ifndef sys_mutex_valid -/** Check if a mutex is valid/allocated: return 1 for valid, 0 for invalid */ +/** + * @ingroup sys_mutex + * Check if a mutex is valid/allocated: return 1 for valid, 0 for invalid + */ int sys_mutex_valid(sys_mutex_t *mutex); #endif #ifndef sys_mutex_set_invalid -/** Set a mutex invalid so that sys_mutex_valid returns 0 */ +/** + * @ingroup sys_mutex + * Set a mutex invalid so that sys_mutex_valid returns 0 + */ void sys_mutex_set_invalid(sys_mutex_t *mutex); #endif #endif /* LWIP_COMPAT_MUTEX */ /* Semaphore functions: */ -/** Create a new semaphore +/** + * @ingroup sys_sem + * Create a new semaphore * @param sem pointer to the semaphore to create * @param count initial count of the semaphore - * @return ERR_OK if successful, another err_t otherwise */ + * @return ERR_OK if successful, another err_t otherwise + */ err_t sys_sem_new(sys_sem_t *sem, u8_t count); -/** Signals a semaphore - * @param sem the semaphore to signal */ +/** + * @ingroup sys_sem + * Signals a semaphore + * @param sem the semaphore to signal + */ void sys_sem_signal(sys_sem_t *sem); -/** Wait for a semaphore for the specified timeout +/** + * @ingroup sys_sem + * Wait for a semaphore for the specified timeout * @param sem the semaphore to wait for * @param timeout timeout in milliseconds to wait (0 = wait forever) * @return time (in milliseconds) waited for the semaphore - * or SYS_ARCH_TIMEOUT on timeout */ + * or SYS_ARCH_TIMEOUT on timeout + */ u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout); -/** Delete a semaphore - * @param sem semaphore to delete */ +/** + * @ingroup sys_sem + * Delete a semaphore + * @param sem semaphore to delete + */ void sys_sem_free(sys_sem_t *sem); /** Wait for a semaphore - forever/no timeout */ #define sys_sem_wait(sem) sys_arch_sem_wait(sem, 0) #ifndef sys_sem_valid -/** Check if a semaphore is valid/allocated: return 1 for valid, 0 for invalid */ +/** + * @ingroup sys_sem + * Check if a semaphore is valid/allocated: return 1 for valid, 0 for invalid + */ int sys_sem_valid(sys_sem_t *sem); #endif #ifndef sys_sem_set_invalid -/** Set a semaphore invalid so that sys_sem_valid returns 0 */ +/** + * @ingroup sys_sem + * Set a semaphore invalid so that sys_sem_valid returns 0 + */ void sys_sem_set_invalid(sys_sem_t *sem); #endif #ifndef sys_sem_valid_val -/** Same as sys_sem_valid() but taking a value, not a pointer */ +/** + * Same as sys_sem_valid() but taking a value, not a pointer + */ #define sys_sem_valid_val(sem) sys_sem_valid(&(sem)) #endif #ifndef sys_sem_set_invalid_val -/** Same as sys_sem_set_invalid() but taking a value, not a pointer */ +/** + * Same as sys_sem_set_invalid() but taking a value, not a pointer + */ #define sys_sem_set_invalid_val(sem) sys_sem_set_invalid(&(sem)) #endif -/* Time functions. */ #ifndef sys_msleep +/** + * @ingroup sys_time + * Sleep for specified number of ms + */ void sys_msleep(u32_t ms); /* only has a (close to) 1 ms resolution. */ #endif /* Mailbox functions. */ -/** Create a new mbox of specified size +/** + * @ingroup sys_mbox + * Create a new mbox of specified size * @param mbox pointer to the mbox to create * @param size (minimum) number of messages in this mbox - * @return ERR_OK if successful, another err_t otherwise */ + * @return ERR_OK if successful, another err_t otherwise + */ err_t sys_mbox_new(sys_mbox_t *mbox, int size); -/** Post a message to an mbox - may not fail +/** + * @ingroup sys_mbox + * Post a message to an mbox - may not fail * -> blocks if full, only used from tasks not from ISR * @param mbox mbox to posts the message - * @param msg message to post (ATTENTION: can be NULL) */ + * @param msg message to post (ATTENTION: can be NULL) + */ void sys_mbox_post(sys_mbox_t *mbox, void *msg); -/** Try to post a message to an mbox - may fail if full or ISR +/** + * @ingroup sys_mbox + * Try to post a message to an mbox - may fail if full or ISR * @param mbox mbox to posts the message - * @param msg message to post (ATTENTION: can be NULL) */ + * @param msg message to post (ATTENTION: can be NULL) + */ err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg); -/** Wait for a new message to arrive in the mbox +/** + * @ingroup sys_mbox + * Wait for a new message to arrive in the mbox * @param mbox mbox to get a message from * @param msg pointer where the message is stored * @param timeout maximum time (in milliseconds) to wait for a message (0 = wait forever) * @return time (in milliseconds) waited for a message, may be 0 if not waited or SYS_ARCH_TIMEOUT on timeout - * The returned time has to be accurate to prevent timer jitter! */ + * The returned time has to be accurate to prevent timer jitter! + */ u32_t sys_arch_mbox_fetch(sys_mbox_t *mbox, void **msg, u32_t timeout); /* Allow port to override with a macro, e.g. special timeout for sys_arch_mbox_fetch() */ #ifndef sys_arch_mbox_tryfetch -/** Wait for a new message to arrive in the mbox +/** + * @ingroup sys_mbox + * Wait for a new message to arrive in the mbox * @param mbox mbox to get a message from * @param msg pointer where the message is stored * @return 0 (milliseconds) if a message has been received - * or SYS_MBOX_EMPTY if the mailbox is empty */ + * or SYS_MBOX_EMPTY if the mailbox is empty + */ u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg); #endif -/** For now, we map straight to sys_arch implementation. */ +/** + * For now, we map straight to sys_arch implementation. + */ #define sys_mbox_tryfetch(mbox, msg) sys_arch_mbox_tryfetch(mbox, msg) -/** Delete an mbox - * @param mbox mbox to delete */ +/** + * @ingroup sys_mbox + * Delete an mbox + * @param mbox mbox to delete + */ void sys_mbox_free(sys_mbox_t *mbox); #define sys_mbox_fetch(mbox, msg) sys_arch_mbox_fetch(mbox, msg, 0) #ifndef sys_mbox_valid -/** Check if an mbox is valid/allocated: return 1 for valid, 0 for invalid */ +/** + * @ingroup sys_mbox + * Check if an mbox is valid/allocated: return 1 for valid, 0 for invalid + */ int sys_mbox_valid(sys_mbox_t *mbox); #endif #ifndef sys_mbox_set_invalid -/** Set an mbox invalid so that sys_mbox_valid returns 0 */ +/** + * @ingroup sys_mbox + * Set an mbox invalid so that sys_mbox_valid returns 0 + */ void sys_mbox_set_invalid(sys_mbox_t *mbox); #endif #ifndef sys_mbox_valid_val -/** Same as sys_mbox_valid() but taking a value, not a pointer */ +/** + * Same as sys_mbox_valid() but taking a value, not a pointer + */ #define sys_mbox_valid_val(mbox) sys_mbox_valid(&(mbox)) #endif #ifndef sys_mbox_set_invalid_val -/** Same as sys_mbox_set_invalid() but taking a value, not a pointer */ +/** + * Same as sys_mbox_set_invalid() but taking a value, not a pointer + */ #define sys_mbox_set_invalid_val(mbox) sys_mbox_set_invalid(&(mbox)) #endif -/** The only thread function: +/** + * @ingroup sys_thread + * The only thread function: * Creates a new thread * ATTENTION: although this function returns a value, it MUST NOT FAIL (ports have to assert this!) * @param name human-readable name for the thread (used for debugging purposes) @@ -260,12 +359,18 @@ sys_thread_t sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, void sys_init(void); #ifndef sys_jiffies -/** Ticks/jiffies since power up. */ +/** + * @ingroup sys_time + * Ticks/jiffies since power up. + */ u32_t sys_jiffies(void); #endif -/** Returns the current time in milliseconds, - * may be the same as sys_jiffies or at least based on it. */ +/** + * @ingroup sys_time + * Returns the current time in milliseconds, + * may be the same as sys_jiffies or at least based on it. + */ u32_t sys_now(void); /* Critical Region Protection */ @@ -281,13 +386,17 @@ u32_t sys_now(void); */ #if SYS_LIGHTWEIGHT_PROT -/** SYS_ARCH_DECL_PROTECT +/** + * @ingroup sys_prot + * SYS_ARCH_DECL_PROTECT * declare a protection variable. This macro will default to defining a variable of * type sys_prot_t. If a particular port needs a different implementation, then * this macro may be defined in sys_arch.h. */ #define SYS_ARCH_DECL_PROTECT(lev) sys_prot_t lev -/** SYS_ARCH_PROTECT +/** + * @ingroup sys_prot + * SYS_ARCH_PROTECT * Perform a "fast" protect. This could be implemented by * disabling interrupts for an embedded system or by using a semaphore or * mutex. The implementation should allow calling SYS_ARCH_PROTECT when @@ -297,7 +406,9 @@ u32_t sys_now(void); * different implementation, then this macro may be defined in sys_arch.h */ #define SYS_ARCH_PROTECT(lev) lev = sys_arch_protect() -/** SYS_ARCH_UNPROTECT +/** + * @ingroup sys_prot + * SYS_ARCH_UNPROTECT * Perform a "fast" set of the protection level to "lev". This could be * implemented by setting the interrupt level to "lev" within the MACRO or by * using a semaphore or mutex. This macro will default to calling the From 7b770dd9b609865df2ae4fe2abf49de61a3f3034 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 26 Jul 2016 20:10:17 +0200 Subject: [PATCH 212/275] Document 6LoWPAN and SLIP netif --- doc/doxygen/lwip.Doxyfile | 4 +++- doc/doxygen/ppp.h | 5 ----- src/netif/lowpan6.c | 6 ++++++ src/netif/ppp/ppp.c | 6 ++++++ src/netif/slipif.c | 22 +++++++++++++--------- 5 files changed, 28 insertions(+), 15 deletions(-) delete mode 100644 doc/doxygen/ppp.h diff --git a/doc/doxygen/lwip.Doxyfile b/doc/doxygen/lwip.Doxyfile index 0b9b8122..02700559 100644 --- a/doc/doxygen/lwip.Doxyfile +++ b/doc/doxygen/lwip.Doxyfile @@ -781,7 +781,7 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = ../../src main_page.h ppp.h contrib.h +INPUT = ../../src main_page.h contrib.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -2106,6 +2106,8 @@ PREDEFINED = NO_SYS=0 \ LWIP_SO_LINGER=1 \ SO_REUSE=1 \ SO_REUSE_RXTOALL=1 \ + LWIP_HAVE_SLIPIF=1 \ + LWIP_6LOWPAN=1 \ "LWIP_DNS && LWIP_SOCKET " \ "(LWIP_DNS && LWIP_SOCKET)=1 " diff --git a/doc/doxygen/ppp.h b/doc/doxygen/ppp.h deleted file mode 100644 index 81e0856f..00000000 --- a/doc/doxygen/ppp.h +++ /dev/null @@ -1,5 +0,0 @@ -/** - * @defgroup ppp PPP - * @ingroup addons - * @verbinclude "ppp.txt" - */ diff --git a/src/netif/lowpan6.c b/src/netif/lowpan6.c index 44a71e90..b073efd4 100644 --- a/src/netif/lowpan6.c +++ b/src/netif/lowpan6.c @@ -39,6 +39,12 @@ * */ +/** + * @defgroup sixlowpan 6LowPAN netif + * @ingroup addons + * 6LowPAN netif implementation + */ + #include "netif/lowpan6.h" #if LWIP_IPV6 && LWIP_6LOWPAN diff --git a/src/netif/ppp/ppp.c b/src/netif/ppp/ppp.c index fe7d544b..d5e317cb 100644 --- a/src/netif/ppp/ppp.c +++ b/src/netif/ppp/ppp.c @@ -79,6 +79,12 @@ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ +/** + * @defgroup ppp PPP netif + * @ingroup addons + * @verbinclude "ppp.txt" + */ + #include "netif/ppp/ppp_opts.h" #if PPP_SUPPORT /* don't build if not configured for use in lwipopts.h */ diff --git a/src/netif/slipif.c b/src/netif/slipif.c index bf02475e..8849cc32 100644 --- a/src/netif/slipif.c +++ b/src/netif/slipif.c @@ -36,12 +36,21 @@ * * Author: Magnus Ivarsson * Simon Goldschmidt - * - * Usage: This netif can be used in three ways: + */ + + +/** + * @defgroup slipif SLIP netif + * @ingroup addons + * + * This is an arch independent SLIP netif. The specific serial hooks must be + * provided by another file. They are sio_open, sio_read/sio_tryread and sio_send + * + * Usage: This netif can be used in three ways:\n * 1) For NO_SYS==0, an RX thread can be used which blocks on sio_read() - * until data is received. + * until data is received.\n * 2) In your main loop, call slipif_poll() to check for new RX bytes, - * completed packets are fed into netif->input(). + * completed packets are fed into netif->input().\n * 3) Call slipif_received_byte[s]() from your serial RX ISR and * slipif_process_rxqueue() from your main loop. ISR level decodes * packets and puts completed packets on a queue which is fed into @@ -50,11 +59,6 @@ * */ -/* - * This is an arch independent SLIP netif. The specific serial hooks must be - * provided by another file. They are sio_open, sio_read/sio_tryread and sio_send - */ - #include "netif/slipif.h" #include "lwip/opt.h" From 765181a97c9d11cfa972817713d446ccc3aa39b1 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 26 Jul 2016 22:06:04 +0200 Subject: [PATCH 213/275] inet6.c was missing in Filelists.mk --- src/Filelists.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Filelists.mk b/src/Filelists.mk index 81eb1cee..b3b14ebf 100644 --- a/src/Filelists.mk +++ b/src/Filelists.mk @@ -60,6 +60,7 @@ CORE4FILES=$(LWIPDIR)/core/ipv4/autoip.c \ CORE6FILES=$(LWIPDIR)/core/ipv6/dhcp6.c \ $(LWIPDIR)/core/ipv6/ethip6.c \ $(LWIPDIR)/core/ipv6/icmp6.c \ + $(LWIPDIR)/core/ipv6/inet6.c \ $(LWIPDIR)/core/ipv6/ip6.c \ $(LWIPDIR)/core/ipv6/ip6_addr.c \ $(LWIPDIR)/core/ipv6/ip6_frag.c \ From 4a7d07a2e0c3650711dda9f3d694d333eb3765de Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 26 Jul 2016 22:06:54 +0200 Subject: [PATCH 214/275] Document netdb API, add socket functions implemented by lwip to documentation, just for reference --- src/api/netdb.c | 6 ++++++ src/include/lwip/netdb.h | 4 ++++ src/include/lwip/pbuf.h | 4 +++- src/include/lwip/sockets.h | 26 ++++++++++++++++++++++++++ 4 files changed, 39 insertions(+), 1 deletion(-) diff --git a/src/api/netdb.c b/src/api/netdb.c index 6aeab9a5..f9d63d46 100644 --- a/src/api/netdb.c +++ b/src/api/netdb.c @@ -33,6 +33,12 @@ * */ + +/** + * @defgroup netdbapi NETDB API + * @ingroup socket + */ + #include "lwip/netdb.h" #if LWIP_DNS && LWIP_SOCKET diff --git a/src/include/lwip/netdb.h b/src/include/lwip/netdb.h index 8da12c28..21688c65 100644 --- a/src/include/lwip/netdb.h +++ b/src/include/lwip/netdb.h @@ -130,10 +130,14 @@ int lwip_getaddrinfo(const char *nodename, struct addrinfo **res); #if LWIP_COMPAT_SOCKETS +/** @ingroup netdbapi */ #define gethostbyname(name) lwip_gethostbyname(name) +/** @ingroup netdbapi */ #define gethostbyname_r(name, ret, buf, buflen, result, h_errnop) \ lwip_gethostbyname_r(name, ret, buf, buflen, result, h_errnop) +/** @ingroup netdbapi */ #define freeaddrinfo(addrinfo) lwip_freeaddrinfo(addrinfo) +/** @ingroup netdbapi */ #define getaddrinfo(nodname, servname, hints, res) \ lwip_getaddrinfo(nodname, servname, hints, res) #endif /* LWIP_COMPAT_SOCKETS */ diff --git a/src/include/lwip/pbuf.h b/src/include/lwip/pbuf.h index fa31bc68..4561f62d 100644 --- a/src/include/lwip/pbuf.h +++ b/src/include/lwip/pbuf.h @@ -73,7 +73,9 @@ typedef enum { PBUF_RAW } pbuf_layer; -/** Enumeration of pbuf types +/** + * @ingroup pbuf + * Enumeration of pbuf types */ typedef enum { /** pbuf data is stored in RAM, used for TX mostly, struct pbuf and its payload diff --git a/src/include/lwip/sockets.h b/src/include/lwip/sockets.h index 5a21011c..20ba6293 100644 --- a/src/include/lwip/sockets.h +++ b/src/include/lwip/sockets.h @@ -507,39 +507,65 @@ int lwip_fcntl(int s, int cmd, int val); #if LWIP_COMPAT_SOCKETS #if LWIP_COMPAT_SOCKETS != 2 +/** @ingroup socket */ #define accept(s,addr,addrlen) lwip_accept(s,addr,addrlen) +/** @ingroup socket */ #define bind(s,name,namelen) lwip_bind(s,name,namelen) +/** @ingroup socket */ #define shutdown(s,how) lwip_shutdown(s,how) +/** @ingroup socket */ #define getpeername(s,name,namelen) lwip_getpeername(s,name,namelen) +/** @ingroup socket */ #define getsockname(s,name,namelen) lwip_getsockname(s,name,namelen) +/** @ingroup socket */ #define setsockopt(s,level,optname,opval,optlen) lwip_setsockopt(s,level,optname,opval,optlen) +/** @ingroup socket */ #define getsockopt(s,level,optname,opval,optlen) lwip_getsockopt(s,level,optname,opval,optlen) +/** @ingroup socket */ #define closesocket(s) lwip_close(s) +/** @ingroup socket */ #define connect(s,name,namelen) lwip_connect(s,name,namelen) +/** @ingroup socket */ #define listen(s,backlog) lwip_listen(s,backlog) +/** @ingroup socket */ #define recv(s,mem,len,flags) lwip_recv(s,mem,len,flags) +/** @ingroup socket */ #define recvfrom(s,mem,len,flags,from,fromlen) lwip_recvfrom(s,mem,len,flags,from,fromlen) +/** @ingroup socket */ #define send(s,dataptr,size,flags) lwip_send(s,dataptr,size,flags) +/** @ingroup socket */ #define sendmsg(s,message,flags) lwip_sendmsg(s,message,flags) +/** @ingroup socket */ #define sendto(s,dataptr,size,flags,to,tolen) lwip_sendto(s,dataptr,size,flags,to,tolen) +/** @ingroup socket */ #define socket(domain,type,protocol) lwip_socket(domain,type,protocol) +/** @ingroup socket */ #define select(maxfdp1,readset,writeset,exceptset,timeout) lwip_select(maxfdp1,readset,writeset,exceptset,timeout) +/** @ingroup socket */ #define ioctlsocket(s,cmd,argp) lwip_ioctl(s,cmd,argp) #if LWIP_POSIX_SOCKETS_IO_NAMES +/** @ingroup socket */ #define read(s,mem,len) lwip_read(s,mem,len) +/** @ingroup socket */ #define write(s,dataptr,len) lwip_write(s,dataptr,len) +/** @ingroup socket */ #define writev(s,iov,iovcnt) lwip_writev(s,iov,iovcnt) +/** @ingroup socket */ #define close(s) lwip_close(s) +/** @ingroup socket */ #define fcntl(s,cmd,val) lwip_fcntl(s,cmd,val) +/** @ingroup socket */ #define ioctl(s,cmd,argp) lwip_ioctl(s,cmd,argp) #endif /* LWIP_POSIX_SOCKETS_IO_NAMES */ #endif /* LWIP_COMPAT_SOCKETS != 2 */ #if LWIP_IPV4 && LWIP_IPV6 +/** @ingroup socket */ #define inet_ntop(af,src,dst,size) \ (((af) == AF_INET6) ? ip6addr_ntoa_r((const ip6_addr_t*)(src),(dst),(size)) \ : (((af) == AF_INET) ? ip4addr_ntoa_r((const ip4_addr_t*)(src),(dst),(size)) : NULL)) +/** @ingroup socket */ #define inet_pton(af,src,dst) \ (((af) == AF_INET6) ? ip6addr_aton((src),(ip6_addr_t*)(dst)) \ : (((af) == AF_INET) ? ip4addr_aton((src),(ip4_addr_t*)(dst)) : 0)) From 7e4d934f7a2765b85afb39b9920c0c2edb986eeb Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 26 Jul 2016 23:14:38 +0200 Subject: [PATCH 215/275] Docs: generate search index --- doc/doxygen/lwip.Doxyfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/doxygen/lwip.Doxyfile b/doc/doxygen/lwip.Doxyfile index 02700559..62cae5cd 100644 --- a/doc/doxygen/lwip.Doxyfile +++ b/doc/doxygen/lwip.Doxyfile @@ -1561,7 +1561,7 @@ MATHJAX_CODEFILE = # The default value is: YES. # This tag requires that the tag GENERATE_HTML is set to YES. -SEARCHENGINE = NO +SEARCHENGINE = YES # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a web server instead of a web client using Javascript. There From 6bce7509f7b9716ef5fa959dd399fc0bd2ad3729 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Tue, 26 Jul 2016 23:17:07 +0200 Subject: [PATCH 216/275] Fix doxygen warning in sys.h due to wrong @ref --- src/include/lwip/sys.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/include/lwip/sys.h b/src/include/lwip/sys.h index cedaf8ef..bcc7c317 100644 --- a/src/include/lwip/sys.h +++ b/src/include/lwip/sys.h @@ -1,7 +1,6 @@ /** * @file - * OS abstraction layer\n - * See also @ref sys + * OS abstraction layer */ /* From 1993b0257ca7ac07f0543a09f015c9528a8438f6 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 06:37:26 +0200 Subject: [PATCH 217/275] Document SNMP MIB2 functions --- src/apps/snmp/snmp_mib2.c | 5 +++++ src/apps/snmp/snmp_mib2_system.c | 21 +++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/apps/snmp/snmp_mib2.c b/src/apps/snmp/snmp_mib2.c index 99943886..9d8c43c1 100644 --- a/src/apps/snmp/snmp_mib2.c +++ b/src/apps/snmp/snmp_mib2.c @@ -33,6 +33,11 @@ * Christiaan Simons */ +/** + * @defgroup snmp_mib2 MIB2 + * @ingroup snmp + */ + #include "lwip/apps/snmp_opts.h" #if LWIP_SNMP && SNMP_LWIP_MIB2 /* don't build if not configured for use in lwipopts.h */ diff --git a/src/apps/snmp/snmp_mib2_system.c b/src/apps/snmp/snmp_mib2_system.c index 53707ee8..2cf88486 100644 --- a/src/apps/snmp/snmp_mib2_system.c +++ b/src/apps/snmp/snmp_mib2_system.c @@ -86,6 +86,7 @@ static u16_t* syslocation_wr_len = NULL; /* if writable, points to static u16_t syslocation_bufsize = 0; /* 0=not writable */ /** + * @ingroup snmp_mib2 * Initializes sysDescr pointers. * * @param str if non-NULL then copy str pointer @@ -101,9 +102,10 @@ snmp_mib2_set_sysdescr(const u8_t *str, const u16_t *len) } /** + * @ingroup snmp_mib2 * Initializes sysContact pointers * - * * @param ocstr if non-NULL then copy str pointer + * @param ocstr if non-NULL then copy str pointer * @param ocstrlen points to string length, excluding zero terminator. * if set to NULL it is assumed that ocstr is NULL-terminated. * @param bufsize size of the buffer in bytes. @@ -124,7 +126,10 @@ snmp_mib2_set_syscontact(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize) } } -/** see \ref snmp_mib2_set_syscontact but set pointer to readonly memory */ +/** + * @ingroup snmp_mib2 + * see \ref snmp_mib2_set_syscontact but set pointer to readonly memory + */ void snmp_mib2_set_syscontact_readonly(const u8_t *ocstr, const u16_t *ocstrlen) { @@ -139,6 +144,7 @@ snmp_mib2_set_syscontact_readonly(const u8_t *ocstr, const u16_t *ocstrlen) /** + * @ingroup snmp_mib2 * Initializes sysName pointers * * @param ocstr if non-NULL then copy str pointer @@ -162,7 +168,10 @@ snmp_mib2_set_sysname(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize) } } -/** see \ref snmp_mib2_set_sysname but set pointer to readonly memory */ +/** + * @ingroup snmp_mib2 + * see \ref snmp_mib2_set_sysname but set pointer to readonly memory + */ void snmp_mib2_set_sysname_readonly(const u8_t *ocstr, const u16_t *ocstrlen) { @@ -176,6 +185,7 @@ snmp_mib2_set_sysname_readonly(const u8_t *ocstr, const u16_t *ocstrlen) } /** + * @ingroup snmp_mib2 * Initializes sysLocation pointers * * @param ocstr if non-NULL then copy str pointer @@ -199,7 +209,10 @@ snmp_mib2_set_syslocation(u8_t *ocstr, u16_t *ocstrlen, u16_t bufsize) } } -/** see \ref snmp_mib2_set_syslocation but set pointer to readonly memory */ +/** + * @ingroup snmp_mib2 + * see \ref snmp_mib2_set_syslocation but set pointer to readonly memory + */ void snmp_mib2_set_syslocation_readonly(const u8_t *ocstr, const u16_t *ocstrlen) { From 6b524367a38b653fc440a9a0e0f3d69f526090c8 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 08:05:38 +0200 Subject: [PATCH 218/275] Documentation review with Simon, minor changes --- doc/doxygen/lwip.Doxyfile | 2 +- src/api/api_lib.c | 7 +------ src/api/netbuf.c | 4 +++- src/apps/lwiperf/lwiperf.c | 18 +++++++++++++++--- src/apps/snmp/snmp_core.c | 6 ++++++ src/core/pbuf.c | 2 +- src/core/timeouts.c | 4 +++- src/include/lwip/api.h | 1 + src/include/lwip/pbuf.h | 3 +-- src/include/lwip/sys.h | 12 +++++++----- 10 files changed, 39 insertions(+), 20 deletions(-) diff --git a/doc/doxygen/lwip.Doxyfile b/doc/doxygen/lwip.Doxyfile index 62cae5cd..62c8b901 100644 --- a/doc/doxygen/lwip.Doxyfile +++ b/doc/doxygen/lwip.Doxyfile @@ -614,7 +614,7 @@ STRICT_PROTO_MATCHING = NO # list. This list is created by putting \todo commands in the documentation. # The default value is: YES. -GENERATE_TODOLIST = YES +GENERATE_TODOLIST = NO # The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test # list. This list is created by putting \test commands in the documentation. diff --git a/src/api/api_lib.c b/src/api/api_lib.c index 778cacb4..5e696d88 100644 --- a/src/api/api_lib.c +++ b/src/api/api_lib.c @@ -52,10 +52,6 @@ * @defgroup netconn_udp UDP only * @ingroup netconn * UDP only functions - * - * @defgroup netconn_dns DNS - * @ingroup netconn - * DNS lookup */ /* This is the part of the API that is linked with @@ -204,7 +200,6 @@ netconn_delete(struct netconn *conn) } /** - * @ingroup netconn_tcp * Get the local or remote IP address and port of a netconn. * For RAW netconns, this returns the protocol instead of a port! * @@ -893,7 +888,7 @@ netconn_join_leave_group(struct netconn *conn, #if LWIP_DNS /** - * @ingroup netconn_dns + * @ingroup netconn_common * Execute a DNS query, only one IP address is returned * * @param name a string representation of the DNS host name to query diff --git a/src/api/netbuf.c b/src/api/netbuf.c index 119ddafc..342717be 100644 --- a/src/api/netbuf.c +++ b/src/api/netbuf.c @@ -40,7 +40,9 @@ * @defgroup netbuf Network buffers * @ingroup netconn * Network buffer descriptor for @ref netconn. Based on @ref pbuf internally - * to avoid copying data around. + * to avoid copying data around.\n + * Buffers must not be shared accross multiple threads, all functions except + * netbuf_new() and netbuf_delete() are not thread-safe. */ #include "lwip/opt.h" diff --git a/src/apps/lwiperf/lwiperf.c b/src/apps/lwiperf/lwiperf.c index 5525420c..cef0d728 100644 --- a/src/apps/lwiperf/lwiperf.c +++ b/src/apps/lwiperf/lwiperf.c @@ -1,6 +1,11 @@ /** * @file * LWIP iperf server implementation + */ + +/** + * @defgroup iperf Iperf server + * @ingroup apps * * This is simple "Iperf" server to check your bandwith using Iperf on a PC as client. * It is currently a minimal implementation providing an IPv4 TCP server only. @@ -562,7 +567,9 @@ lwiperf_tcp_accept(void *arg, struct tcp_pcb *newpcb, err_t err) return ERR_OK; } -/** Start a TCP iperf server on the default TCP port (5001) and listen for +/** + * @ingroup iperf + * Start a TCP iperf server on the default TCP port (5001) and listen for * incoming connections from iperf clients. * * @returns a connection handle that can be used to abort the server @@ -575,7 +582,9 @@ lwiperf_start_tcp_server_default(lwiperf_report_fn report_fn, void* report_arg) report_fn, report_arg); } -/** Start a TCP iperf server on a specific IP address and port and listen for +/** + * @ingroup iperf + * Start a TCP iperf server on a specific IP address and port and listen for * incoming connections from iperf clients. * * @returns a connection handle that can be used to abort the server @@ -626,7 +635,10 @@ lwiperf_start_tcp_server(const ip_addr_t* local_addr, u16_t local_port, return s; } -/** Abort an iperf session (handle returned by lwiperf_start_tcp_server*()) */ +/** + * @ingroup iperf + * Abort an iperf session (handle returned by lwiperf_start_tcp_server*()) + */ void lwiperf_abort(void* lwiperf_session) { diff --git a/src/apps/snmp/snmp_core.c b/src/apps/snmp/snmp_core.c index 77883969..328b0881 100644 --- a/src/apps/snmp/snmp_core.c +++ b/src/apps/snmp/snmp_core.c @@ -36,6 +36,12 @@ /** * @defgroup snmp SNMPv2c agent * @ingroup apps + * SNMPv2c compatible agent\n + * There is also a MIB compiler and a MIB viewer included in this project.\n + * The agent implements the most important MIB2 MIBs including IPv6 support + * (interfaces, UDP, TCP, SNMP, ICMP, SYSTEM). IP MIB is an older version + * whithout IPv6 statistics (TODO).\n + * Work on SNMPv3 has started, but is not finished. * * @defgroup snmp_core Core * @ingroup snmp diff --git a/src/core/pbuf.c b/src/core/pbuf.c index 21bb8f0d..671397cd 100644 --- a/src/core/pbuf.c +++ b/src/core/pbuf.c @@ -4,7 +4,7 @@ */ /** - * @defgroup pbuf Payload buffers (PBUF) + * @defgroup pbuf Packet buffers (PBUF) * @ingroup infrastructure * * Packets are built from the pbuf data structure. It supports dynamic diff --git a/src/core/timeouts.c b/src/core/timeouts.c index a5184a3b..6cee767e 100644 --- a/src/core/timeouts.c +++ b/src/core/timeouts.c @@ -292,7 +292,9 @@ sys_untimeout(sys_timeout_handler handler, void *arg) return; } -/** Handle timeouts for NO_SYS==1 (i.e. without using +/** + * @ingroup lwip + * Handle timeouts for NO_SYS==1 (i.e. without using * tcpip_thread/sys_timeouts_mbox_fetch(). Uses sys_now() to call timeout * handler functions when timeouts expire. * diff --git a/src/include/lwip/api.h b/src/include/lwip/api.h index bbe45713..8c07fed5 100644 --- a/src/include/lwip/api.h +++ b/src/include/lwip/api.h @@ -275,6 +275,7 @@ err_t netconn_bind(struct netconn *conn, const ip_addr_t *addr, u16_t port); err_t netconn_connect(struct netconn *conn, const ip_addr_t *addr, u16_t port); err_t netconn_disconnect (struct netconn *conn); err_t netconn_listen_with_backlog(struct netconn *conn, u8_t backlog); +/** @ingroup netconn_tcp */ #define netconn_listen(conn) netconn_listen_with_backlog(conn, TCP_DEFAULT_LISTEN_BACKLOG) err_t netconn_accept(struct netconn *conn, struct netconn **new_conn); err_t netconn_recv(struct netconn *conn, struct netbuf **new_buf); diff --git a/src/include/lwip/pbuf.h b/src/include/lwip/pbuf.h index 4561f62d..a3a761f5 100644 --- a/src/include/lwip/pbuf.h +++ b/src/include/lwip/pbuf.h @@ -114,8 +114,7 @@ typedef enum { /** indicates this pbuf includes a TCP FIN flag */ #define PBUF_FLAG_TCP_FIN 0x20U -/** Main payload buffer struct - */ +/** Main packet buffer struct */ struct pbuf { /** next pbuf in singly linked pbuf chain */ struct pbuf *next; diff --git a/src/include/lwip/sys.h b/src/include/lwip/sys.h index bcc7c317..5235e1eb 100644 --- a/src/include/lwip/sys.h +++ b/src/include/lwip/sys.h @@ -39,14 +39,17 @@ * @ingroup infrastructure * @verbinclude "sys_arch.txt" * - * @defgroup sys_sem Semaphores + * @defgroup sys_os OS abstraction layer * @ingroup sys_layer * + * @defgroup sys_sem Semaphores + * @ingroup sys_os + * * @defgroup sys_mutex Mutexes - * @ingroup sys_layer + * @ingroup sys_os * * @defgroup sys_mbox Mailboxes - * @ingroup sys_layer + * @ingroup sys_os * * @defgroup sys_time Time * @ingroup sys_layer @@ -55,7 +58,7 @@ * @ingroup sys_layer * * @defgroup sys_thread Threads - * @ingroup sys_layer + * @ingroup sys_os */ #ifndef LWIP_HDR_SYS_H @@ -359,7 +362,6 @@ void sys_init(void); #ifndef sys_jiffies /** - * @ingroup sys_time * Ticks/jiffies since power up. */ u32_t sys_jiffies(void); From 66181893422aa393773b068549d98ecb8bcd880e Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 08:21:54 +0200 Subject: [PATCH 219/275] Add UPGRADING document to doxygen docs --- doc/doxygen/lwip.Doxyfile | 4 ++-- doc/doxygen/upgrading.h | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 doc/doxygen/upgrading.h diff --git a/doc/doxygen/lwip.Doxyfile b/doc/doxygen/lwip.Doxyfile index 62c8b901..9fe0a635 100644 --- a/doc/doxygen/lwip.Doxyfile +++ b/doc/doxygen/lwip.Doxyfile @@ -781,7 +781,7 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = ../../src main_page.h contrib.h +INPUT = ../../src main_page.h contrib.h upgrading.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -875,7 +875,7 @@ EXCLUDE_SYMBOLS = # that contain example code fragments that are included (see the \include # command). -EXAMPLE_PATH = ../ +EXAMPLE_PATH = ../ ../../ # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and diff --git a/doc/doxygen/upgrading.h b/doc/doxygen/upgrading.h new file mode 100644 index 00000000..73706140 --- /dev/null +++ b/doc/doxygen/upgrading.h @@ -0,0 +1,4 @@ +/** + * @page upgrading Upgrading + * @verbinclude "UPGRADING" + */ \ No newline at end of file From af97f9b239a98c13701aa307b256017306c005c7 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Wed, 27 Jul 2016 08:26:42 +0200 Subject: [PATCH 220/275] fixed gcc compiler error in do_memp_free_pool(): obviously, SYS_ARCH_DECL_PROTECT() must be the last declaration... --- src/core/memp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/memp.c b/src/core/memp.c index 7ac52a11..aca4b5e1 100644 --- a/src/core/memp.c +++ b/src/core/memp.c @@ -423,8 +423,8 @@ memp_malloc_fn(memp_t type, const char* file, const int line) static void do_memp_free_pool(const struct memp_desc* desc, void *mem) { - SYS_ARCH_DECL_PROTECT(old_level); struct memp *memp; + SYS_ARCH_DECL_PROTECT(old_level); LWIP_ASSERT("memp_free: mem properly aligned", ((mem_ptr_t)mem % MEM_ALIGNMENT) == 0); From ccc830c99c623202c56b881f9ad674f5c2fc5168 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 13:03:36 +0200 Subject: [PATCH 221/275] Work on lwIP documentation --- src/api/tcpip.c | 6 ++++-- src/core/dns.c | 2 +- src/core/init.c | 19 +++++++++++++++++-- src/core/ip.c | 6 +++++- src/core/timeouts.c | 2 +- src/include/lwip/sys.h | 13 ++++++++++++- src/include/lwip/tcpip.h | 2 +- src/netif/ethernet.c | 4 +++- 8 files changed, 44 insertions(+), 10 deletions(-) diff --git a/src/api/tcpip.c b/src/api/tcpip.c index d9fcc700..5ab26584 100644 --- a/src/api/tcpip.c +++ b/src/api/tcpip.c @@ -190,8 +190,10 @@ tcpip_inpkt(struct pbuf *p, struct netif *inp, netif_input_fn input_fn) } /** + * @ingroup lwip_os * Pass a received packet to tcpip_thread for input processing with - * ethernet_input or ip_input + * ethernet_input or ip_input. Don't call directly, pass to netif_add() + * and call netif->input(). * * @param p the received packet, p->payload pointing to the Ethernet header or * to an IP header (if inp doesn't have NETIF_FLAG_ETHARP or @@ -441,7 +443,7 @@ tcpip_trycallback(struct tcpip_callback_msg* msg) } /** - * @ingroup lwip + * @ingroup lwip_os * Initialize this module: * - initialize all sub modules * - start the tcpip_thread diff --git a/src/core/dns.c b/src/core/dns.c index 75cf12ee..9aed4733 100644 --- a/src/core/dns.c +++ b/src/core/dns.c @@ -62,7 +62,7 @@ * * All functions must be called from TCPIP thread. * - * @see @ref netconn_dns + * @see @ref netconn_common for thread-safe access. */ /*----------------------------------------------------------------------------- diff --git a/src/core/init.c b/src/core/init.c index 8b8cf37c..3dfd9fc1 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -37,7 +37,22 @@ /** * @defgroup lwip lwIP - * @ingroup infrastructure + * + * @defgroup lwip_nosys NO_SYS ("mainloop") mode + * @ingroup lwip + * Use this mode if you do not run an OS on your system. \#define NO_SYS to 1. + * Feed incoming packets to netif->input(pbuf, netif) function from mainloop, + * *not* *from* *interrupt* *context*. You can allocate a @ref pbuf in interrupt + * context and put it in a queue which is processed from mainloop.\n + * Call sys_check_timeouts() periodically in the mainloop.\n + * Porting: implement all functions in @ref sys_time and @ref sys_prot. + * + * @defgroup lwip_os OS mode (TCPIP thread) + * @ingroup lwip + * Use this mode if you run an OS on your system. It is recommended to + * use an RTOS that correctly handles priority inversion and + * to use LWIP_TCPIP_CORE_LOCKING.\n + * Porting: implement all functions in @ref sys_layer. */ #include "lwip/opt.h" @@ -322,7 +337,7 @@ #endif /* !LWIP_DISABLE_TCP_SANITY_CHECKS */ /** - * @ingroup lwip + * @ingroup lwip_nosys * Initialize all modules. * Use this in NO_SYS mode. Use tcpip_init() otherwise. */ diff --git a/src/core/ip.c b/src/core/ip.c index b6e493b9..a1685e3a 100644 --- a/src/core/ip.c +++ b/src/core/ip.c @@ -102,7 +102,11 @@ ipaddr_aton(const char *cp, ip_addr_t *addr) return 0; } -/* If both IP versions are enabled, this function can dispatch packets to the correct one. */ +/** + * @ingroup lwip_nosys + * If both IP versions are enabled, this function can dispatch packets to the correct one. + * Don't call directly, pass to netif_add() and call netif->input(). + */ err_t ip_input(struct pbuf *p, struct netif *inp) { diff --git a/src/core/timeouts.c b/src/core/timeouts.c index 6cee767e..6e16e949 100644 --- a/src/core/timeouts.c +++ b/src/core/timeouts.c @@ -293,7 +293,7 @@ sys_untimeout(sys_timeout_handler handler, void *arg) } /** - * @ingroup lwip + * @ingroup lwip_nosys * Handle timeouts for NO_SYS==1 (i.e. without using * tcpip_thread/sys_timeouts_mbox_fetch(). Uses sys_now() to call timeout * handler functions when timeouts expire. diff --git a/src/include/lwip/sys.h b/src/include/lwip/sys.h index 5235e1eb..6e602550 100644 --- a/src/include/lwip/sys.h +++ b/src/include/lwip/sys.h @@ -41,12 +41,15 @@ * * @defgroup sys_os OS abstraction layer * @ingroup sys_layer + * No need to implement functions in this section in NO_SYS mode. * * @defgroup sys_sem Semaphores * @ingroup sys_os * * @defgroup sys_mutex Mutexes * @ingroup sys_os + * Mutexes are recommended to correctly handle priority inversion, + * especially if you use LWIP_CORE_LOCKING . * * @defgroup sys_mbox Mailboxes * @ingroup sys_os @@ -56,6 +59,14 @@ * * @defgroup sys_prot Critical sections * @ingroup sys_layer + * Used to protect short regions of code against concurrent access. + * - Your system is a bare-metal system (probably with an RTOS) + * and interrupts are under your control: + * Implement this as LockInterrupts() / UnlockInterrupts() + * - Your system uses an RTOS with deferred interrupt handling from a + * worker thread: Implement as a global mutex or lock/unlock scheduler + * - Your system uses a high-level OS with e.g. POSIX signals: + * Implement as a global mutex * * @defgroup sys_thread Threads * @ingroup sys_os @@ -250,7 +261,7 @@ void sys_sem_set_invalid(sys_sem_t *sem); #ifndef sys_msleep /** - * @ingroup sys_time + * @ingroup sys_os * Sleep for specified number of ms */ void sys_msleep(u32_t ms); /* only has a (close to) 1 ms resolution. */ diff --git a/src/include/lwip/tcpip.h b/src/include/lwip/tcpip.h index 29184bfa..796f34aa 100644 --- a/src/include/lwip/tcpip.h +++ b/src/include/lwip/tcpip.h @@ -77,7 +77,7 @@ err_t tcpip_input(struct pbuf *p, struct netif *inp); err_t tcpip_callback_with_block(tcpip_callback_fn function, void *ctx, u8_t block); /** - * @ingroup lwip + * @ingroup lwip_os * @see tcpip_callback_with_block */ #define tcpip_callback(f, ctx) tcpip_callback_with_block(f, ctx, 1) diff --git a/src/netif/ethernet.c b/src/netif/ethernet.c index ebcc54d8..26e360af 100644 --- a/src/netif/ethernet.c +++ b/src/netif/ethernet.c @@ -57,9 +57,11 @@ const struct eth_addr ethbroadcast = {{0xff,0xff,0xff,0xff,0xff,0xff}}; const struct eth_addr ethzero = {{0,0,0,0,0,0}}; /** + * @ingroup lwip_nosys * Process received ethernet frames. Using this function instead of directly * calling ip_input and passing ARP frames through etharp in ethernetif_input, - * the ARP cache is protected from concurrent access. + * the ARP cache is protected from concurrent access.\n + * Don't call directly, pass to netif_add() and call netif->input(). * * @param p the received packet, p->payload pointing to the ethernet header * @param netif the network interface on which the packet was received From fc7aa7a247791e07df80e90e57ee4487f815cd8d Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 13:07:29 +0200 Subject: [PATCH 222/275] Move content from contrib.h and upgrading.h to main_page.h --- doc/doxygen/contrib.h | 4 ---- doc/doxygen/lwip.Doxyfile | 2 +- doc/doxygen/main_page.h | 10 ++++++++++ doc/doxygen/upgrading.h | 4 ---- 4 files changed, 11 insertions(+), 9 deletions(-) delete mode 100644 doc/doxygen/contrib.h delete mode 100644 doc/doxygen/upgrading.h diff --git a/doc/doxygen/contrib.h b/doc/doxygen/contrib.h deleted file mode 100644 index 11643666..00000000 --- a/doc/doxygen/contrib.h +++ /dev/null @@ -1,4 +0,0 @@ -/** - * @page contrib How to contribute to lwIP - * @verbinclude "contrib.txt" - */ diff --git a/doc/doxygen/lwip.Doxyfile b/doc/doxygen/lwip.Doxyfile index 9fe0a635..a32c3278 100644 --- a/doc/doxygen/lwip.Doxyfile +++ b/doc/doxygen/lwip.Doxyfile @@ -781,7 +781,7 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = ../../src main_page.h contrib.h upgrading.h +INPUT = ../../src main_page.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/doc/doxygen/main_page.h b/doc/doxygen/main_page.h index c13a1d9d..9afe33ee 100644 --- a/doc/doxygen/main_page.h +++ b/doc/doxygen/main_page.h @@ -14,6 +14,16 @@ * @defgroup apps Applications */ + /** + * @page contrib How to contribute to lwIP + * @verbinclude "contrib.txt" + */ + + /** + * @page upgrading Upgrading + * @verbinclude "UPGRADING" + */ + /*! \mainpage lwIP Documentation * * \section intro_sec Introduction diff --git a/doc/doxygen/upgrading.h b/doc/doxygen/upgrading.h deleted file mode 100644 index 73706140..00000000 --- a/doc/doxygen/upgrading.h +++ /dev/null @@ -1,4 +0,0 @@ -/** - * @page upgrading Upgrading - * @verbinclude "UPGRADING" - */ \ No newline at end of file From ef5c1b659059fcb1c1a213b26f8d440e27babc04 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 13:09:33 +0200 Subject: [PATCH 223/275] Work on lwIP documentation --- src/core/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/init.c b/src/core/init.c index 3dfd9fc1..72e297d6 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -43,7 +43,7 @@ * Use this mode if you do not run an OS on your system. \#define NO_SYS to 1. * Feed incoming packets to netif->input(pbuf, netif) function from mainloop, * *not* *from* *interrupt* *context*. You can allocate a @ref pbuf in interrupt - * context and put it in a queue which is processed from mainloop.\n + * context and put them into a queue which is processed from mainloop.\n * Call sys_check_timeouts() periodically in the mainloop.\n * Porting: implement all functions in @ref sys_time and @ref sys_prot. * From 6c7eef7ac0ae1f773f4208ecbeb02948ce1a99a7 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 13:14:31 +0200 Subject: [PATCH 224/275] More documentation updates --- src/core/init.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/init.c b/src/core/init.c index 72e297d6..ab11c576 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -45,14 +45,17 @@ * *not* *from* *interrupt* *context*. You can allocate a @ref pbuf in interrupt * context and put them into a queue which is processed from mainloop.\n * Call sys_check_timeouts() periodically in the mainloop.\n - * Porting: implement all functions in @ref sys_time and @ref sys_prot. + * Porting: implement all functions in @ref sys_time and @ref sys_prot.\n + * You can only use @ref callbackstyle_api in this mode. * * @defgroup lwip_os OS mode (TCPIP thread) * @ingroup lwip * Use this mode if you run an OS on your system. It is recommended to * use an RTOS that correctly handles priority inversion and * to use LWIP_TCPIP_CORE_LOCKING.\n - * Porting: implement all functions in @ref sys_layer. + * Porting: implement all functions in @ref sys_layer.\n + * You can use @ref callbackstyle_api together with \#define tcpip_callback, + * and all @ref threadsafe_api. */ #include "lwip/opt.h" From 0b5c393361a3a4051694728b1448cc254f1a6583 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 13:16:24 +0200 Subject: [PATCH 225/275] Improve documentation grouping in sys abstraction layer --- src/include/lwip/sys.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/include/lwip/sys.h b/src/include/lwip/sys.h index 6e602550..c05af04e 100644 --- a/src/include/lwip/sys.h +++ b/src/include/lwip/sys.h @@ -68,7 +68,7 @@ * - Your system uses a high-level OS with e.g. POSIX signals: * Implement as a global mutex * - * @defgroup sys_thread Threads + * @defgroup sys_misc Misc * @ingroup sys_os */ @@ -261,7 +261,7 @@ void sys_sem_set_invalid(sys_sem_t *sem); #ifndef sys_msleep /** - * @ingroup sys_os + * @ingroup sys_misc * Sleep for specified number of ms */ void sys_msleep(u32_t ms); /* only has a (close to) 1 ms resolution. */ @@ -355,7 +355,7 @@ void sys_mbox_set_invalid(sys_mbox_t *mbox); /** - * @ingroup sys_thread + * @ingroup sys_misc * The only thread function: * Creates a new thread * ATTENTION: although this function returns a value, it MUST NOT FAIL (ports have to assert this!) From 9305bf2ace4fb2fb9bd5fe4a9dcfb328ab892565 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 13:41:41 +0200 Subject: [PATCH 226/275] Add doxygen changes to changelog --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 1451092f..bd71cc17 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,9 @@ HISTORY ++ New features: + 2016-07-xx: Dirk Ziegelmeier: + * Large overhaul of doxygen documentation + 2016-04-05: Simon Goldschmidt: * timers.h/.c: prepare for overriding current timeout implementation: all stack-internal caclic timers are avaliable in the lwip_cyclic_timers array From eb3261d6e0647f7f4839de324508e183f63c0b03 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 13:46:54 +0200 Subject: [PATCH 227/275] Add some more TCP RAW API functions to documentation --- src/core/tcp.c | 1 - src/include/lwip/tcp.h | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/tcp.c b/src/core/tcp.c index e7281498..37348281 100644 --- a/src/core/tcp.c +++ b/src/core/tcp.c @@ -1782,7 +1782,6 @@ tcp_pcb_purge(struct tcp_pcb *pcb) } /** - * @ingroup tcp_raw * Purges the PCB and removes it from a PCB list. Any delayed ACKs are sent first. * * @param pcblist PCB list to purge. diff --git a/src/include/lwip/tcp.h b/src/include/lwip/tcp.h index 395692ac..0ae49a0f 100644 --- a/src/include/lwip/tcp.h +++ b/src/include/lwip/tcp.h @@ -359,8 +359,11 @@ void tcp_err (struct tcp_pcb *pcb, tcp_err_fn err); #define tcp_mss(pcb) (((pcb)->flags & TF_TIMESTAMP) ? ((pcb)->mss - 12) : (pcb)->mss) #define tcp_sndbuf(pcb) (TCPWND16((pcb)->snd_buf)) #define tcp_sndqueuelen(pcb) ((pcb)->snd_queuelen) +/** @ingroup tcp_raw */ #define tcp_nagle_disable(pcb) ((pcb)->flags |= TF_NODELAY) +/** @ingroup tcp_raw */ #define tcp_nagle_enable(pcb) ((pcb)->flags = (tcpflags_t)((pcb)->flags & ~TF_NODELAY)) +/** @ingroup tcp_raw */ #define tcp_nagle_disabled(pcb) (((pcb)->flags & TF_NODELAY) != 0) #if TCP_LISTEN_BACKLOG @@ -383,6 +386,7 @@ err_t tcp_connect (struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port, tcp_connected_fn connected); struct tcp_pcb * tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog); +/** @ingroup tcp_raw */ #define tcp_listen(pcb) tcp_listen_with_backlog(pcb, TCP_DEFAULT_LISTEN_BACKLOG) void tcp_abort (struct tcp_pcb *pcb); From aece68639a46ad324fec4f29cf476e138a1077cb Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 18:58:28 +0200 Subject: [PATCH 228/275] Integrate snmp_agent.txt in doxygen documentation, delete outdated file --- doc/snmp_agent.txt | 168 -------------------------------------- src/apps/snmp/snmp_core.c | 80 ++++++++++++++++++ 2 files changed, 80 insertions(+), 168 deletions(-) delete mode 100644 doc/snmp_agent.txt diff --git a/doc/snmp_agent.txt b/doc/snmp_agent.txt deleted file mode 100644 index 224a986d..00000000 --- a/doc/snmp_agent.txt +++ /dev/null @@ -1,168 +0,0 @@ -* THIS DOCUMENTATION IS OUTDATED * -It was written before the agent was largely rewritten in 2015. - -SNMPv1 agent for lwIP - -Author: Christiaan Simons - -This is a brief introduction how to use and configure the SNMP agent. -Note the agent uses the raw-API UDP interface so you may also want to -read rawapi.txt to gain a better understanding of the SNMP message handling. - -0 Agent Capabilities -==================== - -SNMPv1 per RFC1157 - This is an old(er) standard but is still widely supported. - For SNMPv2c and v3 have a greater complexity and need many - more lines of code. IMHO this breaks the idea of "lightweight IP". - - Note the S in SNMP stands for "Simple". Note that "Simple" is - relative. SNMP is simple compared to the complex ISO network - management protocols CMIP (Common Management Information Protocol) - and CMOT (CMip Over Tcp). - -MIB II per RFC1213 - The standard lwIP stack management information base. - This is a required MIB, so this is always enabled. - When builing lwIP without TCP, the mib-2.tcp group is omitted. - The groups EGP, CMOT and transmission are disabled by default. - - Most mib-2 objects are not writable except: - sysName, sysLocation, sysContact, snmpEnableAuthenTraps. - Writing to or changing the ARP and IP address and route - tables is not possible. - - Note lwIP has a very limited notion of IP routing. It currently - doen't have a route table and doesn't have a notion of the U,G,H flags. - Instead lwIP uses the interface list with only one default interface - acting as a single gateway interface (G) for the default route. - - The agent returns a "virtual table" with the default route 0.0.0.0 - for the default interface and network routes (no H) for each - network interface in the netif_list. - All routes are considered to be up (U). - -Loading additional MIBs - MIBs can only be added in compile-time, not in run-time. - There is no MIB compiler thus additional MIBs must be hand coded. - -Large SNMP message support - The packet decoding and encoding routines are designed - to use pbuf-chains. Larger payloads than the minimum - SNMP requirement of 484 octets are supported if the - PBUF_POOL_SIZE and IP_REASS_BUFSIZE are set to match your - local requirement. - -1 Building the Agent -==================== - -First of all you'll need to add the following define -to your local lwipopts.h: - -#define LWIP_SNMP 1 - -and add the source files in lwip/src/core/snmp -and some snmp headers in lwip/src/include/lwip to your makefile. - -Note you'll might need to adapt you network driver to update -the mib2 variables for your interface. - -2 Running the Agent -=================== - -The following function calls must be made in your program to -actually get the SNMP agent running. - -Before starting the agent you should supply pointers -to non-volatile memory for sysContact, sysLocation, -and snmpEnableAuthenTraps. You can do this by calling - -snmp_set_syscontact() -snmp_set_syslocation() -snmp_set_snmpenableauthentraps() - -Additionally you may want to set - -snmp_set_sysdescr() -snmp_set_sysobjid() (if you have a private MIB) -snmp_set_sysname() - -Also before starting the agent you need to setup -one or more trap destinations using these calls: - -snmp_trap_dst_enable(); -snmp_trap_dst_ip_set(); - - -3 Private MIBs -============== - -If want to extend the agent with your own private MIB you'll need to -add the following define to your local lwipopts.h: - -#define SNMP_PRIVATE_MIB 1 - -You must provide the private_mib.h and associated files yourself. -Note we don't have a "MIB compiler" that generates C source from a MIB, -so you're required to do some serious coding if you enable this! - -Note the lwIP enterprise ID (26381) is assigned to the lwIP project, -ALL OBJECT IDENTIFIERS LIVING UNDER THIS ID ARE ASSIGNED BY THE lwIP -MAINTAINERS! - -If you need to create your own private MIB you'll need -to apply for your own enterprise ID with IANA: http://www.iana.org/numbers.html - -You can set it by passing a struct snmp_obj_id to the agent -using snmp_set_sysobjid(&my_object_id), just before snmp_init(). - -Note the object identifiers for thes MIB-2 and your private MIB -tree must be kept in sorted ascending (lexicographical) order. -This to ensure correct getnext operation. - -An example for a private MIB is part of the "minimal Unix" project: -contrib/ports/unix/proj/minimal/lwip_prvmib.c - -The next chapter gives a more detailed description of the -MIB-2 tree and the optional private MIB. - -4 The Gory Details -================== - -4.0 Object identifiers and the MIB tree. - -We have three distinct parts for all object identifiers: - -The prefix - .iso.org.dod.internet - -the middle part - .mgmt.mib-2.ip.ipNetToMediaTable.ipNetToMediaEntry.ipNetToMediaPhysAddress - -and the index part - .1.192.168.0.1 - -Objects located above the .internet hierarchy aren't supported. -Currently only the .mgmt sub-tree is available and -when the SNMP_PRIVATE_MIB is enabled the .private tree -becomes available too. - -Object identifiers from incoming requests are checked -for a matching prefix, middle part and index part -or are expanded(*) for GetNext requests with short -or inexisting names in the request. -(* we call this "expansion" but this also -resembles the "auto-completion" operation) - -The middle part is usually located in ROM (const) -to preserve precious RAM on small microcontrollers. -However RAM location is possible for a dynamically -changing private tree. - -The index part is handled by functions which in -turn use dynamically allocated index trees from RAM. -These trees are updated by e.g. the etharp code -when new entries are made or removed form the ARP cache. - -/** @todo more gory details */ diff --git a/src/apps/snmp/snmp_core.c b/src/apps/snmp/snmp_core.c index 328b0881..5c8b42fe 100644 --- a/src/apps/snmp/snmp_core.c +++ b/src/apps/snmp/snmp_core.c @@ -42,7 +42,87 @@ * (interfaces, UDP, TCP, SNMP, ICMP, SYSTEM). IP MIB is an older version * whithout IPv6 statistics (TODO).\n * Work on SNMPv3 has started, but is not finished. + * + * 0 Agent Capabilities + * ==================== * + * SNMPv1 per RFC1157 and SNMPv2c per RFC 3416 + * ------------------------------------------- + * Note the S in SNMP stands for "Simple". Note that "Simple" is + * relative. SNMP is simple compared to the complex ISO network + * management protocols CMIP (Common Management Information Protocol) + * and CMOT (CMip Over Tcp). + * + * MIB II + * ------ + * The standard lwIP stack management information base. + * This is a required MIB, so this is always enabled. + * The groups EGP, CMOT and transmission are disabled by default. + * + * Most mib-2 objects are not writable except: + * sysName, sysLocation, sysContact, snmpEnableAuthenTraps. + * Writing to or changing the ARP and IP address and route + * tables is not possible. + * + * Note lwIP has a very limited notion of IP routing. It currently + * doen't have a route table and doesn't have a notion of the U,G,H flags. + * Instead lwIP uses the interface list with only one default interface + * acting as a single gateway interface (G) for the default route. + * + * The agent returns a "virtual table" with the default route 0.0.0.0 + * for the default interface and network routes (no H) for each + * network interface in the netif_list. + * All routes are considered to be up (U). + * + * Loading additional MIBs + * ----------------------- + * MIBs can only be added in compile-time, not in run-time. + * + * + * 1 Building the Agent + * ==================== + * First of all you'll need to add the following define + * to your local lwipopts.h: + * \#define LWIP_SNMP 1 + * + * and add the source files your makefile. + * + * Note you'll might need to adapt you network driver to update + * the mib2 variables for your interface. + * + * 2 Running the Agent + * =================== + * The following function calls must be made in your program to + * actually get the SNMP agent running. + * + * Before starting the agent you should supply pointers + * for sysContact, sysLocation, and snmpEnableAuthenTraps. + * You can do this by calling + * + * - snmp_mib2_set_syscontact() + * - snmp_mib2_set_syslocation() + * - snmp_set_auth_traps_enabled() + * + * You can register a callback which is called on successful write access: + * snmp_set_write_callback(). + * + * Additionally you may want to set + * + * - snmp_mib2_set_sysdescr() + * - snmp_set_device_enterprise_oid() + * - snmp_mib2_set_sysname() + * + * Also before starting the agent you need to setup + * one or more trap destinations using these calls: + * + * - snmp_trap_dst_enable() + * - snmp_trap_dst_ip_set() + * + * If you need more than MIB2, set the MIBs you want to use + * by snmp_set_mibs(). + * + * Finally, enable the agent by calling snmp_init() + * * @defgroup snmp_core Core * @ingroup snmp * From 0cb1d1144dc66e5bb81bdc3dd9d3e50d2305c4b0 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 19:09:52 +0200 Subject: [PATCH 229/275] Integrate README file into doxygen docs instead of duplicating its content in main_page.h --- README | 41 ++++++++++++++--------- doc/doxygen/main_page.h | 72 ++++++----------------------------------- src/core/init.c | 2 -- 3 files changed, 36 insertions(+), 79 deletions(-) diff --git a/README b/README index 495556ef..fb881317 100644 --- a/README +++ b/README @@ -10,28 +10,38 @@ while still having a full scale TCP. This making lwIP suitable for use in embedded systems with tens of kilobytes of free RAM and room for around 40 kilobytes of code ROM. + FEATURES - * IP (Internet Protocol) including packet forwarding over multiple network - interfaces + * IP (Internet Protocol, IPv4 and IPv6) including packet forwarding over + multiple network interfaces * ICMP (Internet Control Message Protocol) for network maintenance and debugging * IGMP (Internet Group Management Protocol) for multicast traffic management + * MLD (Multicast listener discovery for IPv6). Aims to be compliant with + RFC 2710. No support for MLDv2 + * ND (Neighbor discovery and stateless address autoconfiguration for IPv6). + Aims to be compliant with RFC 4861 (Neighbor discovery) and RFC 4862 + (Address autoconfiguration) * UDP (User Datagram Protocol) including experimental UDP-lite extensions * TCP (Transmission Control Protocol) with congestion control, RTT estimation and fast recovery/fast retransmit - * Specialized raw/native API for enhanced performance + * raw/native API for enhanced performance * Optional Berkeley-like socket API * DNS (Domain names resolver) - * SNMP (Simple Network Management Protocol) - * DHCP (Dynamic Host Configuration Protocol) - * AUTOIP (for IPv4, conform with RFC 3927) - * PPP (Point-to-Point Protocol) - * ARP (Address Resolution Protocol) for Ethernet + + +APPLICATIONS + + * HTTP server with SSI and CGI + * SNMPv2c agent with MIB compiler (Simple Network Management Protocol) + * SNTP (Simple network time protocol) + LICENSE lwIP is freely available under a BSD license. + DEVELOPMENT lwIP has grown into an excellent TCP/IP stack for embedded devices, @@ -57,15 +67,14 @@ The current Git trees are web-browsable: Submit patches and bugs via the lwIP project page: http://savannah.nongnu.org/projects/lwip/ +Continuous integration builds (GCC, clang): + https://travis-ci.org/yarrick/lwip-merged + DOCUMENTATION -The original out-dated homepage of lwIP and Adam Dunkels' papers on -lwIP are at the official lwIP home page: - http://www.sics.se/~adam/lwip/ - -Self documentation of the source code is regularly extracted from the -current Git sources and is available from this web page: +Self documentation of the source code is regularly extracted from the current +Git sources and is available from this web page: http://www.nongnu.org/lwip/ There is now a constantly growin wiki about lwIP at @@ -77,10 +86,12 @@ plus searchable archives: http://lists.nongnu.org/archive/html/lwip-users/ http://lists.nongnu.org/archive/html/lwip-devel/ +lwIP was originally written by Adam Dunkels: + http://dunkels.com/adam/ + Reading Adam's papers, the files in docs/, browsing the source code documentation and browsing the mailing list archives is a good way to become familiar with the design of lwIP. Adam Dunkels Leon Woestenberg - diff --git a/doc/doxygen/main_page.h b/doc/doxygen/main_page.h index 9afe33ee..a52b8913 100644 --- a/doc/doxygen/main_page.h +++ b/doc/doxygen/main_page.h @@ -1,4 +1,8 @@ /** + * @defgroup lwip lwIP + * + * @defgroup infrastructure Infrastructure + * * @defgroup callbackstyle_api Callback-style APIs * Non thread-safe APIs, callback style for maximum performance and minimum * memory footprint. @@ -7,77 +11,21 @@ * Thread-safe APIs, blocking functions. More overhead, but can be called * from any thread except TCPIP thread. * - * @defgroup infrastructure Infrastructure - * * @defgroup addons Addons * * @defgroup apps Applications */ - /** - * @page contrib How to contribute to lwIP - * @verbinclude "contrib.txt" +/** @mainpage Overview + * @verbinclude "README" */ /** * @page upgrading Upgrading * @verbinclude "UPGRADING" */ - -/*! \mainpage lwIP Documentation - * - * \section intro_sec Introduction - * - * lwIP is a small independent implementation of the TCP/IP protocol suite that has been developed by Adam Dunkels at the Computer and Networks Architectures (CNA) lab at the Swedish Institute of Computer Science (SICS). - * - * The focus of the lwIP TCP/IP implementation is to reduce resource usage while still having a full scale TCP. This making lwIP suitable for use in embedded systems with tens of kilobytes of free RAM and room for around 40 kilobytes of code ROM. - * - * \section lwip_features_sec lwIP features: - * - * \li \c IP (Internet Protocol, IPv4 and IPv6) including packet forwarding over multiple network interfaces\n - * \li \c ICMP (Internet Control Message Protocol, IPv4 and IPv6) for network maintenance and debugging\n - * \li \c IGMP (Internet Group Management Protocol) for multicast traffic management\n - * \li \c MLD (Multicast listener discovery for IPv6). Aims to be compliant with RFC 2710. No support for MLDv2\n - * \li \c ND (Neighbor discovery and stateless address autoconfiguration for IPv6). Aims to be compliant with RFC 4861 (Neighbor discovery) and RFC 4862 (Address autoconfiguration)\n - * \li \c UDP (User Datagram Protocol) including experimental UDP-lite extensions\n - * \li \c TCP (Transmission Control Protocol) with congestion control, RTT estimation and fast recovery/fast retransmit\n - * \li \c raw/native API for enhanced performance\n - * \li \c Optional Berkeley-like socket API\n - * \li \c DNS (Domain names resolver)\n - * \li \c DHCP (Dynamic Host Configuration Protocol)\n - * \li \c AUTOIP (for IPv4, conform with RFC 3927)\n - * \li \c PPP (Point-to-Point Protocol)\n - * \li \c ARP (Address Resolution Protocol) for Ethernet\n - * - * \section lwip_apps_sec lwIP applications: - * - * \li \c HTTP server with SSI and CGI\n - * \li \c SNMPv2c agent with MIB compiler (Simple Network Management Protocol)\n - * \li \c SNTP (Simple network time protocol)\n - * - * \section install_sec Documentation - * - * Development of lwIP is hosted on Savannah, a central point for software development, maintenance and distribution. Everyone can help improve lwIP by use of Savannah's interface, Git and the mailing list. A core team of developers will commit changes to the Git source tree.\n - * http://savannah.nongnu.org/projects/lwip/\n - * \n - * Self documentation of the source code is regularly extracted from the current Git sources and is available from this web page:\n - * http://www.nongnu.org/lwip/\n - * \n - * There is now a constantly growin wiki about lwIP at\n - * http://lwip.wikia.com/\n - * \n - * Also, there are mailing lists you can subscribe at\n - * http://savannah.nongnu.org/mail/?group=lwip\n - * plus searchable archives:\n - * http://lists.nongnu.org/archive/html/lwip-users/\n - * http://lists.nongnu.org/archive/html/lwip-devel/\n - * \n - * Continuous integration builds (GCC, clang):\n - * https://travis-ci.org/yarrick/lwip-merged\n - * \n - * lwIP was originally written by Adam Dunkels:\n - * http://dunkels.com/adam/\n - * \n - * Reading Adam's papers, the files in docs/, browsing the source code documentation and browsing the mailing list archives is a good way to become familiar with the design of lwIP.\n - * + +/** + * @page contrib How to contribute to lwIP + * @verbinclude "contrib.txt" */ diff --git a/src/core/init.c b/src/core/init.c index ab11c576..740d2770 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -36,8 +36,6 @@ */ /** - * @defgroup lwip lwIP - * * @defgroup lwip_nosys NO_SYS ("mainloop") mode * @ingroup lwip * Use this mode if you do not run an OS on your system. \#define NO_SYS to 1. From 8ece46d5d2b52725c3e3d196c4de8c2d9b1d8c96 Mon Sep 17 00:00:00 2001 From: sg Date: Wed, 27 Jul 2016 20:28:39 +0200 Subject: [PATCH 230/275] snmp threadsync_data: "u8" -> "err" (typedef snmp_err_t is an enum, not u8_t) --- src/apps/snmp/snmp_threadsync.c | 16 ++++++++-------- src/include/lwip/apps/snmp_threadsync.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/apps/snmp/snmp_threadsync.c b/src/apps/snmp/snmp_threadsync.c index 88957a04..858c40e6 100644 --- a/src/apps/snmp/snmp_threadsync.c +++ b/src/apps/snmp/snmp_threadsync.c @@ -76,7 +76,7 @@ threadsync_set_test_synced(void *ctx) { struct threadsync_data *call_data = (struct threadsync_data*)ctx; - call_data->retval.u8 = call_data->proxy_instance.set_test(&call_data->proxy_instance, call_data->arg2.len, call_data->arg1.value); + call_data->retval.err = call_data->proxy_instance.set_test(&call_data->proxy_instance, call_data->arg2.len, call_data->arg1.value); sys_sem_signal(&call_data->threadsync_node->instance->sem); } @@ -90,7 +90,7 @@ threadsync_set_test(struct snmp_node_instance* instance, u16_t len, void *value) call_data->arg2.len = len; call_synced_function(call_data, threadsync_set_test_synced); - return call_data->retval.u8; + return call_data->retval.err; } static void @@ -98,7 +98,7 @@ threadsync_set_value_synced(void *ctx) { struct threadsync_data *call_data = (struct threadsync_data*)ctx; - call_data->retval.u8 = call_data->proxy_instance.set_value(&call_data->proxy_instance, call_data->arg2.len, call_data->arg1.value); + call_data->retval.err = call_data->proxy_instance.set_value(&call_data->proxy_instance, call_data->arg2.len, call_data->arg1.value); sys_sem_signal(&call_data->threadsync_node->instance->sem); } @@ -112,7 +112,7 @@ threadsync_set_value(struct snmp_node_instance* instance, u16_t len, void *value call_data->arg2.len = len; call_synced_function(call_data, threadsync_set_value_synced); - return call_data->retval.u8; + return call_data->retval.err; } static void @@ -141,7 +141,7 @@ get_instance_synced(void* ctx) struct threadsync_data *call_data = (struct threadsync_data*)ctx; const struct snmp_leaf_node *leaf = (const struct snmp_leaf_node*)(const void*)call_data->proxy_instance.node; - call_data->retval.u8 = leaf->get_instance(call_data->arg1.root_oid, call_data->arg2.root_oid_len, &call_data->proxy_instance); + call_data->retval.err = leaf->get_instance(call_data->arg1.root_oid, call_data->arg2.root_oid_len, &call_data->proxy_instance); sys_sem_signal(&call_data->threadsync_node->instance->sem); } @@ -152,7 +152,7 @@ get_next_instance_synced(void* ctx) struct threadsync_data *call_data = (struct threadsync_data*)ctx; const struct snmp_leaf_node *leaf = (const struct snmp_leaf_node*)(const void*)call_data->proxy_instance.node; - call_data->retval.u8 = leaf->get_next_instance(call_data->arg1.root_oid, call_data->arg2.root_oid_len, &call_data->proxy_instance); + call_data->retval.err = leaf->get_next_instance(call_data->arg1.root_oid, call_data->arg2.root_oid_len, &call_data->proxy_instance); sys_sem_signal(&call_data->threadsync_node->instance->sem); } @@ -180,7 +180,7 @@ do_sync(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* ins call_data->arg2.root_oid_len = root_oid_len; call_synced_function(call_data, fn); - if (call_data->retval.u8 == SNMP_ERR_NOERROR) { + if (call_data->retval.err == SNMP_ERR_NOERROR) { instance->access = call_data->proxy_instance.access; instance->asn1_type = call_data->proxy_instance.asn1_type; instance->release_instance = threadsync_release_instance; @@ -190,7 +190,7 @@ do_sync(const u32_t *root_oid, u8_t root_oid_len, struct snmp_node_instance* ins snmp_oid_assign(&instance->instance_oid, call_data->proxy_instance.instance_oid.id, call_data->proxy_instance.instance_oid.len); } - return call_data->retval.u8; + return call_data->retval.err; } snmp_err_t diff --git a/src/include/lwip/apps/snmp_threadsync.h b/src/include/lwip/apps/snmp_threadsync.h index 75e0d2c2..a25dbf2d 100644 --- a/src/include/lwip/apps/snmp_threadsync.h +++ b/src/include/lwip/apps/snmp_threadsync.h @@ -57,7 +57,7 @@ typedef void (*snmp_threadsync_synchronizer_fn)(snmp_threadsync_called_fn fn, vo struct threadsync_data { union { - snmp_err_t u8; + snmp_err_t err; s16_t s16; } retval; union { From 31f941e1729525c00ec44fda66db6d76d8f81e94 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 19:17:33 +0200 Subject: [PATCH 231/275] More documentation updates --- doc/doxygen/lwip.Doxyfile | 3 ++- src/core/init.c | 2 +- src/core/timeouts.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/doxygen/lwip.Doxyfile b/doc/doxygen/lwip.Doxyfile index a32c3278..5fe97184 100644 --- a/doc/doxygen/lwip.Doxyfile +++ b/doc/doxygen/lwip.Doxyfile @@ -2068,7 +2068,8 @@ INCLUDE_FILE_PATTERNS = *.c *.h # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = NO_SYS=0 \ +PREDEFINED = __DOXYGEN__=1 \ + NO_SYS=0 \ SYS_LIGHTWEIGHT_PROT=1 \ LWIP_IPV4=1 \ LWIP_IPV6=1 \ diff --git a/src/core/init.c b/src/core/init.c index 740d2770..092cd2bc 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -36,7 +36,7 @@ */ /** - * @defgroup lwip_nosys NO_SYS ("mainloop") mode + * @defgroup lwip_nosys Mainloop mode ("NO_SYS") * @ingroup lwip * Use this mode if you do not run an OS on your system. \#define NO_SYS to 1. * Feed incoming packets to netif->input(pbuf, netif) function from mainloop, diff --git a/src/core/timeouts.c b/src/core/timeouts.c index 6e16e949..e630b7e2 100644 --- a/src/core/timeouts.c +++ b/src/core/timeouts.c @@ -300,7 +300,7 @@ sys_untimeout(sys_timeout_handler handler, void *arg) * * Must be called periodically from your main loop. */ -#if !NO_SYS +#if !NO_SYS && !defined __DOXYGEN__ static #endif /* !NO_SYS */ void From 63fdb3bb6242397a53a5d74e97764f438175bd50 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 20:12:58 +0200 Subject: [PATCH 232/275] Document opt.h - due to a bad bug in doxygen, I had to litter the whole file with "|| __DOXYGEN__" to make it work :-( Doxygen does not handle #ifndef foo #define foo #endif properly. It does not see the #define foo inside. If someone has objections or a fix for it, please tell me. --- doc/doxygen/main_page.h | 2 + src/include/lwip/opt.h | 770 ++++++++++++++++++++++++++-------------- 2 files changed, 506 insertions(+), 266 deletions(-) diff --git a/doc/doxygen/main_page.h b/doc/doxygen/main_page.h index a52b8913..a8378602 100644 --- a/doc/doxygen/main_page.h +++ b/doc/doxygen/main_page.h @@ -14,6 +14,8 @@ * @defgroup addons Addons * * @defgroup apps Applications + * + * @defgroup lwip_opts lwIP Options (lwipopts.h) */ /** @mainpage Overview diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 31c51028..ade64e1c 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -35,7 +35,13 @@ * Author: Adam Dunkels * */ -#ifndef LWIP_HDR_OPT_H + +/* + * NOTE: || defined __DOXYGEN__ is a workaround for doxygen bug - + * without this, doxygen does not see the actual #define + */ + +#if !defined LWIP_HDR_OPT_H #define LWIP_HDR_OPT_H /* @@ -50,6 +56,11 @@ ---------- Platform specific locking ---------- ----------------------------------------------- */ +/** + * @defgroup lwip_opts_locking Platform specific locking + * @ingroup lwip_opts + * @{ + */ /** * SYS_LIGHTWEIGHT_PROT==1: enable inter-task protection (and task-vs-interrupt @@ -58,10 +69,19 @@ * ATTENTION: This is required when using lwIP from more than one context! If * you disable this, you must be sure what you are doing! */ -#ifndef SYS_LIGHTWEIGHT_PROT +#if !defined SYS_LIGHTWEIGHT_PROT || defined __DOXYGEN__ #define SYS_LIGHTWEIGHT_PROT 1 #endif +/** + * @} + */ + +/** + * @defgroup lwip_opts_nosys NO_SYS + * @ingroup lwip_opts + * @{ + */ /** * NO_SYS==1: Use lwIP without OS-awareness (no thread, semaphores, mutexes or * mboxes). This means threaded APIs cannot be used (socket, netconn, @@ -69,7 +89,7 @@ * available (and you have to watch out for yourself that you don't access * lwIP functions/structures from more than one context at a time!) */ -#ifndef NO_SYS +#if !defined NO_SYS || defined __DOXYGEN__ #define NO_SYS 0 #endif @@ -77,15 +97,23 @@ * NO_SYS_NO_TIMERS==1: Drop support for sys_timeout when NO_SYS==1 * Mainly for compatibility to old versions. */ -#ifndef NO_SYS_NO_TIMERS +#if !defined NO_SYS_NO_TIMERS || defined __DOXYGEN__ #define NO_SYS_NO_TIMERS 0 #endif +/** + * @} + */ +/** + * @defgroup lwip_opts_memcpy memcpy at al. + * @ingroup lwip_opts + * @{ + */ /** * MEMCPY: override this if you have a faster implementation at hand than the * one included in your C library */ -#ifndef MEMCPY +#if !defined MEMCPY || defined __DOXYGEN__ #define MEMCPY(dst,src,len) memcpy(dst,src,len) #endif @@ -93,10 +121,18 @@ * SMEMCPY: override this with care! Some compilers (e.g. gcc) can inline a * call to memcpy() if the length is known at compile time and is small. */ -#ifndef SMEMCPY +#if !defined SMEMCPY || defined __DOXYGEN__ #define SMEMCPY(dst,src,len) memcpy(dst,src,len) #endif +/** + * @} + */ +/** + * @defgroup lwip_opts_misc Misc + * @ingroup lwip_opts + * @{ + */ /** * LWIP_MPU_COMPATIBLE: enables special memory management mechanism * which makes lwip able to work on MPU (Memory Protection Unit) system @@ -104,21 +140,29 @@ * (this decreases performance as memory is allocated from pools instead * of keeping it on the stack) */ -#ifndef LWIP_MPU_COMPATIBLE +#if !defined LWIP_MPU_COMPATIBLE || defined __DOXYGEN__ #define LWIP_MPU_COMPATIBLE 0 #endif +/** + * @} + */ /* ------------------------------------ ---------- Memory options ---------- ------------------------------------ */ +/** + * @defgroup lwip_opts_misc Misc + * @ingroup lwip_opts + * @{ + */ /** * MEM_LIBC_MALLOC==1: Use malloc/free/realloc provided by your C-library * instead of the lwip internal allocator. Can save code size if you * already use it. */ -#ifndef MEM_LIBC_MALLOC +#if !defined MEM_LIBC_MALLOC || defined __DOXYGEN__ #define MEM_LIBC_MALLOC 0 #endif @@ -131,7 +175,7 @@ * ATTENTION: Currently, this uses the heap for ALL pools (also for private pools, * not only for internal pools defined in memp_std.h)! */ -#ifndef MEMP_MEM_MALLOC +#if !defined MEMP_MEM_MALLOC || defined __DOXYGEN__ #define MEMP_MEM_MALLOC 0 #endif @@ -140,7 +184,7 @@ * 4 byte alignment -> \#define MEM_ALIGNMENT 4 * 2 byte alignment -> \#define MEM_ALIGNMENT 2 */ -#ifndef MEM_ALIGNMENT +#if !defined MEM_ALIGNMENT || defined __DOXYGEN__ #define MEM_ALIGNMENT 1 #endif @@ -148,7 +192,7 @@ * MEM_SIZE: the size of the heap memory. If the application will send * a lot of data that needs to be copied, this should be set high. */ -#ifndef MEM_SIZE +#if !defined MEM_SIZE || defined __DOXYGEN__ #define MEM_SIZE 1600 #endif @@ -161,7 +205,7 @@ * MEMP_OVERFLOW_CHECK >= 2 checks each element in every pool every time * memp_malloc() or memp_free() is called (useful but slow!) */ -#ifndef MEMP_OVERFLOW_CHECK +#if !defined MEMP_OVERFLOW_CHECK || defined __DOXYGEN__ #define MEMP_OVERFLOW_CHECK 0 #endif @@ -169,7 +213,7 @@ * MEMP_SANITY_CHECK==1: run a sanity check after each memp_free() to make * sure that there are no cycles in the linked lists. */ -#ifndef MEMP_SANITY_CHECK +#if !defined MEMP_SANITY_CHECK || defined __DOXYGEN__ #define MEMP_SANITY_CHECK 0 #endif @@ -179,7 +223,7 @@ * the smallest pool that can provide the length needed is returned. * To use this, MEMP_USE_CUSTOM_POOLS also has to be enabled. */ -#ifndef MEM_USE_POOLS +#if !defined MEM_USE_POOLS || defined __DOXYGEN__ #define MEM_USE_POOLS 0 #endif @@ -187,7 +231,7 @@ * MEM_USE_POOLS_TRY_BIGGER_POOL==1: if one malloc-pool is empty, try the next * bigger pool - WARNING: THIS MIGHT WASTE MEMORY but it can make a system more * reliable. */ -#ifndef MEM_USE_POOLS_TRY_BIGGER_POOL +#if !defined MEM_USE_POOLS_TRY_BIGGER_POOL || defined __DOXYGEN__ #define MEM_USE_POOLS_TRY_BIGGER_POOL 0 #endif @@ -197,7 +241,7 @@ * by lwIP. If you set this to 1, you must have lwippools.h in your * include path somewhere. */ -#ifndef MEMP_USE_CUSTOM_POOLS +#if !defined MEMP_USE_CUSTOM_POOLS || defined __DOXYGEN__ #define MEMP_USE_CUSTOM_POOLS 0 #endif @@ -219,21 +263,29 @@ * - pbuf_free_callback(p); * - mem_free_callback(m); */ -#ifndef LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT +#if !defined LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT || defined __DOXYGEN__ #define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 0 #endif +/** + * @} + */ /* ------------------------------------------------ ---------- Internal Memory Pool Sizes ---------- ------------------------------------------------ */ +/** + * @defgroup lwip_opts_memp Internal memory pools + * @ingroup lwip_opts + * @{ + */ /** * MEMP_NUM_PBUF: the number of memp struct pbufs (used for PBUF_ROM and PBUF_REF). * If the application sends a lot of data out of ROM (or other static memory), * this should be set high. */ -#ifndef MEMP_NUM_PBUF +#if !defined MEMP_NUM_PBUF || defined __DOXYGEN__ #define MEMP_NUM_PBUF 16 #endif @@ -241,7 +293,7 @@ * MEMP_NUM_RAW_PCB: Number of raw connection PCBs * (requires the LWIP_RAW option) */ -#ifndef MEMP_NUM_RAW_PCB +#if !defined MEMP_NUM_RAW_PCB || defined __DOXYGEN__ #define MEMP_NUM_RAW_PCB 4 #endif @@ -250,7 +302,7 @@ * per active UDP "connection". * (requires the LWIP_UDP option) */ -#ifndef MEMP_NUM_UDP_PCB +#if !defined MEMP_NUM_UDP_PCB || defined __DOXYGEN__ #define MEMP_NUM_UDP_PCB 4 #endif @@ -258,7 +310,7 @@ * MEMP_NUM_TCP_PCB: the number of simultaneously active TCP connections. * (requires the LWIP_TCP option) */ -#ifndef MEMP_NUM_TCP_PCB +#if !defined MEMP_NUM_TCP_PCB || defined __DOXYGEN__ #define MEMP_NUM_TCP_PCB 5 #endif @@ -266,7 +318,7 @@ * MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections. * (requires the LWIP_TCP option) */ -#ifndef MEMP_NUM_TCP_PCB_LISTEN +#if !defined MEMP_NUM_TCP_PCB_LISTEN || defined __DOXYGEN__ #define MEMP_NUM_TCP_PCB_LISTEN 8 #endif @@ -274,7 +326,7 @@ * MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments. * (requires the LWIP_TCP option) */ -#ifndef MEMP_NUM_TCP_SEG +#if !defined MEMP_NUM_TCP_SEG || defined __DOXYGEN__ #define MEMP_NUM_TCP_SEG 16 #endif @@ -282,7 +334,7 @@ * MEMP_NUM_REASSDATA: the number of IP packets simultaneously queued for * reassembly (whole packets, not fragments!) */ -#ifndef MEMP_NUM_REASSDATA +#if !defined MEMP_NUM_REASSDATA || defined __DOXYGEN__ #define MEMP_NUM_REASSDATA 5 #endif @@ -293,7 +345,7 @@ * LWIP_NETIF_TX_SINGLE_PBUF==0 and only has to be > 1 with DMA-enabled MACs * where the packet is not yet sent when netif->output returns. */ -#ifndef MEMP_NUM_FRAG_PBUF +#if !defined MEMP_NUM_FRAG_PBUF || defined __DOXYGEN__ #define MEMP_NUM_FRAG_PBUF 15 #endif @@ -303,7 +355,7 @@ * their destination address) to finish. * (requires the ARP_QUEUEING option) */ -#ifndef MEMP_NUM_ARP_QUEUE +#if !defined MEMP_NUM_ARP_QUEUE || defined __DOXYGEN__ #define MEMP_NUM_ARP_QUEUE 30 #endif @@ -313,7 +365,7 @@ * per netif membership). * (requires the LWIP_IGMP option) */ -#ifndef MEMP_NUM_IGMP_GROUP +#if !defined MEMP_NUM_IGMP_GROUP || defined __DOXYGEN__ #define MEMP_NUM_IGMP_GROUP 8 #endif @@ -322,7 +374,7 @@ * The default number of timeouts is calculated here for all enabled modules. * The formula expects settings to be either '0' or '1'. */ -#ifndef MEMP_NUM_SYS_TIMEOUT +#if !defined MEMP_NUM_SYS_TIMEOUT || defined __DOXYGEN__ #define MEMP_NUM_SYS_TIMEOUT (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + (PPP_SUPPORT*6*MEMP_NUM_PPP_PCB) + (LWIP_IPV6 ? (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD) : 0)) #endif @@ -330,7 +382,7 @@ * MEMP_NUM_NETBUF: the number of struct netbufs. * (only needed if you use the sequential API, like api_lib.c) */ -#ifndef MEMP_NUM_NETBUF +#if !defined MEMP_NUM_NETBUF || defined __DOXYGEN__ #define MEMP_NUM_NETBUF 2 #endif @@ -338,7 +390,7 @@ * MEMP_NUM_NETCONN: the number of struct netconns. * (only needed if you use the sequential API, like api_lib.c) */ -#ifndef MEMP_NUM_NETCONN +#if !defined MEMP_NUM_NETCONN || defined __DOXYGEN__ #define MEMP_NUM_NETCONN 4 #endif @@ -347,7 +399,7 @@ * for callback/timeout API communication. * (only needed if you use tcpip.c) */ -#ifndef MEMP_NUM_TCPIP_MSG_API +#if !defined MEMP_NUM_TCPIP_MSG_API || defined __DOXYGEN__ #define MEMP_NUM_TCPIP_MSG_API 8 #endif @@ -356,7 +408,7 @@ * for incoming packets. * (only needed if you use tcpip.c) */ -#ifndef MEMP_NUM_TCPIP_MSG_INPKT +#if !defined MEMP_NUM_TCPIP_MSG_INPKT || defined __DOXYGEN__ #define MEMP_NUM_TCPIP_MSG_INPKT 8 #endif @@ -364,7 +416,7 @@ * MEMP_NUM_NETDB: the number of concurrently running lwip_addrinfo() calls * (before freeing the corresponding memory using lwip_freeaddrinfo()). */ -#ifndef MEMP_NUM_NETDB +#if !defined MEMP_NUM_NETDB || defined __DOXYGEN__ #define MEMP_NUM_NETDB 1 #endif @@ -372,60 +424,68 @@ * MEMP_NUM_LOCALHOSTLIST: the number of host entries in the local host list * if DNS_LOCAL_HOSTLIST_IS_DYNAMIC==1. */ -#ifndef MEMP_NUM_LOCALHOSTLIST +#if !defined MEMP_NUM_LOCALHOSTLIST || defined __DOXYGEN__ #define MEMP_NUM_LOCALHOSTLIST 1 #endif /** * PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */ -#ifndef PBUF_POOL_SIZE +#if !defined PBUF_POOL_SIZE || defined __DOXYGEN__ #define PBUF_POOL_SIZE 16 #endif /** MEMP_NUM_API_MSG: the number of concurrently active calls to various * socket, netconn, and tcpip functions */ -#ifndef MEMP_NUM_API_MSG +#if !defined MEMP_NUM_API_MSG || defined __DOXYGEN__ #define MEMP_NUM_API_MSG MEMP_NUM_TCPIP_MSG_API #endif /** MEMP_NUM_DNS_API_MSG: the number of concurrently active calls to netconn_gethostbyname */ -#ifndef MEMP_NUM_DNS_API_MSG +#if !defined MEMP_NUM_DNS_API_MSG || defined __DOXYGEN__ #define MEMP_NUM_DNS_API_MSG MEMP_NUM_TCPIP_MSG_API #endif /** MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA: the number of concurrently active calls * to getsockopt/setsockopt */ -#ifndef MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA +#if !defined MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA || defined __DOXYGEN__ #define MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA MEMP_NUM_TCPIP_MSG_API #endif /** MEMP_NUM_NETIFAPI_MSG: the number of concurrently active calls to the * netifapi functions */ -#ifndef MEMP_NUM_NETIFAPI_MSG +#if !defined MEMP_NUM_NETIFAPI_MSG || defined __DOXYGEN__ #define MEMP_NUM_NETIFAPI_MSG MEMP_NUM_TCPIP_MSG_API #endif +/** + * @} + */ /* --------------------------------- ---------- ARP options ---------- --------------------------------- */ +/** + * @defgroup lwip_opts_arp ARP + * @ingroup lwip_opts + * @{ + */ /** * LWIP_ARP==1: Enable ARP functionality. */ -#ifndef LWIP_ARP +#if !defined LWIP_ARP || defined __DOXYGEN__ #define LWIP_ARP 1 #endif /** * ARP_TABLE_SIZE: Number of active MAC-IP address pairs cached. */ -#ifndef ARP_TABLE_SIZE +#if !defined ARP_TABLE_SIZE || defined __DOXYGEN__ #define ARP_TABLE_SIZE 10 #endif @@ -433,7 +493,7 @@ * for ARP_TMR_INTERVAL = 1000, this is * (60 * 5) seconds = 5 minutes. */ -#ifndef ARP_MAXAGE +#if !defined ARP_MAXAGE || defined __DOXYGEN__ #define ARP_MAXAGE 300 #endif @@ -444,7 +504,7 @@ * startup time. Set this to 1 if you know your application sends more than one * packet in a row to an IP address that is not in the ARP cache. */ -#ifndef ARP_QUEUEING +#if !defined ARP_QUEUEING || defined __DOXYGEN__ #define ARP_QUEUEING 0 #endif @@ -452,7 +512,7 @@ * unresolved address by other network layers. Defaults to 3, 0 means disabled. * Old packets are dropped, new packets are queued. */ -#ifndef ARP_QUEUE_LEN +#if !defined ARP_QUEUE_LEN || defined __DOXYGEN__ #define ARP_QUEUE_LEN 3 #endif @@ -466,7 +526,7 @@ * The peer *is* in the ARP table if it requested our address before. * Also notice that this slows down input processing of every IP packet! */ -#ifndef ETHARP_TRUST_IP_MAC +#if !defined ETHARP_TRUST_IP_MAC || defined __DOXYGEN__ #define ETHARP_TRUST_IP_MAC 0 #endif @@ -480,13 +540,13 @@ * Alternatively, define a function/define ETHARP_VLAN_CHECK_FN(eth_hdr, vlan) * that returns 1 to accept a packet or 0 to drop a packet. */ -#ifndef ETHARP_SUPPORT_VLAN +#if !defined ETHARP_SUPPORT_VLAN || defined __DOXYGEN__ #define ETHARP_SUPPORT_VLAN 0 #endif /** LWIP_ETHERNET==1: enable ethernet support even though ARP might be disabled */ -#ifndef LWIP_ETHERNET +#if !defined LWIP_ETHERNET || defined __DOXYGEN__ #define LWIP_ETHERNET LWIP_ARP #endif @@ -495,14 +555,14 @@ * without this padding e.g. addresses in the IP header will not be aligned * on a 32-bit boundary, so setting this to 2 can speed up 32-bit-platforms. */ -#ifndef ETH_PAD_SIZE +#if !defined ETH_PAD_SIZE || defined __DOXYGEN__ #define ETH_PAD_SIZE 0 #endif /** ETHARP_SUPPORT_STATIC_ENTRIES==1: enable code to support static ARP table * entries (using etharp_add_static_entry/etharp_remove_static_entry). */ -#ifndef ETHARP_SUPPORT_STATIC_ENTRIES +#if !defined ETHARP_SUPPORT_STATIC_ENTRIES || defined __DOXYGEN__ #define ETHARP_SUPPORT_STATIC_ENTRIES 0 #endif @@ -510,19 +570,27 @@ * If disabled, duplicate IP address on multiple netifs are not supported * (but this should only occur for AutoIP). */ -#ifndef ETHARP_TABLE_MATCH_NETIF +#if !defined ETHARP_TABLE_MATCH_NETIF || defined __DOXYGEN__ #define ETHARP_TABLE_MATCH_NETIF 0 #endif +/** + * @} + */ /* -------------------------------- ---------- IP options ---------- -------------------------------- */ +/** + * @defgroup lwip_opts_ip IP + * @ingroup lwip_opts + * @{ + */ /** * LWIP_IPV4==1: Enable IPv4 */ -#ifndef LWIP_IPV4 +#if !defined LWIP_IPV4 || defined __DOXYGEN__ #define LWIP_IPV4 1 #endif @@ -531,7 +599,7 @@ * interfaces. If you are going to run lwIP on a device with only one network * interface, define this to 0. */ -#ifndef IP_FORWARD +#if !defined IP_FORWARD || defined __DOXYGEN__ #define IP_FORWARD 0 #endif @@ -540,7 +608,7 @@ * this option does not affect outgoing packet sizes, which can be controlled * via IP_FRAG. */ -#ifndef IP_REASSEMBLY +#if !defined IP_REASSEMBLY || defined __DOXYGEN__ #define IP_REASSEMBLY 1 #endif @@ -549,7 +617,7 @@ * that this option does not affect incoming packet sizes, which can be * controlled via IP_REASSEMBLY. */ -#ifndef IP_FRAG +#if !defined IP_FRAG || defined __DOXYGEN__ #define IP_FRAG 1 #endif @@ -568,7 +636,7 @@ * IP_OPTIONS_ALLOWED==0: All packets with IP options are dropped. * IP_OPTIONS_ALLOWED==1: IP options are allowed (but not parsed). */ -#ifndef IP_OPTIONS_ALLOWED +#if !defined IP_OPTIONS_ALLOWED || defined __DOXYGEN__ #define IP_OPTIONS_ALLOWED 1 #endif @@ -577,7 +645,7 @@ * a fragmented IP packet waits for all fragments to arrive. If not all fragments arrived * in this time, the whole packet is discarded. */ -#ifndef IP_REASS_MAXAGE +#if !defined IP_REASS_MAXAGE || defined __DOXYGEN__ #define IP_REASS_MAXAGE 3 #endif @@ -587,7 +655,7 @@ * PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS so that the stack is still able to receive * packets even if the maximum amount of fragments is enqueued for reassembly! */ -#ifndef IP_REASS_MAX_PBUFS +#if !defined IP_REASS_MAX_PBUFS || defined __DOXYGEN__ #define IP_REASS_MAX_PBUFS 10 #endif @@ -598,7 +666,7 @@ * new PBUF_RAM pbufs are used for fragments). * ATTENTION: IP_FRAG_USES_STATIC_BUF==1 may not be used for DMA-enabled MACs! */ -#ifndef IP_FRAG_USES_STATIC_BUF +#if !defined IP_FRAG_USES_STATIC_BUF || defined __DOXYGEN__ #define IP_FRAG_USES_STATIC_BUF 0 #endif @@ -606,14 +674,14 @@ * IP_FRAG_MAX_MTU: Assumed max MTU on any interface for IP frag buffer * (requires IP_FRAG_USES_STATIC_BUF==1) */ -#if IP_FRAG_USES_STATIC_BUF && !defined(IP_FRAG_MAX_MTU) +#if IP_FRAG_USES_STATIC_BUF && !defined(IP_FRAG_MAX_MTU) || defined __DOXYGEN__ #define IP_FRAG_MAX_MTU 1500 #endif /** * IP_DEFAULT_TTL: Default value for Time-To-Live used by transport layers. */ -#ifndef IP_DEFAULT_TTL +#if !defined IP_DEFAULT_TTL || defined __DOXYGEN__ #define IP_DEFAULT_TTL 255 #endif @@ -622,7 +690,7 @@ * filter per pcb on udp and raw send operations. To enable broadcast filter * on recv operations, you also have to set IP_SOF_BROADCAST_RECV=1. */ -#ifndef IP_SOF_BROADCAST +#if !defined IP_SOF_BROADCAST || defined __DOXYGEN__ #define IP_SOF_BROADCAST 0 #endif @@ -630,7 +698,7 @@ * IP_SOF_BROADCAST_RECV (requires IP_SOF_BROADCAST=1) enable the broadcast * filter on recv operations. */ -#ifndef IP_SOF_BROADCAST_RECV +#if !defined IP_SOF_BROADCAST_RECV || defined __DOXYGEN__ #define IP_SOF_BROADCAST_RECV 0 #endif @@ -641,7 +709,7 @@ * ATTENTION: When this is 1, make sure your netif driver correctly marks incoming * link-layer-broadcast/multicast packets as such using the corresponding pbuf flags! */ -#ifndef IP_FORWARD_ALLOW_TX_ON_RX_NETIF +#if !defined IP_FORWARD_ALLOW_TX_ON_RX_NETIF || defined __DOXYGEN__ #define IP_FORWARD_ALLOW_TX_ON_RX_NETIF 0 #endif @@ -650,72 +718,96 @@ * local TCP/UDP pcb (default==0). This can prevent creating predictable port * numbers after booting a device. */ -#ifndef LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS +#if !defined LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS || defined __DOXYGEN__ #define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 0 #endif +/** + * @} + */ /* ---------------------------------- ---------- ICMP options ---------- ---------------------------------- */ +/** + * @defgroup lwip_opts_icmp ICMP + * @ingroup lwip_opts + * @{ + */ /** * LWIP_ICMP==1: Enable ICMP module inside the IP stack. * Be careful, disable that make your product non-compliant to RFC1122 */ -#ifndef LWIP_ICMP +#if !defined LWIP_ICMP || defined __DOXYGEN__ #define LWIP_ICMP 1 #endif /** * ICMP_TTL: Default value for Time-To-Live used by ICMP packets. */ -#ifndef ICMP_TTL +#if !defined ICMP_TTL || defined __DOXYGEN__ #define ICMP_TTL (IP_DEFAULT_TTL) #endif /** * LWIP_BROADCAST_PING==1: respond to broadcast pings (default is unicast only) */ -#ifndef LWIP_BROADCAST_PING +#if !defined LWIP_BROADCAST_PING || defined __DOXYGEN__ #define LWIP_BROADCAST_PING 0 #endif /** * LWIP_MULTICAST_PING==1: respond to multicast pings (default is unicast only) */ -#ifndef LWIP_MULTICAST_PING +#if !defined LWIP_MULTICAST_PING || defined __DOXYGEN__ #define LWIP_MULTICAST_PING 0 #endif +/** + * @} + */ /* --------------------------------- ---------- RAW options ---------- --------------------------------- */ +/** + * @defgroup lwip_opts_raw RAW + * @ingroup lwip_opts + * @{ + */ /** * LWIP_RAW==1: Enable application layer to hook into the IP layer itself. */ -#ifndef LWIP_RAW +#if !defined LWIP_RAW || defined __DOXYGEN__ #define LWIP_RAW 0 #endif /** * LWIP_RAW==1: Enable application layer to hook into the IP layer itself. */ -#ifndef RAW_TTL +#if !defined RAW_TTL || defined __DOXYGEN__ #define RAW_TTL (IP_DEFAULT_TTL) #endif +/** + * @} + */ /* ---------------------------------- ---------- DHCP options ---------- ---------------------------------- */ +/** + * @defgroup lwip_opts_dhcp DHCP + * @ingroup lwip_opts + * @{ + */ /** * LWIP_DHCP==1: Enable DHCP module. */ -#ifndef LWIP_DHCP +#if !defined LWIP_DHCP || defined __DOXYGEN__ #define LWIP_DHCP 0 #endif #if !LWIP_IPV4 @@ -727,7 +819,7 @@ /** * DHCP_DOES_ARP_CHECK==1: Do an ARP check on the offered address. */ -#ifndef DHCP_DOES_ARP_CHECK +#if !defined DHCP_DOES_ARP_CHECK || defined __DOXYGEN__ #define DHCP_DOES_ARP_CHECK ((LWIP_DHCP) && (LWIP_ARP)) #endif @@ -737,14 +829,14 @@ * netif drivers might not set this flag, the default is off. If enabled, * netif_set_link_up() must be called to continue dhcp starting. */ -#ifndef LWIP_DHCP_CHECK_LINK_UP +#if !defined LWIP_DHCP_CHECK_LINK_UP #define LWIP_DHCP_CHECK_LINK_UP 0 #endif /** * LWIP_DHCP_BOOTP_FILE==1: Store offered_si_addr and boot_file_name. */ -#ifndef LWIP_DHCP_BOOTP_FILE +#if !defined LWIP_DHCP_BOOTP_FILE || defined __DOXYGEN__ #define LWIP_DHCP_BOOTP_FILE 0 #endif @@ -753,26 +845,34 @@ * response packet, an callback is called, which has to be provided by the port: * void dhcp_set_ntp_servers(u8_t num_ntp_servers, ip_addr_t* ntp_server_addrs); */ -#ifndef LWIP_DHCP_GET_NTP_SRV +#if !defined LWIP_DHCP_GET_NTP_SRV || defined __DOXYGEN__ #define LWIP_DHCP_GET_NTP_SRV 0 #endif /** * The maximum of NTP servers requested */ -#ifndef LWIP_DHCP_MAX_NTP_SERVERS +#if !defined LWIP_DHCP_MAX_NTP_SERVERS || defined __DOXYGEN__ #define LWIP_DHCP_MAX_NTP_SERVERS 1 #endif +/** + * @} + */ /* ------------------------------------ ---------- AUTOIP options ---------- ------------------------------------ */ +/** + * @defgroup lwip_opts_autoip AUTOIP + * @ingroup lwip_opts + * @{ + */ /** * LWIP_AUTOIP==1: Enable AUTOIP module. */ -#ifndef LWIP_AUTOIP +#if !defined LWIP_AUTOIP || defined __DOXYGEN__ #define LWIP_AUTOIP 0 #endif #if !LWIP_IPV4 @@ -785,7 +885,7 @@ * LWIP_DHCP_AUTOIP_COOP==1: Allow DHCP and AUTOIP to be both enabled on * the same interface at the same time. */ -#ifndef LWIP_DHCP_AUTOIP_COOP +#if !defined LWIP_DHCP_AUTOIP_COOP || defined __DOXYGEN__ #define LWIP_DHCP_AUTOIP_COOP 0 #endif @@ -796,33 +896,49 @@ * very quickly, but you should be prepared to handle a changing IP address * when DHCP overrides AutoIP. */ -#ifndef LWIP_DHCP_AUTOIP_COOP_TRIES +#if !defined LWIP_DHCP_AUTOIP_COOP_TRIES || defined __DOXYGEN__ #define LWIP_DHCP_AUTOIP_COOP_TRIES 9 #endif +/** + * @} + */ /* ---------------------------------- ----- SNMP MIB2 support ----- ---------------------------------- */ +/** + * @defgroup lwip_opts_mib2 MIB2 + * @ingroup lwip_opts + * @{ + */ /** * LWIP_MIB2_CALLBACKS==1: Turn on SNMP MIB2 callbacks. * Turn this on to get callbacks needed to implement MIB2. * Usually MIB2_STATS should be enabled, too. */ -#ifndef LWIP_MIB2_CALLBACKS +#if !defined LWIP_MIB2_CALLBACKS || defined __DOXYGEN__ #define LWIP_MIB2_CALLBACKS 0 #endif +/** + * @} + */ /* ---------------------------------- ----- Multicast/IGMP options ----- ---------------------------------- */ +/** + * @defgroup lwip_opts_igmp IGMP + * @ingroup lwip_opts + * @{ + */ /** * LWIP_IGMP==1: Turn on IGMP module. */ -#ifndef LWIP_IGMP +#if !defined LWIP_IGMP || defined __DOXYGEN__ #define LWIP_IGMP 0 #endif #if !LWIP_IPV4 @@ -834,30 +950,38 @@ * LWIP_MULTICAST_TX_OPTIONS==1: Enable multicast TX support like the socket options * IP_MULTICAST_TTL/IP_MULTICAST_IF/IP_MULTICAST_LOOP */ -#ifndef LWIP_MULTICAST_TX_OPTIONS +#if !defined LWIP_MULTICAST_TX_OPTIONS || defined __DOXYGEN__ #define LWIP_MULTICAST_TX_OPTIONS LWIP_IGMP #endif +/** + * @} + */ /* ---------------------------------- ---------- DNS options ----------- ---------------------------------- */ +/** + * @defgroup lwip_opts_dns DNS + * @ingroup lwip_opts + * @{ + */ /** * LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS * transport. */ -#ifndef LWIP_DNS +#if !defined LWIP_DNS || defined __DOXYGEN__ #define LWIP_DNS 0 #endif /** DNS maximum number of entries to maintain locally. */ -#ifndef DNS_TABLE_SIZE +#if !defined DNS_TABLE_SIZE || defined __DOXYGEN__ #define DNS_TABLE_SIZE 4 #endif /** DNS maximum host name length supported in the name table. */ -#ifndef DNS_MAX_NAME_LENGTH +#if !defined DNS_MAX_NAME_LENGTH || defined __DOXYGEN__ #define DNS_MAX_NAME_LENGTH 256 #endif @@ -865,12 +989,12 @@ * The first server can be initialized automatically by defining * DNS_SERVER_ADDRESS(ipaddr), where 'ipaddr' is an 'ip_addr_t*' */ -#ifndef DNS_MAX_SERVERS +#if !defined DNS_MAX_SERVERS || defined __DOXYGEN__ #define DNS_MAX_SERVERS 2 #endif /** DNS do a name checking between the query and the response. */ -#ifndef DNS_DOES_NAME_CHECK +#if !defined DNS_DOES_NAME_CHECK || defined __DOXYGEN__ #define DNS_DOES_NAME_CHECK 1 #endif @@ -878,9 +1002,10 @@ * Use all DNS security features by default. * This is overridable but should only be needed by very small targets * or when using against non standard DNS servers. */ -#ifndef LWIP_DNS_SECURE +#if !defined LWIP_DNS_SECURE || defined __DOXYGEN__ #define LWIP_DNS_SECURE (LWIP_DNS_SECURE_RAND_XID | LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING | LWIP_DNS_SECURE_RAND_SRC_PORT) #endif + /* A list of DNS security features follows */ #define LWIP_DNS_SECURE_RAND_XID 1 #define LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING 2 @@ -896,65 +1021,81 @@ * \#define DNS_LOOKUP_LOCAL_EXTERN(x) extern err_t my_lookup_function(const char *name, ip_addr_t *addr, u8_t dns_addrtype) * that looks up the IP address and returns ERR_OK if found (LWIP_DNS_ADDRTYPE_* is passed in dns_addrtype). */ -#ifndef DNS_LOCAL_HOSTLIST +#if !defined DNS_LOCAL_HOSTLIST || defined __DOXYGEN__ #define DNS_LOCAL_HOSTLIST 0 #endif /* DNS_LOCAL_HOSTLIST */ /** If this is turned on, the local host-list can be dynamically changed * at runtime. */ -#ifndef DNS_LOCAL_HOSTLIST_IS_DYNAMIC +#if !defined DNS_LOCAL_HOSTLIST_IS_DYNAMIC || defined __DOXYGEN__ #define DNS_LOCAL_HOSTLIST_IS_DYNAMIC 0 #endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ +/** + * @} + */ /* --------------------------------- ---------- UDP options ---------- --------------------------------- */ +/** + * @defgroup lwip_opts_udp UDP + * @ingroup lwip_opts + * @{ + */ /** * LWIP_UDP==1: Turn on UDP. */ -#ifndef LWIP_UDP +#if !defined LWIP_UDP || defined __DOXYGEN__ #define LWIP_UDP 1 #endif /** * LWIP_UDPLITE==1: Turn on UDP-Lite. (Requires LWIP_UDP) */ -#ifndef LWIP_UDPLITE +#if !defined LWIP_UDPLITE || defined __DOXYGEN__ #define LWIP_UDPLITE 0 #endif /** * UDP_TTL: Default Time-To-Live value. */ -#ifndef UDP_TTL +#if !defined UDP_TTL || defined __DOXYGEN__ #define UDP_TTL (IP_DEFAULT_TTL) #endif /** * LWIP_NETBUF_RECVINFO==1: append destination addr and port to every netbuf. */ -#ifndef LWIP_NETBUF_RECVINFO +#if !defined LWIP_NETBUF_RECVINFO || defined __DOXYGEN__ #define LWIP_NETBUF_RECVINFO 0 #endif +/** + * @} + */ /* --------------------------------- ---------- TCP options ---------- --------------------------------- */ +/** + * @defgroup lwip_opts_tcp TCP + * @ingroup lwip_opts + * @{ + */ /** * LWIP_TCP==1: Turn on TCP. */ -#ifndef LWIP_TCP +#if !defined LWIP_TCP || defined __DOXYGEN__ #define LWIP_TCP 1 #endif /** * TCP_TTL: Default Time-To-Live value. */ -#ifndef TCP_TTL +#if !defined TCP_TTL || defined __DOXYGEN__ #define TCP_TTL (IP_DEFAULT_TTL) #endif @@ -962,21 +1103,21 @@ * TCP_WND: The size of a TCP window. This must be at least * (2 * TCP_MSS) for things to work well */ -#ifndef TCP_WND +#if !defined TCP_WND || defined __DOXYGEN__ #define TCP_WND (4 * TCP_MSS) #endif /** * TCP_MAXRTX: Maximum number of retransmissions of data segments. */ -#ifndef TCP_MAXRTX +#if !defined TCP_MAXRTX || defined __DOXYGEN__ #define TCP_MAXRTX 12 #endif /** * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments. */ -#ifndef TCP_SYNMAXRTX +#if !defined TCP_SYNMAXRTX || defined __DOXYGEN__ #define TCP_SYNMAXRTX 6 #endif @@ -984,7 +1125,7 @@ * TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order. * Define to 0 if your device is low on memory. */ -#ifndef TCP_QUEUE_OOSEQ +#if !defined TCP_QUEUE_OOSEQ || defined __DOXYGEN__ #define TCP_QUEUE_OOSEQ (LWIP_TCP) #endif @@ -995,7 +1136,7 @@ * when opening a connection. For the transmit size, this MSS sets * an upper limit on the MSS advertised by the remote host. */ -#ifndef TCP_MSS +#if !defined TCP_MSS || defined __DOXYGEN__ #define TCP_MSS 536 #endif @@ -1007,7 +1148,7 @@ * Setting this to 1 enables code that checks TCP_MSS against the MTU of the * netif used for a connection and limits the MSS if it would be too big otherwise. */ -#ifndef TCP_CALCULATE_EFF_SEND_MSS +#if !defined TCP_CALCULATE_EFF_SEND_MSS || defined __DOXYGEN__ #define TCP_CALCULATE_EFF_SEND_MSS 1 #endif @@ -1016,7 +1157,7 @@ * TCP_SND_BUF: TCP sender buffer space (bytes). * To achieve good performance, this should be at least 2 * TCP_MSS. */ -#ifndef TCP_SND_BUF +#if !defined TCP_SND_BUF || defined __DOXYGEN__ #define TCP_SND_BUF (2 * TCP_MSS) #endif @@ -1024,7 +1165,7 @@ * TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least * as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. */ -#ifndef TCP_SND_QUEUELEN +#if !defined TCP_SND_QUEUELEN || defined __DOXYGEN__ #define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS)) #endif @@ -1033,7 +1174,7 @@ * TCP_SND_BUF. It is the amount of space which must be available in the * TCP snd_buf for select to return writable (combined with TCP_SNDQUEUELOWAT). */ -#ifndef TCP_SNDLOWAT +#if !defined TCP_SNDLOWAT || defined __DOXYGEN__ #define TCP_SNDLOWAT LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1) #endif @@ -1042,7 +1183,7 @@ * than TCP_SND_QUEUELEN. If the number of pbufs queued on a pcb drops below * this number, select returns writable (combined with TCP_SNDLOWAT). */ -#ifndef TCP_SNDQUEUELOWAT +#if !defined TCP_SNDQUEUELOWAT || defined __DOXYGEN__ #define TCP_SNDQUEUELOWAT LWIP_MAX(((TCP_SND_QUEUELEN)/2), 5) #endif @@ -1050,7 +1191,7 @@ * TCP_OOSEQ_MAX_BYTES: The maximum number of bytes queued on ooseq per pcb. * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==0. */ -#ifndef TCP_OOSEQ_MAX_BYTES +#if !defined TCP_OOSEQ_MAX_BYTES || defined __DOXYGEN__ #define TCP_OOSEQ_MAX_BYTES 0 #endif @@ -1058,14 +1199,14 @@ * TCP_OOSEQ_MAX_PBUFS: The maximum number of pbufs queued on ooseq per pcb. * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==0. */ -#ifndef TCP_OOSEQ_MAX_PBUFS +#if !defined TCP_OOSEQ_MAX_PBUFS || defined __DOXYGEN__ #define TCP_OOSEQ_MAX_PBUFS 0 #endif /** * TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb. */ -#ifndef TCP_LISTEN_BACKLOG +#if !defined TCP_LISTEN_BACKLOG || defined __DOXYGEN__ #define TCP_LISTEN_BACKLOG 0 #endif @@ -1074,7 +1215,7 @@ * This backlog is used unless another is explicitly specified. * 0xff is the maximum (u8_t). */ -#ifndef TCP_DEFAULT_LISTEN_BACKLOG +#if !defined TCP_DEFAULT_LISTEN_BACKLOG || defined __DOXYGEN__ #define TCP_DEFAULT_LISTEN_BACKLOG 0xff #endif @@ -1092,7 +1233,7 @@ * TCP_MSS: Try to create unfragmented TCP packets. * TCP_MSS/4: Try to create 4 fragments or less per TCP packet. */ -#ifndef TCP_OVERSIZE +#if !defined TCP_OVERSIZE || defined __DOXYGEN__ #define TCP_OVERSIZE TCP_MSS #endif @@ -1102,7 +1243,7 @@ * really used locally. Therefore, it is only enabled when a TS option is * received in the initial SYN packet from a remote host. */ -#ifndef LWIP_TCP_TIMESTAMPS +#if !defined LWIP_TCP_TIMESTAMPS || defined __DOXYGEN__ #define LWIP_TCP_TIMESTAMPS 0 #endif @@ -1110,7 +1251,7 @@ * TCP_WND_UPDATE_THRESHOLD: difference in window to trigger an * explicit window update */ -#ifndef TCP_WND_UPDATE_THRESHOLD +#if !defined TCP_WND_UPDATE_THRESHOLD || defined __DOXYGEN__ #define TCP_WND_UPDATE_THRESHOLD LWIP_MIN((TCP_WND / 4), (TCP_MSS * 4)) #endif @@ -1121,7 +1262,7 @@ * LWIP_CALLBACK_API==1: The PCB callback function is called directly * for the event. This is the default. */ -#if !defined(LWIP_EVENT_API) && !defined(LWIP_CALLBACK_API) +#if !defined(LWIP_EVENT_API) && !defined(LWIP_CALLBACK_API) || defined __DOXYGEN__ #define LWIP_EVENT_API 0 #define LWIP_CALLBACK_API 1 #endif @@ -1134,24 +1275,31 @@ * When LWIP_WND_SCALE is enabled but TCP_RCV_SCALE is 0, we can use a large * send window while having a small receive window only. */ -#ifndef LWIP_WND_SCALE +#if !defined LWIP_WND_SCALE || defined __DOXYGEN__ #define LWIP_WND_SCALE 0 #define TCP_RCV_SCALE 0 #endif - +/** + * @} + */ /* ---------------------------------- ---------- Pbuf options ---------- ---------------------------------- */ +/** + * @defgroup lwip_opts_pbuf PBUF + * @ingroup lwip_opts + * @{ + */ /** * PBUF_LINK_HLEN: the number of bytes that should be allocated for a * link level header. The default is 14, the standard value for * Ethernet. */ -#ifndef PBUF_LINK_HLEN -#ifdef LWIP_HOOK_VLAN_SET +#if !defined PBUF_LINK_HLEN || defined __DOXYGEN__ +#if defined LWIP_HOOK_VLAN_SET || defined __DOXYGEN__ #define PBUF_LINK_HLEN (18 + ETH_PAD_SIZE) #else /* LWIP_HOOK_VLAN_SET */ #define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE) @@ -1162,7 +1310,7 @@ * PBUF_LINK_ENCAPSULATION_HLEN: the number of bytes that should be allocated * for an additional encapsulation header before ethernet headers (e.g. 802.11) */ -#ifndef PBUF_LINK_ENCAPSULATION_HLEN +#if !defined PBUF_LINK_ENCAPSULATION_HLEN || defined __DOXYGEN__ #define PBUF_LINK_ENCAPSULATION_HLEN 0 #endif @@ -1171,27 +1319,35 @@ * designed to accommodate single full size TCP frame in one pbuf, including * TCP_MSS, IP header, and link header. */ -#ifndef PBUF_POOL_BUFSIZE +#if !defined PBUF_POOL_BUFSIZE || defined __DOXYGEN__ #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) #endif +/** + * @} + */ /* ------------------------------------------------ ---------- Network Interfaces options ---------- ------------------------------------------------ */ +/** + * @defgroup lwip_opts_netif NETIF + * @ingroup lwip_opts + * @{ + */ /** * LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname * field. */ -#ifndef LWIP_NETIF_HOSTNAME +#if !defined LWIP_NETIF_HOSTNAME || defined __DOXYGEN__ #define LWIP_NETIF_HOSTNAME 0 #endif /** * LWIP_NETIF_API==1: Support netif api (in netifapi.c) */ -#ifndef LWIP_NETIF_API +#if !defined LWIP_NETIF_API || defined __DOXYGEN__ #define LWIP_NETIF_API 0 #endif @@ -1199,7 +1355,7 @@ * LWIP_NETIF_STATUS_CALLBACK==1: Support a callback function whenever an interface * changes its up/down status (i.e., due to DHCP IP acquisition) */ -#ifndef LWIP_NETIF_STATUS_CALLBACK +#if !defined LWIP_NETIF_STATUS_CALLBACK || defined __DOXYGEN__ #define LWIP_NETIF_STATUS_CALLBACK 0 #endif @@ -1207,7 +1363,7 @@ * LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface * whenever the link changes (i.e., link down) */ -#ifndef LWIP_NETIF_LINK_CALLBACK +#if !defined LWIP_NETIF_LINK_CALLBACK || defined __DOXYGEN__ #define LWIP_NETIF_LINK_CALLBACK 0 #endif @@ -1215,7 +1371,7 @@ * LWIP_NETIF_REMOVE_CALLBACK==1: Support a callback function that is called * when a netif has been removed */ -#ifndef LWIP_NETIF_REMOVE_CALLBACK +#if !defined LWIP_NETIF_REMOVE_CALLBACK || defined __DOXYGEN__ #define LWIP_NETIF_REMOVE_CALLBACK 0 #endif @@ -1226,7 +1382,7 @@ * ARP tables or many concurrent connections, it might be counterproductive * if you have a tiny ARP table or if there never are concurrent connections. */ -#ifndef LWIP_NETIF_HWADDRHINT +#if !defined LWIP_NETIF_HWADDRHINT || defined __DOXYGEN__ #define LWIP_NETIF_HWADDRHINT 0 #endif @@ -1234,7 +1390,7 @@ * LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP * address equal to the netif IP address, looping them back up the stack. */ -#ifndef LWIP_NETIF_LOOPBACK +#if !defined LWIP_NETIF_LOOPBACK || defined __DOXYGEN__ #define LWIP_NETIF_LOOPBACK 0 #endif @@ -1242,7 +1398,7 @@ * LWIP_LOOPBACK_MAX_PBUFS: Maximum number of pbufs on queue for loopback * sending for each netif (0 = disabled) */ -#ifndef LWIP_LOOPBACK_MAX_PBUFS +#if !defined LWIP_LOOPBACK_MAX_PBUFS || defined __DOXYGEN__ #define LWIP_LOOPBACK_MAX_PBUFS 0 #endif @@ -1259,7 +1415,7 @@ * The packets are put on a list and netif_poll() must be called in * the main application loop. */ -#ifndef LWIP_NETIF_LOOPBACK_MULTITHREADING +#if !defined LWIP_NETIF_LOOPBACK_MULTITHREADING || defined __DOXYGEN__ #define LWIP_NETIF_LOOPBACK_MULTITHREADING (!NO_SYS) #endif @@ -1272,52 +1428,76 @@ * * @todo: TCP and IP-frag do not work with this, yet: */ -#ifndef LWIP_NETIF_TX_SINGLE_PBUF +#if !defined LWIP_NETIF_TX_SINGLE_PBUF || defined __DOXYGEN__ #define LWIP_NETIF_TX_SINGLE_PBUF 0 #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ +/** + * @} + */ /* ------------------------------------ ---------- LOOPIF options ---------- ------------------------------------ */ +/** + * @defgroup lwip_opts_loop Loopback interface + * @ingroup lwip_opts + * @{ + */ /** * LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1). * This is only needed when no real netifs are available. If at least one other * netif is available, loopback traffic uses this netif. */ -#ifndef LWIP_HAVE_LOOPIF +#if !defined LWIP_HAVE_LOOPIF || defined __DOXYGEN__ #define LWIP_HAVE_LOOPIF LWIP_NETIF_LOOPBACK #endif /** * LWIP_LOOPIF_MULTICAST==1: Support multicast/IGMP on loop interface (127.0.0.1). */ -#ifndef LWIP_LOOPIF_MULTICAST +#if !defined LWIP_LOOPIF_MULTICAST || defined __DOXYGEN__ #define LWIP_LOOPIF_MULTICAST 0 #endif +/** + * @} + */ /* ------------------------------------ ---------- SLIPIF options ---------- ------------------------------------ */ +/** + * @defgroup lwip_opts_loop SLIP interface + * @ingroup lwip_opts + * @{ + */ /** * LWIP_HAVE_SLIPIF==1: Support slip interface and slipif.c */ -#ifndef LWIP_HAVE_SLIPIF +#if !defined LWIP_HAVE_SLIPIF || defined __DOXYGEN__ #define LWIP_HAVE_SLIPIF 0 #endif +/** + * @} + */ /* ------------------------------------ ---------- Thread options ---------- ------------------------------------ */ +/** + * @defgroup lwip_opts_thread Threading + * @ingroup lwip_opts + * @{ + */ /** * TCPIP_THREAD_NAME: The name assigned to the main tcpip thread. */ -#ifndef TCPIP_THREAD_NAME +#if !defined TCPIP_THREAD_NAME || defined __DOXYGEN__ #define TCPIP_THREAD_NAME "tcpip_thread" #endif @@ -1326,7 +1506,7 @@ * The stack size value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */ -#ifndef TCPIP_THREAD_STACKSIZE +#if !defined TCPIP_THREAD_STACKSIZE || defined __DOXYGEN__ #define TCPIP_THREAD_STACKSIZE 0 #endif @@ -1335,7 +1515,7 @@ * The priority value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */ -#ifndef TCPIP_THREAD_PRIO +#if !defined TCPIP_THREAD_PRIO || defined __DOXYGEN__ #define TCPIP_THREAD_PRIO 1 #endif @@ -1344,7 +1524,7 @@ * The queue size value itself is platform-dependent, but is passed to * sys_mbox_new() when tcpip_init is called. */ -#ifndef TCPIP_MBOX_SIZE +#if !defined TCPIP_MBOX_SIZE || defined __DOXYGEN__ #define TCPIP_MBOX_SIZE 0 #endif @@ -1352,14 +1532,14 @@ * Define this to something that triggers a watchdog. This is called from * tcpip_thread after processing a message. */ -#ifndef LWIP_TCPIP_THREAD_ALIVE +#if !defined LWIP_TCPIP_THREAD_ALIVE || defined __DOXYGEN__ #define LWIP_TCPIP_THREAD_ALIVE() #endif /** * SLIPIF_THREAD_NAME: The name assigned to the slipif_loop thread. */ -#ifndef SLIPIF_THREAD_NAME +#if !defined SLIPIF_THREAD_NAME || defined __DOXYGEN__ #define SLIPIF_THREAD_NAME "slipif_loop" #endif @@ -1368,7 +1548,7 @@ * The stack size value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */ -#ifndef SLIPIF_THREAD_STACKSIZE +#if !defined SLIPIF_THREAD_STACKSIZE || defined __DOXYGEN__ #define SLIPIF_THREAD_STACKSIZE 0 #endif @@ -1377,14 +1557,14 @@ * The priority value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */ -#ifndef SLIPIF_THREAD_PRIO +#if !defined SLIPIF_THREAD_PRIO || defined __DOXYGEN__ #define SLIPIF_THREAD_PRIO 1 #endif /** * DEFAULT_THREAD_NAME: The name assigned to any other lwIP thread. */ -#ifndef DEFAULT_THREAD_NAME +#if !defined DEFAULT_THREAD_NAME || defined __DOXYGEN__ #define DEFAULT_THREAD_NAME "lwIP" #endif @@ -1393,7 +1573,7 @@ * The stack size value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */ -#ifndef DEFAULT_THREAD_STACKSIZE +#if !defined DEFAULT_THREAD_STACKSIZE || defined __DOXYGEN__ #define DEFAULT_THREAD_STACKSIZE 0 #endif @@ -1402,7 +1582,7 @@ * The priority value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */ -#ifndef DEFAULT_THREAD_PRIO +#if !defined DEFAULT_THREAD_PRIO || defined __DOXYGEN__ #define DEFAULT_THREAD_PRIO 1 #endif @@ -1411,7 +1591,7 @@ * NETCONN_RAW. The queue size value itself is platform-dependent, but is passed * to sys_mbox_new() when the recvmbox is created. */ -#ifndef DEFAULT_RAW_RECVMBOX_SIZE +#if !defined DEFAULT_RAW_RECVMBOX_SIZE || defined __DOXYGEN__ #define DEFAULT_RAW_RECVMBOX_SIZE 0 #endif @@ -1420,7 +1600,7 @@ * NETCONN_UDP. The queue size value itself is platform-dependent, but is passed * to sys_mbox_new() when the recvmbox is created. */ -#ifndef DEFAULT_UDP_RECVMBOX_SIZE +#if !defined DEFAULT_UDP_RECVMBOX_SIZE || defined __DOXYGEN__ #define DEFAULT_UDP_RECVMBOX_SIZE 0 #endif @@ -1429,7 +1609,7 @@ * NETCONN_TCP. The queue size value itself is platform-dependent, but is passed * to sys_mbox_new() when the recvmbox is created. */ -#ifndef DEFAULT_TCP_RECVMBOX_SIZE +#if !defined DEFAULT_TCP_RECVMBOX_SIZE || defined __DOXYGEN__ #define DEFAULT_TCP_RECVMBOX_SIZE 0 #endif @@ -1438,15 +1618,23 @@ * The queue size value itself is platform-dependent, but is passed to * sys_mbox_new() when the acceptmbox is created. */ -#ifndef DEFAULT_ACCEPTMBOX_SIZE +#if !defined DEFAULT_ACCEPTMBOX_SIZE || defined __DOXYGEN__ #define DEFAULT_ACCEPTMBOX_SIZE 0 #endif +/** + * @} + */ /* ---------------------------------------------- ---------- Sequential layer options ---------- ---------------------------------------------- */ +/** + * @defgroup lwip_opts_netconn Netconn + * @ingroup lwip_opts + * @{ + */ /** * LWIP_TCPIP_CORE_LOCKING * Creates a global mutex that is held during TCPIP thread operations. @@ -1455,7 +1643,7 @@ * UNLOCK_TCPIP_CORE(). * Your system should provide mutexes supporting priority inversion to use this. */ -#ifndef LWIP_TCPIP_CORE_LOCKING +#if !defined LWIP_TCPIP_CORE_LOCKING || defined __DOXYGEN__ #define LWIP_TCPIP_CORE_LOCKING 1 #endif @@ -1467,21 +1655,21 @@ * ATTENTION: this does not work when tcpip_input() is called from * interrupt context! */ -#ifndef LWIP_TCPIP_CORE_LOCKING_INPUT +#if !defined LWIP_TCPIP_CORE_LOCKING_INPUT || defined __DOXYGEN__ #define LWIP_TCPIP_CORE_LOCKING_INPUT 0 #endif /** * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c) */ -#ifndef LWIP_NETCONN +#if !defined LWIP_NETCONN || defined __DOXYGEN__ #define LWIP_NETCONN 1 #endif /** LWIP_TCPIP_TIMEOUT==1: Enable tcpip_timeout/tcpip_untimeout to create * timers running in tcpip_thread from another thread. */ -#ifndef LWIP_TCPIP_TIMEOUT +#if !defined LWIP_TCPIP_TIMEOUT || defined __DOXYGEN__ #define LWIP_TCPIP_TIMEOUT 0 #endif @@ -1495,7 +1683,7 @@ * The latter 2 can be invoked up by calling netconn_thread_init()/netconn_thread_cleanup(). * Ports may call these for threads created with sys_thread_new(). */ -#ifndef LWIP_NETCONN_SEM_PER_THREAD +#if !defined LWIP_NETCONN_SEM_PER_THREAD || defined __DOXYGEN__ #define LWIP_NETCONN_SEM_PER_THREAD 0 #endif @@ -1507,26 +1695,34 @@ * - sys_mbox_free() has to unblock receive tasks waiting on recvmbox/acceptmbox * and prevent a task pending on this during/after deletion */ -#ifndef LWIP_NETCONN_FULLDUPLEX +#if !defined LWIP_NETCONN_FULLDUPLEX || defined __DOXYGEN__ #define LWIP_NETCONN_FULLDUPLEX 0 #endif +/** + * @} + */ /* ------------------------------------ ---------- Socket options ---------- ------------------------------------ */ +/** + * @defgroup lwip_opts_socket Sockets + * @ingroup lwip_opts + * @{ + */ /** * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c) */ -#ifndef LWIP_SOCKET +#if !defined LWIP_SOCKET || defined __DOXYGEN__ #define LWIP_SOCKET 1 #endif /* LWIP_SOCKET_SET_ERRNO==1: Set errno when socket functions cannot complete * successfully, as required by POSIX. Default is POSIX-compliant. */ -#ifndef LWIP_SOCKET_SET_ERRNO +#if !defined LWIP_SOCKET_SET_ERRNO || defined __DOXYGEN__ #define LWIP_SOCKET_SET_ERRNO 1 #endif @@ -1536,7 +1732,7 @@ * While this helps code completion, it might conflict with existing libraries. * (only used if you use sockets.c) */ -#ifndef LWIP_COMPAT_SOCKETS +#if !defined LWIP_COMPAT_SOCKETS || defined __DOXYGEN__ #define LWIP_COMPAT_SOCKETS 1 #endif @@ -1545,7 +1741,7 @@ * Disable this option if you use a POSIX operating system that uses the same * names (read, write & close). (only used if you use sockets.c) */ -#ifndef LWIP_POSIX_SOCKETS_IO_NAMES +#if !defined LWIP_POSIX_SOCKETS_IO_NAMES || defined __DOXYGEN__ #define LWIP_POSIX_SOCKETS_IO_NAMES 1 #endif @@ -1556,7 +1752,7 @@ * re implement read/write/close/ioctl/fnctl to send the requested action to the right * library (sharing select will need more work though). */ -#ifndef LWIP_SOCKET_OFFSET +#if !defined LWIP_SOCKET_OFFSET || defined __DOXYGEN__ #define LWIP_SOCKET_OFFSET 0 #endif @@ -1565,7 +1761,7 @@ * options processing. Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set * in seconds. (does not require sockets.c, and will affect tcp.c) */ -#ifndef LWIP_TCP_KEEPALIVE +#if !defined LWIP_TCP_KEEPALIVE || defined __DOXYGEN__ #define LWIP_TCP_KEEPALIVE 0 #endif @@ -1573,7 +1769,7 @@ * LWIP_SO_SNDTIMEO==1: Enable send timeout for sockets/netconns and * SO_SNDTIMEO processing. */ -#ifndef LWIP_SO_SNDTIMEO +#if !defined LWIP_SO_SNDTIMEO || defined __DOXYGEN__ #define LWIP_SO_SNDTIMEO 0 #endif @@ -1581,7 +1777,7 @@ * LWIP_SO_RCVTIMEO==1: Enable receive timeout for sockets/netconns and * SO_RCVTIMEO processing. */ -#ifndef LWIP_SO_RCVTIMEO +#if !defined LWIP_SO_RCVTIMEO || defined __DOXYGEN__ #define LWIP_SO_RCVTIMEO 0 #endif @@ -1589,42 +1785,42 @@ * LWIP_SO_SNDRCVTIMEO_NONSTANDARD==1: SO_RCVTIMEO/SO_SNDTIMEO take an int * (milliseconds, much like winsock does) instead of a struct timeval (default). */ -#ifndef LWIP_SO_SNDRCVTIMEO_NONSTANDARD +#if !defined LWIP_SO_SNDRCVTIMEO_NONSTANDARD || defined __DOXYGEN__ #define LWIP_SO_SNDRCVTIMEO_NONSTANDARD 0 #endif /** * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing. */ -#ifndef LWIP_SO_RCVBUF +#if !defined LWIP_SO_RCVBUF || defined __DOXYGEN__ #define LWIP_SO_RCVBUF 0 #endif /** * LWIP_SO_LINGER==1: Enable SO_LINGER processing. */ -#ifndef LWIP_SO_LINGER +#if !defined LWIP_SO_LINGER || defined __DOXYGEN__ #define LWIP_SO_LINGER 0 #endif /** * If LWIP_SO_RCVBUF is used, this is the default value for recv_bufsize. */ -#ifndef RECV_BUFSIZE_DEFAULT +#if !defined RECV_BUFSIZE_DEFAULT || defined __DOXYGEN__ #define RECV_BUFSIZE_DEFAULT INT_MAX #endif /** * By default, TCP socket/netconn close waits 20 seconds max to send the FIN */ -#ifndef LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT +#if !defined LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT || defined __DOXYGEN__ #define LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT 20000 #endif /** * SO_REUSE==1: Enable SO_REUSEADDR option. */ -#ifndef SO_REUSE +#if !defined SO_REUSE || defined __DOXYGEN__ #define SO_REUSE 0 #endif @@ -1633,7 +1829,7 @@ * to all local matches if SO_REUSEADDR is turned on. * WARNING: Adds a memcpy for every packet if passing to more than one pcb! */ -#ifndef SO_REUSE_RXTOALL +#if !defined SO_REUSE_RXTOALL || defined __DOXYGEN__ #define SO_REUSE_RXTOALL 0 #endif @@ -1645,19 +1841,27 @@ * pending datagram in bytes. This is the way linux does it. This code is only * here for compatibility. */ -#ifndef LWIP_FIONREAD_LINUXMODE +#if !defined LWIP_FIONREAD_LINUXMODE || defined __DOXYGEN__ #define LWIP_FIONREAD_LINUXMODE 0 #endif +/** + * @} + */ /* ---------------------------------------- ---------- Statistics options ---------- ---------------------------------------- */ +/** + * @defgroup lwip_opts_stats Statistics + * @ingroup lwip_opts + * @{ + */ /** * LWIP_STATS==1: Enable statistics collection in lwip_stats. */ -#ifndef LWIP_STATS +#if !defined LWIP_STATS || defined __DOXYGEN__ #define LWIP_STATS 1 #endif @@ -1666,28 +1870,28 @@ /** * LWIP_STATS_DISPLAY==1: Compile in the statistics output functions. */ -#ifndef LWIP_STATS_DISPLAY +#if !defined LWIP_STATS_DISPLAY || defined __DOXYGEN__ #define LWIP_STATS_DISPLAY 0 #endif /** * LINK_STATS==1: Enable link stats. */ -#ifndef LINK_STATS +#if !defined LINK_STATS || defined __DOXYGEN__ #define LINK_STATS 1 #endif /** * ETHARP_STATS==1: Enable etharp stats. */ -#ifndef ETHARP_STATS +#if !defined ETHARP_STATS || defined __DOXYGEN__ #define ETHARP_STATS (LWIP_ARP) #endif /** * IP_STATS==1: Enable IP stats. */ -#ifndef IP_STATS +#if !defined IP_STATS || defined __DOXYGEN__ #define IP_STATS 1 #endif @@ -1695,21 +1899,21 @@ * IPFRAG_STATS==1: Enable IP fragmentation stats. Default is * on if using either frag or reass. */ -#ifndef IPFRAG_STATS +#if !defined IPFRAG_STATS || defined __DOXYGEN__ #define IPFRAG_STATS (IP_REASSEMBLY || IP_FRAG) #endif /** * ICMP_STATS==1: Enable ICMP stats. */ -#ifndef ICMP_STATS +#if !defined ICMP_STATS || defined __DOXYGEN__ #define ICMP_STATS 1 #endif /** * IGMP_STATS==1: Enable IGMP stats. */ -#ifndef IGMP_STATS +#if !defined IGMP_STATS || defined __DOXYGEN__ #define IGMP_STATS (LWIP_IGMP) #endif @@ -1717,7 +1921,7 @@ * UDP_STATS==1: Enable UDP stats. Default is on if * UDP enabled, otherwise off. */ -#ifndef UDP_STATS +#if !defined UDP_STATS || defined __DOXYGEN__ #define UDP_STATS (LWIP_UDP) #endif @@ -1725,70 +1929,70 @@ * TCP_STATS==1: Enable TCP stats. Default is on if TCP * enabled, otherwise off. */ -#ifndef TCP_STATS +#if !defined TCP_STATS || defined __DOXYGEN__ #define TCP_STATS (LWIP_TCP) #endif /** * MEM_STATS==1: Enable mem.c stats. */ -#ifndef MEM_STATS +#if !defined MEM_STATS || defined __DOXYGEN__ #define MEM_STATS ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0)) #endif /** * MEMP_STATS==1: Enable memp.c pool stats. */ -#ifndef MEMP_STATS +#if !defined MEMP_STATS || defined __DOXYGEN__ #define MEMP_STATS (MEMP_MEM_MALLOC == 0) #endif /** * SYS_STATS==1: Enable system stats (sem and mbox counts, etc). */ -#ifndef SYS_STATS +#if !defined SYS_STATS || defined __DOXYGEN__ #define SYS_STATS (NO_SYS == 0) #endif /** * IP6_STATS==1: Enable IPv6 stats. */ -#ifndef IP6_STATS +#if !defined IP6_STATS || defined __DOXYGEN__ #define IP6_STATS (LWIP_IPV6) #endif /** * ICMP6_STATS==1: Enable ICMP for IPv6 stats. */ -#ifndef ICMP6_STATS +#if !defined ICMP6_STATS || defined __DOXYGEN__ #define ICMP6_STATS (LWIP_IPV6 && LWIP_ICMP6) #endif /** * IP6_FRAG_STATS==1: Enable IPv6 fragmentation stats. */ -#ifndef IP6_FRAG_STATS +#if !defined IP6_FRAG_STATS || defined __DOXYGEN__ #define IP6_FRAG_STATS (LWIP_IPV6 && (LWIP_IPV6_FRAG || LWIP_IPV6_REASS)) #endif /** * MLD6_STATS==1: Enable MLD for IPv6 stats. */ -#ifndef MLD6_STATS +#if !defined MLD6_STATS || defined __DOXYGEN__ #define MLD6_STATS (LWIP_IPV6 && LWIP_IPV6_MLD) #endif /** * ND6_STATS==1: Enable Neighbor discovery for IPv6 stats. */ -#ifndef ND6_STATS +#if !defined ND6_STATS || defined __DOXYGEN__ #define ND6_STATS (LWIP_IPV6) #endif /** * MIB2_STATS==1: Stats for SNMP MIB2. */ -#ifndef MIB2_STATS +#if !defined MIB2_STATS || defined __DOXYGEN__ #define MIB2_STATS 0 #endif @@ -1814,89 +2018,96 @@ #define MIB2_STATS 0 #endif /* LWIP_STATS */ +/** + * @} + */ /* -------------------------------------- ---------- Checksum options ---------- -------------------------------------- */ - +/** + * @defgroup lwip_opts_checksum Checksum + * @ingroup lwip_opts + * @{ + */ /** * LWIP_CHECKSUM_CTRL_PER_NETIF==1: Checksum generation/check can be enabled/disabled * per netif. * ATTENTION: if enabled, the CHECKSUM_GEN_* and CHECKSUM_CHECK_* defines must be enabled! */ -#ifndef LWIP_CHECKSUM_CTRL_PER_NETIF +#if !defined LWIP_CHECKSUM_CTRL_PER_NETIF || defined __DOXYGEN__ #define LWIP_CHECKSUM_CTRL_PER_NETIF 0 #endif /** * CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets. */ -#ifndef CHECKSUM_GEN_IP +#if !defined CHECKSUM_GEN_IP || defined __DOXYGEN__ #define CHECKSUM_GEN_IP 1 #endif /** * CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets. */ -#ifndef CHECKSUM_GEN_UDP +#if !defined CHECKSUM_GEN_UDP || defined __DOXYGEN__ #define CHECKSUM_GEN_UDP 1 #endif /** * CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets. */ -#ifndef CHECKSUM_GEN_TCP +#if !defined CHECKSUM_GEN_TCP || defined __DOXYGEN__ #define CHECKSUM_GEN_TCP 1 #endif /** * CHECKSUM_GEN_ICMP==1: Generate checksums in software for outgoing ICMP packets. */ -#ifndef CHECKSUM_GEN_ICMP +#if !defined CHECKSUM_GEN_ICMP || defined __DOXYGEN__ #define CHECKSUM_GEN_ICMP 1 #endif /** * CHECKSUM_GEN_ICMP6==1: Generate checksums in software for outgoing ICMP6 packets. */ -#ifndef CHECKSUM_GEN_ICMP6 +#if !defined CHECKSUM_GEN_ICMP6 || defined __DOXYGEN__ #define CHECKSUM_GEN_ICMP6 1 #endif /** * CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets. */ -#ifndef CHECKSUM_CHECK_IP +#if !defined CHECKSUM_CHECK_IP || defined __DOXYGEN__ #define CHECKSUM_CHECK_IP 1 #endif /** * CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets. */ -#ifndef CHECKSUM_CHECK_UDP +#if !defined CHECKSUM_CHECK_UDP || defined __DOXYGEN__ #define CHECKSUM_CHECK_UDP 1 #endif /** * CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets. */ -#ifndef CHECKSUM_CHECK_TCP +#if !defined CHECKSUM_CHECK_TCP || defined __DOXYGEN__ #define CHECKSUM_CHECK_TCP 1 #endif /** * CHECKSUM_CHECK_ICMP==1: Check checksums in software for incoming ICMP packets. */ -#ifndef CHECKSUM_CHECK_ICMP +#if !defined CHECKSUM_CHECK_ICMP || defined __DOXYGEN__ #define CHECKSUM_CHECK_ICMP 1 #endif /** * CHECKSUM_CHECK_ICMP6==1: Check checksums in software for incoming ICMPv6 packets */ -#ifndef CHECKSUM_CHECK_ICMP6 +#if !defined CHECKSUM_CHECK_ICMP6 || defined __DOXYGEN__ #define CHECKSUM_CHECK_ICMP6 1 #endif @@ -1904,40 +2115,48 @@ * LWIP_CHECKSUM_ON_COPY==1: Calculate checksum when copying data from * application buffers to pbufs. */ -#ifndef LWIP_CHECKSUM_ON_COPY +#if !defined LWIP_CHECKSUM_ON_COPY || defined __DOXYGEN__ #define LWIP_CHECKSUM_ON_COPY 0 #endif +/** + * @} + */ /* --------------------------------------- ---------- IPv6 options --------------- --------------------------------------- */ +/** + * @defgroup lwip_opts_ipv6 IPv6 + * @ingroup lwip_opts + * @{ + */ /** * LWIP_IPV6==1: Enable IPv6 */ -#ifndef LWIP_IPV6 +#if !defined LWIP_IPV6 || defined __DOXYGEN__ #define LWIP_IPV6 0 #endif /** * LWIP_IPV6_NUM_ADDRESSES: Number of IPv6 addresses per netif. */ -#ifndef LWIP_IPV6_NUM_ADDRESSES +#if !defined LWIP_IPV6_NUM_ADDRESSES || defined __DOXYGEN__ #define LWIP_IPV6_NUM_ADDRESSES 3 #endif /** * LWIP_IPV6_FORWARD==1: Forward IPv6 packets across netifs */ -#ifndef LWIP_IPV6_FORWARD +#if !defined LWIP_IPV6_FORWARD || defined __DOXYGEN__ #define LWIP_IPV6_FORWARD 0 #endif /** * LWIP_ICMP6==1: Enable ICMPv6 (mandatory per RFC) */ -#ifndef LWIP_ICMP6 +#if !defined LWIP_ICMP6 || defined __DOXYGEN__ #define LWIP_ICMP6 (LWIP_IPV6) #endif @@ -1945,42 +2164,42 @@ * LWIP_ICMP6_DATASIZE: bytes from original packet to send back in * ICMPv6 error messages. */ -#ifndef LWIP_ICMP6_DATASIZE +#if !defined LWIP_ICMP6_DATASIZE || defined __DOXYGEN__ #define LWIP_ICMP6_DATASIZE 8 #endif /** * LWIP_ICMP6_HL: default hop limit for ICMPv6 messages */ -#ifndef LWIP_ICMP6_HL +#if !defined LWIP_ICMP6_HL || defined __DOXYGEN__ #define LWIP_ICMP6_HL 255 #endif /** * LWIP_IPV6_MLD==1: Enable multicast listener discovery protocol. */ -#ifndef LWIP_IPV6_MLD +#if !defined LWIP_IPV6_MLD || defined __DOXYGEN__ #define LWIP_IPV6_MLD (LWIP_IPV6) #endif /** * MEMP_NUM_MLD6_GROUP: Max number of IPv6 multicast that can be joined. */ -#ifndef MEMP_NUM_MLD6_GROUP +#if !defined MEMP_NUM_MLD6_GROUP || defined __DOXYGEN__ #define MEMP_NUM_MLD6_GROUP 4 #endif /** * LWIP_IPV6_FRAG==1: Fragment outgoing IPv6 packets that are too big. */ -#ifndef LWIP_IPV6_FRAG +#if !defined LWIP_IPV6_FRAG || defined __DOXYGEN__ #define LWIP_IPV6_FRAG 0 #endif /** * LWIP_IPV6_REASS==1: reassemble incoming IPv6 packets that fragmented */ -#ifndef LWIP_IPV6_REASS +#if !defined LWIP_IPV6_REASS || defined __DOXYGEN__ || defined __DOXYGEN__ #define LWIP_IPV6_REASS (LWIP_IPV6) #endif @@ -1988,42 +2207,42 @@ * LWIP_ND6_QUEUEING==1: queue outgoing IPv6 packets while MAC address * is being resolved. */ -#ifndef LWIP_ND6_QUEUEING +#if !defined LWIP_ND6_QUEUEING || defined __DOXYGEN__ #define LWIP_ND6_QUEUEING (LWIP_IPV6) #endif /** * MEMP_NUM_ND6_QUEUE: Max number of IPv6 packets to queue during MAC resolution. */ -#ifndef MEMP_NUM_ND6_QUEUE +#if !defined MEMP_NUM_ND6_QUEUE || defined __DOXYGEN__ #define MEMP_NUM_ND6_QUEUE 20 #endif /** * LWIP_ND6_NUM_NEIGHBORS: Number of entries in IPv6 neighbor cache */ -#ifndef LWIP_ND6_NUM_NEIGHBORS +#if !defined LWIP_ND6_NUM_NEIGHBORS || defined __DOXYGEN__ #define LWIP_ND6_NUM_NEIGHBORS 10 #endif /** * LWIP_ND6_NUM_DESTINATIONS: number of entries in IPv6 destination cache */ -#ifndef LWIP_ND6_NUM_DESTINATIONS +#if !defined LWIP_ND6_NUM_DESTINATIONS || defined __DOXYGEN__ #define LWIP_ND6_NUM_DESTINATIONS 10 #endif /** * LWIP_ND6_NUM_PREFIXES: number of entries in IPv6 on-link prefixes cache */ -#ifndef LWIP_ND6_NUM_PREFIXES +#if !defined LWIP_ND6_NUM_PREFIXES || defined __DOXYGEN__ #define LWIP_ND6_NUM_PREFIXES 5 #endif /** * LWIP_ND6_NUM_ROUTERS: number of entries in IPv6 default router cache */ -#ifndef LWIP_ND6_NUM_ROUTERS +#if !defined LWIP_ND6_NUM_ROUTERS || defined __DOXYGEN__ #define LWIP_ND6_NUM_ROUTERS 3 #endif @@ -2031,7 +2250,7 @@ * LWIP_ND6_MAX_MULTICAST_SOLICIT: max number of multicast solicit messages to send * (neighbor solicit and router solicit) */ -#ifndef LWIP_ND6_MAX_MULTICAST_SOLICIT +#if !defined LWIP_ND6_MAX_MULTICAST_SOLICIT || defined __DOXYGEN__ #define LWIP_ND6_MAX_MULTICAST_SOLICIT 3 #endif @@ -2039,21 +2258,21 @@ * LWIP_ND6_MAX_UNICAST_SOLICIT: max number of unicast neighbor solicitation messages * to send during neighbor reachability detection. */ -#ifndef LWIP_ND6_MAX_UNICAST_SOLICIT +#if !defined LWIP_ND6_MAX_UNICAST_SOLICIT || defined __DOXYGEN__ #define LWIP_ND6_MAX_UNICAST_SOLICIT 3 #endif /** * Unused: See ND RFC (time in milliseconds). */ -#ifndef LWIP_ND6_MAX_ANYCAST_DELAY_TIME +#if !defined LWIP_ND6_MAX_ANYCAST_DELAY_TIME || defined __DOXYGEN__ #define LWIP_ND6_MAX_ANYCAST_DELAY_TIME 1000 #endif /** * Unused: See ND RFC */ -#ifndef LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT +#if !defined LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT || defined __DOXYGEN__ #define LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT 3 #endif @@ -2061,14 +2280,14 @@ * LWIP_ND6_REACHABLE_TIME: default neighbor reachable time (in milliseconds). * May be updated by router advertisement messages. */ -#ifndef LWIP_ND6_REACHABLE_TIME +#if !defined LWIP_ND6_REACHABLE_TIME || defined __DOXYGEN__ #define LWIP_ND6_REACHABLE_TIME 30000 #endif /** * LWIP_ND6_RETRANS_TIMER: default retransmission timer for solicitation messages */ -#ifndef LWIP_ND6_RETRANS_TIMER +#if !defined LWIP_ND6_RETRANS_TIMER || defined __DOXYGEN__ #define LWIP_ND6_RETRANS_TIMER 1000 #endif @@ -2076,7 +2295,7 @@ * LWIP_ND6_DELAY_FIRST_PROBE_TIME: Delay before first unicast neighbor solicitation * message is sent, during neighbor reachability detection. */ -#ifndef LWIP_ND6_DELAY_FIRST_PROBE_TIME +#if !defined LWIP_ND6_DELAY_FIRST_PROBE_TIME || defined __DOXYGEN__s #define LWIP_ND6_DELAY_FIRST_PROBE_TIME 5000 #endif @@ -2084,7 +2303,7 @@ * LWIP_ND6_ALLOW_RA_UPDATES==1: Allow Router Advertisement messages to update * Reachable time and retransmission timers, and netif MTU. */ -#ifndef LWIP_ND6_ALLOW_RA_UPDATES +#if !defined LWIP_ND6_ALLOW_RA_UPDATES || defined __DOXYGEN__ #define LWIP_ND6_ALLOW_RA_UPDATES 1 #endif @@ -2092,7 +2311,7 @@ * LWIP_IPV6_SEND_ROUTER_SOLICIT==1: Send router solicitation messages during * network startup. */ -#ifndef LWIP_IPV6_SEND_ROUTER_SOLICIT +#if !defined LWIP_IPV6_SEND_ROUTER_SOLICIT || defined __DOXYGEN__ #define LWIP_IPV6_SEND_ROUTER_SOLICIT 1 #endif @@ -2101,30 +2320,33 @@ * with reachability hints for connected destinations. This helps avoid sending * unicast neighbor solicitation messages. */ -#ifndef LWIP_ND6_TCP_REACHABILITY_HINTS +#if !defined LWIP_ND6_TCP_REACHABILITY_HINTS || defined __DOXYGEN__ || defined __DOXYGEN__ #define LWIP_ND6_TCP_REACHABILITY_HINTS 1 #endif /** * LWIP_IPV6_AUTOCONFIG==1: Enable stateless address autoconfiguration as per RFC 4862. */ -#ifndef LWIP_IPV6_AUTOCONFIG +#if !defined LWIP_IPV6_AUTOCONFIG || defined __DOXYGEN__ #define LWIP_IPV6_AUTOCONFIG (LWIP_IPV6) #endif /** * LWIP_IPV6_DUP_DETECT_ATTEMPTS: Number of duplicate address detection attempts. */ -#ifndef LWIP_IPV6_DUP_DETECT_ATTEMPTS +#if !defined LWIP_IPV6_DUP_DETECT_ATTEMPTS || defined __DOXYGEN__ #define LWIP_IPV6_DUP_DETECT_ATTEMPTS 1 #endif /** * LWIP_IPV6_DHCP6==1: enable DHCPv6 stateful address autoconfiguration. */ -#ifndef LWIP_IPV6_DHCP6 +#if !defined LWIP_IPV6_DHCP6 || defined __DOXYGEN__ #define LWIP_IPV6_DHCP6 0 #endif +/** + * @} + */ /* --------------------------------------- @@ -2226,12 +2448,17 @@ ---------- Debugging options ---------- --------------------------------------- */ +/** + * @defgroup lwip_opts_debug Debugging + * @ingroup lwip_opts + * @{ + */ /** * LWIP_DBG_MIN_LEVEL: After masking, the value of the debug is * compared against this value. If it is smaller, then debugging * messages are written. */ -#ifndef LWIP_DBG_MIN_LEVEL +#if !defined LWIP_DBG_MIN_LEVEL || defined __DOXYGEN__ || defined __DOXYGEN__ #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL #endif @@ -2239,140 +2466,140 @@ * LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable * debug messages of certain types. */ -#ifndef LWIP_DBG_TYPES_ON +#if !defined LWIP_DBG_TYPES_ON || defined __DOXYGEN__ #define LWIP_DBG_TYPES_ON LWIP_DBG_ON #endif /** * ETHARP_DEBUG: Enable debugging in etharp.c. */ -#ifndef ETHARP_DEBUG +#if !defined ETHARP_DEBUG || defined __DOXYGEN__ #define ETHARP_DEBUG LWIP_DBG_OFF #endif /** * NETIF_DEBUG: Enable debugging in netif.c. */ -#ifndef NETIF_DEBUG +#if !defined NETIF_DEBUG || defined __DOXYGEN__ #define NETIF_DEBUG LWIP_DBG_OFF #endif /** * PBUF_DEBUG: Enable debugging in pbuf.c. */ -#ifndef PBUF_DEBUG +#if !defined PBUF_DEBUG || defined __DOXYGEN__ #define PBUF_DEBUG LWIP_DBG_OFF #endif /** * API_LIB_DEBUG: Enable debugging in api_lib.c. */ -#ifndef API_LIB_DEBUG +#if !defined API_LIB_DEBUG || defined __DOXYGEN__ #define API_LIB_DEBUG LWIP_DBG_OFF #endif /** * API_MSG_DEBUG: Enable debugging in api_msg.c. */ -#ifndef API_MSG_DEBUG +#if !defined API_MSG_DEBUG || defined __DOXYGEN__ #define API_MSG_DEBUG LWIP_DBG_OFF #endif /** * SOCKETS_DEBUG: Enable debugging in sockets.c. */ -#ifndef SOCKETS_DEBUG +#if !defined SOCKETS_DEBUG || defined __DOXYGEN__ #define SOCKETS_DEBUG LWIP_DBG_OFF #endif /** * ICMP_DEBUG: Enable debugging in icmp.c. */ -#ifndef ICMP_DEBUG +#if !defined ICMP_DEBUG || defined __DOXYGEN__ #define ICMP_DEBUG LWIP_DBG_OFF #endif /** * IGMP_DEBUG: Enable debugging in igmp.c. */ -#ifndef IGMP_DEBUG +#if !defined IGMP_DEBUG || defined __DOXYGEN__ #define IGMP_DEBUG LWIP_DBG_OFF #endif /** * INET_DEBUG: Enable debugging in inet.c. */ -#ifndef INET_DEBUG +#if !defined INET_DEBUG || defined __DOXYGEN__ #define INET_DEBUG LWIP_DBG_OFF #endif /** * IP_DEBUG: Enable debugging for IP. */ -#ifndef IP_DEBUG +#if !defined IP_DEBUG || defined __DOXYGEN__ #define IP_DEBUG LWIP_DBG_OFF #endif /** * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass. */ -#ifndef IP_REASS_DEBUG +#if !defined IP_REASS_DEBUG || defined __DOXYGEN__ #define IP_REASS_DEBUG LWIP_DBG_OFF #endif /** * RAW_DEBUG: Enable debugging in raw.c. */ -#ifndef RAW_DEBUG +#if !defined RAW_DEBUG || defined __DOXYGEN__ #define RAW_DEBUG LWIP_DBG_OFF #endif /** * MEM_DEBUG: Enable debugging in mem.c. */ -#ifndef MEM_DEBUG +#if !defined MEM_DEBUG || defined __DOXYGEN__ #define MEM_DEBUG LWIP_DBG_OFF #endif /** * MEMP_DEBUG: Enable debugging in memp.c. */ -#ifndef MEMP_DEBUG +#if !defined MEMP_DEBUG || defined __DOXYGEN__ #define MEMP_DEBUG LWIP_DBG_OFF #endif /** * SYS_DEBUG: Enable debugging in sys.c. */ -#ifndef SYS_DEBUG +#if !defined SYS_DEBUG || defined __DOXYGEN__ #define SYS_DEBUG LWIP_DBG_OFF #endif /** * TIMERS_DEBUG: Enable debugging in timers.c. */ -#ifndef TIMERS_DEBUG +#if !defined TIMERS_DEBUG || defined __DOXYGEN__ #define TIMERS_DEBUG LWIP_DBG_OFF #endif /** * TCP_DEBUG: Enable debugging for TCP. */ -#ifndef TCP_DEBUG +#if !defined TCP_DEBUG || defined __DOXYGEN__ #define TCP_DEBUG LWIP_DBG_OFF #endif /** * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug. */ -#ifndef TCP_INPUT_DEBUG +#if !defined TCP_INPUT_DEBUG || defined __DOXYGEN__ #define TCP_INPUT_DEBUG LWIP_DBG_OFF #endif /** * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit. */ -#ifndef TCP_FR_DEBUG +#if !defined TCP_FR_DEBUG || defined __DOXYGEN__ #define TCP_FR_DEBUG LWIP_DBG_OFF #endif @@ -2380,105 +2607,116 @@ * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit * timeout. */ -#ifndef TCP_RTO_DEBUG +#if !defined TCP_RTO_DEBUG || defined __DOXYGEN__ #define TCP_RTO_DEBUG LWIP_DBG_OFF #endif /** * TCP_CWND_DEBUG: Enable debugging for TCP congestion window. */ -#ifndef TCP_CWND_DEBUG +#if !defined TCP_CWND_DEBUG || defined __DOXYGEN__ #define TCP_CWND_DEBUG LWIP_DBG_OFF #endif /** * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating. */ -#ifndef TCP_WND_DEBUG +#if !defined TCP_WND_DEBUG || defined __DOXYGEN__ #define TCP_WND_DEBUG LWIP_DBG_OFF #endif /** * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions. */ -#ifndef TCP_OUTPUT_DEBUG +#if !defined TCP_OUTPUT_DEBUG || defined __DOXYGEN__ #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF #endif /** * TCP_RST_DEBUG: Enable debugging for TCP with the RST message. */ -#ifndef TCP_RST_DEBUG +#if !defined TCP_RST_DEBUG || defined __DOXYGEN__ #define TCP_RST_DEBUG LWIP_DBG_OFF #endif /** * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths. */ -#ifndef TCP_QLEN_DEBUG +#if !defined TCP_QLEN_DEBUG || defined __DOXYGEN__ #define TCP_QLEN_DEBUG LWIP_DBG_OFF #endif /** * UDP_DEBUG: Enable debugging in UDP. */ -#ifndef UDP_DEBUG +#if !defined UDP_DEBUG || defined __DOXYGEN__ #define UDP_DEBUG LWIP_DBG_OFF #endif /** * TCPIP_DEBUG: Enable debugging in tcpip.c. */ -#ifndef TCPIP_DEBUG +#if !defined TCPIP_DEBUG || defined __DOXYGEN__ #define TCPIP_DEBUG LWIP_DBG_OFF #endif /** * SLIP_DEBUG: Enable debugging in slipif.c. */ -#ifndef SLIP_DEBUG +#if !defined SLIP_DEBUG || defined __DOXYGEN__ #define SLIP_DEBUG LWIP_DBG_OFF #endif /** * DHCP_DEBUG: Enable debugging in dhcp.c. */ -#ifndef DHCP_DEBUG +#if !defined DHCP_DEBUG || defined __DOXYGEN__ #define DHCP_DEBUG LWIP_DBG_OFF #endif /** * AUTOIP_DEBUG: Enable debugging in autoip.c. */ -#ifndef AUTOIP_DEBUG +#if !defined AUTOIP_DEBUG || defined __DOXYGEN__ #define AUTOIP_DEBUG LWIP_DBG_OFF #endif /** * DNS_DEBUG: Enable debugging for DNS. */ -#ifndef DNS_DEBUG +#if !defined DNS_DEBUG || defined __DOXYGEN__ #define DNS_DEBUG LWIP_DBG_OFF #endif /** * IP6_DEBUG: Enable debugging for IPv6. */ -#ifndef IP6_DEBUG +#if !defined IP6_DEBUG || defined __DOXYGEN__ #define IP6_DEBUG LWIP_DBG_OFF #endif +/** + * @} + */ /* -------------------------------------------------- ---------- Performance tracking options ---------- -------------------------------------------------- */ +/** + * @defgroup lwip_opts_perf Performance + * @ingroup lwip_opts + * @{ + */ /** * LWIP_PERF: Enable performance testing for lwIP * (if enabled, arch/perf.h is included) */ -#ifndef LWIP_PERF +#if !defined LWIP_PERF || defined __DOXYGEN__ #define LWIP_PERF 0 #endif +/** + * @} + */ #endif /* LWIP_HDR_OPT_H */ From d89378e3f82312b5133202cdce83d6ea0a49e9ae Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 20:21:04 +0200 Subject: [PATCH 233/275] opt.h documentation cleanups --- src/include/lwip/opt.h | 97 ++++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 51 deletions(-) diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index ade64e1c..5e80104e 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -52,31 +52,10 @@ #include "lwip/debug.h" /* - ----------------------------------------------- - ---------- Platform specific locking ---------- - ----------------------------------------------- + ------------------------------------ + -------------- NO SYS -------------- + ------------------------------------ */ -/** - * @defgroup lwip_opts_locking Platform specific locking - * @ingroup lwip_opts - * @{ - */ - -/** - * SYS_LIGHTWEIGHT_PROT==1: enable inter-task protection (and task-vs-interrupt - * protection) for certain critical regions during buffer allocation, deallocation - * and memory allocation and deallocation. - * ATTENTION: This is required when using lwIP from more than one context! If - * you disable this, you must be sure what you are doing! - */ -#if !defined SYS_LIGHTWEIGHT_PROT || defined __DOXYGEN__ -#define SYS_LIGHTWEIGHT_PROT 1 -#endif - -/** - * @} - */ - /** * @defgroup lwip_opts_nosys NO_SYS * @ingroup lwip_opts @@ -128,8 +107,13 @@ * @} */ +/* + ------------------------------------ + ----------- Core locking ----------- + ------------------------------------ +*/ /** - * @defgroup lwip_opts_misc Misc + * @defgroup lwip_opts_lock Core locking and MPU * @ingroup lwip_opts * @{ */ @@ -143,6 +127,41 @@ #if !defined LWIP_MPU_COMPATIBLE || defined __DOXYGEN__ #define LWIP_MPU_COMPATIBLE 0 #endif + +/** + * LWIP_TCPIP_CORE_LOCKING + * Creates a global mutex that is held during TCPIP thread operations. + * Can be locked by client code to perform lwIP operations without changing + * into TCPIP thread using callbacks. See LOCK_TCPIP_CORE() and + * UNLOCK_TCPIP_CORE(). + * Your system should provide mutexes supporting priority inversion to use this. + */ +#if !defined LWIP_TCPIP_CORE_LOCKING || defined __DOXYGEN__ +#define LWIP_TCPIP_CORE_LOCKING 1 +#endif + +/** + * LWIP_TCPIP_CORE_LOCKING_INPUT: when LWIP_TCPIP_CORE_LOCKING is enabled, + * this lets tcpip_input() grab the mutex for input packets as well, + * instead of allocating a message and passing it to tcpip_thread. + * + * ATTENTION: this does not work when tcpip_input() is called from + * interrupt context! + */ +#if !defined LWIP_TCPIP_CORE_LOCKING_INPUT || defined __DOXYGEN__ +#define LWIP_TCPIP_CORE_LOCKING_INPUT 0 +#endif + +/** + * SYS_LIGHTWEIGHT_PROT==1: enable inter-task protection (and task-vs-interrupt + * protection) for certain critical regions during buffer allocation, deallocation + * and memory allocation and deallocation. + * ATTENTION: This is required when using lwIP from more than one context! If + * you disable this, you must be sure what you are doing! + */ +#if !defined SYS_LIGHTWEIGHT_PROT || defined __DOXYGEN__ +#define SYS_LIGHTWEIGHT_PROT 1 +#endif /** * @} */ @@ -153,7 +172,7 @@ ------------------------------------ */ /** - * @defgroup lwip_opts_misc Misc + * @defgroup lwip_opts_mem Heap and memory pools * @ingroup lwip_opts * @{ */ @@ -1470,7 +1489,7 @@ ------------------------------------ */ /** - * @defgroup lwip_opts_loop SLIP interface + * @defgroup lwip_opts_slip SLIP interface * @ingroup lwip_opts * @{ */ @@ -1635,30 +1654,6 @@ * @ingroup lwip_opts * @{ */ -/** - * LWIP_TCPIP_CORE_LOCKING - * Creates a global mutex that is held during TCPIP thread operations. - * Can be locked by client code to perform lwIP operations without changing - * into TCPIP thread using callbacks. See LOCK_TCPIP_CORE() and - * UNLOCK_TCPIP_CORE(). - * Your system should provide mutexes supporting priority inversion to use this. - */ -#if !defined LWIP_TCPIP_CORE_LOCKING || defined __DOXYGEN__ -#define LWIP_TCPIP_CORE_LOCKING 1 -#endif - -/** - * LWIP_TCPIP_CORE_LOCKING_INPUT: when LWIP_TCPIP_CORE_LOCKING is enabled, - * this lets tcpip_input() grab the mutex for input packets as well, - * instead of allocating a message and passing it to tcpip_thread. - * - * ATTENTION: this does not work when tcpip_input() is called from - * interrupt context! - */ -#if !defined LWIP_TCPIP_CORE_LOCKING_INPUT || defined __DOXYGEN__ -#define LWIP_TCPIP_CORE_LOCKING_INPUT 0 -#endif - /** * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c) */ From fb7998699df7867155f97596150f74ddab0e142f Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 20:21:29 +0200 Subject: [PATCH 234/275] Minor doxygen options fix --- doc/doxygen/lwip.Doxyfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/doxygen/lwip.Doxyfile b/doc/doxygen/lwip.Doxyfile index 5fe97184..60449efe 100644 --- a/doc/doxygen/lwip.Doxyfile +++ b/doc/doxygen/lwip.Doxyfile @@ -2058,7 +2058,7 @@ INCLUDE_PATH = ../../src/include # used. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -INCLUDE_FILE_PATTERNS = *.c *.h +INCLUDE_FILE_PATTERNS = *.h # The PREDEFINED tag can be used to specify one or more macro names that are # defined before the preprocessor is started (similar to the -D option of e.g. From a39c040571c2b47a02b3805eddf79e1a5779c4df Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 20:23:51 +0200 Subject: [PATCH 235/275] opt.h documentation cosmetics --- src/include/lwip/opt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 5e80104e..34358d60 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -602,7 +602,7 @@ -------------------------------- */ /** - * @defgroup lwip_opts_ip IP + * @defgroup lwip_opts_ip4 IPv4 * @ingroup lwip_opts * @{ */ From b2b1ec14f5417ebb56088b4863f86683b4653b79 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 20:28:12 +0200 Subject: [PATCH 236/275] Make hook macros visible to doxygen --- src/include/lwip/opt.h | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 34358d60..f45a34e7 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -2349,7 +2349,12 @@ --------------------------------------- */ -/* Hooks are undefined by default, define them to a function if you need them. */ +/** + * @defgroup lwip_opts_hooks Hooks + * @ingroup lwip_opts + * Hooks are undefined by default, define them to a function if you need them. + * @{ + */ /** * LWIP_HOOK_IP4_INPUT(pbuf, input_netif): @@ -2362,6 +2367,9 @@ * If the hook consumed the packet, 'pbuf' is in the responsibility of the hook * (i.e. free it when done). */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_IP4_INPUT(pbuf, input_netif) +#endif /** * LWIP_HOOK_IP4_ROUTE(dest): @@ -2370,11 +2378,17 @@ * Returns the destination netif or NULL if no destination netif is found. In * that case, ip_route() continues as normal. */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_IP4_ROUTE() +#endif /** * LWIP_HOOK_IP4_ROUTE_SRC(dest, src): * - source-based routing for IPv4 (see LWIP_HOOK_IP4_ROUTE(), src may be NULL) */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_IP4_ROUTE_SRC(dest, src) +#endif /** * LWIP_HOOK_ETHARP_GET_GW(netif, dest): @@ -2388,6 +2402,9 @@ * LWIP_HOOK_IP4_ROUTE(). The actual routing/gateway table implementation is * not part of lwIP but can e.g. be hidden in the netif's state argument. */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_ETHARP_GET_GW(netif, dest) +#endif /** * LWIP_HOOK_IP6_INPUT(pbuf, input_netif): @@ -2400,6 +2417,9 @@ * If the hook consumed the packet, 'pbuf' is in the responsibility of the hook * (i.e. free it when done). */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_IP6_INPUT(pbuf, input_netif) +#endif /** * LWIP_HOOK_IP6_ROUTE(src, dest): @@ -2409,6 +2429,9 @@ * Returns the destination netif or NULL if no destination netif is found. In * that case, ip6_route() continues as normal. */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_IP6_ROUTE(src, dest) +#endif /** * LWIP_HOOK_VLAN_CHECK(netif, eth_hdr, vlan_hdr): @@ -2420,6 +2443,9 @@ * - 0: Packet must be dropped. * - != 0: Packet must be accepted. */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_VLAN_CHECK(netif, eth_hdr, vlan_hdr) +#endif /** * LWIP_HOOK_VLAN_SET(netif, eth_hdr, vlan_hdr): @@ -2432,11 +2458,20 @@ * - != 0: Packet shall contain VLAN header. * Hook can be used to set prio_vid field of vlan_hdr. */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_VLAN_SET(netif, eth_hdr, vlan_hdr) +#endif /** * LWIP_HOOK_MEMP_AVAILABLE(memp_t_type): * - called from memp_free() when a memp pool was empty and an item is now available */ +#ifdef __DOXYGEN__ +#define LWIP_HOOK_MEMP_AVAILABLE(memp_t_type) +#endif +/** + * @} + */ /* --------------------------------------- From 0e6f2049ade0ddd426269abd2ba2d9caa178e5fa Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 20:30:57 +0200 Subject: [PATCH 237/275] Minor main_page.h cosmetics --- doc/doxygen/main_page.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/doxygen/main_page.h b/doc/doxygen/main_page.h index a8378602..f7a16778 100644 --- a/doc/doxygen/main_page.h +++ b/doc/doxygen/main_page.h @@ -18,11 +18,12 @@ * @defgroup lwip_opts lwIP Options (lwipopts.h) */ -/** @mainpage Overview +/** + * @mainpage Overview * @verbinclude "README" */ - /** +/** * @page upgrading Upgrading * @verbinclude "UPGRADING" */ From 70927892e16fe6386d341d5e1affe5323ce1cfe4 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 20:32:18 +0200 Subject: [PATCH 238/275] Fix doxygen warning about debug parameters in memp.c Remove documentation from them, it is not important --- src/core/memp.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/core/memp.c b/src/core/memp.c index aca4b5e1..5d2c4fb5 100644 --- a/src/core/memp.c +++ b/src/core/memp.c @@ -361,10 +361,6 @@ do_memp_malloc_pool_fn(const struct memp_desc *desc, const char* file, const int * * @param desc the pool to get an element from * - * the debug version has two more parameters: - * @param file file name calling this function - * @param line number of line where this function is called - * * @return a pointer to the allocated memory or a NULL pointer on error */ void * @@ -391,10 +387,6 @@ memp_malloc_pool_fn(const struct memp_desc *desc, const char* file, const int li * * @param type the pool to get an element from * - * the debug version has two more parameters: - * @param file file name calling this function - * @param line number of line where this function is called - * * @return a pointer to the allocated memory or a NULL pointer on error */ void * From b14032c53131c6889b2aba4f9eba98768f94e123 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 20:33:53 +0200 Subject: [PATCH 239/275] Fix doxygen warning in opt.h --- src/include/lwip/opt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index f45a34e7..5134185d 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -1038,7 +1038,7 @@ * * Instead, you can also use an external function: * \#define DNS_LOOKUP_LOCAL_EXTERN(x) extern err_t my_lookup_function(const char *name, ip_addr_t *addr, u8_t dns_addrtype) - * that looks up the IP address and returns ERR_OK if found (LWIP_DNS_ADDRTYPE_* is passed in dns_addrtype). + * that looks up the IP address and returns ERR_OK if found (LWIP_DNS_ADDRTYPE_xxx is passed in dns_addrtype). */ #if !defined DNS_LOCAL_HOSTLIST || defined __DOXYGEN__ #define DNS_LOCAL_HOSTLIST 0 From 1bb2539f7461e5637030e7fe6deb4399e4122dc2 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Wed, 27 Jul 2016 20:49:19 +0200 Subject: [PATCH 240/275] Make options documentation a child of lwIP section --- doc/doxygen/main_page.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/doxygen/main_page.h b/doc/doxygen/main_page.h index f7a16778..e7e91534 100644 --- a/doc/doxygen/main_page.h +++ b/doc/doxygen/main_page.h @@ -1,6 +1,9 @@ /** * @defgroup lwip lwIP * + * @defgroup lwip_opts Options (lwipopts.h) + * @ingroup lwip + * * @defgroup infrastructure Infrastructure * * @defgroup callbackstyle_api Callback-style APIs @@ -14,8 +17,6 @@ * @defgroup addons Addons * * @defgroup apps Applications - * - * @defgroup lwip_opts lwIP Options (lwipopts.h) */ /** From a326b057b37ecbaa2f14b8a6f1d91e454198b1d5 Mon Sep 17 00:00:00 2001 From: sg Date: Wed, 27 Jul 2016 21:16:22 +0200 Subject: [PATCH 241/275] Fix bug #48568 (timeouts does not support late firing properly) by assuming sys_check_timeouts() jitter can' be too bad --- src/core/timeouts.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/timeouts.c b/src/core/timeouts.c index e630b7e2..9411800e 100644 --- a/src/core/timeouts.c +++ b/src/core/timeouts.c @@ -246,6 +246,12 @@ sys_timeout(u32_t msecs, sys_timeout_handler handler, void *arg) if (t->next == NULL || t->next->time > timeout->time) { if (t->next != NULL) { t->next->time -= timeout->time; + } else if (timeout->time > msecs) { + /* If this is the case, 'timeouts_last_time' and 'now' differs too much. + This can be due to sys_check_timeouts() not being called at the right + times, but also when stopping in a breakpoint. Anyway, let's assume + this is not wanted, so add the first timer's time instead of 'diff' */ + timeout->time = msecs + next_timeout->time; } timeout->next = t->next; t->next = timeout; From 53dc94d570798c56113b9e7225d9e3d54aa9e047 Mon Sep 17 00:00:00 2001 From: sg Date: Wed, 27 Jul 2016 21:46:16 +0200 Subject: [PATCH 242/275] added LWIP_TIMERS_CUSTOM to override the default implementation of timeouts --- CHANGELOG | 8 ++++++-- src/core/timeouts.c | 6 +++--- src/include/lwip/opt.h | 25 +++++++++++++++++++++---- src/include/lwip/priv/memp_std.h | 4 ++-- src/include/lwip/timeouts.h | 9 --------- 5 files changed, 32 insertions(+), 20 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index bd71cc17..39177b8f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,10 +6,14 @@ HISTORY ++ New features: - 2016-07-xx: Dirk Ziegelmeier: + 2016-07-27: Simon Goldschmidt + * opt.h, timeouts.h/.c: added LWIP_TIMERS_CUSTOM to override the default + implementation of timeouts + + 2016-07-xx: Dirk Ziegelmeier * Large overhaul of doxygen documentation - 2016-04-05: Simon Goldschmidt: + 2016-04-05: Simon Goldschmidt * timers.h/.c: prepare for overriding current timeout implementation: all stack-internal caclic timers are avaliable in the lwip_cyclic_timers array diff --git a/src/core/timeouts.c b/src/core/timeouts.c index 9411800e..6c692ccc 100644 --- a/src/core/timeouts.c +++ b/src/core/timeouts.c @@ -106,7 +106,7 @@ const struct lwip_cyclic_timer lwip_cyclic_timers[] = { #endif /* LWIP_IPV6 */ }; -#if LWIP_TIMERS +#if LWIP_TIMERS && LWIP_TIMERS_CUSTOM /** The one and only timeout list */ static struct sys_timeo *next_timeout; @@ -426,10 +426,10 @@ again: #endif /* NO_SYS */ -#else /* LWIP_TIMERS */ +#else /* LWIP_TIMERS && LWIP_TIMERS_CUSTOM */ /* Satisfy the TCP code which calls this function */ void tcp_timer_needed(void) { } -#endif /* LWIP_TIMERS */ +#endif /* LWIP_TIMERS && LWIP_TIMERS_CUSTOM */ diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 5134185d..98567ca4 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -73,11 +73,28 @@ #endif /** - * NO_SYS_NO_TIMERS==1: Drop support for sys_timeout when NO_SYS==1 - * Mainly for compatibility to old versions. + * LWIP_TIMERS==0: Drop support for sys_timeout and lwip-internal cyclic timers. + * (the array of lwip-internal cyclic timers is still provided) */ -#if !defined NO_SYS_NO_TIMERS || defined __DOXYGEN__ -#define NO_SYS_NO_TIMERS 0 +#ifndef LWIP_TIMERS +#define LWIP_TIMERS 1 +#endif + +/** + * LWIP_TIMERS_CUSTOM==1: Provide your own timer implementation. + * Function prototypes in timeouts.h and the array of lwip-internal cyclic timers + * are still included, but the implementation is not. The following functions + * will be required: sys_timeouts_init(), sys_timeout(), sys_untimeout(), + * sys_timeouts_mbox_fetch() + * (check NO_SYS_NO_TIMERS for compatibility to old versions) + */ +#if !defined LWIP_TIMERS_CUSTOM || defined __DOXYGEN__ +#ifdef NO_SYS_NO_TIMERS +#define LWIP_TIMERS (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS)) +#else +#define LWIP_TIMERS 1 +#endif +#define LWIP_TIMERS_CUSTOM 0 #endif /** * @} diff --git a/src/include/lwip/priv/memp_std.h b/src/include/lwip/priv/memp_std.h index 59f436df..ee3e2537 100644 --- a/src/include/lwip/priv/memp_std.h +++ b/src/include/lwip/priv/memp_std.h @@ -91,9 +91,9 @@ LWIP_MEMPOOL(ARP_QUEUE, MEMP_NUM_ARP_QUEUE, sizeof(struct etharp_q_en LWIP_MEMPOOL(IGMP_GROUP, MEMP_NUM_IGMP_GROUP, sizeof(struct igmp_group), "IGMP_GROUP") #endif /* LWIP_IGMP */ -#if (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS)) /* LWIP_TIMERS */ +#if LWIP_TIMERS && !LWIP_TIMERS_CUSTOM LWIP_MEMPOOL(SYS_TIMEOUT, MEMP_NUM_SYS_TIMEOUT, sizeof(struct sys_timeo), "SYS_TIMEOUT") -#endif /* LWIP_TIMERS */ +#endif /* LWIP_TIMERS && !LWIP_TIMERS_CUSTOM */ #if LWIP_DNS && LWIP_SOCKET LWIP_MEMPOOL(NETDB, MEMP_NUM_NETDB, NETDB_ELEM_SIZE, "NETDB") diff --git a/src/include/lwip/timeouts.h b/src/include/lwip/timeouts.h index 253c0fe6..4988b151 100644 --- a/src/include/lwip/timeouts.h +++ b/src/include/lwip/timeouts.h @@ -39,15 +39,6 @@ #define LWIP_HDR_TIMEOUTS_H #include "lwip/opt.h" - -/** Timers are not supported when NO_SYS==1 and NO_SYS_NO_TIMERS==1. - * Timer support can be disabled when cyclic timers are implemented - * differently (use lwip_cyclic_timers array) - */ -#ifndef LWIP_TIMERS -#define LWIP_TIMERS (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS)) -#endif - #include "lwip/err.h" #if !NO_SYS #include "lwip/sys.h" From 56102c1b1c482abef13cfd615c98f7a6a49d66d8 Mon Sep 17 00:00:00 2001 From: sg Date: Wed, 27 Jul 2016 21:47:36 +0200 Subject: [PATCH 243/275] fixed messed-up opt.h --- src/include/lwip/opt.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 98567ca4..c26ceae5 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -75,10 +75,15 @@ /** * LWIP_TIMERS==0: Drop support for sys_timeout and lwip-internal cyclic timers. * (the array of lwip-internal cyclic timers is still provided) + * (check NO_SYS_NO_TIMERS for compatibility to old versions) */ #ifndef LWIP_TIMERS +#ifdef NO_SYS_NO_TIMERS +#define LWIP_TIMERS (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS)) +#else #define LWIP_TIMERS 1 #endif +#endif /** * LWIP_TIMERS_CUSTOM==1: Provide your own timer implementation. @@ -86,14 +91,8 @@ * are still included, but the implementation is not. The following functions * will be required: sys_timeouts_init(), sys_timeout(), sys_untimeout(), * sys_timeouts_mbox_fetch() - * (check NO_SYS_NO_TIMERS for compatibility to old versions) */ #if !defined LWIP_TIMERS_CUSTOM || defined __DOXYGEN__ -#ifdef NO_SYS_NO_TIMERS -#define LWIP_TIMERS (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS)) -#else -#define LWIP_TIMERS 1 -#endif #define LWIP_TIMERS_CUSTOM 0 #endif /** From 23cf45d252bebdcf7d0db0e09386adf91a64e90f Mon Sep 17 00:00:00 2001 From: sg Date: Wed, 27 Jul 2016 21:48:29 +0200 Subject: [PATCH 244/275] d'oh! (fixed messed-up timeouts.h) --- src/core/timeouts.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/timeouts.c b/src/core/timeouts.c index 6c692ccc..fcba0a1a 100644 --- a/src/core/timeouts.c +++ b/src/core/timeouts.c @@ -106,7 +106,7 @@ const struct lwip_cyclic_timer lwip_cyclic_timers[] = { #endif /* LWIP_IPV6 */ }; -#if LWIP_TIMERS && LWIP_TIMERS_CUSTOM +#if LWIP_TIMERS && !LWIP_TIMERS_CUSTOM /** The one and only timeout list */ static struct sys_timeo *next_timeout; @@ -426,10 +426,10 @@ again: #endif /* NO_SYS */ -#else /* LWIP_TIMERS && LWIP_TIMERS_CUSTOM */ +#else /* LWIP_TIMERS && !LWIP_TIMERS_CUSTOM */ /* Satisfy the TCP code which calls this function */ void tcp_timer_needed(void) { } -#endif /* LWIP_TIMERS && LWIP_TIMERS_CUSTOM */ +#endif /* LWIP_TIMERS && !LWIP_TIMERS_CUSTOM */ From f322e782f863ed534c7d70e923e6aa5b14d4327e Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Thu, 28 Jul 2016 07:48:46 +0200 Subject: [PATCH 245/275] Add SNTP options to doxygen docs --- src/include/lwip/apps/sntp_opts.h | 42 +++++++++++++++++++------------ 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/src/include/lwip/apps/sntp_opts.h b/src/include/lwip/apps/sntp_opts.h index 063f549a..f3651f90 100644 --- a/src/include/lwip/apps/sntp_opts.h +++ b/src/include/lwip/apps/sntp_opts.h @@ -39,22 +39,28 @@ #include "lwip/opt.h" +/** + * @defgroup sntp_opts Options + * @ingroup sntp + * @{ + */ + /** SNTP macro to change system time in seconds * Define SNTP_SET_SYSTEM_TIME_US(sec, us) to set the time in microseconds instead of this one * if you need the additional precision. */ -#ifndef SNTP_SET_SYSTEM_TIME +#if !defined SNTP_SET_SYSTEM_TIME || defined __DOXYGEN__ #define SNTP_SET_SYSTEM_TIME(sec) LWIP_UNUSED_ARG(sec) #endif /** The maximum number of SNTP servers that can be set */ -#ifndef SNTP_MAX_SERVERS +#if !defined SNTP_MAX_SERVERS || defined __DOXYGEN__ #define SNTP_MAX_SERVERS LWIP_DHCP_MAX_NTP_SERVERS #endif /** Set this to 1 to implement the callback function called by dhcp when * NTP servers are received. */ -#ifndef SNTP_GET_SERVERS_FROM_DHCP +#if !defined SNTP_GET_SERVERS_FROM_DHCP || defined __DOXYGEN__ #define SNTP_GET_SERVERS_FROM_DHCP LWIP_DHCP_GET_NTP_SRV #endif @@ -62,24 +68,24 @@ * One server address/name can be defined as default if SNTP_SERVER_DNS == 1: * \#define SNTP_SERVER_ADDRESS "pool.ntp.org" */ -#ifndef SNTP_SERVER_DNS +#if !defined SNTP_SERVER_DNS || defined __DOXYGEN__ #define SNTP_SERVER_DNS 0 #endif /** * SNTP_DEBUG: Enable debugging for SNTP. */ -#ifndef SNTP_DEBUG +#if !defined SNTP_DEBUG || defined __DOXYGEN__ #define SNTP_DEBUG LWIP_DBG_OFF #endif /** SNTP server port */ -#ifndef SNTP_PORT +#if !defined SNTP_PORT || defined __DOXYGEN__ #define SNTP_PORT 123 #endif /** Set this to 1 to allow config of SNTP server(s) by DNS name */ -#ifndef SNTP_SERVER_DNS +#if !defined SNTP_SERVER_DNS || defined __DOXYGEN__ #define SNTP_SERVER_DNS 0 #endif @@ -97,7 +103,7 @@ * currently a cozy number like one second. This check avoids using a * server whose synchronization source has expired for a very long time. */ -#ifndef SNTP_CHECK_RESPONSE +#if !defined SNTP_CHECK_RESPONSE || defined __DOXYGEN__ #define SNTP_CHECK_RESPONSE 0 #endif @@ -107,14 +113,14 @@ * which must return the delay in milliseconds as u32_t. * Turned off by default. */ -#ifndef SNTP_STARTUP_DELAY +#if !defined SNTP_STARTUP_DELAY || defined __DOXYGEN__ #define SNTP_STARTUP_DELAY 0 #endif /** If you want the startup delay to be a function, define this * to a function (including the brackets) and define SNTP_STARTUP_DELAY to 1. */ -#ifndef SNTP_STARTUP_DELAY_FUNC +#if !defined SNTP_STARTUP_DELAY_FUNC || defined __DOXYGEN__ #define SNTP_STARTUP_DELAY_FUNC SNTP_STARTUP_DELAY #endif @@ -122,21 +128,21 @@ * Also used as retry timeout - this shouldn't be too low. * Default is 3 seconds. */ -#ifndef SNTP_RECV_TIMEOUT +#if !defined SNTP_RECV_TIMEOUT || defined __DOXYGEN__ #define SNTP_RECV_TIMEOUT 3000 #endif /** SNTP update delay - in milliseconds * Default is 1 hour. Must not be beolw 15 seconds by specification (i.e. 15000) */ -#ifndef SNTP_UPDATE_DELAY +#if !defined SNTP_UPDATE_DELAY || defined __DOXYGEN__ #define SNTP_UPDATE_DELAY 3600000 #endif /** SNTP macro to get system time, used with SNTP_CHECK_RESPONSE >= 2 * to send in request and compare in response. */ -#ifndef SNTP_GET_SYSTEM_TIME +#if !defined SNTP_GET_SYSTEM_TIME || defined __DOXYGEN__ #define SNTP_GET_SYSTEM_TIME(sec, us) do { (sec) = 0; (us) = 0; } while(0) #endif @@ -144,20 +150,24 @@ * received is invalid. * This is doubled with each retry until SNTP_RETRY_TIMEOUT_MAX is reached. */ -#ifndef SNTP_RETRY_TIMEOUT +#if !defined SNTP_RETRY_TIMEOUT || defined __DOXYGEN__ #define SNTP_RETRY_TIMEOUT SNTP_RECV_TIMEOUT #endif /** Maximum retry timeout (in milliseconds). */ -#ifndef SNTP_RETRY_TIMEOUT_MAX +#if !defined SNTP_RETRY_TIMEOUT_MAX || defined __DOXYGEN__ #define SNTP_RETRY_TIMEOUT_MAX (SNTP_RETRY_TIMEOUT * 10) #endif /** Increase retry timeout with every retry sent * Default is on to conform to RFC. */ -#ifndef SNTP_RETRY_TIMEOUT_EXP +#if !defined SNTP_RETRY_TIMEOUT_EXP || defined __DOXYGEN__ #define SNTP_RETRY_TIMEOUT_EXP 1 #endif +/** + * @} + */ + #endif /* LWIP_HDR_APPS_SNTP_OPTS_H */ From 93ad162aa6674988a6637ba07887545eae19d6a2 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Thu, 28 Jul 2016 08:03:32 +0200 Subject: [PATCH 246/275] Add SNMP and HTTPD options to doxygen docs --- src/include/lwip/apps/httpd_opts.h | 105 ++++++++++++++++------------- src/include/lwip/apps/snmp_opts.h | 86 +++++++++++++---------- 2 files changed, 109 insertions(+), 82 deletions(-) diff --git a/src/include/lwip/apps/httpd_opts.h b/src/include/lwip/apps/httpd_opts.h index 11109b96..5fa84024 100644 --- a/src/include/lwip/apps/httpd_opts.h +++ b/src/include/lwip/apps/httpd_opts.h @@ -43,34 +43,40 @@ #include "lwip/opt.h" +/** + * @defgroup httpd_opts Options + * @ingroup httpd + * @{ + */ + /** Set this to 1 to support CGI (old style) */ -#ifndef LWIP_HTTPD_CGI +#if !defined LWIP_HTTPD_CGI || defined __DOXYGEN__ #define LWIP_HTTPD_CGI 0 #endif /** Set this to 1 to support CGI (new style) */ -#ifndef LWIP_HTTPD_CGI_SSI +#if !defined LWIP_HTTPD_CGI_SSI || defined __DOXYGEN__ #define LWIP_HTTPD_CGI_SSI 0 #endif /** Set this to 1 to support SSI (Server-Side-Includes) */ -#ifndef LWIP_HTTPD_SSI +#if !defined LWIP_HTTPD_SSI || defined __DOXYGEN__ #define LWIP_HTTPD_SSI 0 #endif /** Set this to 1 to implement an SSI tag handler callback that gets a const char* * to the tag (instead of an index into a pre-registered array of known tags) */ -#ifndef LWIP_HTTPD_SSI_RAW +#if !defined LWIP_HTTPD_SSI_RAW || defined __DOXYGEN__ #define LWIP_HTTPD_SSI_RAW 0 #endif /** Set this to 1 to support HTTP POST */ -#ifndef LWIP_HTTPD_SUPPORT_POST +#if !defined LWIP_HTTPD_SUPPORT_POST || defined __DOXYGEN__ #define LWIP_HTTPD_SUPPORT_POST 0 #endif /* The maximum number of parameters that the CGI handler can be sent. */ -#ifndef LWIP_HTTPD_MAX_CGI_PARAMETERS +#if !defined LWIP_HTTPD_MAX_CGI_PARAMETERS || defined __DOXYGEN__ #define LWIP_HTTPD_MAX_CGI_PARAMETERS 16 #endif @@ -78,26 +84,26 @@ * arguments indicating a counter for insert string that are too long to be * inserted at once: the SSI handler function must then set 'next_tag_part' * which will be passed back to it in the next call. */ -#ifndef LWIP_HTTPD_SSI_MULTIPART +#if !defined LWIP_HTTPD_SSI_MULTIPART || defined __DOXYGEN__ #define LWIP_HTTPD_SSI_MULTIPART 0 #endif /* The maximum length of the string comprising the tag name */ -#ifndef LWIP_HTTPD_MAX_TAG_NAME_LEN +#if !defined LWIP_HTTPD_MAX_TAG_NAME_LEN || defined __DOXYGEN__ #define LWIP_HTTPD_MAX_TAG_NAME_LEN 8 #endif /* The maximum length of string that can be returned to replace any given tag */ -#ifndef LWIP_HTTPD_MAX_TAG_INSERT_LEN +#if !defined LWIP_HTTPD_MAX_TAG_INSERT_LEN || defined __DOXYGEN__ #define LWIP_HTTPD_MAX_TAG_INSERT_LEN 192 #endif -#ifndef LWIP_HTTPD_POST_MANUAL_WND +#if !defined LWIP_HTTPD_POST_MANUAL_WND || defined __DOXYGEN__ #define LWIP_HTTPD_POST_MANUAL_WND 0 #endif /** This string is passed in the HTTP header as "Server: " */ -#ifndef HTTPD_SERVER_AGENT +#if !defined HTTPD_SERVER_AGENT || defined __DOXYGEN__ #define HTTPD_SERVER_AGENT "lwIP/" LWIP_VERSION_STRING " (http://savannah.nongnu.org/projects/lwip)" #endif @@ -106,23 +112,23 @@ * by the makefsdata tool. Static headers mean smaller code size, but * the (readonly) fsdata will grow a bit as every file includes the HTTP * header. */ -#ifndef LWIP_HTTPD_DYNAMIC_HEADERS +#if !defined LWIP_HTTPD_DYNAMIC_HEADERS || defined __DOXYGEN__ #define LWIP_HTTPD_DYNAMIC_HEADERS 0 #endif -#ifndef HTTPD_DEBUG +#if !defined HTTPD_DEBUG || defined __DOXYGEN__ #define HTTPD_DEBUG LWIP_DBG_OFF #endif /** Set this to 1 to use a memp pool for allocating * struct http_state instead of the heap. */ -#ifndef HTTPD_USE_MEM_POOL +#if !defined HTTPD_USE_MEM_POOL || defined __DOXYGEN__ #define HTTPD_USE_MEM_POOL 0 #endif /** The server port for HTTPD to use */ -#ifndef HTTPD_SERVER_PORT +#if !defined HTTPD_SERVER_PORT || defined __DOXYGEN__ #define HTTPD_SERVER_PORT 80 #endif @@ -130,43 +136,44 @@ * - number of times pcb->poll is called -> default is 4*500ms = 2s; * - reset when pcb->sent is called */ -#ifndef HTTPD_MAX_RETRIES +#if !defined HTTPD_MAX_RETRIES || defined __DOXYGEN__ #define HTTPD_MAX_RETRIES 4 #endif /** The poll delay is X*500ms */ -#ifndef HTTPD_POLL_INTERVAL +#if !defined HTTPD_POLL_INTERVAL || defined __DOXYGEN__ #define HTTPD_POLL_INTERVAL 4 #endif /** Priority for tcp pcbs created by HTTPD (very low by default). * Lower priorities get killed first when running out of memory. */ -#ifndef HTTPD_TCP_PRIO +#if !defined HTTPD_TCP_PRIO || defined __DOXYGEN__ #define HTTPD_TCP_PRIO TCP_PRIO_MIN #endif /** Set this to 1 to enable timing each file sent */ -#ifndef LWIP_HTTPD_TIMING +#if !defined LWIP_HTTPD_TIMING || defined __DOXYGEN__ #define LWIP_HTTPD_TIMING 0 #endif -#ifndef HTTPD_DEBUG_TIMING +/** Set this to 1 to enable timing each file sent */ +#if !defined HTTPD_DEBUG_TIMING || defined __DOXYGEN__ #define HTTPD_DEBUG_TIMING LWIP_DBG_OFF #endif /** Set this to 1 on platforms where strnstr is not available */ -#ifndef LWIP_HTTPD_STRNSTR_PRIVATE +#if !defined LWIP_HTTPD_STRNSTR_PRIVATE || defined __DOXYGEN__ #define LWIP_HTTPD_STRNSTR_PRIVATE 1 #endif /** Set this to 1 on platforms where stricmp is not available */ -#ifndef LWIP_HTTPD_STRICMP_PRIVATE +#if !defined LWIP_HTTPD_STRICMP_PRIVATE || defined __DOXYGEN__ #define LWIP_HTTPD_STRICMP_PRIVATE 0 #endif /** Define this to a smaller function if you have itoa() at hand... */ -#ifndef LWIP_HTTPD_ITOA -#ifndef LWIP_HTTPD_ITOA_PRIVATE +#if !defined LWIP_HTTPD_ITOA || defined __DOXYGEN__ +#if !defined LWIP_HTTPD_ITOA_PRIVATE || defined __DOXYGEN__ #define LWIP_HTTPD_ITOA_PRIVATE 1 #endif #if LWIP_HTTPD_ITOA_PRIVATE @@ -178,12 +185,12 @@ /** Set this to one to show error pages when parsing a request fails instead of simply closing the connection. */ -#ifndef LWIP_HTTPD_SUPPORT_EXTSTATUS +#if !defined LWIP_HTTPD_SUPPORT_EXTSTATUS || defined __DOXYGEN__ #define LWIP_HTTPD_SUPPORT_EXTSTATUS 0 #endif /** Set this to 0 to drop support for HTTP/0.9 clients (to save some bytes) */ -#ifndef LWIP_HTTPD_SUPPORT_V09 +#if !defined LWIP_HTTPD_SUPPORT_V09 || defined __DOXYGEN__ #define LWIP_HTTPD_SUPPORT_V09 1 #endif @@ -191,32 +198,32 @@ * ATTENTION: If the generated file system includes HTTP headers, these must * include the "Connection: keep-alive" header (pass argument "-11" to makefsdata). */ -#ifndef LWIP_HTTPD_SUPPORT_11_KEEPALIVE +#if !defined LWIP_HTTPD_SUPPORT_11_KEEPALIVE || defined __DOXYGEN__ #define LWIP_HTTPD_SUPPORT_11_KEEPALIVE 0 #endif /** Set this to 1 to support HTTP request coming in in multiple packets/pbufs */ -#ifndef LWIP_HTTPD_SUPPORT_REQUESTLIST +#if !defined LWIP_HTTPD_SUPPORT_REQUESTLIST || defined __DOXYGEN__ #define LWIP_HTTPD_SUPPORT_REQUESTLIST 1 #endif #if LWIP_HTTPD_SUPPORT_REQUESTLIST /** Number of rx pbufs to enqueue to parse an incoming request (up to the first newline) */ -#ifndef LWIP_HTTPD_REQ_QUEUELEN +#if !defined LWIP_HTTPD_REQ_QUEUELEN || defined __DOXYGEN__ #define LWIP_HTTPD_REQ_QUEUELEN 5 #endif /** Number of (TCP payload-) bytes (in pbufs) to enqueue to parse and incoming request (up to the first double-newline) */ -#ifndef LWIP_HTTPD_REQ_BUFSIZE +#if !defined LWIP_HTTPD_REQ_BUFSIZE || defined __DOXYGEN__ #define LWIP_HTTPD_REQ_BUFSIZE LWIP_HTTPD_MAX_REQ_LENGTH #endif /** Defines the maximum length of a HTTP request line (up to the first CRLF, copied from pbuf into this a global buffer when pbuf- or packet-queues are received - otherwise the input pbuf is used directly) */ -#ifndef LWIP_HTTPD_MAX_REQ_LENGTH +#if !defined LWIP_HTTPD_MAX_REQ_LENGTH || defined __DOXYGEN__ #define LWIP_HTTPD_MAX_REQ_LENGTH LWIP_MIN(1023, (LWIP_HTTPD_REQ_QUEUELEN * PBUF_POOL_BUFSIZE)) #endif #endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ @@ -226,27 +233,27 @@ * configured default file names. * Set to 0 to disable checking default filenames on non-root directories. */ -#ifndef LWIP_HTTPD_MAX_REQUEST_URI_LEN +#if !defined LWIP_HTTPD_MAX_REQUEST_URI_LEN || defined __DOXYGEN__ #define LWIP_HTTPD_MAX_REQUEST_URI_LEN 63 #endif /** Maximum length of the filename to send as response to a POST request, * filled in by the application when a POST is finished. */ -#ifndef LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN +#if !defined LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN || defined __DOXYGEN__ #define LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN 63 #endif /** Set this to 0 to not send the SSI tag (default is on, so the tag will * be sent in the HTML page */ -#ifndef LWIP_HTTPD_SSI_INCLUDE_TAG +#if !defined LWIP_HTTPD_SSI_INCLUDE_TAG || defined __DOXYGEN__ #define LWIP_HTTPD_SSI_INCLUDE_TAG 1 #endif /** Set this to 1 to call tcp_abort when tcp_close fails with memory error. * This can be used to prevent consuming all memory in situations where the * HTTP server has low priority compared to other communication. */ -#ifndef LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR +#if !defined LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR || defined __DOXYGEN__ #define LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR 0 #endif @@ -254,30 +261,30 @@ * memory for 'struct http_state' or 'struct http_ssi_state'. * ATTENTION: This puts all connections on a linked list, so may be kind of slow. */ -#ifndef LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED +#if !defined LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED || defined __DOXYGEN__ #define LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED 0 #endif /** Set this to 1 to send URIs without extension without headers * (who uses this at all??) */ -#ifndef LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI +#if !defined LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI || defined __DOXYGEN__ #define LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI 0 #endif /** Default: Tags are sent from struct http_state and are therefore volatile */ -#ifndef HTTP_IS_TAG_VOLATILE +#if !defined HTTP_IS_TAG_VOLATILE || defined __DOXYGEN__ #define HTTP_IS_TAG_VOLATILE(ptr) TCP_WRITE_FLAG_COPY #endif /* By default, the httpd is limited to send 2*pcb->mss to keep resource usage low when http is not an important protocol in the device. */ -#ifndef HTTPD_LIMIT_SENDING_TO_2MSS +#if !defined HTTPD_LIMIT_SENDING_TO_2MSS || defined __DOXYGEN__ #define HTTPD_LIMIT_SENDING_TO_2MSS 1 #endif /* Define this to a function that returns the maximum amount of data to enqueue. The function have this signature: u16_t fn(struct tcp_pcb* pcb); */ -#ifndef HTTPD_MAX_WRITE_LEN +#if !defined HTTPD_MAX_WRITE_LEN || defined __DOXYGEN__ #if HTTPD_LIMIT_SENDING_TO_2MSS #define HTTPD_MAX_WRITE_LEN(pcb) (2 * tcp_mss(pcb)) #endif @@ -292,7 +299,7 @@ * - "void fs_close_custom(struct fs_file *file)" * Called to free resources allocated by fs_open_custom(). */ -#ifndef LWIP_HTTPD_CUSTOM_FILES +#if !defined LWIP_HTTPD_CUSTOM_FILES || defined __DOXYGEN__ #define LWIP_HTTPD_CUSTOM_FILES 0 #endif @@ -300,35 +307,39 @@ * Without this (default=off), only one-block files are supported, * and the contents must be ready after fs_open(). */ -#ifndef LWIP_HTTPD_DYNAMIC_FILE_READ +#if !defined LWIP_HTTPD_DYNAMIC_FILE_READ || defined __DOXYGEN__ #define LWIP_HTTPD_DYNAMIC_FILE_READ 0 #endif /** Set this to 1 to include an application state argument per file * that is opened. This allows to keep a state per connection/file. */ -#ifndef LWIP_HTTPD_FILE_STATE +#if !defined LWIP_HTTPD_FILE_STATE || defined __DOXYGEN__ #define LWIP_HTTPD_FILE_STATE 0 #endif /** HTTPD_PRECALCULATED_CHECKSUM==1: include precompiled checksums for * predefined (MSS-sized) chunks of the files to prevent having to calculate * the checksums at runtime. */ -#ifndef HTTPD_PRECALCULATED_CHECKSUM +#if !defined HTTPD_PRECALCULATED_CHECKSUM || defined __DOXYGEN__ #define HTTPD_PRECALCULATED_CHECKSUM 0 #endif /** LWIP_HTTPD_FS_ASYNC_READ==1: support asynchronous read operations * (fs_read_async returns FS_READ_DELAYED and calls a callback when finished). */ -#ifndef LWIP_HTTPD_FS_ASYNC_READ +#if !defined LWIP_HTTPD_FS_ASYNC_READ || defined __DOXYGEN__ #define LWIP_HTTPD_FS_ASYNC_READ 0 #endif /** Set this to 1 to include "fsdata_custom.c" instead of "fsdata.c" for the * file system (to prevent changing the file included in CVS) */ -#ifndef HTTPD_USE_CUSTOM_FSDATA +#if !defined HTTPD_USE_CUSTOM_FSDATA || defined __DOXYGEN__ #define HTTPD_USE_CUSTOM_FSDATA 0 #endif -#endif /* LWIP_HDR_APPS_HTTPD_OPTS_H */ +/** + * @} + */ + +#endif /* LWIP_HDR_APPS_HTTPD_OPTS_H */ diff --git a/src/include/lwip/apps/snmp_opts.h b/src/include/lwip/apps/snmp_opts.h index ff76d2ab..bf6f0093 100644 --- a/src/include/lwip/apps/snmp_opts.h +++ b/src/include/lwip/apps/snmp_opts.h @@ -39,6 +39,12 @@ #include "lwip/opt.h" +/** + * @defgroup snmp_opts Options + * @ingroup snmp + * @{ + */ + /** * LWIP_SNMP==1: This enables the lwIP SNMP agent. UDP must be available * for SNMP transport. @@ -47,25 +53,16 @@ * LWIP_MIB2_CALLBACKS and MIB2_STATS. This will give you the callbacks * and statistics counters you need to get MIB2 working. */ -#ifndef LWIP_SNMP +#if !defined LWIP_SNMP || defined __DOXYGEN__ #define LWIP_SNMP 0 #endif -/** - * LWIP_SNMP_V3==1: This enables EXPERIMENTAL SNMPv3 support. LWIP_SNMP must - * also be enabled. - * THIS IS UNDER DEVELOPMENT AND SHOULD NOT BE ENABLED IN PRODUCTS. - */ -#ifndef LWIP_SNMP_V3 -#define LWIP_SNMP_V3 0 -#endif - /** * SNMP_USE_NETCONN: Use netconn API instead of raw API. * Makes SNMP agent run in a worker thread, so blocking operations * can be done in MIB calls. */ -#ifndef SNMP_USE_NETCONN +#if !defined SNMP_USE_NETCONN || defined __DOXYGEN__ #define SNMP_USE_NETCONN 0 #endif @@ -74,7 +71,7 @@ * SNMP agent does not run in a worker thread, so blocking operations * should not be done in MIB calls. */ -#ifndef SNMP_USE_RAW +#if !defined SNMP_USE_RAW || defined __DOXYGEN__ #define SNMP_USE_RAW 1 #endif @@ -88,16 +85,16 @@ #if SNMP_USE_NETCONN /** - * SNMP_STACK_SIZE: Stack size of SNMP worker thread + * SNMP_STACK_SIZE: Stack size of SNMP netconn worker thread */ -#ifndef SNMP_STACK_SIZE +#if !defined SNMP_STACK_SIZE || defined __DOXYGEN__ #define SNMP_STACK_SIZE DEFAULT_THREAD_STACKSIZE #endif /** - * SNMP_THREAD_PRIO: SNMP worker thread priority + * SNMP_THREAD_PRIO: SNMP netconn worker thread priority */ -#ifndef SNMP_THREAD_PRIO +#if !defined SNMP_THREAD_PRIO || defined __DOXYGEN__ #define SNMP_THREAD_PRIO DEFAULT_THREAD_PRIO #endif #endif /* SNMP_USE_NETCONN */ @@ -106,7 +103,7 @@ * SNMP_TRAP_DESTINATIONS: Number of trap destinations. At least one trap * destination is required */ -#ifndef SNMP_TRAP_DESTINATIONS +#if !defined SNMP_TRAP_DESTINATIONS || defined __DOXYGEN__ #define SNMP_TRAP_DESTINATIONS 1 #endif @@ -115,14 +112,14 @@ * a safe action and disabled when SNMP_SAFE_REQUESTS = 1). * Unsafe requests are disabled by default! */ -#ifndef SNMP_SAFE_REQUESTS +#if !defined SNMP_SAFE_REQUESTS || defined __DOXYGEN__ #define SNMP_SAFE_REQUESTS 1 #endif /** * The maximum length of strings used. */ -#ifndef SNMP_MAX_OCTET_STRING_LEN +#if !defined SNMP_MAX_OCTET_STRING_LEN || defined __DOXYGEN__ #define SNMP_MAX_OCTET_STRING_LEN 127 #endif @@ -130,15 +127,18 @@ * The maximum number of Sub ID's inside an object identifier. * Indirectly this also limits the maximum depth of SNMP tree. */ -#ifndef SNMP_MAX_OBJ_ID_LEN +#if !defined SNMP_MAX_OBJ_ID_LEN || defined __DOXYGEN__ #define SNMP_MAX_OBJ_ID_LEN 50 #endif +#if !defined SNMP_MAX_VALUE_SIZE || defined __DOXYGEN__ /** * The maximum size of a value. */ -#ifndef SNMP_MAX_VALUE_SIZE #define SNMP_MIN_VALUE_SIZE (2 * sizeof(u32_t*)) /* size required to store the basic types (8 bytes for counter64) */ +/** + * The minimum size of a value. + */ #define SNMP_MAX_VALUE_SIZE LWIP_MAX(LWIP_MAX((SNMP_MAX_OCTET_STRING_LEN), sizeof(u32_t)*(SNMP_MAX_OBJ_ID_LEN)), SNMP_MIN_VALUE_SIZE) #endif @@ -146,7 +146,7 @@ * The snmp read-access community. Used for write-access and traps, too * unless SNMP_COMMUNITY_WRITE or SNMP_COMMUNITY_TRAP are enabled, respectively. */ -#ifndef SNMP_COMMUNITY +#if !defined SNMP_COMMUNITY || defined __DOXYGEN__ #define SNMP_COMMUNITY "public" #endif @@ -154,14 +154,14 @@ * The snmp write-access community. * Set this community to "" in order to disallow any write access. */ -#ifndef SNMP_COMMUNITY_WRITE +#if !defined SNMP_COMMUNITY_WRITE || defined __DOXYGEN__ #define SNMP_COMMUNITY_WRITE "private" #endif /** * The snmp community used for sending traps. */ -#ifndef SNMP_COMMUNITY_TRAP +#if !defined SNMP_COMMUNITY_TRAP || defined __DOXYGEN__ #define SNMP_COMMUNITY_TRAP "public" #endif @@ -170,14 +170,15 @@ * If community names shall be adjusted at runtime via snmp_set_community() calls, * enter here the possible maximum length (+1 for terminating null character). */ -#ifndef SNMP_MAX_COMMUNITY_STR_LEN +#if !defined SNMP_MAX_COMMUNITY_STR_LEN || defined __DOXYGEN__ #define SNMP_MAX_COMMUNITY_STR_LEN LWIP_MAX(LWIP_MAX(sizeof(SNMP_COMMUNITY), sizeof(SNMP_COMMUNITY_WRITE)), sizeof(SNMP_COMMUNITY_TRAP)) #endif /** * The OID identifiying the device. This may be the enterprise OID itself or any OID located below it in tree. */ -#ifndef SNMP_DEVICE_ENTERPRISE_OID +#if !defined SNMP_DEVICE_ENTERPRISE_OID || defined __DOXYGEN__ +#define SNMP_LWIP_ENTERPRISE_OID 26381 /** * IANA assigned enterprise ID for lwIP is 26381 * @see http://www.iana.org/assignments/enterprise-numbers @@ -191,36 +192,38 @@ * to apply for your own enterprise ID with IANA: * http://www.iana.org/numbers.html */ -#define SNMP_LWIP_ENTERPRISE_OID 26381 #define SNMP_DEVICE_ENTERPRISE_OID {1, 3, 6, 1, 4, 1, SNMP_LWIP_ENTERPRISE_OID} +/** + * Length of SNMP_DEVICE_ENTERPRISE_OID + */ #define SNMP_DEVICE_ENTERPRISE_OID_LEN 7 #endif /** * SNMP_DEBUG: Enable debugging for SNMP messages. */ -#ifndef SNMP_DEBUG +#if !defined SNMP_DEBUG || defined __DOXYGEN__ #define SNMP_DEBUG LWIP_DBG_OFF #endif /** * SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs. */ -#ifndef SNMP_MIB_DEBUG +#if !defined SNMP_MIB_DEBUG || defined __DOXYGEN__ #define SNMP_MIB_DEBUG LWIP_DBG_OFF #endif /** * Indicates if the MIB2 implementation of LWIP SNMP stack is used. */ -#ifndef SNMP_LWIP_MIB2 +#if !defined SNMP_LWIP_MIB2 || defined __DOXYGEN__ #define SNMP_LWIP_MIB2 LWIP_SNMP #endif /** * Value return for sysDesc field of MIB2. */ -#ifndef SNMP_LWIP_MIB2_SYSDESC +#if !defined SNMP_LWIP_MIB2_SYSDESC || defined __DOXYGEN__ #define SNMP_LWIP_MIB2_SYSDESC "lwIP" #endif @@ -228,7 +231,7 @@ * Value return for sysName field of MIB2. * To make sysName field settable, call snmp_mib2_set_sysname() to provide the necessary buffers. */ -#ifndef SNMP_LWIP_MIB2_SYSNAME +#if !defined SNMP_LWIP_MIB2_SYSNAME || defined __DOXYGEN__ #define SNMP_LWIP_MIB2_SYSNAME "FQDN-unk" #endif @@ -236,7 +239,7 @@ * Value return for sysContact field of MIB2. * To make sysContact field settable, call snmp_mib2_set_syscontact() to provide the necessary buffers. */ -#ifndef SNMP_LWIP_MIB2_SYSCONTACT +#if !defined SNMP_LWIP_MIB2_SYSCONTACT || defined __DOXYGEN__ #define SNMP_LWIP_MIB2_SYSCONTACT "" #endif @@ -244,7 +247,7 @@ * Value return for sysLocation field of MIB2. * To make sysLocation field settable, call snmp_mib2_set_syslocation() to provide the necessary buffers. */ -#ifndef SNMP_LWIP_MIB2_SYSLOCATION +#if !defined SNMP_LWIP_MIB2_SYSLOCATION || defined __DOXYGEN__ #define SNMP_LWIP_MIB2_SYSLOCATION "" #endif @@ -256,16 +259,29 @@ * For the stack this could be useful in case that SNMP processing is done in TCP/IP thread. In this situation a request with many * repetitions could block the thread for a longer time. Setting limit here will keep the stack more responsive. */ -#ifndef SNMP_LWIP_GETBULK_MAX_REPETITIONS +#if !defined SNMP_LWIP_GETBULK_MAX_REPETITIONS || defined __DOXYGEN__ #define SNMP_LWIP_GETBULK_MAX_REPETITIONS 0 #endif +/** + * @} + */ + /* ------------------------------------ ---------- SNMPv3 options ---------- ------------------------------------ */ +/** + * LWIP_SNMP_V3==1: This enables EXPERIMENTAL SNMPv3 support. LWIP_SNMP must + * also be enabled. + * THIS IS UNDER DEVELOPMENT AND SHOULD NOT BE ENABLED IN PRODUCTS. + */ +#ifndef LWIP_SNMP_V3 +#define LWIP_SNMP_V3 0 +#endif + #ifndef LWIP_SNMP_V3_CRYPTO #define LWIP_SNMP_V3_CRYPTO LWIP_SNMP_V3 #endif From f7e12d835c0bdc77655b2129ee1a1c93ea66335b Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Thu, 28 Jul 2016 08:05:57 +0200 Subject: [PATCH 247/275] Add NETBIOSNS options to doxygen docs --- src/include/lwip/apps/netbiosns_opts.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/include/lwip/apps/netbiosns_opts.h b/src/include/lwip/apps/netbiosns_opts.h index 9fe35022..870b9fdf 100644 --- a/src/include/lwip/apps/netbiosns_opts.h +++ b/src/include/lwip/apps/netbiosns_opts.h @@ -34,13 +34,19 @@ #include "lwip/opt.h" +/** + * @defgroup netbiosns_opts Options + * @ingroup netbiosns + * @{ + */ + /** Since there's no standard function for case-insensitive string comparision, * we need another define here: * define this to stricmp() for windows or strcasecmp() for linux. * If not defined, comparision is case sensitive and the provided hostname must be * uppercase. */ -#ifndef NETBIOS_STRCMP +#if !defined NETBIOS_STRCMP || defined __DOXYGEN__ #define NETBIOS_STRCMP(str1, str2) strcmp(str1, str2) #endif @@ -52,7 +58,12 @@ * * If this is not defined, netbiosns_set_name() can be called at runtime to change the name. */ -/*#define NETBIOS_LWIP_NAME "NETBIOSLWIPDEV"*/ +#ifdef __DOXYGEN__ +#define NETBIOS_LWIP_NAME "NETBIOSLWIPDEV" +#endif +/** + * @} + */ #endif /* LWIP_HDR_APPS_NETBIOS_OPTS_H */ From 5bcaefddd49c824d95f97187e8877c9a2672fbef Mon Sep 17 00:00:00 2001 From: goldsimon Date: Thu, 28 Jul 2016 08:06:17 +0200 Subject: [PATCH 248/275] lwiperf: improved documentation, removed unused enum members --- src/apps/lwiperf/lwiperf.c | 8 ++++---- src/include/lwip/apps/lwiperf.h | 19 +++++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/apps/lwiperf/lwiperf.c b/src/apps/lwiperf/lwiperf.c index cef0d728..06868676 100644 --- a/src/apps/lwiperf/lwiperf.c +++ b/src/apps/lwiperf/lwiperf.c @@ -1,17 +1,17 @@ /** * @file - * LWIP iperf server implementation + * lwIP iPerf server implementation */ /** * @defgroup iperf Iperf server * @ingroup apps * - * This is simple "Iperf" server to check your bandwith using Iperf on a PC as client. + * This is a simple performance measuring server to check your bandwith using + * iPerf2 on a PC as client. * It is currently a minimal implementation providing an IPv4 TCP server only. * - * @todo: - * - implement UDP mode + * @todo: implement UDP mode and IPv6 */ /* diff --git a/src/include/lwip/apps/lwiperf.h b/src/include/lwip/apps/lwiperf.h index 746c8247..7dbebb08 100644 --- a/src/include/lwip/apps/lwiperf.h +++ b/src/include/lwip/apps/lwiperf.h @@ -1,6 +1,6 @@ /** * @file - * IPERF implementation + * lwIP iPerf server implementation */ /* @@ -46,23 +46,26 @@ extern "C" { #define LWIPERF_TCP_PORT_DEFAULT 5001 +/** lwIPerf test results */ enum lwiperf_report_type { - LWIPERF_TCP_STARTED = 0, + /** The server side test is done */ LWIPERF_TCP_DONE_SERVER, + /** The client side test is done */ LWIPERF_TCP_DONE_CLIENT, + /** Local error lead to test abort */ LWIPERF_TCP_ABORTED_LOCAL, + /** Data check error lead to test abort */ LWIPERF_TCP_ABORTED_LOCAL_DATAERROR, + /** Transmit error lead to test abort */ LWIPERF_TCP_ABORTED_LOCAL_TXERROR, - LWIPERF_TCP_ABORTED_REMOTE, - LWIPERF_UDP_STARTED, - LWIPERF_UDP_DONE, - LWIPERF_UDP_ABORTED_LOCAL, - LWIPERF_UDP_ABORTED_REMOTE + /** Remote side aborted the test */ + LWIPERF_TCP_ABORTED_REMOTE }; /** Prototype of a report function that is called when a session is finished. - This report function can show the test results. */ + This report function can show the test results. + @param report_type contains the test result */ typedef void (*lwiperf_report_fn)(void *arg, enum lwiperf_report_type report_type, const ip_addr_t* local_addr, u16_t local_port, const ip_addr_t* remote_addr, u16_t remote_port, u32_t bytes_transferred, u32_t ms_duration, u32_t bandwidth_kbitpsec); From bdaec1691e89a934b3f433fc605ce5bdd0df3708 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Thu, 28 Jul 2016 08:20:18 +0200 Subject: [PATCH 249/275] doxygen: put the new timer defines into their own section --- src/include/lwip/opt.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index c26ceae5..7069632d 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -71,13 +71,21 @@ #if !defined NO_SYS || defined __DOXYGEN__ #define NO_SYS 0 #endif +/** + * @} + */ +/** + * @defgroup lwip_opts_timers Timers + * @ingroup lwip_opts + * @{ + */ /** * LWIP_TIMERS==0: Drop support for sys_timeout and lwip-internal cyclic timers. * (the array of lwip-internal cyclic timers is still provided) * (check NO_SYS_NO_TIMERS for compatibility to old versions) */ -#ifndef LWIP_TIMERS +#ifndef LWIP_TIMERS || defined __DOXYGEN__ #ifdef NO_SYS_NO_TIMERS #define LWIP_TIMERS (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS)) #else From b0284a692745ee8795f3495ecaf21a6aef9132ab Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Thu, 28 Jul 2016 08:27:49 +0200 Subject: [PATCH 250/275] Move definition of options group from main_page.h to opt.h - it's more consistent like that --- doc/doxygen/lwip.Doxyfile | 1 + doc/doxygen/main_page.h | 3 --- src/include/lwip/opt.h | 9 +++++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/doxygen/lwip.Doxyfile b/doc/doxygen/lwip.Doxyfile index 60449efe..dd5f828c 100644 --- a/doc/doxygen/lwip.Doxyfile +++ b/doc/doxygen/lwip.Doxyfile @@ -2081,6 +2081,7 @@ PREDEFINED = __DOXYGEN__=1 \ LWIP_IGMP=1 \ LWIP_TCP=1 \ LWIP_SNMP=1 \ + SNMP_USE_NETCONN=1 \ SNMP_USE_RAW=1 \ MEMP_OVERFLOW_CHECK=0 \ MEMP_SANITY_CHECK=1 \ diff --git a/doc/doxygen/main_page.h b/doc/doxygen/main_page.h index e7e91534..9f01d9f3 100644 --- a/doc/doxygen/main_page.h +++ b/doc/doxygen/main_page.h @@ -1,8 +1,5 @@ /** * @defgroup lwip lwIP - * - * @defgroup lwip_opts Options (lwipopts.h) - * @ingroup lwip * * @defgroup infrastructure Infrastructure * diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 7069632d..86c7520a 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -51,7 +51,12 @@ #include "lwipopts.h" #include "lwip/debug.h" -/* +/** + * @defgroup lwip_opts Options (lwipopts.h) + * @ingroup lwip + */ + + /* ------------------------------------ -------------- NO SYS -------------- ------------------------------------ @@ -108,7 +113,7 @@ */ /** - * @defgroup lwip_opts_memcpy memcpy at al. + * @defgroup lwip_opts_memcpy memcpy * @ingroup lwip_opts * @{ */ From eac1005c9cfd7b2ed137d1c005d48ad13ef8b5eb Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Thu, 28 Jul 2016 08:41:21 +0200 Subject: [PATCH 251/275] Start to add hierarchy to opt.h doxygen docs --- src/include/lwip/opt.h | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 86c7520a..2658962e 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -54,6 +54,15 @@ /** * @defgroup lwip_opts Options (lwipopts.h) * @ingroup lwip + * + * @defgroup lwip_opts_debug Debugging + * @ingroup lwip_opts + * + * @defgroup lwip_opts_callback Callback-style APIs + * @ingroup lwip_opts + * + * @defgroup lwip_opts_threadsafe_apis Thread-safe APIs + * @ingroup lwip_opts */ /* @@ -520,7 +529,7 @@ */ /** * @defgroup lwip_opts_arp ARP - * @ingroup lwip_opts + * @ingroup lwip_opts_ipv4 * @{ */ /** @@ -631,7 +640,7 @@ -------------------------------- */ /** - * @defgroup lwip_opts_ip4 IPv4 + * @defgroup lwip_opts_ipv4 IPv4 * @ingroup lwip_opts * @{ */ @@ -780,7 +789,7 @@ */ /** * @defgroup lwip_opts_icmp ICMP - * @ingroup lwip_opts + * @ingroup lwip_opts_ipv4 * @{ */ /** @@ -822,7 +831,7 @@ */ /** * @defgroup lwip_opts_raw RAW - * @ingroup lwip_opts + * @ingroup lwip_opts_callback * @{ */ /** @@ -849,7 +858,7 @@ */ /** * @defgroup lwip_opts_dhcp DHCP - * @ingroup lwip_opts + * @ingroup lwip_opts_ipv4 * @{ */ /** @@ -914,7 +923,7 @@ */ /** * @defgroup lwip_opts_autoip AUTOIP - * @ingroup lwip_opts + * @ingroup lwip_opts_ipv4 * @{ */ /** @@ -980,7 +989,7 @@ */ /** * @defgroup lwip_opts_igmp IGMP - * @ingroup lwip_opts + * @ingroup lwip_opts_ipv4 * @{ */ /** @@ -1089,7 +1098,7 @@ */ /** * @defgroup lwip_opts_udp UDP - * @ingroup lwip_opts + * @ingroup lwip_opts_callback * @{ */ /** @@ -1130,7 +1139,7 @@ */ /** * @defgroup lwip_opts_tcp TCP - * @ingroup lwip_opts + * @ingroup lwip_opts_callback * @{ */ /** @@ -1680,7 +1689,7 @@ */ /** * @defgroup lwip_opts_netconn Netconn - * @ingroup lwip_opts + * @ingroup lwip_opts_threadsafe_apis * @{ */ /** @@ -1733,7 +1742,7 @@ */ /** * @defgroup lwip_opts_socket Sockets - * @ingroup lwip_opts + * @ingroup lwip_opts_threadsafe_apis * @{ */ /** @@ -1879,7 +1888,7 @@ */ /** * @defgroup lwip_opts_stats Statistics - * @ingroup lwip_opts + * @ingroup lwip_opts_debug * @{ */ /** @@ -2508,8 +2517,8 @@ --------------------------------------- */ /** - * @defgroup lwip_opts_debug Debugging - * @ingroup lwip_opts + * @defgroup lwip_opts_debugmsg Debugging + * @ingroup lwip_opts_debug * @{ */ /** @@ -2764,7 +2773,7 @@ */ /** * @defgroup lwip_opts_perf Performance - * @ingroup lwip_opts + * @ingroup lwip_opts_debug * @{ */ /** From 161ee4f4b227c261c4e09ade85ebd04a19e0a777 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Thu, 28 Jul 2016 08:47:51 +0200 Subject: [PATCH 252/275] Work on opt.h hierarchy --- src/include/lwip/opt.h | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 2658962e..8d618c5f 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -58,6 +58,9 @@ * @defgroup lwip_opts_debug Debugging * @ingroup lwip_opts * + * @defgroup lwip_opts_infrastructure Infrastructure + * @ingroup lwip_opts + * * @defgroup lwip_opts_callback Callback-style APIs * @ingroup lwip_opts * @@ -72,7 +75,7 @@ */ /** * @defgroup lwip_opts_nosys NO_SYS - * @ingroup lwip_opts + * @ingroup lwip_opts_infrastructure * @{ */ /** @@ -91,7 +94,7 @@ /** * @defgroup lwip_opts_timers Timers - * @ingroup lwip_opts + * @ingroup lwip_opts_infrastructure * @{ */ /** @@ -123,7 +126,7 @@ /** * @defgroup lwip_opts_memcpy memcpy - * @ingroup lwip_opts + * @ingroup lwip_opts_infrastructure * @{ */ /** @@ -152,7 +155,7 @@ */ /** * @defgroup lwip_opts_lock Core locking and MPU - * @ingroup lwip_opts + * @ingroup lwip_opts_infrastructure * @{ */ /** @@ -211,7 +214,7 @@ */ /** * @defgroup lwip_opts_mem Heap and memory pools - * @ingroup lwip_opts + * @ingroup lwip_opts_infrastructure * @{ */ /** @@ -334,7 +337,7 @@ */ /** * @defgroup lwip_opts_memp Internal memory pools - * @ingroup lwip_opts + * @ingroup lwip_opts_infrastructure * @{ */ /** @@ -966,8 +969,8 @@ ---------------------------------- */ /** - * @defgroup lwip_opts_mib2 MIB2 - * @ingroup lwip_opts + * @defgroup lwip_opts_mib2 SNMP MIB2 callbacks + * @ingroup lwip_opts_infrastructure * @{ */ /** @@ -1021,7 +1024,7 @@ */ /** * @defgroup lwip_opts_dns DNS - * @ingroup lwip_opts + * @ingroup lwip_opts_callback * @{ */ /** @@ -1548,7 +1551,7 @@ */ /** * @defgroup lwip_opts_thread Threading - * @ingroup lwip_opts + * @ingroup lwip_opts_infrastructure * @{ */ /** @@ -2062,7 +2065,7 @@ */ /** * @defgroup lwip_opts_checksum Checksum - * @ingroup lwip_opts + * @ingroup lwip_opts_infrastructure * @{ */ /** @@ -2389,7 +2392,7 @@ /** * @defgroup lwip_opts_hooks Hooks - * @ingroup lwip_opts + * @ingroup lwip_opts_infrastructure * Hooks are undefined by default, define them to a function if you need them. * @{ */ From 71dc8f8f53b4c2e9fb2101df7f54061de0ec6626 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Thu, 28 Jul 2016 09:00:37 +0200 Subject: [PATCH 253/275] opt.h loopback options cleanup --- src/include/lwip/opt.h | 84 +++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 8d618c5f..e88a671c 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -1446,6 +1446,48 @@ #define LWIP_NETIF_HWADDRHINT 0 #endif +/** + * LWIP_NETIF_TX_SINGLE_PBUF: if this is set to 1, lwIP tries to put all data + * to be sent into one single pbuf. This is for compatibility with DMA-enabled + * MACs that do not support scatter-gather. + * Beware that this might involve CPU-memcpy before transmitting that would not + * be needed without this flag! Use this only if you need to! + * + * @todo: TCP and IP-frag do not work with this, yet: + */ +#if !defined LWIP_NETIF_TX_SINGLE_PBUF || defined __DOXYGEN__ +#define LWIP_NETIF_TX_SINGLE_PBUF 0 +#endif /* LWIP_NETIF_TX_SINGLE_PBUF */ +/** + * @} + */ + +/* + ------------------------------------ + ---------- LOOPIF options ---------- + ------------------------------------ +*/ +/** + * @defgroup lwip_opts_loop Loopback interface + * @ingroup lwip_opts_netif + * @{ + */ +/** + * LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1). + * This is only needed when no real netifs are available. If at least one other + * netif is available, loopback traffic uses this netif. + */ +#if !defined LWIP_HAVE_LOOPIF || defined __DOXYGEN__ +#define LWIP_HAVE_LOOPIF LWIP_NETIF_LOOPBACK +#endif + +/** + * LWIP_LOOPIF_MULTICAST==1: Support multicast/IGMP on loop interface (127.0.0.1). + */ +#if !defined LWIP_LOOPIF_MULTICAST || defined __DOXYGEN__ +#define LWIP_LOOPIF_MULTICAST 0 +#endif + /** * LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP * address equal to the netif IP address, looping them back up the stack. @@ -1478,48 +1520,6 @@ #if !defined LWIP_NETIF_LOOPBACK_MULTITHREADING || defined __DOXYGEN__ #define LWIP_NETIF_LOOPBACK_MULTITHREADING (!NO_SYS) #endif - -/** - * LWIP_NETIF_TX_SINGLE_PBUF: if this is set to 1, lwIP tries to put all data - * to be sent into one single pbuf. This is for compatibility with DMA-enabled - * MACs that do not support scatter-gather. - * Beware that this might involve CPU-memcpy before transmitting that would not - * be needed without this flag! Use this only if you need to! - * - * @todo: TCP and IP-frag do not work with this, yet: - */ -#if !defined LWIP_NETIF_TX_SINGLE_PBUF || defined __DOXYGEN__ -#define LWIP_NETIF_TX_SINGLE_PBUF 0 -#endif /* LWIP_NETIF_TX_SINGLE_PBUF */ -/** - * @} - */ - -/* - ------------------------------------ - ---------- LOOPIF options ---------- - ------------------------------------ -*/ -/** - * @defgroup lwip_opts_loop Loopback interface - * @ingroup lwip_opts - * @{ - */ -/** - * LWIP_HAVE_LOOPIF==1: Support loop interface (127.0.0.1). - * This is only needed when no real netifs are available. If at least one other - * netif is available, loopback traffic uses this netif. - */ -#if !defined LWIP_HAVE_LOOPIF || defined __DOXYGEN__ -#define LWIP_HAVE_LOOPIF LWIP_NETIF_LOOPBACK -#endif - -/** - * LWIP_LOOPIF_MULTICAST==1: Support multicast/IGMP on loop interface (127.0.0.1). - */ -#if !defined LWIP_LOOPIF_MULTICAST || defined __DOXYGEN__ -#define LWIP_LOOPIF_MULTICAST 0 -#endif /** * @} */ From b4efa33b7c255d8e1b272dd012714560071fa60d Mon Sep 17 00:00:00 2001 From: goldsimon Date: Thu, 28 Jul 2016 09:02:19 +0200 Subject: [PATCH 254/275] Removed the LWIP_HAVE_SLIPIF option: either the linker removes it when not used or you'll have to not compile it --- src/include/lwip/opt.h | 22 +--------------------- src/netif/slipif.c | 4 ---- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index e88a671c..4714947a 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -102,7 +102,7 @@ * (the array of lwip-internal cyclic timers is still provided) * (check NO_SYS_NO_TIMERS for compatibility to old versions) */ -#ifndef LWIP_TIMERS || defined __DOXYGEN__ +#if !defined LWIP_TIMERS || defined __DOXYGEN__ #ifdef NO_SYS_NO_TIMERS #define LWIP_TIMERS (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS)) #else @@ -1524,26 +1524,6 @@ * @} */ -/* - ------------------------------------ - ---------- SLIPIF options ---------- - ------------------------------------ -*/ -/** - * @defgroup lwip_opts_slip SLIP interface - * @ingroup lwip_opts - * @{ - */ -/** - * LWIP_HAVE_SLIPIF==1: Support slip interface and slipif.c - */ -#if !defined LWIP_HAVE_SLIPIF || defined __DOXYGEN__ -#define LWIP_HAVE_SLIPIF 0 -#endif -/** - * @} - */ - /* ------------------------------------ ---------- Thread options ---------- diff --git a/src/netif/slipif.c b/src/netif/slipif.c index 8849cc32..f6c5d4b7 100644 --- a/src/netif/slipif.c +++ b/src/netif/slipif.c @@ -62,8 +62,6 @@ #include "netif/slipif.h" #include "lwip/opt.h" -#if LWIP_HAVE_SLIPIF - #include "lwip/def.h" #include "lwip/pbuf.h" #include "lwip/stats.h" @@ -555,5 +553,3 @@ slipif_received_bytes(struct netif *netif, u8_t *data, u8_t len) } } #endif /* SLIP_RX_FROM_ISR */ - -#endif /* LWIP_HAVE_SLIPIF */ From 8c620d92069b38da86556b65fd54dece673c4a3a Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Thu, 28 Jul 2016 09:21:16 +0200 Subject: [PATCH 255/275] Restructure IPv6 config options Add generate.bat to generate docs quickly under Windows OS --- doc/doxygen/generate.bat | 1 + src/include/lwip/opt.h | 94 +++++++++++++++++++++++++--------------- 2 files changed, 60 insertions(+), 35 deletions(-) create mode 100644 doc/doxygen/generate.bat diff --git a/doc/doxygen/generate.bat b/doc/doxygen/generate.bat new file mode 100644 index 00000000..99afb124 --- /dev/null +++ b/doc/doxygen/generate.bat @@ -0,0 +1 @@ +doxygen lwip.Doxyfile diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 4714947a..b37124ce 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -2169,6 +2169,50 @@ #define LWIP_IPV6_FORWARD 0 #endif +/** + * LWIP_IPV6_FRAG==1: Fragment outgoing IPv6 packets that are too big. + */ +#if !defined LWIP_IPV6_FRAG || defined __DOXYGEN__ +#define LWIP_IPV6_FRAG 0 +#endif + +/** + * LWIP_IPV6_REASS==1: reassemble incoming IPv6 packets that fragmented + */ +#if !defined LWIP_IPV6_REASS || defined __DOXYGEN__ || defined __DOXYGEN__ +#define LWIP_IPV6_REASS (LWIP_IPV6) +#endif + +/** + * LWIP_IPV6_SEND_ROUTER_SOLICIT==1: Send router solicitation messages during + * network startup. + */ +#if !defined LWIP_IPV6_SEND_ROUTER_SOLICIT || defined __DOXYGEN__ +#define LWIP_IPV6_SEND_ROUTER_SOLICIT 1 +#endif + +/** + * LWIP_IPV6_AUTOCONFIG==1: Enable stateless address autoconfiguration as per RFC 4862. + */ +#if !defined LWIP_IPV6_AUTOCONFIG || defined __DOXYGEN__ +#define LWIP_IPV6_AUTOCONFIG (LWIP_IPV6) +#endif + +/** + * LWIP_IPV6_DUP_DETECT_ATTEMPTS: Number of duplicate address detection attempts. + */ +#if !defined LWIP_IPV6_DUP_DETECT_ATTEMPTS || defined __DOXYGEN__ +#define LWIP_IPV6_DUP_DETECT_ATTEMPTS 1 +#endif +/** + * @} + */ + +/** + * @defgroup lwip_opts_icmp6 ICMP6 + * @ingroup lwip_opts_ipv6 + * @{ + */ /** * LWIP_ICMP6==1: Enable ICMPv6 (mandatory per RFC) */ @@ -2190,7 +2234,15 @@ #if !defined LWIP_ICMP6_HL || defined __DOXYGEN__ #define LWIP_ICMP6_HL 255 #endif +/** + * @} + */ +/** + * @defgroup lwip_opts_mld6 Multicast listener discovery + * @ingroup lwip_opts_ipv6 + * @{ + */ /** * LWIP_IPV6_MLD==1: Enable multicast listener discovery protocol. */ @@ -2204,21 +2256,15 @@ #if !defined MEMP_NUM_MLD6_GROUP || defined __DOXYGEN__ #define MEMP_NUM_MLD6_GROUP 4 #endif +/** + * @} + */ /** - * LWIP_IPV6_FRAG==1: Fragment outgoing IPv6 packets that are too big. + * @defgroup lwip_opts_nd6 Neighbor discovery + * @ingroup lwip_opts_ipv6 + * @{ */ -#if !defined LWIP_IPV6_FRAG || defined __DOXYGEN__ -#define LWIP_IPV6_FRAG 0 -#endif - -/** - * LWIP_IPV6_REASS==1: reassemble incoming IPv6 packets that fragmented - */ -#if !defined LWIP_IPV6_REASS || defined __DOXYGEN__ || defined __DOXYGEN__ -#define LWIP_IPV6_REASS (LWIP_IPV6) -#endif - /** * LWIP_ND6_QUEUEING==1: queue outgoing IPv6 packets while MAC address * is being resolved. @@ -2323,14 +2369,6 @@ #define LWIP_ND6_ALLOW_RA_UPDATES 1 #endif -/** - * LWIP_IPV6_SEND_ROUTER_SOLICIT==1: Send router solicitation messages during - * network startup. - */ -#if !defined LWIP_IPV6_SEND_ROUTER_SOLICIT || defined __DOXYGEN__ -#define LWIP_IPV6_SEND_ROUTER_SOLICIT 1 -#endif - /** * LWIP_ND6_TCP_REACHABILITY_HINTS==1: Allow TCP to provide Neighbor Discovery * with reachability hints for connected destinations. This helps avoid sending @@ -2339,20 +2377,9 @@ #if !defined LWIP_ND6_TCP_REACHABILITY_HINTS || defined __DOXYGEN__ || defined __DOXYGEN__ #define LWIP_ND6_TCP_REACHABILITY_HINTS 1 #endif - /** - * LWIP_IPV6_AUTOCONFIG==1: Enable stateless address autoconfiguration as per RFC 4862. + * @} */ -#if !defined LWIP_IPV6_AUTOCONFIG || defined __DOXYGEN__ -#define LWIP_IPV6_AUTOCONFIG (LWIP_IPV6) -#endif - -/** - * LWIP_IPV6_DUP_DETECT_ATTEMPTS: Number of duplicate address detection attempts. - */ -#if !defined LWIP_IPV6_DUP_DETECT_ATTEMPTS || defined __DOXYGEN__ -#define LWIP_IPV6_DUP_DETECT_ATTEMPTS 1 -#endif /** * LWIP_IPV6_DHCP6==1: enable DHCPv6 stateful address autoconfiguration. @@ -2360,9 +2387,6 @@ #if !defined LWIP_IPV6_DHCP6 || defined __DOXYGEN__ #define LWIP_IPV6_DHCP6 0 #endif -/** - * @} - */ /* --------------------------------------- From 9fb9033815c8249765566fac9633e63edfab2bc7 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Thu, 28 Jul 2016 14:33:15 +0200 Subject: [PATCH 256/275] Move MIB compiler to contrib, it's a better place for it --- .../CCodeGeneration/CCodeGeneration.csproj | 67 - .../LwipMibCompiler/CCodeGeneration/CFile.cs | 54 - .../CCodeGeneration/CGenerator.cs | 119 - .../LwipMibCompiler/CCodeGeneration/Code.cs | 56 - .../CCodeGeneration/CodeContainerBase.cs | 139 - .../CCodeGeneration/CodeElement.cs | 41 - .../CCodeGeneration/Comment.cs | 75 - .../CCodeGeneration/EmptyLine.cs | 64 - .../CCodeGeneration/Function.cs | 129 - .../CCodeGeneration/FunctionDeclaration.cs | 114 - .../CCodeGeneration/IfThenElse.cs | 137 - .../LwipMibCompiler/CCodeGeneration/PP_If.cs | 67 - .../CCodeGeneration/PP_Ifdef.cs | 76 - .../CCodeGeneration/PP_Include.cs | 71 - .../CCodeGeneration/PP_Macro.cs | 59 - .../CCodeGeneration/PlainText.cs | 49 - .../Properties/AssemblyInfo.cs | 36 - .../LwipMibCompiler/CCodeGeneration/Switch.cs | 146 - .../CCodeGeneration/VariableDeclaration.cs | 82 - .../CCodeGeneration/VariablePrototype.cs | 73 - .../CCodeGeneration/VariableType.cs | 130 - .../snmp/LwipMibCompiler/LwipMibCompiler.sln | 47 - .../LwipMibCompiler/LwipMibCompiler.csproj | 73 - .../LwipMibCompiler/Program.cs | 480 -- .../Properties/AssemblyInfo.cs | 36 - .../LwipMibCompiler/app.config | 3 - .../LwipSnmpCodeGeneration/IRestriction.cs | 120 - .../LwipSnmpCodeGeneration/LwipSnmp.cs | 199 - .../LwipSnmpCodeGeneration.csproj | 72 - .../LwipSnmpCodeGeneration/MibCFile.cs | 196 - .../LwipSnmpCodeGeneration/MibHeaderFile.cs | 129 - .../Properties/AssemblyInfo.cs | 36 - .../LwipSnmpCodeGeneration/SnmpMib.cs | 97 - .../LwipSnmpCodeGeneration/SnmpNode.cs | 119 - .../SnmpScalarAggregationNode.cs | 293 - .../SnmpScalarArrayNode.cs | 105 - .../LwipSnmpCodeGeneration/SnmpScalarNode.cs | 395 -- .../SnmpScalarNodeBits.cs | 121 - .../SnmpScalarNodeCounter64.cs | 72 - .../SnmpScalarNodeInt.cs | 86 - .../SnmpScalarNodeObjectIdentifier.cs | 90 - .../SnmpScalarNodeOctetString.cs | 118 - .../SnmpScalarNodeTruthValue.cs | 66 - .../SnmpScalarNodeUint.cs | 91 - .../LwipSnmpCodeGeneration/SnmpTableNode.cs | 332 -- .../LwipSnmpCodeGeneration/SnmpTreeNode.cs | 242 - .../MibViewer/FormMain.Designer.cs | 166 - .../LwipMibCompiler/MibViewer/FormMain.cs | 217 - .../LwipMibCompiler/MibViewer/FormMain.resx | 298 - .../MibViewer/MibViewer.csproj | 94 - .../snmp/LwipMibCompiler/MibViewer/Program.cs | 51 - .../MibViewer/Properties/AssemblyInfo.cs | 36 - .../Properties/Resources.Designer.cs | 63 - .../MibViewer/Properties/Resources.resx | 117 - .../MibViewer/Properties/Settings.Designer.cs | 26 - .../MibViewer/Properties/Settings.settings | 7 - .../snmp/LwipMibCompiler/MibViewer/app.config | 3 - .../Mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB | 131 - .../LwipMibCompiler/Mibs/IANA-CHARSET-MIB | 345 -- .../Mibs/IANA/IANA-ITU-ALARM-TC-MIB | 333 -- .../Mibs/IANA/IANA-LANGUAGE-MIB | 127 - .../LwipMibCompiler/Mibs/IANA/IANA-MALLOC-MIB | 67 - .../LwipMibCompiler/Mibs/IANA/IANA-MAU-MIB | 770 --- .../Mibs/IANA/IANA-PRINTER-MIB | 1319 ----- .../Mibs/IANA/IANA-RTPROTO-MIB | 92 - .../Mibs/IANA/IANATn3270eTC-MIB | 306 - .../LwipMibCompiler/Mibs/IANA/IANAifType-MIB | 572 -- src/apps/snmp/LwipMibCompiler/Mibs/IF-MIB | 1899 ------ .../LwipMibCompiler/Mibs/INET-ADDRESS-MIB | 421 -- src/apps/snmp/LwipMibCompiler/Mibs/IP-MIB | 5254 ----------------- src/apps/snmp/LwipMibCompiler/Mibs/RFC-1212 | 75 - src/apps/snmp/LwipMibCompiler/Mibs/RFC-1215 | 34 - .../snmp/LwipMibCompiler/Mibs/RFC1065-SMI | 132 - .../snmp/LwipMibCompiler/Mibs/RFC1155-SMI | 129 - .../snmp/LwipMibCompiler/Mibs/RFC1158-MIB | 1493 ----- .../snmp/LwipMibCompiler/Mibs/RFC1213-MIB | 2621 -------- .../snmp/LwipMibCompiler/Mibs/SNMPv2-CONF | 318 - src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-MIB | 903 --- src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-SMI | 352 -- src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-TC | 786 --- src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-TM | 194 - src/apps/snmp/LwipMibCompiler/Mibs/TCP-MIB | 829 --- src/apps/snmp/LwipMibCompiler/Mibs/UDP-MIB | 579 -- .../SharpSnmpLib/Mib/DisplayHint.cs | 84 - .../Elements/Entities/AgentCapabilities.cs | 29 - .../Mib/Elements/Entities/EntityBase.cs | 46 - .../Mib/Elements/Entities/IEntity.cs | 62 - .../Mib/Elements/Entities/ModuleCompliance.cs | 23 - .../Mib/Elements/Entities/ModuleIdentity.cs | 10 - .../Elements/Entities/NotificationGroup.cs | 22 - .../Mib/Elements/Entities/NotificationType.cs | 11 - .../Mib/Elements/Entities/ObjectGroup.cs | 22 - .../Mib/Elements/Entities/ObjectIdentity.cs | 21 - .../Mib/Elements/Entities/ObjectType.cs | 336 -- .../Elements/Entities/OidValueAssignment.cs | 30 - .../SharpSnmpLib/Mib/Elements/Exports.cs | 56 - .../SharpSnmpLib/Mib/Elements/IDeclaration.cs | 18 - .../SharpSnmpLib/Mib/Elements/IElement.cs | 35 - .../Mib/Elements/ITypeReferrer.cs | 10 - .../SharpSnmpLib/Mib/Elements/Imports.cs | 81 - .../SharpSnmpLib/Mib/Elements/ImportsFrom.cs | 60 - .../SharpSnmpLib/Mib/Elements/TrapType.cs | 48 - .../Mib/Elements/Types/BaseType.cs | 54 - .../Mib/Elements/Types/BitsType.cs | 26 - .../SharpSnmpLib/Mib/Elements/Types/Choice.cs | 35 - .../Mib/Elements/Types/ITypeAssignment.cs | 6 - .../Mib/Elements/Types/IntegerType.cs | 117 - .../Mib/Elements/Types/IpAddressType.cs | 21 - .../SharpSnmpLib/Mib/Elements/Types/Macro.cs | 34 - .../Elements/Types/ObjectIdentifierType.cs | 11 - .../Mib/Elements/Types/OctetStringType.cs | 31 - .../Mib/Elements/Types/OpaqueType.cs | 11 - .../Mib/Elements/Types/Sequence.cs | 46 - .../Mib/Elements/Types/SequenceOf.cs | 23 - .../Mib/Elements/Types/TextualConvention.cs | 238 - .../Mib/Elements/Types/TypeAssignment.cs | 147 - .../Mib/Elements/Types/UnsignedType.cs | 103 - .../SharpSnmpLib/Mib/IModule.cs | 81 - .../SharpSnmpLib/Mib/ISymbolEnumerator.cs | 9 - .../LwipMibCompiler/SharpSnmpLib/Mib/Lexer.cs | 581 -- .../SharpSnmpLib/Mib/MaxAccess.cs | 17 - .../SharpSnmpLib/Mib/MibDocument.cs | 57 - .../SharpSnmpLib/Mib/MibException.cs | 113 - .../SharpSnmpLib/Mib/MibModule.cs | 294 - .../SharpSnmpLib/Mib/MibResolver.cs | 97 - .../SharpSnmpLib/Mib/MibTree.cs | 130 - .../SharpSnmpLib/Mib/MibTreeNode.cs | 112 - .../SharpSnmpLib/Mib/MibTypesResolver.cs | 216 - .../SharpSnmpLib/Mib/ObjectIdentifier.cs | 54 - .../SharpSnmpLib/Mib/Status.cs | 17 - .../SharpSnmpLib/Mib/Symbol.cs | 357 -- .../SharpSnmpLib/Mib/SymbolList.cs | 146 - .../SharpSnmpLib/Mib/ValueMap.cs | 103 - .../SharpSnmpLib/Mib/ValueRange.cs | 76 - .../SharpSnmpLib/Properties/AssemblyInfo.cs | 61 - .../Properties/Resources.Designer.cs | 63 - .../SharpSnmpLib/Properties/Resources.resx | 120 - .../SharpSnmpLib/SharpSnmpLib.Mib.csproj | 140 - .../LwipMibCompiler/SharpSnmpLib/license.txt | 458 -- .../SharpSnmpLib/sharpsnmplib.snk | Bin 596 -> 0 bytes .../example/compile_udp_mib.cmd | 1 - .../example/compile_udp_mib.sh | 1 - src/apps/snmp/snmp_core.c | 3 +- 143 files changed, 2 insertions(+), 31773 deletions(-) delete mode 100644 src/apps/snmp/LwipMibCompiler/CCodeGeneration/CCodeGeneration.csproj delete mode 100644 src/apps/snmp/LwipMibCompiler/CCodeGeneration/CFile.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/CCodeGeneration/CGenerator.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/CCodeGeneration/Code.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/CCodeGeneration/CodeContainerBase.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/CCodeGeneration/CodeElement.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/CCodeGeneration/Comment.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/CCodeGeneration/EmptyLine.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/CCodeGeneration/Function.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/CCodeGeneration/FunctionDeclaration.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/CCodeGeneration/IfThenElse.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/CCodeGeneration/PP_If.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/CCodeGeneration/PP_Ifdef.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/CCodeGeneration/PP_Include.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/CCodeGeneration/PP_Macro.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/CCodeGeneration/PlainText.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/CCodeGeneration/Properties/AssemblyInfo.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/CCodeGeneration/Switch.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/CCodeGeneration/VariableDeclaration.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/CCodeGeneration/VariablePrototype.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/CCodeGeneration/VariableType.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipMibCompiler.sln delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipMibCompiler/LwipMibCompiler.csproj delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Program.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Properties/AssemblyInfo.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipMibCompiler/app.config delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/IRestriction.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/LwipSnmp.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/LwipSnmpCodeGeneration.csproj delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/MibCFile.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/MibHeaderFile.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/Properties/AssemblyInfo.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpMib.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpNode.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarAggregationNode.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarArrayNode.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNode.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeBits.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeCounter64.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeInt.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeObjectIdentifier.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeOctetString.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeTruthValue.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeUint.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpTableNode.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpTreeNode.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/MibViewer/FormMain.Designer.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/MibViewer/FormMain.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/MibViewer/FormMain.resx delete mode 100644 src/apps/snmp/LwipMibCompiler/MibViewer/MibViewer.csproj delete mode 100644 src/apps/snmp/LwipMibCompiler/MibViewer/Program.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/MibViewer/Properties/AssemblyInfo.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Resources.Designer.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Resources.resx delete mode 100644 src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Settings.Designer.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Settings.settings delete mode 100644 src/apps/snmp/LwipMibCompiler/MibViewer/app.config delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/IANA-CHARSET-MIB delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-ITU-ALARM-TC-MIB delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-LANGUAGE-MIB delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-MALLOC-MIB delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-MAU-MIB delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-PRINTER-MIB delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-RTPROTO-MIB delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANATn3270eTC-MIB delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANAifType-MIB delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/IF-MIB delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/INET-ADDRESS-MIB delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/IP-MIB delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/RFC-1212 delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/RFC-1215 delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/RFC1065-SMI delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/RFC1155-SMI delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/RFC1158-MIB delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/RFC1213-MIB delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-CONF delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-MIB delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-SMI delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-TC delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-TM delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/TCP-MIB delete mode 100644 src/apps/snmp/LwipMibCompiler/Mibs/UDP-MIB delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/DisplayHint.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/AgentCapabilities.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/EntityBase.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/IEntity.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ModuleCompliance.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ModuleIdentity.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/NotificationGroup.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/NotificationType.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ObjectGroup.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ObjectIdentity.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ObjectType.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/OidValueAssignment.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Exports.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/IDeclaration.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/IElement.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/ITypeReferrer.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Imports.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/ImportsFrom.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/TrapType.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/BaseType.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/BitsType.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/Choice.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/ITypeAssignment.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/IntegerType.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/IpAddressType.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/Macro.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/ObjectIdentifierType.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/OctetStringType.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/OpaqueType.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/Sequence.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/SequenceOf.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/TextualConvention.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/TypeAssignment.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/UnsignedType.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/IModule.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/ISymbolEnumerator.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Lexer.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MaxAccess.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibDocument.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibException.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibModule.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibResolver.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibTree.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibTreeNode.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibTypesResolver.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/ObjectIdentifier.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Status.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Symbol.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/SymbolList.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/ValueMap.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/ValueRange.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Properties/AssemblyInfo.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Properties/Resources.Designer.cs delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Properties/Resources.resx delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/SharpSnmpLib.Mib.csproj delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/license.txt delete mode 100644 src/apps/snmp/LwipMibCompiler/SharpSnmpLib/sharpsnmplib.snk delete mode 100644 src/apps/snmp/LwipMibCompiler/example/compile_udp_mib.cmd delete mode 100755 src/apps/snmp/LwipMibCompiler/example/compile_udp_mib.sh diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/CCodeGeneration.csproj b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/CCodeGeneration.csproj deleted file mode 100644 index 06d5075e..00000000 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/CCodeGeneration.csproj +++ /dev/null @@ -1,67 +0,0 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {7DA7C0AB-0982-4BF5-9324-F59A7A08D65B} - Library - Properties - CCodeGeneration - CCodeGeneration - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/CFile.cs b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/CFile.cs deleted file mode 100644 index 6f122742..00000000 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/CFile.cs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; - -namespace CCodeGeneration -{ - public class CFile: CodeContainerBase - { - public CFile() - { - base.IncreaseLevel = false; - } - - public void Save(CGenerator generator) - { - if (generator == null) - { - throw new ArgumentNullException("generator"); - } - - this.GenerateCode(0, generator); - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/CGenerator.cs b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/CGenerator.cs deleted file mode 100644 index 4e8dfbc7..00000000 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/CGenerator.cs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; -using System.IO; - -namespace CCodeGeneration -{ - public class CGenerator - { - public TextWriter OutputStream { get; private set; } - public string File { get; private set; } - public uint IndentCount { get; private set; } - public string IndentChar { get; private set; } - public string NewLine { get; private set; } - - public CGenerator(System.IO.TextWriter outputStream, string file, uint indentCount, string indentChar, string newLine) - { - this.OutputStream = outputStream; - this.File = file; - this.IndentCount = indentCount; - this.IndentChar = indentChar; - this.NewLine = newLine; - } - - public string FileName - { - get - { - if (!String.IsNullOrWhiteSpace(this.File)) - { - return Path.GetFileName(this.File); - } - - return null; - } - } - - public void WriteSequence(string value, uint repetitions) - { - while (repetitions > 0) - { - this.OutputStream.Write(value); - repetitions--; - } - } - - public void IndentLine(int level) - { - while (level > 0) - { - WriteSequence(this.IndentChar, this.IndentCount); - level--; - } - } - - public void WriteNewLine() - { - this.OutputStream.Write(this.NewLine); - } - - public void WriteMultilineString(string value, int level = 0) - { - if (String.IsNullOrEmpty(value)) - { - return; - } - - // only \n and \r\n are recognized as linebreaks - string[] lines = value.Split(new char[] { '\n' }, StringSplitOptions.None); - - for (int l = 0; l < (lines.Length - 1); l++) - { - if (lines[l].EndsWith("\r")) - { - this.OutputStream.Write(lines[l].Substring(0, lines[l].Length-1)); - } - else - { - this.OutputStream.Write(lines[l]); - } - - this.WriteNewLine(); - this.IndentLine(level); - } - - this.OutputStream.Write(lines[lines.Length - 1]); - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/Code.cs b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/Code.cs deleted file mode 100644 index 4834508a..00000000 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/Code.cs +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -namespace CCodeGeneration -{ - public class Code: CodeElement - { - public string Code_ { get; set; } - - public Code() - { - } - - public Code(string code) - { - this.Code_ = code; - } - - public override void GenerateCode(int level, CGenerator generator) - { - generator.IndentLine(level); - generator.WriteMultilineString(this.Code_, level); - generator.WriteNewLine(); - } - - } -} diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/CodeContainerBase.cs b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/CodeContainerBase.cs deleted file mode 100644 index 4327d92d..00000000 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/CodeContainerBase.cs +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System.Collections.Generic; -using System; - -namespace CCodeGeneration -{ - public class CodeContainerBase: CodeElement - { - private readonly List declarations = new List(); - private readonly List innerElements = new List(); - private bool increaseLevel = true; - - public List Declarations - { - get { return this.declarations; } - } - - public List InnerElements - { - get { return this.innerElements; } - } - - protected bool IncreaseLevel - { - get { return this.increaseLevel; } - set { this.increaseLevel = value; } - } - - public void AddElements(IList elements, params CodeElement[] spacerElements) - { - if (elements != null) - { - if ((spacerElements == null) || (spacerElements.Length == 0)) - { - this.innerElements.AddRange(elements); - } - else - { - bool spacerAdded = false; - - foreach (CodeElement element in elements) - { - this.innerElements.Add(element); - this.innerElements.AddRange(spacerElements); - spacerAdded = true; - } - - if (spacerAdded) - { - // remove last spacer again - this.innerElements.RemoveRange(this.innerElements.Count - spacerElements.Length, spacerElements.Length); - } - } - } - } - - public CodeElement AddElement(CodeElement element) - { - if (element != null) - { - this.innerElements.Add(element); - } - - return element; - } - - public Code AddCode(string code) - { - return this.AddElement(new Code(code)) as Code; - } - - public Code AddCodeFormat(string codeFormat, params object[] args) - { - return this.AddElement(new Code(String.Format(codeFormat, args))) as Code; - } - - public CodeElement AddDeclaration(CodeElement declaration) - { - if (declaration != null) - { - this.declarations.Add(declaration); - } - - return declaration; - } - - public override void GenerateCode(int level, CGenerator generator) - { - if (this.increaseLevel) - level++; - - if (this.declarations.Count > 0) - { - foreach (CodeElement element in this.declarations) - { - element.GenerateCode(level, generator); - } - - EmptyLine.SingleLine.GenerateCode(level, generator); - } - - foreach (CodeElement element in this.innerElements) - { - element.GenerateCode(level, generator); - } - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/CodeElement.cs b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/CodeElement.cs deleted file mode 100644 index 51cf2d24..00000000 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/CodeElement.cs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -namespace CCodeGeneration -{ - public class CodeElement - { - public virtual void GenerateCode(int level, CGenerator generator) - { - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/Comment.cs b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/Comment.cs deleted file mode 100644 index 51779bea..00000000 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/Comment.cs +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -namespace CCodeGeneration -{ - public class Comment: CodeElement - { - public const string CommentStart = "/*"; - public const string CommentEnd = "*/"; - - public string Comment_ { get; set; } - public bool SingleLine { get; set; } - - public Comment() - { - } - - public Comment(string comment, bool singleLine = false) - { - this.Comment_ = comment; - this.SingleLine = singleLine; - } - - public override void GenerateCode(int level, CGenerator generator) - { - generator.IndentLine(level); - generator.OutputStream.Write(CommentStart); - - if (!this.SingleLine) - { - generator.WriteNewLine(); - generator.IndentLine(level); - generator.WriteMultilineString(this.Comment_, level); - generator.WriteNewLine(); - generator.IndentLine(level); - } - else - { - generator.OutputStream.Write(" " + Comment_ + " "); - } - - generator.OutputStream.Write(CommentEnd); - generator.WriteNewLine(); - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/EmptyLine.cs b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/EmptyLine.cs deleted file mode 100644 index 604c9477..00000000 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/EmptyLine.cs +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -namespace CCodeGeneration -{ - public class EmptyLine : CodeElement - { - public static readonly EmptyLine SingleLine = new EmptyLine(); - public static readonly EmptyLine TwoLines = new EmptyLine(2); - public static readonly EmptyLine ThreeLines = new EmptyLine(3); - - public uint Count { get; set; } - - public EmptyLine() - { - this.Count = 1; - } - - public EmptyLine(uint count) - { - this.Count = count; - } - - public override void GenerateCode(int level, CGenerator generator) - { - uint c = this.Count; - - while (c > 0) - { - generator.WriteNewLine(); - c--; - } - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/Function.cs b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/Function.cs deleted file mode 100644 index d81f6e56..00000000 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/Function.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; -using System.Collections.Generic; - -namespace CCodeGeneration -{ - public class Function: CodeContainerBase - { - public string Name { get; set; } - public bool IsStatic { get; set; } - - private readonly List parameter = new List(); - private VariableType returnType = VariableType.Void; - - public Function() - { - } - - public Function(string name, bool isStatic = false) - { - this.Name = name; - this.IsStatic = isStatic; - } - - public List Parameter - { - get { return this.parameter; } - } - - public VariableType ReturnType - { - get { return this.returnType; } - set - { - if (value == null) - { - throw new ArgumentNullException("ReturnValue"); - } - this.returnType = value; - } - } - - public static Function FromDeclaration(FunctionDeclaration decl) - { - Function result = new Function(decl.Name, decl.IsStatic); - result.ReturnType = decl.ReturnType.Clone() as VariableType; - - foreach (VariableType param in decl.Parameter) - { - result.parameter.Add(param.Clone() as VariableType); - } - - return result; - } - - public override void GenerateCode(int level, CGenerator generator) - { - generator.IndentLine(level); - - if (this.IsStatic) - { - generator.OutputStream.Write("static "); - } - - this.returnType.GenerateCode(generator); - generator.OutputStream.Write(" " + this.Name + "("); - - if (this.Parameter.Count > 0) - { - for (int i = 0; i < this.parameter.Count; i++) - { - this.parameter[i].GenerateCode(generator); - - if (i < (this.parameter.Count - 1)) - { - generator.OutputStream.Write(", "); - } - } - } - else - { - generator.OutputStream.Write("void"); - } - - generator.OutputStream.Write(")"); - generator.WriteNewLine(); - generator.IndentLine(level); - generator.OutputStream.Write("{"); - generator.WriteNewLine(); - - base.GenerateCode(level, generator); - - generator.IndentLine(level); - generator.OutputStream.Write("}"); - generator.WriteNewLine(); - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/FunctionDeclaration.cs b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/FunctionDeclaration.cs deleted file mode 100644 index 3bc42888..00000000 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/FunctionDeclaration.cs +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; -using System.Collections.Generic; - -namespace CCodeGeneration -{ - public class FunctionDeclaration: CodeElement - { - public string Name { get; set; } - public bool IsStatic { get; set; } - public bool IsExtern { get; set; } - - private readonly List parameter = new List(); - private VariableType returnType = VariableType.Void; - - public FunctionDeclaration() - { - } - - public FunctionDeclaration(string name, bool isStatic = false, bool isExtern = false) - { - this.Name = name; - this.IsStatic = isStatic; - this.IsExtern = isExtern; - } - - public List Parameter - { - get { return this.parameter; } - } - - public VariableType ReturnType - { - get { return this.returnType; } - set - { - if (value == null) - { - throw new ArgumentNullException("ReturnValue"); - } - this.returnType = value; - } - } - - public override void GenerateCode(int level, CGenerator generator) - { - generator.IndentLine(level); - - if (this.IsExtern) - { - generator.OutputStream.Write("extern "); - } - - if (this.IsStatic) - { - generator.OutputStream.Write("static "); - } - - this.returnType.GenerateCode(generator); - generator.OutputStream.Write(" " + this.Name + "("); - - if (this.Parameter.Count > 0) - { - for (int i = 0; i < this.parameter.Count; i++) - { - this.parameter[i].GenerateCode(generator); - - if (i < (this.parameter.Count - 1)) - { - generator.OutputStream.Write(", "); - } - } - } - else - { - generator.OutputStream.Write("void"); - } - - generator.OutputStream.Write(");"); - generator.WriteNewLine(); - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/IfThenElse.cs b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/IfThenElse.cs deleted file mode 100644 index c4710225..00000000 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/IfThenElse.cs +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; -using System.Collections.Generic; - -namespace CCodeGeneration -{ - public class ElseIf : CodeContainerBase - { - public string Condition { get; set; } - - public ElseIf() - { - } - - public ElseIf(string condition) - { - this.Condition = condition; - } - - public override void GenerateCode(int level, CGenerator generator) - { - if (!String.IsNullOrWhiteSpace(this.Condition)) - { - generator.IndentLine(level); - generator.OutputStream.Write(String.Format("else if ({0})", this.Condition)); - generator.WriteNewLine(); - generator.IndentLine(level); - generator.OutputStream.Write("{"); - generator.WriteNewLine(); - - base.GenerateCode(level, generator); - - generator.IndentLine(level); - generator.OutputStream.Write("}"); - generator.WriteNewLine(); - } - } - } - - public class IfThenElse: CodeContainerBase - { - public string Condition { get; set; } - - private List elseIf = new List(); - private CodeContainerBase else_ = new CodeContainerBase(); - - public IfThenElse() - { - } - - public IfThenElse(string condition) - { - this.Condition = condition; - } - - public List ElseIf - { - get { return this.elseIf; } - } - - public CodeContainerBase Else - { - get { return this.else_; } - } - - public override void GenerateCode(int level, CGenerator generator) - { - if (!String.IsNullOrWhiteSpace(this.Condition)) - { - generator.IndentLine(level); - generator.OutputStream.Write(String.Format("if ({0})", this.Condition)); - generator.WriteNewLine(); - generator.IndentLine(level); - generator.OutputStream.Write("{"); - generator.WriteNewLine(); - - base.GenerateCode(level, generator); - - generator.IndentLine(level); - generator.OutputStream.Write("}"); - generator.WriteNewLine(); - - foreach (ElseIf elif in this.elseIf) - { - elif.GenerateCode(level, generator); - } - - if (this.else_.InnerElements.Count > 0) - { - generator.IndentLine(level); - generator.OutputStream.Write("else"); - generator.WriteNewLine(); - generator.IndentLine(level); - generator.OutputStream.Write("{"); - generator.WriteNewLine(); - - this.else_.GenerateCode(level, generator); - - generator.IndentLine(level); - generator.OutputStream.Write("}"); - generator.WriteNewLine(); - } - } - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/PP_If.cs b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/PP_If.cs deleted file mode 100644 index 55682155..00000000 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/PP_If.cs +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; - -namespace CCodeGeneration -{ - public class PP_If: CodeContainerBase - { - public string Condition { get; set; } - - public PP_If() - { - base.IncreaseLevel = false; - } - - public PP_If(string condition) - : this() - { - this.Condition = condition; - } - - - public override void GenerateCode(int level, CGenerator generator) - { - if (!String.IsNullOrWhiteSpace(this.Condition)) - { - generator.OutputStream.Write("#if " + this.Condition); - generator.WriteNewLine(); - - base.GenerateCode(level, generator); - - generator.OutputStream.Write("#endif /* " + this.Condition + " */"); - generator.WriteNewLine(); - } - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/PP_Ifdef.cs b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/PP_Ifdef.cs deleted file mode 100644 index fd4f45af..00000000 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/PP_Ifdef.cs +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; - -namespace CCodeGeneration -{ - public class PP_Ifdef: CodeContainerBase - { - public string Macro { get; set; } - public bool Inverted { get; set; } - - public PP_Ifdef() - { - base.IncreaseLevel = false; - } - - public PP_Ifdef(string macro, bool inverted = false) - : this() - { - this.Macro = macro; - this.Inverted = inverted; - } - - - public override void GenerateCode(int level, CGenerator generator) - { - if (!String.IsNullOrWhiteSpace(this.Macro)) - { - if (this.Inverted) - { - generator.OutputStream.Write("#ifndef " + this.Macro); - } - else - { - generator.OutputStream.Write("#ifdef " + this.Macro); - } - generator.WriteNewLine(); - - base.GenerateCode(level, generator); - - generator.OutputStream.Write("#endif /* " + this.Macro + " */"); - generator.WriteNewLine(); - } - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/PP_Include.cs b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/PP_Include.cs deleted file mode 100644 index 0393d271..00000000 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/PP_Include.cs +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; - -namespace CCodeGeneration -{ - public class PP_Include : CodeElement - { - public string File { get; set; } - public bool IsLocal { get; set; } - - public PP_Include() - { - this.IsLocal = true; - } - - public PP_Include(string file, bool isLocal = true) - { - this.File = file; - this.IsLocal = isLocal; - } - - public override void GenerateCode(int level, CGenerator generator) - { - if (!String.IsNullOrWhiteSpace(this.File)) - { - // includes are never indented - if (this.IsLocal) - { - generator.OutputStream.Write("#include \"" + this.File + "\""); - } - else - { - generator.OutputStream.Write("#include <" + this.File + ">"); - } - - generator.WriteNewLine(); - } - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/PP_Macro.cs b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/PP_Macro.cs deleted file mode 100644 index 6f302aa9..00000000 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/PP_Macro.cs +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -namespace CCodeGeneration -{ - public class PP_Macro: CodeElement - { - public string Name { get; set; } - public string Value { get; set; } - - public PP_Macro() - { - } - - public PP_Macro(string name, string value) - { - this.Name = name; - this.Value = value; - } - - - public override void GenerateCode(int level, CGenerator generator) - { - // macros are not indented at all - generator.OutputStream.Write("#define " + this.Name + " "); - generator.WriteMultilineString(this.Value); - generator.WriteNewLine(); - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/PlainText.cs b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/PlainText.cs deleted file mode 100644 index d5e076fe..00000000 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/PlainText.cs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -namespace CCodeGeneration -{ - public class PlainText : CodeElement - { - public string Value { get; set; } - - public PlainText(string value) - { - this.Value = value; - } - - public override void GenerateCode(int level, CGenerator generator) - { - generator.WriteMultilineString(this.Value); - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/Properties/AssemblyInfo.cs b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/Properties/AssemblyInfo.cs deleted file mode 100644 index 4c716ad3..00000000 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// Allgemeine Informationen über eine Assembly werden über die folgenden -// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, -// die mit einer Assembly verknüpft sind. -[assembly: AssemblyTitle("CCodeGeneration")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("CCodeGeneration")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar -// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von -// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. -[assembly: ComVisible(false)] - -// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird -[assembly: Guid("8f07a0fa-86f4-48a0-97c7-f94fc5c3f103")] - -// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: -// -// Hauptversion -// Nebenversion -// Buildnummer -// Revision -// -// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern -// übernehmen, indem Sie "*" eingeben: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/Switch.cs b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/Switch.cs deleted file mode 100644 index 9166fb89..00000000 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/Switch.cs +++ /dev/null @@ -1,146 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; -using System.Collections.Generic; - -namespace CCodeGeneration -{ - public class SwitchCase : CodeContainerBase - { - public string Value { get; set; } - - public SwitchCase() - { - } - - public SwitchCase(string value) - { - this.Value = value; - } - - public bool IsDefault - { - get { return (this.Value.ToLowerInvariant() == "default"); } - } - - public static SwitchCase GenerateDefault() - { - return new SwitchCase("default"); - } - - public override void GenerateCode(int level, CGenerator generator) - { - if (!String.IsNullOrWhiteSpace(this.Value)) - { - generator.IndentLine(level); - if (this.IsDefault) - { - generator.OutputStream.Write("default:"); - } - else - { - generator.OutputStream.Write(String.Format("case {0}:", this.Value)); - } - generator.WriteNewLine(); - generator.IndentLine(level + 1); - generator.OutputStream.Write("{"); - generator.WriteNewLine(); - - base.GenerateCode(level + 1, generator); - - generator.IndentLine(level + 1); - generator.OutputStream.Write("}"); - generator.WriteNewLine(); - - generator.IndentLine(level + 1); - generator.OutputStream.Write("break;"); - generator.WriteNewLine(); - } - } - } - - public class Switch: CodeElement - { - public string SwitchVar { get; set; } - - private List switches = new List(); - - public Switch() - { - } - - public Switch(string switchVar) - { - this.SwitchVar = switchVar; - } - - public List Switches - { - get { return this.switches; } - } - - public override void GenerateCode(int level, CGenerator generator) - { - if (!String.IsNullOrWhiteSpace(this.SwitchVar)) - { - generator.IndentLine(level); - generator.OutputStream.Write(String.Format("switch ({0})", this.SwitchVar)); - generator.WriteNewLine(); - generator.IndentLine(level); - generator.OutputStream.Write("{"); - generator.WriteNewLine(); - - SwitchCase defaultCase = null; // generate 'default' always as last case - foreach (SwitchCase switchCase in this.switches) - { - if (switchCase.IsDefault) - { - defaultCase = switchCase; - } - else - { - switchCase.GenerateCode(level + 1, generator); - } - } - if (defaultCase != null) - { - defaultCase.GenerateCode(level + 1, generator); - } - - generator.IndentLine(level); - generator.OutputStream.Write("}"); - generator.WriteNewLine(); - } - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/VariableDeclaration.cs b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/VariableDeclaration.cs deleted file mode 100644 index bf2c9026..00000000 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/VariableDeclaration.cs +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; - -namespace CCodeGeneration -{ - public class VariableDeclaration : CodeElement - { - public VariableType Type { get; set; } - public string InitialValue { get; set; } - public bool IsStatic { get; set; } - - public VariableDeclaration() - : base() - { - } - - public VariableDeclaration(VariableType type, string initialValue = null, bool isStatic = false) : - base() - { - this.Type = type; - this.InitialValue = initialValue; - this.IsStatic = isStatic; - } - - public override void GenerateCode(int level, CGenerator generator) - { - if (this.Type != null) - { - generator.IndentLine(level); - - if (this.IsStatic) - { - generator.OutputStream.Write("static "); - } - - // declare the variable - this.Type.GenerateCode(generator); - - if (!String.IsNullOrWhiteSpace(this.InitialValue)) - { - // add initialization value - generator.OutputStream.Write(" = "); - generator.WriteMultilineString(this.InitialValue, level); - } - - generator.OutputStream.Write(";"); - generator.WriteNewLine(); - } - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/VariablePrototype.cs b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/VariablePrototype.cs deleted file mode 100644 index 38a41663..00000000 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/VariablePrototype.cs +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -namespace CCodeGeneration -{ - public class VariablePrototype : CodeElement - { - public VariableType Type { get; set; } - - public VariablePrototype() - : base() - { - } - - public VariablePrototype(VariableType type) : - base() - { - Type = type; - } - - public static VariablePrototype FromVariableDeclaration(VariableDeclaration declaration) - { - return new VariablePrototype(declaration.Type); - } - - - public override void GenerateCode(int level, CGenerator generator) - { - if (this.Type != null) - { - generator.IndentLine(level); - - generator.OutputStream.Write("extern "); - - // declare the variable - this.Type.GenerateCode(generator); - - generator.OutputStream.Write(";"); - generator.WriteNewLine(); - } - } - - } -} diff --git a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/VariableType.cs b/src/apps/snmp/LwipMibCompiler/CCodeGeneration/VariableType.cs deleted file mode 100644 index 313abbee..00000000 --- a/src/apps/snmp/LwipMibCompiler/CCodeGeneration/VariableType.cs +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; -using System.Text; - -namespace CCodeGeneration -{ - public enum ConstType - { - None, - Value, - Indirection, - Both - } - - public class VariableType : ICloneable - { - public const string VoidString = "void"; - public static readonly VariableType Void = new VariableType(null, "void"); - - public string Name { get; set; } - public string Type { get; set; } - public string Indirection { get; set; } - public ConstType Const { get; set; } - public string ArraySpecifier { get; set; } - - public VariableType() - { - } - - public VariableType(string name, string type, string indirection = null, ConstType const_ = ConstType.None, string arraySpecifier = null) - { - this.Name = name; - this.Type = type; - this.Indirection = indirection; - this.Const = const_; - this.ArraySpecifier = arraySpecifier; - } - - public void GenerateCode(CGenerator generator) - { - if (!String.IsNullOrWhiteSpace(this.Type)) - { - generator.OutputStream.Write(this.ToString().Trim()); - } - } - - public override string ToString() - { - if (!String.IsNullOrWhiteSpace(this.Type)) - { - StringBuilder vt = new StringBuilder(); - - if ((this.Const == ConstType.Value) || (this.Const == ConstType.Both)) - { - vt.Append("const "); - } - - vt.Append(this.Type); - vt.Append(" "); - - if (!String.IsNullOrWhiteSpace(this.Indirection)) - { - vt.Append(this.Indirection); - } - - if ((this.Const == ConstType.Indirection) || (this.Const == ConstType.Both)) - { - vt.Append("const "); - } - - if (!String.IsNullOrWhiteSpace(this.Name)) - { - vt.Append(this.Name); - } - - if (this.ArraySpecifier != null) - { - vt.Append("["); - vt.Append(this.ArraySpecifier); - vt.Append("]"); - } - - return vt.ToString().Trim(); - } - - return base.ToString(); - } - - #region ICloneable Member - - public object Clone() - { - // we only have value types as members -> simply use .net base function - return this.MemberwiseClone(); - } - - #endregion - } -} diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler.sln b/src/apps/snmp/LwipMibCompiler/LwipMibCompiler.sln deleted file mode 100644 index ee041413..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler.sln +++ /dev/null @@ -1,47 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LwipMibCompiler", "LwipMibCompiler\LwipMibCompiler.csproj", "{C25D5640-D999-49BD-82E0-A1975296A91E}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LwipSnmpCodeGeneration", "LwipSnmpCodeGeneration\LwipSnmpCodeGeneration.csproj", "{AABCAB90-1540-45D4-A159-14831A54E9A3}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CCodeGeneration", "CCodeGeneration\CCodeGeneration.csproj", "{7DA7C0AB-0982-4BF5-9324-F59A7A08D65B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SharpSnmpLib.Mib", "SharpSnmpLib\SharpSnmpLib.Mib.csproj", "{CBE20411-5DB7-487D-825D-7694267BB6F5}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MibViewer", "MibViewer\MibViewer.csproj", "{86CC0B65-7985-4017-A252-0A7A18DCAEF3}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {7DA7C0AB-0982-4BF5-9324-F59A7A08D65B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7DA7C0AB-0982-4BF5-9324-F59A7A08D65B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7DA7C0AB-0982-4BF5-9324-F59A7A08D65B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7DA7C0AB-0982-4BF5-9324-F59A7A08D65B}.Release|Any CPU.Build.0 = Release|Any CPU - {86CC0B65-7985-4017-A252-0A7A18DCAEF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {86CC0B65-7985-4017-A252-0A7A18DCAEF3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {86CC0B65-7985-4017-A252-0A7A18DCAEF3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {86CC0B65-7985-4017-A252-0A7A18DCAEF3}.Release|Any CPU.Build.0 = Release|Any CPU - {AABCAB90-1540-45D4-A159-14831A54E9A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AABCAB90-1540-45D4-A159-14831A54E9A3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AABCAB90-1540-45D4-A159-14831A54E9A3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AABCAB90-1540-45D4-A159-14831A54E9A3}.Release|Any CPU.Build.0 = Release|Any CPU - {C25D5640-D999-49BD-82E0-A1975296A91E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C25D5640-D999-49BD-82E0-A1975296A91E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C25D5640-D999-49BD-82E0-A1975296A91E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C25D5640-D999-49BD-82E0-A1975296A91E}.Release|Any CPU.Build.0 = Release|Any CPU - {CBE20411-5DB7-487D-825D-7694267BB6F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CBE20411-5DB7-487D-825D-7694267BB6F5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CBE20411-5DB7-487D-825D-7694267BB6F5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CBE20411-5DB7-487D-825D-7694267BB6F5}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(MonoDevelopProperties) = preSolution - StartupItem = LwipMibCompiler\LwipMibCompiler.csproj - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/LwipMibCompiler.csproj b/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/LwipMibCompiler.csproj deleted file mode 100644 index 694263aa..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/LwipMibCompiler.csproj +++ /dev/null @@ -1,73 +0,0 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {C25D5640-D999-49BD-82E0-A1975296A91E} - Exe - Properties - LwipMibCompiler - LwipMibCompiler - v4.0 - 512 - - - - true - bin\Debug\ - DEBUG;TRACE - full - AnyCPU - prompt - false - false - 4 - false - false - - - bin\Release\ - TRACE - true - pdbonly - AnyCPU - prompt - 4 - false - - - - - - - - - - - - - - {7DA7C0AB-0982-4BF5-9324-F59A7A08D65B} - CCodeGeneration - - - {AABCAB90-1540-45D4-A159-14831A54E9A3} - LwipSnmpCodeGeneration - - - {CBE20411-5DB7-487D-825D-7694267BB6F5} - SharpSnmpLib.Mib - - - - - - \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Program.cs b/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Program.cs deleted file mode 100644 index a00d74b1..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Program.cs +++ /dev/null @@ -1,480 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Text.RegularExpressions; -using CCodeGeneration; -using Lextm.SharpSnmpLib.Mib; -using Lextm.SharpSnmpLib.Mib.Elements.Entities; -using Lextm.SharpSnmpLib.Mib.Elements.Types; -using LwipSnmpCodeGeneration; - -namespace LwipMibCompiler -{ - class Program - { - private static readonly Regex _alphaNumericRegex = new Regex("[^a-zA-Z0-9]"); - - static void Main(string[] args) - { - Console.WriteLine("lwIP MIB Compiler"); - Console.WriteLine(""); - - // check args - if ((args.Length < 2) || String.IsNullOrWhiteSpace(args[0]) || String.IsNullOrWhiteSpace(args[1])) - { - PrintUsage(); - return; - } - - string mibFile = args[0]; - if (!File.Exists(mibFile)) - { - Console.WriteLine(String.Format("Unable to find file '{0}'!", mibFile)); - } - - string destFile = args[1]; - string destHeaderFile; - - if (Directory.Exists(destFile)) - { - // only directory passed -> create dest filename from mib filename - string mibFileName = Path.GetFileNameWithoutExtension(mibFile).ToLowerInvariant(); - destFile = Path.Combine(destFile, mibFileName + ".c"); - } - - string destFileExt = Path.GetExtension(destFile); - if (!String.IsNullOrEmpty(destFileExt)) - { - destHeaderFile = destFile.Substring(0, destFile.Length - destFileExt.Length); - } - else - { - destHeaderFile = destFile; - } - destHeaderFile += ".h"; - - for (int i=2; i [ ...]", appName)); - Console.WriteLine(""); - Console.WriteLine(" "); - Console.WriteLine(" Path and filename of MIB file to convert."); - Console.WriteLine(""); - Console.WriteLine(" "); - Console.WriteLine(" Destination path and file. If a path is passed only, filename is auto"); - Console.WriteLine(" generated from MIB file name."); - Console.WriteLine(""); - Console.WriteLine(" "); - Console.WriteLine(" It's important to provide all referred MIB's in order to correctly "); - Console.WriteLine(" resolve all used types."); - Console.WriteLine(""); - } - - - #region Generation of LWIP Object Tree - - private static void ProcessMibTreeNode(MibTreeNode mibTreeNode, SnmpTreeNode assignedSnmpNode) - { - foreach (MibTreeNode mtn in mibTreeNode.ChildNodes) - { - // in theory container nodes may also be scalars or tables at the same time (for now only process real containers) - if (mtn.NodeType == MibTreeNodeType.Container) - { - SnmpTreeNode snmpTreeNode = GenerateSnmpTreeNode(mtn, assignedSnmpNode); - assignedSnmpNode.ChildNodes.Add(snmpTreeNode); - - ProcessMibTreeNode(mtn, snmpTreeNode); - } - else if ((mtn.NodeType & MibTreeNodeType.Scalar) != 0) - { - SnmpScalarNode snmpScalarNode = GenerateSnmpScalarNode(mtn, assignedSnmpNode); - if (snmpScalarNode != null) - { - assignedSnmpNode.ChildNodes.Add(snmpScalarNode); - } - } - else if ((mtn.NodeType & MibTreeNodeType.Table) != 0) - { - SnmpTableNode snmpTableNode = GenerateSnmpTableNode(mtn, assignedSnmpNode); - if (snmpTableNode != null) - { - assignedSnmpNode.ChildNodes.Add(snmpTableNode); - } - } - } - } - - private static SnmpTreeNode GenerateSnmpTreeNode(MibTreeNode mibTreeNode, SnmpTreeNode parentNode) - { - SnmpTreeNode result = new SnmpTreeNode(parentNode); - result.Name = _alphaNumericRegex.Replace (mibTreeNode.Entity.Name, ""); - result.Oid = mibTreeNode.Entity.Value; - result.FullOid = MibTypesResolver.ResolveOid(mibTreeNode.Entity).GetOidString(); - - return result; - } - - private static SnmpScalarNode GenerateSnmpScalarNode(MibTreeNode mibTreeNode, SnmpTreeNode parentNode, bool ignoreAccessibleFlag = false) - { - ObjectType ote = mibTreeNode.Entity as ObjectType; - if (ote != null) - { - return GenerateSnmpScalarNode(ote, parentNode, ignoreAccessibleFlag); - } - - return null; - } - - private static SnmpScalarNode GenerateSnmpScalarNode(ObjectType ote, SnmpTreeNode parentNode, bool ignoreAccessibleFlag = false) - { - SnmpScalarNode result; - - ITypeAssignment mibType = ote.BaseType; - IntegerType it = (mibType as IntegerType); - if (it != null) - { - if (ote.ReferredType.Name == Symbol.TruthValue.ToString()) - { - result = new SnmpScalarNodeTruthValue(parentNode); - } - else if ((it.Type == IntegerType.Types.Integer) || (it.Type == IntegerType.Types.Integer32)) - { - result = new SnmpScalarNodeInt(parentNode); - } - else - { - Console.WriteLine(String.Format("Unsupported IntegerType '{0}'!", it.Type)); - return null; - } - if (it.IsEnumeration) - { - result.Restrictions.AddRange(CreateRestrictions(it.Enumeration)); - } - else - { - result.Restrictions.AddRange(CreateRestrictions(it.Ranges)); - } - } - else - { - UnsignedType ut = (mibType as UnsignedType); - if (ut != null) - { - if ((ut.Type == UnsignedType.Types.Unsigned32) || - (ut.Type == UnsignedType.Types.Gauge32)) - { - result = new SnmpScalarNodeUint(SnmpDataType.Gauge, parentNode); - } - else if (ut.Type == UnsignedType.Types.Counter32) - { - result = new SnmpScalarNodeUint(SnmpDataType.Counter, parentNode); - } - else if (ut.Type == UnsignedType.Types.TimeTicks) - { - result = new SnmpScalarNodeUint(SnmpDataType.TimeTicks, parentNode); - } - else if (ut.Type == UnsignedType.Types.Counter64) - { - result = new SnmpScalarNodeCounter64(parentNode); - if ((ut.Ranges != null) && (ut.Ranges.Count > 0)) - { - Console.WriteLine(String.Format("Generation of ranges is not supported for Counter64 type!")); - return null; - } - } - else - { - Console.WriteLine(String.Format("Unsupported UnsignedType '{0}'!", ut.Type)); - return null; - } - result.Restrictions.AddRange(CreateRestrictions(ut.Ranges)); - } - else if (mibType is IpAddressType) - { - result = new SnmpScalarNodeOctetString(SnmpDataType.IpAddress, parentNode); - result.Restrictions.AddRange(CreateRestrictions((mibType as OctetStringType).Size)); - } - else if (mibType is OpaqueType) - { - result = new SnmpScalarNodeOctetString(SnmpDataType.Opaque, parentNode); - result.Restrictions.AddRange(CreateRestrictions((mibType as OctetStringType).Size)); - } - else if (mibType is OctetStringType) - { - result = new SnmpScalarNodeOctetString(SnmpDataType.OctetString, parentNode); - result.Restrictions.AddRange(CreateRestrictions((mibType as OctetStringType).Size)); - } - else if (mibType is ObjectIdentifierType) - { - result = new SnmpScalarNodeObjectIdentifier(parentNode); - } - else if (mibType is BitsType) - { - result = new SnmpScalarNodeBits(parentNode, (uint)((mibType as BitsType).Map.GetHighestValue() + 1)); - result.Restrictions.AddRange(CreateRestrictions(mibType as BitsType)); - } - else - { - TypeAssignment ta = mibType as TypeAssignment; - if (ta != null) - { - Console.WriteLine(String.Format("Unsupported BaseType: Module='{0}', Name='{1}', Type='{2}'!", ta.Module.Name, ta.Name, ta.Type)); - } - else - { - Console.WriteLine(String.Format("Unsupported BaseType: Module='{0}', Name='{1}'!", mibType.Module, mibType.Name)); - } - - return null; - } - } - - result.Name = _alphaNumericRegex.Replace(ote.Name, ""); - result.Oid = ote.Value; - - if (ote.Access == MaxAccess.readWrite) - { - result.AccessMode = SnmpAccessMode.ReadWrite; - } - else if (ote.Access == MaxAccess.readOnly) - { - result.AccessMode = SnmpAccessMode.ReadOnly; - } - else if (ote.Access == MaxAccess.readCreate) - { - result.AccessMode = SnmpAccessMode.ReadOnly; - } - else if (ignoreAccessibleFlag && (ote.Access == MaxAccess.notAccessible)) - { - result.AccessMode = SnmpAccessMode.NotAccessible; - } - else - { - // not accessible or unsupported accress type - return null; - } - - return result; - } - - private static IEnumerable CreateRestrictions(ValueRanges ranges) - { - List result = new List(); - - if (ranges != null) - { - foreach (ValueRange range in ranges) - { - if (!range.End.HasValue) - { - result.Add(new IsEqualRestriction(range.Start)); - } - else - { - result.Add(new IsInRangeRestriction(range.Start, range.End.Value)); - } - } - } - - return result; - } - - private static IEnumerable CreateRestrictions(ValueMap map) - { - if ((map != null) && (map.Count > 0)) - { - return CreateRestrictions(map.GetContinousRanges()); - } - - return new List(); - } - - private static IEnumerable CreateRestrictions(BitsType bt) - { - List result = new List(); - - if ((bt != null) && (bt.Map != null)) - { - result.Add(new BitMaskRestriction(bt.Map.GetBitMask())); - } - - return result; - } - - private static SnmpTableNode GenerateSnmpTableNode(MibTreeNode mibTreeNode, SnmpTreeNode parentNode) - { - SnmpTableNode result = new SnmpTableNode(parentNode); - result.Name = mibTreeNode.Entity.Name; - result.Oid = mibTreeNode.Entity.Value; - - // expect exactly one row entry - if ((mibTreeNode.ChildNodes.Count != 1) || ((mibTreeNode.ChildNodes[0].NodeType & MibTreeNodeType.TableRow) == 0) || (mibTreeNode.ChildNodes[0].Entity.Value != 1)) - { - Console.WriteLine("Found table with unsupported properties! Table needs exactly one (fixed) TableRow with OID=1 ! (" + mibTreeNode.Entity.Name + ")"); - return null; - } - - MibTreeNode rowNode = mibTreeNode.ChildNodes[0]; - - ObjectType rot = rowNode.Entity as ObjectType; - if (rot != null) - { - if (!String.IsNullOrWhiteSpace(rot.Augments)) - { - result.AugmentedTableRow = rot.Augments; - - // the indeces from another table shall be used because this table is only an extension of it - rot = MibTypesResolver.ResolveDeclaration(rot.Module, rot.Augments) as ObjectType; - } - - if (rot.Indices != null) - { - foreach (string index in rot.Indices) - { - ObjectType indexEntity = MibTypesResolver.ResolveDeclaration(rot.Module, index) as ObjectType; - if (indexEntity == null) - { - Console.WriteLine(String.Format("Could not resolve index '{0}' for table '{1}'! Table omitted!", index, result.Name)); - return null; - } - - result.IndexNodes.Add(GenerateSnmpScalarNode(indexEntity, parentNode, ignoreAccessibleFlag: true)); - } - } - } - - if (result.IndexNodes.Count == 0) - { - // a table cannot be used without index - Console.WriteLine("Found table without any index column ! (" + mibTreeNode.Entity.Name + ")"); - return null; - } - - // add child nodes - foreach (MibTreeNode cellNode in rowNode.ChildNodes) - { - SnmpScalarNode ssn = GenerateSnmpScalarNode(cellNode, parentNode); - if (ssn != null) - { - result.CellNodes.Add(ssn); - } - } - - return result; - } - - #endregion - - } -} diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Properties/AssemblyInfo.cs b/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Properties/AssemblyInfo.cs deleted file mode 100644 index d30b8425..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// Allgemeine Informationen über eine Assembly werden über die folgenden -// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, -// die mit einer Assembly verknüpft sind. -[assembly: AssemblyTitle("ConsoleApplication28")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ConsoleApplication28")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar -// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von -// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. -[assembly: ComVisible(false)] - -// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird -[assembly: Guid("0abf7541-6a96-43cd-9e24-462e074b2c96")] - -// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: -// -// Hauptversion -// Nebenversion -// Buildnummer -// Revision -// -// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern -// übernehmen, indem Sie "*" eingeben: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/app.config b/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/app.config deleted file mode 100644 index e3656033..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/app.config +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/IRestriction.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/IRestriction.cs deleted file mode 100644 index ee2f4536..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/IRestriction.cs +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; - -namespace LwipSnmpCodeGeneration -{ - public interface IRestriction - { - string GetCheckCodeValid(string varNameToCheck); - string GetCheckCodeInvalid(string varNameToCheck); - } - - public class BitMaskRestriction : IRestriction - { - UInt32 mask; - - public BitMaskRestriction(UInt32 mask) - { - this.mask = mask; - } - - public string GetCheckCodeValid(string varNameToCheck) - { - return String.Format("(({0} & {1}) == {0})", varNameToCheck, this.mask); - } - - public string GetCheckCodeInvalid(string varNameToCheck) - { - return String.Format("(({0} & {1}) != {0})", varNameToCheck, this.mask); - } - } - - public class IsEqualRestriction : IRestriction - { - private Int64 value; - - public IsEqualRestriction(Int64 value) - { - this.value = value; - } - - public long Value - { - get { return value; } - } - - public string GetCheckCodeValid(string varNameToCheck) - { - return String.Format("({0} == {1})", varNameToCheck, this.value); - } - - public string GetCheckCodeInvalid(string varNameToCheck) - { - return String.Format("({0} != {1})", varNameToCheck, this.value); - } - } - - public class IsInRangeRestriction : IRestriction - { - private Int64 rangeStart; - private Int64 rangeEnd; - - public IsInRangeRestriction(Int64 rangeStart, Int64 rangeEnd) - { - this.rangeStart = rangeStart; - this.rangeEnd = rangeEnd; - } - - public long RangeStart - { - get { return this.rangeStart; } - } - - public long RangeEnd - { - get { return this.rangeEnd; } - } - - public string GetCheckCodeValid(string varNameToCheck) - { - return String.Format("(({0} >= {1}) && ({0} <= {2}))", varNameToCheck, this.rangeStart, this.rangeEnd); - } - - public string GetCheckCodeInvalid(string varNameToCheck) - { - return String.Format("(({0} < {1}) || ({0} > {2}))", varNameToCheck, this.rangeStart, this.rangeEnd); - } - } - -} diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/LwipSnmp.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/LwipSnmp.cs deleted file mode 100644 index edac59e0..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/LwipSnmp.cs +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; - -namespace LwipSnmpCodeGeneration -{ - public static class LwipOpts - { - public static bool GenerateEmptyFolders = false; - /// - /// If a tree node only has scalar nodes as child nodes, it is replaced by - /// a single scalar array node in order to save memory and have only one single get/test/set method for all scalars. - /// - public static bool GenerateScalarArrays = true; - /// - /// If a tree node has multiple scalars as subnodes as well as other treenodes it - /// defines a single get/test/set method for all scalar child node. - /// (without other treenodes as child it would have been converted to scalar array node). - /// - public static bool GenerateSingleAccessMethodsForTreeNodeScalars = GenerateScalarArrays; - } - - public static class LwipDefs - { - public const string Null = "NULL"; - public const string Vt_U8 = "u8_t"; - public const string Vt_U16 = "u16_t"; - public const string Vt_U32 = "u32_t"; - public const string Vt_S8 = "s8_t"; - public const string Vt_S16 = "s16_t"; - public const string Vt_S32 = "s32_t"; - public const string Vt_Snmp_err = "snmp_err_t"; - - public const string Incl_SnmpOpts = "lwip/apps/snmp_opts.h"; - public const string Opt_SnmpEnabled = "LWIP_SNMP"; - - public const string Vt_StMib = "struct snmp_mib"; - public const string Vt_StObjectId = "struct snmp_obj_id"; - public const string Vt_StNode = "struct snmp_node"; - public const string Vt_StNodeInstance = "struct snmp_node_instance"; - public const string Vt_StTreeNode = "struct snmp_tree_node"; - public const string Vt_StScalarNode = "struct snmp_scalar_node"; - public const string Vt_StScalarArrayNode = "struct snmp_scalar_array_node"; - public const string Vt_StScalarArrayNodeDef = "struct snmp_scalar_array_node_def"; - public const string Vt_StTableNode = "struct snmp_table_node"; - public const string Vt_StTableColumnDef = "struct snmp_table_col_def"; - public const string Vt_StNextOidState = "struct snmp_next_oid_state"; - - public const string Def_NodeAccessReadOnly = "SNMP_NODE_INSTANCE_READ_ONLY"; - public const string Def_NodeAccessReadWrite = "SNMP_NODE_INSTANCE_READ_WRITE"; - public const string Def_NodeAccessWriteOnly = "SNMP_NODE_INSTANCE_WRITE_ONLY"; - public const string Def_NodeAccessNotAccessible = "SNMP_NODE_INSTANCE_NOT_ACCESSIBLE"; - - public const string Def_ErrorCode_Ok = "SNMP_ERR_NOERROR"; - public const string Def_ErrorCode_WrongValue = "SNMP_ERR_WRONGVALUE"; - public const string Def_ErrorCode_NoSuchInstance = "SNMP_ERR_NOSUCHINSTANCE"; - - public const string FnctSuffix_GetValue = "_get_value"; - public const string FnctSuffix_SetTest = "_set_test"; - public const string FnctSuffix_SetValue = "_set_value"; - public const string FnctSuffix_GetInstance = "_get_instance"; - public const string FnctSuffix_GetNextInstance = "_get_next_instance"; - - public const string FnctName_SetTest_Ok = "snmp_set_test_ok"; - - public static string GetLwipDefForSnmpAccessMode(SnmpAccessMode am) - { - switch (am) - { - case SnmpAccessMode.ReadOnly: return Def_NodeAccessReadOnly; - case SnmpAccessMode.ReadWrite: return Def_NodeAccessReadWrite; - case SnmpAccessMode.NotAccessible: return Def_NodeAccessNotAccessible; - case SnmpAccessMode.WriteOnly: return Def_NodeAccessWriteOnly; - default: throw new NotSupportedException("Unknown SnmpAccessMode!"); - } - } - - public static string GetAsn1DefForSnmpDataType(SnmpDataType dt) - { - switch (dt) - { - // primitive - case SnmpDataType.Null: - return "SNMP_ASN1_TYPE_NULL"; - case SnmpDataType.Bits: - case SnmpDataType.OctetString: - return "SNMP_ASN1_TYPE_OCTET_STRING"; - case SnmpDataType.ObjectIdentifier: - return "SNMP_ASN1_TYPE_OBJECT_ID"; - case SnmpDataType.Integer: - return "SNMP_ASN1_TYPE_INTEGER"; - - // application - case SnmpDataType.IpAddress: - return "SNMP_ASN1_TYPE_IPADDR"; - case SnmpDataType.Counter: - return "SNMP_ASN1_TYPE_COUNTER"; - case SnmpDataType.Gauge: - return "SNMP_ASN1_TYPE_GAUGE"; - case SnmpDataType.TimeTicks: - return "SNMP_ASN1_TYPE_TIMETICKS"; - case SnmpDataType.Opaque: - return "SNMP_ASN1_TYPE_OPAQUE"; - case SnmpDataType.Counter64: - return "SNMP_ASN1_TYPE_COUNTER64"; - default: - throw new NotSupportedException("Unknown SnmpDataType!"); - } - } - - public static string GetLengthForSnmpDataType(SnmpDataType dt) - { - switch (dt) - { - case SnmpDataType.Null: - return "0"; - - case SnmpDataType.Integer: - case SnmpDataType.Counter: - case SnmpDataType.IpAddress: - case SnmpDataType.Gauge: - case SnmpDataType.TimeTicks: - return "4"; - - case SnmpDataType.Counter64: - return "8"; - - case SnmpDataType.OctetString: - case SnmpDataType.ObjectIdentifier: - case SnmpDataType.Bits: - case SnmpDataType.Opaque: - return null; - - default: - throw new NotSupportedException("Unknown SnmpDataType!"); - } - } - } - - public enum SnmpDataType - { - Null, - - Integer, // INTEGER, Integer32 - - Counter, // Counter, Counter32 - Gauge, // Gauge, Gauge32, Unsigned32 - TimeTicks, - - Counter64, - - OctetString, - Opaque, - Bits, - - ObjectIdentifier, - - IpAddress, - } - - public enum SnmpAccessMode - { - ReadOnly, - ReadWrite, - WriteOnly, - NotAccessible - } - -} diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/LwipSnmpCodeGeneration.csproj b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/LwipSnmpCodeGeneration.csproj deleted file mode 100644 index f4541c0c..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/LwipSnmpCodeGeneration.csproj +++ /dev/null @@ -1,72 +0,0 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {AABCAB90-1540-45D4-A159-14831A54E9A3} - Library - Properties - LwipSnmpCodeGeneration - LwipSnmpCodeGeneration - v4.0 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - {7DA7C0AB-0982-4BF5-9324-F59A7A08D65B} - CCodeGeneration - - - - - \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/MibCFile.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/MibCFile.cs deleted file mode 100644 index c48ec29d..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/MibCFile.cs +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System.Collections.Generic; -using CCodeGeneration; -using System; -using System.IO; - -namespace LwipSnmpCodeGeneration -{ - public class MibCFile - { - #region Fields - - private const string PreservedSectionMarker = "LWIP MIB generator - preserved section begin"; - private const string PreservedSectionHeader = - "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n" + - PreservedSectionMarker + "\n" + - "Code below is preserved on regeneration. Remove these comment lines to regenerate code.\n" + - "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"; - - private readonly List includes = new List(); - private readonly List defines = new List(); - private readonly List declarations = new List(); - private readonly List implementation = new List(); - private readonly List preservedCode = new List(); - - #endregion - - public MibCFile() - { - } - - #region Accessors - - public List Includes - { - get { return this.includes; } - } - - public List Defines - { - get { return this.defines; } - } - - public List Declarations - { - get { return this.declarations; } - } - - public List Implementation - { - get { return this.implementation; } - } - - public List PreservedCode - { - get { return this.preservedCode; } - } - - #endregion - - #region Methods - - public void Save(CGenerator cGenerator) - { - CFile cFile = new CFile(); - - cFile.AddElement(new Comment("Generated by LwipMibCompiler")); - cFile.AddElement(EmptyLine.SingleLine); - - cFile.AddElement(new PP_Include(LwipDefs.Incl_SnmpOpts)); - CodeContainerBase e = cFile.AddElement(new PP_If(LwipDefs.Opt_SnmpEnabled)) as CodeContainerBase; - e.AddElement(EmptyLine.SingleLine); - - // include header file - string file = cGenerator.FileName; - if (!String.IsNullOrWhiteSpace(file)) - { - string ext = System.IO.Path.GetExtension(file); - - string headerFile = !String.IsNullOrEmpty(ext) ? file.Substring(0, file.Length - ext.Length) : file; - headerFile += ".h"; - - e.AddElement(new PP_Include(headerFile)); - } - - // include common snmp files - e.AddElement(new PP_Include("lwip/apps/snmp.h")); - e.AddElement(new PP_Include("lwip/apps/snmp_core.h")); - e.AddElement(new PP_Include("lwip/apps/snmp_scalar.h")); - e.AddElement(new PP_Include("lwip/apps/snmp_table.h")); - - if (this.includes.Count > 0) - { - e.AddElement(EmptyLine.SingleLine); - e.AddElements(this.includes); - } - - if (this.defines.Count > 0) - { - e.AddElement(EmptyLine.SingleLine); - e.AddElements(this.defines); - } - - if (this.declarations.Count > 0) - { - e.AddElement(EmptyLine.TwoLines); - e.AddElements(this.declarations); - } - - if (this.implementation.Count > 0) - { - e.AddElement(EmptyLine.TwoLines); - e.AddElements(this.implementation); - } - - if (this.preservedCode.Count > 0) - { - e.AddElement(EmptyLine.TwoLines); - e.AddElement(new Comment(PreservedSectionHeader)); - e.AddElement(EmptyLine.SingleLine); - e.AddElements(this.preservedCode); - } - - cFile.Save(cGenerator); - } - - public static string GetPreservedCode(string file) - { - if (File.Exists(file)) - { - using (StreamReader fileStream = new StreamReader(file)) - { - while (!fileStream.EndOfStream) - { - string line = fileStream.ReadLine(); - if (line == PreservedSectionMarker) - { - break; - } - } - - if (!fileStream.EndOfStream) - { - // skip the rest of the comment + spacer line - fileStream.ReadLine(); // "Code below is preserved... - fileStream.ReadLine(); // "+++++++++++++++++++++++... - fileStream.ReadLine(); // */ - fileStream.ReadLine(); // - - string preservedCode = fileStream.ReadToEnd(); - - int lastEndif = preservedCode.LastIndexOf("#endif", StringComparison.Ordinal); - preservedCode = preservedCode.Remove(lastEndif); - - return preservedCode; - } - } - } - - return null; - } - - #endregion - } -} diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/MibHeaderFile.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/MibHeaderFile.cs deleted file mode 100644 index 95f2a06c..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/MibHeaderFile.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System.Collections.Generic; -using System.Text.RegularExpressions; -using CCodeGeneration; - -namespace LwipSnmpCodeGeneration -{ - public class MibHeaderFile - { - - #region Fields - - private readonly List defines = new List(); - private readonly List includes = new List(); - private readonly List functionDeclarations = new List(); - private readonly List variableDeclarations = new List(); - - #endregion - - public MibHeaderFile() - { - } - - #region Accessors - - public List Defines - { - get { return this.defines; } - } - - public List Includes - { - get { return this.includes; } - } - - public List FunctionDeclarations - { - get { return this.functionDeclarations; } - } - - public List VariableDeclarations - { - get { return this.variableDeclarations; } - } - - #endregion - - #region Methods - - public void Save(CGenerator cGenerator) - { - CFile cFile = new CFile(); - - cFile.AddElement(new Comment("Generated by LwipMibCompiler")); - cFile.AddElement(EmptyLine.SingleLine); - - string headerDefine = cGenerator.FileName; - headerDefine = new Regex("[^a-zA-Z0-9]").Replace(headerDefine, "_"); - headerDefine = headerDefine.ToUpperInvariant(); - - CodeContainerBase e = cFile.AddElement(new PP_Ifdef(headerDefine, inverted: true)) as CodeContainerBase; - e.AddElement(new PP_Macro(headerDefine, headerDefine)); - e.AddElement(EmptyLine.SingleLine); - - e.AddElement(new PP_Include(LwipDefs.Incl_SnmpOpts)); - e = e.AddElement(new PP_If(LwipDefs.Opt_SnmpEnabled)) as CodeContainerBase; - e.AddElement(EmptyLine.SingleLine); - - CodeContainerBase cplusplusopen = e.AddElement(new PP_Ifdef("__cplusplus")) as CodeContainerBase; - cplusplusopen.AddElement(new Code("extern \"C\" {")); - e.AddElement(EmptyLine.SingleLine); - - if (this.includes.Count > 0) - { - e.AddElements(this.includes); - e.AddElement(EmptyLine.SingleLine); - } - - if (this.defines.Count > 0) - { - e.AddElements(this.defines); - e.AddElement(EmptyLine.SingleLine); - } - - e.AddElements(this.functionDeclarations, EmptyLine.SingleLine); - e.AddElements(this.variableDeclarations, EmptyLine.SingleLine); - - e.AddElement(EmptyLine.SingleLine); - CodeContainerBase cplusplusclose = e.AddElement(new PP_Ifdef("__cplusplus")) as CodeContainerBase; - cplusplusclose.AddElement(new Code("}")); - - e.AddElement(EmptyLine.SingleLine); - cFile.Save(cGenerator); - } - - #endregion - } -} diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/Properties/AssemblyInfo.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/Properties/AssemblyInfo.cs deleted file mode 100644 index e68b43d5..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// Allgemeine Informationen über eine Assembly werden über die folgenden -// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, -// die mit einer Assembly verknüpft sind. -[assembly: AssemblyTitle("LwipSnmpCodeGeneration")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("LwipSnmpCodeGeneration")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar -// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von -// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. -[assembly: ComVisible(false)] - -// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird -[assembly: Guid("8cfbbb8b-dfbb-4dd5-80c9-e07845dd58c9")] - -// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: -// -// Hauptversion -// Nebenversion -// Buildnummer -// Revision -// -// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern -// übernehmen, indem Sie "*" eingeben: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpMib.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpMib.cs deleted file mode 100644 index 477a18b6..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpMib.cs +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; -using System.Text; -using CCodeGeneration; - -namespace LwipSnmpCodeGeneration -{ - public class SnmpMib : SnmpTreeNode - { - public uint[] BaseOid { get; set; } - - public SnmpMib() - : base(null) - { - } - - public SnmpMib(uint[] baseOid) - : base(null) - { - this.BaseOid = baseOid; - } - - public override string FullNodeName - { - get { return this.Name.ToLowerInvariant() + "_root"; } - } - - public override void GenerateCode(MibCFile mibFile) - { - base.GenerateCode(mibFile); - - System.Diagnostics.Debug.Assert((this.BaseOid != null) && (this.BaseOid.Length > 0)); - - // create and add BaseOID declarations - StringBuilder boidInitialization = new StringBuilder("{"); - foreach (uint t in this.BaseOid) - { - boidInitialization.Append(t); - boidInitialization.Append(","); - } - boidInitialization.Length -= 1; - boidInitialization.Append("}"); - - VariableDeclaration boidDecl = new VariableDeclaration( - new VariableType(this.Name.ToLowerInvariant() + "_base_oid", LwipDefs.Vt_U32, null, ConstType.Value, String.Empty), - boidInitialization.ToString(), true); - - mibFile.Declarations.Add(boidDecl); - mibFile.Declarations.Add(GetExportDeclaration()); - } - - public override void GenerateHeaderCode(MibHeaderFile mibHeaderFile) - { - mibHeaderFile.Includes.Add(new PP_Include("lwip/apps/snmp_core.h")); - - mibHeaderFile.VariableDeclarations.Add(VariablePrototype.FromVariableDeclaration(GetExportDeclaration())); - } - - VariableDeclaration GetExportDeclaration() - { - return new VariableDeclaration( - new VariableType(this.Name.ToLowerInvariant(), LwipDefs.Vt_StMib, null, ConstType.Value), - String.Format("{{{0}_base_oid, LWIP_ARRAYSIZE({0}_base_oid), &{1}.node}}", this.Name.ToLowerInvariant(), this.FullNodeName)); - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpNode.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpNode.cs deleted file mode 100644 index fceb4d52..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpNode.cs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; -using System.Text.RegularExpressions; -using CCodeGeneration; - -namespace LwipSnmpCodeGeneration -{ - public abstract class SnmpNode - { - public static readonly Regex NameValidationRegex = new Regex(@"^\w+$"); - - private string name; - private readonly SnmpTreeNode parentNode; - - protected SnmpNode(SnmpTreeNode parentNode) - { - this.parentNode = parentNode; - } - - public SnmpTreeNode ParentNode - { - get { return this.parentNode; } - } - - public virtual uint Oid { get; set; } - - public abstract string FullNodeName - { - get; - } - - public virtual string Name - { - get { return this.name; } - set - { - if (value != this.name) - { - // check for valid name - if (!NameValidationRegex.IsMatch(value)) - { - throw new ArgumentOutOfRangeException("Name"); - } - - this.name = value; - } - } - } - - public virtual void Generate(MibCFile generatedFile, MibHeaderFile generatedHeaderFile) - { - int declCount = generatedFile.Declarations.Count; - int implCount = generatedFile.Implementation.Count; - - this.GenerateHeaderCode(generatedHeaderFile); - this.GenerateCode(generatedFile); - - if (generatedFile.Declarations.Count != declCount) - { - generatedFile.Declarations.Add(EmptyLine.SingleLine); - } - if (generatedFile.Implementation.Count != implCount) - { - generatedFile.Implementation.Add(EmptyLine.SingleLine); - } - } - - public abstract void GenerateCode(MibCFile mibFile); - - public virtual void GenerateHeaderCode(MibHeaderFile mibHeaderFile) - { - } - - /// - /// Called after node structure creation is completed and before code is created. - /// Offers the possibility to perform operations depending on properties/subnodes. - /// If the node shall be transformed to another node(-type) than the own instance - /// may be replaced on parent node by the transformed instance. - /// Calling sequence is always from leafs up to root. So a tree node can assume - /// that the analyze method was already called on all child nodes. - /// E.g. a tree node only has scalar sub nodes -> it transforms itself to a scalar array node - /// - /// The transformed node or null if nothing shall be changed in parent structure. - public virtual void Analyze() - { - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarAggregationNode.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarAggregationNode.cs deleted file mode 100644 index f5c558c5..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarAggregationNode.cs +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System.Collections.Generic; -using System.Globalization; -using CCodeGeneration; - -namespace LwipSnmpCodeGeneration -{ - public abstract class SnmpScalarAggregationNode: SnmpNode - { - private bool getMethodRequired = false; - private bool testMethodRequired = false; - private bool setMethodRequired = false; - - protected SnmpScalarAggregationNode(SnmpTreeNode parentNode) - : base(parentNode) - { - } - - protected virtual string GetMethodName - { - get { return this.FullNodeName + LwipDefs.FnctSuffix_GetValue; } - } - - protected bool GetMethodRequired - { - get { return this.getMethodRequired; } - } - - protected virtual string TestMethodName - { - get { return this.FullNodeName + LwipDefs.FnctSuffix_SetTest; } - } - - protected bool TestMethodRequired - { - get { return this.testMethodRequired; } - } - - protected virtual string SetMethodName - { - get { return this.FullNodeName + LwipDefs.FnctSuffix_SetValue; } - } - - protected bool SetMethodRequired - { - get { return this.setMethodRequired; } - } - - protected abstract IEnumerable AggregatedScalarNodes - { - get; - } - - public override void Analyze() - { - base.Analyze(); - - this.getMethodRequired = false; - this.testMethodRequired = false; - this.setMethodRequired = false; - - foreach (SnmpScalarNode scalarNode in this.AggregatedScalarNodes) - { - if ((scalarNode.AccessMode == SnmpAccessMode.ReadOnly) || (scalarNode.AccessMode == SnmpAccessMode.ReadWrite)) - { - this.getMethodRequired = true; - } - if ((scalarNode.AccessMode == SnmpAccessMode.WriteOnly) || (scalarNode.AccessMode == SnmpAccessMode.ReadWrite)) - { - this.testMethodRequired = true; - this.setMethodRequired = true; - } - - if (this.getMethodRequired && this.setMethodRequired) - { - break; - } - } - } - - protected void GenerateAggregatedCode(MibCFile mibFile, VariableType instanceType, string switchSelector, bool generateDeclarations = true, bool generateImplementations = true) - { - if (this.getMethodRequired) - { - FunctionDeclaration getMethodDecl = new FunctionDeclaration(this.GetMethodName, isStatic: true); - getMethodDecl.Parameter.Add(instanceType); - getMethodDecl.Parameter.Add(new VariableType("value", VariableType.VoidString, "*")); - getMethodDecl.ReturnType = new VariableType(null, LwipDefs.Vt_S16); - - if (generateDeclarations) - { - mibFile.Declarations.Add(getMethodDecl); - } - if (generateImplementations) - { - Function getMethod = Function.FromDeclaration(getMethodDecl); - GenerateGetMethodCode(getMethod, switchSelector); - mibFile.Implementation.Add(getMethod); - } - } - - if (this.testMethodRequired) - { - FunctionDeclaration testMethodDecl = new FunctionDeclaration(this.TestMethodName, isStatic: true); - testMethodDecl.Parameter.Add(instanceType); - testMethodDecl.Parameter.Add(new VariableType("len", LwipDefs.Vt_U16)); - testMethodDecl.Parameter.Add(new VariableType("value", VariableType.VoidString, "*")); - testMethodDecl.ReturnType = new VariableType(null, LwipDefs.Vt_Snmp_err); - - if (generateDeclarations) - { - mibFile.Declarations.Add(testMethodDecl); - } - if (generateImplementations) - { - Function testMethod = Function.FromDeclaration(testMethodDecl); - GenerateTestMethodCode(testMethod, switchSelector); - mibFile.Implementation.Add(testMethod); - } - } - - if (this.setMethodRequired) - { - FunctionDeclaration setMethodDecl = new FunctionDeclaration(this.SetMethodName, isStatic: true); - setMethodDecl.Parameter.Add(instanceType); - setMethodDecl.Parameter.Add(new VariableType("len", LwipDefs.Vt_U16)); - setMethodDecl.Parameter.Add(new VariableType("value", VariableType.VoidString, "*")); - setMethodDecl.ReturnType = new VariableType(null, LwipDefs.Vt_Snmp_err); - - if (generateDeclarations) - { - mibFile.Declarations.Add(setMethodDecl); - } - if (generateImplementations) - { - Function setMethod = Function.FromDeclaration(setMethodDecl); - GenerateSetMethodCode(setMethod, switchSelector); - mibFile.Implementation.Add(setMethod); - } - } - } - - protected virtual void GenerateGetMethodCode(Function getMethod, string switchSelector) - { - VariableDeclaration returnValue = new VariableDeclaration((VariableType)getMethod.ReturnType.Clone()); - returnValue.Type.Name = "value_len"; - getMethod.Declarations.Add(returnValue); - Switch sw = new Switch(switchSelector); - - bool valueVarUsed = false; - - foreach (SnmpScalarNode scalarNode in this.AggregatedScalarNodes) - { - if ((scalarNode.AccessMode == SnmpAccessMode.ReadOnly) || (scalarNode.AccessMode == SnmpAccessMode.ReadWrite)) - { - SwitchCase sc = new SwitchCase(scalarNode.Oid.ToString(CultureInfo.InvariantCulture)); - sc.Declarations.Add(new Comment(scalarNode.Name, singleLine: true)); - - scalarNode.GenerateGetMethodCode(sc, getMethod.Parameter[1].Name, ref valueVarUsed, returnValue.Type.Name); - - sw.Switches.Add(sc); - } - } - - SwitchCase scd = SwitchCase.GenerateDefault(); - scd.AddCodeFormat("LWIP_DEBUGF(SNMP_MIB_DEBUG,(\"{0}(): unknown id: %\"S32_F\"\\n\", {1}));", getMethod.Name, switchSelector); - scd.AddCodeFormat("{0} = 0;", returnValue.Type.Name); - sw.Switches.Add(scd); - - if (!valueVarUsed) - { - getMethod.AddCodeFormat("LWIP_UNUSED_ARG({0});", getMethod.Parameter[1].Name); - } - - getMethod.AddElement(sw); - - getMethod.AddCodeFormat("return {0};", returnValue.Type.Name); - } - - protected virtual void GenerateTestMethodCode(Function testMethod, string switchSelector) - { - VariableDeclaration returnValue = new VariableDeclaration((VariableType)testMethod.ReturnType.Clone(), LwipDefs.Def_ErrorCode_WrongValue); - returnValue.Type.Name = "err"; - testMethod.Declarations.Add(returnValue); - Switch sw = new Switch(switchSelector); - - bool valueVarUsed = false; - bool lenVarUsed = false; - - foreach (SnmpScalarNode scalarNode in this.AggregatedScalarNodes) - { - if ((scalarNode.AccessMode == SnmpAccessMode.WriteOnly) || (scalarNode.AccessMode == SnmpAccessMode.ReadWrite)) - { - SwitchCase sc = new SwitchCase(scalarNode.Oid.ToString(CultureInfo.InvariantCulture)); - sc.Declarations.Add(new Comment(scalarNode.Name, singleLine: true)); - - scalarNode.GenerateTestMethodCode(sc, testMethod.Parameter[2].Name, ref valueVarUsed, testMethod.Parameter[1].Name, ref lenVarUsed, returnValue.Type.Name); - - sw.Switches.Add(sc); - } - } - - SwitchCase scd = SwitchCase.GenerateDefault(); - scd.AddCodeFormat("LWIP_DEBUGF(SNMP_MIB_DEBUG,(\"{0}(): unknown id: %\"S32_F\"\\n\", {1}));", testMethod.Name, switchSelector); - sw.Switches.Add(scd); - - if (!valueVarUsed) - { - testMethod.AddCodeFormat("LWIP_UNUSED_ARG({0});", testMethod.Parameter[2].Name); - } - if (!lenVarUsed) - { - testMethod.AddCodeFormat("LWIP_UNUSED_ARG({0});", testMethod.Parameter[1].Name); - } - - testMethod.AddElement(sw); - - testMethod.AddCodeFormat("return {0};", returnValue.Type.Name); - } - - protected virtual void GenerateSetMethodCode(Function setMethod, string switchSelector) - { - VariableDeclaration returnValue = new VariableDeclaration((VariableType)setMethod.ReturnType.Clone(), LwipDefs.Def_ErrorCode_Ok); - returnValue.Type.Name = "err"; - setMethod.Declarations.Add(returnValue); - Switch sw = new Switch(switchSelector); - - bool valueVarUsed = false; - bool lenVarUsed = false; - - foreach (SnmpScalarNode scalarNode in this.AggregatedScalarNodes) - { - if ((scalarNode.AccessMode == SnmpAccessMode.WriteOnly) || (scalarNode.AccessMode == SnmpAccessMode.ReadWrite)) - { - SwitchCase sc = new SwitchCase(scalarNode.Oid.ToString(CultureInfo.InvariantCulture)); - sc.Declarations.Add(new Comment(scalarNode.Name, singleLine: true)); - - scalarNode.GenerateSetMethodCode(sc, setMethod.Parameter[2].Name, ref valueVarUsed, setMethod.Parameter[1].Name, ref lenVarUsed, returnValue.Type.Name); - - sw.Switches.Add(sc); - } - } - - SwitchCase scd = SwitchCase.GenerateDefault(); - scd.AddCodeFormat("LWIP_DEBUGF(SNMP_MIB_DEBUG,(\"{0}(): unknown id: %\"S32_F\"\\n\", {1}));", setMethod.Name, switchSelector); - sw.Switches.Add(scd); - - if (!valueVarUsed) - { - setMethod.AddCodeFormat("LWIP_UNUSED_ARG({0});", setMethod.Parameter[2].Name); - } - if (!lenVarUsed) - { - setMethod.AddCodeFormat("LWIP_UNUSED_ARG({0});", setMethod.Parameter[1].Name); - } - - setMethod.AddElement(sw); - - setMethod.AddCodeFormat("return {0};", returnValue.Type.Name); - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarArrayNode.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarArrayNode.cs deleted file mode 100644 index 086fbb9f..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarArrayNode.cs +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; -using System.Collections.Generic; -using System.Text; -using CCodeGeneration; - -namespace LwipSnmpCodeGeneration -{ - public class SnmpScalarArrayNode : SnmpScalarAggregationNode - { - private readonly List scalarNodes; - - public SnmpScalarArrayNode(List scalarNodes, SnmpTreeNode parentNode) - : base(parentNode) - { - this.scalarNodes = scalarNodes; - } - - public override string FullNodeName - { - get { return this.Name.ToLowerInvariant() + "_scalars"; } - } - - protected override IEnumerable AggregatedScalarNodes - { - get { return this.scalarNodes; } - } - - public override void GenerateCode(MibCFile mibFile) - { - VariableType instanceType = new VariableType("node", LwipDefs.Vt_StScalarArrayNodeDef, "*", ConstType.Value); - GenerateAggregatedCode( - mibFile, - instanceType, - instanceType.Name + "->oid"); - - - // create and add node definitions - StringBuilder nodeDefs = new StringBuilder(); - foreach (SnmpScalarNode scalarNode in this.scalarNodes) - { - nodeDefs.AppendFormat(" {{{0}, {1}, {2}}}, /* {3} */ \n", - scalarNode.Oid, - LwipDefs.GetAsn1DefForSnmpDataType(scalarNode.DataType), - LwipDefs.GetLwipDefForSnmpAccessMode(scalarNode.AccessMode), - scalarNode.Name); - } - if (nodeDefs.Length > 0) - nodeDefs.Length--; - - VariableDeclaration nodeDefsDecl = new VariableDeclaration( - new VariableType(this.FullNodeName + "_nodes", LwipDefs.Vt_StScalarArrayNodeDef, null, ConstType.Value, String.Empty), - "{\n" + nodeDefs + "\n}" , - isStatic: true); - - mibFile.Declarations.Add(nodeDefsDecl); - - - // create and add node declaration - string nodeInitialization = String.Format("SNMP_SCALAR_CREATE_ARRAY_NODE({0}, {1}, {2}, {3}, {4})", - this.Oid, - nodeDefsDecl.Type.Name, - (this.GetMethodRequired) ? this.GetMethodName : LwipDefs.Null, - (this.TestMethodRequired) ? this.TestMethodName : LwipDefs.Null, - (this.SetMethodRequired) ? this.SetMethodName : LwipDefs.Null - ); - - mibFile.Declarations.Add(new VariableDeclaration( - new VariableType(this.FullNodeName, LwipDefs.Vt_StScalarArrayNode, null, ConstType.Value), - nodeInitialization, - isStatic: true)); - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNode.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNode.cs deleted file mode 100644 index b9b2ea81..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNode.cs +++ /dev/null @@ -1,395 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; -using System.Collections.Generic; -using CCodeGeneration; - -namespace LwipSnmpCodeGeneration -{ - public class SnmpScalarNode: SnmpNode - { - protected const string LocalValueName = "v"; // name of (casted) local value variable - - private SnmpDataType dataType; - private SnmpAccessMode accessMode; - private readonly List restrictions = new List(); - - private bool useExternalMethods = false; - private string externalGetMethod; - private string externalTestMethod; - private string externalSetMethod; - - - public SnmpScalarNode(SnmpTreeNode parentNode) - : base(parentNode) - { - } - - public override string FullNodeName - { - get { return this.Name.ToLowerInvariant() + "_scalar"; } - } - - public SnmpDataType DataType - { - get { return this.dataType; } - set { this.dataType = value; } - } - - public List Restrictions - { - get { return this.restrictions; } - } - - public SnmpAccessMode AccessMode - { - get { return this.accessMode; } - set { this.accessMode = value; } - } - - public virtual string FixedValueLength - { - get { return null; } - } - - /// - /// If scalar is used as a table index its value becomes part of the OID. This value returns how many OID parts are required to represent this value. - /// - public virtual int OidRepresentationLen - { - get { return -1; } - } - - public bool UseExternalMethods - { - get { return this.useExternalMethods; } - set { this.useExternalMethods = value; } - } - - public string ExternalGetMethod - { - get { return this.externalGetMethod; } - set { this.externalGetMethod = value; } - } - public string ExternalTestMethod - { - get { return this.externalTestMethod; } - set { this.externalTestMethod = value; } - } - public string ExternalSetMethod - { - get { return this.externalSetMethod; } - set { this.externalSetMethod = value; } - } - - public override void GenerateCode(MibCFile mibFile) - { - string getMethodName; - string testMethodName; - string setMethodName; - - if (this.useExternalMethods) - { - getMethodName = this.externalGetMethod; - testMethodName = this.externalTestMethod; - setMethodName = this.externalSetMethod; - } - else - { - getMethodName = LwipDefs.Null; - testMethodName = LwipDefs.Null; - setMethodName = LwipDefs.Null; - - if ((this.accessMode == SnmpAccessMode.ReadWrite) || (this.accessMode == SnmpAccessMode.ReadOnly)) - { - FunctionDeclaration getMethodDecl = new FunctionDeclaration(this.Name + LwipDefs.FnctSuffix_GetValue, isStatic: true); - getMethodDecl.Parameter.Add(new VariableType("instance", LwipDefs.Vt_StNodeInstance, "*")); - getMethodDecl.Parameter.Add(new VariableType("value", VariableType.VoidString, "*")); - getMethodDecl.ReturnType = new VariableType(null, LwipDefs.Vt_S16); - mibFile.Declarations.Add(getMethodDecl); - - Function getMethod = Function.FromDeclaration(getMethodDecl); - getMethodName = getMethod.Name; - - VariableDeclaration returnValue = new VariableDeclaration((VariableType)getMethod.ReturnType.Clone()); - returnValue.Type.Name = "value_len"; - getMethod.Declarations.Add(returnValue); - getMethod.AddCodeFormat("LWIP_UNUSED_ARG({0});", getMethod.Parameter[0].Name); - - bool valueVarUsed = false; - GenerateGetMethodCode(getMethod, getMethod.Parameter[1].Name, ref valueVarUsed, returnValue.Type.Name); - if (!valueVarUsed) - { - getMethod.AddCodeFormat("LWIP_UNUSED_ARG({0});", getMethod.Parameter[1].Name); - } - - getMethod.AddCodeFormat("return {0};", returnValue.Type.Name); - - mibFile.Implementation.Add(getMethod); - } - - if ((this.accessMode == SnmpAccessMode.ReadWrite) || (this.accessMode == SnmpAccessMode.WriteOnly)) - { - bool valueVarUsed; - bool lenVarUsed; - VariableDeclaration returnValue; - - if (this.restrictions.Count > 0) - { - FunctionDeclaration testMethodDecl = new FunctionDeclaration(this.Name + LwipDefs.FnctSuffix_SetTest, isStatic: true); - testMethodDecl.Parameter.Add(new VariableType("instance", LwipDefs.Vt_StNodeInstance, "*")); - testMethodDecl.Parameter.Add(new VariableType("len", LwipDefs.Vt_U16)); - testMethodDecl.Parameter.Add(new VariableType("value", VariableType.VoidString, "*")); - testMethodDecl.ReturnType = new VariableType(null, LwipDefs.Vt_Snmp_err); - mibFile.Declarations.Add(testMethodDecl); - - Function testMethod = Function.FromDeclaration(testMethodDecl); - testMethodName = testMethod.Name; - - returnValue = new VariableDeclaration((VariableType)testMethod.ReturnType.Clone(), LwipDefs.Def_ErrorCode_WrongValue); - returnValue.Type.Name = "err"; - testMethod.Declarations.Add(returnValue); - testMethod.AddCodeFormat("LWIP_UNUSED_ARG({0});", testMethod.Parameter[0].Name); - - valueVarUsed = false; - lenVarUsed = false; - - GenerateTestMethodCode(testMethod, testMethod.Parameter[2].Name, ref valueVarUsed, testMethod.Parameter[1].Name, ref lenVarUsed, returnValue.Type.Name); - - if (!valueVarUsed) - { - testMethod.AddCodeFormat("LWIP_UNUSED_ARG({0});", testMethod.Parameter[2].Name); - } - if (!lenVarUsed) - { - testMethod.AddCodeFormat("LWIP_UNUSED_ARG({0});", testMethod.Parameter[1].Name); - } - - testMethod.AddCodeFormat("return {0};", returnValue.Type.Name); - - mibFile.Implementation.Add(testMethod); - - } - else - { - testMethodName = LwipDefs.FnctName_SetTest_Ok; - } - - FunctionDeclaration setMethodDecl = null; - setMethodDecl = new FunctionDeclaration(this.Name + LwipDefs.FnctSuffix_SetValue, isStatic: true); - setMethodDecl.Parameter.Add(new VariableType("instance", LwipDefs.Vt_StNodeInstance, "*")); - setMethodDecl.Parameter.Add(new VariableType("len", LwipDefs.Vt_U16)); - setMethodDecl.Parameter.Add(new VariableType("value", VariableType.VoidString, "*")); - setMethodDecl.ReturnType = new VariableType(null, LwipDefs.Vt_Snmp_err); - mibFile.Declarations.Add(setMethodDecl); - - Function setMethod = Function.FromDeclaration(setMethodDecl); - setMethodName = setMethod.Name; - - returnValue = new VariableDeclaration((VariableType)setMethod.ReturnType.Clone(), LwipDefs.Def_ErrorCode_Ok); - returnValue.Type.Name = "err"; - setMethod.Declarations.Add(returnValue); - setMethod.AddCodeFormat("LWIP_UNUSED_ARG({0});", setMethod.Parameter[0].Name); - - valueVarUsed = false; - lenVarUsed = false; - - GenerateSetMethodCode(setMethod, setMethod.Parameter[2].Name, ref valueVarUsed, setMethod.Parameter[1].Name, ref lenVarUsed, returnValue.Type.Name); - - if (!valueVarUsed) - { - setMethod.AddCodeFormat("LWIP_UNUSED_ARG({0});", setMethod.Parameter[2].Name); - } - if (!lenVarUsed) - { - setMethod.AddCodeFormat("LWIP_UNUSED_ARG({0});", setMethod.Parameter[1].Name); - } - - setMethod.AddCodeFormat("return {0};", returnValue.Type.Name); - - mibFile.Implementation.Add(setMethod); - } - } - - // create and add node declaration - string nodeInitialization; - if (this.accessMode == SnmpAccessMode.ReadOnly) - { - nodeInitialization = String.Format("SNMP_SCALAR_CREATE_NODE_READONLY({0}, {1}, {2})", - this.Oid, - LwipDefs.GetAsn1DefForSnmpDataType(this.dataType), - getMethodName); - } - else - { - nodeInitialization = String.Format("SNMP_SCALAR_CREATE_NODE({0}, {1}, {2}, {3}, {4}, {5})", - this.Oid, - LwipDefs.GetLwipDefForSnmpAccessMode(this.accessMode), - LwipDefs.GetAsn1DefForSnmpDataType(this.dataType), - getMethodName, - testMethodName, - setMethodName); - } - - mibFile.Declarations.Add(new VariableDeclaration( - new VariableType(this.FullNodeName, LwipDefs.Vt_StScalarNode, null, ConstType.Value), - nodeInitialization, isStatic: true)); - } - - public virtual void GenerateGetMethodCode(CodeContainerBase container, string valueVarName, ref bool valueVarUsed, string retLenVarName) - { - bool localValueVarUsed; - if (GenerateValueDeclaration(container, LocalValueName, valueVarName)) - { - valueVarUsed = true; - localValueVarUsed = false; - } - else - { - localValueVarUsed = true; // do not generate UNUSED_ARG code - } - - if (this.FixedValueLength == null) - { - // check that value with variable length fits into buffer - container.AddElement(new Comment(String.Format("TODO: take care that value with variable length fits into buffer: ({0} <= SNMP_MAX_VALUE_SIZE)", retLenVarName), singleLine: true)); - } - - GenerateGetMethodCodeCore(container, LocalValueName, ref localValueVarUsed, retLenVarName); - if (!localValueVarUsed) - { - container.AddCode(String.Format("LWIP_UNUSED_ARG({0});", LocalValueName)); - } - } - - protected virtual void GenerateGetMethodCodeCore(CodeContainerBase container, string localValueVarName, ref bool localValueVarUsed, string retLenVarName) - { - container.AddElement(new Comment(String.Format("TODO: put requested value to '*{0}' here", localValueVarName), singleLine: true)); - container.AddCodeFormat("{0} = {1};", - retLenVarName, - (!String.IsNullOrWhiteSpace(this.FixedValueLength)) ? this.FixedValueLength : "0"); - } - - public virtual void GenerateTestMethodCode(CodeContainerBase container, string valueVarName, ref bool valueVarUsed, string lenVarName, ref bool lenVarUsed, string retErrVarName) - { - if (this.Restrictions.Count > 0) - { - bool localVarUsed; - if (GenerateValueDeclaration(container, LocalValueName, valueVarName)) - { - valueVarUsed = true; - localVarUsed = false; - } - else - { - localVarUsed = true; // do not generate UNUSED_ARG code - } - - if (!String.IsNullOrWhiteSpace(this.FixedValueLength)) - { - // check for fixed value - container.AddCodeFormat("LWIP_ASSERT(\"Invalid length for datatype\", ({0} == {1}));", lenVarName, this.FixedValueLength); - lenVarUsed = true; - } - - GenerateTestMethodCodeCore(container, LocalValueName, ref localVarUsed, lenVarName, ref lenVarUsed, retErrVarName); - - if (!localVarUsed) - { - container.AddCode(String.Format("LWIP_UNUSED_ARG({0});", LocalValueName)); - } - } - else - { - container.AddCodeFormat("{0} == {1};", retErrVarName, LwipDefs.Def_ErrorCode_Ok); - } - } - - protected virtual void GenerateTestMethodCodeCore(CodeContainerBase container, string localValueVarName, ref bool localValueVarUsed, string lenVarName, ref bool lenVarUsed, string retErrVarName) - { - container.AddElement(new Comment(String.Format("TODO: test new value here:\nif (*{0} == ) {1} = {2};", localValueVarName, retErrVarName, LwipDefs.Def_ErrorCode_Ok))); - } - - public virtual void GenerateSetMethodCode(CodeContainerBase container, string valueVarName, ref bool valueVarUsed, string lenVarName, ref bool lenVarUsed, string retErrVarName) - { - bool localVarUsed; - if (GenerateValueDeclaration(container, LocalValueName, valueVarName)) - { - valueVarUsed = true; - localVarUsed = false; - } - else - { - localVarUsed = true; // do not generate UNUSED_ARG code - } - - GenerateSetMethodCodeCore(container, LocalValueName, ref localVarUsed, lenVarName, ref lenVarUsed, retErrVarName); - - if (!localVarUsed) - { - container.AddCode(String.Format("LWIP_UNUSED_ARG({0});", LocalValueName)); - } - } - - protected virtual void GenerateSetMethodCodeCore(CodeContainerBase container, string localValueVarName, ref bool localValueVarUsed, string lenVarName, ref bool lenVarUsed, string retErrVarName) - { - container.AddElement(new Comment(String.Format("TODO: store new value contained in '*{0}' here", localValueVarName), singleLine: true)); - } - - - protected virtual bool GenerateValueDeclaration(CodeContainerBase container, string variableName, string sourceName) - { - container.AddDeclaration(new VariableDeclaration( - new VariableType(variableName, LwipDefs.Vt_U8, "*"), - "(" + new VariableType(null, LwipDefs.Vt_U8, "*") + ")" + sourceName)); - - return true; - } - - public static SnmpScalarNode CreateFromDatatype(SnmpDataType dataType, SnmpTreeNode parentNode) - { - switch (dataType) - { - case SnmpDataType.Integer: - return new SnmpScalarNodeInt(parentNode); - - case SnmpDataType.Gauge: - case SnmpDataType.Counter: - case SnmpDataType.TimeTicks: - return new SnmpScalarNodeUint(dataType, parentNode); - } - - return new SnmpScalarNode(parentNode); - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeBits.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeBits.cs deleted file mode 100644 index 906a5a6c..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeBits.cs +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; -using System.Text; -using CCodeGeneration; - -namespace LwipSnmpCodeGeneration -{ - public class SnmpScalarNodeBits : SnmpScalarNode - { - private readonly uint bitCount; - - public SnmpScalarNodeBits(SnmpTreeNode parentNode, uint bitCount) - : base(parentNode) - { - this.DataType = SnmpDataType.Bits; - this.bitCount = bitCount; - } - - public override void GenerateGetMethodCode(CodeContainerBase container, string valueVarName, ref bool valueVarUsed, string retLenVarName) - { - container.AddCode(String.Format( - "{0} = snmp_encode_bits(({1} *){2}, SNMP_MAX_VALUE_SIZE, 0 /* TODO: pass real value here */, {3});", - retLenVarName, - LwipDefs.Vt_U8, - valueVarName, - this.bitCount)); - - valueVarUsed = true; - } - - public override void GenerateTestMethodCode(CodeContainerBase container, string valueVarName, ref bool valueVarUsed, string lenVarName, ref bool lenVarUsed, string retErrVarName) - { - if (this.Restrictions.Count > 0) - { - const string bitVarName = "bits"; - - container.Declarations.Add(new VariableDeclaration(new VariableType(bitVarName, LwipDefs.Vt_U32))); - - IfThenElse ite = new IfThenElse(String.Format( - "snmp_decode_bits(({0} *){1}, {2}, &{3}) == ERR_OK", - LwipDefs.Vt_U8, - valueVarName, - lenVarName, - bitVarName)); - - valueVarUsed = true; - lenVarUsed = true; - - StringBuilder innerIfCond = new StringBuilder(); - foreach (IRestriction restriction in this.Restrictions) - { - innerIfCond.Append(restriction.GetCheckCodeValid(bitVarName)); - innerIfCond.Append(" || "); - } - - innerIfCond.Length -= 4; - - IfThenElse innerIte = new IfThenElse(innerIfCond.ToString()); - innerIte.AddCode(String.Format("{0} = {1};", retErrVarName, LwipDefs.Def_ErrorCode_Ok)); - ite.AddElement(innerIte); - container.AddElement(ite); - } - else - { - base.GenerateTestMethodCode(container, valueVarName, ref valueVarUsed, lenVarName, ref lenVarUsed, retErrVarName); - } - } - - public override void GenerateSetMethodCode(CodeContainerBase container, string valueVarName, ref bool valueVarUsed, string lenVarName, ref bool lenVarUsed, string retErrVarName) - { - const string bitVarName = "bits"; - - container.Declarations.Add(new VariableDeclaration(new VariableType(bitVarName, LwipDefs.Vt_U32))); - - IfThenElse ite = new IfThenElse(String.Format( - "snmp_decode_bits(({0} *){1}, {2}, &{3}) == ERR_OK", - LwipDefs.Vt_U8, - valueVarName, - lenVarName, - bitVarName)); - - valueVarUsed = true; - lenVarUsed = true; - - ite.AddElement(new Comment(String.Format("TODO: store new value contained in '{0}' here", bitVarName), singleLine: true)); - - container.AddElement(ite); - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeCounter64.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeCounter64.cs deleted file mode 100644 index 8f450c8a..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeCounter64.cs +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; -using System.Text; -using CCodeGeneration; - -namespace LwipSnmpCodeGeneration -{ - public class SnmpScalarNodeCounter64 : SnmpScalarNode - { - public SnmpScalarNodeCounter64(SnmpTreeNode parentNode) - : base(parentNode) - { - this.DataType = SnmpDataType.Counter64; - } - - protected override bool GenerateValueDeclaration(CodeContainerBase container, string variableName, string sourceName) - { - container.AddDeclaration(new VariableDeclaration( - new VariableType(variableName + "_high", LwipDefs.Vt_U32, "*"), - "(" + new VariableType(null, LwipDefs.Vt_U32, "*").ToString() + ")" + sourceName)); - container.AddDeclaration(new VariableDeclaration( - new VariableType(variableName + "_low", LwipDefs.Vt_U32, "*"), - variableName + "_high + 1")); - - container.AddCode(String.Format("LWIP_UNUSED_ARG({0}_high);", variableName)); - container.AddCode(String.Format("LWIP_UNUSED_ARG({0}_low);", variableName)); - - return false; - } - - public override string FixedValueLength - { - get { return String.Format("(2 * sizeof({0}))", LwipDefs.Vt_U32); } - } - - public override int OidRepresentationLen - { - get { return 1; } - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeInt.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeInt.cs deleted file mode 100644 index a381234c..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeInt.cs +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; -using System.Text; -using CCodeGeneration; - -namespace LwipSnmpCodeGeneration -{ - public class SnmpScalarNodeInt : SnmpScalarNode - { - public SnmpScalarNodeInt(SnmpTreeNode parentNode) - : base(parentNode) - { - this.DataType = SnmpDataType.Integer; - } - - protected override void GenerateTestMethodCodeCore(CodeContainerBase container, string localValueVarName, ref bool localValueVarUsed, string lenVarName, ref bool lenVarUsed, string retErrVarName) - { - System.Diagnostics.Trace.Assert(this.Restrictions.Count > 0); - - StringBuilder ifCond = new StringBuilder(); - foreach (IRestriction restriction in this.Restrictions) - { - ifCond.Append(restriction.GetCheckCodeValid("*" + localValueVarName)); - ifCond.Append(" || "); - - localValueVarUsed = true; - } - - ifCond.Length -= 4; - - IfThenElse ite = new IfThenElse(ifCond.ToString()); - ite.AddCode(String.Format("{0} = {1};", retErrVarName, LwipDefs.Def_ErrorCode_Ok)); - container.AddElement(ite); - } - - protected override bool GenerateValueDeclaration(CodeContainerBase container, string variableName, string sourceName) - { - container.AddDeclaration(new VariableDeclaration( - new VariableType(variableName, LwipDefs.Vt_S32, "*"), - "(" + new VariableType(null, LwipDefs.Vt_S32, "*") + ")" + sourceName)); - - return true; - } - - public override string FixedValueLength - { - get { return String.Format("sizeof({0})", LwipDefs.Vt_S32); } - } - - public override int OidRepresentationLen - { - get { return 1; } - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeObjectIdentifier.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeObjectIdentifier.cs deleted file mode 100644 index 5ce8d146..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeObjectIdentifier.cs +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; -using CCodeGeneration; - -namespace LwipSnmpCodeGeneration -{ - public class SnmpScalarNodeObjectIdentifier: SnmpScalarNode - { - public SnmpScalarNodeObjectIdentifier(SnmpTreeNode parentNode) - : base(parentNode) - { - this.DataType = SnmpDataType.ObjectIdentifier; - } - - protected override bool GenerateValueDeclaration(CodeContainerBase container, string variableName, string sourceName) - { - container.AddDeclaration(new VariableDeclaration( - new VariableType(variableName, LwipDefs.Vt_U32, "*"), - "(" + new VariableType(null, LwipDefs.Vt_U32, "*") + ")" + sourceName)); - - return true; - } - - protected override void GenerateGetMethodCodeCore(CodeContainerBase container, string localValueVarName, ref bool localValueVarUsed, string retLenVarName) - { - container.AddElement(new Comment(String.Format("TODO: put requested value to '*{0}' here. '{0}' has to be interpreted as {1}[]", localValueVarName, LwipDefs.Vt_U32), singleLine: true)); - container.AddElement(EmptyLine.SingleLine); - container.AddCode(String.Format("{0} = 0; // TODO: return real value length here (should be 'numOfElements * sizeof({1})')", retLenVarName, LwipDefs.Vt_U32)); - } - - protected override void GenerateTestMethodCodeCore(CodeContainerBase container, string localValueVarName, ref bool localValueVarUsed, string lenVarName, ref bool lenVarUsed, string retErrVarName) - { - VariableDeclaration objIdLenVar = new VariableDeclaration( - new VariableType(localValueVarName + "_len", LwipDefs.Vt_U8), - String.Format("{0} / sizeof({1})", lenVarName, LwipDefs.Vt_U32)); - lenVarUsed = true; - - container.Declarations.Add(objIdLenVar); - - base.GenerateTestMethodCodeCore(container, localValueVarName, ref localValueVarUsed, lenVarName, ref lenVarUsed, retErrVarName); - - container.AddCode(String.Format("LWIP_UNUSED_ARG({0});", objIdLenVar.Type.Name)); - } - - protected override void GenerateSetMethodCodeCore(CodeContainerBase container, string localValueVarName, ref bool localValueVarUsed, string lenVarName, ref bool lenVarUsed, string retErrVarName) - { - VariableDeclaration objIdLenVar = new VariableDeclaration( - new VariableType(localValueVarName + "_len", LwipDefs.Vt_U8), - String.Format("{0} / sizeof({1})", lenVarName, LwipDefs.Vt_U32)); - lenVarUsed = true; - - container.Declarations.Add(objIdLenVar); - - base.GenerateSetMethodCodeCore(container, localValueVarName, ref localValueVarUsed, lenVarName, ref lenVarUsed, retErrVarName); - - container.AddCode(String.Format("LWIP_UNUSED_ARG({0});", objIdLenVar.Type.Name)); - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeOctetString.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeOctetString.cs deleted file mode 100644 index bf10f9a8..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeOctetString.cs +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; -using System.Text; -using CCodeGeneration; - -namespace LwipSnmpCodeGeneration -{ - public class SnmpScalarNodeOctetString : SnmpScalarNode - { - public SnmpScalarNodeOctetString(SnmpDataType dataType, SnmpTreeNode parentNode) - : base(parentNode) - { - System.Diagnostics.Debug.Assert( - (dataType == SnmpDataType.OctetString) || - (dataType == SnmpDataType.Opaque) || - (dataType == SnmpDataType.IpAddress)); - - this.DataType = dataType; - } - - protected override void GenerateGetMethodCodeCore(CodeContainerBase container, string localValueVarName, ref bool localValueVarUsed, string retLenVarName) - { - if (this.Restrictions.Count > 0) - { - StringBuilder ifCond = new StringBuilder(); - foreach (IRestriction restriction in this.Restrictions) - { - ifCond.Append(restriction.GetCheckCodeValid(retLenVarName)); - ifCond.Append(" || "); - } - - ifCond.Length -= 4; - container.AddElement(new Comment("TODO: take care of len restrictions defined in MIB: " + ifCond, singleLine: true)); - } - base.GenerateGetMethodCodeCore(container, localValueVarName, ref localValueVarUsed, retLenVarName); - } - - protected override void GenerateTestMethodCodeCore(CodeContainerBase container, string localValueVarName, ref bool localValueVarUsed, string lenVarName, ref bool lenVarUsed, string retErrVarName) - { - System.Diagnostics.Trace.Assert(this.Restrictions.Count > 0); - - // checks refer to length of octet string - StringBuilder ifCond = new StringBuilder(); - foreach (IRestriction restriction in this.Restrictions) - { - ifCond.Append(restriction.GetCheckCodeValid(lenVarName)); - ifCond.Append(" || "); - - lenVarUsed = true; - } - - ifCond.Length -= 4; - - IfThenElse ite = new IfThenElse(ifCond.ToString()); - ite.AddCode(String.Format("{0} = {1};", retErrVarName, LwipDefs.Def_ErrorCode_Ok)); - container.AddElement(ite); - } - - public override int OidRepresentationLen - { - get - { - // check restrictions if we are set to one fixed length - if ((this.Restrictions != null) && (this.Restrictions.Count > 0)) - { - foreach (IRestriction restriction in this.Restrictions) - { - if (restriction is IsInRangeRestriction) - { - if ((restriction as IsInRangeRestriction).RangeStart == (restriction as IsInRangeRestriction).RangeEnd) - { - return (int)(restriction as IsInRangeRestriction).RangeStart; - } - } - else if (restriction is IsEqualRestriction) - { - return (int)(restriction as IsEqualRestriction).Value; - } - } - } - - return -1; // variable length - } - } - - } -} diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeTruthValue.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeTruthValue.cs deleted file mode 100644 index 0f557526..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeTruthValue.cs +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; -using CCodeGeneration; - -namespace LwipSnmpCodeGeneration -{ - public class SnmpScalarNodeTruthValue : SnmpScalarNodeInt - { - public SnmpScalarNodeTruthValue(SnmpTreeNode parentNode) - : base(parentNode) - { - } - - protected override void GenerateGetMethodCodeCore(CodeContainerBase container, string localValueVarName, ref bool localValueVarUsed, string retLenVarName) - { - container.AddCodeFormat("snmp_encode_truthvalue({0}, /* TODO: put requested bool value here */ 0);", localValueVarName); - localValueVarUsed = true; - - container.AddCode(String.Format("{0} = {1};", - retLenVarName, - (!String.IsNullOrWhiteSpace(this.FixedValueLength)) ? this.FixedValueLength : "0")); - } - - protected override void GenerateSetMethodCodeCore(CodeContainerBase container, string localValueVarName, ref bool localValueVarUsed, string lenVarName, ref bool lenVarUsed, string retErrVarName) - { - VariableType truthVar = new VariableType("bool_value", LwipDefs.Vt_U8); - container.Declarations.Add(new VariableDeclaration(truthVar)); - - container.AddCodeFormat("snmp_decode_truthvalue({0}, &{1});", localValueVarName, truthVar.Name); - localValueVarUsed = true; - - container.AddElement(new Comment(String.Format("TODO: store new value contained in '{0}' here", truthVar.Name), singleLine: true)); - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeUint.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeUint.cs deleted file mode 100644 index edc161ac..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpScalarNodeUint.cs +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; -using System.Text; -using CCodeGeneration; - -namespace LwipSnmpCodeGeneration -{ - public class SnmpScalarNodeUint : SnmpScalarNode - { - public SnmpScalarNodeUint(SnmpDataType dataType, SnmpTreeNode parentNode) - : base(parentNode) - { - System.Diagnostics.Debug.Assert( - (dataType == SnmpDataType.Counter) || - (dataType == SnmpDataType.Gauge) || - (dataType == SnmpDataType.TimeTicks)); - - this.DataType = dataType; - } - - protected override void GenerateTestMethodCodeCore(CodeContainerBase container, string localValueVarName, ref bool localValueVarUsed, string lenVarName, ref bool lenVarUsed, string retErrVarName) - { - System.Diagnostics.Trace.Assert(this.Restrictions.Count > 0); - - StringBuilder ifCond = new StringBuilder(); - foreach (IRestriction restriction in this.Restrictions) - { - ifCond.Append(restriction.GetCheckCodeValid("*" + localValueVarName)); - ifCond.Append(" || "); - - localValueVarUsed = true; - } - - ifCond.Length -= 4; - - IfThenElse ite = new IfThenElse(ifCond.ToString()); - ite.AddCode(String.Format("{0} = {1};", retErrVarName, LwipDefs.Def_ErrorCode_Ok)); - container.AddElement(ite); - } - - protected override bool GenerateValueDeclaration(CodeContainerBase container, string variableName, string sourceName) - { - container.AddDeclaration(new VariableDeclaration( - new VariableType(variableName, LwipDefs.Vt_U32, "*"), - "(" + new VariableType(null, LwipDefs.Vt_U32, "*") + ")" + sourceName)); - - return true; - } - - public override string FixedValueLength - { - get { return String.Format("sizeof({0})", LwipDefs.Vt_U32); } - } - - public override int OidRepresentationLen - { - get { return 1; } - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpTableNode.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpTableNode.cs deleted file mode 100644 index 8799b013..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpTableNode.cs +++ /dev/null @@ -1,332 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; -using System.Collections.Generic; -using System.Text; -using CCodeGeneration; - -namespace LwipSnmpCodeGeneration -{ - public class SnmpTableNode: SnmpScalarAggregationNode - { - private readonly List cellNodes = new List(); - private readonly List indexNodes = new List(); - private string augmentedTableRow = null; - - - public SnmpTableNode(SnmpTreeNode parentNode) - : base(parentNode) - { - } - - public List CellNodes - { - get { return cellNodes; } - } - - public List IndexNodes - { - get { return indexNodes; } - } - - public string AugmentedTableRow - { - get { return this.augmentedTableRow; } - set { this.augmentedTableRow = value; } - } - - public override string FullNodeName - { - get - { - string result = this.Name.ToLowerInvariant(); - if (!result.Contains("table")) - { - result += "_table"; - } - - return result; - } - } - - protected override IEnumerable AggregatedScalarNodes - { - get { return this.cellNodes; } - } - - public override void GenerateCode(MibCFile mibFile) - { - FunctionDeclaration getInstanceMethodDecl = new FunctionDeclaration(this.FullNodeName + LwipDefs.FnctSuffix_GetInstance, isStatic: true); - getInstanceMethodDecl.Parameter.Add(new VariableType("column", LwipDefs.Vt_U32, "*", ConstType.Value)); - getInstanceMethodDecl.Parameter.Add(new VariableType("row_oid", LwipDefs.Vt_U32, "*", ConstType.Value)); - getInstanceMethodDecl.Parameter.Add(new VariableType("row_oid_len", LwipDefs.Vt_U8, "")); - getInstanceMethodDecl.Parameter.Add(new VariableType("cell_instance", LwipDefs.Vt_StNodeInstance, "*")); - getInstanceMethodDecl.ReturnType = new VariableType(null, LwipDefs.Vt_Snmp_err); - mibFile.Declarations.Add(getInstanceMethodDecl); - - Function getInstanceMethod = Function.FromDeclaration(getInstanceMethodDecl); - GenerateGetInstanceMethodCode(getInstanceMethod); - mibFile.Implementation.Add(getInstanceMethod); - - - FunctionDeclaration getNextInstanceMethodDecl = new FunctionDeclaration(this.FullNodeName + LwipDefs.FnctSuffix_GetNextInstance, isStatic: true); - getNextInstanceMethodDecl.Parameter.Add(new VariableType("column", LwipDefs.Vt_U32, "*", ConstType.Value)); - getNextInstanceMethodDecl.Parameter.Add(new VariableType("row_oid", LwipDefs.Vt_StObjectId, "*")); - getNextInstanceMethodDecl.Parameter.Add(new VariableType("cell_instance", LwipDefs.Vt_StNodeInstance, "*")); - getNextInstanceMethodDecl.ReturnType = new VariableType(null, LwipDefs.Vt_Snmp_err); - mibFile.Declarations.Add(getNextInstanceMethodDecl); - - Function getNextInstanceMethod = Function.FromDeclaration(getNextInstanceMethodDecl); - GenerateGetNextInstanceMethodCode(getNextInstanceMethod); - mibFile.Implementation.Add(getNextInstanceMethod); - - - VariableType instanceType = new VariableType("cell_instance", LwipDefs.Vt_StNodeInstance, "*"); - GenerateAggregatedCode( - mibFile, - instanceType, - String.Format("SNMP_TABLE_GET_COLUMN_FROM_OID({0}->instance_oid.id)", instanceType.Name)); - - - #region create and add column/table definitions - - StringBuilder colDefs = new StringBuilder(); - foreach (SnmpScalarNode colNode in this.cellNodes) - { - colDefs.AppendFormat(" {{{0}, {1}, {2}}}, /* {3} */ \n", - colNode.Oid, - LwipDefs.GetAsn1DefForSnmpDataType(colNode.DataType), - LwipDefs.GetLwipDefForSnmpAccessMode(colNode.AccessMode), - colNode.Name); - } - if (colDefs.Length > 0) - { - colDefs.Length--; - } - - VariableDeclaration colDefsDecl = new VariableDeclaration( - new VariableType(this.FullNodeName + "_columns", LwipDefs.Vt_StTableColumnDef, null, ConstType.Value, String.Empty), - "{\n" + colDefs + "\n}", - isStatic: true); - - mibFile.Declarations.Add(colDefsDecl); - - string nodeInitialization = String.Format("SNMP_TABLE_CREATE({0}, {1}, {2}, {3}, {4}, {5}, {6})", - this.Oid, - colDefsDecl.Type.Name, - getInstanceMethodDecl.Name, getNextInstanceMethodDecl.Name, - (this.GetMethodRequired) ? this.GetMethodName : LwipDefs.Null, - (this.TestMethodRequired) ? this.TestMethodName : LwipDefs.Null, - (this.SetMethodRequired) ? this.SetMethodName : LwipDefs.Null - ); - - mibFile.Declarations.Add(new VariableDeclaration( - new VariableType(this.FullNodeName, LwipDefs.Vt_StTableNode, null, ConstType.Value), - nodeInitialization, - isStatic: true)); - - #endregion - } - - protected virtual void GenerateGetInstanceMethodCode(Function getInstanceMethod) - { - VariableDeclaration returnValue = new VariableDeclaration((VariableType)getInstanceMethod.ReturnType.Clone(), LwipDefs.Def_ErrorCode_NoSuchInstance); - returnValue.Type.Name = "err"; - getInstanceMethod.Declarations.Add(returnValue); - - int instanceOidLength = 0; - StringBuilder indexColumns = new StringBuilder(); - foreach (SnmpScalarNode indexNode in this.indexNodes) - { - if (instanceOidLength >= 0) - { - if (indexNode.OidRepresentationLen >= 0) - { - instanceOidLength += indexNode.OidRepresentationLen; - } - else - { - // at least one index column has a variable length -> we cannot perform a static check - instanceOidLength = -1; - } - } - - indexColumns.AppendFormat( - " {0} ({1}, OID length = {2})\n", - indexNode.Name, - indexNode.DataType, - (indexNode.OidRepresentationLen >= 0) ? indexNode.OidRepresentationLen.ToString() : "variable"); - } - if (indexColumns.Length > 0) - { - indexColumns.Length--; - - getInstanceMethod.Declarations.Insert(0, new Comment(String.Format( - "The instance OID of this table consists of following (index) column(s):\n{0}", - indexColumns))); - } - - string augmentsHint = ""; - if (!String.IsNullOrWhiteSpace(this.augmentedTableRow)) - { - augmentsHint = String.Format( - "This table augments table '{0}'! Index columns therefore belong to table '{0}'!\n" + - "You may simply call the '*{1}' method of this table.\n\n", - (this.augmentedTableRow.ToLowerInvariant().EndsWith("entry")) ? this.augmentedTableRow.Substring(0, this.augmentedTableRow.Length-5) : this.augmentedTableRow, - LwipDefs.FnctSuffix_GetInstance); - } - - CodeContainerBase ccb = getInstanceMethod; - if (instanceOidLength > 0) - { - IfThenElse ite = new IfThenElse(String.Format("{0} == {1}", getInstanceMethod.Parameter[2].Name, instanceOidLength)); - getInstanceMethod.AddElement(ite); - ccb = ite; - } - - ccb.AddCodeFormat("LWIP_UNUSED_ARG({0});", getInstanceMethod.Parameter[0].Name); - ccb.AddCodeFormat("LWIP_UNUSED_ARG({0});", getInstanceMethod.Parameter[1].Name); - if (instanceOidLength <= 0) - { - ccb.AddCodeFormat("LWIP_UNUSED_ARG({0});", getInstanceMethod.Parameter[2].Name); - } - ccb.AddCodeFormat("LWIP_UNUSED_ARG({0});", getInstanceMethod.Parameter[3].Name); - - ccb.AddElement(new Comment(String.Format( - "TODO: check if '{0}'/'{1}' params contain a valid instance oid for a row\n" + - "If so, set '{2} = {3};'\n\n" + - "snmp_oid_* methods may be used for easier processing of oid\n\n" + - "{4}" + - "In order to avoid decoding OID a second time in subsequent get_value/set_test/set_value methods,\n" + - "you may store an arbitrary value (like a pointer to target value object) in '{5}->reference'/'{5}->reference_len'.\n" + - "But be aware that not always a subsequent method is called -> Do NOT allocate memory here and try to release it in subsequent methods!\n\n" + - "You also may replace function pointers in '{5}' param for get/test/set methods which contain the default values from table definition,\n" + - "in order to provide special methods, for the currently processed cell. Changed pointers are only valid for current request.", - getInstanceMethod.Parameter[1].Name, - getInstanceMethod.Parameter[2].Name, - returnValue.Type.Name, - LwipDefs.Def_ErrorCode_Ok, - augmentsHint, - getInstanceMethod.Parameter[3].Name - ))); - - getInstanceMethod.AddCodeFormat("return {0};", returnValue.Type.Name); - } - - protected virtual void GenerateGetNextInstanceMethodCode(Function getNextInstanceMethod) - { - getNextInstanceMethod.AddCodeFormat("LWIP_UNUSED_ARG({0});", getNextInstanceMethod.Parameter[0].Name); - getNextInstanceMethod.AddCodeFormat("LWIP_UNUSED_ARG({0});", getNextInstanceMethod.Parameter[1].Name); - getNextInstanceMethod.AddCodeFormat("LWIP_UNUSED_ARG({0});", getNextInstanceMethod.Parameter[2].Name); - - VariableDeclaration returnValue = new VariableDeclaration((VariableType)getNextInstanceMethod.ReturnType.Clone(), LwipDefs.Def_ErrorCode_NoSuchInstance); - returnValue.Type.Name = "err"; - getNextInstanceMethod.Declarations.Add(returnValue); - - StringBuilder indexColumns = new StringBuilder(); - foreach (SnmpScalarNode indexNode in this.indexNodes) - { - indexColumns.AppendFormat( - " {0} ({1}, OID length = {2})\n", - indexNode.Name, - indexNode.DataType, - (indexNode.OidRepresentationLen >= 0) ? indexNode.OidRepresentationLen.ToString() : "variable"); - } - if (indexColumns.Length > 0) - { - indexColumns.Length--; - - getNextInstanceMethod.Declarations.Insert(0, new Comment(String.Format( - "The instance OID of this table consists of following (index) column(s):\n{0}", - indexColumns))); - } - - string augmentsHint = ""; - if (!String.IsNullOrWhiteSpace(this.augmentedTableRow)) - { - augmentsHint = String.Format( - "This table augments table '{0}'! Index columns therefore belong to table '{0}'!\n" + - "You may simply call the '*{1}' method of this table.\n\n", - (this.augmentedTableRow.ToLowerInvariant().EndsWith("entry")) ? this.augmentedTableRow.Substring(0, this.augmentedTableRow.Length-5) : this.augmentedTableRow, - LwipDefs.FnctSuffix_GetNextInstance); - } - - getNextInstanceMethod.AddElement(new Comment(String.Format( - "TODO: analyze '{0}->id'/'{0}->len' and return the subsequent row instance\n" + - "Be aware that '{0}->id'/'{0}->len' must not point to a valid instance or have correct instance length.\n" + - "If '{0}->len' is 0, return the first instance. If '{0}->len' is longer than expected, cut superfluous OID parts.\n" + - "If a valid next instance is found, store it in '{0}->id'/'{0}->len' and set '{1} = {2};'\n\n" + - "snmp_oid_* methods may be used for easier processing of oid\n\n" + - "{3}" + - "In order to avoid decoding OID a second time in subsequent get_value/set_test/set_value methods,\n" + - "you may store an arbitrary value (like a pointer to target value object) in '{4}->reference'/'{4}->reference_len'.\n" + - "But be aware that not always a subsequent method is called -> Do NOT allocate memory here and try to release it in subsequent methods!\n\n" + - "You also may replace function pointers in '{4}' param for get/test/set methods which contain the default values from table definition,\n" + - "in order to provide special methods, for the currently processed cell. Changed pointers are only valid for current request.", - getNextInstanceMethod.Parameter[1].Name, - returnValue.Type.Name, - LwipDefs.Def_ErrorCode_Ok, - augmentsHint, - getNextInstanceMethod.Parameter[2].Name - ))); - - getNextInstanceMethod.AddElement(new Comment(String.Format( - "For easier processing and getting the next instance, you may use the 'snmp_next_oid_*' enumerator.\n" + - "Simply pass all known instance OID's to it and it returns the next valid one:\n\n" + - "{0} state;\n" + - "{1} result_buf;\n" + - "snmp_next_oid_init(&state, {2}->id, {2}->len, result_buf, LWIP_SNMP_OBJ_ID_LEN);\n" + - "while ({{not all instances passed}}) {{\n" + - " {1} test_oid;\n" + - " {{fill test_oid to create instance oid for next instance}}\n" + - " snmp_next_oid_check(&state, test_oid->id, test_oid->len, {{target_data_ptr}});\n" + - "}}\n" + - "if(state.status == SNMP_NEXT_OID_STATUS_SUCCESS) {{\n" + - " snmp_oid_assign(row_oid, result_buf->oid, result_buf->len);\n" + - " {3}->reference.ptr = state.reference; //==target_data_ptr, for usage in subsequent get/test/set\n" + - " {4} = {5};\n" + - "}}" - , - LwipDefs.Vt_StNextOidState, - LwipDefs.Vt_StObjectId, - getNextInstanceMethod.Parameter[1].Name, - getNextInstanceMethod.Parameter[2].Name, - returnValue.Type.Name, - LwipDefs.Def_ErrorCode_Ok - ))); - - getNextInstanceMethod.AddCodeFormat("return {0};", returnValue.Type.Name); - } - - } -} diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpTreeNode.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpTreeNode.cs deleted file mode 100644 index bf0c604e..00000000 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpTreeNode.cs +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; -using System.Collections.Generic; -using System.Text; -using CCodeGeneration; - -namespace LwipSnmpCodeGeneration -{ - public class SnmpTreeNode: SnmpScalarAggregationNode - { - private readonly List childNodes = new List(); - private readonly List childScalarNodes = new List(); - private string fullOid = ""; - - public SnmpTreeNode(SnmpTreeNode parentNode) - : base(parentNode) - { - } - - public override string FullNodeName - { - get { return this.Name.ToLowerInvariant() + "_treenode"; } - } - - public string FullOid - { - get { return this.fullOid; } - set { this.fullOid = value; } - } - - public List ChildNodes - { - get { return this.childNodes; } - } - - protected override IEnumerable AggregatedScalarNodes - { - get { return this.childScalarNodes; } - } - - private void GenerateAggregatedCode(MibCFile mibFile, bool generateDeclarations, bool generateImplementations) - { - VariableType instanceType = new VariableType("instance", LwipDefs.Vt_StNodeInstance, "*"); - base.GenerateAggregatedCode( - mibFile, - instanceType, - String.Format("{0}->node->oid", instanceType.Name), - generateDeclarations, - generateImplementations); - } - - private void GenerateAggregateMethodDeclarations(MibCFile mibFile) - { - if (LwipOpts.GenerateSingleAccessMethodsForTreeNodeScalars && (this.childScalarNodes.Count > 1)) - { - GenerateAggregatedCode(mibFile, true, false); - } - } - - public override void GenerateCode(MibCFile mibFile) - { - string nodeInitialization; - - if (LwipOpts.GenerateSingleAccessMethodsForTreeNodeScalars && (this.childScalarNodes.Count > 1)) - { - GenerateAggregatedCode(mibFile, false, true); - } - - // create and add node declaration - if (this.childNodes.Count > 0) - { - StringBuilder subnodeArrayInitialization = new StringBuilder(); - - for (int i=0; i=0; i--) - { - this.ChildNodes[i].Analyze(); - } - - // collect scalar nodes - foreach (SnmpNode childNode in this.childNodes) - { - SnmpScalarNode scalarNode = childNode as SnmpScalarNode; - if (scalarNode != null) - { - this.childScalarNodes.Add(scalarNode); - } - } - - base.Analyze(); - - // check if we can merge this node to a scalar array node (all childs need to be scalars) - if (this.childNodes.Count > 0) - { - if (LwipOpts.GenerateScalarArrays && (this.childScalarNodes.Count == this.childNodes.Count) && (this.ParentNode != null)) - { - SnmpScalarArrayNode scalarArrayNode = new SnmpScalarArrayNode(this.childScalarNodes, this.ParentNode); - scalarArrayNode.Oid = this.Oid; - scalarArrayNode.Name = this.Name; - scalarArrayNode.Analyze(); - - for (int i=0; i 1)) - { - foreach (SnmpScalarNode scalarNode in this.childScalarNodes) - { - scalarNode.UseExternalMethods = true; - scalarNode.ExternalGetMethod = this.GetMethodName; - scalarNode.ExternalTestMethod = this.TestMethodName; - scalarNode.ExternalSetMethod = this.SetMethodName; - } - } - } - else // if (this.childNodes.Count == 0) - { - if (!LwipOpts.GenerateEmptyFolders && (this.ParentNode != null)) - { - // do not generate this empty folder because it only waste (static) memory - for (int i=0; i - /// Erforderliche Designervariable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Verwendete Ressourcen bereinigen. - /// - /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Vom Windows Form-Designer generierter Code - - /// - /// Erforderliche Methode für die Designerunterstützung. - /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMain)); - this.treeMib = new System.Windows.Forms.TreeView(); - this.imagelistTreeNodeImages = new System.Windows.Forms.ImageList(this.components); - this.splitContainerMain = new System.Windows.Forms.SplitContainer(); - this.listviewNodeDetails = new System.Windows.Forms.ListView(); - this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); - this.toolStripMain = new System.Windows.Forms.ToolStrip(); - this.toolbuttonOpenMib = new System.Windows.Forms.ToolStripButton(); - this.dialogOpenMib = new System.Windows.Forms.OpenFileDialog(); - ((System.ComponentModel.ISupportInitialize)(this.splitContainerMain)).BeginInit(); - this.splitContainerMain.Panel1.SuspendLayout(); - this.splitContainerMain.Panel2.SuspendLayout(); - this.splitContainerMain.SuspendLayout(); - this.toolStripMain.SuspendLayout(); - this.SuspendLayout(); - // - // treeMib - // - this.treeMib.Dock = System.Windows.Forms.DockStyle.Fill; - this.treeMib.ImageIndex = 0; - this.treeMib.ImageList = this.imagelistTreeNodeImages; - this.treeMib.Location = new System.Drawing.Point(0, 0); - this.treeMib.Name = "treeMib"; - this.treeMib.SelectedImageIndex = 0; - this.treeMib.Size = new System.Drawing.Size(1028, 418); - this.treeMib.TabIndex = 0; - this.treeMib.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeMib_AfterSelect); - // - // imagelistTreeNodeImages - // - this.imagelistTreeNodeImages.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imagelistTreeNodeImages.ImageStream"))); - this.imagelistTreeNodeImages.TransparentColor = System.Drawing.Color.Transparent; - this.imagelistTreeNodeImages.Images.SetKeyName(0, "ntimgContainer"); - this.imagelistTreeNodeImages.Images.SetKeyName(1, "ntimgTable"); - this.imagelistTreeNodeImages.Images.SetKeyName(2, "ntimgRow"); - this.imagelistTreeNodeImages.Images.SetKeyName(3, "ntimgColumn"); - this.imagelistTreeNodeImages.Images.SetKeyName(4, "ntimgScalar"); - this.imagelistTreeNodeImages.Images.SetKeyName(5, "ntimgUnknown"); - // - // splitContainerMain - // - this.splitContainerMain.Dock = System.Windows.Forms.DockStyle.Fill; - this.splitContainerMain.Location = new System.Drawing.Point(0, 25); - this.splitContainerMain.Name = "splitContainerMain"; - this.splitContainerMain.Orientation = System.Windows.Forms.Orientation.Horizontal; - // - // splitContainerMain.Panel1 - // - this.splitContainerMain.Panel1.Controls.Add(this.treeMib); - // - // splitContainerMain.Panel2 - // - this.splitContainerMain.Panel2.Controls.Add(this.listviewNodeDetails); - this.splitContainerMain.Size = new System.Drawing.Size(1028, 625); - this.splitContainerMain.SplitterDistance = 418; - this.splitContainerMain.TabIndex = 1; - // - // listviewNodeDetails - // - this.listviewNodeDetails.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { - this.columnHeader1, - this.columnHeader2}); - this.listviewNodeDetails.Dock = System.Windows.Forms.DockStyle.Fill; - this.listviewNodeDetails.FullRowSelect = true; - this.listviewNodeDetails.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None; - this.listviewNodeDetails.Location = new System.Drawing.Point(0, 0); - this.listviewNodeDetails.Name = "listviewNodeDetails"; - this.listviewNodeDetails.Size = new System.Drawing.Size(1028, 203); - this.listviewNodeDetails.TabIndex = 0; - this.listviewNodeDetails.UseCompatibleStateImageBehavior = false; - this.listviewNodeDetails.View = System.Windows.Forms.View.Details; - // - // columnHeader1 - // - this.columnHeader1.Text = ""; - this.columnHeader1.Width = 150; - // - // columnHeader2 - // - this.columnHeader2.Text = ""; - this.columnHeader2.Width = 777; - // - // toolStripMain - // - this.toolStripMain.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolbuttonOpenMib}); - this.toolStripMain.Location = new System.Drawing.Point(0, 0); - this.toolStripMain.Name = "toolStripMain"; - this.toolStripMain.Size = new System.Drawing.Size(1028, 25); - this.toolStripMain.TabIndex = 2; - // - // toolbuttonOpenMib - // - this.toolbuttonOpenMib.Image = ((System.Drawing.Image)(resources.GetObject("toolbuttonOpenMib.Image"))); - this.toolbuttonOpenMib.Name = "toolbuttonOpenMib"; - this.toolbuttonOpenMib.Size = new System.Drawing.Size(65, 22); - this.toolbuttonOpenMib.Text = "Open..."; - this.toolbuttonOpenMib.Click += new System.EventHandler(this.toolbuttonOpenMib_Click); - // - // FormMain - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1028, 650); - this.Controls.Add(this.splitContainerMain); - this.Controls.Add(this.toolStripMain); - this.Name = "FormMain"; - this.Text = "MIB Viewer"; - this.WindowState = System.Windows.Forms.FormWindowState.Maximized; - this.splitContainerMain.Panel1.ResumeLayout(false); - this.splitContainerMain.Panel2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.splitContainerMain)).EndInit(); - this.splitContainerMain.ResumeLayout(false); - this.toolStripMain.ResumeLayout(false); - this.toolStripMain.PerformLayout(); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TreeView treeMib; - private System.Windows.Forms.SplitContainer splitContainerMain; - private System.Windows.Forms.ListView listviewNodeDetails; - private System.Windows.Forms.ColumnHeader columnHeader1; - private System.Windows.Forms.ColumnHeader columnHeader2; - private System.Windows.Forms.ImageList imagelistTreeNodeImages; - private System.Windows.Forms.ToolStrip toolStripMain; - private System.Windows.Forms.ToolStripButton toolbuttonOpenMib; - private System.Windows.Forms.OpenFileDialog dialogOpenMib; - } -} - diff --git a/src/apps/snmp/LwipMibCompiler/MibViewer/FormMain.cs b/src/apps/snmp/LwipMibCompiler/MibViewer/FormMain.cs deleted file mode 100644 index 7d2490db..00000000 --- a/src/apps/snmp/LwipMibCompiler/MibViewer/FormMain.cs +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System.Windows.Forms; -using Lextm.SharpSnmpLib.Mib; -using Lextm.SharpSnmpLib.Mib.Elements; -using Lextm.SharpSnmpLib.Mib.Elements.Types; -using Lextm.SharpSnmpLib.Mib.Elements.Entities; -using System.IO; - -namespace LwipMibViewer -{ - public partial class FormMain : Form - { - readonly ListViewGroup listviewgroupAbstract; - readonly ListViewGroup listviewgroupElement; - readonly ListViewGroup listviewgroupBaseType; - readonly ListViewGroup listviewgroupTypeChain; - - public FormMain() - { - this.Font = SystemInformation.MenuFont; - InitializeComponent(); - - this.listviewgroupAbstract = new ListViewGroup("Abstract", System.Windows.Forms.HorizontalAlignment.Left); - this.listviewgroupElement = new ListViewGroup("Element Properties", System.Windows.Forms.HorizontalAlignment.Left); - this.listviewgroupBaseType = new ListViewGroup("Element Base Type", System.Windows.Forms.HorizontalAlignment.Left); - this.listviewgroupTypeChain = new ListViewGroup("Element Type Chain", System.Windows.Forms.HorizontalAlignment.Left); - this.listviewNodeDetails.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] { - listviewgroupAbstract, - listviewgroupElement, - listviewgroupBaseType, - listviewgroupTypeChain}); - - try - { - DirectoryInfo dirInfo = new DirectoryInfo(Path.GetDirectoryName(Application.ExecutablePath)); - if (dirInfo != null) - { - dirInfo = dirInfo.Parent; - if (dirInfo != null) - { - dirInfo = dirInfo.Parent; - if (dirInfo != null) - { - dirInfo = new DirectoryInfo(Path.Combine(dirInfo.FullName, "Mibs")); - if (dirInfo.Exists) - { - MibTypesResolver.RegisterResolver(new FileSystemMibResolver(dirInfo.FullName, true)); - } - } - } - } - } - catch - { } - } - - #region GUI Event Handler - - private void toolbuttonOpenMib_Click(object sender, System.EventArgs e) - { - if (this.dialogOpenMib.ShowDialog() == DialogResult.OK) - { - OpenMib(this.dialogOpenMib.FileName); - } - } - - private void treeMib_AfterSelect(object sender, TreeViewEventArgs e) - { - listviewNodeDetails.Items.Clear(); - - if (e.Node != null) - { - MibTreeNode mtn = e.Node.Tag as MibTreeNode; - if (mtn != null) - { - listviewNodeDetails.Items.Add(new ListViewItem(new string[] { "Abstract", mtn.NodeType.ToString() }, this.listviewgroupAbstract)); - - listviewNodeDetails.Items.Add(new ListViewItem(new string[] { "Module", (mtn.Entity.Module != null) ? mtn.Entity.Module.Name : "" }, this.listviewgroupElement)); - listviewNodeDetails.Items.Add(new ListViewItem(new string[] { "Type", mtn.Entity.GetType().Name }, this.listviewgroupElement)); - listviewNodeDetails.Items.Add(new ListViewItem(new string[] { "Name", mtn.Entity.Name }, this.listviewgroupElement)); - listviewNodeDetails.Items.Add(new ListViewItem(new string[] { "Description", mtn.Entity.Description }, this.listviewgroupElement)); - listviewNodeDetails.Items.Add(new ListViewItem(new string[] { "OID", mtn.Entity.Value.ToString() }, this.listviewgroupElement)); - listviewNodeDetails.Items.Add(new ListViewItem(new string[] { "Full OID", MibTypesResolver.ResolveOid(mtn.Entity).GetOidString() }, this.listviewgroupElement)); - if (mtn.Entity is ObjectType) - { - listviewNodeDetails.Items.Add(new ListViewItem(new string[] { "Access", (mtn.Entity as ObjectType).Access.ToString() }, this.listviewgroupElement)); - } - - ITypeReferrer tr = mtn.Entity as ITypeReferrer; - if (tr != null) - { - ShowTypeDetails(listviewNodeDetails, this.listviewgroupBaseType, tr.BaseType); - ShowTypeChain(listviewNodeDetails, tr.ReferredType); - } - } - } - } - - #endregion - - #region Methods - - private void OpenMib(string file) - { - try - { - MibDocument md = new MibDocument(file); - MibTypesResolver.ResolveTypes(md.Modules[0]); - - this.treeMib.Nodes.Clear(); - this.listviewNodeDetails.Items.Clear(); - - MibTree mt = new MibTree(md.Modules[0] as MibModule); - foreach (MibTreeNode mibTreeNode in mt.Root) - { - AddNode(mibTreeNode, this.treeMib.Nodes); - - foreach (TreeNode node in this.treeMib.Nodes) - { - node.Expand(); - } - } - } - catch - { - } - } - - private void AddNode(MibTreeNode mibNode, TreeNodeCollection parentNodes) - { - int imgIndex = 5; //unknown - if ((mibNode.NodeType & MibTreeNodeType.Table) != 0) - { - imgIndex = 1; - } - else if ((mibNode.NodeType & MibTreeNodeType.TableRow) != 0) - { - imgIndex = 2; - } - else if ((mibNode.NodeType & MibTreeNodeType.TableCell) != 0) - { - imgIndex = 3; - } - else if ((mibNode.NodeType & MibTreeNodeType.Scalar) != 0) - { - imgIndex = 4; - } - else if ((mibNode.NodeType & MibTreeNodeType.Container) != 0) - { - imgIndex = 0; - } - - TreeNode newNode = new TreeNode(mibNode.Entity.Name, imgIndex, imgIndex); - newNode.Tag = mibNode; - - parentNodes.Add(newNode); - - foreach (MibTreeNode child in mibNode.ChildNodes) - { - AddNode(child, newNode.Nodes); - } - } - - private void ShowTypeChain(ListView lv, ITypeAssignment type) - { - ShowTypeDetails(lv, this.listviewgroupTypeChain, type); - - ITypeReferrer tr = type as ITypeReferrer; - if ((tr != null) && (tr.ReferredType != null)) - { - lv.Items.Add(new ListViewItem(new string[] { " >>>", "" }, this.listviewgroupTypeChain)); - ShowTypeChain(listviewNodeDetails, tr.ReferredType); - } - } - - private void ShowTypeDetails(ListView lv, ListViewGroup lvg, ITypeAssignment type) - { - lv.Items.Add(new ListViewItem(new string[] { "Module", (type.Module != null) ? type.Module.Name : "" }, lvg)); - lv.Items.Add(new ListViewItem(new string[] { "Type", type.GetType().Name }, lvg)); - lv.Items.Add(new ListViewItem(new string[] { "Name", type.Name }, lvg)); - } - - #endregion - - } -} diff --git a/src/apps/snmp/LwipMibCompiler/MibViewer/FormMain.resx b/src/apps/snmp/LwipMibCompiler/MibViewer/FormMain.resx deleted file mode 100644 index 973f546b..00000000 --- a/src/apps/snmp/LwipMibCompiler/MibViewer/FormMain.resx +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - - - AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w - LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 - ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABo - IQAAAk1TRnQBSQFMAgEBBgEAARABAAEQAQABEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA - AwABIAMAAQEBAAEgBgABIBIAAwQBBQMWAR4DIgEyAzEBTwJGAUQBhwMvAUsDHgErAxsBJgMYASIDFQEd - AxIBGAMNARIDCgENAwcBCQMEAQUDAQECAwQBBQMWAR4DIgEyAzEBTgJGAUQBhwMvAUsDHgErAxsBJgMb - ASYDIQExAyEBMAMdASoDGwEmAxgBIQMLAQ8DAQECgAADAgEDAwwBEAMrAUMCRgFEAYIC/wHwAf8CRgFE - AYIDKgFAAw8BFAMNAREDCwEPAwkBDAMHAQoDBQEHAwQBBQMCAQMDAAEBAwIBAwMLAQ8DKwFDAkYBRAGC - Av8B8AH/AkYBRAGCAyoBQAMOARMDEgEZAT0COwFpAVwBRQFCAawBZwE+AToBxAFaAUUBQwGqATwBOwE6 - AWYDEAEWAwABAYQAAx4BKwJEAUIBewL/AfAB/wLpAdoD/wHxAf8CRAFCAXsDHgErJAADHgErAkQBQgF7 - Av8B8AH/AukB2gP/AfEB/wJEAUIBewMeASsBLgItAUcBdwFHATwByQG7AVQBPQHxA+4B/wG7AVMBPAHx - AXcBRgE8AckBLgItAUeEAAMdASoCRAFCAXcC/wHwAf8B6wHdAbEB/wH3AcEBNwH/Ae0B3wGzA/8B8gH/ - AkQBQgF3Ax0BKhwAAx0BKgJEAUIBdwL/AfAB/wLpAdoB/wLqAdwB/wLrAd4D/wHyAf8CRAFCAXcBZAFJ - AUIBrwG2AVkBQQHxAc0BVAEyAf8BvQF5AWIB/wHFAVABLgH/AbEBUQE1AfEBXAFIAUQBn4QAAkMBQQF2 - Av8B8AH/AukB2gH/AecBqwEhAf8B5wGrASEB/wHnAasBIQH/AeoB2wGwA/8B9AH/AkMBQQF2Ax0BKhgA - AkMBQQF2Av8B8AH/AukB2gH/AuoB3AH/AusB3gH/AuwB3wH/Au0B4QP/AfQB/wGAAUQBMQHaAc4BcAFN - AfwBugFMASoB/wPSAf8BvgGLAXgB/wG7AVIBMgH8AW8BSQE/AbqEAAMdASkCQwFBAXQC/wHxAf8B5wHX - AasB/wHXAZYBDAH/AdcBlgEMAf8B1wGWAQwB/wHoAdgBrgP/AfUB/wJDAUEBdAMdASkUAAMdASkCQwFB - AXQC/wHxAf8C6wHeAf8C7AHfAf8C7QHhAf8C7gHjAf8C7wHlAf8BzQF5AV4B/wHOAXcBWAH3AbwBVAEy - Af8BtAFMASoB/wPmAf8BtwFlAUsB8AFdAUkBRAGdiAADHQEpAkIBQQFyAv8B8gH/AeUB1AGpAf8BzQGJ - AQAB/wHNAYkBAAH/Ac0BiQEAAf8B6AHXAa8D/wH3Af8CQgFBAXIDHAEoFAADHQEpAkIBQQFyAv8B8gH/ - Au0B4QH/Au4B4wH/Au8B5QH/AvAB5wH/AeABuwGqAf8BzgFpAUgB/wHjAcsBwQH5BP8B3gHHAb0B9QF+ - AU8BQgHEAi0BLAFFjAADHAEoAkEBQAFxAv8B9AH/AecB1gGsAf8B0QGOAQQB/wHRAY4BBAH/AdEBjgEE - Af8B7AHbAbMD/wH4Af8CQQFAAXEDHAEoFAADHAEoAkEBQAFxAv8B9AH/Au8B5QH/AvAB5wH/AvEB6QH/ - AvMB6gH/AeQBvgGsAf8B1AGBAWIB/wGGAUoBNAHXAWYBTQFEAaoCLQEsAUWUAAMcAScCQQFAAW8C/wH1 - Af8B7AHcAbMB/wHfAaEBFwH/Ad8BoQEXAf8B3wGhARcB/wHxAeIBuwP/AfoB/wJBAUABbwMcAScUAAMc - AScCQQFAAW8C/wH1Af8C8QHpAf8C8wHqAf8C9AHsAf8C9QHuAf8C9gHwA/8B+gH/AkEBQAFvAxwBJ5gA - AxwBJwJAAT8BbQL/AfcB/wHyAeMBuwH/AfABuAEuAf8B8AG4AS4B/wHwAbgBLgH/AvgB9AP/AfsB/wJA - AT8BbQMcAScUAAMcAScCQAE/AW0C/wH3Af8C9AHsAf8C9QHuAf8C9gHwAf8C9wHyAf8C+AH0A/8B+wH/ - AkABPwFtAxwBJ5gAAxsBJgJAAT8BbAL/AfgB/wH3AeoBwwH/Af0ByQE/Af8B+QHsAccB/wL7AfcB/wL8 - AfkD/wH8Af8CQAE/AWwDGwEmFAADGwEmAkABPwFsAv8B+AH/AvYB8AH/AvcB8gH/AvgB9AH/AvsB9wH/ - AvwB+QP/AfwB/wJAAT8BbAMbASaYAAMbASYCPwE+AWsC/wH6Af8C+AH0Af8C+wH3Af8C3wHVAf8CyQG5 - Af8C4AHWA/8B/gH/Aj8BPgFrGAADGwEmAj8BPgFrAv8B+gH/AvgB9AH/AvsB9wH/At8B1QH/AskBuQH/ - AuAB1gP/Af4B/wI/AT4Ba5wAAxoBJQI/AT0BaQL/AfsB/wL8AfkB/wK8AawB/wQAArwBrAP/Af4B/wI/ - AT0BaRwAAxoBJQI/AT0BaQL/AfsB/wL8AfkB/wK8AawB/wQAArwBrAP/Af4B/wI/AT0BaaAAAxoBJQI+ - AT0BaAL/AfwB/wLLAcEB/wKgAZAB/wLLAcED/wH+Af8CPgE9AWggAAMaASUCPgE9AWgC/wH8Af8CywHB - Af8CoAGQAf8CywHBA/8B/gH/Aj4BPQFopAADGgElAj4BPQFnAv8B/gP/Af4D/wH+Bf8CPgE9AWckAAMa - ASUCPgE9AWcC/wH+A/8B/gP/Af4F/wI+AT0BZ6gAAxoBJAI+AT0BZgI+AT0BZgI+AT0BZgI+AT0BZgMx - AU0oAAMaASQCPgE9AWYCPgE9AWYCPgE9AWYCPgE9AWYDMQFNlAADIQEwAUABRgFIAXwBQwFOAVIBkgMF - AQccAAMHAQkDEAEWAxMBGgMTARoDEwEaAxMBGgMTARoDEwEaAxMBGgMTARoDEwEaAxMBGgMTARoDEwEa - AxABFgMHAQkDBwEJAxABFgMTARoDEwEaAxMBGgMTARoDEwEaAxMBGgMTARoDEwEaAxMBGgMTARoDEwEa - AxMBGgMQARYDBwEJAwcBCQMQARYDEwEaAxMBGgMTARoDEwEaAxMBGgMTARoDEwEaAxMBGgMTARoDEwEa - AxMBGgMTARoDEAEWAwcBCQwAAjIBMwFQAUMBUQFXAZkBRQFkAXQBwAFYAYsBogHgATwBWAFqAcEDEwEa - AwUBBxgAAjwBOwFpAkYBRAGHAkYBRAGHAkYBRAGHAkYBRAGHAkYBRAGHAkYBRAGHAkYBRAGHAkYBRAGH - AkYBRAGHAkYBRAGHAkYBRAGHAkYBRAGHAkYBRAGHAkYBRAGHAjwBOwFpAjkBNAFpAkABNwGHAkABNwGH - AkABNwGHAkABNwGHAkABNwGHAkABNwGHAkABNwGHAkABNwGHAkABNwGHAkABNwGHAkABNwGHAkABNwGH - AkABNwGHAkABNwGHAjkBNAFpAjwBOwFpAkYBRAGHAkYBRAGHAkYBRAGHAkYBRAGHAkYBRAGHAkYBRAGH - AkYBRAGHAkYBRAGHAkYBRAGHAkYBRAGHAkYBRAGHAkYBRAGHAkYBRAGHAkYBRAGHAjwBOwFpAw0BEQMa - ASQBRAFNAVEBmAE8AYkBrAHyAWcBrwHTAfoBggHLAewB/wGFAc4B7gH/ARUBWwGCAe8BOgFXAWYBxAE6 - AVcBZgHEAT4BWgFqAb4BPgFaAWoBvgE+AVoBagG+AUQBTQFRAZgDGgEkAw0BEQJGAUMBgQL5AekB/wLz - AeIB/wLzAeIB/wLzAeIB/wLzAeIB/wLzAeIB/wLzAeIB/wLzAeIB/wLzAeIB/wLzAeIB/wLzAeIB/wLz - AeIB/wLzAeIB/wL5AekB/wJGAUMBgQJDAToBgQL5AekB/wLzAeIB/wLzAeIB/wLzAeIB/wLzAeIB/wLz - AeIB/wLzAeIB/wLzAeIB/wLzAeIB/wLzAeIB/wLzAeIB/wLzAeIB/wLzAeIB/wL5AekB/wJDAToBgQJG - AUMBgQL5AekB/wLzAeIB/wLzAeIB/wLzAeIB/wLzAeIB/wLzAeIB/wLzAeIB/wLzAeIB/wLzAeIB/wLz - AeIB/wLzAeIB/wLzAeIB/wLzAeIB/wL5AekB/wJGAUMBgQMHAQkDDQESAUIBWwFmAbIBiAHQAe8B/wF9 - AcoB6QH/AX0BygHpAf8BhwHQAe8B/wEkAXsBqQH/AX0BvAHbAf8BfQG8AdsB/wGNAdEB8wH/AY0B0QHz - Af8BkAHUAfUB/wFCAVsBZgGyATACMQFNAwcBCQJEAUMBegL0AeQC/wHMAUIB/wH+AcsBQQH/AewB0gGG - Af8C2gHJAf8C2AHHAf8C1gHFAf8C1AHDAf8C0wHCAf8C0QHAAf8CzwG+Af8CzgG9Af8CzQG8Af8C9AHk - Af8CRAFDAXoCRgE+AXoC9AHkAv8BzAFDAf8B/gHLAUIB/wHsAdIBhgH/AtoByQH/AtgBxwH/AtYBxQH/ - AtQBwwH/AtMBwgH/AtEBwAH/As8BvgH/As4BvQH/As0BvAH/AvQB5AH/AkYBPgF6AkQBQwF6AvQB5AL/ - AcwBQgH/Af4BywFBAf8B7AHSAYYB/wLaAckB/wLYAccB/wHnAWEBPwH/AecBYQE/Af8B5wFhAT8B/wHn - AWEBPwH/As8BvgH/As4BvQH/As0BvAH/AvQB5AH/AkQBQwF6CAABQwFXAWABpAGKAdMB8AH/AYIBzQHr - Af8BggHNAesB/wGKAdMB8AH/ASQBfAGrAf8BegG5AdgB/wF6AbkB2AH/AYoBzgHwAf8BigHOAfAB/wGP - AdMB9AH/AfQBtgEsAf8BQwFXAWABpAQAAkQBQgF3AvUB5gL/AcwBQgL/Ae4BiAH/AewB0gGGAf8C9QHu - Af8C9QHuAf8C1gHFAf8C9QHuAf8C9QHuAf8C0QHAAf8C9QHuAf8C9QHuAf8CzQG8Af8C9QHmAf8CRAFC - AXcCRwE/AXcC9QHmAv8BzAFDAv8B7gGIAf8B7AHSAYYB/wL1Ae4B/wL1Ae4B/wLWAcUB/wL1Ae4B/wL1 - Ae4B/wLRAcAB/wL1Ae4B/wL1Ae4B/wLNAbwB/wL1AeYB/wJHAT8BdwJEAUIBdwL1AeYC/wHMAUIC/wHu - AYgB/wHsAdIBhgH/AvUB7gH/AvUB7gH/AdkBWAE2Af8B8gHJAbgB/wHyAckBuAH/AdkBWAE2Af8C9QHu - Af8C9QHuAf8CzQG8Af8C9QHmAf8CRAFCAXcIAAFDAVUBXgGeAY4B1gHyAf8BhwHQAe0B/wGHAdAB7QH/ - AY4B1gHyAf8BJgGCAa8B/wF7AboB2AH/AXsBugHYAf8BiwHPAfEB/wGLAc8B8QH/AZEB1QH1Af8B/gHJ - AT8B/wFDAVUBXgGeBAACQwFBAXUC9gHpAv8BzAFCAf8B/gHLAUEB/wHsAdIBhgH/AtoByQH/AtgBxwH/ - AtwBzAH/AtQBwwH/AtMBwgH/AtgByAH/As8BvgH/As4BvQH/As0BvAH/AvYB6QH/AkMBQQF1AkcBPwF1 - AvYB6QL/AcwBQwH/Af4BywFCAf8B7AHSAYYB/wLaAckB/wLYAccB/wLcAcwB/wLUAcMB/wLTAcIB/wLY - AcgB/wLPAb4B/wLOAb0B/wLNAbwB/wL2AekB/wJHAT8BdQJDAUEBdQL2AekC/wHMAUIB/wH+AcsBQQH/ - AewB0gGGAf8C2gHJAf8C2AHHAf8ByAFPAS0B/wHeAbYBngH/Ad4BtQGdAf8ByAFPAS0B/wLPAb4B/wLO - Ab0B/wLNAbwB/wL2AekB/wJDAUEBdQgAAUQBVQFdAZsBkgHaAfQB/wGLAdQB8AH/AYsB1AHwAf8BkgHa - AfQB/wEpAYUBswH/AX0BvAHaAf8BfQG8AdoB/wGNAdEB8wH/AY0B0QHzAf8BkwHXAfYB/wLrAd0B/wFE - AVUBXQGbBAACQgFBAXMC9wHrAv8BzAFCAv8B7gGIAf8B7AHSAYYB/wL3AfEB/wL3AfEB/wLWAcUB/wL3 - AfEB/wL3AfEB/wLRAcAB/wL3AfEB/wL3AfEB/wLNAbwB/wL3AesB/wJCAUEBcwJHAT8BcwL3AesC/wHM - AUMC/wHuAYgB/wHsAdIBhgH/AvcB8QH/AvcB8QH/AtYBxQH/AvcB8QH/AvcB8QH/AtEBwAH/AvcB8QH/ - AvcB8QH/As0BvAH/AvcB6wH/AkcBPwFzAkIBQQFzAvcB6wL/AcwBQgL/Ae4BiAH/AewB0gGGAf8C9wHx - Af8C9wHxAf8BuAFHASUB/wHzAcsBuQH/AfMBywG5Af8BuAFHASUB/wL3AfEB/wL3AfEB/wLNAbwB/wL3 - AesB/wJCAUEBcwgAAUQBUwFbApcB3gH2Af8BkAHYAfIB/wGQAdgB8gH/AZcB3gH2Af8BKwGJAbcB/wGA - Ab0B3AH/AYABvQHcAf8BjwHTAfUB/wGPAdMB9QH/AZUB2QH4Af8C9QHuAf8BRAFTAVsBlwQAAkIBQQFy - AvgB7gL/AcwBQgH/Af4BywFBAf8B7AHSAYYB/wLaAckB/wLYAccB/wLdAc4B/wLUAcMB/wLTAcIB/wLZ - AcoB/wLPAb4B/wLOAb0B/wLNAbwB/wL4Ae4B/wJCAUEBcgJIAUABcgL4Ae4B/wHsAYYBYwH/AeIBewFZ - Af8B1AFuAUwB/wHEAWABPgH/AbYBUgEwAf8BrQFHASUB/wGrAUMBIQH/AbEBRAEiAf8BvQFKASgB/wHM - AVIBMAH/AdsBWgE4Af8B6AFiAUAB/wL4Ae4B/wJIAUABcgJCAUEBcgL4Ae4C/wHMAUIB/wH+AcsBQQH/ - AewB0gGGAf8C2gHJAf8C2AHHAf8BrQFCASAB/wHeAbYBngH/Ad4BtQGdAf8BrQFCASAB/wLPAb4B/wLO - Ab0B/wLNAbwB/wL4Ae4B/wJCAUEBcggAAUQBUwFaAZQBmwHhAfcB/wGUAdsB9AH/AZQB2wH0Af8BmwHh - AfcB/wEuAY0BvAH/AYEBvgHdAf8BgQG+Ad0B/wGQAdQB9gH/AZAB1AH2Af8BlwHbAfkB/wL+Af0B/wFE - AVMBWgGUBAACQQFAAXAC+QHxAv8BzAFCAv8B7gGIAf8B7AHSAYYB/wL5AfUB/wL5AfUB/wLWAcUB/wL5 - AfUB/wL5AfUB/wLRAcAB/wL5AfUB/wL5AfUB/wLNAbwB/wL5AfEB/wJBAUABcAJHAUABcAL5AfEB/wHs - AYYBYwH/AfgBxQF5Af8B7QG1AXgB/wH1AcwBvAH/AfUBzAG8Af8B4AG3AZ8B/wH1AcwBvAH/AfUBzAG8 - Af8B3QG0AZwB/wH1AcwBvAH/AfUBzAG8Af8B6AFiAUAB/wL5AfEB/wJHAUABcAJBAUABcAL5AfEC/wHM - AUIC/wHuAYgB/wHsAdIBhgH/AvkB9QH/AvkB9QH/AasBRAEiAf8B9QHMAbwB/wH1AcwBvAH/AasBRAEi - Af8C+QH1Af8C+QH1Af8CzQG8Af8C+QHxAf8CQQFAAXAIAAFEAVEBVwGQAZ4B5QH5Af8BmAHfAfYB/wGY - Ad8B9gH/AZ4B5QH5Af8BMAGQAcAB/wGDAcAB3wH/AYMBwAHfAf8BkgHWAfgB/wGSAdYB+AH/AZkB3QH6 - Af8BRAFRAVcBkAMjATMEAAJBAUABbgL7AfQC/wHMAUIB/wH+AcsBQQH/AewB0gGGAf8C2gHJAf8C2AHH - Af8C3gHQAf8C1AHDAf8C0wHCAf8C2gHMAf8CzwG+Af8CzgG9Af8CzQG8Af8C+wH0Af8CQQFAAW4CRwFA - AW4C+wH0Af8B7AGGAWMB/wHiAXsBWQH/AdQBbgFMAf8BxAFgAT4B/wG2AVIBMAH/Aa0BRwElAf8BqwFD - ASEB/wGxAUQBIgH/Ab0BSgEoAf8BzAFSATAB/wHbAVoBOAH/AegBYgFAAf8C+wH0Af8CRwFAAW4CQQFA - AW4C+wH0Av8BzAFCAf8B/gHLAUEB/wHsAdIBhgH/AtoByQH/AtgBxwH/AbIBTAEqAf8B3gG2AZ4B/wHe - AbUBnQH/AbIBTAEqAf8CzwG+Af8CzgG9Af8CzQG8Af8C+wH0Af8CQQFAAW4IAAFDAU8BVQGNAaMB6AH7 - Af8BnQHjAfkB/wGdAeMB+QH/AaMB6AH7Af8BMwGUAcUB/wGFAcIB4QH/AYUBwgHhAf8BlAHYAfoB/wGU - AdgB+gH/AZsB3wH8Af8BQwFPAVUBjQgAAkABPwFtAvwB9wL/AcwBQgL/Ae4BiAH/AewB0gGGAf8C/AH6 - Af8C/AH6Af8C1gHFAf8C/AH6Af8C/AH6Af8C0QHAAf8C/AH6Af8C/AH6Af8CzQG8Af8C/AH3Af8CQAE/ - AW0CRwFAAW0C/AH3Av8BzAFDAv8B7gGIAf8B7AHSAYYB/wL8AfoB/wL8AfoB/wLWAcUB/wL8AfoB/wL8 - AfoB/wLRAcAB/wL8AfoB/wL8AfoB/wLNAbwB/wL8AfcB/wJHAUABbQJAAT8BbQL8AfcC/wHMAUIC/wHu - AYgB/wHsAdIBhgH/AvwB+gH/AvwB+gH/AcABWgE4Af8B9gHOAb8B/wH2Ac4BvwH/AcABWgE4Af8C/AH6 - Af8C/AH6Af8CzQG8Af8C/AH3Af8CQAE/AW0IAAFDAU8BVAGKAaYB6wH8Af8BoQHmAfsB/wGhAeYB+wH/ - AaYB6wH8Af8BOgGdAc8B/wGHAcQB4gH/AYcBxAHiAf8BlgHaAfwB/wGWAdoB/AH/AZ4B4gH9Af8BQwFP - AVQBiggAAj8BPgFrAv0B+QL/AcwBQgH/Af4BywFBAf8B9QHOAWIB/wHrAdIBhQH/AekB0AGDAf8B5wHO - AYEB/wHlAcwBgAH/AeQBywF8Af8B4gHJAXoB/wHgAccBeAH/Ad8BxgF3Af8B3gHFAXYB/wL9AfkB/wI/ - AT4BawJHAUABawL9AfkC/wHMAUMB/wH+AcsBQgH/AfUBzgFjAf8B6wHSAYUB/wHpAdABgwH/AecBzgGB - Af8B5QHMAYAB/wHkAcsBfQH/AeIByQF7Af8B4AHHAXkB/wHfAcYBeAH/Ad4BxQF3Af8C/QH5Af8CRwFA - AWsCPwE+AWsC/QH5Av8BzAFCAf8B/gHLAUEB/wH1Ac4BYgH/AesB0gGFAf8B6QHQAYMB/wHRAWoBSAH/ - AekBsQF0Af8B6AGwAXMB/wHRAWoBSAH/AeABxwF4Af8B3wHGAXcB/wHeAcUBdgH/Av0B+QH/Aj8BPgFr - CAABQgFNAVIBhwGpAe4B/QH/AaQB6QH8Af8BpAHpAfwB/wGqAe8B/QH/AUABoQHRAf8BkAHRAfEB/wGW - AdoB+wH/AZcB2wH9Af8BlwHbAf0B/wGfAeMB/gH/AUIBTQFSAYcIAAI/AT4BagL+AfwC/wHMAUIC/wHu - AYgB/wH9AcoBQAH/AfwB6wGFAf8B+wHqAYQB/wH4AcUBOwH/AfYB5QF9Af8B9AHjAXsB/wHzAcABNgH/ - AfEB4AF4Af8B7wHeAXYB/wHvAbwBMgH/Av4B/AH/Aj8BPgFqAkcBQAFqAv4B/AL/AcwBQwL/Ae4BiAH/ - Af0BygFBAf8B/AHrAYUB/wH7AeoBhAH/AfgBxQE8Af8B9gHlAX4B/wH0AeMBfAH/AfMBwAE3Af8B8QHg - AXkB/wHvAd4BdwH/Ae8BvAEzAf8C/gH8Af8CRwFAAWoCPwE+AWoC/gH8Av8BzAFCAv8B7gGIAf8B/QHK - AUAB/wH8AesBhQH/AfsB6gGEAf8B4QF5AVcB/wHzAcABcwH/AfIBvwFyAf8B4QF5AVcB/wHxAeABeAH/ - Ae8B3gF2Af8B7wG8ATIB/wL+AfwB/wI/AT4BaggAAUMBTAFSAYUBrQHxAv8BqwHvAf4B/wGVAeIB+AH/ - AWwByQHtAf8BRgGpAdkB/wGYAdwB/gH/AZgB3AH+Af8BmAHcAf4B/wGYAdwB/gH/AaEB5QL/AUMBTAFS - AYUIAAI+AT0BaAL/Af4C/wHMAUIB/wH+AcsBQQH/Af0BygFAAf8B/AHJAT8B/wH6AccBPQH/AfgBxQE7 - Af8B9gHDAToB/wH1AcIBOAH/AfMBwAE2Af8B8QG+ATQB/wHwAb0BMwH/Ae8BvAEyA/8B/gH/Aj4BPQFo - AkcBQAFoAv8B/gL/AcwBQwH/Af4BywFCAf8B/QHKAUEB/wH8AckBQAH/AfoBxwE+Af8B+AHFATwB/wH2 - AcMBOwH/AfUBwgE5Af8B8wHAATcB/wHxAb4BNQH/AfABvQE0Af8B7wG8ATMD/wH+Af8CRwFAAWgCPgE9 - AWgC/wH+Av8BzAFCAf8B/gHLAUEB/wH9AcoBQAH/AfwByQE/Af8B+gHHAT0B/wHsAYYBYgH/AewBhgFi - Af8B7AGGAWIB/wHsAYYBYgH/AfEBvgE0Af8B8AG9ATMB/wHvAbwBMgP/Af4B/wI+AT0BaAgAAUMBTAFQ - AYMBiAHcAfQB/wFeAcAB6QH/AV0BvwHqAf8BgAHTAfQB/wGcAeMB/QH/AaIB5gL/AaIB5gL/AaIB5gL/ - AaIB5gL/AaYB6gL/AUMBTAFQAYMIAAI+AT0BZzj/Aj4BPQFnAkcBQAFnOP8CRwFAAWcCPgE9AWc4/wI+ - AT0BZwgAATkBOwE9AWEBQgFLAU8BgQFCAUsBTwGBAUIBSwFPAYEBQgFLAU8BgQFCAUsBTwGBAUIBSwFP - AYEBQgFLAU8BgQFCAUsBTwGBAUIBSwFPAYEBQgFLAU8BgQE5ATsBPQFhCAADMQFNAj4BPQFmAj4BPQFm - Aj4BPQFmAj4BPQFmAj4BPQFmAj4BPQFmAj4BPQFmAj4BPQFmAj4BPQFmAj4BPQFmAj4BPQFmAj4BPQFm - Aj4BPQFmAj4BPQFmAzEBTQI3ATQBTQJHAUABZgJHAUABZgJHAUABZgJHAUABZgJHAUABZgJHAUABZgJH - AUABZgJHAUABZgJHAUABZgJHAUABZgJHAUABZgJHAUABZgJHAUABZgJHAUABZgI3ATQBTQMxAU0CPgE9 - AWYCPgE9AWYCPgE9AWYCPgE9AWYCPgE9AWYCPgE9AWYCPgE9AWYCPgE9AWYCPgE9AWYCPgE9AWYCPgE9 - AWYCPgE9AWYCPgE9AWYCPgE9AWYDMQFNAUIBTQE+BwABPgMAASgDAAFAAwABIAMAAQEBAAEBBgABARYA - A/8RAAGAAf8BgAEBBQABfwEAAQEFAAE/AQABAQUAAR8BAAEBBAABgAEPAYABAQQAAcABBwHAAQMEAAHg - AQMB4AEDBAAB8AEBAfABAQQAAfgBAAH4BQAB/AEAAfwFAAH+AQgB/gEIBAAB/wEAAf8FAAH/AYAB/wGA - BAAB/wHAAf8BwAQAAfgBfwYAAeABPxYAAcABAQYAAcABAQYAAcABAQYAAcABAQYAAcABAQYAAcABAQYA - AcABAwYAAcABAwYAAcABAwYAAcABAwYAAcABAwYAAcABAwYACw== - - - - 211, 17 - - - - - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsIAAA7CARUoSoAAAAK6SURBVDhPjZNbSNNRHMfPU9DtwR71oZf5IgkF0YMEEYb2 - EGgG5YNgGQmGSUoYimbel5KKmlM0u3jJSpv3ad7WnGkzb2yO4bByF3WuuTnnnLv47Zw/9YclQQc+/L// - P+d8/r/f+Z8/Ib/HjJDcmhaS3P+Bzf2zjr8qiki+QyuE6dNNbIzFw6F8DJ++AVh97c9GK9jcA4LJAlKI - rQ7sW9/DpauGZSoFg6JwfJSU+TE0XIXOgqCaAwJ5ASn2bb6F19TM4bO+w4z4HgwWC9YcDugpK3Y7umQy - FOZEDMRkZQX7SWS5pMRrboVn9RUHy1/aEqDSajGn0WDZbIZ6bQ0t/f1gIzojI8lPMvaIPPWsN2FP/5yD - ZdmLWLwUi/FhZASSqSlOUtXczBMcGZnFVzGUTSr2jI1wfq/lYHms4Tqkc3MYnZ2F0mDAqs3GV8LaiUhN - TeYFA5mkenelHg5tNQfLw3UxaOrpQZdUiu7xca5/Mc0do6PQb28jPDk5hRf0PiQi5zcR7JoKDpYHaqIg - VyohW1jg+lcZjVwlCzod1p1OXEhMvM8LOtNJvWOpEjZVKQfL/ZVX0NrXh165HP2Tk5hQqzGuUmFQocCm - y4XzCQlpvKA9jTTa1WWwzBdzsNxdfhmfFxcxQRct0Q3UmEzY2t2FdWcHdrcb5+LiHvCC1hTSbFOWwDyT - x8GyuDQCbRIJ3tBPp6CfU0pbcdA3M4mDCs7ExqYzwWHKibo7pNs6T4+yIofDSqtof3IJBtqzTq+Hx+uF - y+OBky5kkh2aT0VFZTNBAEWQFEFqhyvO2pclSe6f03nYnC1EW9FFGOnGGSi+/X14KW6fD3tUtkdzYFiY - 0O801iWSaNFtUteWGST92nL1R/q1Q7ojAkHV0ZCQkuOhocV/c0wguHvgn2APyuPJ6dI4kpV/gzyjtycp - gf8g4Begs1B6Kbj3cQAAAABJRU5ErkJggg== - - - - 337, 17 - - \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/MibViewer/MibViewer.csproj b/src/apps/snmp/LwipMibCompiler/MibViewer/MibViewer.csproj deleted file mode 100644 index 957c058c..00000000 --- a/src/apps/snmp/LwipMibCompiler/MibViewer/MibViewer.csproj +++ /dev/null @@ -1,94 +0,0 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {86CC0B65-7985-4017-A252-0A7A18DCAEF3} - WinExe - Properties - LwipMibViewer - MibViewer - v4.0 - 512 - - - - true - bin\Debug\ - DEBUG;TRACE - full - prompt - true - true - 4 - false - false - - - bin\Release\ - TRACE - true - pdbonly - AnyCPU - prompt - true - true - 4 - false - - - - - - - - - Form - - - FormMain.cs - - - - - FormMain.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - True - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - - - - - {CBE20411-5DB7-487D-825D-7694267BB6F5} - SharpSnmpLib.Mib - - - - - - \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/MibViewer/Program.cs b/src/apps/snmp/LwipMibCompiler/MibViewer/Program.cs deleted file mode 100644 index cd3ef314..00000000 --- a/src/apps/snmp/LwipMibCompiler/MibViewer/Program.cs +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2001-2004 Swedish Institute of Computer Science. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY - * OF SUCH DAMAGE. - * - * This file is part of the lwIP TCP/IP stack. - * - * Author: Martin Hentschel - * - */ - -using System; -using System.Windows.Forms; - -namespace LwipMibViewer -{ - static class Program - { - /// - /// Der Haupteinstiegspunkt für die Anwendung. - /// - [STAThread] - static void Main() - { - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new FormMain()); - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/MibViewer/Properties/AssemblyInfo.cs b/src/apps/snmp/LwipMibCompiler/MibViewer/Properties/AssemblyInfo.cs deleted file mode 100644 index 06e7286c..00000000 --- a/src/apps/snmp/LwipMibCompiler/MibViewer/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// Allgemeine Informationen über eine Assembly werden über die folgenden -// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, -// die mit einer Assembly verknüpft sind. -[assembly: AssemblyTitle("LwipMibViewer")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("LwipMibViewer")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar -// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von -// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest. -[assembly: ComVisible(false)] - -// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird -[assembly: Guid("7ffbd1c1-1c64-45bb-b243-2400446c649d")] - -// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: -// -// Hauptversion -// Nebenversion -// Buildnummer -// Revision -// -// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern -// übernehmen, indem Sie "*" eingeben: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Resources.Designer.cs b/src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Resources.Designer.cs deleted file mode 100644 index bf157177..00000000 --- a/src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// Dieser Code wurde von einem Tool generiert. -// Laufzeitversion:4.0.30319.225 -// -// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -// der Code erneut generiert wird. -// -//------------------------------------------------------------------------------ - -namespace LwipMibViewer.Properties { - using System; - - - /// - /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - /// - // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LwipMibViewer.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Resources.resx b/src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Resources.resx deleted file mode 100644 index af7dbebb..00000000 --- a/src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Settings.Designer.cs b/src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Settings.Designer.cs deleted file mode 100644 index 9831b20f..00000000 --- a/src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// Dieser Code wurde von einem Tool generiert. -// Laufzeitversion:4.0.30319.225 -// -// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -// der Code erneut generiert wird. -// -//------------------------------------------------------------------------------ - -namespace LwipMibViewer.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Settings.settings b/src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Settings.settings deleted file mode 100644 index 39645652..00000000 --- a/src/apps/snmp/LwipMibCompiler/MibViewer/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/apps/snmp/LwipMibCompiler/MibViewer/app.config b/src/apps/snmp/LwipMibCompiler/MibViewer/app.config deleted file mode 100644 index e3656033..00000000 --- a/src/apps/snmp/LwipMibCompiler/MibViewer/app.config +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB b/src/apps/snmp/LwipMibCompiler/Mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB deleted file mode 100644 index 10107955..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/IANA-ADDRESS-FAMILY-NUMBERS-MIB +++ /dev/null @@ -1,131 +0,0 @@ - - - IANA-ADDRESS-FAMILY-NUMBERS-MIB DEFINITIONS ::= BEGIN - - IMPORTS - MODULE-IDENTITY, - mib-2 FROM SNMPv2-SMI - TEXTUAL-CONVENTION FROM SNMPv2-TC; - - ianaAddressFamilyNumbers MODULE-IDENTITY - LAST-UPDATED "200203140000Z" -- March 14, 2002 - ORGANIZATION "IANA" - CONTACT-INFO - "Postal: Internet Assigned Numbers Authority - Internet Corporation for Assigned Names - and Numbers - 4676 Admiralty Way, Suite 330 - Marina del Rey, CA 90292-6601 - USA - - Tel: +1 310-823-9358 - E-Mail: iana&iana.org" - DESCRIPTION - "The MIB module defines the AddressFamilyNumbers - textual convention." - - -- revision history - - REVISION "200203140000Z" -- March 14, 2002 - DESCRIPTION "AddressFamilyNumbers assignment 22 to - fibreChannelWWPN. AddressFamilyNumbers - assignment 23 to fibreChannelWWNN. - AddressFamilyNumers assignment 24 to gwid." - - REVISION "200009080000Z" -- September 8, 2000 - DESCRIPTION "AddressFamilyNumbers assignment 19 to xtpOverIpv4. - AddressFamilyNumbers assignment 20 to xtpOverIpv6. - AddressFamilyNumbers assignment 21 to xtpNativeModeXTP." - - REVISION "200003010000Z" -- March 1, 2000 - DESCRIPTION "AddressFamilyNumbers assignment 17 to distinguishedName. - AddressFamilyNumbers assignment 18 to asNumber." - - REVISION "200002040000Z" -- February 4, 2000 - DESCRIPTION "AddressFamilyNumbers assignment 16 to dns." - - REVISION "9908260000Z" -- August 26, 1999 - DESCRIPTION "Initial version, published as RFC 2677." - - ::= { mib-2 72 } - - - AddressFamilyNumbers ::= TEXTUAL-CONVENTION - - STATUS current - DESCRIPTION - "The definition of this textual convention with the - addition of newly assigned values is published - periodically by the IANA, in either the Assigned - Numbers RFC, or some derivative of it specific to - Internet Network Management number assignments. - (The latest arrangements can be obtained by - contacting the IANA.) - - The enumerations are described as: - - other(0), -- none of the following - ipV4(1), -- IP Version 4 - ipV6(2), -- IP Version 6 - nsap(3), -- NSAP - hdlc(4), -- (8-bit multidrop) - bbn1822(5), - all802(6), -- (includes all 802 media - -- plus Ethernet 'canonical format') - e163(7), - e164(8), -- (SMDS, Frame Relay, ATM) - f69(9), -- (Telex) - x121(10), -- (X.25, Frame Relay) - ipx(11), -- IPX (Internet Protocol Exchange) - appleTalk(12), -- Apple Talk - decnetIV(13), -- DEC Net Phase IV - banyanVines(14), -- Banyan Vines - e164withNsap(15), - -- (E.164 with NSAP format subaddress) - dns(16), -- (Domain Name System) - distinguishedName(17), -- (Distinguished Name, per X.500) - asNumber(18), -- (16-bit quantity, per the AS number space) - xtpOverIpv4(19), -- XTP over IP version 4 - xtpOverIpv6(20), -- XTP over IP version 6 - xtpNativeModeXTP(21), -- XTP native mode XTP - fibreChannelWWPN(22), -- Fibre Channel World-Wide Port Name - fibreChannelWWNN(23), -- Fibre Channel World-Wide Node Name - gwid(24), -- Gateway Identifier - afi(25), -- AFI for L2VPN information - reserved(65535) - - - - Requests for new values should be made to IANA via - email (iana&iana.org)." - - SYNTAX INTEGER { - other(0), - ipV4(1), - ipV6(2), - nsap(3), - hdlc(4), - bbn1822(5), - all802(6), - e163(7), - e164(8), - f69(9), - x121(10), - ipx(11), - appleTalk(12), - decnetIV(13), - banyanVines(14), - e164withNsap(15), - dns(16), - distinguishedName(17), -- (Distinguished Name, per X.500) - asNumber(18), -- (16-bit quantity, per the AS number space) - xtpOverIpv4(19), - xtpOverIpv6(20), - xtpNativeModeXTP(21), - fibreChannelWWPN(22), - fibreChannelWWNN(23), - gwid(24), - afi(25), - reserved(65535) - } - END diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/IANA-CHARSET-MIB b/src/apps/snmp/LwipMibCompiler/Mibs/IANA-CHARSET-MIB deleted file mode 100644 index 499d54e4..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/IANA-CHARSET-MIB +++ /dev/null @@ -1,345 +0,0 @@ -IANA-CHARSET-MIB DEFINITIONS ::= BEGIN --- http://www.iana.org/assignments/ianacharset-mib - -IMPORTS - MODULE-IDENTITY, - mib-2 - FROM SNMPv2-SMI -- [RFC2578] - TEXTUAL-CONVENTION - FROM SNMPv2-TC; -- [RFC2579] - -ianaCharsetMIB MODULE-IDENTITY - LAST-UPDATED "200705140000Z" - ORGANIZATION "IANA" - CONTACT-INFO " Internet Assigned Numbers Authority - - Postal: ICANN - 4676 Admiralty Way, Suite 330 - Marina del Rey, CA 90292 - - Tel: +1 310 823 9358 - E-Mail: iana&iana.org" - - DESCRIPTION "This MIB module defines the IANACharset - TEXTUAL-CONVENTION. The IANACharset TC is used to - specify the encoding of string objects defined in - a MIB. - - Each version of this MIB will be released based on - the IANA Charset Registry file (see RFC 2978) at - http://www.iana.org/assignments/character-sets. - - Note: The IANACharset TC, originally defined in - RFC 1759, was inaccurately named CodedCharSet. - - Note: Best practice is to define new MIB string - objects with invariant UTF-8 (RFC 3629) syntax - using the SnmpAdminString TC (defined in RFC 3411) - in accordance with IETF Policy on Character Sets and - Languages (RFC 2277). - - Copyright (C) The Internet Society (2004). The - initial version of this MIB module was published - in RFC 3808; for full legal notices see the RFC - itself. Supplementary information may be - available on - http://www.ietf.org/copyrights/ianamib.html." - - -- revision history - - REVISION "200705140000Z" - DESCRIPTION "Registration of new charset 2107." - - REVISION "200612070000Z" - DESCRIPTION "Registration of new charsets numbered 118, 119, - and 2106." - - REVISION "200406080000Z" - DESCRIPTION "Original version transferred from Printer MIB, - generated from the IANA maintained assignments - http://www.iana.org/assignments/character-sets." - - ::= { mib-2 106 } - -IANACharset ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "Specifies an IANA registered 'charset' - coded character set - (CCS) plus optional character encoding scheme (CES) - terms - defined in 'IANA Charset Registration Procedures' (RFC 2978). - - Objects of this syntax are used to specify the encoding for - string objects defined in one or more MIBs. For example, the - prtLocalizationCharacterSet, prtInterpreterDefaultCharSetIn, and - prtInterpreterDefaultCharSetOut objects defined in Printer MIB. - - The current list of 'charset' names and enumerated values - is contained in the IANA Character Set Registry at: - - http://www.iana.org/assignments/character-sets - - Enum names are derived from the IANA Charset Registry 'Alias' - fields that begin with 'cs' (for character set). - Enum values are derived from the parallel 'MIBenum' fields." - SYNTAX INTEGER { - other(1), -- used if the designated - -- character set is not currently - -- registered by IANA - unknown(2), -- used as a default value - csASCII(3), - csISOLatin1(4), - csISOLatin2(5), - csISOLatin3(6), - csISOLatin4(7), - csISOLatinCyrillic(8), - csISOLatinArabic(9), - csISOLatinGreek(10), - csISOLatinHebrew(11), - csISOLatin5(12), - csISOLatin6(13), - csISOTextComm(14), - csHalfWidthKatakana(15), - csJISEncoding(16), - csShiftJIS(17), - csEUCPkdFmtJapanese(18), - csEUCFixWidJapanese(19), - csISO4UnitedKingdom(20), - csISO11SwedishForNames(21), - csISO15Italian(22), - csISO17Spanish(23), - csISO21German(24), - csISO60DanishNorwegian(25), - csISO69French(26), - csISO10646UTF1(27), - csISO646basic1983(28), - csINVARIANT(29), - csISO2IntlRefVersion(30), - csNATSSEFI(31), - csNATSSEFIADD(32), - csNATSDANO(33), - csNATSDANOADD(34), - csISO10Swedish(35), - csKSC56011987(36), - csISO2022KR(37), - csEUCKR(38), - csISO2022JP(39), - csISO2022JP2(40), - csISO13JISC6220jp(41), - csISO14JISC6220ro(42), - csISO16Portuguese(43), - csISO18Greek7Old(44), - csISO19LatinGreek(45), - csISO25French(46), - csISO27LatinGreek1(47), - csISO5427Cyrillic(48), - csISO42JISC62261978(49), - csISO47BSViewdata(50), - csISO49INIS(51), - csISO50INIS8(52), - csISO51INISCyrillic(53), - csISO54271981(54), - csISO5428Greek(55), - csISO57GB1988(56), - csISO58GB231280(57), - csISO61Norwegian2(58), - csISO70VideotexSupp1(59), - csISO84Portuguese2(60), - csISO85Spanish2(61), - csISO86Hungarian(62), - csISO87JISX0208(63), - csISO88Greek7(64), - csISO89ASMO449(65), - csISO90(66), - csISO91JISC62291984a(67), - csISO92JISC62991984b(68), - csISO93JIS62291984badd(69), - csISO94JIS62291984hand(70), - csISO95JIS62291984handadd(71), - csISO96JISC62291984kana(72), - csISO2033(73), - csISO99NAPLPS(74), - csISO102T617bit(75), - csISO103T618bit(76), - csISO111ECMACyrillic(77), - csa71(78), - csa72(79), - csISO123CSAZ24341985gr(80), - csISO88596E(81), - csISO88596I(82), - csISO128T101G2(83), - csISO88598E(84), - csISO88598I(85), - csISO139CSN369103(86), - csISO141JUSIB1002(87), - csISO143IECP271(88), - csISO146Serbian(89), - csISO147Macedonian(90), - csISO150(91), - csISO151Cuba(92), - csISO6937Add(93), - csISO153GOST1976874(94), - csISO8859Supp(95), - csISO10367Box(96), - csISO158Lap(97), - csISO159JISX02121990(98), - csISO646Danish(99), - csUSDK(100), - csDKUS(101), - csKSC5636(102), - csUnicode11UTF7(103), - csISO2022CN(104), - csISO2022CNEXT(105), - csUTF8(106), - csISO885913(109), - csISO885914(110), - csISO885915(111), - csISO885916(112), - csGBK(113), - csGB18030(114), - csOSDEBCDICDF0415(115), - csOSDEBCDICDF03IRV(116), - csOSDEBCDICDF041(117), - csISO115481(118), - csKZ1048(119), - csUnicode(1000), - csUCS4(1001), - csUnicodeASCII(1002), - csUnicodeLatin1(1003), - csUnicodeIBM1261(1005), - csUnicodeIBM1268(1006), - csUnicodeIBM1276(1007), - csUnicodeIBM1264(1008), - csUnicodeIBM1265(1009), - csUnicode11(1010), - csSCSU(1011), - csUTF7(1012), - csUTF16BE(1013), - csUTF16LE(1014), - csUTF16(1015), - csCESU8(1016), - csUTF32(1017), - csUTF32BE(1018), - csUTF32LE(1019), - csBOCU1(1020), - csWindows30Latin1(2000), - csWindows31Latin1(2001), - csWindows31Latin2(2002), - csWindows31Latin5(2003), - csHPRoman8(2004), - csAdobeStandardEncoding(2005), - csVenturaUS(2006), - csVenturaInternational(2007), - csDECMCS(2008), - csPC850Multilingual(2009), - csPCp852(2010), - csPC8CodePage437(2011), - csPC8DanishNorwegian(2012), - csPC862LatinHebrew(2013), - csPC8Turkish(2014), - csIBMSymbols(2015), - csIBMThai(2016), - csHPLegal(2017), - csHPPiFont(2018), - csHPMath8(2019), - csHPPSMath(2020), - csHPDesktop(2021), - csVenturaMath(2022), - csMicrosoftPublishing(2023), - csWindows31J(2024), - csGB2312(2025), - csBig5(2026), - csMacintosh(2027), - csIBM037(2028), - csIBM038(2029), - csIBM273(2030), - csIBM274(2031), - csIBM275(2032), - csIBM277(2033), - csIBM278(2034), - csIBM280(2035), - csIBM281(2036), - csIBM284(2037), - csIBM285(2038), - csIBM290(2039), - csIBM297(2040), - csIBM420(2041), - csIBM423(2042), - csIBM424(2043), - csIBM500(2044), - csIBM851(2045), - csIBM855(2046), - csIBM857(2047), - csIBM860(2048), - csIBM861(2049), - csIBM863(2050), - csIBM864(2051), - csIBM865(2052), - csIBM868(2053), - csIBM869(2054), - csIBM870(2055), - csIBM871(2056), - csIBM880(2057), - csIBM891(2058), - csIBM903(2059), - csIBBM904(2060), - csIBM905(2061), - csIBM918(2062), - csIBM1026(2063), - csIBMEBCDICATDE(2064), - csEBCDICATDEA(2065), - csEBCDICCAFR(2066), - csEBCDICDKNO(2067), - csEBCDICDKNOA(2068), - csEBCDICFISE(2069), - csEBCDICFISEA(2070), - csEBCDICFR(2071), - csEBCDICIT(2072), - csEBCDICPT(2073), - csEBCDICES(2074), - csEBCDICESA(2075), - csEBCDICESS(2076), - csEBCDICUK(2077), - csEBCDICUS(2078), - csUnknown8BiT(2079), - csMnemonic(2080), - csMnem(2081), - csVISCII(2082), - csVIQR(2083), - csKOI8R(2084), - csHZGB2312(2085), - csIBM866(2086), - csPC775Baltic(2087), - csKOI8U(2088), - csIBM00858(2089), - csIBM00924(2090), - csIBM01140(2091), - csIBM01141(2092), - csIBM01142(2093), - csIBM01143(2094), - csIBM01144(2095), - csIBM01145(2096), - csIBM01146(2097), - csIBM01147(2098), - csIBM01148(2099), - csIBM01149(2100), - csBig5HKSCS(2101), - csIBM1047(2102), - csPTCP154(2103), - csAmiga1251(2104), - csKOI7switched(2105), - csBRF(2106), - csTSCII(2107), - cswindows1250(2250), - cswindows1251(2251), - cswindows1252(2252), - cswindows1253(2253), - cswindows1254(2254), - cswindows1255(2255), - cswindows1256(2256), - cswindows1257(2257), - cswindows1258(2258), - csTIS620(2259), - reserved(3000) - } -END - diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-ITU-ALARM-TC-MIB b/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-ITU-ALARM-TC-MIB deleted file mode 100644 index 8579485c..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-ITU-ALARM-TC-MIB +++ /dev/null @@ -1,333 +0,0 @@ -IANA-ITU-ALARM-TC-MIB DEFINITIONS ::= BEGIN - - IMPORTS - MODULE-IDENTITY, mib-2 FROM SNMPv2-SMI - TEXTUAL-CONVENTION FROM SNMPv2-TC; - - ianaItuAlarmNumbers MODULE-IDENTITY - LAST-UPDATED "200409090000Z" -- September 09, 2004 - ORGANIZATION "IANA" - CONTACT-INFO - "Postal: Internet Assigned Numbers Authority - Internet Corporation for Assigned Names - and Numbers - 4676 Admiralty Way, Suite 330 - Marina del Rey, CA 90292-6601 - USA - - Tel: +1 310-823-9358 - E-Mail: iana&iana.org" - DESCRIPTION - "The MIB module defines the ITU Alarm - textual convention for objects expected to require - regular extension. - - Copyright (C) The Internet Society (2004). The - initial version of this MIB module was published - in RFC 3877. For full legal notices see the RFC - itself. Supplementary information may be available on: - http://www.ietf.org/copyrights/ianamib.html" - REVISION "200409090000Z" - DESCRIPTION - "Initial version, published as RFC 3877." - ::= { mib-2 119 } - - - IANAItuProbableCause ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "ITU-T probable cause values. Duplicate values defined in - X.733 are appended with X733 to ensure syntactic uniqueness. - Probable cause value 0 is reserved for special purposes. - - The Internet Assigned Number Authority (IANA) is responsible - for the assignment of the enumerations in this TC. - IANAItuProbableCause value of 0 is reserved for special - purposes and MUST NOT be assigned. - - Values of IANAItuProbableCause in the range 1 to 1023 are - reserved for causes that correspond to ITU-T probable cause. - - All other requests for new causes will be handled on a - first-come, first served basis and will be assigned - enumeration values starting with 1025. - - Request should come in the form of well-formed - SMI [RFC2578] for enumeration names that are unique and - sufficiently descriptive. - - While some effort will be taken to ensure that new probable - causes do not conceptually duplicate existing probable - causes it is acknowledged that the existence of conceptual - duplicates in the starting probable cause list is an known - industry reality. - - To aid IANA in the administration of probable cause names - and values, the OPS Area Director will appoint one or more - experts to help review requests. - - See http://www.iana.org" - REFERENCE - "ITU Recommendation M.3100, 'Generic Network Information - Model', 1995 - ITU Recommendation X.733, 'Information Technology - Open - Systems Interconnection - System Management: Alarm - Reporting Function', 1992 - ITU Recommendation X.736, 'Information Technology - Open - Systems Interconnection - System Management: Security - Alarm Reporting Function', 1992" - - SYNTAX INTEGER - { - -- The following probable causes were defined in M.3100 - aIS (1), - callSetUpFailure (2), - degradedSignal (3), - farEndReceiverFailure (4), - framingError (5), - lossOfFrame (6), - lossOfPointer (7), - lossOfSignal (8), - payloadTypeMismatch (9), - transmissionError (10), - remoteAlarmInterface (11), - excessiveBER (12), - pathTraceMismatch (13), - unavailable (14), - signalLabelMismatch (15), - lossOfMultiFrame (16), - receiveFailure (17), - transmitFailure (18), - modulationFailure (19), - demodulationFailure (20), - broadcastChannelFailure (21), - connectionEstablishmentError (22), - invalidMessageReceived (23), - localNodeTransmissionError (24), - remoteNodeTransmissionError (25), - routingFailure (26), - --Values 27-50 are reserved for communications alarm related - --probable causes - -- The following are used with equipment alarm. - backplaneFailure (51), - dataSetProblem (52), - equipmentIdentifierDuplication (53), - externalIFDeviceProblem (54), - lineCardProblem (55), - multiplexerProblem (56), - nEIdentifierDuplication (57), - powerProblem (58), - processorProblem (59), - protectionPathFailure (60), - receiverFailure (61), - replaceableUnitMissing (62), - replaceableUnitTypeMismatch (63), - synchronizationSourceMismatch (64), - terminalProblem (65), - timingProblem (66), - transmitterFailure (67), - trunkCardProblem (68), - replaceableUnitProblem (69), - realTimeClockFailure (70), - --An equipment alarm to be issued if the system detects that the - --real time clock has failed - antennaFailure (71), - batteryChargingFailure (72), - diskFailure (73), - frequencyHoppingFailure (74), - iODeviceError (75), - lossOfSynchronisation (76), - lossOfRedundancy (77), - powerSupplyFailure (78), - signalQualityEvaluationFailure (79), - tranceiverFailure (80), - protectionMechanismFailure (81), - protectingResourceFailure (82), - -- Values 83-100 are reserved for equipment alarm related probable - -- causes - -- The following are used with environmental alarm. - airCompressorFailure (101), - airConditioningFailure (102), - airDryerFailure (103), - batteryDischarging (104), - batteryFailure (105), - commercialPowerFailure (106), - coolingFanFailure (107), - engineFailure (108), - fireDetectorFailure (109), - fuseFailure (110), - generatorFailure (111), - lowBatteryThreshold (112), - pumpFailure (113), - rectifierFailure (114), - rectifierHighVoltage (115), - rectifierLowFVoltage (116), - ventilationsSystemFailure (117), - enclosureDoorOpen (118), - explosiveGas (119), - fire (120), - flood (121), - highHumidity (122), - highTemperature (123), - highWind (124), - iceBuildUp (125), - intrusionDetection (126), - lowFuel (127), - lowHumidity (128), - lowCablePressure (129), - lowTemperatue (130), - lowWater (131), - smoke (132), - toxicGas (133), - coolingSystemFailure (134), - externalEquipmentFailure (135), - externalPointFailure (136), - -- Values 137-150 are reserved for environmental alarm related - -- probable causes - -- The following are used with Processing error alarm. - storageCapacityProblem (151), - memoryMismatch (152), - corruptData (153), - outOfCPUCycles (154), - sfwrEnvironmentProblem (155), - sfwrDownloadFailure (156), - lossOfRealTimel (157), - --A processing error alarm to be issued after the system has - --reinitialised. This will indicate - --to the management systems that the view they have of the managed - --system may no longer - --be valid. Usage example: The managed - --system issues this alarm after a reinitialization with severity - --warning to inform the - --management system about the event. No clearing notification will - --be sent. - applicationSubsystemFailure (158), - configurationOrCustomisationError (159), - databaseInconsistency (160), - fileError (161), - outOfMemory (162), - softwareError (163), - timeoutExpired (164), - underlayingResourceUnavailable (165), - versionMismatch (166), - --Values 168-200 are reserved for processing error alarm related - -- probable causes. - bandwidthReduced (201), - congestion (202), - excessiveErrorRate (203), - excessiveResponseTime (204), - excessiveRetransmissionRate (205), - reducedLoggingCapability (206), - systemResourcesOverload (207 ), - -- The following were defined X.733 - adapterError (500), - applicationSubsystemFailture (501), - bandwidthReducedX733 (502), - callEstablishmentError (503), - communicationsProtocolError (504), - communicationsSubsystemFailure (505), - configurationOrCustomizationError (506), - congestionX733 (507), - coruptData (508), - cpuCyclesLimitExceeded (509), - dataSetOrModemError (510), - degradedSignalX733 (511), - dteDceInterfaceError (512), - enclosureDoorOpenX733 (513), - equipmentMalfunction (514), - excessiveVibration (515), - fileErrorX733 (516), - fireDetected (517), - framingErrorX733 (518), - heatingVentCoolingSystemProblem (519), - humidityUnacceptable (520), - inputOutputDeviceError (521), - inputDeviceError (522), - lanError (523), - leakDetected (524), - localNodeTransmissionErrorX733 (525), - lossOfFrameX733 (526), - lossOfSignalX733 (527), - materialSupplyExhausted (528), - multiplexerProblemX733 (529), - outOfMemoryX733 (530), - ouputDeviceError (531), - performanceDegraded (532), - powerProblems (533), - pressureUnacceptable (534), - processorProblems (535), - pumpFailureX733 (536), - queueSizeExceeded (537), - receiveFailureX733 (538), - receiverFailureX733 (539), - remoteNodeTransmissionErrorX733 (540), - resourceAtOrNearingCapacity (541), - responseTimeExecessive (542), - retransmissionRateExcessive (543), - softwareErrorX733 (544), - softwareProgramAbnormallyTerminated (545), - softwareProgramError (546), - storageCapacityProblemX733 (547), - temperatureUnacceptable (548), - thresholdCrossed (549), - timingProblemX733 (550), - toxicLeakDetected (551), - transmitFailureX733 (552), - transmiterFailure (553), - underlyingResourceUnavailable (554), - versionMismatchX733 (555), - -- The following are defined in X.736 - authenticationFailure (600), - breachOfConfidentiality (601), - cableTamper (602), - delayedInformation (603), - denialOfService (604), - duplicateInformation (605), - informationMissing (606), - informationModificationDetected (607), - informationOutOfSequence (608), - keyExpired (609), - nonRepudiationFailure (610), - outOfHoursActivity (611), - outOfService (612), - proceduralError (613), - unauthorizedAccessAttempt (614), - unexpectedInformation (615), - - other (1024) - } - - IANAItuEventType ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "The ITU event Type values. - - The Internet Assigned Number Authority (IANA) is - responsible for the assignment of the enumerations - in this TC. - - Request should come in the form of well-formed - SMI [RFC2578] for enumeration names that are unique - and sufficiently descriptive. - - See http://www.iana.org " - REFERENCE - "ITU Recommendation X.736, 'Information Technology - Open - Systems Interconnection - System Management: Security - Alarm Reporting Function', 1992" - SYNTAX INTEGER - { - other (1), - communicationsAlarm (2), - qualityOfServiceAlarm (3), - processingErrorAlarm (4), - equipmentAlarm (5), - environmentalAlarm (6), - integrityViolation (7), - operationalViolation (8), - physicalViolation (9), - securityServiceOrMechanismViolation (10), - timeDomainViolation (11) - } - - END diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-LANGUAGE-MIB b/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-LANGUAGE-MIB deleted file mode 100644 index 6210f723..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-LANGUAGE-MIB +++ /dev/null @@ -1,127 +0,0 @@ - - IANA-LANGUAGE-MIB DEFINITIONS ::= BEGIN - - IMPORTS - MODULE-IDENTITY, OBJECT-IDENTITY, mib-2 - FROM SNMPv2-SMI; - - ianaLanguages MODULE-IDENTITY - LAST-UPDATED "200005100000Z" -- May 10, 2000 - ORGANIZATION "IANA" - CONTACT-INFO - "Internet Assigned Numbers Authority (IANA) - - Postal: ICANN - 4676 Admiralty Way, Suite 330 - Marina del Rey, CA 90292 - - Tel: +1 310 823 9358 x20 - E-Mail: iana&iana.org" - DESCRIPTION - "The MIB module registers object identifier values for - well-known programming and scripting languages. Every - language registration MUST describe the format used - when transferring scripts written in this language. - - Any additions or changes to the contents of this MIB - module require Designated Expert Review as defined in - the Guidelines for Writing IANA Considerations Section - document. The Designated Expert will be selected by - the IESG Area Director of the OPS Area. - - Note, this module does not have to register all possible - languages since languages are identified by object - identifier values. It is therefore possible to registered - languages in private OID trees. The references given below are not - normative with regard to the language version. Other - references might be better suited to describe some newer - versions of this language. The references are only - provided as `a pointer into the right direction'." - - -- Revision log, in reverse chronological order - - REVISION "200005100000Z" -- May 10, 2000 - DESCRIPTION "Import mib-2 instead of experimental, so that - this module compiles" - - REVISION "199909090900Z" -- September 9, 1999 - DESCRIPTION "Initial version as published at time of - publication of RFC 2591." - - ::= { mib-2 73 } - - - ianaLangJavaByteCode OBJECT-IDENTITY - STATUS current - DESCRIPTION - "Java byte code to be processed by a Java virtual machine. - A script written in Java byte code is transferred by using - the Java archive file format (JAR)." - REFERENCE - "The Java Virtual Machine Specification. - ISBN 0-201-63452-X" - ::= { ianaLanguages 1 } - - ianaLangTcl OBJECT-IDENTITY - STATUS current - DESCRIPTION - "The Tool Command Language (Tcl). A script written in the - Tcl language is transferred in Tcl source code format." - REFERENCE - "Tcl and the Tk Toolkit. - ISBN 0-201-63337-X" - ::= { ianaLanguages 2 } - - ianaLangPerl OBJECT-IDENTITY - STATUS current - DESCRIPTION - "The Perl language. A script written in the Perl language - is transferred in Perl source code format." - REFERENCE - "Programming Perl. - ISBN 1-56592-149-6" - ::= { ianaLanguages 3 } - - ianaLangScheme OBJECT-IDENTITY - STATUS current - DESCRIPTION - "The Scheme language. A script written in the Scheme - language is transferred in Scheme source code format." - REFERENCE - "The Revised^4 Report on the Algorithmic Language Scheme. - MIT Press" - ::= { ianaLanguages 4 } - - ianaLangSRSL OBJECT-IDENTITY - STATUS current - DESCRIPTION - "The SNMP Script Language defined by SNMP Research. A - script written in the SNMP Script Language is transferred - in the SNMP Script Language source code format." - ::= { ianaLanguages 5 } - - ianaLangPSL OBJECT-IDENTITY - STATUS current - DESCRIPTION - "The Patrol Script Language defined by BMC Software. A script - written in the Patrol Script Language is transferred in the - Patrol Script Language source code format." - REFERENCE - "PATROL Script Language Reference Manual, Version 3.0, - November 30, 1995. BMC Software, Inc. 2101 City West Blvd., - Houston, Texas 77042." - ::= { ianaLanguages 6 } - - ianaLangSMSL OBJECT-IDENTITY - STATUS current - DESCRIPTION - "The Systems Management Scripting Language. A script written - in the SMSL language is transferred in the SMSL source code - format." - REFERENCE - "ISO/ITU Command Sequencer. - ISO 10164-21 or ITU X.753" - ::= { ianaLanguages 7 } - - END - diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-MALLOC-MIB b/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-MALLOC-MIB deleted file mode 100644 index 5869a363..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-MALLOC-MIB +++ /dev/null @@ -1,67 +0,0 @@ - -IANA-MALLOC-MIB DEFINITIONS ::= BEGIN - -IMPORTS - MODULE-IDENTITY, mib-2 FROM SNMPv2-SMI - TEXTUAL-CONVENTION FROM SNMPv2-TC; - -ianaMallocMIB MODULE-IDENTITY - LAST-UPDATED "200301271200Z" -- January 27, 2003 - ORGANIZATION "IANA" - CONTACT-INFO - " Internet Assigned Numbers Authority - Internet Corporation for Assigned Names and Numbers - 4676 Admiralty Way, Suite 330 - Marina del Rey, CA 90292-6601 - - Phone: +1 310 823 9358 - EMail: iana&iana.org" - DESCRIPTION - "This MIB module defines the IANAscopeSource and - IANAmallocRangeSource textual conventions for use in MIBs - which need to identify ways of learning multicast scope and - range information. - - Any additions or changes to the contents of this MIB module - require either publication of an RFC, or Designated Expert - Review as defined in the Guidelines for Writing IANA - Considerations Section document. The Designated Expert will - be selected by the IESG Area Director(s) of the Transport - Area." - - -- revision log - - REVISION "200301271200Z" -- January 27, 2003 - DESCRIPTION - "Initial version." - ::= { mib-2 102 } - -IANAscopeSource ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "The source of multicast scope information." - SYNTAX INTEGER { - other(1), -- none of the following - manual(2), -- statically configured - local(3), -- automatically added by the system, - -- such as a Source-Specific Multicast - -- scope - mzap(4), -- MZAP - madcap(5) -- MADCAP - } - -IANAmallocRangeSource ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "The source of multicast address allocation range - information." - SYNTAX INTEGER { - other(1), -- none of the following - manual(2), -- statically configured - local(3) -- automatically added by the system, - -- such as a Source-Specific Multicast - -- range - } - -END - diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-MAU-MIB b/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-MAU-MIB deleted file mode 100644 index 35c3f4a8..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-MAU-MIB +++ /dev/null @@ -1,770 +0,0 @@ -IANA-MAU-MIB DEFINITIONS ::= BEGIN - - IMPORTS - MODULE-IDENTITY, OBJECT-IDENTITY, mib-2 - FROM SNMPv2-SMI - TEXTUAL-CONVENTION - FROM SNMPv2-TC - ; - - ianaMauMIB MODULE-IDENTITY - LAST-UPDATED "200704210000Z" -- April 21, 2007 - ORGANIZATION "IANA" - CONTACT-INFO " Internet Assigned Numbers Authority - - Postal: ICANN - 4676 Admiralty Way, Suite 330 - Marina del Rey, CA 90292 - - Tel: +1-310-823-9358 - EMail: iana&iana.org" - - DESCRIPTION - "This MIB module defines dot3MauType OBJECT-IDENTITIES and - IANAifMauListBits, IANAifMauMediaAvailable, - IANAifMauAutoNegCapBits, and IANAifJackType - - TEXTUAL-CONVENTIONs, specifying enumerated values of the - ifMauTypeListBits, ifMauMediaAvailable / rpMauMediaAvailable, - ifMauAutoNegCapabilityBits / ifMauAutoNegCapAdvertisedBits / - ifMauAutoNegCapReceivedBits and ifJackType / rpJackType objects - respectively, defined in the MAU-MIB. - - It is intended that each new MAU type, Media Availability - state, Auto Negotiation capability and/or Jack type defined by - the IEEE 802.3 working group and approved for publication in a - revision of IEEE Std 802.3 will be added to this MIB module, - provided that it is suitable for being managed by the base - objects in the MAU-MIB. An Expert Review, as defined in - RFC 2434 [RFC2434], is REQUIRED for such additions. - - The following reference is used throughout this MIB module: - - [IEEE802.3] refers to: - IEEE Std 802.3, 2005 Edition: 'IEEE Standard for - Information technology - Telecommunications and information - exchange between systems - Local and metropolitan area - networks - Specific requirements - - Part 3: Carrier sense multiple access with collision - detection (CSMA/CD) access method and physical layer - specifications'. - - This reference should be updated as appropriate when new - MAU types, Media Availability states, Auto Negotiation - capabilities, and/or Jack types are added to this MIB module. - - Copyright (C) The IETF Trust (2007). - The initial version of this MIB module was published in - RFC 4836; for full legal notices see the RFC itself. - Supplementary information may be available at: - http://www.ietf.org/copyrights/ianamib.html" - - REVISION "200704210000Z" -- April 21, 2007 - DESCRIPTION "Initial version of this MIB as published in - RFC 4836." - ::= { mib-2 154 } - - -- Textual Conventions - - IANAifMauTypeListBits ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "This data type is used as the syntax of the ifMauTypeListBits - object in the (updated) definition of MAU-MIB's ifMauTable. - - The most recent version of this textual convention is available - in the online version of this MIB module on the IANA web site. - - Requests for new values should be made to IANA via email - (iana&iana.org). - - Note that changes in this textual convention SHALL be - synchronized with relevant changes in the dot3MauType - OBJECT-IDENTITIES." - REFERENCE - "[IEEE802.3], Section 30.5.1.1.2" - SYNTAX BITS { - bOther(0), -- other or unknown - bAUI(1), -- AUI - b10base5(2), -- 10BASE-5 - bFoirl(3), -- FOIRL - - b10base2(4), -- 10BASE-2 - b10baseT(5), -- 10BASE-T duplex mode unknown - b10baseFP(6), -- 10BASE-FP - b10baseFB(7), -- 10BASE-FB - b10baseFL(8), -- 10BASE-FL duplex mode unknown - b10broad36(9), -- 10BROAD36 - b10baseTHD(10), -- 10BASE-T half duplex mode - b10baseTFD(11), -- 10BASE-T full duplex mode - b10baseFLHD(12), -- 10BASE-FL half duplex mode - b10baseFLFD(13), -- 10BASE-FL full duplex mode - b100baseT4(14), -- 100BASE-T4 - b100baseTXHD(15), -- 100BASE-TX half duplex mode - b100baseTXFD(16), -- 100BASE-TX full duplex mode - b100baseFXHD(17), -- 100BASE-FX half duplex mode - b100baseFXFD(18), -- 100BASE-FX full duplex mode - b100baseT2HD(19), -- 100BASE-T2 half duplex mode - b100baseT2FD(20), -- 100BASE-T2 full duplex mode - - b1000baseXHD(21), -- 1000BASE-X half duplex mode - b1000baseXFD(22), -- 1000BASE-X full duplex mode - b1000baseLXHD(23), -- 1000BASE-LX half duplex mode - b1000baseLXFD(24), -- 1000BASE-LX full duplex mode - b1000baseSXHD(25), -- 1000BASE-SX half duplex mode - b1000baseSXFD(26), -- 1000BASE-SX full duplex mode - b1000baseCXHD(27), -- 1000BASE-CX half duplex mode - b1000baseCXFD(28), -- 1000BASE-CX full duplex mode - b1000baseTHD(29), -- 1000BASE-T half duplex mode - b1000baseTFD(30), -- 1000BASE-T full duplex mode - - b10GbaseX(31), -- 10GBASE-X - b10GbaseLX4(32), -- 10GBASE-LX4 - - b10GbaseR(33), -- 10GBASE-R - b10GbaseER(34), -- 10GBASE-ER - b10GbaseLR(35), -- 10GBASE-LR - b10GbaseSR(36), -- 10GBASE-SR - b10GbaseW(37), -- 10GBASE-W - b10GbaseEW(38), -- 10GBASE-EW - b10GbaseLW(39), -- 10GBASE-LW - b10GbaseSW(40), -- 10GBASE-SW - -- new since RFC 3636 - b10GbaseCX4(41), -- 10GBASE-CX4 - b2BaseTL(42), -- 2BASE-TL - b10PassTS(43), -- 10PASS-TS - b100BaseBX10D(44), -- 100BASE-BX10D - b100BaseBX10U(45), -- 100BASE-BX10U - b100BaseLX10(46), -- 100BASE-LX10 - b1000BaseBX10D(47), -- 1000BASE-BX10D - b1000BaseBX10U(48), -- 1000BASE-BX10U - b1000BaseLX10(49), -- 1000BASE-LX10 - b1000BasePX10D(50), -- 1000BASE-PX10D - b1000BasePX10U(51), -- 1000BASE-PX10U - b1000BasePX20D(52), -- 1000BASE-PX20D - b1000BasePX20U(53) -- 1000BASE-PX20U - } - - IANAifMauMediaAvailable ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "This data type is used as the syntax of the - ifMauMediaAvailable and rpMauMediaAvailable objects in the - (updated) definition of MAU-MIB's ifMauTable and rpMauTable - respectively. - - Possible values are: - other(1) - undefined (not listed below) - unknown(2) - MAU's true state is unknown; e.g., - during initialization - available(3) - link, light, or loopback is normal - notAvailable(4) - link loss, low light, or no loopback - remoteFault(5) - a fault has been detected at the - remote end of the link. This value - applies to 10BASE-FB, 100BASE-T4 Far - End Fault Indication and non-specified - remote faults from a system running - auto-negotiation - invalidSignal(6) - invalid signal has been received from - the other end of the link, 10BASE-FB - only - remoteJabber(7) - remote fault, due to jabber - - remoteLinkLoss(8) - remote fault, due to link loss - remoteTest(9) - remote fault, due to test - offline(10) - offline, Clause 37 Auto-Negotiation - only - autoNegError(11) - Auto-Negotiation Error, Clause 37 - Auto-Negotiation only - pmdLinkFault(12) - PMA/PMD receive link fault. In case - of PAF (2BASE-TL / 10PASS-TS PHYs), - all PMEs in the aggregation group have - detected a link fault - wisFrameLoss(13) - WIS loss of frame, 10GBASE-W only - wisSignalLoss(14) - WIS loss of signal, 10GBASE-W only - pcsLinkFault(15) - PCS receive link fault - excessiveBER(16) - PCS Bit Error Ratio monitor - reporting excessive error ratio - dxsLinkFault(17) - DTE XGXS receive link fault, XAUI only - pxsLinkFault(18) - PHY XGXS receive link fault, XAUI only - availableReduced(19) - link normal, reduced bandwidth, - 2BASE-TL / 10PASS-TS only - ready(20) - at least one PME in the aggregation - group is detecting handshake tones, - 2BASE-TL / 10PASS-TS only - - If the MAU is a 10M b/s link or fiber type (FOIRL, 10BASE-T, - 10BASE-F), then this is equivalent to the link test fail - state/low light function. For an AUI, 10BASE2, 10BASE5, or - 10BROAD36 MAU, this indicates whether loopback is detected on - the DI circuit. The value of this attribute persists between - packets for MAU types AUI, 10BASE5, 10BASE2, 10BROAD36, and - 10BASEFP. - - At power-up or following a reset, the Media Available state - will be unknown(2) for AUI, 10BASE5, 10BASE2, 10BROAD36, and - 10BASE-FP MAUs. For these MAUs loopback will be tested on each - transmission during which no collision is detected. - If DI is receiving input when DO returns to IDL after a - transmission and there has been no collision during the - transmission, then loopback will be detected. The Media - Available state will only change during noncollided - transmissions for AUI, 10BASE2, 10BASE5, 10BROAD36, and - 10BASE-FP MAUs. - - For 100BASE-T2, 100BASE-T4, 100BASE-TX, 100BASE-FX, - 100BASE-LX10, and 100BASE-BX10 PHYs the enumerations match the - states within the link integrity state diagram. - Any MAU that implements management of [IEEE802.3] Clause - 28 Auto-Negotiation, will map remote fault indication to - remoteFault(5). - - Any MAU that implements management of Clause 37 - Auto-Negotiation, will map the received RF1 and RF2 bits as - follows: Offline maps to offline(10), Link_Failure maps to - remoteFault(5), and Auto-Negotiation Error maps to - autoNegError(11). - - The value remoteFault(5) applies to 10BASE-FB remote - fault indication, the 100BASE-X far-end fault indication, and - nonspecified remote faults from a system running Clause 28 - Auto-Negotiation. - - The value remoteJabber(7), remoteLink loss(8), or remoteTest(9) - SHOULD be used instead of remoteFault(5) where the reason for - remote fault is identified in the remote signaling protocol. - Where a Clause 22 MII or Clause 35 GMII is present, a logic - one in the remote fault bit maps to the value remoteFault(5), - a logic zero in the link status bit maps to the enumeration - notAvailable(4). The value notAvailable(4) takes precedence - over remoteFault(5). - - For 2BASE-TL and 10PASS-TS PHYs, the value unknown(2) maps to - the condition where the PHY (PCS with connected PMEs) is - initializing, the value ready(20) maps to the condition where - the interface is down and at least one PME in the aggregation - group is ready for handshake, the value available(3) maps to - the condition where all the PMEs in the aggregation group are - up, the value notAvailable(4) maps to the condition where all - the PMEs in the aggregation group are down and no handshake - tones are detected, the value availableReduced(19) maps to the - condition where the interface is up, a link fault is detected - at the receive direction by one or more PMEs in the - aggregation group, but at least one PME is up and the - enumeration pmdLinkFault(12) maps to the condition where a link - fault is detected at the receive direction by all of the PMEs - in the aggregation group. - - For 10 Gb/s the enumerations map to value of the link_fault - variable within the Link Fault Signaling state diagram - as follows: the value OK maps to the value available(3), - the value Local Fault maps to the value notAvailable(4), - and the value Remote Fault maps to the value remoteFault(5). - The value pmdLinkFault(12), wisFrameLoss(13), - wisSignalLoss(14), pcsLinkFault(15), excessiveBER(16), or - dxsLinkFault(17) SHOULD be used instead of the value - notAvailable(4), where the reason for the Local Fault state can - be identified through the use of the Clause 45 MDIO Interface. - Where multiple reasons for the Local Fault state can be - identified, only the highest precedence error SHOULD be - - reported. This precedence in descending order is as follows: - - pxsLinkFault - pmdLinkFault - wisFrameLoss - wisSignalLoss - pcsLinkFault - excessiveBER - dxsLinkFault. - - Where a Clause 45 MDIO interface is present a logic zero in - the PMA/PMD Receive link status bit ([IEEE802.3] - Section 45.2.1.2.2) maps to the value pmdLinkFault(12), - logic one in the LOF status bit (Section 45.2.2.10.4) maps - to the value wisFrameLoss(13), a logic one in the LOS - status bit (Section 45.2.2.10.5) maps to the value - wisSignalLoss, a logic zero in the PCS Receive - link status bit (Section 45.2.3.2.2) maps to the value - pcsLinkFault(15), a logic one in the 10GBASE-R PCS Latched - high BER status bit (Section 45.2.3.12.2) maps to the value - excessiveBER, a logic zero in the DTE XS receive link status - bit (Section 45.2.5.2.2) maps to the value dxsLinkFault(17) - and a logic zero in the PHY XS transmit link status bit - (Section 45.2.4.2.2) maps to the value pxsLinkFault(18). - - The most recent version of this textual convention is available - in the online version of this MIB module on the IANA web site. - - Requests for new values should be made to IANA via email - (iana&iana.org)." - REFERENCE - "[IEEE802.3], Section 30.5.1.1.4" - SYNTAX INTEGER { - other(1), - unknown(2), - available(3), - notAvailable(4), - remoteFault(5), - invalidSignal(6), - remoteJabber(7), - remoteLinkLoss(8), - remoteTest(9), - offline(10), - autoNegError(11), - pmdLinkFault(12), - wisFrameLoss(13), - wisSignalLoss(14), - pcsLinkFault(15), - - excessiveBER(16), - dxsLinkFault(17), - pxsLinkFault(18), - availableReduced(19), - ready(20) - } - - IANAifMauAutoNegCapBits ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "This data type is used as the syntax of the - ifMauAutoNegCapabilityBits, ifMauAutoNegCapAdvertisedBits, and - ifMauAutoNegCapReceivedBits objects in the (updated) definition - of MAU-MIB's ifMauAutoNegTable. - - The most recent version of this textual convention is available - in the online version of this MIB module on the IANA web site. - - Requests for new values should be made to IANA via email - (iana&iana.org)." - REFERENCE - "[IEEE802.3], Section 30.6.1.1.5" - SYNTAX BITS { - bOther(0), -- other or unknown - b10baseT(1), -- 10BASE-T half duplex mode - b10baseTFD(2), -- 10BASE-T full duplex mode - b100baseT4(3), -- 100BASE-T4 - b100baseTX(4), -- 100BASE-TX half duplex mode - b100baseTXFD(5), -- 100BASE-TX full duplex mode - b100baseT2(6), -- 100BASE-T2 half duplex mode - b100baseT2FD(7), -- 100BASE-T2 full duplex mode - bFdxPause(8), -- PAUSE for full-duplex links - bFdxAPause(9), -- Asymmetric PAUSE for full-duplex - -- links - bFdxSPause(10), -- Symmetric PAUSE for full-duplex - -- links - bFdxBPause(11), -- Asymmetric and Symmetric PAUSE for - -- full-duplex links - b1000baseX(12), -- 1000BASE-X, -LX, -SX, -CX half - -- duplex mode - b1000baseXFD(13), -- 1000BASE-X, -LX, -SX, -CX full - -- duplex mode - b1000baseT(14), -- 1000BASE-T half duplex mode - b1000baseTFD(15) -- 1000BASE-T full duplex mode - } - - IANAifJackType ::= TEXTUAL-CONVENTION - STATUS current - - DESCRIPTION - "Common enumeration values for repeater and interface MAU - jack types. This data type is used as the syntax of the - ifJackType and rpJackType objects in the (updated) definition - of MAU-MIB's ifJackTable and rpJackTable respectively. - - Possible values are: - other(1) - undefined or unknown - rj45(2) - RJ45 - rj45S(3) - RJ45 shielded - db9(4) - DB9 - bnc(5) - BNC - fAUI(6) - AUI female - mAUI(7) - AUI male - fiberSC(8) - SC fiber - fiberMIC(9) - MIC fiber - fiberST(10) - ST fiber - telco(11) - Telco - mtrj(12) - MT-RJ fiber - hssdc(13) - fiber channel style-2 - fiberLC(14) - LC fiber - cx4(15) - IB4X for 10GBASE-CX4 - - The most recent version of this textual convention is available - in the online version of this MIB module on the IANA web site. - - Requests for new values should be made to IANA via email - (iana&iana.org)." - SYNTAX INTEGER { - other(1), - rj45(2), - rj45S(3), - db9(4), - bnc(5), - fAUI(6), - mAUI(7), - fiberSC(8), - fiberMIC(9), - fiberST(10), - telco(11), - mtrj(12), - hssdc(13), - fiberLC(14), - -- new since RFC 3636 - cx4(15) - } - - -- OBJECT IDENTITIES for MAU types - - -- (see rpMauType and ifMauType of MAU-MIB for usage) - -- The following definitions has been moved from RFC 3636 and - -- no longer appear in its revision. - - dot3MauType OBJECT IDENTIFIER ::= { mib-2 snmpDot3MauMgt(26) 4 } - - dot3MauTypeAUI OBJECT-IDENTITY - STATUS current - DESCRIPTION "no internal MAU, view from AUI" - REFERENCE "[IEEE802.3], Section 7" - ::= { dot3MauType 1 } - - dot3MauType10Base5 OBJECT-IDENTITY - STATUS current - DESCRIPTION "thick coax MAU" - REFERENCE "[IEEE802.3], Section 7" - ::= { dot3MauType 2 } - - dot3MauTypeFoirl OBJECT-IDENTITY - STATUS current - DESCRIPTION "FOIRL MAU" - REFERENCE "[IEEE802.3], Section 9.9" - ::= { dot3MauType 3 } - - dot3MauType10Base2 OBJECT-IDENTITY - STATUS current - DESCRIPTION "thin coax MAU" - REFERENCE "[IEEE802.3], Section 10" - ::= { dot3MauType 4 } - - dot3MauType10BaseT OBJECT-IDENTITY - STATUS current - DESCRIPTION "UTP MAU. - Note that it is strongly recommended that - agents return either dot3MauType10BaseTHD or - dot3MauType10BaseTFD if the duplex mode is - known. However, management applications should - be prepared to receive this MAU type value from - older agent implementations." - REFERENCE "[IEEE802.3], Section 14" - ::= { dot3MauType 5 } - - dot3MauType10BaseFP OBJECT-IDENTITY - STATUS current - DESCRIPTION "passive fiber MAU" - REFERENCE "[IEEE802.3], Section 16" - ::= { dot3MauType 6 } - - dot3MauType10BaseFB OBJECT-IDENTITY - STATUS current - DESCRIPTION "sync fiber MAU" - REFERENCE "[IEEE802.3], Section 17" - ::= { dot3MauType 7 } - - dot3MauType10BaseFL OBJECT-IDENTITY - STATUS current - DESCRIPTION "async fiber MAU. - Note that it is strongly recommended that - agents return either dot3MauType10BaseFLHD or - dot3MauType10BaseFLFD if the duplex mode is - known. However, management applications should - be prepared to receive this MAU type value from - older agent implementations." - REFERENCE "[IEEE802.3], Section 18" - ::= { dot3MauType 8 } - - dot3MauType10Broad36 OBJECT-IDENTITY - STATUS current - DESCRIPTION "broadband DTE MAU. - Note that 10BROAD36 MAUs can be attached to - interfaces but not to repeaters." - REFERENCE "[IEEE802.3], Section 11" - ::= { dot3MauType 9 } - - ------ new since RFC 1515: - dot3MauType10BaseTHD OBJECT-IDENTITY - STATUS current - DESCRIPTION "UTP MAU, half duplex mode" - REFERENCE "[IEEE802.3], Section 14" - ::= { dot3MauType 10 } - - dot3MauType10BaseTFD OBJECT-IDENTITY - STATUS current - DESCRIPTION "UTP MAU, full duplex mode" - REFERENCE "[IEEE802.3], Section 14" - ::= { dot3MauType 11 } - - dot3MauType10BaseFLHD OBJECT-IDENTITY - STATUS current - DESCRIPTION "async fiber MAU, half duplex mode" - REFERENCE "[IEEE802.3], Section 18" - ::= { dot3MauType 12 } - - dot3MauType10BaseFLFD OBJECT-IDENTITY - STATUS current - DESCRIPTION "async fiber MAU, full duplex mode" - - REFERENCE "[IEEE802.3], Section 18" - ::= { dot3MauType 13 } - - dot3MauType100BaseT4 OBJECT-IDENTITY - STATUS current - DESCRIPTION "4 pair category 3 UTP" - REFERENCE "[IEEE802.3], Section 23" - ::= { dot3MauType 14 } - - dot3MauType100BaseTXHD OBJECT-IDENTITY - STATUS current - DESCRIPTION "2 pair category 5 UTP, half duplex mode" - REFERENCE "[IEEE802.3], Section 25" - ::= { dot3MauType 15 } - - dot3MauType100BaseTXFD OBJECT-IDENTITY - STATUS current - DESCRIPTION "2 pair category 5 UTP, full duplex mode" - REFERENCE "[IEEE802.3], Section 25" - ::= { dot3MauType 16 } - - dot3MauType100BaseFXHD OBJECT-IDENTITY - STATUS current - DESCRIPTION "X fiber over PMT, half duplex mode" - REFERENCE "[IEEE802.3], Section 26" - ::= { dot3MauType 17 } - - dot3MauType100BaseFXFD OBJECT-IDENTITY - STATUS current - DESCRIPTION "X fiber over PMT, full duplex mode" - REFERENCE "[IEEE802.3], Section 26" - ::= { dot3MauType 18 } - - dot3MauType100BaseT2HD OBJECT-IDENTITY - STATUS current - DESCRIPTION "2 pair category 3 UTP, half duplex mode" - REFERENCE "[IEEE802.3], Section 32" - ::= { dot3MauType 19 } - - dot3MauType100BaseT2FD OBJECT-IDENTITY - STATUS current - DESCRIPTION "2 pair category 3 UTP, full duplex mode" - REFERENCE "[IEEE802.3], Section 32" - ::= { dot3MauType 20 } - - ------ new since RFC 2239: - dot3MauType1000BaseXHD OBJECT-IDENTITY - STATUS current - - DESCRIPTION "PCS/PMA, unknown PMD, half duplex mode" - REFERENCE "[IEEE802.3], Section 36" - ::= { dot3MauType 21 } - - dot3MauType1000BaseXFD OBJECT-IDENTITY - STATUS current - DESCRIPTION "PCS/PMA, unknown PMD, full duplex mode" - REFERENCE "[IEEE802.3], Section 36" - ::= { dot3MauType 22 } - - dot3MauType1000BaseLXHD OBJECT-IDENTITY - STATUS current - DESCRIPTION "Fiber over long-wavelength laser, half duplex - mode" - REFERENCE "[IEEE802.3], Section 38" - ::= { dot3MauType 23 } - - dot3MauType1000BaseLXFD OBJECT-IDENTITY - STATUS current - DESCRIPTION "Fiber over long-wavelength laser, full duplex - mode" - REFERENCE "[IEEE802.3], Section 38" - ::= { dot3MauType 24 } - - dot3MauType1000BaseSXHD OBJECT-IDENTITY - STATUS current - DESCRIPTION "Fiber over short-wavelength laser, half - duplex mode" - REFERENCE "[IEEE802.3], Section 38" - ::= { dot3MauType 25 } - - dot3MauType1000BaseSXFD OBJECT-IDENTITY - STATUS current - DESCRIPTION "Fiber over short-wavelength laser, full - duplex mode" - REFERENCE "[IEEE802.3], Section 38" - ::= { dot3MauType 26 } - - dot3MauType1000BaseCXHD OBJECT-IDENTITY - STATUS current - DESCRIPTION "Copper over 150-Ohm balanced cable, half - duplex mode" - REFERENCE "[IEEE802.3], Section 39" - ::= { dot3MauType 27 } - - dot3MauType1000BaseCXFD OBJECT-IDENTITY - STATUS current - DESCRIPTION "Copper over 150-Ohm balanced cable, full - - duplex mode" - REFERENCE "[IEEE802.3], Section 39" - ::= { dot3MauType 28 } - - dot3MauType1000BaseTHD OBJECT-IDENTITY - STATUS current - DESCRIPTION "Four-pair Category 5 UTP, half duplex mode" - REFERENCE "[IEEE802.3], Section 40" - ::= { dot3MauType 29 } - - dot3MauType1000BaseTFD OBJECT-IDENTITY - STATUS current - DESCRIPTION "Four-pair Category 5 UTP, full duplex mode" - REFERENCE "[IEEE802.3], Section 40" - ::= { dot3MauType 30 } - - ------ new since RFC 2668: - dot3MauType10GigBaseX OBJECT-IDENTITY - STATUS current - DESCRIPTION "X PCS/PMA, unknown PMD." - REFERENCE "[IEEE802.3], Section 48" - ::= { dot3MauType 31 } - - dot3MauType10GigBaseLX4 OBJECT-IDENTITY - STATUS current - DESCRIPTION "X fiber over WWDM optics" - REFERENCE "[IEEE802.3], Section 53" - ::= { dot3MauType 32 } - - dot3MauType10GigBaseR OBJECT-IDENTITY - STATUS current - DESCRIPTION "R PCS/PMA, unknown PMD." - REFERENCE "[IEEE802.3], Section 49" - ::= { dot3MauType 33 } - - dot3MauType10GigBaseER OBJECT-IDENTITY - STATUS current - DESCRIPTION "R fiber over 1550 nm optics" - REFERENCE "[IEEE802.3], Section 52" - ::= { dot3MauType 34 } - - dot3MauType10GigBaseLR OBJECT-IDENTITY - STATUS current - DESCRIPTION "R fiber over 1310 nm optics" - REFERENCE "[IEEE802.3], Section 52" - ::= { dot3MauType 35 } - - dot3MauType10GigBaseSR OBJECT-IDENTITY - - STATUS current - DESCRIPTION "R fiber over 850 nm optics" - REFERENCE "[IEEE802.3], Section 52" - ::= { dot3MauType 36 } - - dot3MauType10GigBaseW OBJECT-IDENTITY - STATUS current - DESCRIPTION "W PCS/PMA, unknown PMD." - REFERENCE "[IEEE802.3], Section 49 and 50" - ::= { dot3MauType 37 } - - dot3MauType10GigBaseEW OBJECT-IDENTITY - STATUS current - DESCRIPTION "W fiber over 1550 nm optics" - REFERENCE "[IEEE802.3], Section 52" - ::= { dot3MauType 38 } - - dot3MauType10GigBaseLW OBJECT-IDENTITY - STATUS current - DESCRIPTION "W fiber over 1310 nm optics" - REFERENCE "[IEEE802.3], Section 52" - ::= { dot3MauType 39 } - - dot3MauType10GigBaseSW OBJECT-IDENTITY - STATUS current - DESCRIPTION "W fiber over 850 nm optics" - REFERENCE "[IEEE802.3], Section 52" - ::= { dot3MauType 40 } - - ------ new since RFC 3636: - dot3MauType10GigBaseCX4 OBJECT-IDENTITY - STATUS current - DESCRIPTION "X copper over 8 pair 100-Ohm balanced cable" - REFERENCE "[IEEE802.3], Section 54" - ::= { dot3MauType 41 } - - dot3MauType2BaseTL OBJECT-IDENTITY - STATUS current - DESCRIPTION "Voice grade UTP copper, up to 2700m, optional PAF" - REFERENCE "[IEEE802.3], Sections 61 and 63" - ::= { dot3MauType 42 } - - dot3MauType10PassTS OBJECT-IDENTITY - STATUS current - DESCRIPTION "Voice grade UTP copper, up to 750m, optional PAF" - REFERENCE "[IEEE802.3], Sections 61 and 62" - ::= { dot3MauType 43 } - - dot3MauType100BaseBX10D OBJECT-IDENTITY - STATUS current - DESCRIPTION "One single-mode fiber OLT, long wavelength, 10km" - REFERENCE "[IEEE802.3], Section 58" - ::= { dot3MauType 44 } - - dot3MauType100BaseBX10U OBJECT-IDENTITY - STATUS current - DESCRIPTION "One single-mode fiber ONU, long wavelength, 10km" - REFERENCE "[IEEE802.3], Section 58" - ::= { dot3MauType 45 } - - dot3MauType100BaseLX10 OBJECT-IDENTITY - STATUS current - DESCRIPTION "Two single-mode fibers, long wavelength, 10km" - REFERENCE "[IEEE802.3], Section 58" - ::= { dot3MauType 46 } - - dot3MauType1000BaseBX10D OBJECT-IDENTITY - STATUS current - DESCRIPTION "One single-mode fiber OLT, long wavelength, 10km" - REFERENCE "[IEEE802.3], Section 59" - ::= { dot3MauType 47 } - - dot3MauType1000BaseBX10U OBJECT-IDENTITY - STATUS current - DESCRIPTION "One single-mode fiber ONU, long wavelength, 10km" - REFERENCE "[IEEE802.3], Section 59" - ::= { dot3MauType 48 } - - dot3MauType1000BaseLX10 OBJECT-IDENTITY - STATUS current - DESCRIPTION "Two sigle-mode fiber, long wavelength, 10km" - REFERENCE "[IEEE802.3], Section 59" - ::= { dot3MauType 49 } - - dot3MauType1000BasePX10D OBJECT-IDENTITY - STATUS current - DESCRIPTION "One single-mode fiber EPON OLT, 10km" - REFERENCE "[IEEE802.3], Section 60" - ::= { dot3MauType 50 } - - dot3MauType1000BasePX10U OBJECT-IDENTITY - STATUS current - DESCRIPTION "One single-mode fiber EPON ONU, 10km" - REFERENCE "[IEEE802.3], Section 60" - ::= { dot3MauType 51 } - - dot3MauType1000BasePX20D OBJECT-IDENTITY - STATUS current - DESCRIPTION "One single-mode fiber EPON OLT, 20km" - REFERENCE "[IEEE802.3], Section 60" - ::= { dot3MauType 52 } - - dot3MauType1000BasePX20U OBJECT-IDENTITY - STATUS current - DESCRIPTION "One single-mode fiber EPON ONU, 20km" - REFERENCE "[IEEE802.3], Section 60" - ::= { dot3MauType 53 } - -END diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-PRINTER-MIB b/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-PRINTER-MIB deleted file mode 100644 index 856ed5f8..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-PRINTER-MIB +++ /dev/null @@ -1,1319 +0,0 @@ -IANA-PRINTER-MIB DEFINITIONS ::= BEGIN - -- http://www.iana.org/assignments/ianaprinter-mib - -IMPORTS - MODULE-IDENTITY, - mib-2 - FROM SNMPv2-SMI -- [RFC2578] - TEXTUAL-CONVENTION - FROM SNMPv2-TC; -- [RFC2579] - -ianaPrinterMIB MODULE-IDENTITY - LAST-UPDATED "200509140000Z" -- September 14, 2005 - - ORGANIZATION "IANA" - CONTACT-INFO "Internet Assigned Numbers Authority - Postal: ICANN - 4676 Admiralty Way, Suite 330 - Marina del Rey, CA 90292 - - Tel: +1 310 823 9358 - E-Mail: iana&iana.org" - - DESCRIPTION "This MIB module defines a set of printing-related - TEXTUAL-CONVENTIONs for use in Printer MIB (RFC 3805), - Finisher MIB (RFC 3806), and other MIBs which need to - specify printing mechanism details. - - Any additions or changes to the contents of this MIB - module require either publication of an RFC, or - Designated Expert Review as defined in RFC 2434, - Guidelines for Writing an IANA Considerations Section - in RFCs. The Designated Expert will be selected by - the IESG Area Director(s) of the Applications Area. - - Copyright (C) The Internet Society (2004). The - initial version of this MIB module was published - in RFC 3805. For full legal notices see the RFC - itself or see: - http://www.ietf.org/copyrights/ianamib.html" - - REVISION "200509140000Z" -- September 14, 2005 - DESCRIPTION "Updates to include missing 'unknown' values - for PrtCoverStatusTC, PrtChannelTypeTC, - PrtAlertGroupTC and removal of comment for - for PrtAlertGroupTC." - - REVISION "200406020000Z" -- June 2, 2004 - DESCRIPTION "Original version, published in coordination - with Printer MIB (RFC 3805)." - ::= { mib-2 109 } - --- --- Generic TEXTUAL-CONVENTIONs --- - -PrtCoverStatusTC ::= TEXTUAL-CONVENTION - -- This TC was extracted from prtCoverStatus in RFC 1759. - STATUS current - DESCRIPTION - "Values for encoding the state of a particular cover or - access panel on the printer case or enclosure." - SYNTAX INTEGER { - other(1), - unknown(2), - coverOpen(3), - coverClosed(4), - interlockOpen(5), - interlockClosed(6) - - } - --- --- General Group TEXTUAL-CONVENTIONs --- - -PrtGeneralResetTC ::= TEXTUAL-CONVENTION - -- This TC was extracted from prtGeneralReset in RFC 1759. - STATUS current - DESCRIPTION - "Values for reading and writing the prtGeneralReset object. - - If a device does not have NVRAM, the device shall none the - less respond to a SET with the value resetToNVRAM(5) with a - sort of warm reset that resets the device to implementation- - defined state that is preferably under control of the system - administrator by some means outside the scope of the Printer - MIB specification." - - SYNTAX INTEGER { - notResetting(3), - powerCycleReset(4), -- Cold Start - resetToNVRAM(5), -- Warm Start - resetToFactoryDefaults(6) -- Reset contents of - -- NVRAM to factory - -- defaults - } --- --- Channel Group TEXTUAL-CONVENTIONs --- - -PrtChannelTypeTC ::= TEXTUAL-CONVENTION - -- This TC was extracted from prtChannelType in RFC 1759. - STATUS current - DESCRIPTION - "This enumeration indicates the type of channel that is - receiving jobs." - SYNTAX INTEGER { - other(1), - unknown(2), - chSerialPort(3), - chParallelPort(4), - chIEEE1284Port(5), - chSCSIPort(6), - chAppleTalkPAP(7), - -- AppleTalk Printer - -- Access Protocol (PAP) - -- - -- prtChannelInformation entry: - - -- - -- Printer Name - -- Keyword: Name - -- Syntax: Name - -- Status: Optional - -- Multiplicity: Single - -- Description: The name of the printer - -- within the AppleTalk naming scope - chLPDServer(8), - -- prtChannelInformation entry: - -- - -- Printer queue name - -- Keyword: Queue - -- Syntax: Name - -- Status: Mandatory - -- Multiplicity: Single - -- Description: queue name as - -- defined in [RFC1179]. - chNetwareRPrinter(9), - -- Novell, Inc. - -- For each entry of this type, the - -- prtChannelInformation must have a pair of - -- keywords. For Netware 3.x channels this must - -- be a (PServer, Printer) pair. For Netware - -- 4.x channels and for IntranetWare channels - -- this must be a (NDSTree, NDSPrinter) pair. - -- - -- prtChannelInformation entries: - - -- Print Server Name - -- Keyword: PServer - -- Syntax: Name - -- Status: Mandatory - -- Multiplicity: Single - -- Description: The Pserver's SAP name - -- - -- Printer Number - -- Keyword: Printer - -- Syntax: Integer - -- Status: Mandatory - -- Multiplicity: Single - -- Description: The printer number - -- - -- NDSTree - -- Keyword: NDSTree - -- Syntax: Name - -- Multiplicity: Single - -- Description: The tree's SAP name - - -- - -- NDS Printer object - -- Keyword: NDSPrinter - -- Syntax: Text (Unicode) - -- Status: Mandatory - -- Multiplicity: Single - -- Description: The fully qualified - -- name of the Printer - -- - -- In the Netware 3.x environment, the - -- client checks the Bindery object - -- representing the named PServer. The - -- client then checks for queues which - -- are associated with the numbered - -- printer. In the 4.x and IntraNetware - -- environment, the client looks up the - -- queues which are associated with the - -- NDS Printer Object in the named Tree. - -- Depending on client access rights to - -- those queues, the client submits jobs - -- to the appropriate queue. - chNetwarePServer(10), - -- Novell,Inc. - -- For each entry of this type, the - -- prtChannelInformation must have a pair - -- of keywords. For Netware 3.x channels - -- this must be a (Server, PServer) pair. - -- For Netware 4.x and IntranetWare - -- channels, this must be a - -- (NDSTree, NDSPServer) pair. - -- - -- prtChannelInformation entries: - -- - -- Server Name - -- Keyword: Server - -- Syntax: Name - -- Status: Mandatory - -- Multiplicity: Single - -- Description: The SAP name of the - -- server for which the PServer is defined. - -- - -- PServer - -- Keyword: PServer - -- Syntax: Name - -- Status: Mandatory - -- Multiplicity: Single - -- Description: The bindery name of - -- the PServer - - -- - -- NDS Tree - -- Keyword: NDSTree - -- Syntax: Name - -- Status: Mandatory - -- Multiplicity: Single - -- Description: The NDS Tree name - -- - -- PServer - -- Keyword: NDSPServer - -- Syntax: Text (Unicode) - -- Status: Mandatory - -- Multiplicity: Single - -- Description: The fully qualified - -- name of the PServer object in the tree. - -- - -- In the 3.x environment, the client - -- checks the bindery object - -- representing the named PServer on the - -- named Server. In the 4.x and - -- IntranetWare environment, - -- the client checks the NDS object - -- representing the named PServer in the - -- named Tree. In either case, the - -- client then checks for all queues - -- associated with the Pserver object. - -- Depending on client access rights - -- to those queues, the client submits - -- jobs to the appropriate queue. - chPort9100(11), - -- DEPRECATED - -- (see chPortTCP - 37; chBidirPortTCP - 38) - chAppSocket(12), - -- A bi-directional, LPD-like, protocol using - -- 9101 for control and 9100 for data. - -- Adobe Systems, Inc. - chFTP(13), -- [RFC959] - chTFTP(14), -- [RFC1350] - chDLCLLCPort(15), - chIBM3270(16), -- IBM Coax - chIBM5250(17), -- IBM Twinax - chFax(18), - chIEEE1394(19), - chTransport1(20), - -- TCP port 35, for reserved TCP port list see - -- [RFC3232]. This RFC should also be - -- referenced for other channel - -- enumerations utilizing TCP port - - -- numbers 0 through 1024. - chCPAP(21), -- TCP port 170 - -- Digital Equipment Corp. - chDCERemoteProcCall(22), -- OSF - -- DEPRECATED - chONCRemoteProcCall(23), -- SUN Microsystems - -- DEPRECATED - chOLE(24), -- Microsoft - -- DEPRECATED - chNamedPipe(25), - chPCPrint(26), -- Banyan - chServerMessageBlock(27), - -- File/Print sharing protocol used by - -- various network operating systems - -- from IBM 3Com, Microsoft and others - -- - -- prtChannelInformation entry: - -- - -- Service Name - -- Keyword: Name - -- Syntax: Name - -- Status: Optional - -- Multiplicity: Single - -- Description: The service name of - -- the printer - chDPMF(28), -- IBM Infoprint - chDLLAPI(29), -- Microsoft - -- DEPRECATED - chVxDAPI(30), -- Microsoft - -- DEPRECATED - chSystemObjectManager(31), -- IBM - chDECLAT(32), - -- Digital Equipment Corp. - -- - -- prtChannelInformation entries: - -- - -- Port Name - -- Keyword: Port - -- Syntax: Name - -- Status: Conditionally - -- Mandatory - -- (see note below) - -- Multiplicity: Single - -- Description: LAT port name - -- - -- Service Name - -- Keyword: Service - -- Syntax: Name - - -- Status: Conditionally - -- Mandatory - -- Multiplicity: Single - -- Description: LAT service name - -- - -- The LAT channel may be - -- identified by either a port or - -- service, so either a - -- Port or Service entry must be - -- specified, but not both. - chNPAP(33), - chUSB(34), -- Not in RFC 1759 - -- Universal Serial Bus - chIRDA(35), -- Not in RFC 1759 - -- Infrared Data Assoc. Prot. - chPrintXChange(36), -- Not in RFC 1759 - -- PrintXChange Protocol - chPortTCP(37), -- Not in RFC 1759 - -- A unidirectional "raw" TCP - -- channel that uses an administratively - -- assigned TCP port address. - -- - -- prtChannelInformation entry: - -- - -- Port Number - -- Keyword: Port - -- Syntax: decimal number - -- Status: Mandatory - -- Multiplicity: Single - -- Description: TCP port number - chBidirPortTCP(38), -- Not in RFC 1759 - -- A bi-directional version of chPortTCP - -- - -- prtChannelInformation entries: - -- (See chPortTCP) - chUNPP(39), -- Not in RFC 1759 - -- Universal Network Printing - -- Protocol(UNPP). A bi-directional, - -- multiport network printing - -- application protocol available on - -- multiple transport protocols. - -- Underscore, Inc. - -- Contact: info&underscore.com - chAppleTalkADSP(40), -- Not in RFC 1759 - -- AppleTalk Data Stream Protocol. - -- ADSP is part of the AppleTalk - -- suite of protocols. - -- It is a symmetric, connection- - - -- oriented protocol that makes - -- possible the establishment - -- and maintenance of full-duplex - -- streams of data bytes between - -- two sockets in an AppleTalk - -- internet. - -- See [APPLEMAC]. - chPortSPX(41), -- Not in RFC 1759 - -- Sequenced Packet Exchange (SPX) - -- socket. - -- Novell, Inc. Similar to TCP, a - -- bi-directional data pipe using - -- Novell SPX as a transport. - -- - -- prtChannelInformation entries: - -- - -- Network Number - -- Keyword: Net - -- Syntax: HexString - -- Status: Mandatory - -- Multiplicity: Single - -- Description: The network number - -- - -- Node Number - -- Keyword: Node - -- Syntax: HexString - -- Status: Mandatory - -- Multiplicity: Single - -- Description: The node number - -- - -- Socket Number - -- Keyword: Socket - -- Syntax: HexString - -- Status: Mandatory - -- Multiplicity: Single - -- Description: The SPX socket number - -- - -- There must be exactly one "Net" and - -- one "Node" and one "Socket" entry. A - -- HexString is a binary value - -- represented as a string of - -- ASCII characters using hexadecimal - -- notation. - chPortHTTP(42), -- Not in RFC 1759 - -- Hypertext Transfer Protocol. See [RFC1945] - -- and [RFC2616]. - chNDPS(43), -- Not in RFC 1759 - -- Novell, Inc. - - -- - -- prtChannelInformation entry: - -- - -- Printer Agent Name - -- Keyword: PA - -- Syntax: Name - -- Status: Mandatory - -- Multiplicity: Single - -- Description: The NDPS Printer - -- Agent Name - chIPP(44), -- Not in RFC 1759 - -- Internet Printing Protocol (IPP), - -- (IPP/1.1 - see [RFC2910] and [RFC2911]) - -- also applies to all future versions of IPP. - -- - -- IPP Printer URI - -- Keyword: URI - -- Syntax: URI (Unicode UTF-8 per - -- [RFC2396]) - -- Status: Mandatory - -- Multiplicity: Single - -- Default: not applicable - -- Description: URI of this IPP Printer - -- within Internet naming scope. Unicode - -- UTF-8 [RFC3629] string with - -- hexadecimal escapes for any non-ASCII - -- characters (per [RFC2396]). - -- Conformance: An IPP Printer shall list all - -- IPP URI it supports (one per IPP Channel - -- entry). If a URI contains the 'http:' - -- scheme it must have an explicit port. - -- See: [RFC3629], [RFC2396], [RFC2910], - -- [RFC2911]. - -- - -- IPP Printer Client Authentication - -- Keyword: Auth - -- Syntax: Keyword - -- Status: Optional - -- Multiplicity: Single - -- Default: 'none' - -- Description: A client authentication - -- mechanism supported for this IPP Printer - -- URI: - -- 'none' - -- no client authentication mechanism - -- 'requesting-user-name' - -- authenticated user in 'requesting- - -- user-name' - - -- 'basic' - -- authenticated user via HTTP Basic - -- mechanism - -- 'digest' - -- authenticated user via HTTP Digest - -- mechanism - -- 'certificate' - -- authenticated user via certificate - -- mechanism - -- Conformance: An IPP Printer should list - -- all IPP client authentication mechanisms - -- it supports (one per IPP Channel entry). - -- See: [RFC2911] and [RFC2910]. - -- - -- IPP Printer Security - -- Keyword: Security - -- Syntax: Keyword - -- Status: Optional - -- Multiplicity: Single - -- Default: 'none' - -- Description: A security mechanism - -- supported for this IPP Printer URI: - -- 'none' - -- no security mechanism - -- 'ssl3' - -- SSL3 secure communications channel - -- protocol - -- 'tls' - -- TLS secure communications channel - -- protocol - -- Conformance: An IPP Printer should list - -- all IPP security mechanisms it supports - -- (one per IPP Channel entry). - -- See: [RFC2246], [RFC2911]. - -- - -- IPP Printer Protocol Version - -- Keyword: Version - -- Syntax: Keyword - -- Status: Optional - -- Multiplicity: Multiple - -- Default: '1.1' - -- Description: All of the IPP protocol - -- versions (major.minor) supported for - -- this IPP Printer URI: - -- '1.0' - -- IPP/1.0 conforming Printer - -- '1.1' - -- IPP/1.1 conforming Printer - - -- Conformance: An IPP Printer should list - -- all IPP versions it supports (all listed - -- in each IPP Channel entry). An IPP - -- Client should select the highest - -- numbered version the IPP Client supports - -- for use in all IPP Requests (for optimum - -- interworking). - -- See: [RFC2911]. - chSMTP(45) - -- Print Job submission via Simple Mail - -- Transfer Protocol (SMTP) - see [RFC2821] - -- - -- prtChannelInformation entry: - -- - -- Keyword: Mailto - -- Syntax: Name - -- Status: Mandatory - -- Multiplicity: Single - -- Default: not applicable - -- Description: The SMTP URL of the printer. -} - --- --- Interpreter Group TEXTUAL-CONVENTIONs --- - -PrtInterpreterLangFamilyTC ::= TEXTUAL-CONVENTION - -- This TC was extracted from prtInterpreterLangFamily in RFC 1759. - STATUS current - DESCRIPTION - "This enumeration indicates the type of interpreter that is - receiving jobs." - SYNTAX INTEGER { - other(1), - unknown(2), -- Not in RFC 1759 - langPCL(3), -- PCL. Starting with PCL version 5, - -- HP-GL/2 is included as part of the - -- PCL language. - -- PCL and HP-GL/2 are registered - -- trademarks of Hewlett-Packard - -- Company. - langHPGL(4), -- Hewlett-Packard Graphics Language. - -- HP-GL is a registered trademark of - -- Hewlett-Packard Company. - langPJL(5), -- Peripheral Job Language. Appears in - -- the data stream between data intended - -- for a page description language. - -- Hewlett-Packard Co. - - langPS(6), -- PostScript (tm) Language - -- Postscript - a trademark of Adobe - -- Systems Incorporated which may be - -- registered in certain jurisdictions - langIPDS(7), -- Intelligent Printer Data Stream - -- Bi-directional print data stream for - -- documents consisting of data objects - -- (text, image, graphics, bar codes), - -- resources (fonts, overlays) and page, - -- form and finishing instructions. - -- Facilitates system level device - -- control, document tracking and error - -- recovery throughout the print - -- process. - -- IBM Corporation. - langPPDS(8), -- IBM Personal Printer Data Stream. - -- Originally called IBM ASCII, the name - -- was changed to PPDS when the Laser - -- Printer was introduced in 1989. - -- Lexmark International, Inc. - langEscapeP(9), -- Epson Corp. - langEpson(10), - langDDIF(11), -- Digital Document Interchange Format - -- Digital Equipment Corp., Maynard MA - langInterpress(12), - -- Xerox Corp. - langISO6429(13), -- ISO 6429. Control functions for - -- Coded Character Sets (has ASCII - -- control characters, plus additional - -- controls for - -- character imaging devices.) - langLineData(14), -- line-data: Lines of data as - -- separate ASCII or EBCDIC records - -- and containing no control functions - -- (no CR, LF, HT, FF, etc.) - -- For use with traditional line - -- printers. May use CR and/or LF to - -- delimit lines, instead of records. - -- See ISO 10175 Document Printing - -- Application (DPA) [ISO10175]. - langMODCA(15), -- Mixed Object Document Content - -- Architecture - -- Definitions that allow the - -- composition, interchange, and - -- presentation of final form - -- documents as a collection of data - -- objects (text, image, graphics, bar - -- codes), resources (fonts, overlays) - - -- and page, form and finishing - -- instructions. - -- IBM Corporation. - langREGIS(16), -- Remote Graphics Instruction Set, - -- Digital Equipment Corp., Maynard MA - langSCS(17), -- SNA Character String - -- Bi-directional print data stream for - -- SNA LU-1 mode of communication. - -- IBM - langSPDL(18), -- ISO 10180 Standard Page Description - -- Language - -- ISO Standard - langTEK4014(19), -- Tektronix Corp. - langPDS(20), - langIGP(21), -- Printronix Corp. - langCodeV(22), -- Magnum Code-V, Image and printer - -- control language used to control - -- impact/dot-matrix printers. - -- QMS, Inc., Mobile AL - langDSCDSE(23), -- DSC-DSE: Data Stream Compatible and - -- Emulation Bi-directional print data - -- stream for non-SNA (DSC) and SNA LU-3 - -- 3270 controller (DSE) communications - -- IBM - langWPS(24), -- Windows Printing System, Resource - -- based command/data stream used by - -- Microsoft At Work Peripherals. - -- Developed by the Microsoft - -- Corporation. - langLN03(25), -- Early DEC-PPL3, Digital Equipment - -- Corp. - langCCITT(26), - langQUIC(27), -- QUIC (Quality Information Code), Page - -- Description Language for laser - -- printers. Included graphics, printer - -- control capability and emulation of - -- other well-known printer. - -- QMS, Inc. - langCPAP(28), -- Common Printer Access Protocol - -- Digital Equipment Corp. - langDecPPL(29), -- Digital ANSI-Compliant Printing - -- Protocol - -- (DEC-PPL) - -- Digital Equipment Corp. - langSimpleText(30), - -- simple-text: character coded data, - -- including NUL, CR , LF, HT, and FF - -- control characters. See ISO 10175 - - -- Document Printing Application (DPA) - -- [ISO10175]. - langNPAP(31), -- Network Printer Alliance Protocol - -- (NPAP). This protocol has been - -- superseded by the IEEE 1284.1 TIPSI - -- Std (ref. LangTIPSI(49)). - langDOC(32), -- Document Option Commands, Appears in - -- the data stream between data - -- intended for a page description. - -- QMS, Inc. - langimPress(33), -- imPRESS, Page description language - -- originally developed for the - -- ImageServer product line. A binary - -- language providing representations - -- of text, simple graphics, and some - -- large forms (simple - -- bit-map and CCITT group 3/4 - -- encoded).The - -- language was intended to be sent over - -- an 8-bit channel and supported early - -- document preparation languages (e.g., - -- TeX and TROFF). - -- QMS, Inc. - langPinwriter(34), - -- 24 wire dot matrix printer for - -- USA, Europe, and Asia except - -- Japan. - -- More widely used in Germany, and - -- some Asian countries than in US. - -- NEC - langNPDL(35), -- Page printer for Japanese market. - -- NEC - langNEC201PL(36), -- Serial printer language used in - -- the Japanese market. - -- NEC - langAutomatic(37), - -- Automatic PDL sensing. Automatic - -- sensing of the interpreter - -- language family by the printer - -- examining the document content. - -- Which actual interpreter language - -- families are sensed depends on - -- the printer implementation. - langPages(38), -- Page printer Advanced Graphic - -- Escape Set - -- IBM Japan - langLIPS(39), -- LBP Image Processing System - langTIFF(40), -- Tagged Image File Format (Aldus) - - langDiagnostic(41), - -- A hex dump of the input to the - -- interpreter - langPSPrinter(42), - -- The PostScript Language used for - -- control (with any PDLs) - -- Adobe Systems Incorporated - langCaPSL(43), -- Canon Print Systems Language - langEXCL(44), -- Extended Command Language - -- Talaris Systems Inc. - langLCDS(45), -- Line Conditioned Data Stream - -- Xerox Corporation - langXES(46), -- Xerox Escape Sequences - -- Xerox Corporation - langPCLXL(47), -- Not in RFC 1759 - -- Printer Control Language. Extended - -- language features for printing, and - -- printer control. - -- Hewlett-Packard Co. - langART(48), -- Not in RFC 1759 - -- Advanced Rendering Tools (ART). - -- Page Description language - -- originally developed for the Laser - -- Press printers. - -- Technical reference manual: "ART IV - -- Reference Manual", No F33M. - -- Fuji Xerox Co., Ltd. - langTIPSI(49), -- Not in RFC 1759 - -- Transport Independent Printer - -- System Interface (ref. IEEE Std. - -- 1284.1) - langPrescribe(50), -- Not in RFC 1759 - -- Page description and printer - -- control language. It can be - -- described with ordinary ASCII - -- Technical reference manual: - -- "PRESCRIBE II Programming Manual" - langLinePrinter(51), -- Not in RFC 1759 - -- A simple-text character stream which - -- supports the control codes LF, VT, - -- FF, and plus Centronics or - -- Dataproducts Vertical Format Unit - -- (VFU) language is commonly used on - -- many older model line and matrix - -- printers. - langIDP(52), -- Not in RFC 1759 - -- Imaging Device Protocol - -- Apple Computer. - - langXJCL(53), -- Not in RFC 1759 - -- Xerox Job Control Language (JCL). - -- A Job Control language originally - -- developed for the LaserPress printers - -- and is capable of switching PDLs. - -- Technical reference manual: - -- "ART IV Reference Manual", No F33M. - -- Fuji Xerox Co., Ltd. - langPDF(54), -- Not in RFC 1759 - -- Adobe Portable Document Format - -- Adobe Systems, Inc. - langRPDL(55), -- Not in RFC 1759 - -- Ricoh Page Description Language for - -- printers. - -- Technical manual "RPDL command - -- reference" No.307029 - -- RICOH, Co. LTD - langIntermecIPL(56), -- Not in RFC 1759 - -- Intermec Printer Language for label - -- printers. - -- Technical Manual: "IPL Programmers - -- Reference Manual" - -- Intermec Corporation - langUBIFingerprint(57), -- Not in RFC 1759 - -- An intelligent basic-like programming - -- language for label printers. - -- Reference Manual: "UBI Fingerprint - -- 7.1", No. 1-960434-00 - -- United Barcode Industries - langUBIDirectProtocol(58), -- Not in RFC 1759 - -- An intelligent control language for - -- label printers. - -- Programmers guide: " UBI Direct - -- Protocol", No. 1-960419-00 - -- United Barcode Industries - langFujitsu(59), -- Not in RFC 1759 - -- Fujitsu Printer Language - -- Reference Manual: - -- "FM Printer Sequence" No. 80HP-0770 - -- FUJITSU LIMITED - langCGM(60), -- Not in RFC 1759 - -- Computer Graphics Metafile - -- MIME type 'image/cgm' - langJPEG(61), -- Not in RFC 1759 - -- Joint Photographic Experts Group - -- MIME type 'image/jpeg' - langCALS1(62), -- Not in RFC 1759 - -- US DOD CALS1 (see MIL-STD-1840) - - -- MIME type 'application/cals-1840' - langCALS2(63), -- Not in RFC 1759 - -- US DOD CALS2 (see MIL-STD-1840) - -- MIME type 'application/cals-1840' - langNIRS(64), -- Not in RFC 1759 - -- US DOD NIRS (see MIL-STD-1840) - -- MIME type 'application/cals-1840' - langC4(65) -- Not in RFC 1759 - -- US DOD C4 (see MIL-STD-1840) - -- MIME type 'application/cals-1840' -} - --- --- Input/Output Group TEXTUAL-CONVENTIONs --- - -PrtInputTypeTC ::= TEXTUAL-CONVENTION - -- This TC was extracted from prtInputType in RFC 1759. - STATUS current - DESCRIPTION - "The type of technology (discriminated primarily according to - feeder mechanism type) employed by a specific component or - components." - SYNTAX INTEGER { - other(1), - unknown(2), - sheetFeedAutoRemovableTray(3), - sheetFeedAutoNonRemovableTray(4), - sheetFeedManual(5), - continuousRoll(6), - continuousFanFold(7) - } - -PrtOutputTypeTC ::= TEXTUAL-CONVENTION - -- This TC was extracted from prtOutputType in RFC 1759. - STATUS current - DESCRIPTION - "The Type of technology supported by this output subunit." - SYNTAX INTEGER { - other(1), - unknown(2), - removableBin(3), - unRemovableBin(4), - continuousRollDevice(5), - mailBox(6), - continuousFanFold(7) - } - --- --- Marker Group TEXTUAL-CONVENTIONs --- - -PrtMarkerMarkTechTC ::= TEXTUAL-CONVENTION - -- This TC was extracted from prtMarkerMarkTech in RFC 1759. - STATUS current - DESCRIPTION - "The type of marking technology used for this marking - subunit." - SYNTAX INTEGER { - other(1), - unknown(2), - electrophotographicLED(3), - electrophotographicLaser(4), - electrophotographicOther(5), - impactMovingHeadDotMatrix9pin(6), - impactMovingHeadDotMatrix24pin(7), - impactMovingHeadDotMatrixOther(8), - impactMovingHeadFullyFormed(9), - impactBand(10), - impactOther(11), - inkjetAqueous(12), - inkjetSolid(13), - inkjetOther(14), - pen(15), - thermalTransfer(16), - thermalSensitive(17), - thermalDiffusion(18), - thermalOther(19), - electroerosion(20), - electrostatic(21), - photographicMicrofiche(22), - photographicImagesetter(23), - photographicOther(24), - ionDeposition(25), - eBeam(26), - typesetter(27) - } - -PrtMarkerSuppliesTypeTC ::= TEXTUAL-CONVENTION - -- This TC was extracted from prtMarkerSuppliesType in RFC 1759. - STATUS current - DESCRIPTION - "The type of this supply." - SYNTAX INTEGER { - other(1), - unknown(2), - - -- Values for Printer MIB - toner(3), - wasteToner(4), - ink(5), - inkCartridge(6), - inkRibbon(7), - wasteInk(8), - opc(9), -- photo conductor - developer(10), - fuserOil(11), - solidWax(12), - ribbonWax(13), - wasteWax(14), - fuser(15), -- Not in RFC 1759 - coronaWire(16), -- Not in RFC 1759 - fuserOilWick(17), -- Not in RFC 1759 - cleanerUnit(18), -- Not in RFC 1759 - fuserCleaningPad(19), -- Not in RFC 1759 - transferUnit(20), -- Not in RFC 1759 - tonerCartridge(21), -- Not in RFC 1759 - fuserOiler(22), -- Not in RFC 1759 - -- End of values for Printer MIB - -- Values for Finisher MIB - water(23), -- Not in RFC 1759 - wasteWater(24), -- Not in RFC 1759 - glueWaterAdditive(25),-- Not in RFC 1759 - wastePaper(26), -- Not in RFC 1759 - bindingSupply(27), -- Not in RFC 1759 - bandingSupply(28), -- Not in RFC 1759 - stitchingWire(29), -- Not in RFC 1759 - shrinkWrap(30), -- Not in RFC 1759 - paperWrap(31), -- Not in RFC 1759 - staples(32), -- Not in RFC 1759 - inserts(33), -- Not in RFC 1759 - covers(34) -- Not in RFC 1759 - -- End of values for Finisher MIB - } - --- --- Media Path TEXTUAL-CONVENTIONs --- - -PrtMediaPathTypeTC ::= TEXTUAL-CONVENTION - -- This TC was extracted from prtMediaPathType in RFC 1759. - STATUS current - DESCRIPTION - "The type of the media path for this media path." - SYNTAX INTEGER { - - other(1), - unknown(2), - longEdgeBindingDuplex(3), - shortEdgeBindingDuplex(4), - simplex(5) - } - --- --- Console Group TEXTUAL-CONVENTIONs --- - -PrtConsoleColorTC ::= TEXTUAL-CONVENTION - -- This TC was extracted from prtConsoleColor in RFC 1759. - STATUS current - DESCRIPTION - "The color of this light." - SYNTAX INTEGER { - other(1), - unknown(2), - white(3), - red(4), - green(5), - blue(6), - cyan(7), - magenta(8), - yellow(9), - orange(10) -- Not in RFC 1759 - } - -PrtConsoleDisableTC ::= TEXTUAL-CONVENTION - -- This TC was extracted from prtConsoleDisable in RFC 1759. - STATUS current - DESCRIPTION - "This value indicates whether or not input is accepted from - the operator console. A value of 'enabled' indicates that - input is accepted from the console, and a value of 'disabled' - indicates that input is not accepted from the console. " - SYNTAX INTEGER { - enabled(3), - disabled(4) - } - --- --- Alert Group TEXTUAL-CONVENTIONs --- - -PrtAlertTrainingLevelTC ::= TEXTUAL-CONVENTION - -- This TC was extracted from prtAlertTrainingLevel in RFC 1759. - - STATUS current - DESCRIPTION - "The level of training required to handle this alert, if - human intervention is required. The noInterventionRequired - value should be used if the event does not require any human - intervention. The training level is an enumeration that is - determined and assigned by the printer manufacturer based on - the information or training required to handle this alert. - The printer will break alerts into these different training - levels. It is the responsibility of a management application - in the system to determine how a particular alert is handled - and how and to whom that alert is routed. The following are - the four training levels of alerts: - - Field Service - Alerts that typically require advanced - training and technical knowledge of the printer and its - subunits. An example of a technical person would be a - manufacturer's Field Service representative, or other - person formally trained by the manufacturer or similar - representative. - Trained - Alerts that require an intermediate or moderate - knowledge of the printer and its subunits. A typical - example of such an alert is replacing a toner cartridge. - Untrained - Alerts that can be fixed without prior - training either because the action to correct the alert - is obvious or the printer can help the untrained person - fix the problem. A typical example of such an alert is - reloading paper trays or emptying output bins on a low - end printer. - Management - Alerts that have to do with overall operation - of and configuration of the printer. Examples of such - management events are configuration change of subunits." - SYNTAX INTEGER { - other(1), - unknown(2), - untrained(3), - trained(4), - fieldService(5), - management(6), - noInterventionRequired(7) -- Not in RFC 1759 - } - -PrtAlertGroupTC ::= TEXTUAL-CONVENTION - -- Values in the range 1 to 29 must not be IANA-assigned without - -- re-publishing Printer MIB. - -- Values of 30 and greater are for use in MIBs that augment - -- the Printer MIB, such as the Finisher MIB. - -- This TC extracted from prtAlertGroup in RFC 1759. - - STATUS current - DESCRIPTION - "The type of subunit within the printer model that this alert - is related. Input, output, and markers are examples of - printer model groups, i.e., examples of types of subunits. - Wherever possible, the enumerations match the sub-identifier - that identifies the relevant table in the Printer MIB. - - NOTE: Alert type codes have been added for the Host Resources - MIB storage table and device table. These additional types - are for situations in which the printer's storage and device - objects must generate alerts (and possibly traps for critical - alerts)." - SYNTAX INTEGER { - other(1), - unknown(2), - -- Values for Host Resources MIB - hostResourcesMIBStorageTable(3), - hostResourcesMIBDeviceTable(4), - -- Values for Printer MIB - generalPrinter(5), - cover(6), - localization(7), - input(8), - output(9), - marker(10), - markerSupplies(11), - markerColorant(12), - mediaPath(13), - channel(14), - interpreter(15), - consoleDisplayBuffer(16), - consoleLights(17), - alert(18), -- Not in RFC 1759 - -- Values (5) to (29) reserved for Printer MIB - -- Values for Finisher MIB - finDevice(30), -- Not in RFC 1759 - finSupply(31), -- Not in RFC 1759 - finSupplyMediaInput(32), -- Not in RFC 1759 - finAttribute(33) -- Not in RFC 1759 - -- Values (30) to (39) reserved for Finisher MIB - } - -PrtAlertCodeTC ::= TEXTUAL-CONVENTION - -- This TC was extracted from prtAlertCode in RFC 1759. - STATUS current - DESCRIPTION - "The code that describes the type of alert for this entry in - - the table. Binary change event alerts describe states of the - subunit while unary change event alerts describe a single - event. The same alert code can be used for a binary change - event or a unary change event, depending on implementation. - Also, the same alert code can be used to indicate a critical - or non-critical (warning) alert, depending on implementation. - The value of prtAlertSeverityLevel specifies binary vs. unary - and critical vs. non-critical for each event for the - implementation. - - While there are some specific codes for many subunits, the - generic codes should be used for most subunit alerts. The - network management station can then query the subunit - specified by prtAlertGroup to determine further subunit - status and other subunit information. - - An agent shall not add two entries to the alert table for the - same event, one containing a generic event code and the other - containing a specific event code; the agent shall add only - one entry in the alert table for each event; either generic - (preferred) or specific, not both. - - Implementation of the unary change event - alertRemovalOfBinaryChangeEntry(1801) is optional. When - implemented, this alert code shall indicate to network - management stations that the trailing edge of a binary change - event has occurred and the corresponding alert entry has been - removed from the alert table. As with all events, the - alertRemovalOfBinaryChangeEntry(1801) alert shall be placed - at the end of the alert table. Such an alert table entry - shall specify the following information: - - prtAlertSeverityLevel warningUnaryChangeEvent(4) - prtAlertTrainingLevel noInterventionRequired(7) - prtAlertGroup alert(18) - prtAlertGroupIndex the index of the row in the - alert table of the binary - change event that this event - has removed. - prtAlertLocation unknown (-2) - prtAlertCode alertRemovalOfBinaryChangeEntry(1801) - prtAlertDescription - prtAlertTime the value of sysUpTime at - the time of the removal of the - binary change event from the - alert table. - - Optionally, the agent may generate a trap coincident with - - removing the binary change event and placing the unary change - event alertRemovalOfBinaryChangeEntry(1801) in the alert - table. For such a trap, the prtAlertIndex sent with the above - trap parameters shall be the index of the - alertRemovalOfBinaryChangeEvent row that was added to the - prtAlertTable; not the index of the row that was removed from - the prtAlertTable." - SYNTAX INTEGER { - other(1), - -- an event that is not represented - -- by one of the alert codes - -- specified below. - unknown(2), - -- The following generic codes are common to - -- multiple groups. The NMS may examine the - -- prtAlertGroup object to determine what group - -- to query for further information. - coverOpen(3), - coverClosed(4), - interlockOpen(5), - interlockClosed(6), - configurationChange(7), - jam(8), - subunitMissing(9), -- Not in RFC 1759 - -- The subunit tray, bin, etc. - -- has been removed. - subunitLifeAlmostOver(10), -- Not in RFC 1759 - subunitLifeOver(11), -- Not in RFC 1759 - subunitAlmostEmpty(12), -- Not in RFC 1759 - subunitEmpty(13), -- Not in RFC 1759 - subunitAlmostFull(14), -- Not in RFC 1759 - subunitFull(15), -- Not in RFC 1759 - subunitNearLimit(16), -- Not in RFC 1759 - subunitAtLimit(17), -- Not in RFC 1759 - subunitOpened(18), -- Not in RFC 1759 - subunitClosed(19), -- Not in RFC 1759 - subunitTurnedOn(20), -- Not in RFC 1759 - subunitTurnedOff(21), -- Not in RFC 1759 - subunitOffline(22), -- Not in RFC 1759 - subunitPowerSaver(23), -- Not in RFC 1759 - subunitWarmingUp(24), -- Not in RFC 1759 - subunitAdded(25), -- Not in RFC 1759 - subunitRemoved(26), -- Not in RFC 1759 - subunitResourceAdded(27), -- Not in RFC 1759 - subunitResourceRemoved(28), -- Not in RFC 1759 - subunitRecoverableFailure(29), - -- Not in RFC 1759 - subunitUnrecoverableFailure(30), - - -- Not in RFC 1759 - subunitRecoverableStorageError(31), - -- Not in RFC 1759 - subunitUnrecoverableStorageError(32), - -- Not in RFC 1759 - subunitMotorFailure(33), -- Not in RFC 1759 - subunitMemoryExhausted(34), -- Not in RFC 1759 - subunitUnderTemperature(35), -- Not in RFC 1759 - subunitOverTemperature(36), -- Not in RFC 1759 - subunitTimingFailure(37), -- Not in RFC 1759 - subunitThermistorFailure(38), -- Not in RFC 1759 - - -- General Printer group - doorOpen(501), -- DEPRECATED - -- Use coverOpened(3) - doorClosed(502), -- DEPRECATED - -- Use coverClosed(4) - powerUp(503), - powerDown(504), - printerNMSReset(505), -- Not in RFC 1759 - -- The printer has been reset by some - -- network management station(NMS) - -- writing into 'prtGeneralReset'. - printerManualReset(506), -- Not in RFC 1759 - -- The printer has been reset manually. - printerReadyToPrint(507), -- Not in RFC 1759 - -- The printer is ready to print. (i.e., - -- not warming up, not in power save - -- state, not adjusting print quality, - -- etc.). - - -- Input Group - inputMediaTrayMissing(801), - inputMediaSizeChange(802), - inputMediaWeightChange(803), - inputMediaTypeChange(804), - inputMediaColorChange(805), - inputMediaFormPartsChange(806), - inputMediaSupplyLow(807), - inputMediaSupplyEmpty(808), - inputMediaChangeRequest(809), -- Not in RFC 1759 - -- An interpreter has detected that a - -- different medium is need in this input - -- tray subunit. The prtAlertDescription may - -- be used to convey a human readable - -- description of the medium required to - -- satisfy the request. - inputManualInputRequest(810), -- Not in RFC 1759 - - -- An interpreter has detected that manual - -- input is required in this subunit. The - -- prtAlertDescription may be used to convey - -- a human readable description of the medium - -- required to satisfy the request. - inputTrayPositionFailure(811), -- Not in RFC 1759 - -- The input tray failed to position correctly. - inputTrayElevationFailure(812), - -- Not in RFC 1759 - inputCannotFeedSizeSelected(813), - -- Not in RFC 1759 - -- Output Group - outputMediaTrayMissing(901), - outputMediaTrayAlmostFull(902), - outputMediaTrayFull(903), - outputMailboxSelectFailure(904), - -- Not in RFC 1759 - -- Marker group - markerFuserUnderTemperature(1001), - markerFuserOverTemperature(1002), - markerFuserTimingFailure(1003), - -- Not in RFC 1759 - markerFuserThermistorFailure(1004), - -- Not in RFC 1759 - markerAdjustingPrintQuality(1005), - -- Not in RFC 1759 - -- Marker Supplies group - markerTonerEmpty(1101), - markerInkEmpty(1102), - markerPrintRibbonEmpty(1103), - markerTonerAlmostEmpty(1104), - markerInkAlmostEmpty(1105), - markerPrintRibbonAlmostEmpty(1106), - markerWasteTonerReceptacleAlmostFull(1107), - markerWasteInkReceptacleAlmostFull(1108), - markerWasteTonerReceptacleFull(1109), - markerWasteInkReceptacleFull(1110), - markerOpcLifeAlmostOver(1111), - markerOpcLifeOver(1112), - markerDeveloperAlmostEmpty(1113), - markerDeveloperEmpty(1114), - markerTonerCartridgeMissing(1115), - -- Not in RFC 1759 - -- Media Path Device Group - mediaPathMediaTrayMissing(1301), - mediaPathMediaTrayAlmostFull(1302), - mediaPathMediaTrayFull(1303), - mediaPathCannotDuplexMediaSelected(1304), - - -- Not in RFC 1759 - -- Interpreter Group - interpreterMemoryIncrease(1501), - interpreterMemoryDecrease(1502), - interpreterCartridgeAdded(1503), - interpreterCartridgeDeleted(1504), - interpreterResourceAdded(1505), - interpreterResourceDeleted(1506), - interpreterResourceUnavailable(1507), - interpreterComplexPageEncountered(1509), - -- Not in RFC 1759 - -- The interpreter has encountered a page - -- that is too complex for the resources that - -- are available. - -- Alert Group - alertRemovalOfBinaryChangeEntry(1801) - -- Not in RFC 1759 - -- A binary change event entry has been - -- removed from the alert table. This unary - -- change alert table entry is added to the - -- end of the alert table. - } -END - - diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-RTPROTO-MIB b/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-RTPROTO-MIB deleted file mode 100644 index 952c84e2..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANA-RTPROTO-MIB +++ /dev/null @@ -1,92 +0,0 @@ - -IANA-RTPROTO-MIB DEFINITIONS ::= BEGIN - -IMPORTS - MODULE-IDENTITY, mib-2 FROM SNMPv2-SMI - TEXTUAL-CONVENTION FROM SNMPv2-TC; - -ianaRtProtoMIB MODULE-IDENTITY - LAST-UPDATED "200009260000Z" -- September 26, 2000 - ORGANIZATION "IANA" - CONTACT-INFO - " Internet Assigned Numbers Authority - Internet Corporation for Assigned Names and Numbers - 4676 Admiralty Way, Suite 330 - Marina del Rey, CA 90292-6601 - - Phone: +1 310 823 9358 - EMail: iana&iana.org" - DESCRIPTION - "This MIB module defines the IANAipRouteProtocol and - IANAipMRouteProtocol textual conventions for use in MIBs - which need to identify unicast or multicast routing - mechanisms. - - Any additions or changes to the contents of this MIB module - require either publication of an RFC, or Designated Expert - Review as defined in RFC 2434, Guidelines for Writing an - IANA Considerations Section in RFCs. The Designated Expert - will be selected by the IESG Area Director(s) of the Routing - Area." - - REVISION "200009260000Z" -- September 26, 2000 - DESCRIPTION "Original version, published in coordination - with RFC 2932." - - ::= { mib-2 84 } - -IANAipRouteProtocol ::= TEXTUAL-CONVENTION - STATUS current - - DESCRIPTION - "A mechanism for learning routes. Inclusion of values for - routing protocols is not intended to imply that those - protocols need be supported." - SYNTAX INTEGER { - other (1), -- not specified - local (2), -- local interface - netmgmt (3), -- static route - icmp (4), -- result of ICMP Redirect - - -- the following are all dynamic - -- routing protocols - - egp (5), -- Exterior Gateway Protocol - ggp (6), -- Gateway-Gateway Protocol - hello (7), -- FuzzBall HelloSpeak - rip (8), -- Berkeley RIP or RIP-II - isIs (9), -- Dual IS-IS - esIs (10), -- ISO 9542 - ciscoIgrp (11), -- Cisco IGRP - bbnSpfIgp (12), -- BBN SPF IGP - ospf (13), -- Open Shortest Path First - bgp (14), -- Border Gateway Protocol - idpr (15), -- InterDomain Policy Routing - ciscoEigrp (16), -- Cisco EIGRP - dvmrp (17) -- DVMRP - } - -IANAipMRouteProtocol ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "The multicast routing protocol. Inclusion of values for - multicast routing protocols is not intended to imply that - those protocols need be supported." - SYNTAX INTEGER { - other(1), -- none of the following - local(2), -- e.g., manually configured - netmgmt(3), -- set via net.mgmt protocol - dvmrp(4), - mospf(5), - pimSparseDense(6), -- PIMv1, both DM and SM - cbt(7), - pimSparseMode(8), -- PIM-SM - pimDenseMode(9), -- PIM-DM - igmpOnly(10), - bgmp(11), - msdp(12) - } - -END - - diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANATn3270eTC-MIB b/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANATn3270eTC-MIB deleted file mode 100644 index e774ac00..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANATn3270eTC-MIB +++ /dev/null @@ -1,306 +0,0 @@ - - IANATn3270eTC-MIB DEFINITIONS ::= BEGIN - - IMPORTS - MODULE-IDENTITY, mib-2 - FROM SNMPv2-SMI - TEXTUAL-CONVENTION - FROM SNMPv2-TC; - - ianaTn3270eTcMib MODULE-IDENTITY - LAST-UPDATED "200005100000Z" -- May 10, 2000 - ORGANIZATION "IANA" - CONTACT-INFO - "Internet Assigned Numbers Authority - - Postal: ICANN - 4676 Admiralty Way, Suite 330 - Marina del Rey, CA 90292 - - Tel: +1 310 823 9358 x20 - E-Mail: iana&iana.org" - DESCRIPTION - "This module defines a set of textual conventions - for use by the TN3270E-MIB and the TN3270E-RT-MIB. - - Any additions or changes to the contents of this - MIB module must first be discussed on the tn3270e - working group list at: tn3270e&list.nih.gov - and approved by one of the following TN3270E - working group contacts: - - Ed Bailey (co-chair) - elbailey&us.ibm.com - Michael Boe (co-chair) - mboe&cisco.com - Ken White - kennethw&vnet.ibm.com - Robert Moore - remoore&us.ibm.com - - The above list of contacts can be altered with - the approval of the two co-chairs. - - The Textual Conventions defined within this MIB have - no security issues associated with them unless - explicitly stated in their corresponding - DESCRIPTION clause." - - -- revision log, in reverse chronological order - - REVISION "200005100000Z" -- May 10, 2000 - DESCRIPTION "Fix to import mib-2 instead of experimental." - - REVISION "199909011000Z" -- September 1, 1999 - DESCRIPTION - "Initial version transferred from the TN3270E - working group to IANA." - - ::= { mib-2 61 } - - - -- Textual Conventions - - IANATn3270eAddrType ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "The textual convention for defining the type of a - client address. The enumeration value unknown(0) is - also used to indicate that no actual address is present." - SYNTAX INTEGER { - unknown(0), - ipv4(1), - ipv6(2) - } - - IANATn3270eAddress ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "Denotes a client address. The type of client address is - determined by use of the IANATn3270eAddrType textual -convention. - The length in octets of a IANATn3270eAddress object is: - - IANATn3270eAddrType Address Length - +++++++++++++++++++ ++++++++++++++ - unknown(0) not specified or unknown; the - actual length of the - IANATn3270eAddress octet string - indicates if an address - is present - ipv4(1) 4 OCTETS - ipv6(2) 16 OCTETS - - This textual convention is similar to the TAddress - TC defined by RFC1903 except that it allows a - zero-length octet string and is not a full transport - layer address." - SYNTAX OCTET STRING (SIZE (0..255)) - - IANATn3270eClientType ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "The textual convention for defining the set of - enumerations used by tn3270eTcpConnClientIdFormat - in the TN3270E-MIB: - - ENUMERATION OCTETs DESCRIPTION - - none(1) 0 Not specified - other(2) 1..512 Implementation specific - ipv4(3) 6 4-octet IP Address plus - 2-octet TCP Port - ipv6(4) 18 16-octet IPv6 Address - plus 2-octet TCP Port - domainName(5) 1..512 The DNS name of a - client. - truncDomainName(6) 1..512 The (truncated) DNS name - of a client. - string(7) 1..512 Unknown Utf8String - certificate(8) 1..512 certificate - userId(9) 1..8 Client's userid - x509dn(10) 1..512 X.509 Distinguished Name - - Representation of a certificate(8) may be lead to - a security exposure and is NOT RECOMMENDED without - adequate security." - SYNTAX INTEGER { - none(1), - other(2), - ipv4(3), - ipv6(4), - domainName(5), - truncDomainName(6), - string(7), - certificate(8), - userId(9), - x509dn(10) - } - - IANATn3270Functions ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "This textual convention reflects the current set of - TN3270 and TN3270E functions that can be negotiated - between a server and its client: - - RFC856 - transmitBinary The sender of this command REQUESTS - permission to begin transmitting, or - confirms that it will now begin - transmitting characters which are to - be interpreted as 8 bits of binary - data by the receiver of the data. - RFC860 - timingMark The sender of this command REQUESTS - that the receiver of this command - return a WILL TIMING-MARK in the data - stream at the 'appropriate place'. - RFC885 - endOfRecord The sender of this command requests - permission to begin transmission of - the Telnet END-OF-RECORD (EOR) code - when transmitting data characters, or - the sender of this command confirms it - will now begin transmission of EORs - with transmitted data characters. - RFC1091 - terminalType Sender is willing to send terminal - type information in a subsequent - sub-negotiation. - - RFC1041 - tn3270Regime Sender is willing to send list of - supported 3270 Regimes in a - subsequent sub-negotiation. - RFC2355 - scsCtlCodes (Printer sessions only). Allows the - use of the SNA Character Stream (SCS) - and SCS control codes on the session. - SCS is used with LU type 1 SNA sessions. - dataStreamCtl (Printer sessions only). Allows the use - of the standard 3270 data stream. This - corresponds to LU type 3 SNA sessions. - responses Provides support for positive and - negative response handling. Allows the - server to reflect to the client any and - all definite, exception, and no response - requests sent by the host application. - bindImage Allows the server to send the SNA Bind - image and Unbind notification to the - client. - sysreq Allows the client and server to emulate - some (or all, depending on the server) of - the functions of the SYSREQ key in an SNA - environment." - SYNTAX BITS { - transmitBinary(0),-- rfc856 - timemark(1), -- rfc860 - endOfRecord(2), -- rfc885 - terminalType(3), -- rfc1091 - tn3270Regime(4), -- rfc1041 - scsCtlCodes(5), -- rfc2355 - dataStreamCtl(6), -- rfc2355 - responses(7), -- rfc2355 - bindImage(8), -- rfc2355 - sysreq(9) -- rfc2355 - } - - IANATn3270ResourceType ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "The type of resource defined by a resource pool. Refer - to tn3270eResPoolTable." - SYNTAX INTEGER { - other(1), - terminal(2), - printer(3), - terminalOrPrinter(4) - } - - IANATn3270DeviceType ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "This textual convention defines the list of device - types that can be set, as defined by RFC 2355." - SYNTAX INTEGER { - -- terminals - ibm3278d2(1), -- (24 row x 80 col display) - ibm3278d2E(2), -- (24 row x 80 col display) - ibm3278d3(3), -- (32 row x 80 col display) - ibm3278d3E(4), -- (32 row x 80 col display) - ibm3278d4(5), -- (43 row x 80 col display) - ibm3278d4E(6), -- (43 row x 80 col display) - ibm3278d5(7), -- (27 row x 132 col display) - ibm3278d5E(8), -- (27 row x 132 col display) - ibmDynamic(9), -- (no pre-defined display size) - - -- printers - ibm3287d1(10), - - unknown(100) - } - - IANATn3270eLogData ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "An octet string representing log data as pertaining to - either a TN3270 or TN3270E Session as reported from a - TN3270E Server. Log data is stored in an octet string - in time order (from earliest to latest). - - Each log element has the following form: - - +------+----+---------+------------+ - !length!type!TimeStamp! data ! - +------+----+---------+------------+ - - where - - length = one-octet length of the data portion of the - trace element, not including the length, - type, and TimeStamp fields - type = one-octet code point characterizing the data. - TimeStamp = A 4-octet field representing the number of - TimeTicks since the TN3270E server was last - activated. The server's last activation time - is available in the tn3270eSrvrConfLastActTime - object in the TN3270E MIB, which has the - syntax DateAndTime. - data = initial part of a PDU. - - length type - - 0-255 x'00' - unknown - 0 x'01' - inactivity timer expired - 0 x'02' - dynamic timer expired - 0 x'03' - actlu req - 0 x'04' - bind req - 0 x'05' - clear req - 0 x'06' - dactlu req - 0 x'07' - warm actpu req - 0 x'08' - sdt req - 0 x'09' - unbind req - 0 x'0A' - notify resp - 0 x'0B' - reply PSID neg rsp - 0 x'0C' - reply PSID pos rsp - 0 x'0D' - unbind rsp - 0 x'0E' - hierarchical reset - 0 x'0F' - client connect req - 0 x'10' - client disconnect req - 0 x'11' - timingmark received - 0 x'12' - flowControl timer expired - 0 x'13' - neg rsp to host - 0 x'14' - neg rsp from host - 0 x'15' - data contention - 0 x'16' - no buffer to send SNA data - 0 x'17' - receive response while inbound - 0 x'18' - client protocol error - 0 x'19' - badClientSequenceReceived - 1-255 x'1A' - utf8String - 2 x'1B' - hexCode, implementation dependent - - Log element entries have a minimum length of 6 octets. - The zero-length string indicates that no log data is - available." - SYNTAX OCTET STRING (SIZE (0 | 6..2048)) - - END - - diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANAifType-MIB b/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANAifType-MIB deleted file mode 100644 index 39dddf9e..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/IANA/IANAifType-MIB +++ /dev/null @@ -1,572 +0,0 @@ - IANAifType-MIB DEFINITIONS ::= BEGIN - - IMPORTS - MODULE-IDENTITY, mib-2 FROM SNMPv2-SMI - TEXTUAL-CONVENTION FROM SNMPv2-TC; - - ianaifType MODULE-IDENTITY - LAST-UPDATED "200709130000Z" -- September 13, 2007 - ORGANIZATION "IANA" - CONTACT-INFO " Internet Assigned Numbers Authority - - Postal: ICANN - 4676 Admiralty Way, Suite 330 - Marina del Rey, CA 90292 - - Tel: +1 310 823 9358 - E-Mail: iana&iana.org" - - DESCRIPTION "This MIB module defines the IANAifType Textual - Convention, and thus the enumerated values of - the ifType object defined in MIB-II's ifTable." - - REVISION "200709130000Z" -- September 13, 2007 - DESCRIPTION "Registration of new IANAifTypes 243 and 244." - - REVISION "200705290000Z" -- May 29, 2007 - DESCRIPTION "Changed the description for IANAifType 228." - - REVISION "200703080000Z" -- March 08, 2007 - DESCRIPTION "Registration of new IANAifType 242." - - REVISION "200701230000Z" -- January 23, 2007 - DESCRIPTION "Registration of new IANAifTypes 239, 240, and 241." - - REVISION "200610170000Z" -- October 17, 2006 - DESCRIPTION "Deprecated/Obsoleted IANAifType 230. Registration of - IANAifType 238." - - REVISION "200609250000Z" -- September 25, 2006 - DESCRIPTION "Changed the description for IANA ifType - 184 and added new IANA ifType 237." - - REVISION "200608170000Z" -- August 17, 2006 - DESCRIPTION "Changed the descriptions for IANAifTypes - 20 and 21." - - REVISION "200608110000Z" -- August 11, 2006 - DESCRIPTION "Changed the descriptions for IANAifTypes - 7, 11, 62, 69, and 117." - - REVISION "200607250000Z" -- July 25, 2006 - DESCRIPTION "Registration of new IANA ifType 236." - - REVISION "200606140000Z" -- June 14, 2006 - DESCRIPTION "Registration of new IANA ifType 235." - - REVISION "200603310000Z" -- March 31, 2006 - DESCRIPTION "Registration of new IANA ifType 234." - - REVISION "200603300000Z" -- March 30, 2006 - DESCRIPTION "Registration of new IANA ifType 233." - - REVISION "200512220000Z" -- December 22, 2005 - DESCRIPTION "Registration of new IANA ifTypes 231 and 232." - - REVISION "200510100000Z" -- October 10, 2005 - DESCRIPTION "Registration of new IANA ifType 230." - - REVISION "200509090000Z" -- September 09, 2005 - DESCRIPTION "Registration of new IANA ifType 229." - - REVISION "200505270000Z" -- May 27, 2005 - DESCRIPTION "Registration of new IANA ifType 228." - - REVISION "200503030000Z" -- March 3, 2005 - DESCRIPTION "Added the IANAtunnelType TC and deprecated - IANAifType sixToFour (215) per RFC4087." - - REVISION "200411220000Z" -- November 22, 2004 - DESCRIPTION "Registration of new IANA ifType 227 per RFC4631." - - REVISION "200406170000Z" -- June 17, 2004 - DESCRIPTION "Registration of new IANA ifType 226." - - REVISION "200405120000Z" -- May 12, 2004 - DESCRIPTION "Added description for IANAifType 6, and - changed the descriptions for IANAifTypes - 180, 181, and 182." - - REVISION "200405070000Z" -- May 7, 2004 - DESCRIPTION "Registration of new IANAifType 225." - - REVISION "200308250000Z" -- Aug 25, 2003 - DESCRIPTION "Deprecated IANAifTypes 7 and 11. Obsoleted - IANAifTypes 62, 69, and 117. ethernetCsmacd (6) - should be used instead of these values" - - REVISION "200308180000Z" -- Aug 18, 2003 - DESCRIPTION "Registration of new IANAifType - 224." - - REVISION "200308070000Z" -- Aug 7, 2003 - DESCRIPTION "Registration of new IANAifTypes - 222 and 223." - - REVISION "200303180000Z" -- Mar 18, 2003 - DESCRIPTION "Registration of new IANAifType - 221." - - REVISION "200301130000Z" -- Jan 13, 2003 - DESCRIPTION "Registration of new IANAifType - 220." - - REVISION "200210170000Z" -- Oct 17, 2002 - DESCRIPTION "Registration of new IANAifType - 219." - - REVISION "200207160000Z" -- Jul 16, 2002 - DESCRIPTION "Registration of new IANAifTypes - 217 and 218." - - REVISION "200207100000Z" -- Jul 10, 2002 - DESCRIPTION "Registration of new IANAifTypes - 215 and 216." - - REVISION "200206190000Z" -- Jun 19, 2002 - DESCRIPTION "Registration of new IANAifType - 214." - - REVISION "200201040000Z" -- Jan 4, 2002 - DESCRIPTION "Registration of new IANAifTypes - 211, 212 and 213." - - REVISION "200112200000Z" -- Dec 20, 2001 - DESCRIPTION "Registration of new IANAifTypes - 209 and 210." - - REVISION "200111150000Z" -- Nov 15, 2001 - DESCRIPTION "Registration of new IANAifTypes - 207 and 208." - - - REVISION "200111060000Z" -- Nov 6, 2001 - DESCRIPTION "Registration of new IANAifType - 206." - - - REVISION "200111020000Z" -- Nov 2, 2001 - DESCRIPTION "Registration of new IANAifType - 205." - - - REVISION "200110160000Z" -- Oct 16, 2001 - DESCRIPTION "Registration of new IANAifTypes - 199, 200, 201, 202, 203, and 204." - - - REVISION "200109190000Z" -- Sept 19, 2001 - DESCRIPTION "Registration of new IANAifType - 198." - - REVISION "200105110000Z" -- May 11, 2001 - DESCRIPTION "Registration of new IANAifType - 197." - - - REVISION "200101120000Z" -- Jan 12, 2001 - DESCRIPTION "Registration of new IANAifTypes - 195 and 196." - - REVISION "200012190000Z" -- Dec 19, 2000 - DESCRIPTION "Registration of new IANAifTypes - 193 and 194." - - REVISION "200012070000Z" -- Dec 07, 2000 - DESCRIPTION "Registration of new IANAifTypes - 191 and 192." - - REVISION "200012040000Z" -- Dec 04, 2000 - DESCRIPTION "Registration of new IANAifType - 190." - - REVISION "200010170000Z" -- Oct 17, 2000 - DESCRIPTION "Registration of new IANAifTypes - 188 and 189." - - REVISION "200010020000Z" -- Oct 02, 2000 - DESCRIPTION "Registration of new IANAifType 187." - - REVISION "200009010000Z" -- Sept 01, 2000 - DESCRIPTION "Registration of new IANAifTypes - 184, 185, and 186." - - REVISION "200008240000Z" -- Aug 24, 2000 - DESCRIPTION "Registration of new IANAifType 183." - - REVISION "200008230000Z" -- Aug 23, 2000 - DESCRIPTION "Registration of new IANAifTypes - 174-182." - - REVISION "200008220000Z" -- Aug 22, 2000 - DESCRIPTION "Registration of new IANAifTypes 170, - 171, 172 and 173." - - REVISION "200004250000Z" -- Apr 25, 2000 - DESCRIPTION "Registration of new IANAifTypes 168 and 169." - - REVISION "200003060000Z" -- Mar 6, 2000 - DESCRIPTION "Fixed a missing semi-colon in the IMPORT. - Also cleaned up the REVISION log a bit. - It is not complete, but from now on it will - be maintained and kept up to date with each - change to this MIB module." - - REVISION "199910081430Z" -- Oct 08, 1999 - DESCRIPTION "Include new name assignments up to cnr(85). - This is the first version available via the WWW - at: ftp://ftp.isi.edu/mib/ianaiftype.mib" - - REVISION "199401310000Z" -- Jan 31, 1994 - DESCRIPTION "Initial version of this MIB as published in - RFC 1573." - - ::= { mib-2 30 } - - - IANAifType ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "This data type is used as the syntax of the ifType - object in the (updated) definition of MIB-II's - ifTable. - - The definition of this textual convention with the - addition of newly assigned values is published - periodically by the IANA, in either the Assigned - Numbers RFC, or some derivative of it specific to - Internet Network Management number assignments. (The - latest arrangements can be obtained by contacting the - IANA.) - - Requests for new values should be made to IANA via - email (iana&iana.org). - - The relationship between the assignment of ifType - values and of OIDs to particular media-specific MIBs - is solely the purview of IANA and is subject to change - without notice. Quite often, a media-specific MIB's - OID-subtree assignment within MIB-II's 'transmission' - subtree will be the same as its ifType value. - However, in some circumstances this will not be the - case, and implementors must not pre-assume any - specific relationship between ifType values and - transmission subtree OIDs." - SYNTAX INTEGER { - other(1), -- none of the following - regular1822(2), - hdh1822(3), - ddnX25(4), - rfc877x25(5), - ethernetCsmacd(6), -- for all ethernet-like interfaces, - -- regardless of speed, as per RFC3635 - iso88023Csmacd(7), -- Deprecated via RFC3635 - -- ethernetCsmacd (6) should be used instead - iso88024TokenBus(8), - iso88025TokenRing(9), - iso88026Man(10), - starLan(11), -- Deprecated via RFC3635 - -- ethernetCsmacd (6) should be used instead - proteon10Mbit(12), - proteon80Mbit(13), - hyperchannel(14), - fddi(15), - lapb(16), - sdlc(17), - ds1(18), -- DS1-MIB - e1(19), -- Obsolete see DS1-MIB - basicISDN(20), -- no longer used - -- see also RFC2127 - primaryISDN(21), -- no longer used - -- see also RFC2127 - propPointToPointSerial(22), -- proprietary serial - ppp(23), - softwareLoopback(24), - eon(25), -- CLNP over IP - ethernet3Mbit(26), - nsip(27), -- XNS over IP - slip(28), -- generic SLIP - ultra(29), -- ULTRA technologies - ds3(30), -- DS3-MIB - sip(31), -- SMDS, coffee - frameRelay(32), -- DTE only. - rs232(33), - para(34), -- parallel-port - arcnet(35), -- arcnet - arcnetPlus(36), -- arcnet plus - atm(37), -- ATM cells - miox25(38), - sonet(39), -- SONET or SDH - x25ple(40), - iso88022llc(41), - localTalk(42), - smdsDxi(43), - frameRelayService(44), -- FRNETSERV-MIB - v35(45), - hssi(46), - hippi(47), - modem(48), -- Generic modem - aal5(49), -- AAL5 over ATM - sonetPath(50), - sonetVT(51), - smdsIcip(52), -- SMDS InterCarrier Interface - propVirtual(53), -- proprietary virtual/internal - propMultiplexor(54),-- proprietary multiplexing - ieee80212(55), -- 100BaseVG - fibreChannel(56), -- Fibre Channel - hippiInterface(57), -- HIPPI interfaces - frameRelayInterconnect(58), -- Obsolete use either - -- frameRelay(32) or - -- frameRelayService(44). - aflane8023(59), -- ATM Emulated LAN for 802.3 - aflane8025(60), -- ATM Emulated LAN for 802.5 - cctEmul(61), -- ATM Emulated circuit - fastEther(62), -- Obsoleted via RFC3635 - -- ethernetCsmacd (6) should be used instead - isdn(63), -- ISDN and X.25 - v11(64), -- CCITT V.11/X.21 - v36(65), -- CCITT V.36 - g703at64k(66), -- CCITT G703 at 64Kbps - g703at2mb(67), -- Obsolete see DS1-MIB - qllc(68), -- SNA QLLC - fastEtherFX(69), -- Obsoleted via RFC3635 - -- ethernetCsmacd (6) should be used instead - channel(70), -- channel - ieee80211(71), -- radio spread spectrum - ibm370parChan(72), -- IBM System 360/370 OEMI Channel - escon(73), -- IBM Enterprise Systems Connection - dlsw(74), -- Data Link Switching - isdns(75), -- ISDN S/T interface - isdnu(76), -- ISDN U interface - lapd(77), -- Link Access Protocol D - ipSwitch(78), -- IP Switching Objects - rsrb(79), -- Remote Source Route Bridging - atmLogical(80), -- ATM Logical Port - ds0(81), -- Digital Signal Level 0 - ds0Bundle(82), -- group of ds0s on the same ds1 - bsc(83), -- Bisynchronous Protocol - async(84), -- Asynchronous Protocol - cnr(85), -- Combat Net Radio - iso88025Dtr(86), -- ISO 802.5r DTR - eplrs(87), -- Ext Pos Loc Report Sys - arap(88), -- Appletalk Remote Access Protocol - propCnls(89), -- Proprietary Connectionless Protocol - hostPad(90), -- CCITT-ITU X.29 PAD Protocol - termPad(91), -- CCITT-ITU X.3 PAD Facility - frameRelayMPI(92), -- Multiproto Interconnect over FR - x213(93), -- CCITT-ITU X213 - adsl(94), -- Asymmetric Digital Subscriber Loop - radsl(95), -- Rate-Adapt. Digital Subscriber Loop - sdsl(96), -- Symmetric Digital Subscriber Loop - vdsl(97), -- Very H-Speed Digital Subscrib. Loop - iso88025CRFPInt(98), -- ISO 802.5 CRFP - myrinet(99), -- Myricom Myrinet - voiceEM(100), -- voice recEive and transMit - voiceFXO(101), -- voice Foreign Exchange Office - voiceFXS(102), -- voice Foreign Exchange Station - voiceEncap(103), -- voice encapsulation - voiceOverIp(104), -- voice over IP encapsulation - atmDxi(105), -- ATM DXI - atmFuni(106), -- ATM FUNI - atmIma (107), -- ATM IMA - pppMultilinkBundle(108), -- PPP Multilink Bundle - ipOverCdlc (109), -- IBM ipOverCdlc - ipOverClaw (110), -- IBM Common Link Access to Workstn - stackToStack (111), -- IBM stackToStack - virtualIpAddress (112), -- IBM VIPA - mpc (113), -- IBM multi-protocol channel support - ipOverAtm (114), -- IBM ipOverAtm - iso88025Fiber (115), -- ISO 802.5j Fiber Token Ring - tdlc (116), -- IBM twinaxial data link control - gigabitEthernet (117), -- Obsoleted via RFC3635 - -- ethernetCsmacd (6) should be used instead - hdlc (118), -- HDLC - lapf (119), -- LAP F - v37 (120), -- V.37 - x25mlp (121), -- Multi-Link Protocol - x25huntGroup (122), -- X25 Hunt Group - trasnpHdlc (123), -- Transp HDLC - interleave (124), -- Interleave channel - fast (125), -- Fast channel - ip (126), -- IP (for APPN HPR in IP networks) - docsCableMaclayer (127), -- CATV Mac Layer - docsCableDownstream (128), -- CATV Downstream interface - docsCableUpstream (129), -- CATV Upstream interface - a12MppSwitch (130), -- Avalon Parallel Processor - tunnel (131), -- Encapsulation interface - coffee (132), -- coffee pot - ces (133), -- Circuit Emulation Service - atmSubInterface (134), -- ATM Sub Interface - l2vlan (135), -- Layer 2 Virtual LAN using 802.1Q - l3ipvlan (136), -- Layer 3 Virtual LAN using IP - l3ipxvlan (137), -- Layer 3 Virtual LAN using IPX - digitalPowerline (138), -- IP over Power Lines - mediaMailOverIp (139), -- Multimedia Mail over IP - dtm (140), -- Dynamic syncronous Transfer Mode - dcn (141), -- Data Communications Network - ipForward (142), -- IP Forwarding Interface - msdsl (143), -- Multi-rate Symmetric DSL - ieee1394 (144), -- IEEE1394 High Performance Serial Bus - if-gsn (145), -- HIPPI-6400 - dvbRccMacLayer (146), -- DVB-RCC MAC Layer - dvbRccDownstream (147), -- DVB-RCC Downstream Channel - dvbRccUpstream (148), -- DVB-RCC Upstream Channel - atmVirtual (149), -- ATM Virtual Interface - mplsTunnel (150), -- MPLS Tunnel Virtual Interface - srp (151), -- Spatial Reuse Protocol - voiceOverAtm (152), -- Voice Over ATM - voiceOverFrameRelay (153), -- Voice Over Frame Relay - idsl (154), -- Digital Subscriber Loop over ISDN - compositeLink (155), -- Avici Composite Link Interface - ss7SigLink (156), -- SS7 Signaling Link - propWirelessP2P (157), -- Prop. P2P wireless interface - frForward (158), -- Frame Forward Interface - rfc1483 (159), -- Multiprotocol over ATM AAL5 - usb (160), -- USB Interface - ieee8023adLag (161), -- IEEE 802.3ad Link Aggregate - bgppolicyaccounting (162), -- BGP Policy Accounting - frf16MfrBundle (163), -- FRF .16 Multilink Frame Relay - h323Gatekeeper (164), -- H323 Gatekeeper - h323Proxy (165), -- H323 Voice and Video Proxy - mpls (166), -- MPLS - mfSigLink (167), -- Multi-frequency signaling link - hdsl2 (168), -- High Bit-Rate DSL - 2nd generation - shdsl (169), -- Multirate HDSL2 - ds1FDL (170), -- Facility Data Link 4Kbps on a DS1 - pos (171), -- Packet over SONET/SDH Interface - dvbAsiIn (172), -- DVB-ASI Input - dvbAsiOut (173), -- DVB-ASI Output - plc (174), -- Power Line Communtications - nfas (175), -- Non Facility Associated Signaling - tr008 (176), -- TR008 - gr303RDT (177), -- Remote Digital Terminal - gr303IDT (178), -- Integrated Digital Terminal - isup (179), -- ISUP - propDocsWirelessMaclayer (180), -- Cisco proprietary Maclayer - propDocsWirelessDownstream (181), -- Cisco proprietary Downstream - propDocsWirelessUpstream (182), -- Cisco proprietary Upstream - hiperlan2 (183), -- HIPERLAN Type 2 Radio Interface - propBWAp2Mp (184), -- PropBroadbandWirelessAccesspt2multipt - -- use of this iftype for IEEE 802.16 WMAN - -- interfaces as per IEEE Std 802.16f is - -- deprecated and ifType 237 should be used instead. - sonetOverheadChannel (185), -- SONET Overhead Channel - digitalWrapperOverheadChannel (186), -- Digital Wrapper - aal2 (187), -- ATM adaptation layer 2 - radioMAC (188), -- MAC layer over radio links - atmRadio (189), -- ATM over radio links - imt (190), -- Inter Machine Trunks - mvl (191), -- Multiple Virtual Lines DSL - reachDSL (192), -- Long Reach DSL - frDlciEndPt (193), -- Frame Relay DLCI End Point - atmVciEndPt (194), -- ATM VCI End Point - opticalChannel (195), -- Optical Channel - opticalTransport (196), -- Optical Transport - propAtm (197), -- Proprietary ATM - voiceOverCable (198), -- Voice Over Cable Interface - infiniband (199), -- Infiniband - teLink (200), -- TE Link - q2931 (201), -- Q.2931 - virtualTg (202), -- Virtual Trunk Group - sipTg (203), -- SIP Trunk Group - sipSig (204), -- SIP Signaling - docsCableUpstreamChannel (205), -- CATV Upstream Channel - econet (206), -- Acorn Econet - pon155 (207), -- FSAN 155Mb Symetrical PON interface - pon622 (208), -- FSAN622Mb Symetrical PON interface - bridge (209), -- Transparent bridge interface - linegroup (210), -- Interface common to multiple lines - voiceEMFGD (211), -- voice E&M Feature Group D - voiceFGDEANA (212), -- voice FGD Exchange Access North American - voiceDID (213), -- voice Direct Inward Dialing - mpegTransport (214), -- MPEG transport interface - sixToFour (215), -- 6to4 interface (DEPRECATED) - gtp (216), -- GTP (GPRS Tunneling Protocol) - pdnEtherLoop1 (217), -- Paradyne EtherLoop 1 - pdnEtherLoop2 (218), -- Paradyne EtherLoop 2 - opticalChannelGroup (219), -- Optical Channel Group - homepna (220), -- HomePNA ITU-T G.989 - gfp (221), -- Generic Framing Procedure (GFP) - ciscoISLvlan (222), -- Layer 2 Virtual LAN using Cisco ISL - actelisMetaLOOP (223), -- Acteleis proprietary MetaLOOP High Speed Link - fcipLink (224), -- FCIP Link - rpr (225), -- Resilient Packet Ring Interface Type - qam (226), -- RF Qam Interface - lmp (227), -- Link Management Protocol - cblVectaStar (228), -- Cambridge Broadband Networks Limited VectaStar - docsCableMCmtsDownstream (229), -- CATV Modular CMTS Downstream Interface - adsl2 (230), -- Asymmetric Digital Subscriber Loop Version 2 - -- (DEPRECATED/OBSOLETED - please use adsl2plus 238 instead) - macSecControlledIF (231), -- MACSecControlled - macSecUncontrolledIF (232), -- MACSecUncontrolled - aviciOpticalEther (233), -- Avici Optical Ethernet Aggregate - atmbond (234), -- atmbond - voiceFGDOS (235), -- voice FGD Operator Services - mocaVersion1 (236), -- MultiMedia over Coax Alliance (MoCA) Interface - -- as documented in information provided privately to IANA - ieee80216WMAN (237), -- IEEE 802.16 WMAN interface - adsl2plus (238), -- Asymmetric Digital Subscriber Loop Version 2, - -- Version 2 Plus and all variants - dvbRcsMacLayer (239), -- DVB-RCS MAC Layer - dvbTdm (240), -- DVB Satellite TDM - dvbRcsTdma (241), -- DVB-RCS TDMA - x86Laps (242), -- LAPS based on ITU-T X.86/Y.1323 - wwanPP (243), -- 3GPP WWAN - wwanPP2 (244) -- 3GPP2 WWAN - } - -IANAtunnelType ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "The encapsulation method used by a tunnel. The value - direct indicates that a packet is encapsulated - directly within a normal IP header, with no - intermediate header, and unicast to the remote tunnel - endpoint (e.g., an RFC 2003 IP-in-IP tunnel, or an RFC - 1933 IPv6-in-IPv4 tunnel). The value minimal indicates - that a Minimal Forwarding Header (RFC 2004) is - inserted between the outer header and the payload - packet. The value UDP indicates that the payload - packet is encapsulated within a normal UDP packet - (e.g., RFC 1234). - - The values sixToFour, sixOverFour, and isatap - indicates that an IPv6 packet is encapsulated directly - within an IPv4 header, with no intermediate header, - and unicast to the destination determined by the 6to4, - 6over4, or ISATAP protocol. - - The remaining protocol-specific values indicate that a - header of the protocol of that name is inserted - between the outer header and the payload header. - - The assignment policy for IANAtunnelType values is - identical to the policy for assigning IANAifType - values." - SYNTAX INTEGER { - other(1), -- none of the following - direct(2), -- no intermediate header - gre(3), -- GRE encapsulation - minimal(4), -- Minimal encapsulation - l2tp(5), -- L2TP encapsulation - pptp(6), -- PPTP encapsulation - l2f(7), -- L2F encapsulation - udp(8), -- UDP encapsulation - atmp(9), -- ATMP encapsulation - msdp(10), -- MSDP encapsulation - sixToFour(11), -- 6to4 encapsulation - sixOverFour(12), -- 6over4 encapsulation - isatap(13), -- ISATAP encapsulation - teredo(14) -- Teredo encapsulation - } - - END - - - - - - - - - diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/IF-MIB b/src/apps/snmp/LwipMibCompiler/Mibs/IF-MIB deleted file mode 100644 index 87138943..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/IF-MIB +++ /dev/null @@ -1,1899 +0,0 @@ -IF-MIB DEFINITIONS ::= BEGIN - -IMPORTS - MODULE-IDENTITY, OBJECT-TYPE, Counter32, Gauge32, Counter64, - Integer32, TimeTicks, mib-2, - NOTIFICATION-TYPE FROM SNMPv2-SMI - TEXTUAL-CONVENTION, DisplayString, - PhysAddress, TruthValue, RowStatus, - TimeStamp, AutonomousType, TestAndIncr FROM SNMPv2-TC - MODULE-COMPLIANCE, OBJECT-GROUP, - NOTIFICATION-GROUP FROM SNMPv2-CONF - snmpTraps FROM SNMPv2-MIB - IANAifType FROM IANAifType-MIB; - - -ifMIB MODULE-IDENTITY - LAST-UPDATED "200006140000Z" - ORGANIZATION "IETF Interfaces MIB Working Group" - CONTACT-INFO - " Keith McCloghrie - Cisco Systems, Inc. - 170 West Tasman Drive - San Jose, CA 95134-1706 - US - - 408-526-5260 - kzm@cisco.com" - DESCRIPTION - "The MIB module to describe generic objects for network - interface sub-layers. This MIB is an updated version of - MIB-II's ifTable, and incorporates the extensions defined in - RFC 1229." - - - REVISION "200006140000Z" - DESCRIPTION - "Clarifications agreed upon by the Interfaces MIB WG, and - published as RFC 2863." - REVISION "199602282155Z" - DESCRIPTION - "Revisions made by the Interfaces MIB WG, and published in - RFC 2233." - REVISION "199311082155Z" - DESCRIPTION - "Initial revision, published as part of RFC 1573." - ::= { mib-2 31 } - - -ifMIBObjects OBJECT IDENTIFIER ::= { ifMIB 1 } - -interfaces OBJECT IDENTIFIER ::= { mib-2 2 } - --- --- Textual Conventions --- - - --- OwnerString has the same semantics as used in RFC 1271 - -OwnerString ::= TEXTUAL-CONVENTION - DISPLAY-HINT "255a" - STATUS deprecated - DESCRIPTION - "This data type is used to model an administratively - assigned name of the owner of a resource. This information - is taken from the NVT ASCII character set. It is suggested - that this name contain one or more of the following: ASCII - form of the manager station's transport address, management - station name (e.g., domain name), network management - personnel's name, location, or phone number. In some cases - the agent itself will be the owner of an entry. In these - cases, this string shall be set to a string starting with - 'agent'." - SYNTAX OCTET STRING (SIZE(0..255)) - --- InterfaceIndex contains the semantics of ifIndex and should be used --- for any objects defined in other MIB modules that need these semantics. - -InterfaceIndex ::= TEXTUAL-CONVENTION - DISPLAY-HINT "d" - STATUS current - DESCRIPTION - - - "A unique value, greater than zero, for each interface or - interface sub-layer in the managed system. It is - recommended that values are assigned contiguously starting - from 1. The value for each interface sub-layer must remain - constant at least from one re-initialization of the entity's - network management system to the next re-initialization." - SYNTAX Integer32 (1..2147483647) - -InterfaceIndexOrZero ::= TEXTUAL-CONVENTION - DISPLAY-HINT "d" - STATUS current - DESCRIPTION - "This textual convention is an extension of the - InterfaceIndex convention. The latter defines a greater - than zero value used to identify an interface or interface - sub-layer in the managed system. This extension permits the - additional value of zero. the value zero is object-specific - and must therefore be defined as part of the description of - any object which uses this syntax. Examples of the usage of - zero might include situations where interface was unknown, - or when none or all interfaces need to be referenced." - SYNTAX Integer32 (0..2147483647) - -ifNumber OBJECT-TYPE - SYNTAX Integer32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of network interfaces (regardless of their - current state) present on this system." - ::= { interfaces 1 } - -ifTableLastChange OBJECT-TYPE - SYNTAX TimeTicks - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The value of sysUpTime at the time of the last creation or - deletion of an entry in the ifTable. If the number of - entries has been unchanged since the last re-initialization - of the local network management subsystem, then this object - contains a zero value." - ::= { ifMIBObjects 5 } - - --- the Interfaces table - --- The Interfaces table contains information on the entity's - - --- interfaces. Each sub-layer below the internetwork-layer --- of a network interface is considered to be an interface. - -ifTable OBJECT-TYPE - SYNTAX SEQUENCE OF IfEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "A list of interface entries. The number of entries is - given by the value of ifNumber." - ::= { interfaces 2 } - -ifEntry OBJECT-TYPE - SYNTAX IfEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "An entry containing management information applicable to a - particular interface." - INDEX { ifIndex } - ::= { ifTable 1 } - -IfEntry ::= - SEQUENCE { - ifIndex InterfaceIndex, - ifDescr DisplayString, - ifType IANAifType, - ifMtu Integer32, - ifSpeed Gauge32, - ifPhysAddress PhysAddress, - ifAdminStatus INTEGER, - ifOperStatus INTEGER, - ifLastChange TimeTicks, - ifInOctets Counter32, - ifInUcastPkts Counter32, - ifInNUcastPkts Counter32, -- deprecated - ifInDiscards Counter32, - ifInErrors Counter32, - ifInUnknownProtos Counter32, - ifOutOctets Counter32, - ifOutUcastPkts Counter32, - ifOutNUcastPkts Counter32, -- deprecated - ifOutDiscards Counter32, - ifOutErrors Counter32, - ifOutQLen Gauge32, -- deprecated - ifSpecific OBJECT IDENTIFIER -- deprecated - } - - - -ifIndex OBJECT-TYPE - SYNTAX InterfaceIndex - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "A unique value, greater than zero, for each interface. It - is recommended that values are assigned contiguously - starting from 1. The value for each interface sub-layer - must remain constant at least from one re-initialization of - the entity's network management system to the next re- - initialization." - ::= { ifEntry 1 } - -ifDescr OBJECT-TYPE - SYNTAX DisplayString (SIZE (0..255)) - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "A textual string containing information about the - interface. This string should include the name of the - manufacturer, the product name and the version of the - interface hardware/software." - ::= { ifEntry 2 } - -ifType OBJECT-TYPE - SYNTAX IANAifType - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The type of interface. Additional values for ifType are - assigned by the Internet Assigned Numbers Authority (IANA), - through updating the syntax of the IANAifType textual - convention." - ::= { ifEntry 3 } - -ifMtu OBJECT-TYPE - SYNTAX Integer32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The size of the largest packet which can be sent/received - on the interface, specified in octets. For interfaces that - are used for transmitting network datagrams, this is the - size of the largest network datagram that can be sent on the - interface." - ::= { ifEntry 4 } - -ifSpeed OBJECT-TYPE - - - SYNTAX Gauge32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "An estimate of the interface's current bandwidth in bits - per second. For interfaces which do not vary in bandwidth - or for those where no accurate estimation can be made, this - object should contain the nominal bandwidth. If the - bandwidth of the interface is greater than the maximum value - reportable by this object then this object should report its - maximum value (4,294,967,295) and ifHighSpeed must be used - to report the interace's speed. For a sub-layer which has - no concept of bandwidth, this object should be zero." - ::= { ifEntry 5 } - -ifPhysAddress OBJECT-TYPE - SYNTAX PhysAddress - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The interface's address at its protocol sub-layer. For - example, for an 802.x interface, this object normally - contains a MAC address. The interface's media-specific MIB - must define the bit and byte ordering and the format of the - value of this object. For interfaces which do not have such - an address (e.g., a serial line), this object should contain - an octet string of zero length." - ::= { ifEntry 6 } - -ifAdminStatus OBJECT-TYPE - SYNTAX INTEGER { - up(1), -- ready to pass packets - down(2), - testing(3) -- in some test mode - } - MAX-ACCESS read-write - STATUS current - DESCRIPTION - "The desired state of the interface. The testing(3) state - indicates that no operational packets can be passed. When a - managed system initializes, all interfaces start with - ifAdminStatus in the down(2) state. As a result of either - explicit management action or per configuration information - retained by the managed system, ifAdminStatus is then - changed to either the up(1) or testing(3) states (or remains - in the down(2) state)." - ::= { ifEntry 7 } - - - -ifOperStatus OBJECT-TYPE - SYNTAX INTEGER { - up(1), -- ready to pass packets - down(2), - testing(3), -- in some test mode - unknown(4), -- status can not be determined - -- for some reason. - dormant(5), - notPresent(6), -- some component is missing - lowerLayerDown(7) -- down due to state of - -- lower-layer interface(s) - } - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The current operational state of the interface. The - testing(3) state indicates that no operational packets can - be passed. If ifAdminStatus is down(2) then ifOperStatus - should be down(2). If ifAdminStatus is changed to up(1) - then ifOperStatus should change to up(1) if the interface is - ready to transmit and receive network traffic; it should - change to dormant(5) if the interface is waiting for - external actions (such as a serial line waiting for an - incoming connection); it should remain in the down(2) state - if and only if there is a fault that prevents it from going - to the up(1) state; it should remain in the notPresent(6) - state if the interface has missing (typically, hardware) - components." - ::= { ifEntry 8 } - -ifLastChange OBJECT-TYPE - SYNTAX TimeTicks - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The value of sysUpTime at the time the interface entered - its current operational state. If the current state was - entered prior to the last re-initialization of the local - network management subsystem, then this object contains a - zero value." - ::= { ifEntry 9 } - -ifInOctets OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of octets received on the interface, - - - including framing characters. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ifCounterDiscontinuityTime." - ::= { ifEntry 10 } - -ifInUcastPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of packets, delivered by this sub-layer to a - higher (sub-)layer, which were not addressed to a multicast - or broadcast address at this sub-layer. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ifCounterDiscontinuityTime." - ::= { ifEntry 11 } - -ifInNUcastPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of packets, delivered by this sub-layer to a - higher (sub-)layer, which were addressed to a multicast or - broadcast address at this sub-layer. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ifCounterDiscontinuityTime. - - This object is deprecated in favour of ifInMulticastPkts and - ifInBroadcastPkts." - ::= { ifEntry 12 } - -ifInDiscards OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of inbound packets which were chosen to be - discarded even though no errors had been detected to prevent - - - their being deliverable to a higher-layer protocol. One - possible reason for discarding such a packet could be to - free up buffer space. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ifCounterDiscontinuityTime." - ::= { ifEntry 13 } - -ifInErrors OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "For packet-oriented interfaces, the number of inbound - packets that contained errors preventing them from being - deliverable to a higher-layer protocol. For character- - oriented or fixed-length interfaces, the number of inbound - transmission units that contained errors preventing them - from being deliverable to a higher-layer protocol. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ifCounterDiscontinuityTime." - ::= { ifEntry 14 } - -ifInUnknownProtos OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "For packet-oriented interfaces, the number of packets - received via the interface which were discarded because of - an unknown or unsupported protocol. For character-oriented - or fixed-length interfaces that support protocol - multiplexing the number of transmission units received via - the interface which were discarded because of an unknown or - unsupported protocol. For any interface that does not - support protocol multiplexing, this counter will always be - 0. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ifCounterDiscontinuityTime." - ::= { ifEntry 15 } - - -ifOutOctets OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of octets transmitted out of the - interface, including framing characters. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ifCounterDiscontinuityTime." - ::= { ifEntry 16 } - -ifOutUcastPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of packets that higher-level protocols - requested be transmitted, and which were not addressed to a - multicast or broadcast address at this sub-layer, including - those that were discarded or not sent. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ifCounterDiscontinuityTime." - ::= { ifEntry 17 } - -ifOutNUcastPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The total number of packets that higher-level protocols - requested be transmitted, and which were addressed to a - multicast or broadcast address at this sub-layer, including - those that were discarded or not sent. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ifCounterDiscontinuityTime. - - This object is deprecated in favour of ifOutMulticastPkts - and ifOutBroadcastPkts." - ::= { ifEntry 18 } - - -ifOutDiscards OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of outbound packets which were chosen to be - discarded even though no errors had been detected to prevent - their being transmitted. One possible reason for discarding - such a packet could be to free up buffer space. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ifCounterDiscontinuityTime." - ::= { ifEntry 19 } - -ifOutErrors OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "For packet-oriented interfaces, the number of outbound - packets that could not be transmitted because of errors. - For character-oriented or fixed-length interfaces, the - number of outbound transmission units that could not be - transmitted because of errors. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ifCounterDiscontinuityTime." - ::= { ifEntry 20 } - -ifOutQLen OBJECT-TYPE - SYNTAX Gauge32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The length of the output packet queue (in packets)." - ::= { ifEntry 21 } - -ifSpecific OBJECT-TYPE - SYNTAX OBJECT IDENTIFIER - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "A reference to MIB definitions specific to the particular - media being used to realize the interface. It is - - - recommended that this value point to an instance of a MIB - object in the media-specific MIB, i.e., that this object - have the semantics associated with the InstancePointer - textual convention defined in RFC 2579. In fact, it is - recommended that the media-specific MIB specify what value - ifSpecific should/can take for values of ifType. If no MIB - definitions specific to the particular media are available, - the value should be set to the OBJECT IDENTIFIER { 0 0 }." - ::= { ifEntry 22 } - - - --- --- Extension to the interface table --- --- This table replaces the ifExtnsTable table. --- - -ifXTable OBJECT-TYPE - SYNTAX SEQUENCE OF IfXEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "A list of interface entries. The number of entries is - given by the value of ifNumber. This table contains - additional objects for the interface table." - ::= { ifMIBObjects 1 } - -ifXEntry OBJECT-TYPE - SYNTAX IfXEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "An entry containing additional management information - applicable to a particular interface." - AUGMENTS { ifEntry } - ::= { ifXTable 1 } - -IfXEntry ::= - SEQUENCE { - ifName DisplayString, - ifInMulticastPkts Counter32, - ifInBroadcastPkts Counter32, - ifOutMulticastPkts Counter32, - ifOutBroadcastPkts Counter32, - ifHCInOctets Counter64, - ifHCInUcastPkts Counter64, - ifHCInMulticastPkts Counter64, - - - ifHCInBroadcastPkts Counter64, - ifHCOutOctets Counter64, - ifHCOutUcastPkts Counter64, - ifHCOutMulticastPkts Counter64, - ifHCOutBroadcastPkts Counter64, - ifLinkUpDownTrapEnable INTEGER, - ifHighSpeed Gauge32, - ifPromiscuousMode TruthValue, - ifConnectorPresent TruthValue, - ifAlias DisplayString, - ifCounterDiscontinuityTime TimeStamp - } - - -ifName OBJECT-TYPE - SYNTAX DisplayString - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The textual name of the interface. The value of this - object should be the name of the interface as assigned by - the local device and should be suitable for use in commands - entered at the device's `console'. This might be a text - name, such as `le0' or a simple port number, such as `1', - depending on the interface naming syntax of the device. If - several entries in the ifTable together represent a single - interface as named by the device, then each will have the - same value of ifName. Note that for an agent which responds - to SNMP queries concerning an interface on some other - (proxied) device, then the value of ifName for such an - interface is the proxied device's local name for it. - - If there is no local name, or this object is otherwise not - applicable, then this object contains a zero-length string." - ::= { ifXEntry 1 } - -ifInMulticastPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of packets, delivered by this sub-layer to a - higher (sub-)layer, which were addressed to a multicast - address at this sub-layer. For a MAC layer protocol, this - includes both Group and Functional addresses. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - - - times as indicated by the value of - ifCounterDiscontinuityTime." - ::= { ifXEntry 2 } - -ifInBroadcastPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of packets, delivered by this sub-layer to a - higher (sub-)layer, which were addressed to a broadcast - address at this sub-layer. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ifCounterDiscontinuityTime." - ::= { ifXEntry 3 } - -ifOutMulticastPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of packets that higher-level protocols - requested be transmitted, and which were addressed to a - multicast address at this sub-layer, including those that - were discarded or not sent. For a MAC layer protocol, this - includes both Group and Functional addresses. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ifCounterDiscontinuityTime." - ::= { ifXEntry 4 } - -ifOutBroadcastPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of packets that higher-level protocols - requested be transmitted, and which were addressed to a - broadcast address at this sub-layer, including those that - were discarded or not sent. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - - - times as indicated by the value of - ifCounterDiscontinuityTime." - ::= { ifXEntry 5 } - --- --- High Capacity Counter objects. These objects are all --- 64 bit versions of the "basic" ifTable counters. These --- objects all have the same basic semantics as their 32-bit --- counterparts, however, their syntax has been extended --- to 64 bits. --- - -ifHCInOctets OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of octets received on the interface, - including framing characters. This object is a 64-bit - version of ifInOctets. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ifCounterDiscontinuityTime." - ::= { ifXEntry 6 } - -ifHCInUcastPkts OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of packets, delivered by this sub-layer to a - higher (sub-)layer, which were not addressed to a multicast - or broadcast address at this sub-layer. This object is a - 64-bit version of ifInUcastPkts. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ifCounterDiscontinuityTime." - ::= { ifXEntry 7 } - -ifHCInMulticastPkts OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - - - "The number of packets, delivered by this sub-layer to a - higher (sub-)layer, which were addressed to a multicast - address at this sub-layer. For a MAC layer protocol, this - includes both Group and Functional addresses. This object - is a 64-bit version of ifInMulticastPkts. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ifCounterDiscontinuityTime." - ::= { ifXEntry 8 } - -ifHCInBroadcastPkts OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of packets, delivered by this sub-layer to a - higher (sub-)layer, which were addressed to a broadcast - address at this sub-layer. This object is a 64-bit version - of ifInBroadcastPkts. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ifCounterDiscontinuityTime." - ::= { ifXEntry 9 } - -ifHCOutOctets OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of octets transmitted out of the - interface, including framing characters. This object is a - 64-bit version of ifOutOctets. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ifCounterDiscontinuityTime." - ::= { ifXEntry 10 } - -ifHCOutUcastPkts OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - - - "The total number of packets that higher-level protocols - requested be transmitted, and which were not addressed to a - multicast or broadcast address at this sub-layer, including - those that were discarded or not sent. This object is a - 64-bit version of ifOutUcastPkts. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ifCounterDiscontinuityTime." - ::= { ifXEntry 11 } - -ifHCOutMulticastPkts OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of packets that higher-level protocols - requested be transmitted, and which were addressed to a - multicast address at this sub-layer, including those that - were discarded or not sent. For a MAC layer protocol, this - includes both Group and Functional addresses. This object - is a 64-bit version of ifOutMulticastPkts. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ifCounterDiscontinuityTime." - ::= { ifXEntry 12 } - -ifHCOutBroadcastPkts OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of packets that higher-level protocols - requested be transmitted, and which were addressed to a - broadcast address at this sub-layer, including those that - were discarded or not sent. This object is a 64-bit version - of ifOutBroadcastPkts. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ifCounterDiscontinuityTime." - ::= { ifXEntry 13 } - -ifLinkUpDownTrapEnable OBJECT-TYPE - - - SYNTAX INTEGER { enabled(1), disabled(2) } - MAX-ACCESS read-write - STATUS current - DESCRIPTION - "Indicates whether linkUp/linkDown traps should be generated - for this interface. - - By default, this object should have the value enabled(1) for - interfaces which do not operate on 'top' of any other - interface (as defined in the ifStackTable), and disabled(2) - otherwise." - ::= { ifXEntry 14 } - -ifHighSpeed OBJECT-TYPE - SYNTAX Gauge32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "An estimate of the interface's current bandwidth in units - of 1,000,000 bits per second. If this object reports a - value of `n' then the speed of the interface is somewhere in - the range of `n-500,000' to `n+499,999'. For interfaces - which do not vary in bandwidth or for those where no - accurate estimation can be made, this object should contain - the nominal bandwidth. For a sub-layer which has no concept - of bandwidth, this object should be zero." - ::= { ifXEntry 15 } - -ifPromiscuousMode OBJECT-TYPE - SYNTAX TruthValue - MAX-ACCESS read-write - STATUS current - DESCRIPTION - "This object has a value of false(2) if this interface only - accepts packets/frames that are addressed to this station. - This object has a value of true(1) when the station accepts - all packets/frames transmitted on the media. The value - true(1) is only legal on certain types of media. If legal, - setting this object to a value of true(1) may require the - interface to be reset before becoming effective. - - The value of ifPromiscuousMode does not affect the reception - of broadcast and multicast packets/frames by the interface." - ::= { ifXEntry 16 } - -ifConnectorPresent OBJECT-TYPE - SYNTAX TruthValue - MAX-ACCESS read-only - - - STATUS current - DESCRIPTION - "This object has the value 'true(1)' if the interface - sublayer has a physical connector and the value 'false(2)' - otherwise." - ::= { ifXEntry 17 } - -ifAlias OBJECT-TYPE - SYNTAX DisplayString (SIZE(0..64)) - MAX-ACCESS read-write - STATUS current - DESCRIPTION - "This object is an 'alias' name for the interface as - specified by a network manager, and provides a non-volatile - 'handle' for the interface. - - On the first instantiation of an interface, the value of - ifAlias associated with that interface is the zero-length - string. As and when a value is written into an instance of - ifAlias through a network management set operation, then the - agent must retain the supplied value in the ifAlias instance - associated with the same interface for as long as that - interface remains instantiated, including across all re- - initializations/reboots of the network management system, - including those which result in a change of the interface's - ifIndex value. - - An example of the value which a network manager might store - in this object for a WAN interface is the (Telco's) circuit - number/identifier of the interface. - - Some agents may support write-access only for interfaces - having particular values of ifType. An agent which supports - write access to this object is required to keep the value in - non-volatile storage, but it may limit the length of new - values depending on how much storage is already occupied by - the current values for other interfaces." - ::= { ifXEntry 18 } - -ifCounterDiscontinuityTime OBJECT-TYPE - SYNTAX TimeStamp - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The value of sysUpTime on the most recent occasion at which - any one or more of this interface's counters suffered a - discontinuity. The relevant counters are the specific - instances associated with this interface of any Counter32 or - - - Counter64 object contained in the ifTable or ifXTable. If - no such discontinuities have occurred since the last re- - initialization of the local management subsystem, then this - object contains a zero value." - ::= { ifXEntry 19 } - --- The Interface Stack Group --- --- Implementation of this group is optional, but strongly recommended --- for all systems --- - -ifStackTable OBJECT-TYPE - SYNTAX SEQUENCE OF IfStackEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The table containing information on the relationships - between the multiple sub-layers of network interfaces. In - particular, it contains information on which sub-layers run - 'on top of' which other sub-layers, where each sub-layer - corresponds to a conceptual row in the ifTable. For - example, when the sub-layer with ifIndex value x runs over - the sub-layer with ifIndex value y, then this table - contains: - - ifStackStatus.x.y=active - - For each ifIndex value, I, which identifies an active - interface, there are always at least two instantiated rows - in this table associated with I. For one of these rows, I - is the value of ifStackHigherLayer; for the other, I is the - value of ifStackLowerLayer. (If I is not involved in - multiplexing, then these are the only two rows associated - with I.) - - For example, two rows exist even for an interface which has - no others stacked on top or below it: - - ifStackStatus.0.x=active - ifStackStatus.x.0=active " - ::= { ifMIBObjects 2 } - - -ifStackEntry OBJECT-TYPE - SYNTAX IfStackEntry - MAX-ACCESS not-accessible - STATUS current - - - DESCRIPTION - "Information on a particular relationship between two sub- - layers, specifying that one sub-layer runs on 'top' of the - other sub-layer. Each sub-layer corresponds to a conceptual - row in the ifTable." - INDEX { ifStackHigherLayer, ifStackLowerLayer } - ::= { ifStackTable 1 } - - -IfStackEntry ::= - SEQUENCE { - ifStackHigherLayer InterfaceIndexOrZero, - ifStackLowerLayer InterfaceIndexOrZero, - ifStackStatus RowStatus - } - - -ifStackHigherLayer OBJECT-TYPE - SYNTAX InterfaceIndexOrZero - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The value of ifIndex corresponding to the higher sub-layer - of the relationship, i.e., the sub-layer which runs on 'top' - of the sub-layer identified by the corresponding instance of - ifStackLowerLayer. If there is no higher sub-layer (below - the internetwork layer), then this object has the value 0." - ::= { ifStackEntry 1 } - - -ifStackLowerLayer OBJECT-TYPE - SYNTAX InterfaceIndexOrZero - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The value of ifIndex corresponding to the lower sub-layer - of the relationship, i.e., the sub-layer which runs 'below' - the sub-layer identified by the corresponding instance of - ifStackHigherLayer. If there is no lower sub-layer, then - this object has the value 0." - ::= { ifStackEntry 2 } - - -ifStackStatus OBJECT-TYPE - SYNTAX RowStatus - MAX-ACCESS read-create - STATUS current - DESCRIPTION - - - "The status of the relationship between two sub-layers. - - Changing the value of this object from 'active' to - 'notInService' or 'destroy' will likely have consequences up - and down the interface stack. Thus, write access to this - object is likely to be inappropriate for some types of - interfaces, and many implementations will choose not to - support write-access for any type of interface." - ::= { ifStackEntry 3 } - -ifStackLastChange OBJECT-TYPE - SYNTAX TimeTicks - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The value of sysUpTime at the time of the last change of - the (whole) interface stack. A change of the interface - stack is defined to be any creation, deletion, or change in - value of any instance of ifStackStatus. If the interface - stack has been unchanged since the last re-initialization of - the local network management subsystem, then this object - contains a zero value." - ::= { ifMIBObjects 6 } - - --- Generic Receive Address Table --- --- This group of objects is mandatory for all types of --- interfaces which can receive packets/frames addressed to --- more than one address. --- --- This table replaces the ifExtnsRcvAddr table. The main --- difference is that this table makes use of the RowStatus --- textual convention, while ifExtnsRcvAddr did not. - -ifRcvAddressTable OBJECT-TYPE - SYNTAX SEQUENCE OF IfRcvAddressEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "This table contains an entry for each address (broadcast, - multicast, or uni-cast) for which the system will receive - packets/frames on a particular interface, except as follows: - - - for an interface operating in promiscuous mode, entries - are only required for those addresses for which the system - would receive frames were it not operating in promiscuous - mode. - - - - for 802.5 functional addresses, only one entry is - required, for the address which has the functional address - bit ANDed with the bit mask of all functional addresses for - which the interface will accept frames. - - A system is normally able to use any unicast address which - corresponds to an entry in this table as a source address." - ::= { ifMIBObjects 4 } - -ifRcvAddressEntry OBJECT-TYPE - SYNTAX IfRcvAddressEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "A list of objects identifying an address for which the - system will accept packets/frames on the particular - interface identified by the index value ifIndex." - INDEX { ifIndex, ifRcvAddressAddress } - ::= { ifRcvAddressTable 1 } - -IfRcvAddressEntry ::= - SEQUENCE { - ifRcvAddressAddress PhysAddress, - ifRcvAddressStatus RowStatus, - ifRcvAddressType INTEGER - } - -ifRcvAddressAddress OBJECT-TYPE - SYNTAX PhysAddress - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "An address for which the system will accept packets/frames - on this entry's interface." - ::= { ifRcvAddressEntry 1 } - -ifRcvAddressStatus OBJECT-TYPE - SYNTAX RowStatus - MAX-ACCESS read-create - STATUS current - DESCRIPTION - "This object is used to create and delete rows in the - ifRcvAddressTable." - - ::= { ifRcvAddressEntry 2 } - -ifRcvAddressType OBJECT-TYPE - SYNTAX INTEGER { - - - other(1), - volatile(2), - nonVolatile(3) - } - - MAX-ACCESS read-create - STATUS current - DESCRIPTION - "This object has the value nonVolatile(3) for those entries - in the table which are valid and will not be deleted by the - next restart of the managed system. Entries having the - value volatile(2) are valid and exist, but have not been - saved, so that will not exist after the next restart of the - managed system. Entries having the value other(1) are valid - and exist but are not classified as to whether they will - continue to exist after the next restart." - - DEFVAL { volatile } - ::= { ifRcvAddressEntry 3 } - --- definition of interface-related traps. - -linkDown NOTIFICATION-TYPE - OBJECTS { ifIndex, ifAdminStatus, ifOperStatus } - STATUS current - DESCRIPTION - "A linkDown trap signifies that the SNMP entity, acting in - an agent role, has detected that the ifOperStatus object for - one of its communication links is about to enter the down - state from some other state (but not from the notPresent - state). This other state is indicated by the included value - of ifOperStatus." - ::= { snmpTraps 3 } - -linkUp NOTIFICATION-TYPE - OBJECTS { ifIndex, ifAdminStatus, ifOperStatus } - STATUS current - DESCRIPTION - "A linkUp trap signifies that the SNMP entity, acting in an - agent role, has detected that the ifOperStatus object for - one of its communication links left the down state and - transitioned into some other state (but not into the - notPresent state). This other state is indicated by the - included value of ifOperStatus." - ::= { snmpTraps 4 } - --- conformance information - - - -ifConformance OBJECT IDENTIFIER ::= { ifMIB 2 } - -ifGroups OBJECT IDENTIFIER ::= { ifConformance 1 } -ifCompliances OBJECT IDENTIFIER ::= { ifConformance 2 } - - --- compliance statements - -ifCompliance3 MODULE-COMPLIANCE - STATUS current - DESCRIPTION - "The compliance statement for SNMP entities which have - network interfaces." - - MODULE -- this module - MANDATORY-GROUPS { ifGeneralInformationGroup, - linkUpDownNotificationsGroup } - --- The groups: --- ifFixedLengthGroup --- ifHCFixedLengthGroup --- ifPacketGroup --- ifHCPacketGroup --- ifVHCPacketGroup --- are mutually exclusive; at most one of these groups is implemented --- for a particular interface. When any of these groups is implemented --- for a particular interface, then ifCounterDiscontinuityGroup must --- also be implemented for that interface. - - - GROUP ifFixedLengthGroup - DESCRIPTION - "This group is mandatory for those network interfaces which - are character-oriented or transmit data in fixed-length - transmission units, and for which the value of the - corresponding instance of ifSpeed is less than or equal to - 20,000,000 bits/second." - - GROUP ifHCFixedLengthGroup - DESCRIPTION - "This group is mandatory for those network interfaces which - are character-oriented or transmit data in fixed-length - transmission units, and for which the value of the - corresponding instance of ifSpeed is greater than 20,000,000 - bits/second." - - GROUP ifPacketGroup - DESCRIPTION - - - "This group is mandatory for those network interfaces which - are packet-oriented, and for which the value of the - corresponding instance of ifSpeed is less than or equal to - 20,000,000 bits/second." - - GROUP ifHCPacketGroup - DESCRIPTION - "This group is mandatory only for those network interfaces - which are packet-oriented and for which the value of the - corresponding instance of ifSpeed is greater than 20,000,000 - bits/second but less than or equal to 650,000,000 - bits/second." - - GROUP ifVHCPacketGroup - DESCRIPTION - "This group is mandatory only for those network interfaces - which are packet-oriented and for which the value of the - corresponding instance of ifSpeed is greater than - 650,000,000 bits/second." - - - GROUP ifCounterDiscontinuityGroup - DESCRIPTION - "This group is mandatory for those network interfaces that - are required to maintain counters (i.e., those for which one - of the ifFixedLengthGroup, ifHCFixedLengthGroup, - ifPacketGroup, ifHCPacketGroup, or ifVHCPacketGroup is - mandatory)." - - - GROUP ifRcvAddressGroup - DESCRIPTION - "The applicability of this group MUST be defined by the - media-specific MIBs. Media-specific MIBs must define the - exact meaning, use, and semantics of the addresses in this - group." - - OBJECT ifLinkUpDownTrapEnable - MIN-ACCESS read-only - DESCRIPTION - "Write access is not required." - - OBJECT ifPromiscuousMode - MIN-ACCESS read-only - DESCRIPTION - "Write access is not required." - - OBJECT ifAdminStatus - - - SYNTAX INTEGER { up(1), down(2) } - MIN-ACCESS read-only - DESCRIPTION - "Write access is not required, nor is support for the value - testing(3)." - - OBJECT ifAlias - MIN-ACCESS read-only - DESCRIPTION - "Write access is not required." - - ::= { ifCompliances 3 } - --- units of conformance - -ifGeneralInformationGroup OBJECT-GROUP - OBJECTS { ifIndex, ifDescr, ifType, ifSpeed, ifPhysAddress, - ifAdminStatus, ifOperStatus, ifLastChange, - ifLinkUpDownTrapEnable, ifConnectorPresent, - ifHighSpeed, ifName, ifNumber, ifAlias, - ifTableLastChange } - STATUS current - DESCRIPTION - "A collection of objects providing information applicable to - all network interfaces." - ::= { ifGroups 10 } - --- the following five groups are mutually exclusive; at most --- one of these groups is implemented for any interface - -ifFixedLengthGroup OBJECT-GROUP - OBJECTS { ifInOctets, ifOutOctets, ifInUnknownProtos, - ifInErrors, ifOutErrors } - STATUS current - DESCRIPTION - "A collection of objects providing information specific to - non-high speed (non-high speed interfaces transmit and - receive at speeds less than or equal to 20,000,000 - bits/second) character-oriented or fixed-length-transmission - network interfaces." - ::= { ifGroups 2 } - -ifHCFixedLengthGroup OBJECT-GROUP - OBJECTS { ifHCInOctets, ifHCOutOctets, - ifInOctets, ifOutOctets, ifInUnknownProtos, - ifInErrors, ifOutErrors } - STATUS current - DESCRIPTION - - - "A collection of objects providing information specific to - high speed (greater than 20,000,000 bits/second) character- - oriented or fixed-length-transmission network interfaces." - ::= { ifGroups 3 } - -ifPacketGroup OBJECT-GROUP - OBJECTS { ifInOctets, ifOutOctets, ifInUnknownProtos, - ifInErrors, ifOutErrors, - ifMtu, ifInUcastPkts, ifInMulticastPkts, - ifInBroadcastPkts, ifInDiscards, - ifOutUcastPkts, ifOutMulticastPkts, - ifOutBroadcastPkts, ifOutDiscards, - ifPromiscuousMode } - STATUS current - DESCRIPTION - "A collection of objects providing information specific to - non-high speed (non-high speed interfaces transmit and - receive at speeds less than or equal to 20,000,000 - bits/second) packet-oriented network interfaces." - ::= { ifGroups 4 } - -ifHCPacketGroup OBJECT-GROUP - OBJECTS { ifHCInOctets, ifHCOutOctets, - ifInOctets, ifOutOctets, ifInUnknownProtos, - ifInErrors, ifOutErrors, - ifMtu, ifInUcastPkts, ifInMulticastPkts, - ifInBroadcastPkts, ifInDiscards, - ifOutUcastPkts, ifOutMulticastPkts, - ifOutBroadcastPkts, ifOutDiscards, - ifPromiscuousMode } - STATUS current - DESCRIPTION - "A collection of objects providing information specific to - high speed (greater than 20,000,000 bits/second but less - than or equal to 650,000,000 bits/second) packet-oriented - network interfaces." - ::= { ifGroups 5 } - -ifVHCPacketGroup OBJECT-GROUP - OBJECTS { ifHCInUcastPkts, ifHCInMulticastPkts, - ifHCInBroadcastPkts, ifHCOutUcastPkts, - ifHCOutMulticastPkts, ifHCOutBroadcastPkts, - ifHCInOctets, ifHCOutOctets, - ifInOctets, ifOutOctets, ifInUnknownProtos, - ifInErrors, ifOutErrors, - ifMtu, ifInUcastPkts, ifInMulticastPkts, - ifInBroadcastPkts, ifInDiscards, - ifOutUcastPkts, ifOutMulticastPkts, - - - ifOutBroadcastPkts, ifOutDiscards, - ifPromiscuousMode } - STATUS current - DESCRIPTION - "A collection of objects providing information specific to - higher speed (greater than 650,000,000 bits/second) packet- - oriented network interfaces." - ::= { ifGroups 6 } - -ifRcvAddressGroup OBJECT-GROUP - OBJECTS { ifRcvAddressStatus, ifRcvAddressType } - STATUS current - DESCRIPTION - "A collection of objects providing information on the - multiple addresses which an interface receives." - ::= { ifGroups 7 } - -ifStackGroup2 OBJECT-GROUP - OBJECTS { ifStackStatus, ifStackLastChange } - STATUS current - DESCRIPTION - "A collection of objects providing information on the - layering of MIB-II interfaces." - ::= { ifGroups 11 } - -ifCounterDiscontinuityGroup OBJECT-GROUP - OBJECTS { ifCounterDiscontinuityTime } - STATUS current - DESCRIPTION - "A collection of objects providing information specific to - interface counter discontinuities." - ::= { ifGroups 13 } - -linkUpDownNotificationsGroup NOTIFICATION-GROUP - NOTIFICATIONS { linkUp, linkDown } - STATUS current - DESCRIPTION - "The notifications which indicate specific changes in the - value of ifOperStatus." - ::= { ifGroups 14 } - --- Deprecated Definitions - Objects - - --- --- The Interface Test Table --- --- This group of objects is optional. However, a media-specific - - --- MIB may make implementation of this group mandatory. --- --- This table replaces the ifExtnsTestTable --- - -ifTestTable OBJECT-TYPE - SYNTAX SEQUENCE OF IfTestEntry - MAX-ACCESS not-accessible - STATUS deprecated - DESCRIPTION - "This table contains one entry per interface. It defines - objects which allow a network manager to instruct an agent - to test an interface for various faults. Tests for an - interface are defined in the media-specific MIB for that - interface. After invoking a test, the object ifTestResult - can be read to determine the outcome. If an agent can not - perform the test, ifTestResult is set to so indicate. The - object ifTestCode can be used to provide further test- - specific or interface-specific (or even enterprise-specific) - information concerning the outcome of the test. Only one - test can be in progress on each interface at any one time. - If one test is in progress when another test is invoked, the - second test is rejected. Some agents may reject a test when - a prior test is active on another interface. - - Before starting a test, a manager-station must first obtain - 'ownership' of the entry in the ifTestTable for the - interface to be tested. This is accomplished with the - ifTestId and ifTestStatus objects as follows: - - try_again: - get (ifTestId, ifTestStatus) - while (ifTestStatus != notInUse) - /* - * Loop while a test is running or some other - * manager is configuring a test. - */ - short delay - get (ifTestId, ifTestStatus) - } - - /* - * Is not being used right now -- let's compete - * to see who gets it. - */ - lock_value = ifTestId - - if ( set(ifTestId = lock_value, ifTestStatus = inUse, - - - ifTestOwner = 'my-IP-address') == FAILURE) - /* - * Another manager got the ifTestEntry -- go - * try again - */ - goto try_again; - - /* - * I have the lock - */ - set up any test parameters. - - /* - * This starts the test - */ - set(ifTestType = test_to_run); - - wait for test completion by polling ifTestResult - - when test completes, agent sets ifTestResult - agent also sets ifTestStatus = 'notInUse' - - retrieve any additional test results, and ifTestId - - if (ifTestId == lock_value+1) results are valid - - A manager station first retrieves the value of the - appropriate ifTestId and ifTestStatus objects, periodically - repeating the retrieval if necessary, until the value of - ifTestStatus is 'notInUse'. The manager station then tries - to set the same ifTestId object to the value it just - retrieved, the same ifTestStatus object to 'inUse', and the - corresponding ifTestOwner object to a value indicating - itself. If the set operation succeeds then the manager has - obtained ownership of the ifTestEntry, and the value of the - ifTestId object is incremented by the agent (per the - semantics of TestAndIncr). Failure of the set operation - indicates that some other manager has obtained ownership of - the ifTestEntry. - - Once ownership is obtained, any test parameters can be - setup, and then the test is initiated by setting ifTestType. - On completion of the test, the agent sets ifTestStatus to - 'notInUse'. Once this occurs, the manager can retrieve the - results. In the (rare) event that the invocation of tests - by two network managers were to overlap, then there would be - a possibility that the first test's results might be - overwritten by the second test's results prior to the first - - - results being read. This unlikely circumstance can be - detected by a network manager retrieving ifTestId at the - same time as retrieving the test results, and ensuring that - the results are for the desired request. - - If ifTestType is not set within an abnormally long period of - time after ownership is obtained, the agent should time-out - the manager, and reset the value of the ifTestStatus object - back to 'notInUse'. It is suggested that this time-out - period be 5 minutes. - - In general, a management station must not retransmit a - request to invoke a test for which it does not receive a - response; instead, it properly inspects an agent's MIB to - determine if the invocation was successful. Only if the - invocation was unsuccessful, is the invocation request - retransmitted. - - Some tests may require the interface to be taken off-line in - order to execute them, or may even require the agent to - reboot after completion of the test. In these - circumstances, communication with the management station - invoking the test may be lost until after completion of the - test. An agent is not required to support such tests. - However, if such tests are supported, then the agent should - make every effort to transmit a response to the request - which invoked the test prior to losing communication. When - the agent is restored to normal service, the results of the - test are properly made available in the appropriate objects. - Note that this requires that the ifIndex value assigned to - an interface must be unchanged even if the test causes a - reboot. An agent must reject any test for which it cannot, - perhaps due to resource constraints, make available at least - the minimum amount of information after that test - completes." - ::= { ifMIBObjects 3 } - -ifTestEntry OBJECT-TYPE - SYNTAX IfTestEntry - MAX-ACCESS not-accessible - STATUS deprecated - DESCRIPTION - "An entry containing objects for invoking tests on an - interface." - AUGMENTS { ifEntry } - ::= { ifTestTable 1 } - -IfTestEntry ::= - - - SEQUENCE { - ifTestId TestAndIncr, - ifTestStatus INTEGER, - ifTestType AutonomousType, - ifTestResult INTEGER, - ifTestCode OBJECT IDENTIFIER, - ifTestOwner OwnerString - } - -ifTestId OBJECT-TYPE - SYNTAX TestAndIncr - MAX-ACCESS read-write - STATUS deprecated - DESCRIPTION - "This object identifies the current invocation of the - interface's test." - ::= { ifTestEntry 1 } - -ifTestStatus OBJECT-TYPE - SYNTAX INTEGER { notInUse(1), inUse(2) } - MAX-ACCESS read-write - STATUS deprecated - DESCRIPTION - "This object indicates whether or not some manager currently - has the necessary 'ownership' required to invoke a test on - this interface. A write to this object is only successful - when it changes its value from 'notInUse(1)' to 'inUse(2)'. - After completion of a test, the agent resets the value back - to 'notInUse(1)'." - ::= { ifTestEntry 2 } - -ifTestType OBJECT-TYPE - SYNTAX AutonomousType - MAX-ACCESS read-write - STATUS deprecated - DESCRIPTION - "A control variable used to start and stop operator- - initiated interface tests. Most OBJECT IDENTIFIER values - assigned to tests are defined elsewhere, in association with - specific types of interface. However, this document assigns - a value for a full-duplex loopback test, and defines the - special meanings of the subject identifier: - - noTest OBJECT IDENTIFIER ::= { 0 0 } - - When the value noTest is written to this object, no action - is taken unless a test is in progress, in which case the - test is aborted. Writing any other value to this object is - - - only valid when no test is currently in progress, in which - case the indicated test is initiated. - - When read, this object always returns the most recent value - that ifTestType was set to. If it has not been set since - the last initialization of the network management subsystem - on the agent, a value of noTest is returned." - ::= { ifTestEntry 3 } - -ifTestResult OBJECT-TYPE - SYNTAX INTEGER { - none(1), -- no test yet requested - success(2), - inProgress(3), - notSupported(4), - unAbleToRun(5), -- due to state of system - aborted(6), - failed(7) - } - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "This object contains the result of the most recently - requested test, or the value none(1) if no tests have been - requested since the last reset. Note that this facility - provides no provision for saving the results of one test - when starting another, as could be required if used by - multiple managers concurrently." - ::= { ifTestEntry 4 } - -ifTestCode OBJECT-TYPE - SYNTAX OBJECT IDENTIFIER - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "This object contains a code which contains more specific - information on the test result, for example an error-code - after a failed test. Error codes and other values this - object may take are specific to the type of interface and/or - test. The value may have the semantics of either the - AutonomousType or InstancePointer textual conventions as - defined in RFC 2579. The identifier: - - testCodeUnknown OBJECT IDENTIFIER ::= { 0 0 } - - is defined for use if no additional result code is - available." - ::= { ifTestEntry 5 } - - -ifTestOwner OBJECT-TYPE - SYNTAX OwnerString - MAX-ACCESS read-write - STATUS deprecated - DESCRIPTION - "The entity which currently has the 'ownership' required to - invoke a test on this interface." - ::= { ifTestEntry 6 } - --- Deprecated Definitions - Groups - - -ifGeneralGroup OBJECT-GROUP - OBJECTS { ifDescr, ifType, ifSpeed, ifPhysAddress, - ifAdminStatus, ifOperStatus, ifLastChange, - ifLinkUpDownTrapEnable, ifConnectorPresent, - ifHighSpeed, ifName } - STATUS deprecated - DESCRIPTION - "A collection of objects deprecated in favour of - ifGeneralInformationGroup." - ::= { ifGroups 1 } - - -ifTestGroup OBJECT-GROUP - OBJECTS { ifTestId, ifTestStatus, ifTestType, - ifTestResult, ifTestCode, ifTestOwner } - STATUS deprecated - DESCRIPTION - "A collection of objects providing the ability to invoke - tests on an interface." - ::= { ifGroups 8 } - - -ifStackGroup OBJECT-GROUP - OBJECTS { ifStackStatus } - STATUS deprecated - DESCRIPTION - "The previous collection of objects providing information on - the layering of MIB-II interfaces." - ::= { ifGroups 9 } - - -ifOldObjectsGroup OBJECT-GROUP - OBJECTS { ifInNUcastPkts, ifOutNUcastPkts, - ifOutQLen, ifSpecific } - STATUS deprecated - DESCRIPTION - - - "The collection of objects deprecated from the original MIB- - II interfaces group." - ::= { ifGroups 12 } - --- Deprecated Definitions - Compliance - -ifCompliance MODULE-COMPLIANCE - STATUS deprecated - DESCRIPTION - "A compliance statement defined in a previous version of - this MIB module, for SNMP entities which have network - interfaces." - - MODULE -- this module - MANDATORY-GROUPS { ifGeneralGroup, ifStackGroup } - - GROUP ifFixedLengthGroup - DESCRIPTION - "This group is mandatory for all network interfaces which - are character-oriented or transmit data in fixed-length - transmission units." - - GROUP ifHCFixedLengthGroup - DESCRIPTION - "This group is mandatory only for those network interfaces - which are character-oriented or transmit data in fixed- - length transmission units, and for which the value of the - corresponding instance of ifSpeed is greater than 20,000,000 - bits/second." - - GROUP ifPacketGroup - DESCRIPTION - "This group is mandatory for all network interfaces which - are packet-oriented." - - GROUP ifHCPacketGroup - DESCRIPTION - "This group is mandatory only for those network interfaces - which are packet-oriented and for which the value of the - corresponding instance of ifSpeed is greater than - 650,000,000 bits/second." - - GROUP ifTestGroup - DESCRIPTION - "This group is optional. Media-specific MIBs which require - interface tests are strongly encouraged to use this group - for invoking tests and reporting results. A medium specific - MIB which has mandatory tests may make implementation of - - - this group mandatory." - - GROUP ifRcvAddressGroup - DESCRIPTION - "The applicability of this group MUST be defined by the - media-specific MIBs. Media-specific MIBs must define the - exact meaning, use, and semantics of the addresses in this - group." - - OBJECT ifLinkUpDownTrapEnable - MIN-ACCESS read-only - DESCRIPTION - "Write access is not required." - - OBJECT ifPromiscuousMode - MIN-ACCESS read-only - DESCRIPTION - "Write access is not required." - - OBJECT ifStackStatus - SYNTAX INTEGER { active(1) } -- subset of RowStatus - MIN-ACCESS read-only - DESCRIPTION - "Write access is not required, and only one of the six - enumerated values for the RowStatus textual convention need - be supported, specifically: active(1)." - - OBJECT ifAdminStatus - SYNTAX INTEGER { up(1), down(2) } - MIN-ACCESS read-only - DESCRIPTION - "Write access is not required, nor is support for the value - testing(3)." - ::= { ifCompliances 1 } - -ifCompliance2 MODULE-COMPLIANCE - STATUS deprecated - DESCRIPTION - "A compliance statement defined in a previous version of - this MIB module, for SNMP entities which have network - interfaces." - - MODULE -- this module - MANDATORY-GROUPS { ifGeneralInformationGroup, ifStackGroup2, - ifCounterDiscontinuityGroup } - - GROUP ifFixedLengthGroup - DESCRIPTION - - - "This group is mandatory for all network interfaces which - are character-oriented or transmit data in fixed-length - transmission units." - - GROUP ifHCFixedLengthGroup - DESCRIPTION - "This group is mandatory only for those network interfaces - which are character-oriented or transmit data in fixed- - length transmission units, and for which the value of the - corresponding instance of ifSpeed is greater than 20,000,000 - bits/second." - - GROUP ifPacketGroup - DESCRIPTION - "This group is mandatory for all network interfaces which - are packet-oriented." - - GROUP ifHCPacketGroup - DESCRIPTION - "This group is mandatory only for those network interfaces - which are packet-oriented and for which the value of the - corresponding instance of ifSpeed is greater than - 650,000,000 bits/second." - - GROUP ifRcvAddressGroup - DESCRIPTION - "The applicability of this group MUST be defined by the - media-specific MIBs. Media-specific MIBs must define the - exact meaning, use, and semantics of the addresses in this - group." - - OBJECT ifLinkUpDownTrapEnable - MIN-ACCESS read-only - DESCRIPTION - "Write access is not required." - - OBJECT ifPromiscuousMode - MIN-ACCESS read-only - DESCRIPTION - "Write access is not required." - - OBJECT ifStackStatus - SYNTAX INTEGER { active(1) } -- subset of RowStatus - MIN-ACCESS read-only - DESCRIPTION - "Write access is not required, and only one of the six - enumerated values for the RowStatus textual convention need - be supported, specifically: active(1)." - - - OBJECT ifAdminStatus - SYNTAX INTEGER { up(1), down(2) } - MIN-ACCESS read-only - DESCRIPTION - "Write access is not required, nor is support for the value - testing(3)." - - OBJECT ifAlias - MIN-ACCESS read-only - DESCRIPTION - "Write access is not required." - - ::= { ifCompliances 2 } - -END diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/INET-ADDRESS-MIB b/src/apps/snmp/LwipMibCompiler/Mibs/INET-ADDRESS-MIB deleted file mode 100644 index a19b8d22..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/INET-ADDRESS-MIB +++ /dev/null @@ -1,421 +0,0 @@ -INET-ADDRESS-MIB DEFINITIONS ::= BEGIN - -IMPORTS - MODULE-IDENTITY, mib-2, Unsigned32 FROM SNMPv2-SMI - TEXTUAL-CONVENTION FROM SNMPv2-TC; - -inetAddressMIB MODULE-IDENTITY - LAST-UPDATED "200502040000Z" - ORGANIZATION - "IETF Operations and Management Area" - CONTACT-INFO - "Juergen Schoenwaelder (Editor) - International University Bremen - P.O. Box 750 561 - 28725 Bremen, Germany - - Phone: +49 421 200-3587 - EMail: j.schoenwaelder@iu-bremen.de - - Send comments to ." - DESCRIPTION - "This MIB module defines textual conventions for - representing Internet addresses. An Internet - address can be an IPv4 address, an IPv6 address, - or a DNS domain name. This module also defines - textual conventions for Internet port numbers, - autonomous system numbers, and the length of an - Internet address prefix. - - Copyright (C) The Internet Society (2005). This version - of this MIB module is part of RFC 4001, see the RFC - itself for full legal notices." - REVISION "200502040000Z" - DESCRIPTION - "Third version, published as RFC 4001. This revision - introduces the InetZoneIndex, InetScopeType, and - InetVersion textual conventions." - REVISION "200205090000Z" - DESCRIPTION - "Second version, published as RFC 3291. This - revision contains several clarifications and - introduces several new textual conventions: - InetAddressPrefixLength, InetPortNumber, - InetAutonomousSystemNumber, InetAddressIPv4z, - and InetAddressIPv6z." - REVISION "200006080000Z" - - - - DESCRIPTION - "Initial version, published as RFC 2851." - ::= { mib-2 76 } - -InetAddressType ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "A value that represents a type of Internet address. - - unknown(0) An unknown address type. This value MUST - be used if the value of the corresponding - InetAddress object is a zero-length string. - It may also be used to indicate an IP address - that is not in one of the formats defined - below. - - ipv4(1) An IPv4 address as defined by the - InetAddressIPv4 textual convention. - - ipv6(2) An IPv6 address as defined by the - InetAddressIPv6 textual convention. - - ipv4z(3) A non-global IPv4 address including a zone - index as defined by the InetAddressIPv4z - textual convention. - - ipv6z(4) A non-global IPv6 address including a zone - index as defined by the InetAddressIPv6z - textual convention. - - dns(16) A DNS domain name as defined by the - InetAddressDNS textual convention. - - Each definition of a concrete InetAddressType value must be - accompanied by a definition of a textual convention for use - with that InetAddressType. - - To support future extensions, the InetAddressType textual - convention SHOULD NOT be sub-typed in object type definitions. - It MAY be sub-typed in compliance statements in order to - require only a subset of these address types for a compliant - implementation. - - Implementations must ensure that InetAddressType objects - and any dependent objects (e.g., InetAddress objects) are - consistent. An inconsistentValue error must be generated - if an attempt to change an InetAddressType object would, - for example, lead to an undefined InetAddress value. In - - - - particular, InetAddressType/InetAddress pairs must be - changed together if the address type changes (e.g., from - ipv6(2) to ipv4(1))." - SYNTAX INTEGER { - unknown(0), - ipv4(1), - ipv6(2), - ipv4z(3), - ipv6z(4), - dns(16) - } - -InetAddress ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "Denotes a generic Internet address. - - An InetAddress value is always interpreted within the context - of an InetAddressType value. Every usage of the InetAddress - textual convention is required to specify the InetAddressType - object that provides the context. It is suggested that the - InetAddressType object be logically registered before the - object(s) that use the InetAddress textual convention, if - they appear in the same logical row. - - The value of an InetAddress object must always be - consistent with the value of the associated InetAddressType - object. Attempts to set an InetAddress object to a value - inconsistent with the associated InetAddressType - must fail with an inconsistentValue error. - - When this textual convention is used as the syntax of an - index object, there may be issues with the limit of 128 - sub-identifiers specified in SMIv2, STD 58. In this case, - the object definition MUST include a 'SIZE' clause to - limit the number of potential instance sub-identifiers; - otherwise the applicable constraints MUST be stated in - the appropriate conceptual row DESCRIPTION clauses, or - in the surrounding documentation if there is no single - DESCRIPTION clause that is appropriate." - SYNTAX OCTET STRING (SIZE (0..255)) - -InetAddressIPv4 ::= TEXTUAL-CONVENTION - DISPLAY-HINT "1d.1d.1d.1d" - STATUS current - DESCRIPTION - "Represents an IPv4 network address: - - - - - Octets Contents Encoding - 1-4 IPv4 address network-byte order - - The corresponding InetAddressType value is ipv4(1). - - This textual convention SHOULD NOT be used directly in object - definitions, as it restricts addresses to a specific format. - However, if it is used, it MAY be used either on its own or in - conjunction with InetAddressType, as a pair." - SYNTAX OCTET STRING (SIZE (4)) - -InetAddressIPv6 ::= TEXTUAL-CONVENTION - DISPLAY-HINT "2x:2x:2x:2x:2x:2x:2x:2x" - STATUS current - DESCRIPTION - "Represents an IPv6 network address: - - Octets Contents Encoding - 1-16 IPv6 address network-byte order - - The corresponding InetAddressType value is ipv6(2). - - This textual convention SHOULD NOT be used directly in object - definitions, as it restricts addresses to a specific format. - However, if it is used, it MAY be used either on its own or in - conjunction with InetAddressType, as a pair." - SYNTAX OCTET STRING (SIZE (16)) - -InetAddressIPv4z ::= TEXTUAL-CONVENTION - DISPLAY-HINT "1d.1d.1d.1d%4d" - STATUS current - DESCRIPTION - "Represents a non-global IPv4 network address, together - with its zone index: - - Octets Contents Encoding - 1-4 IPv4 address network-byte order - 5-8 zone index network-byte order - - The corresponding InetAddressType value is ipv4z(3). - - The zone index (bytes 5-8) is used to disambiguate identical - address values on nodes that have interfaces attached to - different zones of the same scope. The zone index may contain - the special value 0, which refers to the default zone for each - scope. - - This textual convention SHOULD NOT be used directly in object - - - - definitions, as it restricts addresses to a specific format. - However, if it is used, it MAY be used either on its own or in - conjunction with InetAddressType, as a pair." - SYNTAX OCTET STRING (SIZE (8)) - -InetAddressIPv6z ::= TEXTUAL-CONVENTION - DISPLAY-HINT "2x:2x:2x:2x:2x:2x:2x:2x%4d" - STATUS current - DESCRIPTION - "Represents a non-global IPv6 network address, together - with its zone index: - - Octets Contents Encoding - 1-16 IPv6 address network-byte order - 17-20 zone index network-byte order - - The corresponding InetAddressType value is ipv6z(4). - - The zone index (bytes 17-20) is used to disambiguate - identical address values on nodes that have interfaces - attached to different zones of the same scope. The zone index - may contain the special value 0, which refers to the default - zone for each scope. - - This textual convention SHOULD NOT be used directly in object - definitions, as it restricts addresses to a specific format. - However, if it is used, it MAY be used either on its own or in - conjunction with InetAddressType, as a pair." - SYNTAX OCTET STRING (SIZE (20)) - -InetAddressDNS ::= TEXTUAL-CONVENTION - DISPLAY-HINT "255a" - STATUS current - DESCRIPTION - "Represents a DNS domain name. The name SHOULD be fully - qualified whenever possible. - - The corresponding InetAddressType is dns(16). - - The DESCRIPTION clause of InetAddress objects that may have - InetAddressDNS values MUST fully describe how (and when) - these names are to be resolved to IP addresses. - - The resolution of an InetAddressDNS value may require to - query multiple DNS records (e.g., A for IPv4 and AAAA for - IPv6). The order of the resolution process and which DNS - record takes precedence depends on the configuration of the - resolver. - - - - This textual convention SHOULD NOT be used directly in object - definitions, as it restricts addresses to a specific format. - However, if it is used, it MAY be used either on its own or in - conjunction with InetAddressType, as a pair." - SYNTAX OCTET STRING (SIZE (1..255)) - -InetAddressPrefixLength ::= TEXTUAL-CONVENTION - DISPLAY-HINT "d" - STATUS current - DESCRIPTION - "Denotes the length of a generic Internet network address - prefix. A value of n corresponds to an IP address mask - that has n contiguous 1-bits from the most significant - bit (MSB), with all other bits set to 0. - - An InetAddressPrefixLength value is always interpreted within - the context of an InetAddressType value. Every usage of the - InetAddressPrefixLength textual convention is required to - specify the InetAddressType object that provides the - context. It is suggested that the InetAddressType object be - logically registered before the object(s) that use the - InetAddressPrefixLength textual convention, if they appear - in the same logical row. - - InetAddressPrefixLength values larger than - the maximum length of an IP address for a specific - InetAddressType are treated as the maximum significant - value applicable for the InetAddressType. The maximum - significant value is 32 for the InetAddressType - 'ipv4(1)' and 'ipv4z(3)' and 128 for the InetAddressType - 'ipv6(2)' and 'ipv6z(4)'. The maximum significant value - for the InetAddressType 'dns(16)' is 0. - - The value zero is object-specific and must be defined as - part of the description of any object that uses this - syntax. Examples of the usage of zero might include - situations where the Internet network address prefix - is unknown or does not apply. - - The upper bound of the prefix length has been chosen to - be consistent with the maximum size of an InetAddress." - SYNTAX Unsigned32 (0..2040) - -InetPortNumber ::= TEXTUAL-CONVENTION - DISPLAY-HINT "d" - STATUS current - DESCRIPTION - "Represents a 16 bit port number of an Internet transport - - - - layer protocol. Port numbers are assigned by IANA. A - current list of all assignments is available from - . - - The value zero is object-specific and must be defined as - part of the description of any object that uses this - syntax. Examples of the usage of zero might include - situations where a port number is unknown, or when the - value zero is used as a wildcard in a filter." - REFERENCE "STD 6 (RFC 768), STD 7 (RFC 793) and RFC 2960" - SYNTAX Unsigned32 (0..65535) - -InetAutonomousSystemNumber ::= TEXTUAL-CONVENTION - DISPLAY-HINT "d" - STATUS current - DESCRIPTION - "Represents an autonomous system number that identifies an - Autonomous System (AS). An AS is a set of routers under a - single technical administration, using an interior gateway - protocol and common metrics to route packets within the AS, - and using an exterior gateway protocol to route packets to - other ASes'. IANA maintains the AS number space and has - delegated large parts to the regional registries. - - Autonomous system numbers are currently limited to 16 bits - (0..65535). There is, however, work in progress to enlarge the - autonomous system number space to 32 bits. Therefore, this - textual convention uses an Unsigned32 value without a - range restriction in order to support a larger autonomous - system number space." - REFERENCE "RFC 1771, RFC 1930" - SYNTAX Unsigned32 - -InetScopeType ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "Represents a scope type. This textual convention can be used - in cases where a MIB has to represent different scope types - and there is no context information, such as an InetAddress - object, that implicitly defines the scope type. - - Note that not all possible values have been assigned yet, but - they may be assigned in future revisions of this specification. - Applications should therefore be able to deal with values - not yet assigned." - REFERENCE "RFC 3513" - SYNTAX INTEGER { - -- reserved(0), - - - - interfaceLocal(1), - linkLocal(2), - subnetLocal(3), - adminLocal(4), - siteLocal(5), -- site-local unicast addresses - -- have been deprecated by RFC 3879 - -- unassigned(6), - -- unassigned(7), - organizationLocal(8), - -- unassigned(9), - -- unassigned(10), - -- unassigned(11), - -- unassigned(12), - -- unassigned(13), - global(14) - -- reserved(15) - } - -InetZoneIndex ::= TEXTUAL-CONVENTION - DISPLAY-HINT "d" - STATUS current - DESCRIPTION - "A zone index identifies an instance of a zone of a - specific scope. - - The zone index MUST disambiguate identical address - values. For link-local addresses, the zone index will - typically be the interface index (ifIndex as defined in the - IF-MIB) of the interface on which the address is configured. - - The zone index may contain the special value 0, which refers - to the default zone. The default zone may be used in cases - where the valid zone index is not known (e.g., when a - management application has to write a link-local IPv6 - address without knowing the interface index value). The - default zone SHOULD NOT be used as an easy way out in - cases where the zone index for a non-global IPv6 address - is known." - REFERENCE "RFC4007" - SYNTAX Unsigned32 - -InetVersion ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "A value representing a version of the IP protocol. - - unknown(0) An unknown or unspecified version of the IP - protocol. - - - - ipv4(1) The IPv4 protocol as defined in RFC 791 (STD 5). - - ipv6(2) The IPv6 protocol as defined in RFC 2460. - - Note that this textual convention SHOULD NOT be used to - distinguish different address types associated with IP - protocols. The InetAddressType has been designed for this - purpose." - REFERENCE "RFC 791, RFC 2460" - SYNTAX INTEGER { - unknown(0), - ipv4(1), - ipv6(2) - } -END diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/IP-MIB b/src/apps/snmp/LwipMibCompiler/Mibs/IP-MIB deleted file mode 100644 index 0a93501b..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/IP-MIB +++ /dev/null @@ -1,5254 +0,0 @@ -IP-MIB DEFINITIONS ::= BEGIN - -IMPORTS - MODULE-IDENTITY, OBJECT-TYPE, - Integer32, Counter32, IpAddress, - mib-2, Unsigned32, Counter64, - zeroDotZero FROM SNMPv2-SMI - PhysAddress, TruthValue, - TimeStamp, RowPointer, - TEXTUAL-CONVENTION, TestAndIncr, - RowStatus, StorageType FROM SNMPv2-TC - MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF - InetAddress, InetAddressType, - InetAddressPrefixLength, - InetVersion, InetZoneIndex FROM INET-ADDRESS-MIB - InterfaceIndex FROM IF-MIB; - -ipMIB MODULE-IDENTITY - LAST-UPDATED "200602020000Z" - ORGANIZATION "IETF IPv6 MIB Revision Team" - CONTACT-INFO - "Editor: - - - - Shawn A. Routhier - Interworking Labs - 108 Whispering Pines Dr. Suite 235 - Scotts Valley, CA 95066 - USA - EMail: " - DESCRIPTION - "The MIB module for managing IP and ICMP implementations, but - excluding their management of IP routes. - - Copyright (C) The Internet Society (2006). This version of - this MIB module is part of RFC 4293; see the RFC itself for - full legal notices." - - REVISION "200602020000Z" - DESCRIPTION - "The IP version neutral revision with added IPv6 objects for - ND, default routers, and router advertisements. As well as - being the successor to RFC 2011, this MIB is also the - successor to RFCs 2465 and 2466. Published as RFC 4293." - - REVISION "199411010000Z" - DESCRIPTION - "A separate MIB module (IP-MIB) for IP and ICMP management - objects. Published as RFC 2011." - - REVISION "199103310000Z" - DESCRIPTION - "The initial revision of this MIB module was part of MIB-II, - which was published as RFC 1213." - ::= { mib-2 48} - --- --- The textual conventions we define and use in this MIB. --- - -IpAddressOriginTC ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "The origin of the address. - - manual(2) indicates that the address was manually configured - to a specified address, e.g., by user configuration. - - dhcp(4) indicates an address that was assigned to this - system by a DHCP server. - - linklayer(5) indicates an address created by IPv6 stateless - - - - auto-configuration. - - random(6) indicates an address chosen by the system at - random, e.g., an IPv4 address within 169.254/16, or an RFC - 3041 privacy address." - SYNTAX INTEGER { - other(1), - manual(2), - dhcp(4), - linklayer(5), - random(6) - } - -IpAddressStatusTC ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "The status of an address. Most of the states correspond to - states from the IPv6 Stateless Address Autoconfiguration - protocol. - - The preferred(1) state indicates that this is a valid - address that can appear as the destination or source address - of a packet. - - The deprecated(2) state indicates that this is a valid but - deprecated address that should no longer be used as a source - address in new communications, but packets addressed to such - an address are processed as expected. - - The invalid(3) state indicates that this isn't a valid - address and it shouldn't appear as the destination or source - address of a packet. - - The inaccessible(4) state indicates that the address is not - accessible because the interface to which this address is - assigned is not operational. - - The unknown(5) state indicates that the status cannot be - determined for some reason. - - The tentative(6) state indicates that the uniqueness of the - address on the link is being verified. Addresses in this - state should not be used for general communication and - should only be used to determine the uniqueness of the - address. - - The duplicate(7) state indicates the address has been - determined to be non-unique on the link and so must not be - - - - used. - - The optimistic(8) state indicates the address is available - for use, subject to restrictions, while its uniqueness on - a link is being verified. - - In the absence of other information, an IPv4 address is - always preferred(1)." - REFERENCE "RFC 2462" - SYNTAX INTEGER { - preferred(1), - deprecated(2), - invalid(3), - inaccessible(4), - unknown(5), - tentative(6), - duplicate(7), - optimistic(8) - } - -IpAddressPrefixOriginTC ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "The origin of this prefix. - - manual(2) indicates a prefix that was manually configured. - - wellknown(3) indicates a well-known prefix, e.g., 169.254/16 - for IPv4 auto-configuration or fe80::/10 for IPv6 link-local - addresses. Well known prefixes may be assigned by IANA, - the address registries, or by specification in a standards - track RFC. - - dhcp(4) indicates a prefix that was assigned by a DHCP - server. - - routeradv(5) indicates a prefix learned from a router - advertisement. - - Note: while IpAddressOriginTC and IpAddressPrefixOriginTC - are similar, they are not identical. The first defines how - an address was created, while the second defines how a - prefix was found." - SYNTAX INTEGER { - other(1), - manual(2), - wellknown(3), - dhcp(4), - - - - routeradv(5) - } - -Ipv6AddressIfIdentifierTC ::= TEXTUAL-CONVENTION - DISPLAY-HINT "2x:" - STATUS current - DESCRIPTION - "This data type is used to model IPv6 address - interface identifiers. This is a binary string - of up to 8 octets in network byte-order." - SYNTAX OCTET STRING (SIZE (0..8)) - --- --- the IP general group --- some objects that affect all of IPv4 --- - -ip OBJECT IDENTIFIER ::= { mib-2 4 } - -ipForwarding OBJECT-TYPE - SYNTAX INTEGER { - forwarding(1), -- acting as a router - notForwarding(2) -- NOT acting as a router - } - MAX-ACCESS read-write - STATUS current - DESCRIPTION - "The indication of whether this entity is acting as an IPv4 - router in respect to the forwarding of datagrams received - by, but not addressed to, this entity. IPv4 routers forward - datagrams. IPv4 hosts do not (except those source-routed - via the host). - - When this object is written, the entity should save the - change to non-volatile storage and restore the object from - non-volatile storage upon re-initialization of the system. - Note: a stronger requirement is not used because this object - was previously defined." - ::= { ip 1 } - -ipDefaultTTL OBJECT-TYPE - SYNTAX Integer32 (1..255) - MAX-ACCESS read-write - STATUS current - DESCRIPTION - "The default value inserted into the Time-To-Live field of - the IPv4 header of datagrams originated at this entity, - whenever a TTL value is not supplied by the transport layer - - - - protocol. - - When this object is written, the entity should save the - change to non-volatile storage and restore the object from - non-volatile storage upon re-initialization of the system. - Note: a stronger requirement is not used because this object - was previously defined." - ::= { ip 2 } - -ipReasmTimeout OBJECT-TYPE - SYNTAX Integer32 - UNITS "seconds" - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The maximum number of seconds that received fragments are - held while they are awaiting reassembly at this entity." - ::= { ip 13 } - --- --- the IPv6 general group --- Some objects that affect all of IPv6 --- - -ipv6IpForwarding OBJECT-TYPE - SYNTAX INTEGER { - forwarding(1), -- acting as a router - notForwarding(2) -- NOT acting as a router - } - MAX-ACCESS read-write - STATUS current - DESCRIPTION - "The indication of whether this entity is acting as an IPv6 - router on any interface in respect to the forwarding of - datagrams received by, but not addressed to, this entity. - IPv6 routers forward datagrams. IPv6 hosts do not (except - those source-routed via the host). - - When this object is written, the entity SHOULD save the - change to non-volatile storage and restore the object from - non-volatile storage upon re-initialization of the system." - ::= { ip 25 } - -ipv6IpDefaultHopLimit OBJECT-TYPE - SYNTAX Integer32 (0..255) - MAX-ACCESS read-write - STATUS current - DESCRIPTION - - - - "The default value inserted into the Hop Limit field of the - IPv6 header of datagrams originated at this entity whenever - a Hop Limit value is not supplied by the transport layer - protocol. - - When this object is written, the entity SHOULD save the - change to non-volatile storage and restore the object from - non-volatile storage upon re-initialization of the system." - REFERENCE "RFC 2461 Section 6.3.2" - ::= { ip 26 } - --- --- IPv4 Interface Table --- - -ipv4InterfaceTableLastChange OBJECT-TYPE - SYNTAX TimeStamp - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The value of sysUpTime on the most recent occasion at which - a row in the ipv4InterfaceTable was added or deleted, or - when an ipv4InterfaceReasmMaxSize or an - ipv4InterfaceEnableStatus object was modified. - - If new objects are added to the ipv4InterfaceTable that - require the ipv4InterfaceTableLastChange to be updated when - they are modified, they must specify that requirement in - their description clause." - ::= { ip 27 } - -ipv4InterfaceTable OBJECT-TYPE - SYNTAX SEQUENCE OF Ipv4InterfaceEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The table containing per-interface IPv4-specific - information." - ::= { ip 28 } - -ipv4InterfaceEntry OBJECT-TYPE - SYNTAX Ipv4InterfaceEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "An entry containing IPv4-specific information for a specific - interface." - INDEX { ipv4InterfaceIfIndex } - - - - ::= { ipv4InterfaceTable 1 } - -Ipv4InterfaceEntry ::= SEQUENCE { - ipv4InterfaceIfIndex InterfaceIndex, - ipv4InterfaceReasmMaxSize Integer32, - ipv4InterfaceEnableStatus INTEGER, - ipv4InterfaceRetransmitTime Unsigned32 - } - -ipv4InterfaceIfIndex OBJECT-TYPE - SYNTAX InterfaceIndex - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The index value that uniquely identifies the interface to - which this entry is applicable. The interface identified by - a particular value of this index is the same interface as - identified by the same value of the IF-MIB's ifIndex." - ::= { ipv4InterfaceEntry 1 } - -ipv4InterfaceReasmMaxSize OBJECT-TYPE - SYNTAX Integer32 (0..65535) - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The size of the largest IPv4 datagram that this entity can - re-assemble from incoming IPv4 fragmented datagrams received - on this interface." - ::= { ipv4InterfaceEntry 2 } - -ipv4InterfaceEnableStatus OBJECT-TYPE - SYNTAX INTEGER { - up(1), - down(2) - } - MAX-ACCESS read-write - STATUS current - DESCRIPTION - "The indication of whether IPv4 is enabled (up) or disabled - (down) on this interface. This object does not affect the - state of the interface itself, only its connection to an - IPv4 stack. The IF-MIB should be used to control the state - of the interface." - ::= { ipv4InterfaceEntry 3 } - -ipv4InterfaceRetransmitTime OBJECT-TYPE - SYNTAX Unsigned32 - UNITS "milliseconds" - - - - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The time between retransmissions of ARP requests to a - neighbor when resolving the address or when probing the - reachability of a neighbor." - REFERENCE "RFC 1122" - DEFVAL { 1000 } - ::= { ipv4InterfaceEntry 4 } - --- --- v6 interface table --- - -ipv6InterfaceTableLastChange OBJECT-TYPE - SYNTAX TimeStamp - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The value of sysUpTime on the most recent occasion at which - a row in the ipv6InterfaceTable was added or deleted or when - an ipv6InterfaceReasmMaxSize, ipv6InterfaceIdentifier, - ipv6InterfaceEnableStatus, ipv6InterfaceReachableTime, - ipv6InterfaceRetransmitTime, or ipv6InterfaceForwarding - object was modified. - - If new objects are added to the ipv6InterfaceTable that - require the ipv6InterfaceTableLastChange to be updated when - they are modified, they must specify that requirement in - their description clause." - ::= { ip 29 } - -ipv6InterfaceTable OBJECT-TYPE - SYNTAX SEQUENCE OF Ipv6InterfaceEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The table containing per-interface IPv6-specific - information." - ::= { ip 30 } - -ipv6InterfaceEntry OBJECT-TYPE - SYNTAX Ipv6InterfaceEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "An entry containing IPv6-specific information for a given - interface." - - - - INDEX { ipv6InterfaceIfIndex } - ::= { ipv6InterfaceTable 1 } - -Ipv6InterfaceEntry ::= SEQUENCE { - ipv6InterfaceIfIndex InterfaceIndex, - ipv6InterfaceReasmMaxSize Unsigned32, - ipv6InterfaceIdentifier Ipv6AddressIfIdentifierTC, - ipv6InterfaceEnableStatus INTEGER, - ipv6InterfaceReachableTime Unsigned32, - ipv6InterfaceRetransmitTime Unsigned32, - ipv6InterfaceForwarding INTEGER - } - -ipv6InterfaceIfIndex OBJECT-TYPE - SYNTAX InterfaceIndex - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The index value that uniquely identifies the interface to - which this entry is applicable. The interface identified by - a particular value of this index is the same interface as - identified by the same value of the IF-MIB's ifIndex." - ::= { ipv6InterfaceEntry 1 } - -ipv6InterfaceReasmMaxSize OBJECT-TYPE - SYNTAX Unsigned32 (1500..65535) - UNITS "octets" - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The size of the largest IPv6 datagram that this entity can - re-assemble from incoming IPv6 fragmented datagrams received - on this interface." - ::= { ipv6InterfaceEntry 2 } - -ipv6InterfaceIdentifier OBJECT-TYPE - SYNTAX Ipv6AddressIfIdentifierTC - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The Interface Identifier for this interface. The Interface - Identifier is combined with an address prefix to form an - interface address. - - By default, the Interface Identifier is auto-configured - according to the rules of the link type to which this - interface is attached. - - - - - A zero length identifier may be used where appropriate. One - possible example is a loopback interface." - ::= { ipv6InterfaceEntry 3 } - --- This object ID is reserved as it was used in earlier versions of --- the MIB module. In theory, OIDs are not assigned until the --- specification is released as an RFC; however, as some companies --- may have shipped code based on earlier versions of the MIB, it --- seems best to reserve this OID. This OID had been --- ipv6InterfacePhysicalAddress. --- ::= { ipv6InterfaceEntry 4} - -ipv6InterfaceEnableStatus OBJECT-TYPE - SYNTAX INTEGER { - up(1), - down(2) - } - MAX-ACCESS read-write - STATUS current - DESCRIPTION - "The indication of whether IPv6 is enabled (up) or disabled - (down) on this interface. This object does not affect the - state of the interface itself, only its connection to an - IPv6 stack. The IF-MIB should be used to control the state - of the interface. - - When this object is written, the entity SHOULD save the - change to non-volatile storage and restore the object from - non-volatile storage upon re-initialization of the system." - ::= { ipv6InterfaceEntry 5 } - -ipv6InterfaceReachableTime OBJECT-TYPE - SYNTAX Unsigned32 - UNITS "milliseconds" - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The time a neighbor is considered reachable after receiving - a reachability confirmation." - REFERENCE "RFC 2461, Section 6.3.2" - ::= { ipv6InterfaceEntry 6 } - -ipv6InterfaceRetransmitTime OBJECT-TYPE - SYNTAX Unsigned32 - UNITS "milliseconds" - MAX-ACCESS read-only - STATUS current - DESCRIPTION - - - - "The time between retransmissions of Neighbor Solicitation - messages to a neighbor when resolving the address or when - probing the reachability of a neighbor." - REFERENCE "RFC 2461, Section 6.3.2" - ::= { ipv6InterfaceEntry 7 } - -ipv6InterfaceForwarding OBJECT-TYPE - SYNTAX INTEGER { - forwarding(1), -- acting as a router - notForwarding(2) -- NOT acting as a router - } - MAX-ACCESS read-write - STATUS current - DESCRIPTION - "The indication of whether this entity is acting as an IPv6 - router on this interface with respect to the forwarding of - datagrams received by, but not addressed to, this entity. - IPv6 routers forward datagrams. IPv6 hosts do not (except - those source-routed via the host). - - This object is constrained by ipv6IpForwarding and is - ignored if ipv6IpForwarding is set to notForwarding. Those - systems that do not provide per-interface control of the - forwarding function should set this object to forwarding for - all interfaces and allow the ipv6IpForwarding object to - control the forwarding capability. - - When this object is written, the entity SHOULD save the - change to non-volatile storage and restore the object from - non-volatile storage upon re-initialization of the system." - ::= { ipv6InterfaceEntry 8 } - --- --- Per-Interface or System-Wide IP statistics. --- --- The following two tables, ipSystemStatsTable and ipIfStatsTable, --- are intended to provide the same counters at different granularities. --- The ipSystemStatsTable provides system wide counters aggregating --- the traffic counters for all interfaces for a given address type. --- The ipIfStatsTable provides the same counters but for specific --- interfaces rather than as an aggregate. --- --- Note well: If a system provides both system-wide and interface- --- specific values, the system-wide value may not be equal to the sum --- of the interface-specific values across all interfaces due to e.g., --- dynamic interface creation/deletion. --- --- Note well: Both of these tables contain some items that are - - - --- represented by two objects, representing the value in either 32 --- or 64 bits. For those objects, the 32-bit value MUST be the low --- order 32 bits of the 64-bit value. Also note that the 32-bit --- counters must be included when the 64-bit counters are included. - -ipTrafficStats OBJECT IDENTIFIER ::= { ip 31 } - -ipSystemStatsTable OBJECT-TYPE - SYNTAX SEQUENCE OF IpSystemStatsEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The table containing system wide, IP version specific - traffic statistics. This table and the ipIfStatsTable - contain similar objects whose difference is in their - granularity. Where this table contains system wide traffic - statistics, the ipIfStatsTable contains the same statistics - but counted on a per-interface basis." - ::= { ipTrafficStats 1 } - -ipSystemStatsEntry OBJECT-TYPE - SYNTAX IpSystemStatsEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "A statistics entry containing system-wide objects for a - particular IP version." - INDEX { ipSystemStatsIPVersion } - ::= { ipSystemStatsTable 1 } - -IpSystemStatsEntry ::= SEQUENCE { - ipSystemStatsIPVersion InetVersion, - ipSystemStatsInReceives Counter32, - ipSystemStatsHCInReceives Counter64, - ipSystemStatsInOctets Counter32, - ipSystemStatsHCInOctets Counter64, - ipSystemStatsInHdrErrors Counter32, - ipSystemStatsInNoRoutes Counter32, - ipSystemStatsInAddrErrors Counter32, - ipSystemStatsInUnknownProtos Counter32, - ipSystemStatsInTruncatedPkts Counter32, - ipSystemStatsInForwDatagrams Counter32, - ipSystemStatsHCInForwDatagrams Counter64, - ipSystemStatsReasmReqds Counter32, - ipSystemStatsReasmOKs Counter32, - ipSystemStatsReasmFails Counter32, - ipSystemStatsInDiscards Counter32, - ipSystemStatsInDelivers Counter32, - - - - ipSystemStatsHCInDelivers Counter64, - ipSystemStatsOutRequests Counter32, - ipSystemStatsHCOutRequests Counter64, - ipSystemStatsOutNoRoutes Counter32, - ipSystemStatsOutForwDatagrams Counter32, - ipSystemStatsHCOutForwDatagrams Counter64, - ipSystemStatsOutDiscards Counter32, - ipSystemStatsOutFragReqds Counter32, - ipSystemStatsOutFragOKs Counter32, - ipSystemStatsOutFragFails Counter32, - ipSystemStatsOutFragCreates Counter32, - ipSystemStatsOutTransmits Counter32, - ipSystemStatsHCOutTransmits Counter64, - ipSystemStatsOutOctets Counter32, - ipSystemStatsHCOutOctets Counter64, - ipSystemStatsInMcastPkts Counter32, - ipSystemStatsHCInMcastPkts Counter64, - ipSystemStatsInMcastOctets Counter32, - ipSystemStatsHCInMcastOctets Counter64, - ipSystemStatsOutMcastPkts Counter32, - ipSystemStatsHCOutMcastPkts Counter64, - ipSystemStatsOutMcastOctets Counter32, - ipSystemStatsHCOutMcastOctets Counter64, - ipSystemStatsInBcastPkts Counter32, - ipSystemStatsHCInBcastPkts Counter64, - ipSystemStatsOutBcastPkts Counter32, - ipSystemStatsHCOutBcastPkts Counter64, - ipSystemStatsDiscontinuityTime TimeStamp, - ipSystemStatsRefreshRate Unsigned32 - } - -ipSystemStatsIPVersion OBJECT-TYPE - SYNTAX InetVersion - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The IP version of this row." - ::= { ipSystemStatsEntry 1 } - --- This object ID is reserved to allow the IDs for this table's objects --- to align with the objects in the ipIfStatsTable. --- ::= { ipSystemStatsEntry 2 } - -ipSystemStatsInReceives OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - - - - "The total number of input IP datagrams received, including - those received in error. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 3 } - -ipSystemStatsHCInReceives OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of input IP datagrams received, including - those received in error. This object counts the same - datagrams as ipSystemStatsInReceives, but allows for larger - values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 4 } - -ipSystemStatsInOctets OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of octets received in input IP datagrams, - including those received in error. Octets from datagrams - counted in ipSystemStatsInReceives MUST be counted here. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 5 } - -ipSystemStatsHCInOctets OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of octets received in input IP datagrams, - including those received in error. This object counts the - same octets as ipSystemStatsInOctets, but allows for larger - - - - values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 6 } - -ipSystemStatsInHdrErrors OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of input IP datagrams discarded due to errors in - their IP headers, including version number mismatch, other - format errors, hop count exceeded, errors discovered in - processing their IP options, etc. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 7 } - -ipSystemStatsInNoRoutes OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of input IP datagrams discarded because no route - could be found to transmit them to their destination. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 8 } - -ipSystemStatsInAddrErrors OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of input IP datagrams discarded because the IP - address in their IP header's destination field was not a - valid address to be received at this entity. This count - includes invalid addresses (e.g., ::0). For entities - that are not IP routers and therefore do not forward - - - - datagrams, this counter includes datagrams discarded - because the destination address was not a local address. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 9 } - -ipSystemStatsInUnknownProtos OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of locally-addressed IP datagrams received - successfully but discarded because of an unknown or - unsupported protocol. - - When tracking interface statistics, the counter of the - interface to which these datagrams were addressed is - incremented. This interface might not be the same as the - input interface for some of the datagrams. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 10 } - -ipSystemStatsInTruncatedPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of input IP datagrams discarded because the - datagram frame didn't carry enough data. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 11 } - -ipSystemStatsInForwDatagrams OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - - - - "The number of input datagrams for which this entity was not - their final IP destination and for which this entity - attempted to find a route to forward them to that final - destination. In entities that do not act as IP routers, - this counter will include only those datagrams that were - Source-Routed via this entity, and the Source-Route - processing was successful. - - When tracking interface statistics, the counter of the - incoming interface is incremented for each datagram. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 12 } - -ipSystemStatsHCInForwDatagrams OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of input datagrams for which this entity was not - their final IP destination and for which this entity - attempted to find a route to forward them to that final - destination. This object counts the same packets as - ipSystemStatsInForwDatagrams, but allows for larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 13 } - -ipSystemStatsReasmReqds OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP fragments received that needed to be - reassembled at this interface. - - When tracking interface statistics, the counter of the - interface to which these fragments were addressed is - incremented. This interface might not be the same as the - input interface for some of the fragments. - - Discontinuities in the value of this counter can occur at - - - - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 14 } - -ipSystemStatsReasmOKs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP datagrams successfully reassembled. - - When tracking interface statistics, the counter of the - interface to which these datagrams were addressed is - incremented. This interface might not be the same as the - input interface for some of the datagrams. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 15 } - -ipSystemStatsReasmFails OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of failures detected by the IP re-assembly - algorithm (for whatever reason: timed out, errors, etc.). - Note that this is not necessarily a count of discarded IP - fragments since some algorithms (notably the algorithm in - RFC 815) can lose track of the number of fragments by - combining them as they are received. - - When tracking interface statistics, the counter of the - interface to which these fragments were addressed is - incremented. This interface might not be the same as the - input interface for some of the fragments. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 16 } - -ipSystemStatsInDiscards OBJECT-TYPE - SYNTAX Counter32 - - - - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of input IP datagrams for which no problems were - encountered to prevent their continued processing, but - were discarded (e.g., for lack of buffer space). Note that - this counter does not include any datagrams discarded while - awaiting re-assembly. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 17 } - -ipSystemStatsInDelivers OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of datagrams successfully delivered to IP - user-protocols (including ICMP). - - When tracking interface statistics, the counter of the - interface to which these datagrams were addressed is - incremented. This interface might not be the same as the - input interface for some of the datagrams. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 18 } - -ipSystemStatsHCInDelivers OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of datagrams successfully delivered to IP - user-protocols (including ICMP). This object counts the - same packets as ipSystemStatsInDelivers, but allows for - larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - - - - ::= { ipSystemStatsEntry 19 } - -ipSystemStatsOutRequests OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of IP datagrams that local IP user- - protocols (including ICMP) supplied to IP in requests for - transmission. Note that this counter does not include any - datagrams counted in ipSystemStatsOutForwDatagrams. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 20 } - -ipSystemStatsHCOutRequests OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of IP datagrams that local IP user- - protocols (including ICMP) supplied to IP in requests for - transmission. This object counts the same packets as - ipSystemStatsOutRequests, but allows for larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 21 } - -ipSystemStatsOutNoRoutes OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of locally generated IP datagrams discarded - because no route could be found to transmit them to their - destination. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 22 } - - - -ipSystemStatsOutForwDatagrams OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of datagrams for which this entity was not their - final IP destination and for which it was successful in - finding a path to their final destination. In entities - that do not act as IP routers, this counter will include - only those datagrams that were Source-Routed via this - entity, and the Source-Route processing was successful. - - When tracking interface statistics, the counter of the - outgoing interface is incremented for a successfully - forwarded datagram. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 23 } - -ipSystemStatsHCOutForwDatagrams OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of datagrams for which this entity was not their - final IP destination and for which it was successful in - finding a path to their final destination. This object - counts the same packets as ipSystemStatsOutForwDatagrams, - but allows for larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 24 } - -ipSystemStatsOutDiscards OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of output IP datagrams for which no problem was - encountered to prevent their transmission to their - destination, but were discarded (e.g., for lack of - buffer space). Note that this counter would include - - - - datagrams counted in ipSystemStatsOutForwDatagrams if any - such datagrams met this (discretionary) discard criterion. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 25 } - -ipSystemStatsOutFragReqds OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP datagrams that would require fragmentation - in order to be transmitted. - - When tracking interface statistics, the counter of the - outgoing interface is incremented for a successfully - fragmented datagram. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 26 } - -ipSystemStatsOutFragOKs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP datagrams that have been successfully - fragmented. - - When tracking interface statistics, the counter of the - outgoing interface is incremented for a successfully - fragmented datagram. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 27 } - -ipSystemStatsOutFragFails OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - - - - STATUS current - DESCRIPTION - "The number of IP datagrams that have been discarded because - they needed to be fragmented but could not be. This - includes IPv4 packets that have the DF bit set and IPv6 - packets that are being forwarded and exceed the outgoing - link MTU. - - When tracking interface statistics, the counter of the - outgoing interface is incremented for an unsuccessfully - fragmented datagram. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 28 } - -ipSystemStatsOutFragCreates OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of output datagram fragments that have been - generated as a result of IP fragmentation. - - When tracking interface statistics, the counter of the - outgoing interface is incremented for a successfully - fragmented datagram. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 29 } - -ipSystemStatsOutTransmits OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of IP datagrams that this entity supplied - to the lower layers for transmission. This includes - datagrams generated locally and those forwarded by this - entity. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - - - - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 30 } - -ipSystemStatsHCOutTransmits OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of IP datagrams that this entity supplied - to the lower layers for transmission. This object counts - the same datagrams as ipSystemStatsOutTransmits, but allows - for larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 31 } - -ipSystemStatsOutOctets OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of octets in IP datagrams delivered to the - lower layers for transmission. Octets from datagrams - counted in ipSystemStatsOutTransmits MUST be counted here. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 32 } - -ipSystemStatsHCOutOctets OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of octets in IP datagrams delivered to the - lower layers for transmission. This objects counts the same - octets as ipSystemStatsOutOctets, but allows for larger - values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - - - - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 33 } - -ipSystemStatsInMcastPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP multicast datagrams received. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 34 } - -ipSystemStatsHCInMcastPkts OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP multicast datagrams received. This object - counts the same datagrams as ipSystemStatsInMcastPkts but - allows for larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 35 } - -ipSystemStatsInMcastOctets OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of octets received in IP multicast - datagrams. Octets from datagrams counted in - ipSystemStatsInMcastPkts MUST be counted here. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 36 } - -ipSystemStatsHCInMcastOctets OBJECT-TYPE - SYNTAX Counter64 - - - - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of octets received in IP multicast - datagrams. This object counts the same octets as - ipSystemStatsInMcastOctets, but allows for larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 37 } - -ipSystemStatsOutMcastPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP multicast datagrams transmitted. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 38 } - -ipSystemStatsHCOutMcastPkts OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP multicast datagrams transmitted. This - object counts the same datagrams as - ipSystemStatsOutMcastPkts, but allows for larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 39 } - -ipSystemStatsOutMcastOctets OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of octets transmitted in IP multicast - datagrams. Octets from datagrams counted in - - - - ipSystemStatsOutMcastPkts MUST be counted here. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 40 } - -ipSystemStatsHCOutMcastOctets OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of octets transmitted in IP multicast - datagrams. This object counts the same octets as - ipSystemStatsOutMcastOctets, but allows for larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 41 } - -ipSystemStatsInBcastPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP broadcast datagrams received. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 42 } - -ipSystemStatsHCInBcastPkts OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP broadcast datagrams received. This object - counts the same datagrams as ipSystemStatsInBcastPkts but - allows for larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - - - - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 43 } - -ipSystemStatsOutBcastPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP broadcast datagrams transmitted. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 44 } - -ipSystemStatsHCOutBcastPkts OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP broadcast datagrams transmitted. This - object counts the same datagrams as - ipSystemStatsOutBcastPkts, but allows for larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipSystemStatsDiscontinuityTime." - ::= { ipSystemStatsEntry 45 } - -ipSystemStatsDiscontinuityTime OBJECT-TYPE - SYNTAX TimeStamp - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The value of sysUpTime on the most recent occasion at which - any one or more of this entry's counters suffered a - discontinuity. - - If no such discontinuities have occurred since the last re- - initialization of the local management subsystem, then this - object contains a zero value." - ::= { ipSystemStatsEntry 46 } - -ipSystemStatsRefreshRate OBJECT-TYPE - SYNTAX Unsigned32 - UNITS "milli-seconds" - - - - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The minimum reasonable polling interval for this entry. - This object provides an indication of the minimum amount of - time required to update the counters in this entry." - ::= { ipSystemStatsEntry 47 } - -ipIfStatsTableLastChange OBJECT-TYPE - SYNTAX TimeStamp - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The value of sysUpTime on the most recent occasion at which - a row in the ipIfStatsTable was added or deleted. - - If new objects are added to the ipIfStatsTable that require - the ipIfStatsTableLastChange to be updated when they are - modified, they must specify that requirement in their - description clause." - ::= { ipTrafficStats 2 } - -ipIfStatsTable OBJECT-TYPE - SYNTAX SEQUENCE OF IpIfStatsEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The table containing per-interface traffic statistics. This - table and the ipSystemStatsTable contain similar objects - whose difference is in their granularity. Where this table - contains per-interface statistics, the ipSystemStatsTable - contains the same statistics, but counted on a system wide - basis." - ::= { ipTrafficStats 3 } - -ipIfStatsEntry OBJECT-TYPE - SYNTAX IpIfStatsEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "An interface statistics entry containing objects for a - particular interface and version of IP." - INDEX { ipIfStatsIPVersion, ipIfStatsIfIndex } - ::= { ipIfStatsTable 1 } - -IpIfStatsEntry ::= SEQUENCE { - ipIfStatsIPVersion InetVersion, - ipIfStatsIfIndex InterfaceIndex, - - - - ipIfStatsInReceives Counter32, - ipIfStatsHCInReceives Counter64, - ipIfStatsInOctets Counter32, - ipIfStatsHCInOctets Counter64, - ipIfStatsInHdrErrors Counter32, - ipIfStatsInNoRoutes Counter32, - ipIfStatsInAddrErrors Counter32, - ipIfStatsInUnknownProtos Counter32, - ipIfStatsInTruncatedPkts Counter32, - ipIfStatsInForwDatagrams Counter32, - ipIfStatsHCInForwDatagrams Counter64, - ipIfStatsReasmReqds Counter32, - ipIfStatsReasmOKs Counter32, - ipIfStatsReasmFails Counter32, - ipIfStatsInDiscards Counter32, - ipIfStatsInDelivers Counter32, - ipIfStatsHCInDelivers Counter64, - ipIfStatsOutRequests Counter32, - ipIfStatsHCOutRequests Counter64, - ipIfStatsOutForwDatagrams Counter32, - ipIfStatsHCOutForwDatagrams Counter64, - ipIfStatsOutDiscards Counter32, - ipIfStatsOutFragReqds Counter32, - ipIfStatsOutFragOKs Counter32, - ipIfStatsOutFragFails Counter32, - ipIfStatsOutFragCreates Counter32, - ipIfStatsOutTransmits Counter32, - ipIfStatsHCOutTransmits Counter64, - ipIfStatsOutOctets Counter32, - ipIfStatsHCOutOctets Counter64, - ipIfStatsInMcastPkts Counter32, - ipIfStatsHCInMcastPkts Counter64, - ipIfStatsInMcastOctets Counter32, - ipIfStatsHCInMcastOctets Counter64, - ipIfStatsOutMcastPkts Counter32, - ipIfStatsHCOutMcastPkts Counter64, - ipIfStatsOutMcastOctets Counter32, - ipIfStatsHCOutMcastOctets Counter64, - ipIfStatsInBcastPkts Counter32, - ipIfStatsHCInBcastPkts Counter64, - ipIfStatsOutBcastPkts Counter32, - ipIfStatsHCOutBcastPkts Counter64, - ipIfStatsDiscontinuityTime TimeStamp, - ipIfStatsRefreshRate Unsigned32 - } - -ipIfStatsIPVersion OBJECT-TYPE - SYNTAX InetVersion - - - - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The IP version of this row." - ::= { ipIfStatsEntry 1 } - -ipIfStatsIfIndex OBJECT-TYPE - SYNTAX InterfaceIndex - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The index value that uniquely identifies the interface to - which this entry is applicable. The interface identified by - a particular value of this index is the same interface as - identified by the same value of the IF-MIB's ifIndex." - ::= { ipIfStatsEntry 2 } - -ipIfStatsInReceives OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of input IP datagrams received, including - those received in error. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 3 } - -ipIfStatsHCInReceives OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of input IP datagrams received, including - those received in error. This object counts the same - datagrams as ipIfStatsInReceives, but allows for larger - values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 4 } - -ipIfStatsInOctets OBJECT-TYPE - - - - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of octets received in input IP datagrams, - including those received in error. Octets from datagrams - counted in ipIfStatsInReceives MUST be counted here. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 5 } - -ipIfStatsHCInOctets OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of octets received in input IP datagrams, - including those received in error. This object counts the - same octets as ipIfStatsInOctets, but allows for larger - values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 6 } - -ipIfStatsInHdrErrors OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of input IP datagrams discarded due to errors in - their IP headers, including version number mismatch, other - format errors, hop count exceeded, errors discovered in - processing their IP options, etc. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 7 } - -ipIfStatsInNoRoutes OBJECT-TYPE - SYNTAX Counter32 - - - - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of input IP datagrams discarded because no route - could be found to transmit them to their destination. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 8 } - -ipIfStatsInAddrErrors OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of input IP datagrams discarded because the IP - address in their IP header's destination field was not a - valid address to be received at this entity. This count - includes invalid addresses (e.g., ::0). For entities that - are not IP routers and therefore do not forward datagrams, - this counter includes datagrams discarded because the - destination address was not a local address. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 9 } - -ipIfStatsInUnknownProtos OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of locally-addressed IP datagrams received - successfully but discarded because of an unknown or - unsupported protocol. - - When tracking interface statistics, the counter of the - interface to which these datagrams were addressed is - incremented. This interface might not be the same as the - input interface for some of the datagrams. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - - - - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 10 } - -ipIfStatsInTruncatedPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of input IP datagrams discarded because the - datagram frame didn't carry enough data. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 11 } - -ipIfStatsInForwDatagrams OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of input datagrams for which this entity was not - their final IP destination and for which this entity - attempted to find a route to forward them to that final - destination. In entities that do not act as IP routers, - this counter will include only those datagrams that were - Source-Routed via this entity, and the Source-Route - processing was successful. - - When tracking interface statistics, the counter of the - incoming interface is incremented for each datagram. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 12 } - -ipIfStatsHCInForwDatagrams OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of input datagrams for which this entity was not - their final IP destination and for which this entity - attempted to find a route to forward them to that final - destination. This object counts the same packets as - - - - ipIfStatsInForwDatagrams, but allows for larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 13 } - -ipIfStatsReasmReqds OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP fragments received that needed to be - reassembled at this interface. - - When tracking interface statistics, the counter of the - interface to which these fragments were addressed is - incremented. This interface might not be the same as the - input interface for some of the fragments. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 14 } - -ipIfStatsReasmOKs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP datagrams successfully reassembled. - - When tracking interface statistics, the counter of the - interface to which these datagrams were addressed is - incremented. This interface might not be the same as the - input interface for some of the datagrams. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 15 } - -ipIfStatsReasmFails OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - - - - STATUS current - DESCRIPTION - "The number of failures detected by the IP re-assembly - algorithm (for whatever reason: timed out, errors, etc.). - Note that this is not necessarily a count of discarded IP - fragments since some algorithms (notably the algorithm in - RFC 815) can lose track of the number of fragments by - combining them as they are received. - - When tracking interface statistics, the counter of the - interface to which these fragments were addressed is - incremented. This interface might not be the same as the - input interface for some of the fragments. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 16 } - -ipIfStatsInDiscards OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of input IP datagrams for which no problems were - encountered to prevent their continued processing, but - were discarded (e.g., for lack of buffer space). Note that - this counter does not include any datagrams discarded while - awaiting re-assembly. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 17 } - -ipIfStatsInDelivers OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of datagrams successfully delivered to IP - user-protocols (including ICMP). - - When tracking interface statistics, the counter of the - interface to which these datagrams were addressed is - incremented. This interface might not be the same as the - - - - input interface for some of the datagrams. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 18 } - -ipIfStatsHCInDelivers OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of datagrams successfully delivered to IP - user-protocols (including ICMP). This object counts the - same packets as ipIfStatsInDelivers, but allows for larger - values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 19 } - -ipIfStatsOutRequests OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of IP datagrams that local IP user- - protocols (including ICMP) supplied to IP in requests for - transmission. Note that this counter does not include any - datagrams counted in ipIfStatsOutForwDatagrams. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 20 } - -ipIfStatsHCOutRequests OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of IP datagrams that local IP user- - protocols (including ICMP) supplied to IP in requests for - transmission. This object counts the same packets as - - - - ipIfStatsOutRequests, but allows for larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 21 } - --- This object ID is reserved to allow the IDs for this table's objects --- to align with the objects in the ipSystemStatsTable. --- ::= {ipIfStatsEntry 22} - -ipIfStatsOutForwDatagrams OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of datagrams for which this entity was not their - final IP destination and for which it was successful in - finding a path to their final destination. In entities - that do not act as IP routers, this counter will include - only those datagrams that were Source-Routed via this - entity, and the Source-Route processing was successful. - - When tracking interface statistics, the counter of the - outgoing interface is incremented for a successfully - forwarded datagram. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 23 } - -ipIfStatsHCOutForwDatagrams OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of datagrams for which this entity was not their - final IP destination and for which it was successful in - finding a path to their final destination. This object - counts the same packets as ipIfStatsOutForwDatagrams, but - allows for larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - - - - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 24 } - -ipIfStatsOutDiscards OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of output IP datagrams for which no problem was - encountered to prevent their transmission to their - destination, but were discarded (e.g., for lack of - buffer space). Note that this counter would include - datagrams counted in ipIfStatsOutForwDatagrams if any such - datagrams met this (discretionary) discard criterion. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 25 } - -ipIfStatsOutFragReqds OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP datagrams that would require fragmentation - in order to be transmitted. - - When tracking interface statistics, the counter of the - outgoing interface is incremented for a successfully - fragmented datagram. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 26 } - -ipIfStatsOutFragOKs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP datagrams that have been successfully - fragmented. - - When tracking interface statistics, the counter of the - - - - outgoing interface is incremented for a successfully - fragmented datagram. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 27 } - -ipIfStatsOutFragFails OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP datagrams that have been discarded because - they needed to be fragmented but could not be. This - includes IPv4 packets that have the DF bit set and IPv6 - packets that are being forwarded and exceed the outgoing - link MTU. - - When tracking interface statistics, the counter of the - outgoing interface is incremented for an unsuccessfully - fragmented datagram. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 28 } - -ipIfStatsOutFragCreates OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of output datagram fragments that have been - generated as a result of IP fragmentation. - - When tracking interface statistics, the counter of the - outgoing interface is incremented for a successfully - fragmented datagram. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 29 } - - - - -ipIfStatsOutTransmits OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of IP datagrams that this entity supplied - to the lower layers for transmission. This includes - datagrams generated locally and those forwarded by this - entity. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 30 } - -ipIfStatsHCOutTransmits OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of IP datagrams that this entity supplied - to the lower layers for transmission. This object counts - the same datagrams as ipIfStatsOutTransmits, but allows for - larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 31 } - -ipIfStatsOutOctets OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of octets in IP datagrams delivered to the - lower layers for transmission. Octets from datagrams - counted in ipIfStatsOutTransmits MUST be counted here. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 32 } - -ipIfStatsHCOutOctets OBJECT-TYPE - - - - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of octets in IP datagrams delivered to the - lower layers for transmission. This objects counts the same - octets as ipIfStatsOutOctets, but allows for larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 33 } - -ipIfStatsInMcastPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP multicast datagrams received. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 34 } - -ipIfStatsHCInMcastPkts OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP multicast datagrams received. This object - counts the same datagrams as ipIfStatsInMcastPkts, but - allows for larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 35 } - -ipIfStatsInMcastOctets OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of octets received in IP multicast - - - - datagrams. Octets from datagrams counted in - ipIfStatsInMcastPkts MUST be counted here. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 36 } - -ipIfStatsHCInMcastOctets OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of octets received in IP multicast - datagrams. This object counts the same octets as - ipIfStatsInMcastOctets, but allows for larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 37 } - -ipIfStatsOutMcastPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP multicast datagrams transmitted. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 38 } - -ipIfStatsHCOutMcastPkts OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP multicast datagrams transmitted. This - object counts the same datagrams as ipIfStatsOutMcastPkts, - but allows for larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - - - - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 39 } - -ipIfStatsOutMcastOctets OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of octets transmitted in IP multicast - datagrams. Octets from datagrams counted in - ipIfStatsOutMcastPkts MUST be counted here. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 40 } - -ipIfStatsHCOutMcastOctets OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of octets transmitted in IP multicast - datagrams. This object counts the same octets as - ipIfStatsOutMcastOctets, but allows for larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 41 } - -ipIfStatsInBcastPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP broadcast datagrams received. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 42 } - -ipIfStatsHCInBcastPkts OBJECT-TYPE - - - - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP broadcast datagrams received. This object - counts the same datagrams as ipIfStatsInBcastPkts, but - allows for larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 43 } - -ipIfStatsOutBcastPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP broadcast datagrams transmitted. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 44 } - -ipIfStatsHCOutBcastPkts OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of IP broadcast datagrams transmitted. This - object counts the same datagrams as ipIfStatsOutBcastPkts, - but allows for larger values. - - Discontinuities in the value of this counter can occur at - re-initialization of the management system, and at other - times as indicated by the value of - ipIfStatsDiscontinuityTime." - ::= { ipIfStatsEntry 45 } - -ipIfStatsDiscontinuityTime OBJECT-TYPE - SYNTAX TimeStamp - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The value of sysUpTime on the most recent occasion at which - - - - any one or more of this entry's counters suffered a - discontinuity. - - If no such discontinuities have occurred since the last re- - initialization of the local management subsystem, then this - object contains a zero value." - ::= { ipIfStatsEntry 46 } - -ipIfStatsRefreshRate OBJECT-TYPE - SYNTAX Unsigned32 - UNITS "milli-seconds" - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The minimum reasonable polling interval for this entry. - This object provides an indication of the minimum amount of - time required to update the counters in this entry." - ::= { ipIfStatsEntry 47 } - --- --- Internet Address Prefix table --- - -ipAddressPrefixTable OBJECT-TYPE - SYNTAX SEQUENCE OF IpAddressPrefixEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "This table allows the user to determine the source of an IP - address or set of IP addresses, and allows other tables to - share the information via pointer rather than by copying. - - For example, when the node configures both a unicast and - anycast address for a prefix, the ipAddressPrefix objects - for those addresses will point to a single row in this - table. - - This table primarily provides support for IPv6 prefixes, and - several of the objects are less meaningful for IPv4. The - table continues to allow IPv4 addresses to allow future - flexibility. In order to promote a common configuration, - this document includes suggestions for default values for - IPv4 prefixes. Each of these values may be overridden if an - object is meaningful to the node. - - All prefixes used by this entity should be included in this - table independent of how the entity learned the prefix. - (This table isn't limited to prefixes learned from router - - - - advertisements.)" - ::= { ip 32 } - -ipAddressPrefixEntry OBJECT-TYPE - SYNTAX IpAddressPrefixEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "An entry in the ipAddressPrefixTable." - INDEX { ipAddressPrefixIfIndex, ipAddressPrefixType, - ipAddressPrefixPrefix, ipAddressPrefixLength } - ::= { ipAddressPrefixTable 1 } - -IpAddressPrefixEntry ::= SEQUENCE { - ipAddressPrefixIfIndex InterfaceIndex, - ipAddressPrefixType InetAddressType, - ipAddressPrefixPrefix InetAddress, - ipAddressPrefixLength InetAddressPrefixLength, - ipAddressPrefixOrigin IpAddressPrefixOriginTC, - ipAddressPrefixOnLinkFlag TruthValue, - ipAddressPrefixAutonomousFlag TruthValue, - ipAddressPrefixAdvPreferredLifetime Unsigned32, - ipAddressPrefixAdvValidLifetime Unsigned32 - } - -ipAddressPrefixIfIndex OBJECT-TYPE - SYNTAX InterfaceIndex - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The index value that uniquely identifies the interface on - which this prefix is configured. The interface identified - by a particular value of this index is the same interface as - identified by the same value of the IF-MIB's ifIndex." - ::= { ipAddressPrefixEntry 1 } - -ipAddressPrefixType OBJECT-TYPE - SYNTAX InetAddressType - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The address type of ipAddressPrefix." - ::= { ipAddressPrefixEntry 2 } - -ipAddressPrefixPrefix OBJECT-TYPE - SYNTAX InetAddress - MAX-ACCESS not-accessible - STATUS current - - - - DESCRIPTION - "The address prefix. The address type of this object is - specified in ipAddressPrefixType. The length of this object - is the standard length for objects of that type (4 or 16 - bytes). Any bits after ipAddressPrefixLength must be zero. - - Implementors need to be aware that, if the size of - ipAddressPrefixPrefix exceeds 114 octets, then OIDS of - instances of columns in this row will have more than 128 - sub-identifiers and cannot be accessed using SNMPv1, - SNMPv2c, or SNMPv3." - ::= { ipAddressPrefixEntry 3 } - -ipAddressPrefixLength OBJECT-TYPE - SYNTAX InetAddressPrefixLength - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The prefix length associated with this prefix. - - The value 0 has no special meaning for this object. It - simply refers to address '::/0'." - ::= { ipAddressPrefixEntry 4 } - -ipAddressPrefixOrigin OBJECT-TYPE - SYNTAX IpAddressPrefixOriginTC - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The origin of this prefix." - ::= { ipAddressPrefixEntry 5 } - -ipAddressPrefixOnLinkFlag OBJECT-TYPE - SYNTAX TruthValue - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "This object has the value 'true(1)', if this prefix can be - used for on-link determination; otherwise, the value is - 'false(2)'. - - The default for IPv4 prefixes is 'true(1)'." - REFERENCE "For IPv6 RFC 2461, especially sections 2 and 4.6.2 and - RFC 2462" - ::= { ipAddressPrefixEntry 6 } - -ipAddressPrefixAutonomousFlag OBJECT-TYPE - SYNTAX TruthValue - - - - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "Autonomous address configuration flag. When true(1), - indicates that this prefix can be used for autonomous - address configuration (i.e., can be used to form a local - interface address). If false(2), it is not used to auto- - configure a local interface address. - - The default for IPv4 prefixes is 'false(2)'." - REFERENCE "For IPv6 RFC 2461, especially sections 2 and 4.6.2 and - RFC 2462" - ::= { ipAddressPrefixEntry 7 } - -ipAddressPrefixAdvPreferredLifetime OBJECT-TYPE - SYNTAX Unsigned32 - UNITS "seconds" - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The remaining length of time, in seconds, that this prefix - will continue to be preferred, i.e., time until deprecation. - - A value of 4,294,967,295 represents infinity. - - The address generated from a deprecated prefix should no - longer be used as a source address in new communications, - but packets received on such an interface are processed as - expected. - - The default for IPv4 prefixes is 4,294,967,295 (infinity)." - REFERENCE "For IPv6 RFC 2461, especially sections 2 and 4.6.2 and - RFC 2462" - ::= { ipAddressPrefixEntry 8 } - -ipAddressPrefixAdvValidLifetime OBJECT-TYPE - SYNTAX Unsigned32 - UNITS "seconds" - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The remaining length of time, in seconds, that this prefix - will continue to be valid, i.e., time until invalidation. A - value of 4,294,967,295 represents infinity. - - The address generated from an invalidated prefix should not - appear as the destination or source address of a packet. - - - - - The default for IPv4 prefixes is 4,294,967,295 (infinity)." - REFERENCE "For IPv6 RFC 2461, especially sections 2 and 4.6.2 and - RFC 2462" - ::= { ipAddressPrefixEntry 9 } - --- --- Internet Address Table --- - -ipAddressSpinLock OBJECT-TYPE - SYNTAX TestAndIncr - MAX-ACCESS read-write - STATUS current - DESCRIPTION - "An advisory lock used to allow cooperating SNMP managers to - coordinate their use of the set operation in creating or - modifying rows within this table. - - In order to use this lock to coordinate the use of set - operations, managers should first retrieve - ipAddressTableSpinLock. They should then determine the - appropriate row to create or modify. Finally, they should - issue the appropriate set command, including the retrieved - value of ipAddressSpinLock. If another manager has altered - the table in the meantime, then the value of - ipAddressSpinLock will have changed, and the creation will - fail as it will be specifying an incorrect value for - ipAddressSpinLock. It is suggested, but not required, that - the ipAddressSpinLock be the first var bind for each set of - objects representing a 'row' in a PDU." - ::= { ip 33 } - -ipAddressTable OBJECT-TYPE - SYNTAX SEQUENCE OF IpAddressEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "This table contains addressing information relevant to the - entity's interfaces. - - This table does not contain multicast address information. - Tables for such information should be contained in multicast - specific MIBs, such as RFC 3019. - - While this table is writable, the user will note that - several objects, such as ipAddressOrigin, are not. The - intention in allowing a user to write to this table is to - allow them to add or remove any entry that isn't - - - - permanent. The user should be allowed to modify objects - and entries when that would not cause inconsistencies - within the table. Allowing write access to objects, such - as ipAddressOrigin, could allow a user to insert an entry - and then label it incorrectly. - - Note well: When including IPv6 link-local addresses in this - table, the entry must use an InetAddressType of 'ipv6z' in - order to differentiate between the possible interfaces." - ::= { ip 34 } - -ipAddressEntry OBJECT-TYPE - SYNTAX IpAddressEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "An address mapping for a particular interface." - INDEX { ipAddressAddrType, ipAddressAddr } - ::= { ipAddressTable 1 } - -IpAddressEntry ::= SEQUENCE { - ipAddressAddrType InetAddressType, - ipAddressAddr InetAddress, - ipAddressIfIndex InterfaceIndex, - ipAddressType INTEGER, - ipAddressPrefix RowPointer, - ipAddressOrigin IpAddressOriginTC, - ipAddressStatus IpAddressStatusTC, - ipAddressCreated TimeStamp, - ipAddressLastChanged TimeStamp, - ipAddressRowStatus RowStatus, - ipAddressStorageType StorageType - } - -ipAddressAddrType OBJECT-TYPE - SYNTAX InetAddressType - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The address type of ipAddressAddr." - ::= { ipAddressEntry 1 } - -ipAddressAddr OBJECT-TYPE - SYNTAX InetAddress - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The IP address to which this entry's addressing information - - - - pertains. The address type of this object is specified in - ipAddressAddrType. - - Implementors need to be aware that if the size of - ipAddressAddr exceeds 116 octets, then OIDS of instances of - columns in this row will have more than 128 sub-identifiers - and cannot be accessed using SNMPv1, SNMPv2c, or SNMPv3." - ::= { ipAddressEntry 2 } - -ipAddressIfIndex OBJECT-TYPE - SYNTAX InterfaceIndex - MAX-ACCESS read-create - STATUS current - DESCRIPTION - "The index value that uniquely identifies the interface to - which this entry is applicable. The interface identified by - a particular value of this index is the same interface as - identified by the same value of the IF-MIB's ifIndex." - ::= { ipAddressEntry 3 } - -ipAddressType OBJECT-TYPE - SYNTAX INTEGER { - unicast(1), - anycast(2), - broadcast(3) - } - MAX-ACCESS read-create - STATUS current - DESCRIPTION - "The type of address. broadcast(3) is not a valid value for - IPv6 addresses (RFC 3513)." - DEFVAL { unicast } - ::= { ipAddressEntry 4 } - -ipAddressPrefix OBJECT-TYPE - SYNTAX RowPointer - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "A pointer to the row in the prefix table to which this - address belongs. May be { 0 0 } if there is no such row." - DEFVAL { zeroDotZero } - ::= { ipAddressEntry 5 } - -ipAddressOrigin OBJECT-TYPE - SYNTAX IpAddressOriginTC - MAX-ACCESS read-only - STATUS current - - - - DESCRIPTION - "The origin of the address." - ::= { ipAddressEntry 6 } - -ipAddressStatus OBJECT-TYPE - SYNTAX IpAddressStatusTC - MAX-ACCESS read-create - STATUS current - DESCRIPTION - "The status of the address, describing if the address can be - used for communication. - - In the absence of other information, an IPv4 address is - always preferred(1)." - DEFVAL { preferred } - ::= { ipAddressEntry 7 } - -ipAddressCreated OBJECT-TYPE - SYNTAX TimeStamp - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The value of sysUpTime at the time this entry was created. - If this entry was created prior to the last re- - initialization of the local network management subsystem, - then this object contains a zero value." - ::= { ipAddressEntry 8 } - -ipAddressLastChanged OBJECT-TYPE - SYNTAX TimeStamp - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The value of sysUpTime at the time this entry was last - updated. If this entry was updated prior to the last re- - initialization of the local network management subsystem, - then this object contains a zero value." - ::= { ipAddressEntry 9 } - -ipAddressRowStatus OBJECT-TYPE - SYNTAX RowStatus - MAX-ACCESS read-create - STATUS current - DESCRIPTION - "The status of this conceptual row. - - The RowStatus TC requires that this DESCRIPTION clause - states under which circumstances other objects in this row - - - - can be modified. The value of this object has no effect on - whether other objects in this conceptual row can be - modified. - - A conceptual row can not be made active until the - ipAddressIfIndex has been set to a valid index." - ::= { ipAddressEntry 10 } - -ipAddressStorageType OBJECT-TYPE - SYNTAX StorageType - MAX-ACCESS read-create - STATUS current - DESCRIPTION - "The storage type for this conceptual row. If this object - has a value of 'permanent', then no other objects are - required to be able to be modified." - DEFVAL { volatile } - ::= { ipAddressEntry 11 } - --- --- the Internet Address Translation table --- - -ipNetToPhysicalTable OBJECT-TYPE - SYNTAX SEQUENCE OF IpNetToPhysicalEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The IP Address Translation table used for mapping from IP - addresses to physical addresses. - - The Address Translation tables contain the IP address to - 'physical' address equivalences. Some interfaces do not use - translation tables for determining address equivalences - (e.g., DDN-X.25 has an algorithmic method); if all - interfaces are of this type, then the Address Translation - table is empty, i.e., has zero entries. - - While many protocols may be used to populate this table, ARP - and Neighbor Discovery are the most likely - options." - REFERENCE "RFC 826 and RFC 2461" - ::= { ip 35 } - -ipNetToPhysicalEntry OBJECT-TYPE - SYNTAX IpNetToPhysicalEntry - MAX-ACCESS not-accessible - STATUS current - - - - DESCRIPTION - "Each entry contains one IP address to `physical' address - equivalence." - INDEX { ipNetToPhysicalIfIndex, - ipNetToPhysicalNetAddressType, - ipNetToPhysicalNetAddress } - ::= { ipNetToPhysicalTable 1 } - -IpNetToPhysicalEntry ::= SEQUENCE { - ipNetToPhysicalIfIndex InterfaceIndex, - ipNetToPhysicalNetAddressType InetAddressType, - ipNetToPhysicalNetAddress InetAddress, - ipNetToPhysicalPhysAddress PhysAddress, - ipNetToPhysicalLastUpdated TimeStamp, - ipNetToPhysicalType INTEGER, - ipNetToPhysicalState INTEGER, - ipNetToPhysicalRowStatus RowStatus - } - -ipNetToPhysicalIfIndex OBJECT-TYPE - SYNTAX InterfaceIndex - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The index value that uniquely identifies the interface to - which this entry is applicable. The interface identified by - a particular value of this index is the same interface as - identified by the same value of the IF-MIB's ifIndex." - ::= { ipNetToPhysicalEntry 1 } - -ipNetToPhysicalNetAddressType OBJECT-TYPE - SYNTAX InetAddressType - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The type of ipNetToPhysicalNetAddress." - ::= { ipNetToPhysicalEntry 2 } - -ipNetToPhysicalNetAddress OBJECT-TYPE - SYNTAX InetAddress - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The IP Address corresponding to the media-dependent - `physical' address. The address type of this object is - specified in ipNetToPhysicalAddressType. - - Implementors need to be aware that if the size of - - - - ipNetToPhysicalNetAddress exceeds 115 octets, then OIDS of - instances of columns in this row will have more than 128 - sub-identifiers and cannot be accessed using SNMPv1, - SNMPv2c, or SNMPv3." - ::= { ipNetToPhysicalEntry 3 } - -ipNetToPhysicalPhysAddress OBJECT-TYPE - SYNTAX PhysAddress (SIZE(0..65535)) - MAX-ACCESS read-create - STATUS current - DESCRIPTION - "The media-dependent `physical' address. - - As the entries in this table are typically not persistent - when this object is written the entity SHOULD NOT save the - change to non-volatile storage." - ::= { ipNetToPhysicalEntry 4 } - -ipNetToPhysicalLastUpdated OBJECT-TYPE - SYNTAX TimeStamp - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The value of sysUpTime at the time this entry was last - updated. If this entry was updated prior to the last re- - initialization of the local network management subsystem, - then this object contains a zero value." - ::= { ipNetToPhysicalEntry 5 } - -ipNetToPhysicalType OBJECT-TYPE - SYNTAX INTEGER { - other(1), -- none of the following - invalid(2), -- an invalidated mapping - dynamic(3), - static(4), - local(5) -- local interface - } - MAX-ACCESS read-create - STATUS current - DESCRIPTION - "The type of mapping. - - Setting this object to the value invalid(2) has the effect - of invalidating the corresponding entry in the - ipNetToPhysicalTable. That is, it effectively dis- - associates the interface identified with said entry from the - mapping identified with said entry. It is an - implementation-specific matter as to whether the agent - - - - removes an invalidated entry from the table. Accordingly, - management stations must be prepared to receive tabular - information from agents that corresponds to entries not - currently in use. Proper interpretation of such entries - requires examination of the relevant ipNetToPhysicalType - object. - - The 'dynamic(3)' type indicates that the IP address to - physical addresses mapping has been dynamically resolved - using e.g., IPv4 ARP or the IPv6 Neighbor Discovery - protocol. - - The 'static(4)' type indicates that the mapping has been - statically configured. Both of these refer to entries that - provide mappings for other entities addresses. - - The 'local(5)' type indicates that the mapping is provided - for an entity's own interface address. - - As the entries in this table are typically not persistent - when this object is written the entity SHOULD NOT save the - change to non-volatile storage." - DEFVAL { static } - ::= { ipNetToPhysicalEntry 6 } - -ipNetToPhysicalState OBJECT-TYPE - SYNTAX INTEGER { - reachable(1), -- confirmed reachability - - stale(2), -- unconfirmed reachability - - delay(3), -- waiting for reachability - -- confirmation before entering - -- the probe state - - probe(4), -- actively probing - - invalid(5), -- an invalidated mapping - - unknown(6), -- state can not be determined - -- for some reason. - - incomplete(7) -- address resolution is being - -- performed. - } - MAX-ACCESS read-only - STATUS current - DESCRIPTION - - - - "The Neighbor Unreachability Detection state for the - interface when the address mapping in this entry is used. - If Neighbor Unreachability Detection is not in use (e.g. for - IPv4), this object is always unknown(6)." - REFERENCE "RFC 2461" - ::= { ipNetToPhysicalEntry 7 } - -ipNetToPhysicalRowStatus OBJECT-TYPE - SYNTAX RowStatus - MAX-ACCESS read-create - STATUS current - DESCRIPTION - "The status of this conceptual row. - - The RowStatus TC requires that this DESCRIPTION clause - states under which circumstances other objects in this row - can be modified. The value of this object has no effect on - whether other objects in this conceptual row can be - modified. - - A conceptual row can not be made active until the - ipNetToPhysicalPhysAddress object has been set. - - Note that if the ipNetToPhysicalType is set to 'invalid', - the managed node may delete the entry independent of the - state of this object." - ::= { ipNetToPhysicalEntry 8 } - --- --- The IPv6 Scope Zone Index Table. --- - -ipv6ScopeZoneIndexTable OBJECT-TYPE - SYNTAX SEQUENCE OF Ipv6ScopeZoneIndexEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The table used to describe IPv6 unicast and multicast scope - zones. - - For those objects that have names rather than numbers, the - names were chosen to coincide with the names used in the - IPv6 address architecture document. " - REFERENCE "Section 2.7 of RFC 4291" - ::= { ip 36 } - -ipv6ScopeZoneIndexEntry OBJECT-TYPE - SYNTAX Ipv6ScopeZoneIndexEntry - - - - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "Each entry contains the list of scope identifiers on a given - interface." - INDEX { ipv6ScopeZoneIndexIfIndex } - ::= { ipv6ScopeZoneIndexTable 1 } - -Ipv6ScopeZoneIndexEntry ::= SEQUENCE { - ipv6ScopeZoneIndexIfIndex InterfaceIndex, - ipv6ScopeZoneIndexLinkLocal InetZoneIndex, - ipv6ScopeZoneIndex3 InetZoneIndex, - ipv6ScopeZoneIndexAdminLocal InetZoneIndex, - ipv6ScopeZoneIndexSiteLocal InetZoneIndex, - ipv6ScopeZoneIndex6 InetZoneIndex, - ipv6ScopeZoneIndex7 InetZoneIndex, - ipv6ScopeZoneIndexOrganizationLocal InetZoneIndex, - ipv6ScopeZoneIndex9 InetZoneIndex, - ipv6ScopeZoneIndexA InetZoneIndex, - ipv6ScopeZoneIndexB InetZoneIndex, - ipv6ScopeZoneIndexC InetZoneIndex, - ipv6ScopeZoneIndexD InetZoneIndex - } - -ipv6ScopeZoneIndexIfIndex OBJECT-TYPE - SYNTAX InterfaceIndex - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The index value that uniquely identifies the interface to - which these scopes belong. The interface identified by a - particular value of this index is the same interface as - identified by the same value of the IF-MIB's ifIndex." - ::= { ipv6ScopeZoneIndexEntry 1 } - -ipv6ScopeZoneIndexLinkLocal OBJECT-TYPE - SYNTAX InetZoneIndex - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The zone index for the link-local scope on this interface." - ::= { ipv6ScopeZoneIndexEntry 2 } - -ipv6ScopeZoneIndex3 OBJECT-TYPE - SYNTAX InetZoneIndex - MAX-ACCESS read-only - STATUS current - DESCRIPTION - - - - "The zone index for scope 3 on this interface." - ::= { ipv6ScopeZoneIndexEntry 3 } - -ipv6ScopeZoneIndexAdminLocal OBJECT-TYPE - SYNTAX InetZoneIndex - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The zone index for the admin-local scope on this interface." - ::= { ipv6ScopeZoneIndexEntry 4 } - -ipv6ScopeZoneIndexSiteLocal OBJECT-TYPE - SYNTAX InetZoneIndex - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The zone index for the site-local scope on this interface." - ::= { ipv6ScopeZoneIndexEntry 5 } - -ipv6ScopeZoneIndex6 OBJECT-TYPE - SYNTAX InetZoneIndex - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The zone index for scope 6 on this interface." - ::= { ipv6ScopeZoneIndexEntry 6 } - -ipv6ScopeZoneIndex7 OBJECT-TYPE - SYNTAX InetZoneIndex - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The zone index for scope 7 on this interface." - ::= { ipv6ScopeZoneIndexEntry 7 } - -ipv6ScopeZoneIndexOrganizationLocal OBJECT-TYPE - SYNTAX InetZoneIndex - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The zone index for the organization-local scope on this - interface." - ::= { ipv6ScopeZoneIndexEntry 8 } - -ipv6ScopeZoneIndex9 OBJECT-TYPE - SYNTAX InetZoneIndex - MAX-ACCESS read-only - STATUS current - - - - DESCRIPTION - "The zone index for scope 9 on this interface." - ::= { ipv6ScopeZoneIndexEntry 9 } - -ipv6ScopeZoneIndexA OBJECT-TYPE - SYNTAX InetZoneIndex - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The zone index for scope A on this interface." - ::= { ipv6ScopeZoneIndexEntry 10 } - -ipv6ScopeZoneIndexB OBJECT-TYPE - SYNTAX InetZoneIndex - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The zone index for scope B on this interface." - ::= { ipv6ScopeZoneIndexEntry 11 } - -ipv6ScopeZoneIndexC OBJECT-TYPE - SYNTAX InetZoneIndex - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The zone index for scope C on this interface." - ::= { ipv6ScopeZoneIndexEntry 12 } - -ipv6ScopeZoneIndexD OBJECT-TYPE - SYNTAX InetZoneIndex - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The zone index for scope D on this interface." - ::= { ipv6ScopeZoneIndexEntry 13 } - --- --- The Default Router Table --- This table simply lists the default routers; for more information --- about routing tables, see the routing MIBs --- - -ipDefaultRouterTable OBJECT-TYPE - SYNTAX SEQUENCE OF IpDefaultRouterEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The table used to describe the default routers known to this - - - - entity." - ::= { ip 37 } - -ipDefaultRouterEntry OBJECT-TYPE - SYNTAX IpDefaultRouterEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "Each entry contains information about a default router known - to this entity." - INDEX {ipDefaultRouterAddressType, ipDefaultRouterAddress, - ipDefaultRouterIfIndex} - ::= { ipDefaultRouterTable 1 } - -IpDefaultRouterEntry ::= SEQUENCE { - ipDefaultRouterAddressType InetAddressType, - ipDefaultRouterAddress InetAddress, - ipDefaultRouterIfIndex InterfaceIndex, - ipDefaultRouterLifetime Unsigned32, - ipDefaultRouterPreference INTEGER - } - -ipDefaultRouterAddressType OBJECT-TYPE - SYNTAX InetAddressType - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The address type for this row." - ::= { ipDefaultRouterEntry 1 } - -ipDefaultRouterAddress OBJECT-TYPE - SYNTAX InetAddress - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The IP address of the default router represented by this - row. The address type of this object is specified in - ipDefaultRouterAddressType. - - Implementers need to be aware that if the size of - ipDefaultRouterAddress exceeds 115 octets, then OIDS of - instances of columns in this row will have more than 128 - sub-identifiers and cannot be accessed using SNMPv1, - SNMPv2c, or SNMPv3." - ::= { ipDefaultRouterEntry 2 } - -ipDefaultRouterIfIndex OBJECT-TYPE - SYNTAX InterfaceIndex - - - - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The index value that uniquely identifies the interface by - which the router can be reached. The interface identified - by a particular value of this index is the same interface as - identified by the same value of the IF-MIB's ifIndex." - ::= { ipDefaultRouterEntry 3 } - -ipDefaultRouterLifetime OBJECT-TYPE - SYNTAX Unsigned32 (0..65535) - UNITS "seconds" - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The remaining length of time, in seconds, that this router - will continue to be useful as a default router. A value of - zero indicates that it is no longer useful as a default - router. It is left to the implementer of the MIB as to - whether a router with a lifetime of zero is removed from the - list. - - For IPv6, this value should be extracted from the router - advertisement messages." - REFERENCE "For IPv6 RFC 2462 sections 4.2 and 6.3.4" - ::= { ipDefaultRouterEntry 4 } - -ipDefaultRouterPreference OBJECT-TYPE - SYNTAX INTEGER { - reserved (-2), - low (-1), - medium (0), - high (1) - } - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "An indication of preference given to this router as a - default router as described in he Default Router - Preferences document. Treating the value as a - 2 bit signed integer allows for simple arithmetic - comparisons. - - For IPv4 routers or IPv6 routers that are not using the - updated router advertisement format, this object is set to - medium (0)." - REFERENCE "RFC 4291, section 2.1" - ::= { ipDefaultRouterEntry 5 } - - - --- --- Configuration information for constructing router advertisements --- - -ipv6RouterAdvertSpinLock OBJECT-TYPE - SYNTAX TestAndIncr - MAX-ACCESS read-write - STATUS current - DESCRIPTION - "An advisory lock used to allow cooperating SNMP managers to - coordinate their use of the set operation in creating or - modifying rows within this table. - - In order to use this lock to coordinate the use of set - operations, managers should first retrieve - ipv6RouterAdvertSpinLock. They should then determine the - appropriate row to create or modify. Finally, they should - issue the appropriate set command including the retrieved - value of ipv6RouterAdvertSpinLock. If another manager has - altered the table in the meantime, then the value of - ipv6RouterAdvertSpinLock will have changed and the creation - will fail as it will be specifying an incorrect value for - ipv6RouterAdvertSpinLock. It is suggested, but not - required, that the ipv6RouterAdvertSpinLock be the first var - bind for each set of objects representing a 'row' in a PDU." - ::= { ip 38 } - -ipv6RouterAdvertTable OBJECT-TYPE - SYNTAX SEQUENCE OF Ipv6RouterAdvertEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The table containing information used to construct router - advertisements." - ::= { ip 39 } - -ipv6RouterAdvertEntry OBJECT-TYPE - SYNTAX Ipv6RouterAdvertEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "An entry containing information used to construct router - advertisements. - - Information in this table is persistent, and when this - object is written, the entity SHOULD save the change to - non-volatile storage." - INDEX { ipv6RouterAdvertIfIndex } - - - - ::= { ipv6RouterAdvertTable 1 } - -Ipv6RouterAdvertEntry ::= SEQUENCE { - ipv6RouterAdvertIfIndex InterfaceIndex, - ipv6RouterAdvertSendAdverts TruthValue, - ipv6RouterAdvertMaxInterval Unsigned32, - ipv6RouterAdvertMinInterval Unsigned32, - ipv6RouterAdvertManagedFlag TruthValue, - ipv6RouterAdvertOtherConfigFlag TruthValue, - ipv6RouterAdvertLinkMTU Unsigned32, - ipv6RouterAdvertReachableTime Unsigned32, - ipv6RouterAdvertRetransmitTime Unsigned32, - ipv6RouterAdvertCurHopLimit Unsigned32, - ipv6RouterAdvertDefaultLifetime Unsigned32, - ipv6RouterAdvertRowStatus RowStatus - } - -ipv6RouterAdvertIfIndex OBJECT-TYPE - SYNTAX InterfaceIndex - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The index value that uniquely identifies the interface on - which router advertisements constructed with this - information will be transmitted. The interface identified - by a particular value of this index is the same interface as - identified by the same value of the IF-MIB's ifIndex." - ::= { ipv6RouterAdvertEntry 1 } - -ipv6RouterAdvertSendAdverts OBJECT-TYPE - SYNTAX TruthValue - MAX-ACCESS read-create - STATUS current - DESCRIPTION - "A flag indicating whether the router sends periodic - router advertisements and responds to router solicitations - on this interface." - REFERENCE "RFC 2461 Section 6.2.1" - DEFVAL { false } - ::= { ipv6RouterAdvertEntry 2 } - -ipv6RouterAdvertMaxInterval OBJECT-TYPE - SYNTAX Unsigned32 (4..1800) - UNITS "seconds" - MAX-ACCESS read-create - STATUS current - DESCRIPTION - "The maximum time allowed between sending unsolicited router - - - - advertisements from this interface." - REFERENCE "RFC 2461 Section 6.2.1" - DEFVAL { 600 } - ::= { ipv6RouterAdvertEntry 3 } - -ipv6RouterAdvertMinInterval OBJECT-TYPE - SYNTAX Unsigned32 (3..1350) - UNITS "seconds" - MAX-ACCESS read-create - STATUS current - DESCRIPTION - "The minimum time allowed between sending unsolicited router - advertisements from this interface. - - The default is 0.33 * ipv6RouterAdvertMaxInterval, however, - in the case of a low value for ipv6RouterAdvertMaxInterval, - the minimum value for this object is restricted to 3." - REFERENCE "RFC 2461 Section 6.2.1" - ::= { ipv6RouterAdvertEntry 4 } - -ipv6RouterAdvertManagedFlag OBJECT-TYPE - SYNTAX TruthValue - MAX-ACCESS read-create - STATUS current - DESCRIPTION - "The true/false value to be placed into the 'managed address - configuration' flag field in router advertisements sent from - this interface." - REFERENCE "RFC 2461 Section 6.2.1" - DEFVAL { false } - ::= { ipv6RouterAdvertEntry 5 } - -ipv6RouterAdvertOtherConfigFlag OBJECT-TYPE - SYNTAX TruthValue - MAX-ACCESS read-create - STATUS current - DESCRIPTION - "The true/false value to be placed into the 'other stateful - configuration' flag field in router advertisements sent from - this interface." - REFERENCE "RFC 2461 Section 6.2.1" - DEFVAL { false } - ::= { ipv6RouterAdvertEntry 6 } - -ipv6RouterAdvertLinkMTU OBJECT-TYPE - SYNTAX Unsigned32 - MAX-ACCESS read-create - STATUS current - - - - DESCRIPTION - "The value to be placed in MTU options sent by the router on - this interface. - - A value of zero indicates that no MTU options are sent." - REFERENCE "RFC 2461 Section 6.2.1" - DEFVAL { 0 } - ::= { ipv6RouterAdvertEntry 7 } - -ipv6RouterAdvertReachableTime OBJECT-TYPE - SYNTAX Unsigned32 (0..3600000) - UNITS "milliseconds" - MAX-ACCESS read-create - STATUS current - DESCRIPTION - "The value to be placed in the reachable time field in router - advertisement messages sent from this interface. - - A value of zero in the router advertisement indicates that - the advertisement isn't specifying a value for reachable - time." - REFERENCE "RFC 2461 Section 6.2.1" - DEFVAL { 0 } - ::= { ipv6RouterAdvertEntry 8 } - -ipv6RouterAdvertRetransmitTime OBJECT-TYPE - SYNTAX Unsigned32 - UNITS "milliseconds" - MAX-ACCESS read-create - STATUS current - DESCRIPTION - "The value to be placed in the retransmit timer field in - router advertisements sent from this interface. - - A value of zero in the router advertisement indicates that - the advertisement isn't specifying a value for retrans - time." - REFERENCE "RFC 2461 Section 6.2.1" - DEFVAL { 0 } - ::= { ipv6RouterAdvertEntry 9 } - -ipv6RouterAdvertCurHopLimit OBJECT-TYPE - SYNTAX Unsigned32 (0..255) - MAX-ACCESS read-create - STATUS current - DESCRIPTION - "The default value to be placed in the current hop limit - field in router advertisements sent from this interface. - - - - The value should be set to the current diameter of the - Internet. - - A value of zero in the router advertisement indicates that - the advertisement isn't specifying a value for curHopLimit. - - The default should be set to the value specified in the IANA - web pages (www.iana.org) at the time of implementation." - REFERENCE "RFC 2461 Section 6.2.1" - ::= { ipv6RouterAdvertEntry 10 } - -ipv6RouterAdvertDefaultLifetime OBJECT-TYPE - SYNTAX Unsigned32 (0|4..9000) - UNITS "seconds" - MAX-ACCESS read-create - STATUS current - DESCRIPTION - "The value to be placed in the router lifetime field of - router advertisements sent from this interface. This value - MUST be either 0 or between ipv6RouterAdvertMaxInterval and - 9000 seconds. - - A value of zero indicates that the router is not to be used - as a default router. - - The default is 3 * ipv6RouterAdvertMaxInterval." - REFERENCE "RFC 2461 Section 6.2.1" - ::= { ipv6RouterAdvertEntry 11 } - -ipv6RouterAdvertRowStatus OBJECT-TYPE - SYNTAX RowStatus - MAX-ACCESS read-create - STATUS current - DESCRIPTION - "The status of this conceptual row. - - As all objects in this conceptual row have default values, a - row can be created and made active by setting this object - appropriately. - - The RowStatus TC requires that this DESCRIPTION clause - states under which circumstances other objects in this row - can be modified. The value of this object has no effect on - whether other objects in this conceptual row can be - modified." - ::= { ipv6RouterAdvertEntry 12 } - --- - - - --- ICMP section --- - -icmp OBJECT IDENTIFIER ::= { mib-2 5 } - --- --- ICMP non-message-specific counters --- - --- These object IDs are reserved, as they were used in earlier --- versions of the MIB module. In theory, OIDs are not assigned --- until the specification is released as an RFC; however, as some --- companies may have shipped code based on earlier versions of --- the MIB, it seems best to reserve these OIDs. --- ::= { icmp 27 } --- ::= { icmp 28 } - -icmpStatsTable OBJECT-TYPE - SYNTAX SEQUENCE OF IcmpStatsEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The table of generic system-wide ICMP counters." - ::= { icmp 29 } - -icmpStatsEntry OBJECT-TYPE - SYNTAX IcmpStatsEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "A conceptual row in the icmpStatsTable." - INDEX { icmpStatsIPVersion } - ::= { icmpStatsTable 1 } - -IcmpStatsEntry ::= SEQUENCE { - icmpStatsIPVersion InetVersion, - icmpStatsInMsgs Counter32, - icmpStatsInErrors Counter32, - icmpStatsOutMsgs Counter32, - icmpStatsOutErrors Counter32 - } - -icmpStatsIPVersion OBJECT-TYPE - SYNTAX InetVersion - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The IP version of the statistics." - - - - ::= { icmpStatsEntry 1 } - -icmpStatsInMsgs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of ICMP messages that the entity received. - Note that this counter includes all those counted by - icmpStatsInErrors." - ::= { icmpStatsEntry 2 } - -icmpStatsInErrors OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of ICMP messages that the entity received but - determined as having ICMP-specific errors (bad ICMP - checksums, bad length, etc.)." - ::= { icmpStatsEntry 3 } - -icmpStatsOutMsgs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of ICMP messages that the entity attempted - to send. Note that this counter includes all those counted - by icmpStatsOutErrors." - ::= { icmpStatsEntry 4 } - -icmpStatsOutErrors OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of ICMP messages that this entity did not send - due to problems discovered within ICMP, such as a lack of - buffers. This value should not include errors discovered - outside the ICMP layer, such as the inability of IP to route - the resultant datagram. In some implementations, there may - be no types of error that contribute to this counter's - value." - ::= { icmpStatsEntry 5 } - --- --- per-version, per-message type ICMP counters - - - --- - -icmpMsgStatsTable OBJECT-TYPE - SYNTAX SEQUENCE OF IcmpMsgStatsEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The table of system-wide per-version, per-message type ICMP - counters." - ::= { icmp 30 } - -icmpMsgStatsEntry OBJECT-TYPE - SYNTAX IcmpMsgStatsEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "A conceptual row in the icmpMsgStatsTable. - - The system should track each ICMP type value, even if that - ICMP type is not supported by the system. However, a - given row need not be instantiated unless a message of that - type has been processed, i.e., the row for - icmpMsgStatsType=X MAY be instantiated before but MUST be - instantiated after the first message with Type=X is - received or transmitted. After receiving or transmitting - any succeeding messages with Type=X, the relevant counter - must be incremented." - INDEX { icmpMsgStatsIPVersion, icmpMsgStatsType } - ::= { icmpMsgStatsTable 1 } - -IcmpMsgStatsEntry ::= SEQUENCE { - icmpMsgStatsIPVersion InetVersion, - icmpMsgStatsType Integer32, - icmpMsgStatsInPkts Counter32, - icmpMsgStatsOutPkts Counter32 - } - -icmpMsgStatsIPVersion OBJECT-TYPE - SYNTAX InetVersion - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The IP version of the statistics." - ::= { icmpMsgStatsEntry 1 } - -icmpMsgStatsType OBJECT-TYPE - SYNTAX Integer32 (0..255) - MAX-ACCESS not-accessible - - - - STATUS current - DESCRIPTION - "The ICMP type field of the message type being counted by - this row. - - Note that ICMP message types are scoped by the address type - in use." - REFERENCE "http://www.iana.org/assignments/icmp-parameters and - http://www.iana.org/assignments/icmpv6-parameters" - ::= { icmpMsgStatsEntry 2 } - -icmpMsgStatsInPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of input packets for this AF and type." - ::= { icmpMsgStatsEntry 3 } - -icmpMsgStatsOutPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of output packets for this AF and type." - ::= { icmpMsgStatsEntry 4 } --- --- conformance information --- - -ipMIBConformance OBJECT IDENTIFIER ::= { ipMIB 2 } - -ipMIBCompliances OBJECT IDENTIFIER ::= { ipMIBConformance 1 } -ipMIBGroups OBJECT IDENTIFIER ::= { ipMIBConformance 2 } - --- compliance statements -ipMIBCompliance2 MODULE-COMPLIANCE - STATUS current - DESCRIPTION - "The compliance statement for systems that implement IP - - either IPv4 or IPv6. - - There are a number of INDEX objects that cannot be - represented in the form of OBJECT clauses in SMIv2, but - for which we have the following compliance requirements, - expressed in OBJECT clause form in this description - clause: - - - - - -- OBJECT ipSystemStatsIPVersion - -- SYNTAX InetVersion {ipv4(1), ipv6(2)} - -- DESCRIPTION - -- This MIB requires support for only IPv4 and IPv6 - -- versions. - -- - -- OBJECT ipIfStatsIPVersion - -- SYNTAX InetVersion {ipv4(1), ipv6(2)} - -- DESCRIPTION - -- This MIB requires support for only IPv4 and IPv6 - -- versions. - -- - -- OBJECT icmpStatsIPVersion - -- SYNTAX InetVersion {ipv4(1), ipv6(2)} - -- DESCRIPTION - -- This MIB requires support for only IPv4 and IPv6 - -- versions. - -- - -- OBJECT icmpMsgStatsIPVersion - -- SYNTAX InetVersion {ipv4(1), ipv6(2)} - -- DESCRIPTION - -- This MIB requires support for only IPv4 and IPv6 - -- versions. - -- - -- OBJECT ipAddressPrefixType - -- SYNTAX InetAddressType {ipv4(1), ipv6(2)} - -- DESCRIPTION - -- This MIB requires support for only global IPv4 and - -- IPv6 address types. - -- - -- OBJECT ipAddressPrefixPrefix - -- SYNTAX InetAddress (Size(4 | 16)) - -- DESCRIPTION - -- This MIB requires support for only global IPv4 and - -- IPv6 addresses and so the size can be either 4 or - -- 16 bytes. - -- - -- OBJECT ipAddressAddrType - -- SYNTAX InetAddressType {ipv4(1), ipv6(2), - -- ipv4z(3), ipv6z(4)} - -- DESCRIPTION - -- This MIB requires support for only global and - -- non-global IPv4 and IPv6 address types. - -- - -- OBJECT ipAddressAddr - -- SYNTAX InetAddress (Size(4 | 8 | 16 | 20)) - -- DESCRIPTION - -- This MIB requires support for only global and - - - - -- non-global IPv4 and IPv6 addresses and so the size - -- can be 4, 8, 16, or 20 bytes. - -- - -- OBJECT ipNetToPhysicalNetAddressType - -- SYNTAX InetAddressType {ipv4(1), ipv6(2), - -- ipv4z(3), ipv6z(4)} - -- DESCRIPTION - -- This MIB requires support for only global and - -- non-global IPv4 and IPv6 address types. - -- - -- OBJECT ipNetToPhysicalNetAddress - -- SYNTAX InetAddress (Size(4 | 8 | 16 | 20)) - -- DESCRIPTION - -- This MIB requires support for only global and - -- non-global IPv4 and IPv6 addresses and so the size - -- can be 4, 8, 16, or 20 bytes. - -- - -- OBJECT ipDefaultRouterAddressType - -- SYNTAX InetAddressType {ipv4(1), ipv6(2), - -- ipv4z(3), ipv6z(4)} - -- DESCRIPTION - -- This MIB requires support for only global and - -- non-global IPv4 and IPv6 address types. - -- - -- OBJECT ipDefaultRouterAddress - -- SYNTAX InetAddress (Size(4 | 8 | 16 | 20)) - -- DESCRIPTION - -- This MIB requires support for only global and - -- non-global IPv4 and IPv6 addresses and so the size - -- can be 4, 8, 16, or 20 bytes." - - MODULE -- this module - - MANDATORY-GROUPS { ipSystemStatsGroup, ipAddressGroup, - ipNetToPhysicalGroup, ipDefaultRouterGroup, - icmpStatsGroup } - - GROUP ipSystemStatsHCOctetGroup - DESCRIPTION - "This group is mandatory for systems that have an aggregate - bandwidth of greater than 20MB. Including this group does - not allow an entity to neglect the 32 bit versions of these - objects." - - GROUP ipSystemStatsHCPacketGroup - DESCRIPTION - "This group is mandatory for systems that have an aggregate - bandwidth of greater than 650MB. Including this group - - - - does not allow an entity to neglect the 32 bit versions of - these objects." - - GROUP ipIfStatsGroup - DESCRIPTION - "This group is optional for all systems." - - GROUP ipIfStatsHCOctetGroup - DESCRIPTION - "This group is mandatory for systems that include the - ipIfStatsGroup and include links with bandwidths of greater - than 20MB. Including this group does not allow an entity to - neglect the 32 bit versions of these objects." - - GROUP ipIfStatsHCPacketGroup - DESCRIPTION - "This group is mandatory for systems that include the - ipIfStatsGroup and include links with bandwidths of greater - than 650MB. Including this group does not allow an entity - to neglect the 32 bit versions of these objects." - - GROUP ipv4GeneralGroup - DESCRIPTION - "This group is mandatory for all systems supporting IPv4." - - GROUP ipv4IfGroup - DESCRIPTION - "This group is mandatory for all systems supporting IPv4." - - GROUP ipv4SystemStatsGroup - DESCRIPTION - "This group is mandatory for all systems supporting IPv4." - - GROUP ipv4SystemStatsHCPacketGroup - DESCRIPTION - "This group is mandatory for all systems supporting IPv4 and - that have an aggregate bandwidth of greater than 650MB. - Including this group does not allow an entity to neglect the - 32 bit versions of these objects." - - GROUP ipv4IfStatsGroup - DESCRIPTION - "This group is mandatory for all systems supporting IPv4 and - including the ipIfStatsGroup." - - GROUP ipv4IfStatsHCPacketGroup - DESCRIPTION - "This group is mandatory for all systems supporting IPv4 and - - - - including the ipIfStatsHCPacketGroup. Including this group - does not allow an entity to neglect the 32 bit versions of - these objects." - - GROUP ipv6GeneralGroup2 - DESCRIPTION - "This group is mandatory for all systems supporting IPv6." - - GROUP ipv6IfGroup - DESCRIPTION - "This group is mandatory for all systems supporting IPv6." - - GROUP ipAddressPrefixGroup - DESCRIPTION - "This group is mandatory for all systems supporting IPv6." - - GROUP ipv6ScopeGroup - DESCRIPTION - "This group is mandatory for all systems supporting IPv6." - - GROUP ipv6RouterAdvertGroup - DESCRIPTION - "This group is mandatory for all IPv6 routers." - - GROUP ipLastChangeGroup - DESCRIPTION - "This group is optional for all agents." - - OBJECT ipv6IpForwarding - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write access to this - object." - - OBJECT ipv6IpDefaultHopLimit - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write access to this - object." - - OBJECT ipv4InterfaceEnableStatus - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write access to this - object." - - OBJECT ipv6InterfaceEnableStatus - MIN-ACCESS read-only - - - - DESCRIPTION - "An agent is not required to provide write access to this - object." - - OBJECT ipv6InterfaceForwarding - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write access to this - object." - - OBJECT ipAddressSpinLock - MIN-ACCESS not-accessible - DESCRIPTION - "An agent is not required to provide write access to this - object. However, if an agent provides write access to any - of the other objects in the ipAddressGroup, it SHOULD - provide write access to this object as well." - - OBJECT ipAddressIfIndex - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write or create access - to this object." - - OBJECT ipAddressType - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write or create access - to this object." - - OBJECT ipAddressStatus - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write or create access - to this object." - - OBJECT ipAddressRowStatus - SYNTAX RowStatus { active(1) } - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write or create access - to this object." - - OBJECT ipAddressStorageType - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write or create access - to this object. - - - - If an agent allows this object to be written or created, it - is not required to allow this object to be set to readOnly, - permanent, or nonVolatile." - - OBJECT ipNetToPhysicalPhysAddress - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write or create access - to this object." - - OBJECT ipNetToPhysicalType - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write or create access - to this object." - - OBJECT ipv6RouterAdvertSpinLock - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write access to this - object. However, if an agent provides write access to - any of the other objects in the ipv6RouterAdvertGroup, it - SHOULD provide write access to this object as well." - - OBJECT ipv6RouterAdvertSendAdverts - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write access to this - object." - - OBJECT ipv6RouterAdvertMaxInterval - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write access to this - object." - - OBJECT ipv6RouterAdvertMinInterval - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write access to this - object." - - OBJECT ipv6RouterAdvertManagedFlag - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write access to this - object." - - - - - OBJECT ipv6RouterAdvertOtherConfigFlag - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write access to this - object." - - OBJECT ipv6RouterAdvertLinkMTU - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write access to this - object." - - OBJECT ipv6RouterAdvertReachableTime - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write access to this - object." - - OBJECT ipv6RouterAdvertRetransmitTime - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write access to this - object." - - OBJECT ipv6RouterAdvertCurHopLimit - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write access to this - object." - - OBJECT ipv6RouterAdvertDefaultLifetime - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write access to this - object." - - OBJECT ipv6RouterAdvertRowStatus - MIN-ACCESS read-only - DESCRIPTION - "An agent is not required to provide write or create access - to this object." - - ::= { ipMIBCompliances 2 } - --- units of conformance - -ipv4GeneralGroup OBJECT-GROUP - OBJECTS { ipForwarding, ipDefaultTTL, ipReasmTimeout } - - - - STATUS current - DESCRIPTION - "The group of IPv4-specific objects for basic management of - IPv4 entities." - ::= { ipMIBGroups 3 } - -ipv4IfGroup OBJECT-GROUP - OBJECTS { ipv4InterfaceReasmMaxSize, ipv4InterfaceEnableStatus, - ipv4InterfaceRetransmitTime } - STATUS current - DESCRIPTION - "The group of IPv4-specific objects for basic management of - IPv4 interfaces." - ::= { ipMIBGroups 4 } - -ipv6GeneralGroup2 OBJECT-GROUP - OBJECTS { ipv6IpForwarding, ipv6IpDefaultHopLimit } - STATUS current - DESCRIPTION - "The IPv6 group of objects providing for basic management of - IPv6 entities." - ::= { ipMIBGroups 5 } - -ipv6IfGroup OBJECT-GROUP - OBJECTS { ipv6InterfaceReasmMaxSize, ipv6InterfaceIdentifier, - ipv6InterfaceEnableStatus, ipv6InterfaceReachableTime, - ipv6InterfaceRetransmitTime, ipv6InterfaceForwarding } - STATUS current - DESCRIPTION - "The group of IPv6-specific objects for basic management of - IPv6 interfaces." - ::= { ipMIBGroups 6 } - -ipLastChangeGroup OBJECT-GROUP - OBJECTS { ipv4InterfaceTableLastChange, - ipv6InterfaceTableLastChange, - ipIfStatsTableLastChange } - STATUS current - DESCRIPTION - "The last change objects associated with this MIB. These - objects are optional for all agents. They SHOULD be - implemented on agents where it is possible to determine the - proper values. Where it is not possible to determine the - proper values, for example when the tables are split amongst - several sub-agents using AgentX, the agent MUST NOT - implement these objects to return an incorrect or static - value." - ::= { ipMIBGroups 7 } - - - -ipSystemStatsGroup OBJECT-GROUP - OBJECTS { ipSystemStatsInReceives, - ipSystemStatsInOctets, - ipSystemStatsInHdrErrors, - ipSystemStatsInNoRoutes, - ipSystemStatsInAddrErrors, - ipSystemStatsInUnknownProtos, - ipSystemStatsInTruncatedPkts, - ipSystemStatsInForwDatagrams, - ipSystemStatsReasmReqds, - ipSystemStatsReasmOKs, - ipSystemStatsReasmFails, - ipSystemStatsInDiscards, - ipSystemStatsInDelivers, - ipSystemStatsOutRequests, - ipSystemStatsOutNoRoutes, - ipSystemStatsOutForwDatagrams, - ipSystemStatsOutDiscards, - ipSystemStatsOutFragReqds, - ipSystemStatsOutFragOKs, - ipSystemStatsOutFragFails, - ipSystemStatsOutFragCreates, - ipSystemStatsOutTransmits, - ipSystemStatsOutOctets, - ipSystemStatsInMcastPkts, - ipSystemStatsInMcastOctets, - ipSystemStatsOutMcastPkts, - ipSystemStatsOutMcastOctets, - ipSystemStatsDiscontinuityTime, - ipSystemStatsRefreshRate } - STATUS current - DESCRIPTION - "IP system wide statistics." - ::= { ipMIBGroups 8 } - -ipv4SystemStatsGroup OBJECT-GROUP - OBJECTS { ipSystemStatsInBcastPkts, ipSystemStatsOutBcastPkts } - STATUS current - DESCRIPTION - "IPv4 only system wide statistics." - ::= { ipMIBGroups 9 } - -ipSystemStatsHCOctetGroup OBJECT-GROUP - OBJECTS { ipSystemStatsHCInOctets, - ipSystemStatsHCOutOctets, - ipSystemStatsHCInMcastOctets, - ipSystemStatsHCOutMcastOctets -} - - - - STATUS current - DESCRIPTION - "IP system wide statistics for systems that may overflow the - standard octet counters within 1 hour." - ::= { ipMIBGroups 10 } - -ipSystemStatsHCPacketGroup OBJECT-GROUP - OBJECTS { ipSystemStatsHCInReceives, - ipSystemStatsHCInForwDatagrams, - ipSystemStatsHCInDelivers, - ipSystemStatsHCOutRequests, - ipSystemStatsHCOutForwDatagrams, - ipSystemStatsHCOutTransmits, - ipSystemStatsHCInMcastPkts, - ipSystemStatsHCOutMcastPkts -} - STATUS current - DESCRIPTION - "IP system wide statistics for systems that may overflow the - standard packet counters within 1 hour." - ::= { ipMIBGroups 11 } - -ipv4SystemStatsHCPacketGroup OBJECT-GROUP - OBJECTS { ipSystemStatsHCInBcastPkts, - ipSystemStatsHCOutBcastPkts } - STATUS current - DESCRIPTION - "IPv4 only system wide statistics for systems that may - overflow the standard packet counters within 1 hour." - ::= { ipMIBGroups 12 } - -ipIfStatsGroup OBJECT-GROUP - OBJECTS { ipIfStatsInReceives, ipIfStatsInOctets, - ipIfStatsInHdrErrors, ipIfStatsInNoRoutes, - ipIfStatsInAddrErrors, ipIfStatsInUnknownProtos, - ipIfStatsInTruncatedPkts, ipIfStatsInForwDatagrams, - ipIfStatsReasmReqds, ipIfStatsReasmOKs, - ipIfStatsReasmFails, ipIfStatsInDiscards, - ipIfStatsInDelivers, ipIfStatsOutRequests, - ipIfStatsOutForwDatagrams, ipIfStatsOutDiscards, - ipIfStatsOutFragReqds, ipIfStatsOutFragOKs, - ipIfStatsOutFragFails, ipIfStatsOutFragCreates, - ipIfStatsOutTransmits, ipIfStatsOutOctets, - ipIfStatsInMcastPkts, ipIfStatsInMcastOctets, - ipIfStatsOutMcastPkts, ipIfStatsOutMcastOctets, - ipIfStatsDiscontinuityTime, ipIfStatsRefreshRate } - STATUS current - DESCRIPTION - - - - "IP per-interface statistics." - ::= { ipMIBGroups 13 } - -ipv4IfStatsGroup OBJECT-GROUP - OBJECTS { ipIfStatsInBcastPkts, ipIfStatsOutBcastPkts } - STATUS current - DESCRIPTION - "IPv4 only per-interface statistics." - ::= { ipMIBGroups 14 } - -ipIfStatsHCOctetGroup OBJECT-GROUP - OBJECTS { ipIfStatsHCInOctets, ipIfStatsHCOutOctets, - ipIfStatsHCInMcastOctets, ipIfStatsHCOutMcastOctets } - STATUS current - DESCRIPTION - "IP per-interfaces statistics for systems that include - interfaces that may overflow the standard octet - counters within 1 hour." - ::= { ipMIBGroups 15 } - -ipIfStatsHCPacketGroup OBJECT-GROUP - OBJECTS { ipIfStatsHCInReceives, ipIfStatsHCInForwDatagrams, - ipIfStatsHCInDelivers, ipIfStatsHCOutRequests, - ipIfStatsHCOutForwDatagrams, ipIfStatsHCOutTransmits, - ipIfStatsHCInMcastPkts, ipIfStatsHCOutMcastPkts } - STATUS current - DESCRIPTION - "IP per-interfaces statistics for systems that include - interfaces that may overflow the standard packet counters - within 1 hour." - ::= { ipMIBGroups 16 } - -ipv4IfStatsHCPacketGroup OBJECT-GROUP - OBJECTS { ipIfStatsHCInBcastPkts, ipIfStatsHCOutBcastPkts } - STATUS current - DESCRIPTION - "IPv4 only per-interface statistics for systems that include - interfaces that may overflow the standard packet counters - within 1 hour." - ::= { ipMIBGroups 17 } - -ipAddressPrefixGroup OBJECT-GROUP - OBJECTS { ipAddressPrefixOrigin, - ipAddressPrefixOnLinkFlag, - ipAddressPrefixAutonomousFlag, - ipAddressPrefixAdvPreferredLifetime, - ipAddressPrefixAdvValidLifetime } - STATUS current - - - - DESCRIPTION - "The group of objects for providing information about address - prefixes used by this node." - ::= { ipMIBGroups 18 } - -ipAddressGroup OBJECT-GROUP - OBJECTS { ipAddressSpinLock, ipAddressIfIndex, - ipAddressType, ipAddressPrefix, - ipAddressOrigin, ipAddressStatus, - ipAddressCreated, ipAddressLastChanged, - ipAddressRowStatus, ipAddressStorageType } - STATUS current - DESCRIPTION - "The group of objects for providing information about the - addresses relevant to this entity's interfaces." - ::= { ipMIBGroups 19 } - -ipNetToPhysicalGroup OBJECT-GROUP - OBJECTS { ipNetToPhysicalPhysAddress, ipNetToPhysicalLastUpdated, - ipNetToPhysicalType, ipNetToPhysicalState, - ipNetToPhysicalRowStatus } - STATUS current - DESCRIPTION - "The group of objects for providing information about the - mappings of network address to physical address known to - this node." - ::= { ipMIBGroups 20 } - -ipv6ScopeGroup OBJECT-GROUP - OBJECTS { ipv6ScopeZoneIndexLinkLocal, - ipv6ScopeZoneIndex3, - ipv6ScopeZoneIndexAdminLocal, - ipv6ScopeZoneIndexSiteLocal, - ipv6ScopeZoneIndex6, - ipv6ScopeZoneIndex7, - ipv6ScopeZoneIndexOrganizationLocal, - ipv6ScopeZoneIndex9, - ipv6ScopeZoneIndexA, - ipv6ScopeZoneIndexB, - ipv6ScopeZoneIndexC, - ipv6ScopeZoneIndexD } - STATUS current - DESCRIPTION - "The group of objects for managing IPv6 scope zones." - ::= { ipMIBGroups 21 } - -ipDefaultRouterGroup OBJECT-GROUP - OBJECTS { ipDefaultRouterLifetime, ipDefaultRouterPreference } - - - - STATUS current - DESCRIPTION - "The group of objects for providing information about default - routers known to this node." - ::= { ipMIBGroups 22 } - -ipv6RouterAdvertGroup OBJECT-GROUP - OBJECTS { ipv6RouterAdvertSpinLock, - ipv6RouterAdvertSendAdverts, - ipv6RouterAdvertMaxInterval, - ipv6RouterAdvertMinInterval, - ipv6RouterAdvertManagedFlag, - ipv6RouterAdvertOtherConfigFlag, - ipv6RouterAdvertLinkMTU, - ipv6RouterAdvertReachableTime, - ipv6RouterAdvertRetransmitTime, - ipv6RouterAdvertCurHopLimit, - ipv6RouterAdvertDefaultLifetime, - ipv6RouterAdvertRowStatus -} - STATUS current - DESCRIPTION - "The group of objects for controlling information advertised - by IPv6 routers." - ::= { ipMIBGroups 23 } - -icmpStatsGroup OBJECT-GROUP - OBJECTS {icmpStatsInMsgs, icmpStatsInErrors, - icmpStatsOutMsgs, icmpStatsOutErrors, - icmpMsgStatsInPkts, icmpMsgStatsOutPkts } - STATUS current - DESCRIPTION - "The group of objects providing ICMP statistics." - ::= { ipMIBGroups 24 } - --- --- Deprecated objects --- - -ipInReceives OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The total number of input datagrams received from - interfaces, including those received in error. - - This object has been deprecated, as a new IP version-neutral - - - - table has been added. It is loosely replaced by - ipSystemStatsInRecieves." - ::= { ip 3 } - -ipInHdrErrors OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of input datagrams discarded due to errors in - their IPv4 headers, including bad checksums, version number - mismatch, other format errors, time-to-live exceeded, errors - discovered in processing their IPv4 options, etc. - - This object has been deprecated as a new IP version-neutral - table has been added. It is loosely replaced by - ipSystemStatsInHdrErrors." - ::= { ip 4 } - -ipInAddrErrors OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of input datagrams discarded because the IPv4 - address in their IPv4 header's destination field was not a - valid address to be received at this entity. This count - includes invalid addresses (e.g., 0.0.0.0) and addresses of - unsupported Classes (e.g., Class E). For entities which are - not IPv4 routers, and therefore do not forward datagrams, - this counter includes datagrams discarded because the - destination address was not a local address. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by - ipSystemStatsInAddrErrors." - ::= { ip 5 } - -ipForwDatagrams OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of input datagrams for which this entity was not - their final IPv4 destination, as a result of which an - attempt was made to find a route to forward them to that - final destination. In entities which do not act as IPv4 - routers, this counter will include only those packets which - - - - were Source-Routed via this entity, and the Source-Route - option processing was successful. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by - ipSystemStatsInForwDatagrams." - ::= { ip 6 } - -ipInUnknownProtos OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of locally-addressed datagrams received - successfully but discarded because of an unknown or - unsupported protocol. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by - ipSystemStatsInUnknownProtos." - ::= { ip 7 } - -ipInDiscards OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of input IPv4 datagrams for which no problems - were encountered to prevent their continued processing, but - which were discarded (e.g., for lack of buffer space). Note - that this counter does not include any datagrams discarded - while awaiting re-assembly. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by - ipSystemStatsInDiscards." - ::= { ip 8 } - -ipInDelivers OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The total number of input datagrams successfully delivered - to IPv4 user-protocols (including ICMP). - - This object has been deprecated as a new IP version neutral - table has been added. It is loosely replaced by - - - - ipSystemStatsIndelivers." - ::= { ip 9 } - -ipOutRequests OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The total number of IPv4 datagrams which local IPv4 user - protocols (including ICMP) supplied to IPv4 in requests for - transmission. Note that this counter does not include any - datagrams counted in ipForwDatagrams. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by - ipSystemStatsOutRequests." - ::= { ip 10 } - -ipOutDiscards OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of output IPv4 datagrams for which no problem was - encountered to prevent their transmission to their - destination, but which were discarded (e.g., for lack of - buffer space). Note that this counter would include - datagrams counted in ipForwDatagrams if any such packets met - this (discretionary) discard criterion. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by - ipSystemStatsOutDiscards." - ::= { ip 11 } - -ipOutNoRoutes OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of IPv4 datagrams discarded because no route - could be found to transmit them to their destination. Note - that this counter includes any packets counted in - ipForwDatagrams which meet this `no-route' criterion. Note - that this includes any datagrams which a host cannot route - because all of its default routers are down. - - This object has been deprecated, as a new IP version-neutral - - - - table has been added. It is loosely replaced by - ipSystemStatsOutNoRoutes." - ::= { ip 12 } - -ipReasmReqds OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of IPv4 fragments received which needed to be - reassembled at this entity. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by - ipSystemStatsReasmReqds." - ::= { ip 14 } - -ipReasmOKs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of IPv4 datagrams successfully re-assembled. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by - ipSystemStatsReasmOKs." - ::= { ip 15 } - -ipReasmFails OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of failures detected by the IPv4 re-assembly - algorithm (for whatever reason: timed out, errors, etc). - Note that this is not necessarily a count of discarded IPv4 - fragments since some algorithms (notably the algorithm in - RFC 815) can lose track of the number of fragments by - combining them as they are received. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by - ipSystemStatsReasmFails." - ::= { ip 16 } - -ipFragOKs OBJECT-TYPE - SYNTAX Counter32 - - - - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of IPv4 datagrams that have been successfully - fragmented at this entity. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by - ipSystemStatsOutFragOKs." - ::= { ip 17 } - -ipFragFails OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of IPv4 datagrams that have been discarded - because they needed to be fragmented at this entity but - could not be, e.g., because their Don't Fragment flag was - set. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by - ipSystemStatsOutFragFails." - ::= { ip 18 } - -ipFragCreates OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of IPv4 datagram fragments that have been - generated as a result of fragmentation at this entity. - - This object has been deprecated as a new IP version neutral - table has been added. It is loosely replaced by - ipSystemStatsOutFragCreates." - ::= { ip 19 } - -ipRoutingDiscards OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of routing entries which were chosen to be - discarded even though they are valid. One possible reason - for discarding such an entry could be to free-up buffer - space for other routing entries. - - - - This object was defined in pre-IPv6 versions of the IP MIB. - It was implicitly IPv4 only, but the original specifications - did not indicate this protocol restriction. In order to - clarify the specifications, this object has been deprecated - and a similar, but more thoroughly clarified, object has - been added to the IP-FORWARD-MIB." - ::= { ip 23 } - --- the deprecated IPv4 address table - -ipAddrTable OBJECT-TYPE - SYNTAX SEQUENCE OF IpAddrEntry - MAX-ACCESS not-accessible - STATUS deprecated - DESCRIPTION - "The table of addressing information relevant to this - entity's IPv4 addresses. - - This table has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by the - ipAddressTable although several objects that weren't deemed - useful weren't carried forward while another - (ipAdEntReasmMaxSize) was moved to the ipv4InterfaceTable." - ::= { ip 20 } - -ipAddrEntry OBJECT-TYPE - SYNTAX IpAddrEntry - MAX-ACCESS not-accessible - STATUS deprecated - DESCRIPTION - "The addressing information for one of this entity's IPv4 - addresses." - INDEX { ipAdEntAddr } - ::= { ipAddrTable 1 } - -IpAddrEntry ::= SEQUENCE { - ipAdEntAddr IpAddress, - ipAdEntIfIndex INTEGER, - ipAdEntNetMask IpAddress, - ipAdEntBcastAddr INTEGER, - ipAdEntReasmMaxSize INTEGER - } - -ipAdEntAddr OBJECT-TYPE - SYNTAX IpAddress - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - - - - "The IPv4 address to which this entry's addressing - information pertains." - ::= { ipAddrEntry 1 } - -ipAdEntIfIndex OBJECT-TYPE - SYNTAX INTEGER (1..2147483647) - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The index value which uniquely identifies the interface to - which this entry is applicable. The interface identified by - a particular value of this index is the same interface as - identified by the same value of the IF-MIB's ifIndex." - ::= { ipAddrEntry 2 } - -ipAdEntNetMask OBJECT-TYPE - SYNTAX IpAddress - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The subnet mask associated with the IPv4 address of this - entry. The value of the mask is an IPv4 address with all - the network bits set to 1 and all the hosts bits set to 0." - ::= { ipAddrEntry 3 } - -ipAdEntBcastAddr OBJECT-TYPE - SYNTAX INTEGER (0..1) - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The value of the least-significant bit in the IPv4 broadcast - address used for sending datagrams on the (logical) - interface associated with the IPv4 address of this entry. - For example, when the Internet standard all-ones broadcast - address is used, the value will be 1. This value applies to - both the subnet and network broadcast addresses used by the - entity on this (logical) interface." - ::= { ipAddrEntry 4 } - -ipAdEntReasmMaxSize OBJECT-TYPE - SYNTAX INTEGER (0..65535) - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The size of the largest IPv4 datagram which this entity can - re-assemble from incoming IPv4 fragmented datagrams received - on this interface." - ::= { ipAddrEntry 5 } - - - --- the deprecated IPv4 Address Translation table - --- The Address Translation tables contain the IpAddress to --- "physical" address equivalences. Some interfaces do not --- use translation tables for determining address --- equivalences (e.g., DDN-X.25 has an algorithmic method); --- if all interfaces are of this type, then the Address --- Translation table is empty, i.e., has zero entries. - -ipNetToMediaTable OBJECT-TYPE - SYNTAX SEQUENCE OF IpNetToMediaEntry - MAX-ACCESS not-accessible - STATUS deprecated - DESCRIPTION - "The IPv4 Address Translation table used for mapping from - IPv4 addresses to physical addresses. - - This table has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by the - ipNetToPhysicalTable." - ::= { ip 22 } - -ipNetToMediaEntry OBJECT-TYPE - SYNTAX IpNetToMediaEntry - MAX-ACCESS not-accessible - STATUS deprecated - DESCRIPTION - "Each entry contains one IpAddress to `physical' address - equivalence." - INDEX { ipNetToMediaIfIndex, - ipNetToMediaNetAddress } - ::= { ipNetToMediaTable 1 } - -IpNetToMediaEntry ::= SEQUENCE { - ipNetToMediaIfIndex INTEGER, - ipNetToMediaPhysAddress PhysAddress, - ipNetToMediaNetAddress IpAddress, - ipNetToMediaType INTEGER - } - -ipNetToMediaIfIndex OBJECT-TYPE - SYNTAX INTEGER (1..2147483647) - MAX-ACCESS read-create - STATUS deprecated - DESCRIPTION - "The interface on which this entry's equivalence is - effective. The interface identified by a particular value - of this index is the same interface as identified by the - - - - same value of the IF-MIB's ifIndex. - - This object predates the rule limiting index objects to a - max access value of 'not-accessible' and so continues to use - a value of 'read-create'." - ::= { ipNetToMediaEntry 1 } - -ipNetToMediaPhysAddress OBJECT-TYPE - SYNTAX PhysAddress (SIZE(0..65535)) - MAX-ACCESS read-create - STATUS deprecated - DESCRIPTION - "The media-dependent `physical' address. This object should - return 0 when this entry is in the 'incomplete' state. - - As the entries in this table are typically not persistent - when this object is written the entity should not save the - change to non-volatile storage. Note: a stronger - requirement is not used because this object was previously - defined." - ::= { ipNetToMediaEntry 2 } - -ipNetToMediaNetAddress OBJECT-TYPE - SYNTAX IpAddress - MAX-ACCESS read-create - STATUS deprecated - DESCRIPTION - "The IpAddress corresponding to the media-dependent - `physical' address. - - This object predates the rule limiting index objects to a - max access value of 'not-accessible' and so continues to use - a value of 'read-create'." - ::= { ipNetToMediaEntry 3 } - -ipNetToMediaType OBJECT-TYPE - SYNTAX INTEGER { - other(1), -- none of the following - invalid(2), -- an invalidated mapping - dynamic(3), - static(4) - } - MAX-ACCESS read-create - STATUS deprecated - DESCRIPTION - "The type of mapping. - - Setting this object to the value invalid(2) has the effect - - - - of invalidating the corresponding entry in the - ipNetToMediaTable. That is, it effectively dis-associates - the interface identified with said entry from the mapping - identified with said entry. It is an implementation- - specific matter as to whether the agent removes an - invalidated entry from the table. Accordingly, management - stations must be prepared to receive tabular information - from agents that corresponds to entries not currently in - use. Proper interpretation of such entries requires - examination of the relevant ipNetToMediaType object. - - As the entries in this table are typically not persistent - when this object is written the entity should not save the - change to non-volatile storage. Note: a stronger - requirement is not used because this object was previously - defined." - ::= { ipNetToMediaEntry 4 } - --- the deprecated ICMP group - -icmpInMsgs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The total number of ICMP messages which the entity received. - Note that this counter includes all those counted by - icmpInErrors. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by - icmpStatsInMsgs." - ::= { icmp 1 } - -icmpInErrors OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP messages which the entity received but - determined as having ICMP-specific errors (bad ICMP - checksums, bad length, etc.). - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by - icmpStatsInErrors." - ::= { icmp 2 } - - - - -icmpInDestUnreachs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP Destination Unreachable messages - received. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 3 } - -icmpInTimeExcds OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP Time Exceeded messages received. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 4 } - -icmpInParmProbs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP Parameter Problem messages received. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 5 } - -icmpInSrcQuenchs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP Source Quench messages received. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 6 } - - - -icmpInRedirects OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP Redirect messages received. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 7 } - -icmpInEchos OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP Echo (request) messages received. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 8 } - -icmpInEchoReps OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP Echo Reply messages received. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 9 } - -icmpInTimestamps OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP Timestamp (request) messages received. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 10 } - - - - -icmpInTimestampReps OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP Timestamp Reply messages received. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 11 } - -icmpInAddrMasks OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP Address Mask Request messages received. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 12 } - -icmpInAddrMaskReps OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP Address Mask Reply messages received. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 13 } - -icmpOutMsgs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The total number of ICMP messages which this entity - attempted to send. Note that this counter includes all - those counted by icmpOutErrors. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by - icmpStatsOutMsgs." - - - - ::= { icmp 14 } - -icmpOutErrors OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP messages which this entity did not send - due to problems discovered within ICMP, such as a lack of - buffers. This value should not include errors discovered - outside the ICMP layer, such as the inability of IP to route - the resultant datagram. In some implementations, there may - be no types of error which contribute to this counter's - value. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by - icmpStatsOutErrors." - ::= { icmp 15 } - -icmpOutDestUnreachs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP Destination Unreachable messages sent. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 16 } - -icmpOutTimeExcds OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP Time Exceeded messages sent. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 17 } - -icmpOutParmProbs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - - - - DESCRIPTION - "The number of ICMP Parameter Problem messages sent. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 18 } - -icmpOutSrcQuenchs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP Source Quench messages sent. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 19 } - -icmpOutRedirects OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP Redirect messages sent. For a host, this - object will always be zero, since hosts do not send - redirects. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 20 } - -icmpOutEchos OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP Echo (request) messages sent. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 21 } - -icmpOutEchoReps OBJECT-TYPE - SYNTAX Counter32 - - - - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP Echo Reply messages sent. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 22 } - -icmpOutTimestamps OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP Timestamp (request) messages sent. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 23 } - -icmpOutTimestampReps OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP Timestamp Reply messages sent. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 24 } - -icmpOutAddrMasks OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP Address Mask Request messages sent. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 25 } - -icmpOutAddrMaskReps OBJECT-TYPE - SYNTAX Counter32 - - - - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The number of ICMP Address Mask Reply messages sent. - - This object has been deprecated, as a new IP version-neutral - table has been added. It is loosely replaced by a column in - the icmpMsgStatsTable." - ::= { icmp 26 } - --- deprecated conformance information --- deprecated compliance statements - -ipMIBCompliance MODULE-COMPLIANCE - STATUS deprecated - DESCRIPTION - "The compliance statement for systems that implement only - IPv4. For version-independence, this compliance statement - is deprecated in favor of ipMIBCompliance2." - MODULE -- this module - MANDATORY-GROUPS { ipGroup, - icmpGroup } - ::= { ipMIBCompliances 1 } - --- deprecated units of conformance - -ipGroup OBJECT-GROUP - OBJECTS { ipForwarding, ipDefaultTTL, - ipInReceives, ipInHdrErrors, - ipInAddrErrors, ipForwDatagrams, - ipInUnknownProtos, ipInDiscards, - ipInDelivers, ipOutRequests, - ipOutDiscards, ipOutNoRoutes, - ipReasmTimeout, ipReasmReqds, - ipReasmOKs, ipReasmFails, - ipFragOKs, ipFragFails, - ipFragCreates, ipAdEntAddr, - ipAdEntIfIndex, ipAdEntNetMask, - ipAdEntBcastAddr, ipAdEntReasmMaxSize, - ipNetToMediaIfIndex, ipNetToMediaPhysAddress, - ipNetToMediaNetAddress, ipNetToMediaType, - ipRoutingDiscards -} - STATUS deprecated - DESCRIPTION - "The ip group of objects providing for basic management of IP - entities, exclusive of the management of IP routes. - - - - - As part of the version independence, this group has been - deprecated. " - ::= { ipMIBGroups 1 } - -icmpGroup OBJECT-GROUP - OBJECTS { icmpInMsgs, icmpInErrors, - icmpInDestUnreachs, icmpInTimeExcds, - icmpInParmProbs, icmpInSrcQuenchs, - icmpInRedirects, icmpInEchos, - icmpInEchoReps, icmpInTimestamps, - icmpInTimestampReps, icmpInAddrMasks, - icmpInAddrMaskReps, icmpOutMsgs, - icmpOutErrors, icmpOutDestUnreachs, - icmpOutTimeExcds, icmpOutParmProbs, - icmpOutSrcQuenchs, icmpOutRedirects, - icmpOutEchos, icmpOutEchoReps, - icmpOutTimestamps, icmpOutTimestampReps, - icmpOutAddrMasks, icmpOutAddrMaskReps } - STATUS deprecated - DESCRIPTION - "The icmp group of objects providing ICMP statistics. - - As part of the version independence, this group has been - deprecated. " - ::= { ipMIBGroups 2 } - -END diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/RFC-1212 b/src/apps/snmp/LwipMibCompiler/Mibs/RFC-1212 deleted file mode 100644 index 4b1bdcfd..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/RFC-1212 +++ /dev/null @@ -1,75 +0,0 @@ -RFC-1212 DEFINITIONS ::= BEGIN - - IMPORTS - ObjectName - FROM RFC1155-SMI; --- DisplayString --- FROM RFC1158-MIB; - - OBJECT-TYPE MACRO ::= - BEGIN - TYPE NOTATION ::= - -- must conform to - -- RFC1155's ObjectSyntax - "SYNTAX" type(ObjectSyntax) - "ACCESS" Access - "STATUS" Status - DescrPart - ReferPart - IndexPart - DefValPart - VALUE NOTATION ::= value (VALUE ObjectName) - - Access ::= "read-only" - | "read-write" - | "write-only" - | "not-accessible" - Status ::= "mandatory" - | "optional" - | "obsolete" - | "deprecated" - - DescrPart ::= - "DESCRIPTION" value (description DisplayString) - | empty - - ReferPart ::= - "REFERENCE" value (reference DisplayString) - | empty - - IndexPart ::= - "INDEX" "{" IndexTypes "}" - | empty - IndexTypes ::= - IndexType | IndexTypes "," IndexType - IndexType ::= - -- if indexobject, use the SYNTAX - -- value of the correspondent - -- OBJECT-TYPE invocation - value (indexobject ObjectName) - -- otherwise use named SMI type - -- must conform to IndexSyntax below - | type (indextype) - - DefValPart ::= - "DEFVAL" "{" value (defvalue ObjectSyntax) "}" - | empty - - END - - IndexSyntax ::= - CHOICE { - number - INTEGER (0..MAX), - string - OCTET STRING, - object - OBJECT IDENTIFIER, - address - NetworkAddress, - ipAddress - IpAddress - } - -END - diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/RFC-1215 b/src/apps/snmp/LwipMibCompiler/Mibs/RFC-1215 deleted file mode 100644 index 3cdcfdf3..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/RFC-1215 +++ /dev/null @@ -1,34 +0,0 @@ -RFC-1215 DEFINITIONS ::= BEGIN - - IMPORTS - ObjectName - FROM RFC1155-SMI; - - TRAP-TYPE MACRO ::= - BEGIN - TYPE NOTATION ::= "ENTERPRISE" value - (enterprise OBJECT IDENTIFIER) - VarPart - DescrPart - ReferPart - VALUE NOTATION ::= value (VALUE INTEGER) - - VarPart ::= - "VARIABLES" "{" VarTypes "}" - | empty - VarTypes ::= - VarType | VarTypes "," VarType - VarType ::= - value (vartype ObjectName) - - DescrPart ::= - "DESCRIPTION" value (description DisplayString) - | empty - - ReferPart ::= - "REFERENCE" value (reference DisplayString) - | empty - - END - -END diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/RFC1065-SMI b/src/apps/snmp/LwipMibCompiler/Mibs/RFC1065-SMI deleted file mode 100644 index 40e55d70..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/RFC1065-SMI +++ /dev/null @@ -1,132 +0,0 @@ -RFC1065-SMI DEFINITIONS ::= BEGIN - -EXPORTS -- EVERYTHING - internet, directory, mgmt, - experimental, private, enterprises, - OBJECT-TYPE, ObjectName, ObjectSyntax, SimpleSyntax, - ApplicationSyntax, NetworkAddress, IpAddress, - Counter, Gauge, TimeTicks, Opaque; - - -- the path to the root - - internet OBJECT IDENTIFIER ::= { iso org(3) dod(6) 1 } - - directory OBJECT IDENTIFIER ::= { internet 1 } - - mgmt OBJECT IDENTIFIER ::= { internet 2 } - - experimental OBJECT IDENTIFIER ::= { internet 3 } - - private OBJECT IDENTIFIER ::= { internet 4 } - enterprises OBJECT IDENTIFIER ::= { private 1 } - - - -- definition of object types - - OBJECT-TYPE MACRO ::= - BEGIN - TYPE NOTATION ::= "SYNTAX" type (TYPE ObjectSyntax) - "ACCESS" Access - "STATUS" Status - VALUE NOTATION ::= value (VALUE ObjectName) - - Access ::= "read-only" - | "read-write" - | "write-only" - | "not-accessible" - Status ::= "mandatory" - | "optional" - | "obsolete" - END - - -- names of objects in the MIB - - ObjectName ::= - OBJECT IDENTIFIER - - - - -- syntax of objects in the MIB - - ObjectSyntax ::= - CHOICE { - simple - SimpleSyntax, - - -- note that simple SEQUENCEs are not directly - -- mentioned here to keep things simple (i.e., - -- prevent mis-use). However, application-wide - -- types which are IMPLICITly encoded simple - -- SEQUENCEs may appear in the following CHOICE - - application-wide - ApplicationSyntax - } - - SimpleSyntax ::= - CHOICE { - number - INTEGER, - - string - OCTET STRING, - - object - OBJECT IDENTIFIER, - - empty - NULL - } - - ApplicationSyntax ::= - CHOICE { - address - NetworkAddress, - - counter - Counter, - - gauge - Gauge, - - ticks - TimeTicks, - - arbitrary - Opaque - - - -- other application-wide types, as they are - -- defined, will be added here - } - - - -- application-wide types - - NetworkAddress ::= - CHOICE { - internet - IpAddress - } - - IpAddress ::= - [APPLICATION 0] -- in network-byte order - IMPLICIT OCTET STRING (SIZE (4)) - - Counter ::= - [APPLICATION 1] - IMPLICIT INTEGER (0..4294967295) - - Gauge ::= - [APPLICATION 2] - IMPLICIT INTEGER (0..4294967295) - - TimeTicks ::= - [APPLICATION 3] - IMPLICIT INTEGER - - Opaque ::= - [APPLICATION 4] -- arbitrary ASN.1 value, - IMPLICIT OCTET STRING -- "double-wrapped" - - END diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/RFC1155-SMI b/src/apps/snmp/LwipMibCompiler/Mibs/RFC1155-SMI deleted file mode 100644 index a6c3bf62..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/RFC1155-SMI +++ /dev/null @@ -1,129 +0,0 @@ -RFC1155-SMI DEFINITIONS ::= BEGIN - -EXPORTS -- EVERYTHING - internet, directory, mgmt, - experimental, private, enterprises, - OBJECT-TYPE, ObjectName, ObjectSyntax, SimpleSyntax, - ApplicationSyntax, NetworkAddress, IpAddress, - Counter, Gauge, TimeTicks, Opaque; - - -- the path to the root - - internet OBJECT IDENTIFIER ::= { iso org(3) dod(6) 1 } - - directory OBJECT IDENTIFIER ::= { internet 1 } - - mgmt OBJECT IDENTIFIER ::= { internet 2 } - - experimental OBJECT IDENTIFIER ::= { internet 3 } - - private OBJECT IDENTIFIER ::= { internet 4 } - enterprises OBJECT IDENTIFIER ::= { private 1 } - - - -- definition of object types - - OBJECT-TYPE MACRO ::= - BEGIN - TYPE NOTATION ::= "SYNTAX" type (TYPE ObjectSyntax) - "ACCESS" Access - "STATUS" Status - VALUE NOTATION ::= value (VALUE ObjectName) - - Access ::= "read-only" - | "read-write" - | "write-only" - | "not-accessible" - Status ::= "mandatory" - | "optional" - | "obsolete" - END - - -- names of objects in the MIB - - ObjectName ::= - OBJECT IDENTIFIER - - -- syntax of objects in the MIB - - ObjectSyntax ::= - CHOICE { - simple - SimpleSyntax, - - -- note that simple SEQUENCEs are not directly - -- mentioned here to keep things simple (i.e., - -- prevent mis-use). However, application-wide - -- types which are IMPLICITly encoded simple - -- SEQUENCEs may appear in the following CHOICE - - application-wide - ApplicationSyntax - } - - SimpleSyntax ::= - CHOICE { - number - INTEGER, - - string - OCTET STRING, - - object - OBJECT IDENTIFIER, - - empty - NULL - } - - ApplicationSyntax ::= - CHOICE { - address - NetworkAddress, - - counter - Counter, - - gauge - Gauge, - - ticks - TimeTicks, - - arbitrary - Opaque - - -- other application-wide types, as they are - -- defined, will be added here - } - - - -- application-wide types - - NetworkAddress ::= - CHOICE { - internet - IpAddress - } - - IpAddress ::= - [APPLICATION 0] -- in network-byte order - IMPLICIT OCTET STRING (SIZE (4)) - - Counter ::= - [APPLICATION 1] - IMPLICIT INTEGER (0..4294967295) - - Gauge ::= - [APPLICATION 2] - IMPLICIT INTEGER (0..4294967295) - - TimeTicks ::= - [APPLICATION 3] - IMPLICIT INTEGER (0..4294967295) - - Opaque ::= - [APPLICATION 4] -- arbitrary ASN.1 value, - IMPLICIT OCTET STRING -- "double-wrapped" - - END diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/RFC1158-MIB b/src/apps/snmp/LwipMibCompiler/Mibs/RFC1158-MIB deleted file mode 100644 index 4acf34a0..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/RFC1158-MIB +++ /dev/null @@ -1,1493 +0,0 @@ -RFC1158-MIB DEFINITIONS ::= BEGIN - -IMPORTS - mgmt, OBJECT-TYPE, NetworkAddress, IpAddress, - Counter, Gauge, TimeTicks - FROM RFC1155-SMI; - -DisplayString ::= - OCTET STRING - -mib-2 OBJECT IDENTIFIER ::= { mgmt 1 } -- MIB-II - -- (same prefix as MIB-I) - -system OBJECT IDENTIFIER ::= { mib-2 1 } -interfaces OBJECT IDENTIFIER ::= { mib-2 2 } -at OBJECT IDENTIFIER ::= { mib-2 3 } -ip OBJECT IDENTIFIER ::= { mib-2 4 } -icmp OBJECT IDENTIFIER ::= { mib-2 5 } -tcp OBJECT IDENTIFIER ::= { mib-2 6 } -udp OBJECT IDENTIFIER ::= { mib-2 7 } -egp OBJECT IDENTIFIER ::= { mib-2 8 } --- cmot OBJECT IDENTIFIER ::= { mib-2 9 } -transmission OBJECT IDENTIFIER ::= { mib-2 10 } -snmp OBJECT IDENTIFIER ::= { mib-2 11 } - - --- object types - --- the System group - -sysDescr OBJECT-TYPE - SYNTAX DisplayString (SIZE (0..255)) - ACCESS read-only - STATUS mandatory - ::= { system 1 } - -sysObjectID OBJECT-TYPE - SYNTAX OBJECT IDENTIFIER - ACCESS read-only - STATUS mandatory - ::= { system 2 } - -sysUpTime OBJECT-TYPE - SYNTAX TimeTicks - ACCESS read-only - STATUS mandatory - ::= { system 3 } - -sysContact OBJECT-TYPE - SYNTAX DisplayString (SIZE (0..255)) - ACCESS read-write - STATUS mandatory - ::= { system 4 } - -sysName OBJECT-TYPE - SYNTAX DisplayString (SIZE (0..255)) - ACCESS read-write - STATUS mandatory - ::= { system 5 } - -sysLocation OBJECT-TYPE - SYNTAX DisplayString (SIZE (0..255)) - ACCESS read-only - STATUS mandatory - ::= { system 6 } - -sysServices OBJECT-TYPE - SYNTAX INTEGER (0..127) - ACCESS read-only - STATUS mandatory - ::= { system 7 } - - --- the Interfaces group - -ifNumber OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - ::= { interfaces 1 } - --- the Interfaces table - -ifTable OBJECT-TYPE - SYNTAX SEQUENCE OF IfEntry - ACCESS read-only - STATUS mandatory - ::= { interfaces 2 } - -ifEntry OBJECT-TYPE - SYNTAX IfEntry - ACCESS read-only - STATUS mandatory - ::= { ifTable 1 } - -IfEntry ::= SEQUENCE { - ifIndex - INTEGER, - ifDescr - DisplayString, - ifType - INTEGER, - ifMtu - INTEGER, - ifSpeed - Gauge, - ifPhysAddress - OCTET STRING, - ifAdminStatus - INTEGER, - ifOperStatus - INTEGER, - ifLastChange - TimeTicks, - ifInOctets - Counter, - ifInUcastPkts - Counter, - ifInNUcastPkts - Counter, - ifInDiscards - Counter, - ifInErrors - Counter, - ifInUnknownProtos - Counter, - ifOutOctets - Counter, - ifOutUcastPkts - Counter, - ifOutNUcastPkts - Counter, - ifOutDiscards - Counter, - ifOutErrors - Counter, - ifOutQLen - Gauge, - ifSpecific - OBJECT IDENTIFIER -} - -ifIndex OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - ::= { ifEntry 1 } - -ifDescr OBJECT-TYPE - SYNTAX DisplayString (SIZE (0..255)) - ACCESS read-only - STATUS mandatory - ::= { ifEntry 2 } - -ifType OBJECT-TYPE - SYNTAX INTEGER { - other(1), -- none of the - -- following - regular1822(2), - hdh1822(3), - ddn-x25(4), - rfc877-x25(5), - ethernet-csmacd(6), - iso88023-csmacd(7), - iso88024-tokenBus(8), - iso88025-tokenRing(9), - iso88026-man(10), - starLan(11), - proteon-10Mbit(12), - proteon-80Mbit(13), - hyperchannel(14), - fddi(15), - lapb(16), - sdlc(17), - t1-carrier(18), - cept(19), -- european - --equivalent of T-1 - basicISDN(20), - primaryISDN(21), - -- proprietary - -- serial - propPointToPointSerial(22), - terminalServer-asyncPort(23), - softwareLoopback(24), - eon(25), -- CLNP over IP - ethernet-3Mbit(26), - nsip(27), -- XNS over IP - slip(28) -- generic SLIP - } - ACCESS read-only - STATUS mandatory - ::= { ifEntry 3 } - -ifMtu OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - ::= { ifEntry 4 } - -ifSpeed OBJECT-TYPE - SYNTAX Gauge - ACCESS read-only - STATUS mandatory - ::= { ifEntry 5 } - -ifPhysAddress OBJECT-TYPE - SYNTAX OCTET STRING - ACCESS read-only - STATUS mandatory - ::= { ifEntry 6 } - -ifAdminStatus OBJECT-TYPE - SYNTAX INTEGER { - up(1), -- ready to pass packets - down(2), - testing(3) -- in some test mode - } - ACCESS read-write - STATUS mandatory - ::= { ifEntry 7 } - -ifOperStatus OBJECT-TYPE - SYNTAX INTEGER { - up(1), -- ready to pass packets - down(2), - testing(3) -- in some test mode - } - ACCESS read-only - STATUS mandatory - ::= { ifEntry 8 } - -ifLastChange OBJECT-TYPE - SYNTAX TimeTicks - ACCESS read-only - STATUS mandatory - ::= { ifEntry 9 } - -ifInOctets OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ifEntry 10 } - -ifInUcastPkts OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ifEntry 11 } - -ifInNUcastPkts OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ifEntry 12 } - -ifInDiscards OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ifEntry 13 } - -ifInErrors OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ifEntry 14 } - -ifInUnknownProtos OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ifEntry 15 } - -ifOutOctets OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ifEntry 16 } - -ifOutUcastPkts OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ifEntry 17 } - -ifOutNUcastPkts OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ifEntry 18 } - -ifOutDiscards OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ifEntry 19 } - -ifOutErrors OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ifEntry 20 } - -ifOutQLen OBJECT-TYPE - SYNTAX Gauge - ACCESS read-only - STATUS mandatory - ::= { ifEntry 21 } - -ifSpecific OBJECT-TYPE - SYNTAX OBJECT IDENTIFIER - ACCESS read-only - STATUS mandatory - ::= { ifEntry 22 } - -nullSpecific OBJECT IDENTIFIER ::= { 0 0 } - --- the Address Translation group (deprecated) - -atTable OBJECT-TYPE - SYNTAX SEQUENCE OF AtEntry - ACCESS read-write - STATUS deprecated - ::= { at 1 } - -atEntry OBJECT-TYPE - SYNTAX AtEntry - ACCESS read-write - STATUS deprecated - ::= { atTable 1 } - -AtEntry ::= SEQUENCE { - atIfIndex - INTEGER, - atPhysAddress - OCTET STRING, - atNetAddress - NetworkAddress -} - -atIfIndex OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-write - STATUS deprecated - ::= { atEntry 1 } - -atPhysAddress OBJECT-TYPE - SYNTAX OCTET STRING - ACCESS read-write - STATUS deprecated - ::= { atEntry 2 } - -atNetAddress OBJECT-TYPE - SYNTAX NetworkAddress - ACCESS read-write - STATUS deprecated - ::= { atEntry 3 } - - --- the IP group - -ipForwarding OBJECT-TYPE - SYNTAX INTEGER { - gateway(1), -- entity forwards - -- datagrams - host(2) -- entity does NOT - -- forward datagrams - } - ACCESS read-write - STATUS mandatory - ::= { ip 1 } - -ipDefaultTTL OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-write - STATUS mandatory - ::= { ip 2 } - -ipInReceives OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ip 3 } - -ipInHdrErrors OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ip 4 } - -ipInAddrErrors OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ip 5 } - -ipForwDatagrams OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ip 6 } - -ipInUnknownProtos OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ip 7 } - -ipInDiscards OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ip 8 } - -ipInDelivers OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ip 9 } - -ipOutRequests OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ip 10 } - -ipOutDiscards OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ip 11 } - -ipOutNoRoutes OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ip 12 } - -ipReasmTimeout OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - ::= { ip 13 } - -ipReasmReqds OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ip 14 } - -ipReasmOKs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ip 15 } - -ipReasmFails OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ip 16 } - -ipFragOKs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ip 17 } - -ipFragFails OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ip 18 } - -ipFragCreates OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { ip 19 } - --- the IP Interface table - -ipAddrTable OBJECT-TYPE - SYNTAX SEQUENCE OF IpAddrEntry - ACCESS read-only - STATUS mandatory - ::= { ip 20 } - -ipAddrEntry OBJECT-TYPE - SYNTAX IpAddrEntry - ACCESS read-only - STATUS mandatory - ::= { ipAddrTable 1 } - -IpAddrEntry ::= SEQUENCE { - ipAdEntAddr - IpAddress, - ipAdEntIfIndex - INTEGER, - ipAdEntNetMask - IpAddress, - ipAdEntBcastAddr - INTEGER, - ipAdEntReasmMaxSize - INTEGER (0..65535) -} - -ipAdEntAddr OBJECT-TYPE - SYNTAX IpAddress - ACCESS read-only - STATUS mandatory - ::= { ipAddrEntry 1 } - -ipAdEntIfIndex OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - ::= { ipAddrEntry 2 } - -ipAdEntNetMask OBJECT-TYPE - SYNTAX IpAddress - ACCESS read-only - STATUS mandatory - ::= { ipAddrEntry 3 } - -ipAdEntBcastAddr OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - ::= { ipAddrEntry 4 } - -ipAdEntReasmMaxSize OBJECT-TYPE - SYNTAX INTEGER (0..65535) - ACCESS read-only - STATUS mandatory - ::= { ipAddrEntry 5 } - --- the IP Routing table - -ipRoutingTable OBJECT-TYPE - SYNTAX SEQUENCE OF IpRouteEntry - ACCESS read-write - STATUS mandatory - ::= { ip 21 } - -ipRouteEntry OBJECT-TYPE - SYNTAX IpRouteEntry - ACCESS read-write - STATUS mandatory - ::= { ipRoutingTable 1 } - -IpRouteEntry ::= SEQUENCE { - ipRouteDest - IpAddress, - ipRouteIfIndex - INTEGER, - ipRouteMetric1 - INTEGER, - ipRouteMetric2 - INTEGER, - ipRouteMetric3 - INTEGER, - ipRouteMetric4 - INTEGER, - ipRouteNextHop - IpAddress, - ipRouteType - INTEGER, - ipRouteProto - INTEGER, - ipRouteAge - INTEGER, - ipRouteMask - IpAddress -} - -ipRouteDest OBJECT-TYPE - SYNTAX IpAddress - ACCESS read-write - STATUS mandatory - ::= { ipRouteEntry 1 } - -ipRouteIfIndex OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-write - STATUS mandatory - ::= { ipRouteEntry 2 } - -ipRouteMetric1 OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-write - STATUS mandatory - ::= { ipRouteEntry 3 } - -ipRouteMetric2 OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-write - STATUS mandatory - ::= { ipRouteEntry 4 } - -ipRouteMetric3 OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-write - STATUS mandatory - ::= { ipRouteEntry 5 } - -ipRouteMetric4 OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-write - STATUS mandatory - ::= { ipRouteEntry 6 } - -ipRouteNextHop OBJECT-TYPE - SYNTAX IpAddress - ACCESS read-write - STATUS mandatory - ::= { ipRouteEntry 7 } - -ipRouteType OBJECT-TYPE - SYNTAX INTEGER { - other(1), -- none of the following - - invalid(2), -- an invalidated route - - -- route to directly - direct(3), -- connected - -- (sub-)network - - -- route to a non-local - remote(4) -- host/network/ - -- sub-network - } - ACCESS read-write - STATUS mandatory - ::= { ipRouteEntry 8 } - -ipRouteProto OBJECT-TYPE - SYNTAX INTEGER { - other(1), -- none of the following - - -- non-protocol - -- information - - -- e.g., manually - local(2), -- configured entries - - -- set via a network - netmgmt(3), -- management protocol - - -- obtained via ICMP, - icmp(4), -- e.g., Redirect - - -- the following are - -- gateway routing - -- protocols - egp(5), - ggp(6), - hello(7), - rip(8), - is-is(9), - es-is(10), - ciscoIgrp(11), - bbnSpfIgp(12), - ospf(13), - bgp(14) - } - ACCESS read-only - STATUS mandatory - ::= { ipRouteEntry 9 } - -ipRouteAge OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-write - STATUS mandatory - ::= { ipRouteEntry 10 } - -ipRouteMask OBJECT-TYPE - SYNTAX IpAddress - ACCESS read-write - STATUS mandatory - ::= { ipRouteEntry 11 } - --- the IP Address Translation tables - -ipNetToMediaTable OBJECT-TYPE - SYNTAX SEQUENCE OF IpNetToMediaEntry - ACCESS read-write - STATUS mandatory - ::= { ip 22 } - -ipNetToMediaEntry OBJECT-TYPE - SYNTAX IpNetToMediaEntry - ACCESS read-write - STATUS mandatory - ::= { ipNetToMediaTable 1 } - -IpNetToMediaEntry ::= SEQUENCE { - ipNetToMediaIfIndex - INTEGER, - ipNetToMediaPhysAddress - OCTET STRING, - ipNetToMediaNetAddress - IpAddress, - ipNetToMediaType - INTEGER -} - -ipNetToMediaIfIndex OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-write - STATUS mandatory - ::= { ipNetToMediaEntry 1 } - -ipNetToMediaPhysAddress OBJECT-TYPE - SYNTAX OCTET STRING - ACCESS read-write - STATUS mandatory - ::= { ipNetToMediaEntry 2 } - -ipNetToMediaNetAddress OBJECT-TYPE - SYNTAX IpAddress - ACCESS read-write - STATUS mandatory - ::= { ipNetToMediaEntry 3 } - -ipNetToMediaType OBJECT-TYPE - SYNTAX INTEGER { - other(1), -- none of the following - - invalid(2), -- an invalidated mapping - dynamic(3), -- connected (sub-)network - - static(4) - } - ACCESS read-write - STATUS mandatory - ::= { ipNetToMediaEntry 4 } - --- the ICMP group - -icmpInMsgs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 1 } - -icmpInErrors OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 2 } - -icmpInDestUnreachs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 3 } - -icmpInTimeExcds OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 4 } - -icmpInParmProbs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 5 } - -icmpInSrcQuenchs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 6 } - -icmpInRedirects OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 7 } - -icmpInEchos OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 8 } - -icmpInEchoReps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 9 } - -icmpInTimestamps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 10 } - -icmpInTimestampReps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 11 } - -icmpInAddrMasks OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 12 } - -icmpInAddrMaskReps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 13 } - -icmpOutMsgs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 14 } - -icmpOutErrors OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 15 } - -icmpOutDestUnreachs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 16 } - -icmpOutTimeExcds OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 17 } - -icmpOutParmProbs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 18 } - -icmpOutSrcQuenchs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 19 } - -icmpOutRedirects OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 20 } - -icmpOutEchos OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 21 } - -icmpOutEchoReps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 22 } - -icmpOutTimestamps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 23 } - -icmpOutTimestampReps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 24 } - -icmpOutAddrMasks OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 25 } - -icmpOutAddrMaskReps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { icmp 26 } - - --- the TCP group - -tcpRtoAlgorithm OBJECT-TYPE - SYNTAX INTEGER { - other(1), -- none of the following - constant(2), -- a constant rto - rsre(3), -- MIL-STD-1778, - -- Appendix B - vanj(4) -- Van Jacobson's - -- algorithm - } - ACCESS read-only - STATUS mandatory - ::= { tcp 1 } - -tcpRtoMin OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - ::= { tcp 2 } - -tcpRtoMax OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - ::= { tcp 3 } - -tcpMaxConn OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - ::= { tcp 4 } - -tcpActiveOpens OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { tcp 5 } - -tcpPassiveOpens OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { tcp 6 } - -tcpAttemptFails OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { tcp 7 } - -tcpEstabResets OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { tcp 8 } - -tcpCurrEstab OBJECT-TYPE - SYNTAX Gauge - ACCESS read-only - STATUS mandatory - ::= { tcp 9 } - -tcpInSegs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { tcp 10 } - -tcpOutSegs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { tcp 11 } - -tcpRetransSegs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { tcp 12 } - --- the TCP connections table - -tcpConnTable OBJECT-TYPE - SYNTAX SEQUENCE OF TcpConnEntry - ACCESS read-only - STATUS mandatory - ::= { tcp 13 } - -tcpConnEntry OBJECT-TYPE - SYNTAX TcpConnEntry - ACCESS read-only - STATUS mandatory - ::= { tcpConnTable 1 } - -TcpConnEntry ::= SEQUENCE { - tcpConnState - INTEGER, - tcpConnLocalAddress - IpAddress, - tcpConnLocalPort - INTEGER (0..65535), - tcpConnRemAddress - IpAddress, - tcpConnRemPort - INTEGER (0..65535) -} - -tcpConnState OBJECT-TYPE - SYNTAX INTEGER { - closed(1), - listen(2), - synSent(3), - synReceived(4), - established(5), - finWait1(6), - finWait2(7), - closeWait(8), - lastAck(9), - closing(10), - timeWait(11) - } - ACCESS read-only - STATUS mandatory - ::= { tcpConnEntry 1 } - -tcpConnLocalAddress OBJECT-TYPE - SYNTAX IpAddress - ACCESS read-only - STATUS mandatory - ::= { tcpConnEntry 2 } - -tcpConnLocalPort OBJECT-TYPE - SYNTAX INTEGER (0..65535) - ACCESS read-only - STATUS mandatory - ::= { tcpConnEntry 3 } - -tcpConnRemAddress OBJECT-TYPE - SYNTAX IpAddress - ACCESS read-only - STATUS mandatory - ::= { tcpConnEntry 4 } - -tcpConnRemPort OBJECT-TYPE - SYNTAX INTEGER (0..65535) - ACCESS read-only - STATUS mandatory - ::= { tcpConnEntry 5 } - --- additional TCP variables - -tcpInErrs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { tcp 14 } - -tcpOutRsts OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { tcp 15 } - - --- the UDP group - -udpInDatagrams OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { udp 1 } - -udpNoPorts OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { udp 2 } - -udpInErrors OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { udp 3 } - -udpOutDatagrams OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { udp 4 } - --- the UDP listener table - -udpTable OBJECT-TYPE - SYNTAX SEQUENCE OF UdpEntry - ACCESS read-only - STATUS mandatory - ::= { udp 5 } - -udpEntry OBJECT-TYPE - SYNTAX UdpEntry - ACCESS read-only - STATUS mandatory - ::= { udpTable 1 } - -UdpEntry ::= SEQUENCE { - udpLocalAddress - IpAddress, - udpLocalPort - INTEGER (0..65535) -} - -udpLocalAddress OBJECT-TYPE - SYNTAX IpAddress - ACCESS read-only - STATUS mandatory - ::= { udpEntry 1 } - -udpLocalPort OBJECT-TYPE - SYNTAX INTEGER (0..65535) - ACCESS read-only - STATUS mandatory - ::= { udpEntry 2 } - --- the EGP group - -egpInMsgs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { egp 1 } - -egpInErrors OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { egp 2 } - -egpOutMsgs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { egp 3 } - -egpOutErrors OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { egp 4 } - --- the EGP Neighbor table - -egpNeighTable OBJECT-TYPE - SYNTAX SEQUENCE OF EgpNeighEntry - ACCESS read-only - STATUS mandatory - ::= { egp 5 } - -egpNeighEntry OBJECT-TYPE - SYNTAX EgpNeighEntry - ACCESS read-only - STATUS mandatory - ::= { egpNeighTable 1 } - -EgpNeighEntry ::= SEQUENCE { - egpNeighState - INTEGER, - egpNeighAddr - IpAddress, - egpNeighAs - INTEGER, - egpNeighInMsgs - Counter, - egpNeighInErrs - Counter, - egpNeighOutMsgs - Counter, - egpNeighOutErrs - Counter, - egpNeighInErrMsgs - Counter, - egpNeighOutErrMsgs - Counter, - egpNeighStateUps - Counter, - egpNeighStateDowns - Counter, - egpNeighIntervalHello - INTEGER, - egpNeighIntervalPoll - INTEGER, - egpNeighMode - INTEGER, - egpNeighEventTrigger - INTEGER -} - -egpNeighState OBJECT-TYPE - SYNTAX INTEGER { - idle(1), - acquisition(2), - down(3), - up(4), - cease(5) - } - ACCESS read-only - STATUS mandatory - ::= { egpNeighEntry 1 } - -egpNeighAddr OBJECT-TYPE - SYNTAX IpAddress - ACCESS read-only - STATUS mandatory - ::= { egpNeighEntry 2 } - -egpNeighAs OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - ::= { egpNeighEntry 3 } - -egpNeighInMsgs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { egpNeighEntry 4 } - -egpNeighInErrs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { egpNeighEntry 5 } - -egpNeighOutMsgs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { egpNeighEntry 6 } - -egpNeighOutErrs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { egpNeighEntry 7 } - -egpNeighInErrMsgs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { egpNeighEntry 8 } - -egpNeighOutErrMsgs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { egpNeighEntry 9 } - -egpNeighStateUps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { egpNeighEntry 10 } - -egpNeighStateDowns OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { egpNeighEntry 11 } - -egpNeighIntervalHello OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - ::= { egpNeighEntry 12 } - -egpNeighIntervalPoll OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - ::= { egpNeighEntry 13 } - -egpNeighMode OBJECT-TYPE - SYNTAX INTEGER { - active(1), - passive(2) - } - ACCESS read-only - STATUS mandatory - ::= { egpNeighEntry 14 } - -egpNeighEventTrigger OBJECT-TYPE - SYNTAX INTEGER { - start(1), - stop(2) - } - ACCESS read-write - STATUS mandatory - ::= { egpNeighEntry 15 } - --- additional EGP variables - -egpAs OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - ::= { egp 6 } - - --- the Transmission group (empty at present) - --- the SNMP group - -snmpInPkts OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 1 } - -snmpOutPkts OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 2 } - -snmpInBadVersions OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 3 } - -snmpInBadCommunityNames OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 4 } - -snmpInBadCommunityUses OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 5 } - -snmpInASNParseErrs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 6 } - -snmpInBadTypes OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 7 } - -snmpInTooBigs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 8 } - -snmpInNoSuchNames OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 9 } - -snmpInBadValues OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 10 } - -snmpInReadOnlys OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 11 } - -snmpInGenErrs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 12 } - -snmpInTotalReqVars OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 13 } - -snmpInTotalSetVars OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 14 } - -snmpInGetRequests OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 15 } - -snmpInGetNexts OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 16 } - -snmpInSetRequests OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 17 } - -snmpInGetResponses OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 18 } - -snmpInTraps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 19 } - -snmpOutTooBigs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 20 } - -snmpOutNoSuchNames OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 21 } - -snmpOutBadValues OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 22 } - -snmpOutReadOnlys OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 23 } - -snmpOutGenErrs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 24 } - -snmpOutGetRequests OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 25 } - -snmpOutGetNexts OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 26 } - -snmpOutSetRequests OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 27 } - -snmpOutGetResponses OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 28 } - -snmpOutTraps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - ::= { snmp 29 } - -snmpEnableAuthTraps OBJECT-TYPE - SYNTAX INTEGER { - enabled(1), - disabled(2) - } - ACCESS read-write - STATUS mandatory - ::= { snmp 30 } - -END diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/RFC1213-MIB b/src/apps/snmp/LwipMibCompiler/Mibs/RFC1213-MIB deleted file mode 100644 index 2a849ded..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/RFC1213-MIB +++ /dev/null @@ -1,2621 +0,0 @@ -RFC1213-MIB DEFINITIONS ::= BEGIN - -IMPORTS - mgmt, NetworkAddress, IpAddress, Counter, Gauge, - TimeTicks - FROM RFC1155-SMI - OBJECT-TYPE - FROM RFC-1212; - --- This MIB module uses the extended OBJECT-TYPE macro as --- defined in [14]; - - --- MIB-II (same prefix as MIB-I) - -mib-2 OBJECT IDENTIFIER ::= { mgmt 1 } - --- textual conventions - -DisplayString ::= - OCTET STRING --- This data type is used to model textual information taken --- from the NVT ASCII character set. By convention, objects --- with this syntax are declared as having - --- --- SIZE (0..255) - -PhysAddress ::= - OCTET STRING --- This data type is used to model media addresses. For many --- types of media, this will be in a binary representation. --- For example, an ethernet address would be represented as --- a string of 6 octets. - - --- groups in MIB-II - -system OBJECT IDENTIFIER ::= { mib-2 1 } - -interfaces OBJECT IDENTIFIER ::= { mib-2 2 } - -at OBJECT IDENTIFIER ::= { mib-2 3 } - -ip OBJECT IDENTIFIER ::= { mib-2 4 } - -icmp OBJECT IDENTIFIER ::= { mib-2 5 } - -tcp OBJECT IDENTIFIER ::= { mib-2 6 } - -udp OBJECT IDENTIFIER ::= { mib-2 7 } - -egp OBJECT IDENTIFIER ::= { mib-2 8 } - --- historical (some say hysterical) --- cmot OBJECT IDENTIFIER ::= { mib-2 9 } - -transmission OBJECT IDENTIFIER ::= { mib-2 10 } - -snmp OBJECT IDENTIFIER ::= { mib-2 11 } - - --- the System group - --- Implementation of the System group is mandatory for all --- systems. If an agent is not configured to have a value --- for any of these variables, a string of length 0 is --- returned. - -sysDescr OBJECT-TYPE - SYNTAX DisplayString (SIZE (0..255)) - ACCESS read-only - STATUS mandatory - DESCRIPTION - "A textual description of the entity. This value - should include the full name and version - identification of the system's hardware type, - software operating-system, and networking - software. It is mandatory that this only contain - printable ASCII characters." - ::= { system 1 } - -sysObjectID OBJECT-TYPE - SYNTAX OBJECT IDENTIFIER - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The vendor's authoritative identification of the - network management subsystem contained in the - entity. This value is allocated within the SMI - enterprises subtree (1.3.6.1.4.1) and provides an - easy and unambiguous means for determining `what - kind of box' is being managed. For example, if - vendor `Flintstones, Inc.' was assigned the - subtree 1.3.6.1.4.1.4242, it could assign the - identifier 1.3.6.1.4.1.4242.1.1 to its `Fred - Router'." - ::= { system 2 } - -sysUpTime OBJECT-TYPE - SYNTAX TimeTicks - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The time (in hundredths of a second) since the - network management portion of the system was last - re-initialized." - ::= { system 3 } - -sysContact OBJECT-TYPE - SYNTAX DisplayString (SIZE (0..255)) - ACCESS read-write - STATUS mandatory - DESCRIPTION - "The textual identification of the contact person - for this managed node, together with information - on how to contact this person." - ::= { system 4 } - -sysName OBJECT-TYPE - SYNTAX DisplayString (SIZE (0..255)) - ACCESS read-write - STATUS mandatory - DESCRIPTION - "An administratively-assigned name for this - managed node. By convention, this is the node's - fully-qualified domain name." - ::= { system 5 } - -sysLocation OBJECT-TYPE - SYNTAX DisplayString (SIZE (0..255)) - ACCESS read-write - STATUS mandatory - DESCRIPTION - "The physical location of this node (e.g., - `telephone closet, 3rd floor')." - ::= { system 6 } - -sysServices OBJECT-TYPE - SYNTAX INTEGER (0..127) - ACCESS read-only - STATUS mandatory - DESCRIPTION - "A value which indicates the set of services that - this entity primarily offers. - - The value is a sum. This sum initially takes the - value zero, Then, for each layer, L, in the range - 1 through 7, that this node performs transactions - for, 2 raised to (L - 1) is added to the sum. For - example, a node which performs primarily routing - functions would have a value of 4 (2^(3-1)). In - contrast, a node which is a host offering - application services would have a value of 72 - (2^(4-1) + 2^(7-1)). Note that in the context of - the Internet suite of protocols, values should be - calculated accordingly: - - layer functionality - 1 physical (e.g., repeaters) - 2 datalink/subnetwork (e.g., bridges) - 3 internet (e.g., IP gateways) - 4 end-to-end (e.g., IP hosts) - 7 applications (e.g., mail relays) - - For systems including OSI protocols, layers 5 and - 6 may also be counted." - ::= { system 7 } - --- the Interfaces group - --- Implementation of the Interfaces group is mandatory for --- all systems. - -ifNumber OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of network interfaces (regardless of - their current state) present on this system." - ::= { interfaces 1 } - - --- the Interfaces table - --- The Interfaces table contains information on the entity's --- interfaces. Each interface is thought of as being --- attached to a `subnetwork'. Note that this term should --- not be confused with `subnet' which refers to an --- addressing partitioning scheme used in the Internet suite --- of protocols. - -ifTable OBJECT-TYPE - SYNTAX SEQUENCE OF IfEntry - ACCESS not-accessible - STATUS mandatory - DESCRIPTION - "A list of interface entries. The number of - entries is given by the value of ifNumber." - ::= { interfaces 2 } - -ifEntry OBJECT-TYPE - SYNTAX IfEntry - ACCESS not-accessible - STATUS mandatory - DESCRIPTION - "An interface entry containing objects at the - subnetwork layer and below for a particular - interface." - INDEX { ifIndex } - ::= { ifTable 1 } - -IfEntry ::= - SEQUENCE { - ifIndex - INTEGER, - ifDescr - DisplayString, - ifType - INTEGER, - ifMtu - INTEGER, - ifSpeed - Gauge, - ifPhysAddress - PhysAddress, - ifAdminStatus - INTEGER, - ifOperStatus - INTEGER, - ifLastChange - TimeTicks, - ifInOctets - Counter, - ifInUcastPkts - Counter, - ifInNUcastPkts - Counter, - ifInDiscards - Counter, - ifInErrors - Counter, - ifInUnknownProtos - Counter, - ifOutOctets - Counter, - ifOutUcastPkts - Counter, - ifOutNUcastPkts - Counter, - ifOutDiscards - Counter, - ifOutErrors - Counter, - ifOutQLen - Gauge, - ifSpecific - OBJECT IDENTIFIER - } - -ifIndex OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - DESCRIPTION - "A unique value for each interface. Its value - ranges between 1 and the value of ifNumber. The - value for each interface must remain constant at - least from one re-initialization of the entity's - network management system to the next re- - initialization." - ::= { ifEntry 1 } - -ifDescr OBJECT-TYPE - SYNTAX DisplayString (SIZE (0..255)) - ACCESS read-only - STATUS mandatory - DESCRIPTION - "A textual string containing information about the - interface. This string should include the name of - the manufacturer, the product name and the version - of the hardware interface." - ::= { ifEntry 2 } - -ifType OBJECT-TYPE - SYNTAX INTEGER { - other(1), -- none of the following - regular1822(2), - hdh1822(3), - ddn-x25(4), - rfc877-x25(5), - ethernet-csmacd(6), - iso88023-csmacd(7), - iso88024-tokenBus(8), - iso88025-tokenRing(9), - iso88026-man(10), - starLan(11), - proteon-10Mbit(12), - proteon-80Mbit(13), - hyperchannel(14), - fddi(15), - lapb(16), - sdlc(17), - ds1(18), -- T-1 - e1(19), -- european equiv. of T-1 - basicISDN(20), - primaryISDN(21), -- proprietary serial - propPointToPointSerial(22), - ppp(23), - softwareLoopback(24), - eon(25), -- CLNP over IP [11] - ethernet-3Mbit(26), - nsip(27), -- XNS over IP - slip(28), -- generic SLIP - ultra(29), -- ULTRA technologies - ds3(30), -- T-3 - sip(31), -- SMDS - frame-relay(32) - } - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The type of interface, distinguished according to - the physical/link protocol(s) immediately `below' - the network layer in the protocol stack." - ::= { ifEntry 3 } - -ifMtu OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The size of the largest datagram which can be - sent/received on the interface, specified in - octets. For interfaces that are used for - transmitting network datagrams, this is the size - of the largest network datagram that can be sent - on the interface." - ::= { ifEntry 4 } - -ifSpeed OBJECT-TYPE - SYNTAX Gauge - ACCESS read-only - STATUS mandatory - DESCRIPTION - "An estimate of the interface's current bandwidth - in bits per second. For interfaces which do not - vary in bandwidth or for those where no accurate - estimation can be made, this object should contain - the nominal bandwidth." - ::= { ifEntry 5 } - -ifPhysAddress OBJECT-TYPE - SYNTAX PhysAddress - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The interface's address at the protocol layer - immediately `below' the network layer in the - protocol stack. For interfaces which do not have - such an address (e.g., a serial line), this object - should contain an octet string of zero length." - ::= { ifEntry 6 } - -ifAdminStatus OBJECT-TYPE - SYNTAX INTEGER { - up(1), -- ready to pass packets - down(2), - testing(3) -- in some test mode - } - ACCESS read-write - STATUS mandatory - DESCRIPTION - "The desired state of the interface. The - testing(3) state indicates that no operational - packets can be passed." - ::= { ifEntry 7 } - -ifOperStatus OBJECT-TYPE - SYNTAX INTEGER { - up(1), -- ready to pass packets - down(2), - testing(3) -- in some test mode - } - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The current operational state of the interface. - The testing(3) state indicates that no operational - packets can be passed." - ::= { ifEntry 8 } - -ifLastChange OBJECT-TYPE - SYNTAX TimeTicks - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The value of sysUpTime at the time the interface - entered its current operational state. If the - current state was entered prior to the last re- - initialization of the local network management - subsystem, then this object contains a zero - value." - ::= { ifEntry 9 } - -ifInOctets OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of octets received on the - interface, including framing characters." - ::= { ifEntry 10 } - -ifInUcastPkts OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of subnetwork-unicast packets - delivered to a higher-layer protocol." - ::= { ifEntry 11 } - -ifInNUcastPkts OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of non-unicast (i.e., subnetwork- - broadcast or subnetwork-multicast) packets - delivered to a higher-layer protocol." - ::= { ifEntry 12 } - -ifInDiscards OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of inbound packets which were chosen - to be discarded even though no errors had been - detected to prevent their being deliverable to a - higher-layer protocol. One possible reason for - discarding such a packet could be to free up - buffer space." - ::= { ifEntry 13 } - -ifInErrors OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of inbound packets that contained - errors preventing them from being deliverable to a - higher-layer protocol." - ::= { ifEntry 14 } - -ifInUnknownProtos OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of packets received via the interface - which were discarded because of an unknown or - unsupported protocol." - ::= { ifEntry 15 } - -ifOutOctets OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of octets transmitted out of the - interface, including framing characters." - ::= { ifEntry 16 } - -ifOutUcastPkts OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of packets that higher-level - protocols requested be transmitted to a - subnetwork-unicast address, including those that - were discarded or not sent." - ::= { ifEntry 17 } - -ifOutNUcastPkts OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of packets that higher-level - protocols requested be transmitted to a non- - unicast (i.e., a subnetwork-broadcast or - subnetwork-multicast) address, including those - that were discarded or not sent." - ::= { ifEntry 18 } - -ifOutDiscards OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of outbound packets which were chosen - to be discarded even though no errors had been - detected to prevent their being transmitted. One - possible reason for discarding such a packet could - be to free up buffer space." - ::= { ifEntry 19 } - -ifOutErrors OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of outbound packets that could not be - transmitted because of errors." - ::= { ifEntry 20 } - -ifOutQLen OBJECT-TYPE - SYNTAX Gauge - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The length of the output packet queue (in - packets)." - ::= { ifEntry 21 } - -ifSpecific OBJECT-TYPE - SYNTAX OBJECT IDENTIFIER - ACCESS read-only - STATUS mandatory - DESCRIPTION - "A reference to MIB definitions specific to the - particular media being used to realize the - interface. For example, if the interface is - realized by an ethernet, then the value of this - object refers to a document defining objects - specific to ethernet. If this information is not - present, its value should be set to the OBJECT - IDENTIFIER { 0 0 }, which is a syntatically valid - object identifier, and any conformant - implementation of ASN.1 and BER must be able to - generate and recognize this value." - ::= { ifEntry 22 } - - --- the Address Translation group - --- Implementation of the Address Translation group is --- mandatory for all systems. Note however that this group --- is deprecated by MIB-II. That is, it is being included - --- solely for compatibility with MIB-I nodes, and will most --- likely be excluded from MIB-III nodes. From MIB-II and --- onwards, each network protocol group contains its own --- address translation tables. - --- The Address Translation group contains one table which is --- the union across all interfaces of the translation tables --- for converting a NetworkAddress (e.g., an IP address) into --- a subnetwork-specific address. For lack of a better term, --- this document refers to such a subnetwork-specific address --- as a `physical' address. - --- Examples of such translation tables are: for broadcast --- media where ARP is in use, the translation table is --- equivalent to the ARP cache; or, on an X.25 network where --- non-algorithmic translation to X.121 addresses is --- required, the translation table contains the --- NetworkAddress to X.121 address equivalences. - -atTable OBJECT-TYPE - SYNTAX SEQUENCE OF AtEntry - ACCESS not-accessible - STATUS deprecated - DESCRIPTION - "The Address Translation tables contain the - NetworkAddress to `physical' address equivalences. - Some interfaces do not use translation tables for - determining address equivalences (e.g., DDN-X.25 - has an algorithmic method); if all interfaces are - of this type, then the Address Translation table - is empty, i.e., has zero entries." - ::= { at 1 } - -atEntry OBJECT-TYPE - SYNTAX AtEntry - ACCESS not-accessible - STATUS deprecated - DESCRIPTION - "Each entry contains one NetworkAddress to - `physical' address equivalence." - INDEX { atIfIndex, - atNetAddress } - ::= { atTable 1 } - -AtEntry ::= - SEQUENCE { - atIfIndex - INTEGER, - atPhysAddress - PhysAddress, - atNetAddress - NetworkAddress - } - -atIfIndex OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-write - STATUS deprecated - DESCRIPTION - "The interface on which this entry's equivalence - is effective. The interface identified by a - particular value of this index is the same - interface as identified by the same value of - ifIndex." - ::= { atEntry 1 } - -atPhysAddress OBJECT-TYPE - SYNTAX PhysAddress - ACCESS read-write - STATUS deprecated - DESCRIPTION - "The media-dependent `physical' address. - - Setting this object to a null string (one of zero - length) has the effect of invaliding the - corresponding entry in the atTable object. That - is, it effectively dissasociates the interface - identified with said entry from the mapping - identified with said entry. It is an - implementation-specific matter as to whether the - agent removes an invalidated entry from the table. - Accordingly, management stations must be prepared - to receive tabular information from agents that - corresponds to entries not currently in use. - Proper interpretation of such entries requires - examination of the relevant atPhysAddress object." - ::= { atEntry 2 } - -atNetAddress OBJECT-TYPE - SYNTAX NetworkAddress - ACCESS read-write - STATUS deprecated - DESCRIPTION - "The NetworkAddress (e.g., the IP address) - corresponding to the media-dependent `physical' - address." - ::= { atEntry 3 } - - --- the IP group - --- Implementation of the IP group is mandatory for all --- systems. - -ipForwarding OBJECT-TYPE - SYNTAX INTEGER { - forwarding(1), -- acting as a gateway - not-forwarding(2) -- NOT acting as a gateway - } - ACCESS read-write - STATUS mandatory - DESCRIPTION - "The indication of whether this entity is acting - as an IP gateway in respect to the forwarding of - datagrams received by, but not addressed to, this - entity. IP gateways forward datagrams. IP hosts - do not (except those source-routed via the host). - - Note that for some managed nodes, this object may - take on only a subset of the values possible. - Accordingly, it is appropriate for an agent to - return a `badValue' response if a management - station attempts to change this object to an - inappropriate value." - ::= { ip 1 } - -ipDefaultTTL OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-write - STATUS mandatory - DESCRIPTION - "The default value inserted into the Time-To-Live - field of the IP header of datagrams originated at - this entity, whenever a TTL value is not supplied - by the transport layer protocol." - ::= { ip 2 } - -ipInReceives OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of input datagrams received from - interfaces, including those received in error." - ::= { ip 3 } - -ipInHdrErrors OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of input datagrams discarded due to - errors in their IP headers, including bad - checksums, version number mismatch, other format - errors, time-to-live exceeded, errors discovered - in processing their IP options, etc." - ::= { ip 4 } - -ipInAddrErrors OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of input datagrams discarded because - the IP address in their IP header's destination - field was not a valid address to be received at - this entity. This count includes invalid - addresses (e.g., 0.0.0.0) and addresses of - unsupported Classes (e.g., Class E). For entities - which are not IP Gateways and therefore do not - forward datagrams, this counter includes datagrams - discarded because the destination address was not - a local address." - ::= { ip 5 } - -ipForwDatagrams OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of input datagrams for which this - entity was not their final IP destination, as a - result of which an attempt was made to find a - route to forward them to that final destination. - In entities which do not act as IP Gateways, this - counter will include only those packets which were - Source-Routed via this entity, and the Source- - Route option processing was successful." - ::= { ip 6 } - -ipInUnknownProtos OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of locally-addressed datagrams - received successfully but discarded because of an - unknown or unsupported protocol." - ::= { ip 7 } - -ipInDiscards OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of input IP datagrams for which no - problems were encountered to prevent their - continued processing, but which were discarded - (e.g., for lack of buffer space). Note that this - counter does not include any datagrams discarded - while awaiting re-assembly." - ::= { ip 8 } - -ipInDelivers OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of input datagrams successfully - delivered to IP user-protocols (including ICMP)." - ::= { ip 9 } - -ipOutRequests OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of IP datagrams which local IP - user-protocols (including ICMP) supplied to IP in - requests for transmission. Note that this counter - does not include any datagrams counted in - ipForwDatagrams." - ::= { ip 10 } - -ipOutDiscards OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of output IP datagrams for which no - problem was encountered to prevent their - transmission to their destination, but which were - discarded (e.g., for lack of buffer space). Note - that this counter would include datagrams counted - in ipForwDatagrams if any such packets met this - (discretionary) discard criterion." - ::= { ip 11 } - -ipOutNoRoutes OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of IP datagrams discarded because no - route could be found to transmit them to their - destination. Note that this counter includes any - packets counted in ipForwDatagrams which meet this - `no-route' criterion. Note that this includes any - datagarms which a host cannot route because all of - its default gateways are down." - ::= { ip 12 } - -ipReasmTimeout OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The maximum number of seconds which received - fragments are held while they are awaiting - reassembly at this entity." - ::= { ip 13 } - -ipReasmReqds OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of IP fragments received which needed - to be reassembled at this entity." - ::= { ip 14 } - -ipReasmOKs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of IP datagrams successfully re- - assembled." - ::= { ip 15 } - -ipReasmFails OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of failures detected by the IP re- - assembly algorithm (for whatever reason: timed - out, errors, etc). Note that this is not - necessarily a count of discarded IP fragments - since some algorithms (notably the algorithm in - RFC 815) can lose track of the number of fragments - by combining them as they are received." - ::= { ip 16 } - -ipFragOKs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of IP datagrams that have been - successfully fragmented at this entity." - ::= { ip 17 } - -ipFragFails OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of IP datagrams that have been - discarded because they needed to be fragmented at - this entity but could not be, e.g., because their - Don't Fragment flag was set." - ::= { ip 18 } - -ipFragCreates OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of IP datagram fragments that have - been generated as a result of fragmentation at - this entity." - ::= { ip 19 } - --- the IP address table - --- The IP address table contains this entity's IP addressing --- information. - -ipAddrTable OBJECT-TYPE - SYNTAX SEQUENCE OF IpAddrEntry - ACCESS not-accessible - STATUS mandatory - DESCRIPTION - "The table of addressing information relevant to - this entity's IP addresses." - ::= { ip 20 } - -ipAddrEntry OBJECT-TYPE - SYNTAX IpAddrEntry - ACCESS not-accessible - STATUS mandatory - DESCRIPTION - "The addressing information for one of this - entity's IP addresses." - INDEX { ipAdEntAddr } - ::= { ipAddrTable 1 } - -IpAddrEntry ::= - SEQUENCE { - ipAdEntAddr - IpAddress, - ipAdEntIfIndex - INTEGER, - ipAdEntNetMask - IpAddress, - ipAdEntBcastAddr - INTEGER, - ipAdEntReasmMaxSize - INTEGER (0..65535) - } - -ipAdEntAddr OBJECT-TYPE - SYNTAX IpAddress - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The IP address to which this entry's addressing - information pertains." - ::= { ipAddrEntry 1 } - -ipAdEntIfIndex OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The index value which uniquely identifies the - interface to which this entry is applicable. The - interface identified by a particular value of this - index is the same interface as identified by the - same value of ifIndex." - ::= { ipAddrEntry 2 } - -ipAdEntNetMask OBJECT-TYPE - SYNTAX IpAddress - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The subnet mask associated with the IP address of - this entry. The value of the mask is an IP - address with all the network bits set to 1 and all - the hosts bits set to 0." - ::= { ipAddrEntry 3 } - -ipAdEntBcastAddr OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The value of the least-significant bit in the IP - broadcast address used for sending datagrams on - the (logical) interface associated with the IP - address of this entry. For example, when the - Internet standard all-ones broadcast address is - used, the value will be 1. This value applies to - both the subnet and network broadcasts addresses - used by the entity on this (logical) interface." - ::= { ipAddrEntry 4 } - -ipAdEntReasmMaxSize OBJECT-TYPE - SYNTAX INTEGER (0..65535) - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The size of the largest IP datagram which this - entity can re-assemble from incoming IP fragmented - datagrams received on this interface." - ::= { ipAddrEntry 5 } - --- the IP routing table - --- The IP routing table contains an entry for each route --- presently known to this entity. - -ipRouteTable OBJECT-TYPE - SYNTAX SEQUENCE OF IpRouteEntry - ACCESS not-accessible - STATUS mandatory - DESCRIPTION - "This entity's IP Routing table." - ::= { ip 21 } - -ipRouteEntry OBJECT-TYPE - SYNTAX IpRouteEntry - ACCESS not-accessible - STATUS mandatory - DESCRIPTION - "A route to a particular destination." - INDEX { ipRouteDest } - ::= { ipRouteTable 1 } - -IpRouteEntry ::= - SEQUENCE { - ipRouteDest - IpAddress, - ipRouteIfIndex - INTEGER, - ipRouteMetric1 - INTEGER, - ipRouteMetric2 - INTEGER, - ipRouteMetric3 - INTEGER, - ipRouteMetric4 - INTEGER, - ipRouteNextHop - IpAddress, - ipRouteType - INTEGER, - ipRouteProto - INTEGER, - ipRouteAge - INTEGER, - ipRouteMask - IpAddress, - ipRouteMetric5 - INTEGER, - ipRouteInfo - OBJECT IDENTIFIER - } - -ipRouteDest OBJECT-TYPE - SYNTAX IpAddress - ACCESS read-write - STATUS mandatory - DESCRIPTION - "The destination IP address of this route. An - entry with a value of 0.0.0.0 is considered a - default route. Multiple routes to a single - destination can appear in the table, but access to - such multiple entries is dependent on the table- - access mechanisms defined by the network - management protocol in use." - ::= { ipRouteEntry 1 } - -ipRouteIfIndex OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-write - STATUS mandatory - DESCRIPTION - "The index value which uniquely identifies the - local interface through which the next hop of this - route should be reached. The interface identified - by a particular value of this index is the same - interface as identified by the same value of - ifIndex." - ::= { ipRouteEntry 2 } - -ipRouteMetric1 OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-write - STATUS mandatory - DESCRIPTION - "The primary routing metric for this route. The - semantics of this metric are determined by the - routing-protocol specified in the route's - ipRouteProto value. If this metric is not used, - its value should be set to -1." - ::= { ipRouteEntry 3 } - -ipRouteMetric2 OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-write - STATUS mandatory - DESCRIPTION - "An alternate routing metric for this route. The - semantics of this metric are determined by the - routing-protocol specified in the route's - ipRouteProto value. If this metric is not used, - its value should be set to -1." - ::= { ipRouteEntry 4 } - -ipRouteMetric3 OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-write - STATUS mandatory - DESCRIPTION - "An alternate routing metric for this route. The - semantics of this metric are determined by the - routing-protocol specified in the route's - ipRouteProto value. If this metric is not used, - its value should be set to -1." - ::= { ipRouteEntry 5 } - -ipRouteMetric4 OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-write - STATUS mandatory - DESCRIPTION - "An alternate routing metric for this route. The - semantics of this metric are determined by the - routing-protocol specified in the route's - ipRouteProto value. If this metric is not used, - its value should be set to -1." - ::= { ipRouteEntry 6 } - -ipRouteNextHop OBJECT-TYPE - SYNTAX IpAddress - ACCESS read-write - STATUS mandatory - DESCRIPTION - "The IP address of the next hop of this route. - (In the case of a route bound to an interface - which is realized via a broadcast media, the value - of this field is the agent's IP address on that - interface.)" - ::= { ipRouteEntry 7 } - -ipRouteType OBJECT-TYPE - SYNTAX INTEGER { - other(1), -- none of the following - - invalid(2), -- an invalidated route - - -- route to directly - direct(3), -- connected (sub-)network - - -- route to a non-local - indirect(4) -- host/network/sub-network - } - ACCESS read-write - STATUS mandatory - DESCRIPTION - "The type of route. Note that the values - direct(3) and indirect(4) refer to the notion of - direct and indirect routing in the IP - architecture. - - Setting this object to the value invalid(2) has - the effect of invalidating the corresponding entry - in the ipRouteTable object. That is, it - effectively dissasociates the destination - identified with said entry from the route - identified with said entry. It is an - implementation-specific matter as to whether the - agent removes an invalidated entry from the table. - Accordingly, management stations must be prepared - to receive tabular information from agents that - corresponds to entries not currently in use. - Proper interpretation of such entries requires - examination of the relevant ipRouteType object." - ::= { ipRouteEntry 8 } - -ipRouteProto OBJECT-TYPE - SYNTAX INTEGER { - other(1), -- none of the following - - -- non-protocol information, - -- e.g., manually configured - local(2), -- entries - - -- set via a network - netmgmt(3), -- management protocol - - -- obtained via ICMP, - icmp(4), -- e.g., Redirect - - -- the remaining values are - -- all gateway routing - -- protocols - egp(5), - ggp(6), - hello(7), - rip(8), - is-is(9), - es-is(10), - ciscoIgrp(11), - bbnSpfIgp(12), - ospf(13), - bgp(14) - } - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The routing mechanism via which this route was - learned. Inclusion of values for gateway routing - protocols is not intended to imply that hosts - should support those protocols." - ::= { ipRouteEntry 9 } - -ipRouteAge OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-write - STATUS mandatory - DESCRIPTION - "The number of seconds since this route was last - updated or otherwise determined to be correct. - Note that no semantics of `too old' can be implied - except through knowledge of the routing protocol - by which the route was learned." - ::= { ipRouteEntry 10 } - -ipRouteMask OBJECT-TYPE - SYNTAX IpAddress - ACCESS read-write - STATUS mandatory - DESCRIPTION - "Indicate the mask to be logical-ANDed with the - destination address before being compared to the - value in the ipRouteDest field. For those systems - that do not support arbitrary subnet masks, an - agent constructs the value of the ipRouteMask by - determining whether the value of the correspondent - ipRouteDest field belong to a class-A, B, or C - network, and then using one of: - - mask network - 255.0.0.0 class-A - 255.255.0.0 class-B - 255.255.255.0 class-C - If the value of the ipRouteDest is 0.0.0.0 (a - default route), then the mask value is also - 0.0.0.0. It should be noted that all IP routing - subsystems implicitly use this mechanism." - ::= { ipRouteEntry 11 } - -ipRouteMetric5 OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-write - STATUS mandatory - DESCRIPTION - "An alternate routing metric for this route. The - semantics of this metric are determined by the - routing-protocol specified in the route's - ipRouteProto value. If this metric is not used, - its value should be set to -1." - ::= { ipRouteEntry 12 } - -ipRouteInfo OBJECT-TYPE - SYNTAX OBJECT IDENTIFIER - ACCESS read-only - STATUS mandatory - DESCRIPTION - "A reference to MIB definitions specific to the - particular routing protocol which is responsible - for this route, as determined by the value - specified in the route's ipRouteProto value. If - this information is not present, its value should - be set to the OBJECT IDENTIFIER { 0 0 }, which is - a syntatically valid object identifier, and any - conformant implementation of ASN.1 and BER must be - able to generate and recognize this value." - ::= { ipRouteEntry 13 } - - --- the IP Address Translation table - --- The IP address translation table contain the IpAddress to --- `physical' address equivalences. Some interfaces do not --- use translation tables for determining address --- equivalences (e.g., DDN-X.25 has an algorithmic method); --- if all interfaces are of this type, then the Address --- Translation table is empty, i.e., has zero entries. - -ipNetToMediaTable OBJECT-TYPE - SYNTAX SEQUENCE OF IpNetToMediaEntry - ACCESS not-accessible - STATUS mandatory - DESCRIPTION - "The IP Address Translation table used for mapping - from IP addresses to physical addresses." - ::= { ip 22 } - -ipNetToMediaEntry OBJECT-TYPE - SYNTAX IpNetToMediaEntry - ACCESS not-accessible - STATUS mandatory - DESCRIPTION - "Each entry contains one IpAddress to `physical' - address equivalence." - INDEX { ipNetToMediaIfIndex, - ipNetToMediaNetAddress } - ::= { ipNetToMediaTable 1 } - -IpNetToMediaEntry ::= - SEQUENCE { - ipNetToMediaIfIndex - INTEGER, - ipNetToMediaPhysAddress - PhysAddress, - ipNetToMediaNetAddress - IpAddress, - ipNetToMediaType - INTEGER - } - -ipNetToMediaIfIndex OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-write - STATUS mandatory - DESCRIPTION - "The interface on which this entry's equivalence - is effective. The interface identified by a - particular value of this index is the same - interface as identified by the same value of - ifIndex." - ::= { ipNetToMediaEntry 1 } - -ipNetToMediaPhysAddress OBJECT-TYPE - SYNTAX PhysAddress - ACCESS read-write - STATUS mandatory - DESCRIPTION - "The media-dependent `physical' address." - ::= { ipNetToMediaEntry 2 } - -ipNetToMediaNetAddress OBJECT-TYPE - SYNTAX IpAddress - ACCESS read-write - STATUS mandatory - DESCRIPTION - "The IpAddress corresponding to the media- - dependent `physical' address." - ::= { ipNetToMediaEntry 3 } - -ipNetToMediaType OBJECT-TYPE - SYNTAX INTEGER { - other(1), -- none of the following - invalid(2), -- an invalidated mapping - dynamic(3), - static(4) - } - ACCESS read-write - STATUS mandatory - DESCRIPTION - "The type of mapping. - - Setting this object to the value invalid(2) has - the effect of invalidating the corresponding entry - in the ipNetToMediaTable. That is, it effectively - dissasociates the interface identified with said - entry from the mapping identified with said entry. - It is an implementation-specific matter as to - whether the agent removes an invalidated entry - from the table. Accordingly, management stations - must be prepared to receive tabular information - from agents that corresponds to entries not - currently in use. Proper interpretation of such - entries requires examination of the relevant - ipNetToMediaType object." - ::= { ipNetToMediaEntry 4 } - - --- additional IP objects - -ipRoutingDiscards OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of routing entries which were chosen - to be discarded even though they are valid. One - possible reason for discarding such an entry could - be to free-up buffer space for other routing - entries." - ::= { ip 23 } - - --- the ICMP group - --- Implementation of the ICMP group is mandatory for all --- systems. - -icmpInMsgs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of ICMP messages which the - entity received. Note that this counter includes - all those counted by icmpInErrors." - ::= { icmp 1 } - -icmpInErrors OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP messages which the entity - received but determined as having ICMP-specific - errors (bad ICMP checksums, bad length, etc.)." - ::= { icmp 2 } - -icmpInDestUnreachs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Destination Unreachable - messages received." - ::= { icmp 3 } - -icmpInTimeExcds OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Time Exceeded messages - received." - ::= { icmp 4 } - -icmpInParmProbs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Parameter Problem messages - received." - ::= { icmp 5 } - -icmpInSrcQuenchs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Source Quench messages - received." - ::= { icmp 6 } - -icmpInRedirects OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Redirect messages received." - ::= { icmp 7 } - -icmpInEchos OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Echo (request) messages - received." - ::= { icmp 8 } - -icmpInEchoReps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Echo Reply messages received." - ::= { icmp 9 } - -icmpInTimestamps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Timestamp (request) messages - received." - ::= { icmp 10 } - -icmpInTimestampReps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Timestamp Reply messages - received." - ::= { icmp 11 } - -icmpInAddrMasks OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Address Mask Request messages - received." - ::= { icmp 12 } - -icmpInAddrMaskReps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Address Mask Reply messages - received." - ::= { icmp 13 } - -icmpOutMsgs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of ICMP messages which this - entity attempted to send. Note that this counter - includes all those counted by icmpOutErrors." - ::= { icmp 14 } - -icmpOutErrors OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP messages which this entity did - not send due to problems discovered within ICMP - such as a lack of buffers. This value should not - include errors discovered outside the ICMP layer - such as the inability of IP to route the resultant - datagram. In some implementations there may be no - types of error which contribute to this counter's - value." - ::= { icmp 15 } - -icmpOutDestUnreachs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Destination Unreachable - messages sent." - ::= { icmp 16 } - -icmpOutTimeExcds OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Time Exceeded messages sent." - ::= { icmp 17 } - -icmpOutParmProbs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Parameter Problem messages - sent." - ::= { icmp 18 } - -icmpOutSrcQuenchs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Source Quench messages sent." - ::= { icmp 19 } - -icmpOutRedirects OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Redirect messages sent. For a - host, this object will always be zero, since hosts - do not send redirects." - ::= { icmp 20 } - -icmpOutEchos OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Echo (request) messages sent." - ::= { icmp 21 } - -icmpOutEchoReps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Echo Reply messages sent." - ::= { icmp 22 } - -icmpOutTimestamps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Timestamp (request) messages - sent." - ::= { icmp 23 } - -icmpOutTimestampReps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Timestamp Reply messages - sent." - ::= { icmp 24 } - -icmpOutAddrMasks OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Address Mask Request messages - sent." - ::= { icmp 25 } - -icmpOutAddrMaskReps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of ICMP Address Mask Reply messages - sent." - ::= { icmp 26 } - - --- the TCP group - --- Implementation of the TCP group is mandatory for all --- systems that implement the TCP. - --- Note that instances of object types that represent --- information about a particular TCP connection are --- transient; they persist only as long as the connection --- in question. - -tcpRtoAlgorithm OBJECT-TYPE - SYNTAX INTEGER { - other(1), -- none of the following - - constant(2), -- a constant rto - rsre(3), -- MIL-STD-1778, Appendix B - vanj(4) -- Van Jacobson's algorithm [10] - } - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The algorithm used to determine the timeout value - used for retransmitting unacknowledged octets." - ::= { tcp 1 } - -tcpRtoMin OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The minimum value permitted by a TCP - implementation for the retransmission timeout, - measured in milliseconds. More refined semantics - for objects of this type depend upon the algorithm - used to determine the retransmission timeout. In - particular, when the timeout algorithm is rsre(3), - an object of this type has the semantics of the - LBOUND quantity described in RFC 793." - ::= { tcp 2 } - - -tcpRtoMax OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The maximum value permitted by a TCP - implementation for the retransmission timeout, - measured in milliseconds. More refined semantics - for objects of this type depend upon the algorithm - used to determine the retransmission timeout. In - particular, when the timeout algorithm is rsre(3), - an object of this type has the semantics of the - UBOUND quantity described in RFC 793." - ::= { tcp 3 } - -tcpMaxConn OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The limit on the total number of TCP connections - the entity can support. In entities where the - maximum number of connections is dynamic, this - object should contain the value -1." - ::= { tcp 4 } - -tcpActiveOpens OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of times TCP connections have made a - direct transition to the SYN-SENT state from the - CLOSED state." - ::= { tcp 5 } - -tcpPassiveOpens OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of times TCP connections have made a - direct transition to the SYN-RCVD state from the - LISTEN state." - ::= { tcp 6 } - -tcpAttemptFails OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of times TCP connections have made a - direct transition to the CLOSED state from either - the SYN-SENT state or the SYN-RCVD state, plus the - number of times TCP connections have made a direct - transition to the LISTEN state from the SYN-RCVD - state." - ::= { tcp 7 } - -tcpEstabResets OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of times TCP connections have made a - direct transition to the CLOSED state from either - the ESTABLISHED state or the CLOSE-WAIT state." - ::= { tcp 8 } - -tcpCurrEstab OBJECT-TYPE - SYNTAX Gauge - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of TCP connections for which the - current state is either ESTABLISHED or CLOSE- - WAIT." - ::= { tcp 9 } - -tcpInSegs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of segments received, including - those received in error. This count includes - segments received on currently established - connections." - ::= { tcp 10 } - -tcpOutSegs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of segments sent, including - those on current connections but excluding those - containing only retransmitted octets." - ::= { tcp 11 } - -tcpRetransSegs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of segments retransmitted - that - is, the number of TCP segments transmitted - containing one or more previously transmitted - octets." - ::= { tcp 12 } - - --- the TCP Connection table - --- The TCP connection table contains information about this --- entity's existing TCP connections. - -tcpConnTable OBJECT-TYPE - SYNTAX SEQUENCE OF TcpConnEntry - ACCESS not-accessible - STATUS mandatory - DESCRIPTION - "A table containing TCP connection-specific - information." - ::= { tcp 13 } - -tcpConnEntry OBJECT-TYPE - SYNTAX TcpConnEntry - ACCESS not-accessible - STATUS mandatory - DESCRIPTION - "Information about a particular current TCP - connection. An object of this type is transient, - in that it ceases to exist when (or soon after) - the connection makes the transition to the CLOSED - state." - INDEX { tcpConnLocalAddress, - tcpConnLocalPort, - tcpConnRemAddress, - tcpConnRemPort } - ::= { tcpConnTable 1 } - -TcpConnEntry ::= - SEQUENCE { - tcpConnState - INTEGER, - tcpConnLocalAddress - IpAddress, - tcpConnLocalPort - INTEGER (0..65535), - tcpConnRemAddress - IpAddress, - tcpConnRemPort - INTEGER (0..65535) - } - -tcpConnState OBJECT-TYPE - SYNTAX INTEGER { - closed(1), - listen(2), - synSent(3), - synReceived(4), - established(5), - finWait1(6), - finWait2(7), - closeWait(8), - lastAck(9), - closing(10), - timeWait(11), - deleteTCB(12) - } - ACCESS read-write - STATUS mandatory - DESCRIPTION - "The state of this TCP connection. - - The only value which may be set by a management - station is deleteTCB(12). Accordingly, it is - appropriate for an agent to return a `badValue' - response if a management station attempts to set - this object to any other value. - - If a management station sets this object to the - value deleteTCB(12), then this has the effect of - deleting the TCB (as defined in RFC 793) of the - corresponding connection on the managed node, - resulting in immediate termination of the - connection. - - As an implementation-specific option, a RST - segment may be sent from the managed node to the - other TCP endpoint (note however that RST segments - are not sent reliably)." - ::= { tcpConnEntry 1 } - -tcpConnLocalAddress OBJECT-TYPE - SYNTAX IpAddress - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The local IP address for this TCP connection. In - the case of a connection in the listen state which - is willing to accept connections for any IP - interface associated with the node, the value - 0.0.0.0 is used." - ::= { tcpConnEntry 2 } - -tcpConnLocalPort OBJECT-TYPE - SYNTAX INTEGER (0..65535) - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The local port number for this TCP connection." - ::= { tcpConnEntry 3 } - -tcpConnRemAddress OBJECT-TYPE - SYNTAX IpAddress - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The remote IP address for this TCP connection." - ::= { tcpConnEntry 4 } - -tcpConnRemPort OBJECT-TYPE - SYNTAX INTEGER (0..65535) - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The remote port number for this TCP connection." - ::= { tcpConnEntry 5 } - - --- additional TCP objects - -tcpInErrs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of segments received in error - (e.g., bad TCP checksums)." - ::= { tcp 14 } - -tcpOutRsts OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of TCP segments sent containing the - RST flag." - ::= { tcp 15 } - - --- the UDP group - --- Implementation of the UDP group is mandatory for all --- systems which implement the UDP. - -udpInDatagrams OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of UDP datagrams delivered to - UDP users." - ::= { udp 1 } - -udpNoPorts OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of received UDP datagrams for - which there was no application at the destination - port." - ::= { udp 2 } - -udpInErrors OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of received UDP datagrams that could - not be delivered for reasons other than the lack - of an application at the destination port." - ::= { udp 3 } - -udpOutDatagrams OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of UDP datagrams sent from this - entity." - ::= { udp 4 } - - --- the UDP Listener table - --- The UDP listener table contains information about this --- entity's UDP end-points on which a local application is --- currently accepting datagrams. - -udpTable OBJECT-TYPE - SYNTAX SEQUENCE OF UdpEntry - ACCESS not-accessible - STATUS mandatory - DESCRIPTION - "A table containing UDP listener information." - ::= { udp 5 } - -udpEntry OBJECT-TYPE - SYNTAX UdpEntry - ACCESS not-accessible - STATUS mandatory - DESCRIPTION - "Information about a particular current UDP - listener." - INDEX { udpLocalAddress, udpLocalPort } - ::= { udpTable 1 } - -UdpEntry ::= - SEQUENCE { - udpLocalAddress - IpAddress, - udpLocalPort - INTEGER (0..65535) - } - -udpLocalAddress OBJECT-TYPE - SYNTAX IpAddress - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The local IP address for this UDP listener. In - the case of a UDP listener which is willing to - accept datagrams for any IP interface associated - with the node, the value 0.0.0.0 is used." - ::= { udpEntry 1 } - -udpLocalPort OBJECT-TYPE - SYNTAX INTEGER (0..65535) - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The local port number for this UDP listener." - ::= { udpEntry 2 } - - --- the EGP group - --- Implementation of the EGP group is mandatory for all --- systems which implement the EGP. - -egpInMsgs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of EGP messages received without - error." - ::= { egp 1 } - -egpInErrors OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of EGP messages received that proved - to be in error." - ::= { egp 2 } - -egpOutMsgs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of locally generated EGP - messages." - ::= { egp 3 } - -egpOutErrors OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of locally generated EGP messages not - sent due to resource limitations within an EGP - entity." - ::= { egp 4 } - - --- the EGP Neighbor table - --- The EGP neighbor table contains information about this --- entity's EGP neighbors. - -egpNeighTable OBJECT-TYPE - SYNTAX SEQUENCE OF EgpNeighEntry - ACCESS not-accessible - STATUS mandatory - DESCRIPTION - "The EGP neighbor table." - ::= { egp 5 } - -egpNeighEntry OBJECT-TYPE - SYNTAX EgpNeighEntry - ACCESS not-accessible - STATUS mandatory - DESCRIPTION - "Information about this entity's relationship with - a particular EGP neighbor." - INDEX { egpNeighAddr } - ::= { egpNeighTable 1 } - -EgpNeighEntry ::= - SEQUENCE { - egpNeighState - INTEGER, - egpNeighAddr - IpAddress, - egpNeighAs - INTEGER, - egpNeighInMsgs - Counter, - egpNeighInErrs - Counter, - egpNeighOutMsgs - Counter, - egpNeighOutErrs - Counter, - egpNeighInErrMsgs - Counter, - egpNeighOutErrMsgs - Counter, - egpNeighStateUps - Counter, - egpNeighStateDowns - Counter, - egpNeighIntervalHello - INTEGER, - egpNeighIntervalPoll - INTEGER, - egpNeighMode - INTEGER, - egpNeighEventTrigger - INTEGER - } - -egpNeighState OBJECT-TYPE - SYNTAX INTEGER { - idle(1), - acquisition(2), - down(3), - up(4), - cease(5) - } - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The EGP state of the local system with respect to - this entry's EGP neighbor. Each EGP state is - represented by a value that is one greater than - the numerical value associated with said state in - RFC 904." - ::= { egpNeighEntry 1 } - -egpNeighAddr OBJECT-TYPE - SYNTAX IpAddress - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The IP address of this entry's EGP neighbor." - ::= { egpNeighEntry 2 } - -egpNeighAs OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The autonomous system of this EGP peer. Zero - should be specified if the autonomous system - number of the neighbor is not yet known." - ::= { egpNeighEntry 3 } - -egpNeighInMsgs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of EGP messages received without error - from this EGP peer." - ::= { egpNeighEntry 4 } - -egpNeighInErrs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of EGP messages received from this EGP - peer that proved to be in error (e.g., bad EGP - checksum)." - ::= { egpNeighEntry 5 } - -egpNeighOutMsgs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of locally generated EGP messages to - this EGP peer." - ::= { egpNeighEntry 6 } - -egpNeighOutErrs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of locally generated EGP messages not - sent to this EGP peer due to resource limitations - within an EGP entity." - ::= { egpNeighEntry 7 } - -egpNeighInErrMsgs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of EGP-defined error messages received - from this EGP peer." - ::= { egpNeighEntry 8 } - -egpNeighOutErrMsgs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of EGP-defined error messages sent to - this EGP peer." - ::= { egpNeighEntry 9 } - -egpNeighStateUps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of EGP state transitions to the UP - state with this EGP peer." - ::= { egpNeighEntry 10 } - -egpNeighStateDowns OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The number of EGP state transitions from the UP - state to any other state with this EGP peer." - ::= { egpNeighEntry 11 } - -egpNeighIntervalHello OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The interval between EGP Hello command - retransmissions (in hundredths of a second). This - represents the t1 timer as defined in RFC 904." - ::= { egpNeighEntry 12 } - -egpNeighIntervalPoll OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The interval between EGP poll command - retransmissions (in hundredths of a second). This - represents the t3 timer as defined in RFC 904." - ::= { egpNeighEntry 13 } - -egpNeighMode OBJECT-TYPE - SYNTAX INTEGER { active(1), passive(2) } - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The polling mode of this EGP entity, either - passive or active." - ::= { egpNeighEntry 14 } - -egpNeighEventTrigger OBJECT-TYPE - SYNTAX INTEGER { start(1), stop(2) } - ACCESS read-write - STATUS mandatory - DESCRIPTION - "A control variable used to trigger operator- - initiated Start and Stop events. When read, this - variable always returns the most recent value that - egpNeighEventTrigger was set to. If it has not - been set since the last initialization of the - network management subsystem on the node, it - returns a value of `stop'. - - When set, this variable causes a Start or Stop - event on the specified neighbor, as specified on - pages 8-10 of RFC 904. Briefly, a Start event - causes an Idle peer to begin neighbor acquisition - and a non-Idle peer to reinitiate neighbor - acquisition. A stop event causes a non-Idle peer - to return to the Idle state until a Start event - occurs, either via egpNeighEventTrigger or - otherwise." - ::= { egpNeighEntry 15 } - - --- additional EGP objects - -egpAs OBJECT-TYPE - SYNTAX INTEGER - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The autonomous system number of this EGP entity." - ::= { egp 6 } - --- the Transmission group - --- Based on the transmission media underlying each interface --- on a system, the corresponding portion of the Transmission --- group is mandatory for that system. - --- When Internet-standard definitions for managing --- transmission media are defined, the transmission group is --- used to provide a prefix for the names of those objects. - --- Typically, such definitions reside in the experimental --- portion of the MIB until they are "proven", then as a --- part of the Internet standardization process, the --- definitions are accordingly elevated and a new object --- identifier, under the transmission group is defined. By --- convention, the name assigned is: --- --- type OBJECT IDENTIFIER ::= { transmission number } --- --- where "type" is the symbolic value used for the media in --- the ifType column of the ifTable object, and "number" is --- the actual integer value corresponding to the symbol. - - --- the SNMP group - --- Implementation of the SNMP group is mandatory for all --- systems which support an SNMP protocol entity. Some of --- the objects defined below will be zero-valued in those --- SNMP implementations that are optimized to support only --- those functions specific to either a management agent or --- a management station. In particular, it should be --- observed that the objects below refer to an SNMP entity, --- and there may be several SNMP entities residing on a --- managed node (e.g., if the node is hosting acting as --- a management station). - -snmpInPkts OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of Messages delivered to the - SNMP entity from the transport service." - ::= { snmp 1 } - -snmpOutPkts OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP Messages which were - passed from the SNMP protocol entity to the - transport service." - ::= { snmp 2 } - -snmpInBadVersions OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP Messages which were - delivered to the SNMP protocol entity and were for - an unsupported SNMP version." - ::= { snmp 3 } - -snmpInBadCommunityNames OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP Messages delivered to - the SNMP protocol entity which used a SNMP - community name not known to said entity." - ::= { snmp 4 } - -snmpInBadCommunityUses OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP Messages delivered to - the SNMP protocol entity which represented an SNMP - operation which was not allowed by the SNMP - community named in the Message." - ::= { snmp 5 } - -snmpInASNParseErrs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of ASN.1 or BER errors - encountered by the SNMP protocol entity when - decoding received SNMP Messages." - ::= { snmp 6 } - --- { snmp 7 } is not used - -snmpInTooBigs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP PDUs which were - delivered to the SNMP protocol entity and for - which the value of the error-status field is - `tooBig'." - ::= { snmp 8 } - -snmpInNoSuchNames OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP PDUs which were - delivered to the SNMP protocol entity and for - which the value of the error-status field is - `noSuchName'." - ::= { snmp 9 } - -snmpInBadValues OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP PDUs which were - delivered to the SNMP protocol entity and for - which the value of the error-status field is - `badValue'." - ::= { snmp 10 } - -snmpInReadOnlys OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number valid SNMP PDUs which were - delivered to the SNMP protocol entity and for - which the value of the error-status field is - `readOnly'. It should be noted that it is a - protocol error to generate an SNMP PDU which - contains the value `readOnly' in the error-status - field, as such this object is provided as a means - of detecting incorrect implementations of the - SNMP." - ::= { snmp 11 } - -snmpInGenErrs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP PDUs which were - delivered to the SNMP protocol entity and for - which the value of the error-status field is - `genErr'." - ::= { snmp 12 } - -snmpInTotalReqVars OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of MIB objects which have been - retrieved successfully by the SNMP protocol entity - as the result of receiving valid SNMP Get-Request - and Get-Next PDUs." - ::= { snmp 13 } - -snmpInTotalSetVars OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of MIB objects which have been - altered successfully by the SNMP protocol entity - as the result of receiving valid SNMP Set-Request - PDUs." - ::= { snmp 14 } - -snmpInGetRequests OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP Get-Request PDUs which - have been accepted and processed by the SNMP - protocol entity." - ::= { snmp 15 } - -snmpInGetNexts OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP Get-Next PDUs which have - been accepted and processed by the SNMP protocol - entity." - ::= { snmp 16 } - -snmpInSetRequests OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP Set-Request PDUs which - have been accepted and processed by the SNMP - protocol entity." - ::= { snmp 17 } - -snmpInGetResponses OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP Get-Response PDUs which - have been accepted and processed by the SNMP - protocol entity." - ::= { snmp 18 } - -snmpInTraps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP Trap PDUs which have - been accepted and processed by the SNMP protocol - entity." - ::= { snmp 19 } - -snmpOutTooBigs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP PDUs which were - generated by the SNMP protocol entity and for - which the value of the error-status field is - `tooBig.'" - ::= { snmp 20 } - -snmpOutNoSuchNames OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP PDUs which were - generated by the SNMP protocol entity and for - which the value of the error-status is - `noSuchName'." - ::= { snmp 21 } - -snmpOutBadValues OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP PDUs which were - generated by the SNMP protocol entity and for - which the value of the error-status field is - `badValue'." - ::= { snmp 22 } - --- { snmp 23 } is not used - -snmpOutGenErrs OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP PDUs which were - generated by the SNMP protocol entity and for - which the value of the error-status field is - `genErr'." - ::= { snmp 24 } - -snmpOutGetRequests OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP Get-Request PDUs which - have been generated by the SNMP protocol entity." - ::= { snmp 25 } - -snmpOutGetNexts OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP Get-Next PDUs which have - been generated by the SNMP protocol entity." - ::= { snmp 26 } - -snmpOutSetRequests OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP Set-Request PDUs which - have been generated by the SNMP protocol entity." - ::= { snmp 27 } - -snmpOutGetResponses OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP Get-Response PDUs which - have been generated by the SNMP protocol entity." - ::= { snmp 28 } - -snmpOutTraps OBJECT-TYPE - SYNTAX Counter - ACCESS read-only - STATUS mandatory - DESCRIPTION - "The total number of SNMP Trap PDUs which have - been generated by the SNMP protocol entity." - ::= { snmp 29 } - -snmpEnableAuthenTraps OBJECT-TYPE - SYNTAX INTEGER { enabled(1), disabled(2) } - ACCESS read-write - STATUS mandatory - DESCRIPTION - "Indicates whether the SNMP agent process is - permitted to generate authentication-failure - traps. The value of this object overrides any - configuration information; as such, it provides a - means whereby all authentication-failure traps may - be disabled. - - Note that it is strongly recommended that this - object be stored in non-volatile memory so that it - remains constant between re-initializations of the - network management system." - ::= { snmp 30 } - -END diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-CONF b/src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-CONF deleted file mode 100644 index 904dbbb2..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-CONF +++ /dev/null @@ -1,318 +0,0 @@ -SNMPv2-CONF DEFINITIONS ::= BEGIN - -IMPORTS ObjectName, NotificationName, ObjectSyntax - FROM SNMPv2-SMI; - --- definitions for conformance groups - -OBJECT-GROUP MACRO ::= -BEGIN - TYPE NOTATION ::= - ObjectsPart - "STATUS" Status - "DESCRIPTION" Text - ReferPart - - VALUE NOTATION ::= - value(VALUE OBJECT IDENTIFIER) - - ObjectsPart ::= - "OBJECTS" "{" Objects "}" - Objects ::= - Object - | Objects "," Object - Object ::= - value(ObjectName) - - Status ::= - "current" - | "deprecated" - | "obsolete" - - ReferPart ::= - "REFERENCE" Text - | empty - - -- a character string as defined in [2] - Text ::= value(IA5String) -END - --- more definitions for conformance groups - -NOTIFICATION-GROUP MACRO ::= -BEGIN - TYPE NOTATION ::= - NotificationsPart - "STATUS" Status - "DESCRIPTION" Text - ReferPart - - VALUE NOTATION ::= - value(VALUE OBJECT IDENTIFIER) - - NotificationsPart ::= - "NOTIFICATIONS" "{" Notifications "}" - Notifications ::= - Notification - | Notifications "," Notification - Notification ::= - value(NotificationName) - - Status ::= - "current" - | "deprecated" - | "obsolete" - - ReferPart ::= - "REFERENCE" Text - | empty - - -- a character string as defined in [2] - Text ::= value(IA5String) -END - --- definitions for compliance statements - -MODULE-COMPLIANCE MACRO ::= -BEGIN - TYPE NOTATION ::= - "STATUS" Status - "DESCRIPTION" Text - ReferPart - ModulePart - - VALUE NOTATION ::= - value(VALUE OBJECT IDENTIFIER) - - Status ::= - "current" - | "deprecated" - | "obsolete" - - ReferPart ::= - "REFERENCE" Text - | empty - - ModulePart ::= - Modules - Modules ::= - Module - | Modules Module - Module ::= - -- name of module -- - "MODULE" ModuleName - MandatoryPart - CompliancePart - - ModuleName ::= - -- identifier must start with uppercase letter - identifier ModuleIdentifier - -- must not be empty unless contained - -- in MIB Module - | empty - ModuleIdentifier ::= - value(OBJECT IDENTIFIER) - | empty - - MandatoryPart ::= - "MANDATORY-GROUPS" "{" Groups "}" - | empty - - Groups ::= - Group - | Groups "," Group - Group ::= - value(OBJECT IDENTIFIER) - - CompliancePart ::= - Compliances - | empty - - Compliances ::= - Compliance - | Compliances Compliance - Compliance ::= - ComplianceGroup - | Object - - ComplianceGroup ::= - "GROUP" value(OBJECT IDENTIFIER) - "DESCRIPTION" Text - - Object ::= - "OBJECT" value(ObjectName) - SyntaxPart - WriteSyntaxPart - AccessPart - "DESCRIPTION" Text - - -- must be a refinement for object's SYNTAX clause - SyntaxPart ::= "SYNTAX" Syntax - | empty - - -- must be a refinement for object's SYNTAX clause - WriteSyntaxPart ::= "WRITE-SYNTAX" Syntax - | empty - - Syntax ::= -- Must be one of the following: - -- a base type (or its refinement), - -- a textual convention (or its refinement), or - -- a BITS pseudo-type - type - | "BITS" "{" NamedBits "}" - - NamedBits ::= NamedBit - | NamedBits "," NamedBit - - NamedBit ::= identifier "(" number ")" -- number is nonnegative - - AccessPart ::= - "MIN-ACCESS" Access - | empty - Access ::= - "not-accessible" - | "accessible-for-notify" - | "read-only" - | "read-write" - | "read-create" - - -- a character string as defined in [2] - Text ::= value(IA5String) -END - --- definitions for capabilities statements - -AGENT-CAPABILITIES MACRO ::= -BEGIN - TYPE NOTATION ::= - "PRODUCT-RELEASE" Text - "STATUS" Status - "DESCRIPTION" Text - ReferPart - ModulePart - - VALUE NOTATION ::= - value(VALUE OBJECT IDENTIFIER) - - Status ::= - "current" - | "obsolete" - - ReferPart ::= - "REFERENCE" Text - | empty - - ModulePart ::= - Modules - | empty - Modules ::= - Module - | Modules Module - Module ::= - -- name of module -- - "SUPPORTS" ModuleName - "INCLUDES" "{" Groups "}" - VariationPart - - ModuleName ::= - -- identifier must start with uppercase letter - identifier ModuleIdentifier - ModuleIdentifier ::= - value(OBJECT IDENTIFIER) - | empty - - Groups ::= - Group - | Groups "," Group - Group ::= - value(OBJECT IDENTIFIER) - - VariationPart ::= - Variations - | empty - Variations ::= - Variation - | Variations Variation - - Variation ::= - ObjectVariation - | NotificationVariation - - NotificationVariation ::= - "VARIATION" value(NotificationName) - AccessPart - "DESCRIPTION" Text - - ObjectVariation ::= - "VARIATION" value(ObjectName) - SyntaxPart - WriteSyntaxPart - AccessPart - CreationPart - DefValPart - "DESCRIPTION" Text - - -- must be a refinement for object's SYNTAX clause - SyntaxPart ::= "SYNTAX" Syntax - | empty - - WriteSyntaxPart ::= "WRITE-SYNTAX" Syntax - | empty - - Syntax ::= -- Must be one of the following: - -- a base type (or its refinement), - -- a textual convention (or its refinement), or - -- a BITS pseudo-type - type - | "BITS" "{" NamedBits "}" - - NamedBits ::= NamedBit - | NamedBits "," NamedBit - - NamedBit ::= identifier "(" number ")" -- number is nonnegative - - AccessPart ::= - "ACCESS" Access - | empty - - Access ::= - "not-implemented" - -- only "not-implemented" for notifications - | "accessible-for-notify" - | "read-only" - | "read-write" - | "read-create" - -- following is for backward-compatibility only - | "write-only" - - CreationPart ::= - "CREATION-REQUIRES" "{" Cells "}" - | empty - Cells ::= - Cell - | Cells "," Cell - Cell ::= - value(ObjectName) - - DefValPart ::= "DEFVAL" "{" Defvalue "}" - | empty - - Defvalue ::= -- must be valid for the object's syntax - -- in this macro's SYNTAX clause, if present, - -- or if not, in object's OBJECT-TYPE macro - value(ObjectSyntax) - | "{" BitsValue "}" - - BitsValue ::= BitNames - | empty - - BitNames ::= BitName - | BitNames "," BitName - - BitName ::= identifier - - -- a character string as defined in [2] - Text ::= value(IA5String) -END - -END diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-MIB b/src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-MIB deleted file mode 100644 index 9494e42c..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-MIB +++ /dev/null @@ -1,903 +0,0 @@ -SNMPv2-MIB DEFINITIONS ::= BEGIN - -IMPORTS - MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE, - TimeTicks, Counter32, snmpModules, mib-2 - FROM SNMPv2-SMI - DisplayString, TestAndIncr, TimeStamp - - - - FROM SNMPv2-TC - MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP - FROM SNMPv2-CONF; - -snmpMIB MODULE-IDENTITY - LAST-UPDATED "200210160000Z" - ORGANIZATION "IETF SNMPv3 Working Group" - CONTACT-INFO - "WG-EMail: snmpv3@lists.tislabs.com - Subscribe: snmpv3-request@lists.tislabs.com - - Co-Chair: Russ Mundy - Network Associates Laboratories - postal: 15204 Omega Drive, Suite 300 - Rockville, MD 20850-4601 - USA - EMail: mundy@tislabs.com - phone: +1 301 947-7107 - - Co-Chair: David Harrington - Enterasys Networks - postal: 35 Industrial Way - P. O. Box 5005 - Rochester, NH 03866-5005 - USA - EMail: dbh@enterasys.com - phone: +1 603 337-2614 - - Editor: Randy Presuhn - BMC Software, Inc. - postal: 2141 North First Street - San Jose, CA 95131 - USA - EMail: randy_presuhn@bmc.com - phone: +1 408 546-1006" - DESCRIPTION - "The MIB module for SNMP entities. - - Copyright (C) The Internet Society (2002). This - version of this MIB module is part of RFC 3418; - see the RFC itself for full legal notices. - " - REVISION "200210160000Z" - DESCRIPTION - "This revision of this MIB module was published as - RFC 3418." - REVISION "199511090000Z" - DESCRIPTION - - - - "This revision of this MIB module was published as - RFC 1907." - REVISION "199304010000Z" - DESCRIPTION - "The initial revision of this MIB module was published - as RFC 1450." - ::= { snmpModules 1 } - -snmpMIBObjects OBJECT IDENTIFIER ::= { snmpMIB 1 } - --- ::= { snmpMIBObjects 1 } this OID is obsolete --- ::= { snmpMIBObjects 2 } this OID is obsolete --- ::= { snmpMIBObjects 3 } this OID is obsolete - --- the System group --- --- a collection of objects common to all managed systems. - -system OBJECT IDENTIFIER ::= { mib-2 1 } - -sysDescr OBJECT-TYPE - SYNTAX DisplayString (SIZE (0..255)) - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "A textual description of the entity. This value should - include the full name and version identification of - the system's hardware type, software operating-system, - and networking software." - ::= { system 1 } - -sysObjectID OBJECT-TYPE - SYNTAX OBJECT IDENTIFIER - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The vendor's authoritative identification of the - network management subsystem contained in the entity. - This value is allocated within the SMI enterprises - subtree (1.3.6.1.4.1) and provides an easy and - unambiguous means for determining `what kind of box' is - being managed. For example, if vendor `Flintstones, - Inc.' was assigned the subtree 1.3.6.1.4.1.424242, - it could assign the identifier 1.3.6.1.4.1.424242.1.1 - to its `Fred Router'." - ::= { system 2 } - -sysUpTime OBJECT-TYPE - - - - SYNTAX TimeTicks - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The time (in hundredths of a second) since the - network management portion of the system was last - re-initialized." - ::= { system 3 } - -sysContact OBJECT-TYPE - SYNTAX DisplayString (SIZE (0..255)) - MAX-ACCESS read-write - STATUS current - DESCRIPTION - "The textual identification of the contact person for - this managed node, together with information on how - to contact this person. If no contact information is - known, the value is the zero-length string." - ::= { system 4 } - -sysName OBJECT-TYPE - SYNTAX DisplayString (SIZE (0..255)) - MAX-ACCESS read-write - STATUS current - DESCRIPTION - "An administratively-assigned name for this managed - node. By convention, this is the node's fully-qualified - domain name. If the name is unknown, the value is - the zero-length string." - ::= { system 5 } - -sysLocation OBJECT-TYPE - SYNTAX DisplayString (SIZE (0..255)) - MAX-ACCESS read-write - STATUS current - DESCRIPTION - "The physical location of this node (e.g., 'telephone - closet, 3rd floor'). If the location is unknown, the - value is the zero-length string." - ::= { system 6 } - -sysServices OBJECT-TYPE - SYNTAX INTEGER (0..127) - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "A value which indicates the set of services that this - entity may potentially offer. The value is a sum. - - - - This sum initially takes the value zero. Then, for - each layer, L, in the range 1 through 7, that this node - performs transactions for, 2 raised to (L - 1) is added - to the sum. For example, a node which performs only - routing functions would have a value of 4 (2^(3-1)). - In contrast, a node which is a host offering application - services would have a value of 72 (2^(4-1) + 2^(7-1)). - Note that in the context of the Internet suite of - protocols, values should be calculated accordingly: - - layer functionality - 1 physical (e.g., repeaters) - 2 datalink/subnetwork (e.g., bridges) - 3 internet (e.g., supports the IP) - 4 end-to-end (e.g., supports the TCP) - 7 applications (e.g., supports the SMTP) - - For systems including OSI protocols, layers 5 and 6 - may also be counted." - ::= { system 7 } - --- object resource information --- --- a collection of objects which describe the SNMP entity's --- (statically and dynamically configurable) support of --- various MIB modules. - -sysORLastChange OBJECT-TYPE - SYNTAX TimeStamp - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The value of sysUpTime at the time of the most recent - change in state or value of any instance of sysORID." - ::= { system 8 } - -sysORTable OBJECT-TYPE - SYNTAX SEQUENCE OF SysOREntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The (conceptual) table listing the capabilities of - the local SNMP application acting as a command - responder with respect to various MIB modules. - SNMP entities having dynamically-configurable support - of MIB modules will have a dynamically-varying number - of conceptual rows." - ::= { system 9 } - - - -sysOREntry OBJECT-TYPE - SYNTAX SysOREntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "An entry (conceptual row) in the sysORTable." - INDEX { sysORIndex } - ::= { sysORTable 1 } - -SysOREntry ::= SEQUENCE { - sysORIndex INTEGER, - sysORID OBJECT IDENTIFIER, - sysORDescr DisplayString, - sysORUpTime TimeStamp -} - -sysORIndex OBJECT-TYPE - SYNTAX INTEGER (1..2147483647) - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The auxiliary variable used for identifying instances - of the columnar objects in the sysORTable." - ::= { sysOREntry 1 } - -sysORID OBJECT-TYPE - SYNTAX OBJECT IDENTIFIER - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "An authoritative identification of a capabilities - statement with respect to various MIB modules supported - by the local SNMP application acting as a command - responder." - ::= { sysOREntry 2 } - -sysORDescr OBJECT-TYPE - SYNTAX DisplayString - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "A textual description of the capabilities identified - by the corresponding instance of sysORID." - ::= { sysOREntry 3 } - -sysORUpTime OBJECT-TYPE - SYNTAX TimeStamp - MAX-ACCESS read-only - - - - STATUS current - DESCRIPTION - "The value of sysUpTime at the time this conceptual - row was last instantiated." - ::= { sysOREntry 4 } - - --- the SNMP group --- --- a collection of objects providing basic instrumentation and --- control of an SNMP entity. - -snmp OBJECT IDENTIFIER ::= { mib-2 11 } - -snmpInPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of messages delivered to the SNMP - entity from the transport service." - ::= { snmp 1 } - -snmpInBadVersions OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of SNMP messages which were delivered - to the SNMP entity and were for an unsupported SNMP - version." - ::= { snmp 3 } - -snmpInBadCommunityNames OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of community-based SNMP messages (for - example, SNMPv1) delivered to the SNMP entity which - used an SNMP community name not known to said entity. - Also, implementations which authenticate community-based - SNMP messages using check(s) in addition to matching - the community name (for example, by also checking - whether the message originated from a transport address - allowed to use a specified community name) MAY include - in this value the number of messages which failed the - additional check(s). It is strongly RECOMMENDED that - - - - the documentation for any security model which is used - to authenticate community-based SNMP messages specify - the precise conditions that contribute to this value." - ::= { snmp 4 } - -snmpInBadCommunityUses OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of community-based SNMP messages (for - example, SNMPv1) delivered to the SNMP entity which - represented an SNMP operation that was not allowed for - the SNMP community named in the message. The precise - conditions under which this counter is incremented - (if at all) depend on how the SNMP entity implements - its access control mechanism and how its applications - interact with that access control mechanism. It is - strongly RECOMMENDED that the documentation for any - access control mechanism which is used to control access - to and visibility of MIB instrumentation specify the - precise conditions that contribute to this value." - ::= { snmp 5 } - -snmpInASNParseErrs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of ASN.1 or BER errors encountered by - the SNMP entity when decoding received SNMP messages." - ::= { snmp 6 } - -snmpEnableAuthenTraps OBJECT-TYPE - SYNTAX INTEGER { enabled(1), disabled(2) } - MAX-ACCESS read-write - STATUS current - DESCRIPTION - "Indicates whether the SNMP entity is permitted to - generate authenticationFailure traps. The value of this - object overrides any configuration information; as such, - it provides a means whereby all authenticationFailure - traps may be disabled. - - Note that it is strongly recommended that this object - be stored in non-volatile memory so that it remains - constant across re-initializations of the network - management system." - - - - ::= { snmp 30 } - -snmpSilentDrops OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of Confirmed Class PDUs (such as - GetRequest-PDUs, GetNextRequest-PDUs, - GetBulkRequest-PDUs, SetRequest-PDUs, and - InformRequest-PDUs) delivered to the SNMP entity which - were silently dropped because the size of a reply - containing an alternate Response Class PDU (such as a - Response-PDU) with an empty variable-bindings field - was greater than either a local constraint or the - maximum message size associated with the originator of - the request." - ::= { snmp 31 } - -snmpProxyDrops OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of Confirmed Class PDUs - (such as GetRequest-PDUs, GetNextRequest-PDUs, - GetBulkRequest-PDUs, SetRequest-PDUs, and - InformRequest-PDUs) delivered to the SNMP entity which - were silently dropped because the transmission of - the (possibly translated) message to a proxy target - failed in a manner (other than a time-out) such that - no Response Class PDU (such as a Response-PDU) could - be returned." - ::= { snmp 32 } - --- information for notifications --- --- a collection of objects which allow the SNMP entity, when --- supporting a notification originator application, --- to be configured to generate SNMPv2-Trap-PDUs. - -snmpTrap OBJECT IDENTIFIER ::= { snmpMIBObjects 4 } - -snmpTrapOID OBJECT-TYPE - SYNTAX OBJECT IDENTIFIER - MAX-ACCESS accessible-for-notify - STATUS current - DESCRIPTION - - - - "The authoritative identification of the notification - currently being sent. This variable occurs as - the second varbind in every SNMPv2-Trap-PDU and - InformRequest-PDU." - ::= { snmpTrap 1 } - --- ::= { snmpTrap 2 } this OID is obsolete - -snmpTrapEnterprise OBJECT-TYPE - SYNTAX OBJECT IDENTIFIER - MAX-ACCESS accessible-for-notify - STATUS current - DESCRIPTION - "The authoritative identification of the enterprise - associated with the trap currently being sent. When an - SNMP proxy agent is mapping an RFC1157 Trap-PDU - into a SNMPv2-Trap-PDU, this variable occurs as the - last varbind." - ::= { snmpTrap 3 } - --- ::= { snmpTrap 4 } this OID is obsolete - - --- well-known traps - -snmpTraps OBJECT IDENTIFIER ::= { snmpMIBObjects 5 } - -coldStart NOTIFICATION-TYPE - STATUS current - DESCRIPTION - "A coldStart trap signifies that the SNMP entity, - supporting a notification originator application, is - reinitializing itself and that its configuration may - have been altered." - ::= { snmpTraps 1 } - -warmStart NOTIFICATION-TYPE - STATUS current - DESCRIPTION - "A warmStart trap signifies that the SNMP entity, - supporting a notification originator application, - is reinitializing itself such that its configuration - is unaltered." - ::= { snmpTraps 2 } - --- Note the linkDown NOTIFICATION-TYPE ::= { snmpTraps 3 } --- and the linkUp NOTIFICATION-TYPE ::= { snmpTraps 4 } --- are defined in RFC 2863 [RFC2863] - - - -authenticationFailure NOTIFICATION-TYPE - STATUS current - DESCRIPTION - "An authenticationFailure trap signifies that the SNMP - entity has received a protocol message that is not - properly authenticated. While all implementations - of SNMP entities MAY be capable of generating this - trap, the snmpEnableAuthenTraps object indicates - whether this trap will be generated." - ::= { snmpTraps 5 } - --- Note the egpNeighborLoss notification is defined --- as { snmpTraps 6 } in RFC 1213 - --- the set group --- --- a collection of objects which allow several cooperating --- command generator applications to coordinate their use of the --- set operation. - -snmpSet OBJECT IDENTIFIER ::= { snmpMIBObjects 6 } - -snmpSetSerialNo OBJECT-TYPE - SYNTAX TestAndIncr - MAX-ACCESS read-write - STATUS current - DESCRIPTION - "An advisory lock used to allow several cooperating - command generator applications to coordinate their - use of the SNMP set operation. - - This object is used for coarse-grain coordination. - To achieve fine-grain coordination, one or more similar - objects might be defined within each MIB group, as - appropriate." - ::= { snmpSet 1 } - --- conformance information - -snmpMIBConformance - OBJECT IDENTIFIER ::= { snmpMIB 2 } - -snmpMIBCompliances - OBJECT IDENTIFIER ::= { snmpMIBConformance 1 } -snmpMIBGroups OBJECT IDENTIFIER ::= { snmpMIBConformance 2 } - --- compliance statements - - - - --- ::= { snmpMIBCompliances 1 } this OID is obsolete -snmpBasicCompliance MODULE-COMPLIANCE - STATUS deprecated - DESCRIPTION - "The compliance statement for SNMPv2 entities which - implement the SNMPv2 MIB. - - This compliance statement is replaced by - snmpBasicComplianceRev2." - MODULE -- this module - MANDATORY-GROUPS { snmpGroup, snmpSetGroup, systemGroup, - snmpBasicNotificationsGroup } - - GROUP snmpCommunityGroup - DESCRIPTION - "This group is mandatory for SNMPv2 entities which - support community-based authentication." - - ::= { snmpMIBCompliances 2 } - -snmpBasicComplianceRev2 MODULE-COMPLIANCE - STATUS current - DESCRIPTION - "The compliance statement for SNMP entities which - implement this MIB module." - MODULE -- this module - MANDATORY-GROUPS { snmpGroup, snmpSetGroup, systemGroup, - snmpBasicNotificationsGroup } - - GROUP snmpCommunityGroup - DESCRIPTION - "This group is mandatory for SNMP entities which - support community-based authentication." - - GROUP snmpWarmStartNotificationGroup - DESCRIPTION - "This group is mandatory for an SNMP entity which - supports command responder applications, and is - able to reinitialize itself such that its - configuration is unaltered." - - ::= { snmpMIBCompliances 3 } - --- units of conformance - --- ::= { snmpMIBGroups 1 } this OID is obsolete --- ::= { snmpMIBGroups 2 } this OID is obsolete --- ::= { snmpMIBGroups 3 } this OID is obsolete - - - --- ::= { snmpMIBGroups 4 } this OID is obsolete - -snmpGroup OBJECT-GROUP - OBJECTS { snmpInPkts, - snmpInBadVersions, - snmpInASNParseErrs, - snmpSilentDrops, - snmpProxyDrops, - snmpEnableAuthenTraps } - STATUS current - DESCRIPTION - "A collection of objects providing basic instrumentation - and control of an SNMP entity." - ::= { snmpMIBGroups 8 } - -snmpCommunityGroup OBJECT-GROUP - OBJECTS { snmpInBadCommunityNames, - snmpInBadCommunityUses } - STATUS current - DESCRIPTION - "A collection of objects providing basic instrumentation - of a SNMP entity which supports community-based - authentication." - ::= { snmpMIBGroups 9 } - -snmpSetGroup OBJECT-GROUP - OBJECTS { snmpSetSerialNo } - STATUS current - DESCRIPTION - "A collection of objects which allow several cooperating - command generator applications to coordinate their - use of the set operation." - ::= { snmpMIBGroups 5 } - -systemGroup OBJECT-GROUP - OBJECTS { sysDescr, sysObjectID, sysUpTime, - sysContact, sysName, sysLocation, - sysServices, - sysORLastChange, sysORID, - sysORUpTime, sysORDescr } - STATUS current - DESCRIPTION - "The system group defines objects which are common to all - managed systems." - ::= { snmpMIBGroups 6 } - -snmpBasicNotificationsGroup NOTIFICATION-GROUP - NOTIFICATIONS { coldStart, authenticationFailure } - - - - STATUS current - DESCRIPTION - "The basic notifications implemented by an SNMP entity - supporting command responder applications." - ::= { snmpMIBGroups 7 } - -snmpWarmStartNotificationGroup NOTIFICATION-GROUP - NOTIFICATIONS { warmStart } - STATUS current - DESCRIPTION - "An additional notification for an SNMP entity supporting - command responder applications, if it is able to reinitialize - itself such that its configuration is unaltered." - ::= { snmpMIBGroups 11 } - -snmpNotificationGroup OBJECT-GROUP - OBJECTS { snmpTrapOID, snmpTrapEnterprise } - STATUS current - DESCRIPTION - "These objects are required for entities - which support notification originator applications." - ::= { snmpMIBGroups 12 } - --- definitions in RFC 1213 made obsolete by the inclusion of a --- subset of the snmp group in this MIB - -snmpOutPkts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number of SNMP Messages which were - passed from the SNMP protocol entity to the - transport service." - ::= { snmp 2 } - --- { snmp 7 } is not used - -snmpInTooBigs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number of SNMP PDUs which were - delivered to the SNMP protocol entity and for - which the value of the error-status field was - `tooBig'." - ::= { snmp 8 } - - - -snmpInNoSuchNames OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number of SNMP PDUs which were - delivered to the SNMP protocol entity and for - which the value of the error-status field was - `noSuchName'." - ::= { snmp 9 } - -snmpInBadValues OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number of SNMP PDUs which were - delivered to the SNMP protocol entity and for - which the value of the error-status field was - `badValue'." - ::= { snmp 10 } - -snmpInReadOnlys OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number valid SNMP PDUs which were delivered - to the SNMP protocol entity and for which the value - of the error-status field was `readOnly'. It should - be noted that it is a protocol error to generate an - SNMP PDU which contains the value `readOnly' in the - error-status field, as such this object is provided - as a means of detecting incorrect implementations of - the SNMP." - ::= { snmp 11 } - -snmpInGenErrs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number of SNMP PDUs which were delivered - to the SNMP protocol entity and for which the value - of the error-status field was `genErr'." - ::= { snmp 12 } - -snmpInTotalReqVars OBJECT-TYPE - - - - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number of MIB objects which have been - retrieved successfully by the SNMP protocol entity - as the result of receiving valid SNMP Get-Request - and Get-Next PDUs." - ::= { snmp 13 } - -snmpInTotalSetVars OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number of MIB objects which have been - altered successfully by the SNMP protocol entity as - the result of receiving valid SNMP Set-Request PDUs." - ::= { snmp 14 } - -snmpInGetRequests OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number of SNMP Get-Request PDUs which - have been accepted and processed by the SNMP - protocol entity." - ::= { snmp 15 } - -snmpInGetNexts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number of SNMP Get-Next PDUs which have been - accepted and processed by the SNMP protocol entity." - ::= { snmp 16 } - -snmpInSetRequests OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number of SNMP Set-Request PDUs which - have been accepted and processed by the SNMP protocol - entity." - ::= { snmp 17 } - - - -snmpInGetResponses OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number of SNMP Get-Response PDUs which - have been accepted and processed by the SNMP protocol - entity." - ::= { snmp 18 } - -snmpInTraps OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number of SNMP Trap PDUs which have been - accepted and processed by the SNMP protocol entity." - ::= { snmp 19 } - -snmpOutTooBigs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number of SNMP PDUs which were generated - by the SNMP protocol entity and for which the value - of the error-status field was `tooBig.'" - ::= { snmp 20 } - -snmpOutNoSuchNames OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number of SNMP PDUs which were generated - by the SNMP protocol entity and for which the value - of the error-status was `noSuchName'." - ::= { snmp 21 } - -snmpOutBadValues OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number of SNMP PDUs which were generated - by the SNMP protocol entity and for which the value - of the error-status field was `badValue'." - ::= { snmp 22 } - - - --- { snmp 23 } is not used - -snmpOutGenErrs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number of SNMP PDUs which were generated - by the SNMP protocol entity and for which the value - of the error-status field was `genErr'." - ::= { snmp 24 } - -snmpOutGetRequests OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number of SNMP Get-Request PDUs which - have been generated by the SNMP protocol entity." - ::= { snmp 25 } - -snmpOutGetNexts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number of SNMP Get-Next PDUs which have - been generated by the SNMP protocol entity." - ::= { snmp 26 } - -snmpOutSetRequests OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number of SNMP Set-Request PDUs which - have been generated by the SNMP protocol entity." - ::= { snmp 27 } - -snmpOutGetResponses OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number of SNMP Get-Response PDUs which - have been generated by the SNMP protocol entity." - ::= { snmp 28 } - - - - -snmpOutTraps OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS obsolete - DESCRIPTION - "The total number of SNMP Trap PDUs which have - been generated by the SNMP protocol entity." - ::= { snmp 29 } - -snmpObsoleteGroup OBJECT-GROUP - OBJECTS { snmpOutPkts, snmpInTooBigs, snmpInNoSuchNames, - snmpInBadValues, snmpInReadOnlys, snmpInGenErrs, - snmpInTotalReqVars, snmpInTotalSetVars, - snmpInGetRequests, snmpInGetNexts, snmpInSetRequests, - snmpInGetResponses, snmpInTraps, snmpOutTooBigs, - snmpOutNoSuchNames, snmpOutBadValues, - snmpOutGenErrs, snmpOutGetRequests, snmpOutGetNexts, - snmpOutSetRequests, snmpOutGetResponses, snmpOutTraps - } - STATUS obsolete - DESCRIPTION - "A collection of objects from RFC 1213 made obsolete - by this MIB module." - ::= { snmpMIBGroups 10 } - -END diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-SMI b/src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-SMI deleted file mode 100644 index 2132646c..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-SMI +++ /dev/null @@ -1,352 +0,0 @@ -SNMPv2-SMI DEFINITIONS ::= BEGIN - - --- the path to the root - -org OBJECT IDENTIFIER ::= { iso 3 } -- "iso" = 1 -dod OBJECT IDENTIFIER ::= { org 6 } -internet OBJECT IDENTIFIER ::= { dod 1 } - -directory OBJECT IDENTIFIER ::= { internet 1 } - -mgmt OBJECT IDENTIFIER ::= { internet 2 } -mib-2 OBJECT IDENTIFIER ::= { mgmt 1 } -transmission OBJECT IDENTIFIER ::= { mib-2 10 } - -experimental OBJECT IDENTIFIER ::= { internet 3 } - -private OBJECT IDENTIFIER ::= { internet 4 } -enterprises OBJECT IDENTIFIER ::= { private 1 } - -security OBJECT IDENTIFIER ::= { internet 5 } - -snmpV2 OBJECT IDENTIFIER ::= { internet 6 } - --- transport domains -snmpDomains OBJECT IDENTIFIER ::= { snmpV2 1 } - --- transport proxies -snmpProxys OBJECT IDENTIFIER ::= { snmpV2 2 } - --- module identities -snmpModules OBJECT IDENTIFIER ::= { snmpV2 3 } - --- Extended UTCTime, to allow dates with four-digit years --- (Note that this definition of ExtUTCTime is not to be IMPORTed --- by MIB modules.) -ExtUTCTime ::= OCTET STRING(SIZE(11 | 13)) - -- format is YYMMDDHHMMZ or YYYYMMDDHHMMZ - -- where: YY - last two digits of year (only years - -- between 1900-1999) - -- YYYY - last four digits of the year (any year) - -- MM - month (01 through 12) - -- DD - day of month (01 through 31) - -- HH - hours (00 through 23) - -- MM - minutes (00 through 59) - -- Z - denotes GMT (the ASCII character Z) - -- - -- For example, "9502192015Z" and "199502192015Z" represent - -- 8:15pm GMT on 19 February 1995. Years after 1999 must use - -- the four digit year format. Years 1900-1999 may use the - -- two or four digit format. - --- definitions for information modules - -MODULE-IDENTITY MACRO ::= -BEGIN - TYPE NOTATION ::= - "LAST-UPDATED" value(Update ExtUTCTime) - "ORGANIZATION" Text - "CONTACT-INFO" Text - "DESCRIPTION" Text - RevisionPart - - VALUE NOTATION ::= - value(VALUE OBJECT IDENTIFIER) - - RevisionPart ::= - Revisions - | empty - Revisions ::= - Revision - | Revisions Revision - Revision ::= - "REVISION" value(Update ExtUTCTime) - "DESCRIPTION" Text - - -- a character string as defined in section 3.1.1 - Text ::= value(IA5String) -END - - -OBJECT-IDENTITY MACRO ::= -BEGIN - TYPE NOTATION ::= - "STATUS" Status - "DESCRIPTION" Text - ReferPart - - VALUE NOTATION ::= - value(VALUE OBJECT IDENTIFIER) - - Status ::= - "current" - | "deprecated" - | "obsolete" - - ReferPart ::= - "REFERENCE" Text - | empty - - -- a character string as defined in section 3.1.1 - Text ::= value(IA5String) -END - - --- names of objects --- (Note that these definitions of ObjectName and NotificationName --- are not to be IMPORTed by MIB modules.) - -ObjectName ::= - OBJECT IDENTIFIER - -NotificationName ::= - OBJECT IDENTIFIER - --- syntax of objects - --- the "base types" defined here are: --- 3 built-in ASN.1 types: INTEGER, OCTET STRING, OBJECT IDENTIFIER --- 8 application-defined types: Integer32, IpAddress, Counter32, --- Gauge32, Unsigned32, TimeTicks, Opaque, and Counter64 - -ObjectSyntax ::= - CHOICE { - simple - SimpleSyntax, - - -- note that SEQUENCEs for conceptual tables and - -- rows are not mentioned here... - - application-wide - ApplicationSyntax - } - --- built-in ASN.1 types - -SimpleSyntax ::= - CHOICE { - -- INTEGERs with a more restrictive range - -- may also be used - integer-value -- includes Integer32 - INTEGER (-2147483648..2147483647), - - -- OCTET STRINGs with a more restrictive size - -- may also be used - string-value - OCTET STRING (SIZE (0..65535)), - - objectID-value - OBJECT IDENTIFIER - } - --- indistinguishable from INTEGER, but never needs more than --- 32-bits for a two's complement representation -Integer32 ::= - INTEGER (-2147483648..2147483647) - - --- application-wide types - -ApplicationSyntax ::= - CHOICE { - ipAddress-value - IpAddress, - - counter-value - Counter32, - - timeticks-value - TimeTicks, - - arbitrary-value - Opaque, - - big-counter-value - Counter64, - - unsigned-integer-value -- includes Gauge32 - Unsigned32 - } - --- in network-byte order --- (this is a tagged type for historical reasons) -IpAddress ::= - [APPLICATION 0] - IMPLICIT OCTET STRING (SIZE (4)) - --- this wraps -Counter32 ::= - [APPLICATION 1] - IMPLICIT INTEGER (0..4294967295) - --- this doesn't wrap -Gauge32 ::= - [APPLICATION 2] - IMPLICIT INTEGER (0..4294967295) - --- an unsigned 32-bit quantity --- indistinguishable from Gauge32 -Unsigned32 ::= - [APPLICATION 2] - IMPLICIT INTEGER (0..4294967295) - --- hundredths of seconds since an epoch -TimeTicks ::= - [APPLICATION 3] - IMPLICIT INTEGER (0..4294967295) - --- for backward-compatibility only -Opaque ::= - [APPLICATION 4] - IMPLICIT OCTET STRING - --- for counters that wrap in less than one hour with only 32 bits -Counter64 ::= - [APPLICATION 6] - IMPLICIT INTEGER (0..18446744073709551615) - - --- definition for objects - -OBJECT-TYPE MACRO ::= -BEGIN - TYPE NOTATION ::= - "SYNTAX" Syntax - UnitsPart - "MAX-ACCESS" Access - "STATUS" Status - "DESCRIPTION" Text - ReferPart - IndexPart - DefValPart - - VALUE NOTATION ::= - value(VALUE ObjectName) - - Syntax ::= -- Must be one of the following: - -- a base type (or its refinement), - -- a textual convention (or its refinement), or - -- a BITS pseudo-type - type - | "BITS" "{" NamedBits "}" - - NamedBits ::= NamedBit - | NamedBits "," NamedBit - - NamedBit ::= identifier "(" number ")" -- number is nonnegative - - UnitsPart ::= - "UNITS" Text - | empty - - Access ::= - "not-accessible" - | "accessible-for-notify" - | "read-only" - | "read-write" - | "read-create" - - Status ::= - "current" - | "deprecated" - | "obsolete" - - ReferPart ::= - "REFERENCE" Text - | empty - - IndexPart ::= - "INDEX" "{" IndexTypes "}" - | "AUGMENTS" "{" Entry "}" - | empty - IndexTypes ::= - IndexType - | IndexTypes "," IndexType - IndexType ::= - "IMPLIED" Index - | Index - Index ::= - -- use the SYNTAX value of the - -- correspondent OBJECT-TYPE invocation - value(ObjectName) - Entry ::= - -- use the INDEX value of the - -- correspondent OBJECT-TYPE invocation - value(ObjectName) - - DefValPart ::= "DEFVAL" "{" Defvalue "}" - | empty - - Defvalue ::= -- must be valid for the type specified in - -- SYNTAX clause of same OBJECT-TYPE macro - value(ObjectSyntax) - | "{" BitsValue "}" - - BitsValue ::= BitNames - | empty - - BitNames ::= BitName - | BitNames "," BitName - - BitName ::= identifier - - -- a character string as defined in section 3.1.1 - Text ::= value(IA5String) -END - - --- definitions for notifications - -NOTIFICATION-TYPE MACRO ::= -BEGIN - TYPE NOTATION ::= - ObjectsPart - "STATUS" Status - "DESCRIPTION" Text - ReferPart - - VALUE NOTATION ::= - value(VALUE NotificationName) - - ObjectsPart ::= - "OBJECTS" "{" Objects "}" - | empty - Objects ::= - Object - | Objects "," Object - Object ::= - value(ObjectName) - - Status ::= - "current" - | "deprecated" - | "obsolete" - - ReferPart ::= - "REFERENCE" Text - | empty - - -- a character string as defined in section 3.1.1 - Text ::= value(IA5String) -END - --- definitions of administrative identifiers - -zeroDotZero OBJECT-IDENTITY - STATUS current - DESCRIPTION - "A value used for null identifiers." - ::= { 0 0 } - -END diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-TC b/src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-TC deleted file mode 100644 index a68f9690..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-TC +++ /dev/null @@ -1,786 +0,0 @@ -SNMPv2-TC DEFINITIONS ::= BEGIN - -IMPORTS - TimeTicks FROM SNMPv2-SMI; - - --- definition of textual conventions - -TEXTUAL-CONVENTION MACRO ::= -BEGIN - TYPE NOTATION ::= - DisplayPart - "STATUS" Status - "DESCRIPTION" Text - ReferPart - "SYNTAX" Syntax - - VALUE NOTATION ::= - value(VALUE Syntax) -- adapted ASN.1 - - DisplayPart ::= - "DISPLAY-HINT" Text - | empty - - Status ::= - "current" - | "deprecated" - | "obsolete" - - ReferPart ::= - "REFERENCE" Text - | empty - - -- a character string as defined in [2] - Text ::= value(IA5String) - - Syntax ::= -- Must be one of the following: - -- a base type (or its refinement), or - -- a BITS pseudo-type - type - | "BITS" "{" NamedBits "}" - - NamedBits ::= NamedBit - | NamedBits "," NamedBit - - NamedBit ::= identifier "(" number ")" -- number is nonnegative - -END - - - - -DisplayString ::= TEXTUAL-CONVENTION - DISPLAY-HINT "255a" - STATUS current - DESCRIPTION - "Represents textual information taken from the NVT ASCII - character set, as defined in pages 4, 10-11 of RFC 854. - - To summarize RFC 854, the NVT ASCII repertoire specifies: - - - the use of character codes 0-127 (decimal) - - - the graphics characters (32-126) are interpreted as - US ASCII - - - NUL, LF, CR, BEL, BS, HT, VT and FF have the special - meanings specified in RFC 854 - - - the other 25 codes have no standard interpretation - - - the sequence 'CR LF' means newline - - - the sequence 'CR NUL' means carriage-return - - - an 'LF' not preceded by a 'CR' means moving to the - same column on the next line. - - - the sequence 'CR x' for any x other than LF or NUL is - illegal. (Note that this also means that a string may - end with either 'CR LF' or 'CR NUL', but not with CR.) - - Any object defined using this syntax may not exceed 255 - characters in length." - SYNTAX OCTET STRING (SIZE (0..255)) - -PhysAddress ::= TEXTUAL-CONVENTION - DISPLAY-HINT "1x:" - STATUS current - DESCRIPTION - "Represents media- or physical-level addresses." - SYNTAX OCTET STRING - - -MacAddress ::= TEXTUAL-CONVENTION - DISPLAY-HINT "1x:" - STATUS current - DESCRIPTION - "Represents an 802 MAC address represented in the - `canonical' order defined by IEEE 802.1a, i.e., as if it - were transmitted least significant bit first, even though - 802.5 (in contrast to other 802.x protocols) requires MAC - addresses to be transmitted most significant bit first." - SYNTAX OCTET STRING (SIZE (6)) - -TruthValue ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "Represents a boolean value." - SYNTAX INTEGER { true(1), false(2) } - -TestAndIncr ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "Represents integer-valued information used for atomic - operations. When the management protocol is used to specify - that an object instance having this syntax is to be - modified, the new value supplied via the management protocol - must precisely match the value presently held by the - instance. If not, the management protocol set operation - fails with an error of `inconsistentValue'. Otherwise, if - the current value is the maximum value of 2^31-1 (2147483647 - decimal), then the value held by the instance is wrapped to - zero; otherwise, the value held by the instance is - incremented by one. (Note that regardless of whether the - management protocol set operation succeeds, the variable- - binding in the request and response PDUs are identical.) - - The value of the ACCESS clause for objects having this - syntax is either `read-write' or `read-create'. When an - instance of a columnar object having this syntax is created, - any value may be supplied via the management protocol. - - When the network management portion of the system is re- - initialized, the value of every object instance having this - syntax must either be incremented from its value prior to - the re-initialization, or (if the value prior to the re- - initialization is unknown) be set to a pseudo-randomly - generated value." - SYNTAX INTEGER (0..2147483647) - -AutonomousType ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "Represents an independently extensible type identification - value. It may, for example, indicate a particular sub-tree - with further MIB definitions, or define a particular type of - protocol or hardware." - SYNTAX OBJECT IDENTIFIER - - -InstancePointer ::= TEXTUAL-CONVENTION - STATUS obsolete - DESCRIPTION - "A pointer to either a specific instance of a MIB object or - a conceptual row of a MIB table in the managed device. In - the latter case, by convention, it is the name of the - particular instance of the first accessible columnar object - in the conceptual row. - - The two uses of this textual convention are replaced by - VariablePointer and RowPointer, respectively." - SYNTAX OBJECT IDENTIFIER - - -VariablePointer ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "A pointer to a specific object instance. For example, - sysContact.0 or ifInOctets.3." - SYNTAX OBJECT IDENTIFIER - - -RowPointer ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "Represents a pointer to a conceptual row. The value is the - name of the instance of the first accessible columnar object - in the conceptual row. - - For example, ifIndex.3 would point to the 3rd row in the - ifTable (note that if ifIndex were not-accessible, then - ifDescr.3 would be used instead)." - SYNTAX OBJECT IDENTIFIER - -RowStatus ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "The RowStatus textual convention is used to manage the - creation and deletion of conceptual rows, and is used as the - value of the SYNTAX clause for the status column of a - conceptual row (as described in Section 7.7.1 of [2].) - The status column has six defined values: - - - `active', which indicates that the conceptual row is - available for use by the managed device; - - - `notInService', which indicates that the conceptual - row exists in the agent, but is unavailable for use by - the managed device (see NOTE below); 'notInService' has - no implication regarding the internal consistency of - the row, availability of resources, or consistency with - the current state of the managed device; - - - `notReady', which indicates that the conceptual row - exists in the agent, but is missing information - necessary in order to be available for use by the - managed device (i.e., one or more required columns in - the conceptual row have not been instanciated); - - - `createAndGo', which is supplied by a management - station wishing to create a new instance of a - conceptual row and to have its status automatically set - to active, making it available for use by the managed - device; - - - `createAndWait', which is supplied by a management - station wishing to create a new instance of a - conceptual row (but not make it available for use by - the managed device); and, - - - `destroy', which is supplied by a management station - wishing to delete all of the instances associated with - an existing conceptual row. - - Whereas five of the six values (all except `notReady') may - be specified in a management protocol set operation, only - three values will be returned in response to a management - protocol retrieval operation: `notReady', `notInService' or - `active'. That is, when queried, an existing conceptual row - has only three states: it is either available for use by - the managed device (the status column has value `active'); - it is not available for use by the managed device, though - the agent has sufficient information to attempt to make it - so (the status column has value `notInService'); or, it is - not available for use by the managed device, and an attempt - to make it so would fail because the agent has insufficient - information (the state column has value `notReady'). - - NOTE WELL - - This textual convention may be used for a MIB table, - irrespective of whether the values of that table's - conceptual rows are able to be modified while it is - active, or whether its conceptual rows must be taken - out of service in order to be modified. That is, it is - the responsibility of the DESCRIPTION clause of the - status column to specify whether the status column must - not be `active' in order for the value of some other - column of the same conceptual row to be modified. If - such a specification is made, affected columns may be - changed by an SNMP set PDU if the RowStatus would not - be equal to `active' either immediately before or after - processing the PDU. In other words, if the PDU also - contained a varbind that would change the RowStatus - value, the column in question may be changed if the - RowStatus was not equal to `active' as the PDU was - received, or if the varbind sets the status to a value - other than 'active'. - - - Also note that whenever any elements of a row exist, the - RowStatus column must also exist. - - To summarize the effect of having a conceptual row with a - status column having a SYNTAX clause value of RowStatus, - consider the following state diagram: - - - STATE - +--------------+-----------+-------------+------------- - | A | B | C | D - | |status col.|status column| - |status column | is | is |status column - ACTION |does not exist| notReady | notInService| is active ---------------+--------------+-----------+-------------+------------- -set status |noError ->D|inconsist- |inconsistent-|inconsistent- -column to | or | entValue| Value| Value -createAndGo |inconsistent- | | | - | Value| | | ---------------+--------------+-----------+-------------+------------- -set status |noError see 1|inconsist- |inconsistent-|inconsistent- -column to | or | entValue| Value| Value -createAndWait |wrongValue | | | ---------------+--------------+-----------+-------------+------------- -set status |inconsistent- |inconsist- |noError |noError -column to | Value| entValue| | -active | | | | - | | or | | - | | | | - | |see 2 ->D|see 8 ->D| ->D ---------------+--------------+-----------+-------------+------------- -set status |inconsistent- |inconsist- |noError |noError ->C -column to | Value| entValue| | -notInService | | | | - | | or | | or - | | | | - | |see 3 ->C| ->C|see 6 ---------------+--------------+-----------+-------------+------------- -set status |noError |noError |noError |noError ->A -column to | | | | or -destroy | ->A| ->A| ->A|see 7 ---------------+--------------+-----------+-------------+------------- -set any other |see 4 |noError |noError |see 5 -column to some| | | | -value | | see 1| ->C| ->D ---------------+--------------+-----------+-------------+------------- - - (1) goto B or C, depending on information available to the - agent. - - (2) if other variable bindings included in the same PDU, - provide values for all columns which are missing but - required, and all columns have acceptable values, then - return noError and goto D. - - (3) if other variable bindings included in the same PDU, - provide legal values for all columns which are missing but - required, then return noError and goto C. - - (4) at the discretion of the agent, the return value may be - either: - - inconsistentName: because the agent does not choose to - create such an instance when the corresponding - RowStatus instance does not exist, or - - inconsistentValue: if the supplied value is - inconsistent with the state of some other MIB object's - value, or - - noError: because the agent chooses to create the - instance. - - If noError is returned, then the instance of the status - column must also be created, and the new state is B or C, - depending on the information available to the agent. If - inconsistentName or inconsistentValue is returned, the row - remains in state A. - - (5) depending on the MIB definition for the column/table, - either noError or inconsistentValue may be returned. - - (6) the return value can indicate one of the following - errors: - - wrongValue: because the agent does not support - notInService (e.g., an agent which does not support - createAndWait), or - - inconsistentValue: because the agent is unable to take - the row out of service at this time, perhaps because it - is in use and cannot be de-activated. - - (7) the return value can indicate the following error: - - inconsistentValue: because the agent is unable to - remove the row at this time, perhaps because it is in - use and cannot be de-activated. - - (8) the transition to D can fail, e.g., if the values of the - conceptual row are inconsistent, then the error code would - be inconsistentValue. - - NOTE: Other processing of (this and other varbinds of) the - set request may result in a response other than noError - being returned, e.g., wrongValue, noCreation, etc. - - - Conceptual Row Creation - - There are four potential interactions when creating a - conceptual row: selecting an instance-identifier which is - not in use; creating the conceptual row; initializing any - objects for which the agent does not supply a default; and, - making the conceptual row available for use by the managed - device. - - Interaction 1: Selecting an Instance-Identifier - - The algorithm used to select an instance-identifier varies - for each conceptual row. In some cases, the instance- - identifier is semantically significant, e.g., the - destination address of a route, and a management station - selects the instance-identifier according to the semantics. - - In other cases, the instance-identifier is used solely to - distinguish conceptual rows, and a management station - without specific knowledge of the conceptual row might - examine the instances present in order to determine an - unused instance-identifier. (This approach may be used, but - it is often highly sub-optimal; however, it is also a - questionable practice for a naive management station to - attempt conceptual row creation.) - - Alternately, the MIB module which defines the conceptual row - might provide one or more objects which provide assistance - in determining an unused instance-identifier. For example, - if the conceptual row is indexed by an integer-value, then - an object having an integer-valued SYNTAX clause might be - defined for such a purpose, allowing a management station to - issue a management protocol retrieval operation. In order - to avoid unnecessary collisions between competing management - stations, `adjacent' retrievals of this object should be - different. - - Finally, the management station could select a pseudo-random - number to use as the index. In the event that this index - was already in use and an inconsistentValue was returned in - response to the management protocol set operation, the - management station should simply select a new pseudo-random - number and retry the operation. - - A MIB designer should choose between the two latter - algorithms based on the size of the table (and therefore the - efficiency of each algorithm). For tables in which a large - number of entries are expected, it is recommended that a MIB - object be defined that returns an acceptable index for - creation. For tables with small numbers of entries, it is - recommended that the latter pseudo-random index mechanism be - used. - - Interaction 2: Creating the Conceptual Row - - Once an unused instance-identifier has been selected, the - management station determines if it wishes to create and - activate the conceptual row in one transaction or in a - negotiated set of interactions. - - Interaction 2a: Creating and Activating the Conceptual Row - - The management station must first determine the column - requirements, i.e., it must determine those columns for - which it must or must not provide values. Depending on the - complexity of the table and the management station's - knowledge of the agent's capabilities, this determination - can be made locally by the management station. Alternately, - the management station issues a management protocol get - operation to examine all columns in the conceptual row that - it wishes to create. In response, for each column, there - are three possible outcomes: - - - a value is returned, indicating that some other - management station has already created this conceptual - row. We return to interaction 1. - - - the exception `noSuchInstance' is returned, - indicating that the agent implements the object-type - associated with this column, and that this column in at - least one conceptual row would be accessible in the MIB - view used by the retrieval were it to exist. For those - columns to which the agent provides read-create access, - the `noSuchInstance' exception tells the management - station that it should supply a value for this column - when the conceptual row is to be created. - - - the exception `noSuchObject' is returned, indicating - that the agent does not implement the object-type - associated with this column or that there is no - conceptual row for which this column would be - accessible in the MIB view used by the retrieval. As - such, the management station can not issue any - management protocol set operations to create an - instance of this column. - - Once the column requirements have been determined, a - management protocol set operation is accordingly issued. - This operation also sets the new instance of the status - column to `createAndGo'. - - When the agent processes the set operation, it verifies that - it has sufficient information to make the conceptual row - available for use by the managed device. The information - available to the agent is provided by two sources: the - management protocol set operation which creates the - conceptual row, and, implementation-specific defaults - supplied by the agent (note that an agent must provide - implementation-specific defaults for at least those objects - which it implements as read-only). If there is sufficient - information available, then the conceptual row is created, a - `noError' response is returned, the status column is set to - `active', and no further interactions are necessary (i.e., - interactions 3 and 4 are skipped). If there is insufficient - information, then the conceptual row is not created, and the - set operation fails with an error of `inconsistentValue'. - On this error, the management station can issue a management - protocol retrieval operation to determine if this was - because it failed to specify a value for a required column, - or, because the selected instance of the status column - already existed. In the latter case, we return to - interaction 1. In the former case, the management station - can re-issue the set operation with the additional - information, or begin interaction 2 again using - `createAndWait' in order to negotiate creation of the - conceptual row. - - NOTE WELL - - Regardless of the method used to determine the column - requirements, it is possible that the management - station might deem a column necessary when, in fact, - the agent will not allow that particular columnar - instance to be created or written. In this case, the - management protocol set operation will fail with an - error such as `noCreation' or `notWritable'. In this - case, the management station decides whether it needs - to be able to set a value for that particular columnar - instance. If not, the management station re-issues the - management protocol set operation, but without setting - a value for that particular columnar instance; - otherwise, the management station aborts the row - creation algorithm. - - Interaction 2b: Negotiating the Creation of the Conceptual - Row - - The management station issues a management protocol set - operation which sets the desired instance of the status - column to `createAndWait'. If the agent is unwilling to - process a request of this sort, the set operation fails with - an error of `wrongValue'. (As a consequence, such an agent - must be prepared to accept a single management protocol set - operation, i.e., interaction 2a above, containing all of the - columns indicated by its column requirements.) Otherwise, - the conceptual row is created, a `noError' response is - returned, and the status column is immediately set to either - `notInService' or `notReady', depending on whether it has - sufficient information to (attempt to) make the conceptual - row available for use by the managed device. If there is - sufficient information available, then the status column is - set to `notInService'; otherwise, if there is insufficient - information, then the status column is set to `notReady'. - Regardless, we proceed to interaction 3. - - Interaction 3: Initializing non-defaulted Objects - - The management station must now determine the column - requirements. It issues a management protocol get operation - to examine all columns in the created conceptual row. In - the response, for each column, there are three possible - outcomes: - - - a value is returned, indicating that the agent - implements the object-type associated with this column - and had sufficient information to provide a value. For - those columns to which the agent provides read-create - access (and for which the agent allows their values to - be changed after their creation), a value return tells - the management station that it may issue additional - management protocol set operations, if it desires, in - order to change the value associated with this column. - - - the exception `noSuchInstance' is returned, - indicating that the agent implements the object-type - associated with this column, and that this column in at - least one conceptual row would be accessible in the MIB - view used by the retrieval were it to exist. However, - the agent does not have sufficient information to - provide a value, and until a value is provided, the - conceptual row may not be made available for use by the - managed device. For those columns to which the agent - provides read-create access, the `noSuchInstance' - exception tells the management station that it must - issue additional management protocol set operations, in - order to provide a value associated with this column. - - - the exception `noSuchObject' is returned, indicating - that the agent does not implement the object-type - associated with this column or that there is no - conceptual row for which this column would be - accessible in the MIB view used by the retrieval. As - such, the management station can not issue any - management protocol set operations to create an - instance of this column. - - If the value associated with the status column is - `notReady', then the management station must first deal with - all `noSuchInstance' columns, if any. Having done so, the - value of the status column becomes `notInService', and we - proceed to interaction 4. - - Interaction 4: Making the Conceptual Row Available - - Once the management station is satisfied with the values - associated with the columns of the conceptual row, it issues - a management protocol set operation to set the status column - to `active'. If the agent has sufficient information to - make the conceptual row available for use by the managed - device, the management protocol set operation succeeds (a - `noError' response is returned). Otherwise, the management - protocol set operation fails with an error of - `inconsistentValue'. - - NOTE WELL - - A conceptual row having a status column with value - `notInService' or `notReady' is unavailable to the - managed device. As such, it is possible for the - managed device to create its own instances during the - time between the management protocol set operation - which sets the status column to `createAndWait' and the - management protocol set operation which sets the status - column to `active'. In this case, when the management - protocol set operation is issued to set the status - column to `active', the values held in the agent - supersede those used by the managed device. - - If the management station is prevented from setting the - status column to `active' (e.g., due to management station - or network failure) the conceptual row will be left in the - `notInService' or `notReady' state, consuming resources - indefinitely. The agent must detect conceptual rows that - have been in either state for an abnormally long period of - time and remove them. It is the responsibility of the - DESCRIPTION clause of the status column to indicate what an - abnormally long period of time would be. This period of - time should be long enough to allow for human response time - (including `think time') between the creation of the - conceptual row and the setting of the status to `active'. - In the absence of such information in the DESCRIPTION - clause, it is suggested that this period be approximately 5 - minutes in length. This removal action applies not only to - newly-created rows, but also to previously active rows which - are set to, and left in, the notInService state for a - prolonged period exceeding that which is considered normal - for such a conceptual row. - - Conceptual Row Suspension - - When a conceptual row is `active', the management station - may issue a management protocol set operation which sets the - instance of the status column to `notInService'. If the - agent is unwilling to do so, the set operation fails with an - error of `wrongValue' or `inconsistentValue'. Otherwise, - the conceptual row is taken out of service, and a `noError' - response is returned. It is the responsibility of the - DESCRIPTION clause of the status column to indicate under - what circumstances the status column should be taken out of - service (e.g., in order for the value of some other column - of the same conceptual row to be modified). - - - Conceptual Row Deletion - - For deletion of conceptual rows, a management protocol set - operation is issued which sets the instance of the status - column to `destroy'. This request may be made regardless of - the current value of the status column (e.g., it is possible - to delete conceptual rows which are either `notReady', - `notInService' or `active'.) If the operation succeeds, - then all instances associated with the conceptual row are - immediately removed." - SYNTAX INTEGER { - -- the following two values are states: - -- these values may be read or written - active(1), - notInService(2), - - -- the following value is a state: - -- this value may be read, but not written - notReady(3), - - -- the following three values are - -- actions: these values may be written, - -- but are never read - createAndGo(4), - createAndWait(5), - destroy(6) - } - -TimeStamp ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "The value of the sysUpTime object at which a specific - occurrence happened. The specific occurrence must be - defined in the description of any object defined using this - type. - - If sysUpTime is reset to zero as a result of a re- - initialization of the network management (sub)system, then - the values of all TimeStamp objects are also reset. - However, after approximately 497 days without a re- - initialization, the sysUpTime object will reach 2^^32-1 and - then increment around to zero; in this case, existing values - of TimeStamp objects do not change. This can lead to - ambiguities in the value of TimeStamp objects." - SYNTAX TimeTicks - - -TimeInterval ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "A period of time, measured in units of 0.01 seconds." - SYNTAX INTEGER (0..2147483647) - -DateAndTime ::= TEXTUAL-CONVENTION - DISPLAY-HINT "2d-1d-1d,1d:1d:1d.1d,1a1d:1d" - STATUS current - DESCRIPTION - "A date-time specification. - - field octets contents range - ----- ------ -------- ----- - 1 1-2 year* 0..65536 - 2 3 month 1..12 - 3 4 day 1..31 - 4 5 hour 0..23 - 5 6 minutes 0..59 - 6 7 seconds 0..60 - (use 60 for leap-second) - 7 8 deci-seconds 0..9 - 8 9 direction from UTC '+' / '-' - 9 10 hours from UTC* 0..13 - 10 11 minutes from UTC 0..59 - - * Notes: - - the value of year is in network-byte order - - daylight saving time in New Zealand is +13 - - For example, Tuesday May 26, 1992 at 1:30:15 PM EDT would be - displayed as: - - 1992-5-26,13:30:15.0,-4:0 - - Note that if only local time is known, then timezone - information (fields 8-10) is not present." - SYNTAX OCTET STRING (SIZE (8 | 11)) - - -StorageType ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "Describes the memory realization of a conceptual row. A - row which is volatile(2) is lost upon reboot. A row which - is either nonVolatile(3), permanent(4) or readOnly(5), is - backed up by stable storage. A row which is permanent(4) - can be changed but not deleted. A row which is readOnly(5) - cannot be changed nor deleted. - - If the value of an object with this syntax is either - permanent(4) or readOnly(5), it cannot be written. - Conversely, if the value is either other(1), volatile(2) or - nonVolatile(3), it cannot be modified to be permanent(4) or - readOnly(5). (All illegal modifications result in a - 'wrongValue' error.) - - Every usage of this textual convention is required to - specify the columnar objects which a permanent(4) row must - at a minimum allow to be writable." - SYNTAX INTEGER { - other(1), -- eh? - volatile(2), -- e.g., in RAM - nonVolatile(3), -- e.g., in NVRAM - permanent(4), -- e.g., partially in ROM - readOnly(5) -- e.g., completely in ROM - } - -TDomain ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "Denotes a kind of transport service. - - Some possible values, such as snmpUDPDomain, are defined in - the SNMPv2-TM MIB module. Other possible values are defined - in other MIB modules." - REFERENCE "The SNMPv2-TM MIB module is defined in RFC 1906." - SYNTAX OBJECT IDENTIFIER - - -TAddress ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "Denotes a transport service address. - - A TAddress value is always interpreted within the context of a - TDomain value. Thus, each definition of a TDomain value must - be accompanied by a definition of a textual convention for use - with that TDomain. Some possible textual conventions, such as - SnmpUDPAddress for snmpUDPDomain, are defined in the SNMPv2-TM - MIB module. Other possible textual conventions are defined in - other MIB modules." - REFERENCE "The SNMPv2-TM MIB module is defined in RFC 1906." - SYNTAX OCTET STRING (SIZE (1..255)) - - -END diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-TM b/src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-TM deleted file mode 100644 index dadbc4a8..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/SNMPv2-TM +++ /dev/null @@ -1,194 +0,0 @@ -SNMPv2-TM DEFINITIONS ::= BEGIN - -IMPORTS - MODULE-IDENTITY, OBJECT-IDENTITY, - snmpModules, snmpDomains, snmpProxys - FROM SNMPv2-SMI - TEXTUAL-CONVENTION - FROM SNMPv2-TC; - -snmpv2tm MODULE-IDENTITY - LAST-UPDATED "200210160000Z" - ORGANIZATION "IETF SNMPv3 Working Group" - CONTACT-INFO - "WG-EMail: snmpv3@lists.tislabs.com - Subscribe: snmpv3-request@lists.tislabs.com - - Co-Chair: Russ Mundy - Network Associates Laboratories - postal: 15204 Omega Drive, Suite 300 - Rockville, MD 20850-4601 - USA - EMail: mundy@tislabs.com - phone: +1 301 947-7107 - - - - Co-Chair: David Harrington - Enterasys Networks - postal: 35 Industrial Way - P. O. Box 5005 - Rochester, NH 03866-5005 - USA - EMail: dbh@enterasys.com - phone: +1 603 337-2614 - - Editor: Randy Presuhn - BMC Software, Inc. - postal: 2141 North First Street - San Jose, CA 95131 - USA - EMail: randy_presuhn@bmc.com - phone: +1 408 546-1006" - DESCRIPTION - "The MIB module for SNMP transport mappings. - - Copyright (C) The Internet Society (2002). This - version of this MIB module is part of RFC 3417; - see the RFC itself for full legal notices. - " - REVISION "200210160000Z" - DESCRIPTION - "Clarifications, published as RFC 3417." - REVISION "199601010000Z" - DESCRIPTION - "Clarifications, published as RFC 1906." - REVISION "199304010000Z" - DESCRIPTION - "The initial version, published as RFC 1449." - ::= { snmpModules 19 } - --- SNMP over UDP over IPv4 - -snmpUDPDomain OBJECT-IDENTITY - STATUS current - DESCRIPTION - "The SNMP over UDP over IPv4 transport domain. - The corresponding transport address is of type - SnmpUDPAddress." - ::= { snmpDomains 1 } - - - - - - - - -SnmpUDPAddress ::= TEXTUAL-CONVENTION - DISPLAY-HINT "1d.1d.1d.1d/2d" - STATUS current - DESCRIPTION - "Represents a UDP over IPv4 address: - - octets contents encoding - 1-4 IP-address network-byte order - 5-6 UDP-port network-byte order - " - SYNTAX OCTET STRING (SIZE (6)) - --- SNMP over OSI - -snmpCLNSDomain OBJECT-IDENTITY - STATUS current - DESCRIPTION - "The SNMP over CLNS transport domain. - The corresponding transport address is of type - SnmpOSIAddress." - ::= { snmpDomains 2 } - -snmpCONSDomain OBJECT-IDENTITY - STATUS current - DESCRIPTION - "The SNMP over CONS transport domain. - The corresponding transport address is of type - SnmpOSIAddress." - ::= { snmpDomains 3 } - -SnmpOSIAddress ::= TEXTUAL-CONVENTION - DISPLAY-HINT "*1x:/1x:" - STATUS current - DESCRIPTION - "Represents an OSI transport-address: - - octets contents encoding - 1 length of NSAP 'n' as an unsigned-integer - (either 0 or from 3 to 20) - 2..(n+1) NSAP concrete binary representation - (n+2)..m TSEL string of (up to 64) octets - " - SYNTAX OCTET STRING (SIZE (1 | 4..85)) - - - - - - - - --- SNMP over DDP - -snmpDDPDomain OBJECT-IDENTITY - STATUS current - DESCRIPTION - "The SNMP over DDP transport domain. The corresponding - transport address is of type SnmpNBPAddress." - ::= { snmpDomains 4 } - -SnmpNBPAddress ::= TEXTUAL-CONVENTION - STATUS current - DESCRIPTION - "Represents an NBP name: - - octets contents encoding - 1 length of object 'n' as an unsigned integer - 2..(n+1) object string of (up to 32) octets - n+2 length of type 'p' as an unsigned integer - (n+3)..(n+2+p) type string of (up to 32) octets - n+3+p length of zone 'q' as an unsigned integer - (n+4+p)..(n+3+p+q) zone string of (up to 32) octets - - For comparison purposes, strings are - case-insensitive. All strings may contain any octet - other than 255 (hex ff)." - SYNTAX OCTET STRING (SIZE (3..99)) - --- SNMP over IPX - -snmpIPXDomain OBJECT-IDENTITY - STATUS current - DESCRIPTION - "The SNMP over IPX transport domain. The corresponding - transport address is of type SnmpIPXAddress." - ::= { snmpDomains 5 } - -SnmpIPXAddress ::= TEXTUAL-CONVENTION - DISPLAY-HINT "4x.1x:1x:1x:1x:1x:1x.2d" - STATUS current - DESCRIPTION - "Represents an IPX address: - - octets contents encoding - 1-4 network-number network-byte order - 5-10 physical-address network-byte order - 11-12 socket-number network-byte order - " - SYNTAX OCTET STRING (SIZE (12)) - - - --- for proxy to SNMPv1 (RFC 1157) - -rfc1157Proxy OBJECT IDENTIFIER ::= { snmpProxys 1 } - -rfc1157Domain OBJECT-IDENTITY - STATUS deprecated - DESCRIPTION - "The transport domain for SNMPv1 over UDP over IPv4. - The corresponding transport address is of type - SnmpUDPAddress." - ::= { rfc1157Proxy 1 } - --- ::= { rfc1157Proxy 2 } this OID is obsolete - -END diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/TCP-MIB b/src/apps/snmp/LwipMibCompiler/Mibs/TCP-MIB deleted file mode 100644 index 5b9e0bf3..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/TCP-MIB +++ /dev/null @@ -1,829 +0,0 @@ -TCP-MIB DEFINITIONS ::= BEGIN - -IMPORTS - MODULE-IDENTITY, OBJECT-TYPE, Integer32, Unsigned32, - Gauge32, Counter32, Counter64, IpAddress, mib-2 - FROM SNMPv2-SMI - MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF - InetAddress, InetAddressType, - InetPortNumber FROM INET-ADDRESS-MIB; - -tcpMIB MODULE-IDENTITY - LAST-UPDATED "200502180000Z" -- 18 February 2005 - ORGANIZATION - "IETF IPv6 MIB Revision Team - http://www.ietf.org/html.charters/ipv6-charter.html" - CONTACT-INFO - "Rajiv Raghunarayan (editor) - - Cisco Systems Inc. - 170 West Tasman Drive - San Jose, CA 95134 - - Phone: +1 408 853 9612 - Email: - - Send comments to " - DESCRIPTION - "The MIB module for managing TCP implementations. - - Copyright (C) The Internet Society (2005). This version - of this MIB module is a part of RFC 4022; see the RFC - itself for full legal notices." - REVISION "200502180000Z" -- 18 February 2005 - DESCRIPTION - "IP version neutral revision, published as RFC 4022." - REVISION "9411010000Z" - DESCRIPTION - "Initial SMIv2 version, published as RFC 2012." - REVISION "9103310000Z" - DESCRIPTION - "The initial revision of this MIB module was part of - MIB-II." - ::= { mib-2 49 } - --- the TCP base variables group - - - - -tcp OBJECT IDENTIFIER ::= { mib-2 6 } - --- Scalars - -tcpRtoAlgorithm OBJECT-TYPE - SYNTAX INTEGER { - other(1), -- none of the following - constant(2), -- a constant rto - rsre(3), -- MIL-STD-1778, Appendix B - vanj(4), -- Van Jacobson's algorithm - rfc2988(5) -- RFC 2988 - } - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The algorithm used to determine the timeout value used for - retransmitting unacknowledged octets." - ::= { tcp 1 } - -tcpRtoMin OBJECT-TYPE - SYNTAX Integer32 (0..2147483647) - UNITS "milliseconds" - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The minimum value permitted by a TCP implementation for - the retransmission timeout, measured in milliseconds. - More refined semantics for objects of this type depend - on the algorithm used to determine the retransmission - timeout; in particular, the IETF standard algorithm - rfc2988(5) provides a minimum value." - ::= { tcp 2 } - -tcpRtoMax OBJECT-TYPE - SYNTAX Integer32 (0..2147483647) - UNITS "milliseconds" - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The maximum value permitted by a TCP implementation for - the retransmission timeout, measured in milliseconds. - More refined semantics for objects of this type depend - on the algorithm used to determine the retransmission - timeout; in particular, the IETF standard algorithm - rfc2988(5) provides an upper bound (as part of an - adaptive backoff algorithm)." - ::= { tcp 3 } - - - - -tcpMaxConn OBJECT-TYPE - SYNTAX Integer32 (-1 | 0..2147483647) - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The limit on the total number of TCP connections the entity - can support. In entities where the maximum number of - connections is dynamic, this object should contain the - value -1." - ::= { tcp 4 } - -tcpActiveOpens OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of times that TCP connections have made a direct - transition to the SYN-SENT state from the CLOSED state. - - Discontinuities in the value of this counter are - indicated via discontinuities in the value of sysUpTime." - ::= { tcp 5 } - -tcpPassiveOpens OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of times TCP connections have made a direct - transition to the SYN-RCVD state from the LISTEN state. - - Discontinuities in the value of this counter are - indicated via discontinuities in the value of sysUpTime." - ::= { tcp 6 } - -tcpAttemptFails OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of times that TCP connections have made a direct - transition to the CLOSED state from either the SYN-SENT - state or the SYN-RCVD state, plus the number of times that - TCP connections have made a direct transition to the - LISTEN state from the SYN-RCVD state. - - Discontinuities in the value of this counter are - indicated via discontinuities in the value of sysUpTime." - - - - ::= { tcp 7 } - -tcpEstabResets OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of times that TCP connections have made a direct - transition to the CLOSED state from either the ESTABLISHED - state or the CLOSE-WAIT state. - - Discontinuities in the value of this counter are - indicated via discontinuities in the value of sysUpTime." - ::= { tcp 8 } - -tcpCurrEstab OBJECT-TYPE - SYNTAX Gauge32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of TCP connections for which the current state - is either ESTABLISHED or CLOSE-WAIT." - ::= { tcp 9 } - -tcpInSegs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of segments received, including those - received in error. This count includes segments received - on currently established connections. - - Discontinuities in the value of this counter are - indicated via discontinuities in the value of sysUpTime." - ::= { tcp 10 } - -tcpOutSegs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of segments sent, including those on - current connections but excluding those containing only - retransmitted octets. - - Discontinuities in the value of this counter are - indicated via discontinuities in the value of sysUpTime." - - - - ::= { tcp 11 } - -tcpRetransSegs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of segments retransmitted; that is, the - number of TCP segments transmitted containing one or more - previously transmitted octets. - - Discontinuities in the value of this counter are - indicated via discontinuities in the value of sysUpTime." - ::= { tcp 12 } - -tcpInErrs OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of segments received in error (e.g., bad - TCP checksums). - - Discontinuities in the value of this counter are - indicated via discontinuities in the value of sysUpTime." - ::= { tcp 14 } - -tcpOutRsts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of TCP segments sent containing the RST flag. - - Discontinuities in the value of this counter are - indicated via discontinuities in the value of sysUpTime." - ::= { tcp 15 } - --- { tcp 16 } was used to represent the ipv6TcpConnTable in RFC 2452, --- which has since been obsoleted. It MUST not be used. - -tcpHCInSegs OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of segments received, including those - received in error. This count includes segments received - - - - on currently established connections. This object is - the 64-bit equivalent of tcpInSegs. - - Discontinuities in the value of this counter are - indicated via discontinuities in the value of sysUpTime." - ::= { tcp 17 } - -tcpHCOutSegs OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of segments sent, including those on - current connections but excluding those containing only - retransmitted octets. This object is the 64-bit - equivalent of tcpOutSegs. - - Discontinuities in the value of this counter are - indicated via discontinuities in the value of sysUpTime." - ::= { tcp 18 } - - --- The TCP Connection table - -tcpConnectionTable OBJECT-TYPE - SYNTAX SEQUENCE OF TcpConnectionEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "A table containing information about existing TCP - connections. Note that unlike earlier TCP MIBs, there - is a separate table for connections in the LISTEN state." - ::= { tcp 19 } - -tcpConnectionEntry OBJECT-TYPE - SYNTAX TcpConnectionEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "A conceptual row of the tcpConnectionTable containing - information about a particular current TCP connection. - Each row of this table is transient in that it ceases to - exist when (or soon after) the connection makes the - transition to the CLOSED state." - INDEX { tcpConnectionLocalAddressType, - tcpConnectionLocalAddress, - tcpConnectionLocalPort, - tcpConnectionRemAddressType, - - - - tcpConnectionRemAddress, - tcpConnectionRemPort } - ::= { tcpConnectionTable 1 } - -TcpConnectionEntry ::= SEQUENCE { - tcpConnectionLocalAddressType InetAddressType, - tcpConnectionLocalAddress InetAddress, - tcpConnectionLocalPort InetPortNumber, - tcpConnectionRemAddressType InetAddressType, - tcpConnectionRemAddress InetAddress, - tcpConnectionRemPort InetPortNumber, - tcpConnectionState INTEGER, - tcpConnectionProcess Unsigned32 - } - -tcpConnectionLocalAddressType OBJECT-TYPE - SYNTAX InetAddressType - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The address type of tcpConnectionLocalAddress." - ::= { tcpConnectionEntry 1 } - -tcpConnectionLocalAddress OBJECT-TYPE - SYNTAX InetAddress - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The local IP address for this TCP connection. The type - of this address is determined by the value of - tcpConnectionLocalAddressType. - - As this object is used in the index for the - tcpConnectionTable, implementors should be - careful not to create entries that would result in OIDs - with more than 128 subidentifiers; otherwise the information - cannot be accessed by using SNMPv1, SNMPv2c, or SNMPv3." - ::= { tcpConnectionEntry 2 } - -tcpConnectionLocalPort OBJECT-TYPE - SYNTAX InetPortNumber - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The local port number for this TCP connection." - ::= { tcpConnectionEntry 3 } - -tcpConnectionRemAddressType OBJECT-TYPE - - - - SYNTAX InetAddressType - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The address type of tcpConnectionRemAddress." - ::= { tcpConnectionEntry 4 } - -tcpConnectionRemAddress OBJECT-TYPE - SYNTAX InetAddress - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The remote IP address for this TCP connection. The type - of this address is determined by the value of - tcpConnectionRemAddressType. - - As this object is used in the index for the - tcpConnectionTable, implementors should be - careful not to create entries that would result in OIDs - with more than 128 subidentifiers; otherwise the information - cannot be accessed by using SNMPv1, SNMPv2c, or SNMPv3." - ::= { tcpConnectionEntry 5 } - -tcpConnectionRemPort OBJECT-TYPE - SYNTAX InetPortNumber - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The remote port number for this TCP connection." - ::= { tcpConnectionEntry 6 } - -tcpConnectionState OBJECT-TYPE - SYNTAX INTEGER { - closed(1), - listen(2), - synSent(3), - synReceived(4), - established(5), - finWait1(6), - finWait2(7), - closeWait(8), - lastAck(9), - closing(10), - timeWait(11), - deleteTCB(12) - } - MAX-ACCESS read-write - STATUS current - - - - DESCRIPTION - "The state of this TCP connection. - - The value listen(2) is included only for parallelism to the - old tcpConnTable and should not be used. A connection in - LISTEN state should be present in the tcpListenerTable. - - The only value that may be set by a management station is - deleteTCB(12). Accordingly, it is appropriate for an agent - to return a `badValue' response if a management station - attempts to set this object to any other value. - - If a management station sets this object to the value - deleteTCB(12), then the TCB (as defined in [RFC793]) of - the corresponding connection on the managed node is - deleted, resulting in immediate termination of the - connection. - - As an implementation-specific option, a RST segment may be - sent from the managed node to the other TCP endpoint (note, - however, that RST segments are not sent reliably)." - ::= { tcpConnectionEntry 7 } - -tcpConnectionProcess OBJECT-TYPE - SYNTAX Unsigned32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The system's process ID for the process associated with - this connection, or zero if there is no such process. This - value is expected to be the same as HOST-RESOURCES-MIB:: - hrSWRunIndex or SYSAPPL-MIB::sysApplElmtRunIndex for some - row in the appropriate tables." - ::= { tcpConnectionEntry 8 } - --- The TCP Listener table - -tcpListenerTable OBJECT-TYPE - SYNTAX SEQUENCE OF TcpListenerEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "A table containing information about TCP listeners. A - listening application can be represented in three - possible ways: - - 1. An application that is willing to accept both IPv4 and - IPv6 datagrams is represented by - - - - a tcpListenerLocalAddressType of unknown (0) and - a tcpListenerLocalAddress of ''h (a zero-length - octet-string). - - 2. An application that is willing to accept only IPv4 or - IPv6 datagrams is represented by a - tcpListenerLocalAddressType of the appropriate address - type and a tcpListenerLocalAddress of '0.0.0.0' or '::' - respectively. - - 3. An application that is listening for data destined - only to a specific IP address, but from any remote - system, is represented by a tcpListenerLocalAddressType - of an appropriate address type, with - tcpListenerLocalAddress as the specific local address. - - NOTE: The address type in this table represents the - address type used for the communication, irrespective - of the higher-layer abstraction. For example, an - application using IPv6 'sockets' to communicate via - IPv4 between ::ffff:10.0.0.1 and ::ffff:10.0.0.2 would - use InetAddressType ipv4(1))." - ::= { tcp 20 } - -tcpListenerEntry OBJECT-TYPE - SYNTAX TcpListenerEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "A conceptual row of the tcpListenerTable containing - information about a particular TCP listener." - INDEX { tcpListenerLocalAddressType, - tcpListenerLocalAddress, - tcpListenerLocalPort } - ::= { tcpListenerTable 1 } - -TcpListenerEntry ::= SEQUENCE { - tcpListenerLocalAddressType InetAddressType, - tcpListenerLocalAddress InetAddress, - tcpListenerLocalPort InetPortNumber, - tcpListenerProcess Unsigned32 - } - -tcpListenerLocalAddressType OBJECT-TYPE - SYNTAX InetAddressType - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - - - - "The address type of tcpListenerLocalAddress. The value - should be unknown (0) if connection initiations to all - local IP addresses are accepted." - ::= { tcpListenerEntry 1 } - -tcpListenerLocalAddress OBJECT-TYPE - SYNTAX InetAddress - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The local IP address for this TCP connection. - - The value of this object can be represented in three - possible ways, depending on the characteristics of the - listening application: - - 1. For an application willing to accept both IPv4 and - IPv6 datagrams, the value of this object must be - ''h (a zero-length octet-string), with the value - of the corresponding tcpListenerLocalAddressType - object being unknown (0). - - 2. For an application willing to accept only IPv4 or - IPv6 datagrams, the value of this object must be - '0.0.0.0' or '::' respectively, with - tcpListenerLocalAddressType representing the - appropriate address type. - - 3. For an application which is listening for data - destined only to a specific IP address, the value - of this object is the specific local address, with - tcpListenerLocalAddressType representing the - appropriate address type. - - As this object is used in the index for the - tcpListenerTable, implementors should be - careful not to create entries that would result in OIDs - with more than 128 subidentifiers; otherwise the information - cannot be accessed, using SNMPv1, SNMPv2c, or SNMPv3." - ::= { tcpListenerEntry 2 } - -tcpListenerLocalPort OBJECT-TYPE - SYNTAX InetPortNumber - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The local port number for this TCP connection." - ::= { tcpListenerEntry 3 } - - - -tcpListenerProcess OBJECT-TYPE - SYNTAX Unsigned32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The system's process ID for the process associated with - this listener, or zero if there is no such process. This - value is expected to be the same as HOST-RESOURCES-MIB:: - hrSWRunIndex or SYSAPPL-MIB::sysApplElmtRunIndex for some - row in the appropriate tables." - ::= { tcpListenerEntry 4 } - - --- The deprecated TCP Connection table - -tcpConnTable OBJECT-TYPE - SYNTAX SEQUENCE OF TcpConnEntry - MAX-ACCESS not-accessible - STATUS deprecated - DESCRIPTION - "A table containing information about existing IPv4-specific - TCP connections or listeners. This table has been - deprecated in favor of the version neutral - tcpConnectionTable." - ::= { tcp 13 } - -tcpConnEntry OBJECT-TYPE - SYNTAX TcpConnEntry - MAX-ACCESS not-accessible - STATUS deprecated - DESCRIPTION - "A conceptual row of the tcpConnTable containing information - about a particular current IPv4 TCP connection. Each row - of this table is transient in that it ceases to exist when - (or soon after) the connection makes the transition to the - CLOSED state." - INDEX { tcpConnLocalAddress, - tcpConnLocalPort, - tcpConnRemAddress, - tcpConnRemPort } - ::= { tcpConnTable 1 } - -TcpConnEntry ::= SEQUENCE { - tcpConnState INTEGER, - tcpConnLocalAddress IpAddress, - tcpConnLocalPort Integer32, - tcpConnRemAddress IpAddress, - tcpConnRemPort Integer32 - - - - } - -tcpConnState OBJECT-TYPE - SYNTAX INTEGER { - closed(1), - listen(2), - synSent(3), - synReceived(4), - established(5), - finWait1(6), - finWait2(7), - closeWait(8), - lastAck(9), - closing(10), - timeWait(11), - deleteTCB(12) - } - MAX-ACCESS read-write - STATUS deprecated - DESCRIPTION - "The state of this TCP connection. - - The only value that may be set by a management station is - deleteTCB(12). Accordingly, it is appropriate for an agent - to return a `badValue' response if a management station - attempts to set this object to any other value. - - If a management station sets this object to the value - deleteTCB(12), then the TCB (as defined in [RFC793]) of - the corresponding connection on the managed node is - deleted, resulting in immediate termination of the - connection. - - As an implementation-specific option, a RST segment may be - sent from the managed node to the other TCP endpoint (note, - however, that RST segments are not sent reliably)." - ::= { tcpConnEntry 1 } - -tcpConnLocalAddress OBJECT-TYPE - SYNTAX IpAddress - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The local IP address for this TCP connection. In the case - of a connection in the listen state willing to - accept connections for any IP interface associated with the - node, the value 0.0.0.0 is used." - ::= { tcpConnEntry 2 } - - - -tcpConnLocalPort OBJECT-TYPE - SYNTAX Integer32 (0..65535) - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The local port number for this TCP connection." - ::= { tcpConnEntry 3 } - -tcpConnRemAddress OBJECT-TYPE - SYNTAX IpAddress - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The remote IP address for this TCP connection." - ::= { tcpConnEntry 4 } - -tcpConnRemPort OBJECT-TYPE - SYNTAX Integer32 (0..65535) - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The remote port number for this TCP connection." - ::= { tcpConnEntry 5 } - --- conformance information - -tcpMIBConformance OBJECT IDENTIFIER ::= { tcpMIB 2 } - -tcpMIBCompliances OBJECT IDENTIFIER ::= { tcpMIBConformance 1 } -tcpMIBGroups OBJECT IDENTIFIER ::= { tcpMIBConformance 2 } - --- compliance statements - -tcpMIBCompliance2 MODULE-COMPLIANCE - STATUS current - DESCRIPTION - "The compliance statement for systems that implement TCP. - - A number of INDEX objects cannot be - represented in the form of OBJECT clauses in SMIv2 but - have the following compliance requirements, - expressed in OBJECT clause form in this description - clause: - - -- OBJECT tcpConnectionLocalAddressType - -- SYNTAX InetAddressType { ipv4(1), ipv6(2) } - -- DESCRIPTION - -- This MIB requires support for only global IPv4 - - - - -- and IPv6 address types. - -- - -- OBJECT tcpConnectionRemAddressType - -- SYNTAX InetAddressType { ipv4(1), ipv6(2) } - -- DESCRIPTION - -- This MIB requires support for only global IPv4 - -- and IPv6 address types. - -- - -- OBJECT tcpListenerLocalAddressType - -- SYNTAX InetAddressType { unknown(0), ipv4(1), - -- ipv6(2) } - -- DESCRIPTION - -- This MIB requires support for only global IPv4 - -- and IPv6 address types. The type unknown also - -- needs to be supported to identify a special - -- case in the listener table: a listen using - -- both IPv4 and IPv6 addresses on the device. - -- - " - MODULE -- this module - MANDATORY-GROUPS { tcpBaseGroup, tcpConnectionGroup, - tcpListenerGroup } - GROUP tcpHCGroup - DESCRIPTION - "This group is mandatory for systems that are capable - of receiving or transmitting more than 1 million TCP - segments per second. 1 million segments per second will - cause a Counter32 to wrap in just over an hour." - OBJECT tcpConnectionState - SYNTAX INTEGER { closed(1), listen(2), synSent(3), - synReceived(4), established(5), - finWait1(6), finWait2(7), closeWait(8), - lastAck(9), closing(10), timeWait(11) } - MIN-ACCESS read-only - DESCRIPTION - "Write access is not required, nor is support for the value - deleteTCB (12)." - ::= { tcpMIBCompliances 2 } - -tcpMIBCompliance MODULE-COMPLIANCE - STATUS deprecated - DESCRIPTION - "The compliance statement for IPv4-only systems that - implement TCP. In order to be IP version independent, this - compliance statement is deprecated in favor of - tcpMIBCompliance2. However, agents are still encouraged - to implement these objects in order to interoperate with - the deployed base of managers." - - - - MODULE -- this module - MANDATORY-GROUPS { tcpGroup } - OBJECT tcpConnState - MIN-ACCESS read-only - DESCRIPTION - "Write access is not required." - ::= { tcpMIBCompliances 1 } - - --- units of conformance - -tcpGroup OBJECT-GROUP - OBJECTS { tcpRtoAlgorithm, tcpRtoMin, tcpRtoMax, - tcpMaxConn, tcpActiveOpens, - tcpPassiveOpens, tcpAttemptFails, - tcpEstabResets, tcpCurrEstab, tcpInSegs, - tcpOutSegs, tcpRetransSegs, tcpConnState, - tcpConnLocalAddress, tcpConnLocalPort, - tcpConnRemAddress, tcpConnRemPort, - tcpInErrs, tcpOutRsts } - STATUS deprecated - DESCRIPTION - "The tcp group of objects providing for management of TCP - entities." - ::= { tcpMIBGroups 1 } - -tcpBaseGroup OBJECT-GROUP - OBJECTS { tcpRtoAlgorithm, tcpRtoMin, tcpRtoMax, - tcpMaxConn, tcpActiveOpens, - tcpPassiveOpens, tcpAttemptFails, - tcpEstabResets, tcpCurrEstab, tcpInSegs, - tcpOutSegs, tcpRetransSegs, - tcpInErrs, tcpOutRsts } - STATUS current - DESCRIPTION - "The group of counters common to TCP entities." - ::= { tcpMIBGroups 2 } - -tcpConnectionGroup OBJECT-GROUP - OBJECTS { tcpConnectionState, tcpConnectionProcess } - STATUS current - DESCRIPTION - "The group provides general information about TCP - connections." - ::= { tcpMIBGroups 3 } - -tcpListenerGroup OBJECT-GROUP - OBJECTS { tcpListenerProcess } - - - - STATUS current - DESCRIPTION - "This group has objects providing general information about - TCP listeners." - ::= { tcpMIBGroups 4 } - -tcpHCGroup OBJECT-GROUP - OBJECTS { tcpHCInSegs, tcpHCOutSegs } - STATUS current - DESCRIPTION - "The group of objects providing for counters of high speed - TCP implementations." - ::= { tcpMIBGroups 5 } - -END diff --git a/src/apps/snmp/LwipMibCompiler/Mibs/UDP-MIB b/src/apps/snmp/LwipMibCompiler/Mibs/UDP-MIB deleted file mode 100644 index b947b812..00000000 --- a/src/apps/snmp/LwipMibCompiler/Mibs/UDP-MIB +++ /dev/null @@ -1,579 +0,0 @@ -UDP-MIB DEFINITIONS ::= BEGIN - -IMPORTS - MODULE-IDENTITY, OBJECT-TYPE, Integer32, Counter32, Counter64, - Unsigned32, IpAddress, mib-2 FROM SNMPv2-SMI - MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF - InetAddress, InetAddressType, - InetPortNumber FROM INET-ADDRESS-MIB; - -udpMIB MODULE-IDENTITY - LAST-UPDATED "200505200000Z" -- May 20, 2005 - ORGANIZATION - "IETF IPv6 Working Group - http://www.ietf.org/html.charters/ipv6-charter.html" - CONTACT-INFO - "Bill Fenner (editor) - - AT&T Labs -- Research - 75 Willow Rd. - Menlo Park, CA 94025 - - Phone: +1 650 330-7893 - Email: - - John Flick (editor) - - Hewlett-Packard Company - 8000 Foothills Blvd. M/S 5557 - Roseville, CA 95747 - - Phone: +1 916 785 4018 - Email: - - Send comments to " - - - - DESCRIPTION - "The MIB module for managing UDP implementations. - Copyright (C) The Internet Society (2005). This - version of this MIB module is part of RFC 4113; - see the RFC itself for full legal notices." - REVISION "200505200000Z" -- May 20, 2005 - DESCRIPTION - "IP version neutral revision, incorporating the - following revisions: - - - Added udpHCInDatagrams and udpHCOutDatagrams in order - to provide high-capacity counters for fast networks. - - Added text to the descriptions of all counter objects - to indicate how discontinuities are detected. - - Deprecated the IPv4-specific udpTable and replaced it - with the version neutral udpEndpointTable. This - table includes support for connected UDP endpoints - and support for identification of the operating - system process associated with a UDP endpoint. - - Deprecated the udpGroup and replaced it with object - groups representing the current set of objects. - - Deprecated udpMIBCompliance and replaced it with - udpMIBCompliance2, which includes the compliance - information for the new object groups. - - This version published as RFC 4113." - REVISION "199411010000Z" -- November 1, 1994 - DESCRIPTION - "Initial SMIv2 version, published as RFC 2013." - REVISION "199103310000Z" -- March 31, 1991 - DESCRIPTION - "The initial revision of this MIB module was part of - MIB-II, published as RFC 1213." - ::= { mib-2 50 } - --- the UDP group - -udp OBJECT IDENTIFIER ::= { mib-2 7 } - -udpInDatagrams OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of UDP datagrams delivered to UDP - users. - - - - - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by discontinuities in the - value of sysUpTime." - ::= { udp 1 } - -udpNoPorts OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of received UDP datagrams for which - there was no application at the destination port. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by discontinuities in the - value of sysUpTime." - ::= { udp 2 } - -udpInErrors OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The number of received UDP datagrams that could not be - delivered for reasons other than the lack of an - application at the destination port. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by discontinuities in the - value of sysUpTime." - ::= { udp 3 } - -udpOutDatagrams OBJECT-TYPE - SYNTAX Counter32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of UDP datagrams sent from this - entity. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by discontinuities in the - value of sysUpTime." - ::= { udp 4 } - - - -udpHCInDatagrams OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of UDP datagrams delivered to UDP - users, for devices that can receive more than 1 - million UDP datagrams per second. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by discontinuities in the - value of sysUpTime." - ::= { udp 8 } - -udpHCOutDatagrams OBJECT-TYPE - SYNTAX Counter64 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The total number of UDP datagrams sent from this - entity, for devices that can transmit more than 1 - million UDP datagrams per second. - - Discontinuities in the value of this counter can occur - at re-initialization of the management system, and at - other times as indicated by discontinuities in the - value of sysUpTime." - ::= { udp 9 } - --- --- { udp 6 } was defined as the ipv6UdpTable in RFC2454's --- IPV6-UDP-MIB. This RFC obsoletes RFC 2454, so { udp 6 } is --- obsoleted. --- - --- The UDP "Endpoint" table. - -udpEndpointTable OBJECT-TYPE - SYNTAX SEQUENCE OF UdpEndpointEntry - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "A table containing information about this entity's UDP - endpoints on which a local application is currently - accepting or sending datagrams. - - - - - - The address type in this table represents the address - type used for the communication, irrespective of the - higher-layer abstraction. For example, an application - using IPv6 'sockets' to communicate via IPv4 between - ::ffff:10.0.0.1 and ::ffff:10.0.0.2 would use - InetAddressType ipv4(1). - - Unlike the udpTable in RFC 2013, this table also allows - the representation of an application that completely - specifies both local and remote addresses and ports. A - listening application is represented in three possible - ways: - - 1) An application that is willing to accept both IPv4 - and IPv6 datagrams is represented by a - udpEndpointLocalAddressType of unknown(0) and a - udpEndpointLocalAddress of ''h (a zero-length - octet-string). - - 2) An application that is willing to accept only IPv4 - or only IPv6 datagrams is represented by a - udpEndpointLocalAddressType of the appropriate - address type and a udpEndpointLocalAddress of - '0.0.0.0' or '::' respectively. - - 3) An application that is listening for datagrams only - for a specific IP address but from any remote - system is represented by a - udpEndpointLocalAddressType of the appropriate - address type, with udpEndpointLocalAddress - specifying the local address. - - In all cases where the remote is a wildcard, the - udpEndpointRemoteAddressType is unknown(0), the - udpEndpointRemoteAddress is ''h (a zero-length - octet-string), and the udpEndpointRemotePort is 0. - - If the operating system is demultiplexing UDP packets - by remote address and port, or if the application has - 'connected' the socket specifying a default remote - address and port, the udpEndpointRemote* values should - be used to reflect this." - ::= { udp 7 } - -udpEndpointEntry OBJECT-TYPE - SYNTAX UdpEndpointEntry - MAX-ACCESS not-accessible - STATUS current - - - - DESCRIPTION - "Information about a particular current UDP endpoint. - - Implementers need to be aware that if the total number - of elements (octets or sub-identifiers) in - udpEndpointLocalAddress and udpEndpointRemoteAddress - exceeds 111, then OIDs of column instances in this table - will have more than 128 sub-identifiers and cannot be - accessed using SNMPv1, SNMPv2c, or SNMPv3." - INDEX { udpEndpointLocalAddressType, - udpEndpointLocalAddress, - udpEndpointLocalPort, - udpEndpointRemoteAddressType, - udpEndpointRemoteAddress, - udpEndpointRemotePort, - udpEndpointInstance } - ::= { udpEndpointTable 1 } - -UdpEndpointEntry ::= SEQUENCE { - udpEndpointLocalAddressType InetAddressType, - udpEndpointLocalAddress InetAddress, - udpEndpointLocalPort InetPortNumber, - udpEndpointRemoteAddressType InetAddressType, - udpEndpointRemoteAddress InetAddress, - udpEndpointRemotePort InetPortNumber, - udpEndpointInstance Unsigned32, - udpEndpointProcess Unsigned32 - } - -udpEndpointLocalAddressType OBJECT-TYPE - SYNTAX InetAddressType - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The address type of udpEndpointLocalAddress. Only - IPv4, IPv4z, IPv6, and IPv6z addresses are expected, or - unknown(0) if datagrams for all local IP addresses are - accepted." - ::= { udpEndpointEntry 1 } - -udpEndpointLocalAddress OBJECT-TYPE - SYNTAX InetAddress - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The local IP address for this UDP endpoint. - - The value of this object can be represented in three - - - - possible ways, depending on the characteristics of the - listening application: - - 1. For an application that is willing to accept both - IPv4 and IPv6 datagrams, the value of this object - must be ''h (a zero-length octet-string), with - the value of the corresponding instance of the - udpEndpointLocalAddressType object being unknown(0). - - 2. For an application that is willing to accept only IPv4 - or only IPv6 datagrams, the value of this object - must be '0.0.0.0' or '::', respectively, while the - corresponding instance of the - udpEndpointLocalAddressType object represents the - appropriate address type. - - 3. For an application that is listening for data - destined only to a specific IP address, the value - of this object is the specific IP address for which - this node is receiving packets, with the - corresponding instance of the - udpEndpointLocalAddressType object representing the - appropriate address type. - - As this object is used in the index for the - udpEndpointTable, implementors of this table should be - careful not to create entries that would result in OIDs - with more than 128 subidentifiers; else the information - cannot be accessed using SNMPv1, SNMPv2c, or SNMPv3." - ::= { udpEndpointEntry 2 } - -udpEndpointLocalPort OBJECT-TYPE - SYNTAX InetPortNumber - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The local port number for this UDP endpoint." - ::= { udpEndpointEntry 3 } - -udpEndpointRemoteAddressType OBJECT-TYPE - SYNTAX InetAddressType - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The address type of udpEndpointRemoteAddress. Only - IPv4, IPv4z, IPv6, and IPv6z addresses are expected, or - unknown(0) if datagrams for all remote IP addresses are - accepted. Also, note that some combinations of - - - - udpEndpointLocalAdressType and - udpEndpointRemoteAddressType are not supported. In - particular, if the value of this object is not - unknown(0), it is expected to always refer to the - same IP version as udpEndpointLocalAddressType." - ::= { udpEndpointEntry 4 } - -udpEndpointRemoteAddress OBJECT-TYPE - SYNTAX InetAddress - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The remote IP address for this UDP endpoint. If - datagrams from any remote system are to be accepted, - this value is ''h (a zero-length octet-string). - Otherwise, it has the type described by - udpEndpointRemoteAddressType and is the address of the - remote system from which datagrams are to be accepted - (or to which all datagrams will be sent). - - As this object is used in the index for the - udpEndpointTable, implementors of this table should be - careful not to create entries that would result in OIDs - with more than 128 subidentifiers; else the information - cannot be accessed using SNMPv1, SNMPv2c, or SNMPv3." - ::= { udpEndpointEntry 5 } - -udpEndpointRemotePort OBJECT-TYPE - SYNTAX InetPortNumber - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The remote port number for this UDP endpoint. If - datagrams from any remote system are to be accepted, - this value is zero." - ::= { udpEndpointEntry 6 } - -udpEndpointInstance OBJECT-TYPE - SYNTAX Unsigned32 (1..'ffffffff'h) - MAX-ACCESS not-accessible - STATUS current - DESCRIPTION - "The instance of this tuple. This object is used to - distinguish among multiple processes 'connected' to - the same UDP endpoint. For example, on a system - implementing the BSD sockets interface, this would be - used to support the SO_REUSEADDR and SO_REUSEPORT - socket options." - - - - ::= { udpEndpointEntry 7 } - -udpEndpointProcess OBJECT-TYPE - SYNTAX Unsigned32 - MAX-ACCESS read-only - STATUS current - DESCRIPTION - "The system's process ID for the process associated with - this endpoint, or zero if there is no such process. - This value is expected to be the same as - HOST-RESOURCES-MIB::hrSWRunIndex or SYSAPPL-MIB:: - sysApplElmtRunIndex for some row in the appropriate - tables." - ::= { udpEndpointEntry 8 } - --- The deprecated UDP Listener table - --- The deprecated UDP listener table only contains information --- about this entity's IPv4 UDP end-points on which a local --- application is currently accepting datagrams. It does not --- provide more detailed connection information, or information --- about IPv6 endpoints. - -udpTable OBJECT-TYPE - SYNTAX SEQUENCE OF UdpEntry - MAX-ACCESS not-accessible - STATUS deprecated - DESCRIPTION - "A table containing IPv4-specific UDP listener - information. It contains information about all local - IPv4 UDP end-points on which an application is - currently accepting datagrams. This table has been - deprecated in favor of the version neutral - udpEndpointTable." - ::= { udp 5 } - -udpEntry OBJECT-TYPE - SYNTAX UdpEntry - MAX-ACCESS not-accessible - STATUS deprecated - DESCRIPTION - "Information about a particular current UDP listener." - INDEX { udpLocalAddress, udpLocalPort } - ::= { udpTable 1 } - -UdpEntry ::= SEQUENCE { - udpLocalAddress IpAddress, - udpLocalPort Integer32 - - - -} - -udpLocalAddress OBJECT-TYPE - SYNTAX IpAddress - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The local IP address for this UDP listener. In the - case of a UDP listener that is willing to accept - datagrams for any IP interface associated with the - node, the value 0.0.0.0 is used." - ::= { udpEntry 1 } - -udpLocalPort OBJECT-TYPE - SYNTAX Integer32 (0..65535) - MAX-ACCESS read-only - STATUS deprecated - DESCRIPTION - "The local port number for this UDP listener." - ::= { udpEntry 2 } - --- conformance information - -udpMIBConformance OBJECT IDENTIFIER ::= { udpMIB 2 } -udpMIBCompliances OBJECT IDENTIFIER ::= { udpMIBConformance 1 } -udpMIBGroups OBJECT IDENTIFIER ::= { udpMIBConformance 2 } - --- compliance statements - -udpMIBCompliance2 MODULE-COMPLIANCE - STATUS current - DESCRIPTION - "The compliance statement for systems that implement - UDP. - - There are a number of INDEX objects that cannot be - represented in the form of OBJECT clauses in SMIv2, but - for which we have the following compliance - requirements, expressed in OBJECT clause form in this - description clause: - - -- OBJECT udpEndpointLocalAddressType - -- SYNTAX InetAddressType { unknown(0), ipv4(1), - -- ipv6(2), ipv4z(3), - -- ipv6z(4) } - -- DESCRIPTION - -- Support for dns(5) is not required. - -- OBJECT udpEndpointLocalAddress - - - - -- SYNTAX InetAddress (SIZE(0|4|8|16|20)) - -- DESCRIPTION - -- Support is only required for zero-length - -- octet-strings, and for scoped and unscoped - -- IPv4 and IPv6 addresses. - -- OBJECT udpEndpointRemoteAddressType - -- SYNTAX InetAddressType { unknown(0), ipv4(1), - -- ipv6(2), ipv4z(3), - -- ipv6z(4) } - -- DESCRIPTION - -- Support for dns(5) is not required. - -- OBJECT udpEndpointRemoteAddress - -- SYNTAX InetAddress (SIZE(0|4|8|16|20)) - -- DESCRIPTION - -- Support is only required for zero-length - -- octet-strings, and for scoped and unscoped - -- IPv4 and IPv6 addresses. - " - MODULE -- this module - MANDATORY-GROUPS { udpBaseGroup, udpEndpointGroup } - GROUP udpHCGroup - DESCRIPTION - "This group is mandatory for systems that - are capable of receiving or transmitting more than - 1 million UDP datagrams per second. 1 million - datagrams per second will cause a Counter32 to - wrap in just over an hour." - ::= { udpMIBCompliances 2 } - -udpMIBCompliance MODULE-COMPLIANCE - STATUS deprecated - DESCRIPTION - "The compliance statement for IPv4-only systems that - implement UDP. For IP version independence, this - compliance statement is deprecated in favor of - udpMIBCompliance2. However, agents are still - encouraged to implement these objects in order to - interoperate with the deployed base of managers." - MODULE -- this module - MANDATORY-GROUPS { udpGroup } - ::= { udpMIBCompliances 1 } - --- units of conformance - -udpGroup OBJECT-GROUP - OBJECTS { udpInDatagrams, udpNoPorts, - udpInErrors, udpOutDatagrams, - udpLocalAddress, udpLocalPort } - - - - STATUS deprecated - DESCRIPTION - "The deprecated group of objects providing for - management of UDP over IPv4." - ::= { udpMIBGroups 1 } - -udpBaseGroup OBJECT-GROUP - OBJECTS { udpInDatagrams, udpNoPorts, udpInErrors, - udpOutDatagrams } - STATUS current - DESCRIPTION - "The group of objects providing for counters of UDP - statistics." - ::= { udpMIBGroups 2 } - -udpHCGroup OBJECT-GROUP - OBJECTS { udpHCInDatagrams, udpHCOutDatagrams } - STATUS current - DESCRIPTION - "The group of objects providing for counters of high - speed UDP implementations." - ::= { udpMIBGroups 3 } - -udpEndpointGroup OBJECT-GROUP - OBJECTS { udpEndpointProcess } - STATUS current - DESCRIPTION - "The group of objects providing for the IP version - independent management of UDP 'endpoints'." - ::= { udpMIBGroups 4 } - -END diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/DisplayHint.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/DisplayHint.cs deleted file mode 100644 index 831f1177..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/DisplayHint.cs +++ /dev/null @@ -1,84 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections; - -namespace Lextm.SharpSnmpLib.Mib -{ - public class DisplayHint - { - private enum NumType { - dec, - hex, - oct, - bin, - str - } - - private string _str; - private NumType _type; - private int _decimalPoints = 0; - - public DisplayHint(string str) - { - _str = str; - if (str.StartsWith("d")) - { - _type = NumType.dec; - if (str.StartsWith("d-")) - { - _decimalPoints = Convert.ToInt32(str.Substring(2)); - } - } - else if (str.StartsWith("o")) - { - _type = NumType.oct; - } - else if (str.StartsWith("h")) - { - _type = NumType.hex; - } - else if (str.StartsWith("b")) - { - _type = NumType.bin; - } - else - { - _type = NumType.str; - foreach (char c in str) - { - - } - } - - } - - public override string ToString() - { - return _str; - } - - internal object Decode(int i) - { - switch (_type) - { - case NumType.dec: - if (_decimalPoints == 0) - { - return i; - } - else - { - return i / Math.Pow(10.0, _decimalPoints); - } - case NumType.hex: - return System.Convert.ToString(i, 16); - case NumType.oct: - return System.Convert.ToString(i, 8); - case NumType.bin: - return System.Convert.ToString(i, 2); - default: - return null; - } - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/AgentCapabilities.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/AgentCapabilities.cs deleted file mode 100644 index 2f79cce5..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/AgentCapabilities.cs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Created by SharpDevelop. - * User: lextm - * Date: 2008/5/31 - * Time: 13:18 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ - -namespace Lextm.SharpSnmpLib.Mib.Elements.Entities -{ - /// - /// The AGENT-CAPABILITIES construct is used to specify implementation characteristics of an SNMP agent sub-system with respect to object types and events. - /// - public sealed class AgentCapabilities : EntityBase - { - /// - /// Creates an instance. - /// - /// - /// - /// - public AgentCapabilities(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) - : base(module, preAssignSymbols, symbols) - { - } - - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/EntityBase.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/EntityBase.cs deleted file mode 100644 index 6da9b18c..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/EntityBase.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; - -namespace Lextm.SharpSnmpLib.Mib.Elements.Entities -{ - public abstract class EntityBase: IEntity - { - private readonly IModule _module; - private string _parent; - private readonly uint _value; - private readonly string _name; - - public EntityBase(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) - { - _module = module; - _name = preAssignSymbols[0].ToString(); - - Lexer.ParseOidValue(symbols, out _parent, out _value); - } - - public IModule Module - { - get { return _module; } - } - - public string Parent - { - get { return _parent; } - set { _parent = value; } - } - - public uint Value - { - get { return _value; } - } - - public string Name - { - get { return _name; } - } - - public virtual string Description - { - get { return string.Empty; } - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/IEntity.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/IEntity.cs deleted file mode 100644 index 7360a472..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/IEntity.cs +++ /dev/null @@ -1,62 +0,0 @@ -// Entity interface. -// Copyright (C) 2008-2010 Malcolm Crowe, Lex Li, and other contributors. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -/* - * Created by SharpDevelop. - * User: lextm - * Date: 2008/5/19 - * Time: 20:10 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ - -using System; - -namespace Lextm.SharpSnmpLib.Mib.Elements.Entities -{ - /// - /// Basic interface for all elements building up the MIB tree, thus having an OID as value. - /// - public interface IEntity : IDeclaration - { - /// - /// Parent name. - /// - string Parent - { - get; - set; - } - - /// - /// Value. - /// - uint Value - { - get; - } - - /// - /// Gets the description. - /// - /// The description. - string Description - { - get; - } - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ModuleCompliance.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ModuleCompliance.cs deleted file mode 100644 index 008c3545..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ModuleCompliance.cs +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Created by SharpDevelop. - * User: lextm - * Date: 2008/5/21 - * Time: 19:35 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ - -namespace Lextm.SharpSnmpLib.Mib.Elements.Entities -{ - /// - /// Description of ModuleComplianceNode. - /// - public sealed class ModuleCompliance : EntityBase - { - public ModuleCompliance(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) - : base(module, preAssignSymbols, symbols) - { - } - - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ModuleIdentity.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ModuleIdentity.cs deleted file mode 100644 index 6de28ce6..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ModuleIdentity.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Lextm.SharpSnmpLib.Mib.Elements.Entities -{ - public sealed class ModuleIdentity : EntityBase - { - public ModuleIdentity(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) - : base(module, preAssignSymbols, symbols) - { - } - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/NotificationGroup.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/NotificationGroup.cs deleted file mode 100644 index 27d3e4ce..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/NotificationGroup.cs +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Created by SharpDevelop. - * User: lextm - * Date: 2008/5/21 - * Time: 19:34 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ - -namespace Lextm.SharpSnmpLib.Mib.Elements.Entities -{ - /// - /// Description of NotificationGroupNode. - /// - public sealed class NotificationGroup : EntityBase - { - public NotificationGroup(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) - : base(module, preAssignSymbols, symbols) - { - } - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/NotificationType.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/NotificationType.cs deleted file mode 100644 index 7386e217..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/NotificationType.cs +++ /dev/null @@ -1,11 +0,0 @@ - -namespace Lextm.SharpSnmpLib.Mib.Elements.Entities -{ - public sealed class NotificationType : EntityBase - { - public NotificationType(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) - : base(module, preAssignSymbols, symbols) - { - } - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ObjectGroup.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ObjectGroup.cs deleted file mode 100644 index d846cdbb..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ObjectGroup.cs +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Created by SharpDevelop. - * User: lextm - * Date: 2008/5/21 - * Time: 19:27 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ - -namespace Lextm.SharpSnmpLib.Mib.Elements.Entities -{ - /// - /// Description of ObjectGroupNode. - /// - public sealed class ObjectGroup : EntityBase - { - public ObjectGroup(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) - : base(module, preAssignSymbols, symbols) - { - } - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ObjectIdentity.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ObjectIdentity.cs deleted file mode 100644 index 9c1e0848..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ObjectIdentity.cs +++ /dev/null @@ -1,21 +0,0 @@ - -namespace Lextm.SharpSnmpLib.Mib.Elements.Entities -{ - /// - /// Object identifier node. - /// - public sealed class ObjectIdentity : EntityBase - { - - /// - /// Creates a . - /// - /// Module name - /// Header - /// Lexer - public ObjectIdentity(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) - : base(module, preAssignSymbols, symbols) - { - } - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ObjectType.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ObjectType.cs deleted file mode 100644 index 3a8b567a..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/ObjectType.cs +++ /dev/null @@ -1,336 +0,0 @@ -using System; -using System.Collections.Generic; -using Lextm.SharpSnmpLib.Mib.Elements.Types; - -namespace Lextm.SharpSnmpLib.Mib.Elements.Entities -{ - public sealed class ObjectType : EntityBase, ITypeReferrer - { - private ITypeAssignment _syntax; - private string _units; - private MaxAccess _access; - private Status _status; - private string _description; - private string _reference; - private IList _indices; - private string _augments; - private string _defVal; - - public ObjectType(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) - : base(module, preAssignSymbols, symbols) - { - ParseProperties(preAssignSymbols); - } - - private void ParseProperties(SymbolList header) - { - ISymbolEnumerator headerSymbols = header.GetSymbolEnumerator(); - Symbol temp = headerSymbols.NextNonEOLSymbol(); - - // Skip name - temp = headerSymbols.NextNonEOLSymbol(); - temp.Expect(Symbol.ObjectType); - - _syntax = ParseSyntax (Module, headerSymbols); - _units = ParseUnits (headerSymbols); - _access = ParseAccess (headerSymbols); - _status = ParseStatus (headerSymbols); - _description = ParseDescription (headerSymbols); - _reference = ParseReference (headerSymbols); - _indices = ParseIndices (headerSymbols); - _augments = ParseAugments (headerSymbols); - _defVal = ParseDefVal (headerSymbols); - } - - private static string ParseAugments(ISymbolEnumerator symbols) - { - Symbol current = symbols.NextNonEOLSymbol(); - - if (current == Symbol.Augments) - { - string augment = null; - - current = symbols.NextNonEOLSymbol(); - current.Expect(Symbol.OpenBracket); - - current = symbols.NextNonEOLSymbol(); - augment = current.ToString(); - - current = symbols.NextNonEOLSymbol(); - current.Expect(Symbol.CloseBracket); - - return augment; - } - else if (current != null) - { - symbols.PutBack(current); - } - - return null; - } - - private static string ParseDefVal(ISymbolEnumerator symbols) - { - Symbol current = symbols.NextNonEOLSymbol(); - - if (current == Symbol.DefVal) - { - current = symbols.NextNonEOLSymbol(); - current.Expect(Symbol.OpenBracket); - - string defVal = null; - current = symbols.NextNonEOLSymbol(); - - if (current == Symbol.OpenBracket) - { - int depth = 1; - // TODO: decode this. - while (depth > 0) - { - current = symbols.NextNonEOLSymbol(); - if (current == Symbol.OpenBracket) - { - depth++; - } - else if (current == Symbol.CloseBracket) - { - depth--; - } - } - } - else - { - defVal = current.ToString(); - current = symbols.NextNonEOLSymbol(); - current.Expect(Symbol.CloseBracket); - } - - return defVal; - } - else if (current != null) - { - symbols.PutBack(current); - } - - return null; - } - - private static IList ParseIndices(ISymbolEnumerator symbols) - { - Symbol current = symbols.NextNonEOLSymbol(); - - if (current == Symbol.Index) - { - current = symbols.NextNonEOLSymbol(); - current.Expect(Symbol.OpenBracket); - - List indices = new List(); - - while (current != Symbol.CloseBracket) - { - current = symbols.NextNonEOLSymbol(); - - bool lastIndex = false; - if (current == Symbol.Implied) - { - current = symbols.NextNonEOLSymbol(); - lastIndex = true; // 'IMPLIED' may only be used for last index - } - - current.Assert((current != Symbol.Comma) && (current != Symbol.CloseBracket), "Expected index name but found symbol!"); - indices.Add(current.ToString()); - - current = symbols.NextNonEOLSymbol(); - if (lastIndex) - { - current.Expect(Symbol.CloseBracket); - } - else - { - current.Expect(Symbol.Comma, Symbol.CloseBracket); - } - } - - return indices; - } - else if (current != null) - { - symbols.PutBack(current); - } - - return null; - } - - private static string ParseReference(ISymbolEnumerator symbols) - { - Symbol current = symbols.NextNonEOLSymbol(); - - if (current == Symbol.Reference) - { - return symbols.NextNonEOLSymbol().ToString(); - } - else if (current != null) - { - symbols.PutBack(current); - } - - return null; - } - - private static string ParseDescription(ISymbolEnumerator symbols) - { - Symbol current = symbols.NextNonEOLSymbol(); - - if (current == Symbol.Description) - { - return symbols.NextNonEOLSymbol().ToString().Trim(new char[] { '"' }); - } - else if (current != null) - { - symbols.PutBack(current); - } - - return null; - } - - private static Status ParseStatus(ISymbolEnumerator symbols) - { - Status status = Status.obsolete; - - Symbol current = symbols.NextNonEOLSymbol(); - current.Expect(Symbol.Status); - - current = symbols.NextNonEOLSymbol(); - try - { - status = (Status)Enum.Parse(typeof(Status), current.ToString()); - } - catch (ArgumentException) - { - current.Assert(false, "Invalid/Unknown status"); - } - - return status; - } - - private static MaxAccess ParseAccess(ISymbolEnumerator symbols) - { - MaxAccess access = MaxAccess.notAccessible; - - Symbol current = symbols.NextNonEOLSymbol(); - current.Expect(Symbol.MaxAccess, Symbol.Access); - - current = symbols.NextNonEOLSymbol(); - switch (current.ToString()) - { - case "not-accessible": - access = MaxAccess.notAccessible; - break; - case "accessible-for-notify": - access = MaxAccess.accessibleForNotify; - break; - case "read-only": - access = MaxAccess.readOnly; - break; - case "read-write": - access = MaxAccess.readWrite; - break; - case "read-create": - access = MaxAccess.readCreate; - break; - case "write-only": - access = MaxAccess.readWrite; - break; - default: - current.Assert(false, "Invalid/Unknown access"); - break; - } - - return access; - } - - private static string ParseUnits(ISymbolEnumerator symbols) - { - Symbol current = symbols.NextNonEOLSymbol(); - - if (current == Symbol.Units) - { - return symbols.NextNonEOLSymbol().ToString(); - } - else if (current != null) - { - symbols.PutBack(current); - } - - return null; - } - - private static ITypeAssignment ParseSyntax(IModule module, ISymbolEnumerator symbols) - { - Symbol current = symbols.NextNonEOLSymbol(); - current.Expect(Symbol.Syntax); - - return Lexer.ParseBasicTypeDef(module, String.Empty, symbols, isMacroSyntax: true); - } - - private static bool IsProperty(Symbol sym) - { - string s = sym.ToString(); - return s == "SYNTAX" || s == "MAX-ACCESS" || s == "STATUS" || s == "DESCRIPTION"; - } - - public ITypeAssignment Syntax - { - get { return _syntax; } - internal set { _syntax = value; } - } - - public override string Description - { - get { return _description; } - } - - public MaxAccess Access - { - get { return _access; } - } - - public IList Indices - { - get { return _indices; } - } - - public string Augments - { - get { return _augments; } - } - - #region ITypeReferrer Member - - public ITypeAssignment ReferredType - { - get { return _syntax; } - set { _syntax = value; } - } - - public ITypeAssignment BaseType - { - get - { - ITypeReferrer tr = this; - ITypeAssignment result = null; - - while ((tr != null) && (tr.ReferredType != null)) - { - result = tr.ReferredType; - tr = tr.ReferredType as ITypeReferrer; - } - - return result; - } - } - - #endregion - - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/OidValueAssignment.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/OidValueAssignment.cs deleted file mode 100644 index 3c659407..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Entities/OidValueAssignment.cs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Created by SharpDevelop. - * User: lextm - * Date: 2008/5/17 - * Time: 20:49 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ - -using System; - -namespace Lextm.SharpSnmpLib.Mib.Elements.Entities -{ - /// - /// Object identifier node. - /// - public sealed class OidValueAssignment : EntityBase - { - /// - /// Creates a . - /// - /// Module - /// Name - /// Lexer - public OidValueAssignment(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) - : base(module, preAssignSymbols, symbols) - { - } - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Exports.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Exports.cs deleted file mode 100644 index c1e66e32..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Exports.cs +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Created by SharpDevelop. - * User: lextm - * Date: 2008/6/7 - * Time: 17:34 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ - -using System.Collections.Generic; - -namespace Lextm.SharpSnmpLib.Mib.Elements -{ - /// - /// Description of Exports. - /// - public sealed class Exports: IElement - { - private IModule _module; - private readonly IList _types = new List(); - - public Exports(IModule module, ISymbolEnumerator s) - { - _module = module; - - Symbol previous = null; - Symbol current; - do - { - current = s.NextSymbol(); - - if (current == Symbol.EOL) - { - continue; - } - else if (((current == Symbol.Comma) || (current == Symbol.Semicolon)) && (previous != null)) - { - previous.AssertIsValidIdentifier(); - _types.Add(previous.ToString()); - } - - previous = current; - } - while (current != Symbol.Semicolon); - } - - #region IElement Member - - public IModule Module - { - get { return _module; } - } - - #endregion - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/IDeclaration.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/IDeclaration.cs deleted file mode 100644 index 0958ac61..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/IDeclaration.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Lextm.SharpSnmpLib.Mib.Elements -{ - public interface IDeclaration: IElement - { - /// - /// Name. - /// - string Name - { - get; - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/IElement.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/IElement.cs deleted file mode 100644 index e2db7fd3..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/IElement.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Construct interface. -// Copyright (C) 2008-2010 Malcolm Crowe, Lex Li, and other contributors. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -namespace Lextm.SharpSnmpLib.Mib.Elements -{ - /// - /// Construct interface. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1040:AvoidEmptyInterfaces")] - public interface IElement - { - /// - /// Containing module. - /// - IModule Module - { - get; - } - - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/ITypeReferrer.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/ITypeReferrer.cs deleted file mode 100644 index f0f57056..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/ITypeReferrer.cs +++ /dev/null @@ -1,10 +0,0 @@ -using Lextm.SharpSnmpLib.Mib.Elements.Types; - -namespace Lextm.SharpSnmpLib.Mib.Elements -{ - public interface ITypeReferrer - { - ITypeAssignment ReferredType { get; set; } - ITypeAssignment BaseType { get; } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Imports.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Imports.cs deleted file mode 100644 index 3a4ec6ec..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Imports.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Created by SharpDevelop. - * User: lextm - * Date: 2008/5/31 - * Time: 12:07 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ - -using System.Collections.Generic; - -namespace Lextm.SharpSnmpLib.Mib.Elements -{ - /// - /// The IMPORTS construct is used to specify items used in the current MIB module which are defined in another MIB module or ASN.1 module. - /// - public sealed class Imports : List, IElement - { - private IModule _module; - - /// - /// Creates an instance. - /// - /// - public Imports(IModule module, ISymbolEnumerator symbols) - { - _module = module; - - Symbol current; - while ((current = symbols.NextSymbol()) != Symbol.Semicolon) - { - if (current == Symbol.EOL) - { - continue; - } - - ImportsFrom imports = new ImportsFrom(current, symbols); - - this.Add(imports); - } - } - - public IList Dependents - { - get - { - List result = new List(); - - foreach (ImportsFrom import in this) - { - result.Add(import.Module); - } - - return result; - } - } - - public ImportsFrom GetImportFromType(string type) - { - foreach (ImportsFrom import in this) - { - if (import.Types.Contains(type)) - { - return import; - } - } - - return null; - } - - #region IElement Member - - public IModule Module - { - get { return _module; } - } - - #endregion - - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/ImportsFrom.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/ImportsFrom.cs deleted file mode 100644 index cd5154bd..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/ImportsFrom.cs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Created by SharpDevelop. - * User: lextm - * Date: 2008/5/31 - * Time: 12:07 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ - -using System.Collections.Generic; - -namespace Lextm.SharpSnmpLib.Mib.Elements -{ - public sealed class ImportsFrom - { - private readonly string _module; - private readonly List _types = new List(); - - public ImportsFrom(Symbol last, ISymbolEnumerator symbols) - { - Symbol previous = last; - Symbol current; - while ((current = symbols.NextSymbol()) != Symbol.From) - { - if (current == Symbol.EOL) - { - continue; - } - - if (current == Symbol.Comma) - { - previous.AssertIsValidIdentifier(); - _types.Add(previous.ToString()); - } - - previous = current; - } - - previous.AssertIsValidIdentifier(); - _types.Add(previous.ToString()); - - _module = symbols.NextSymbol().ToString().ToUpperInvariant(); // module names are uppercase - } - - public string Module - { - get { return _module; } - } - - public IList Types - { - get { return _types; } - } - - public override string ToString() - { - return string.Join(", ", _types.ToArray()) + " FROM " + _module; - } - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/TrapType.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/TrapType.cs deleted file mode 100644 index 9c5ca457..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/TrapType.cs +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Created by SharpDevelop. - * User: lextm - * Date: 2008/5/31 - * Time: 12:20 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ - -namespace Lextm.SharpSnmpLib.Mib.Elements -{ - public sealed class TrapType : IDeclaration - { - private readonly IModule _module; - private readonly string _name; - private readonly int _value; - - public TrapType(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) - { - _module = module; - _name = preAssignSymbols[0].ToString(); - - Symbol valueSymbol = symbols.NextNonEOLSymbol(); - - bool succeeded = int.TryParse(valueSymbol.ToString(), out _value); - valueSymbol.Assert(succeeded, "not a decimal"); - } - - public int Value - { - get { return _value; } - } - - #region IDeclaration Member - - public IModule Module - { - get { return _module; } - } - - public string Name - { - get { return _name; } - } - - #endregion - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/BaseType.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/BaseType.cs deleted file mode 100644 index a4412812..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/BaseType.cs +++ /dev/null @@ -1,54 +0,0 @@ - -namespace Lextm.SharpSnmpLib.Mib.Elements.Types -{ - public abstract class BaseType : ITypeAssignment - { - private IModule _module; - private string _name; - - protected BaseType(IModule module, string name) - { - _module = module; - _name = name; - } - - public virtual IModule Module - { - // differentiate between: - // FddiTimeNano ::= INTEGER (0..2147483647) - // which is an IntegerType which appears under Types in a MibModule and therefore has a name and module - // and - // SYNTAX INTEGER (0..2147483647) - // which is also an IntegerType but not defined as a separate type and therefore has NO name and NO module - get - { - if (!string.IsNullOrEmpty(_name)) - { - return _module; - } - else - { - return null; - } - } - protected set { _module = value; } - } - - public virtual string Name - { - get - { - if (!string.IsNullOrEmpty(_name)) - { - return _name; - } - else - { - return "{ Implicit Base Type }"; - } - } - protected set { _name = value; } - } - - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/BitsType.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/BitsType.cs deleted file mode 100644 index a64c8dbe..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/BitsType.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Lextm.SharpSnmpLib.Mib.Elements.Types -{ - public class BitsType : BaseType - { - private ValueMap _map; - - public BitsType(IModule module, string name, ISymbolEnumerator symbols) - : base(module, name) - { - _map = Lexer.DecodeEnumerations(symbols); - } - - public ValueMap Map - { - get { return _map; } - } - - public string this[int value] - { - get { return _map[value]; } - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/Choice.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/Choice.cs deleted file mode 100644 index c66d1f3f..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/Choice.cs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Created by SharpDevelop. - * User: lextm - * Date: 2008/5/31 - * Time: 11:39 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ - -namespace Lextm.SharpSnmpLib.Mib.Elements.Types -{ - /// - /// The CHOICE type represents a list of alternatives.. - /// - public sealed class Choice : BaseType - { - /// - /// Creates a instance. - /// - /// - /// - /// - public Choice(IModule module, string name, ISymbolEnumerator symbols) - : base(module, name) - { - while (symbols.NextNonEOLSymbol() != Symbol.OpenBracket) - { - } - - while (symbols.NextNonEOLSymbol() != Symbol.CloseBracket) - { - } - } - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/ITypeAssignment.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/ITypeAssignment.cs deleted file mode 100644 index e962f9df..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/ITypeAssignment.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Lextm.SharpSnmpLib.Mib.Elements.Types -{ - public interface ITypeAssignment : IDeclaration - { - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/IntegerType.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/IntegerType.cs deleted file mode 100644 index 4841ad51..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/IntegerType.cs +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Created by SharpDevelop. - * User: lextm - * Date: 2008/7/25 - * Time: 20:41 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ - -using System; -using System.Collections.Generic; - -namespace Lextm.SharpSnmpLib.Mib.Elements.Types -{ - /// - /// The INTEGER type represents a list of alternatives, or a range of numbers.. - /// Includes Integer32 as it's indistinguishable from INTEGER. - /// - /** - * As this type is used for Integer32 as well as INTEGER it incorrectly - * allows enumeration sub-typing of Integer32. This is ok as currently we - * do not care about detecting incorrect MIBs and this doesn't block the - * decoding of correct MIBs. - */ - public sealed class IntegerType : BaseType - { - public enum Types - { - Integer, - Integer32 - } - - private Types _type; - private bool _isEnumeration; - private ValueMap _map; - private ValueRanges _ranges; - - /// - /// Creates an instance. - /// - /// - /// - /// - public IntegerType(IModule module, string name, Symbol type, ISymbolEnumerator symbols) - : base (module, name) - { - Types? t = GetExactType(type); - type.Assert(t.HasValue, "Unknown symbol for unsigned type!"); - _type = t.Value; - - _isEnumeration = false; - - Symbol current = symbols.NextNonEOLSymbol(); - if (current == Symbol.OpenBracket) - { - _isEnumeration = true; - symbols.PutBack(current); - _map = Lexer.DecodeEnumerations(symbols); - } - else if (current == Symbol.OpenParentheses) - { - symbols.PutBack(current); - _ranges = Lexer.DecodeRanges(symbols); - current.Assert(!_ranges.IsSizeDeclaration, "SIZE keyword is not allowed for ranges of integer types!"); - } - else - { - symbols.PutBack(current); - } - } - - public Types Type - { - get { return _type; } - } - - public ValueRanges Ranges - { - get { return _ranges; } - } - - public bool IsEnumeration - { - get - { - return _isEnumeration; - } - } - - public ValueMap Enumeration - { - get { return _isEnumeration ? _map : null; } - } - - internal static Types? GetExactType(Symbol symbol) - { - if (symbol == Symbol.Integer) - { - // represents the ASN.1 builtin INTEGER type: - // may be represent any arbitrary (signed/unsigned) integer (in theory may have any size) - return Types.Integer; - } - else if (symbol == Symbol.Integer32) - { - // Integer32 ::= INTEGER (-2147483648..2147483647) // from SNMPv2-SMI - return Types.Integer32; - } - - return null; - } - - internal static bool IsIntegerType(Symbol symbol) - { - return GetExactType(symbol).HasValue; - } - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/IpAddressType.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/IpAddressType.cs deleted file mode 100644 index 84d78d66..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/IpAddressType.cs +++ /dev/null @@ -1,21 +0,0 @@ - -namespace Lextm.SharpSnmpLib.Mib.Elements.Types -{ - public class IpAddressType : OctetStringType - { - public IpAddressType(IModule module, string name, ISymbolEnumerator symbols) - : base(module, name, symbols) - { - if (this.Size.Count != 0) - { - throw new MibException("Size definition not allowed for IpAddress type!"); - } - - // IpAddress type is defined as: - // IpAddress ::= - // [APPLICATION 0] - // IMPLICIT OCTET STRING (SIZE (4)) - this.Size.Add(new ValueRange(4, null)); - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/Macro.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/Macro.cs deleted file mode 100644 index 9f911ac9..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/Macro.cs +++ /dev/null @@ -1,34 +0,0 @@ - -namespace Lextm.SharpSnmpLib.Mib.Elements.Types -{ - public sealed class Macro : ITypeAssignment - { - private IModule _module; - private string _name; - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1804:RemoveUnusedLocals", MessageId = "temp")] - public Macro(IModule module, SymbolList preAssignSymbols, ISymbolEnumerator symbols) - { - _module = module; - _name = preAssignSymbols[0].ToString(); - - while (symbols.NextNonEOLSymbol() != Symbol.Begin) - { - } - - while (symbols.NextNonEOLSymbol() != Symbol.End) - { - } - } - - public IModule Module - { - get { return _module; } - } - - public string Name - { - get { return _name; } - } - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/ObjectIdentifierType.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/ObjectIdentifierType.cs deleted file mode 100644 index cacd415a..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/ObjectIdentifierType.cs +++ /dev/null @@ -1,11 +0,0 @@ - -namespace Lextm.SharpSnmpLib.Mib.Elements.Types -{ - public class ObjectIdentifierType : BaseType - { - public ObjectIdentifierType(IModule module, string name, ISymbolEnumerator symbols) - : base(module, name) - { - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/OctetStringType.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/OctetStringType.cs deleted file mode 100644 index f6453ce8..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/OctetStringType.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Collections.Generic; - -namespace Lextm.SharpSnmpLib.Mib.Elements.Types -{ - public class OctetStringType : BaseType - { - private ValueRanges _size; - - public OctetStringType(IModule module, string name, ISymbolEnumerator symbols) - : base(module, name) - { - Symbol current = symbols.NextNonEOLSymbol(); - if (current == Symbol.OpenParentheses) - { - symbols.PutBack(current); - _size = Lexer.DecodeRanges(symbols); - current.Assert(_size.IsSizeDeclaration, "SIZE keyword is required for ranges of octet string!"); - } - else - { - symbols.PutBack(current); - _size = new ValueRanges(isSizeDecl: true); - } - } - - public ValueRanges Size - { - get { return _size; } - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/OpaqueType.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/OpaqueType.cs deleted file mode 100644 index 5a7eda33..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/OpaqueType.cs +++ /dev/null @@ -1,11 +0,0 @@ - -namespace Lextm.SharpSnmpLib.Mib.Elements.Types -{ - public class OpaqueType : OctetStringType - { - public OpaqueType(IModule module, string name, ISymbolEnumerator symbols) - : base(module, name, symbols) - { - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/Sequence.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/Sequence.cs deleted file mode 100644 index 0162de30..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/Sequence.cs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Created by SharpDevelop. - * User: lextm - * Date: 2008/5/21 - * Time: 19:43 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ - - -namespace Lextm.SharpSnmpLib.Mib.Elements.Types -{ - /// - /// The SEQUENCE type represents a set of specified types. This is roughtly analogous to a struct in C. - /// - public sealed class Sequence : BaseType - { - /// - /// Creates a instance. - /// - /// The module. - /// The name. - /// The enumerator. - public Sequence(IModule module, string name, ISymbolEnumerator symbols) - : base(module, name) - { - // parse between ( ) - Symbol temp = symbols.NextNonEOLSymbol(); - int bracketSection = 0; - temp.Expect(Symbol.OpenBracket); - bracketSection++; - while (bracketSection > 0) - { - temp = symbols.NextNonEOLSymbol(); - if (temp == Symbol.OpenBracket) - { - bracketSection++; - } - else if (temp == Symbol.CloseBracket) - { - bracketSection--; - } - } - } - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/SequenceOf.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/SequenceOf.cs deleted file mode 100644 index 4160ca40..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/SequenceOf.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Collections.Generic; - -namespace Lextm.SharpSnmpLib.Mib.Elements.Types -{ - /// - /// The SEQUENCE OF type represents a list of data sets.. - /// - public sealed class SequenceOf : BaseType - { - private string _type; - - public SequenceOf(IModule module, string name, ISymbolEnumerator sym) - : base(module, name) - { - _type = sym.NextNonEOLSymbol().ToString(); - } - - public string Type - { - get { return _type; } - } - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/TextualConvention.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/TextualConvention.cs deleted file mode 100644 index ab477315..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/TextualConvention.cs +++ /dev/null @@ -1,238 +0,0 @@ -using System; - -namespace Lextm.SharpSnmpLib.Mib.Elements.Types -{ - public sealed class TextualConvention : ITypeAssignment, ITypeReferrer - { - private IModule _module; - private string _name; - private DisplayHint _displayHint; - private Status _status; - private string _description; - private string _reference; - private ITypeAssignment _syntax; - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "module")] - public TextualConvention(IModule module, string name, ISymbolEnumerator symbols) - { - _module = module; - _name = name; - - _displayHint = ParseDisplayHint(symbols); - _status = ParseStatus(symbols); - _description = ParseDescription(symbols); - _reference = ParseReference(symbols); - _syntax = ParseSyntax(module, symbols); - } - - private static DisplayHint ParseDisplayHint(ISymbolEnumerator symbols) - { - Symbol current = symbols.NextNonEOLSymbol(); - - if (current == Symbol.DisplayHint) - { - return new DisplayHint(symbols.NextNonEOLSymbol().ToString().Trim(new char[] { '"' })); - } - - symbols.PutBack(current); - return null; - } - - private static Status ParseStatus(ISymbolEnumerator symbols) - { - Symbol current = symbols.NextNonEOLSymbol(); - current.Expect(Symbol.Status); - - try - { - return (Status)Enum.Parse(typeof(Status), symbols.NextNonEOLSymbol().ToString()); - } - catch (ArgumentException) - { - current.Assert(false, "Invalid/Unknown status"); - } - - return Status.current; - } - - private static string ParseDescription(ISymbolEnumerator symbols) - { - Symbol current = symbols.NextNonEOLSymbol(); - current.Expect(Symbol.Description); - - return symbols.NextNonEOLSymbol().ToString().Trim(new char[] { '"' }); - } - - private static string ParseReference(ISymbolEnumerator symbols) - { - Symbol current = symbols.NextNonEOLSymbol(); - - if (current == Symbol.Reference) - { - string reference = symbols.NextNonEOLSymbol().ToString(); - if ((reference.Length >= 2) && reference.StartsWith("\"") && reference.EndsWith("\"")) - { - return reference.Substring(1, reference.Length-2); - } - - return reference; - } - - symbols.PutBack(current); - return null; - } - - private static ITypeAssignment ParseSyntax(IModule module, ISymbolEnumerator symbols) - { - Symbol current = symbols.NextNonEOLSymbol(); - current.Expect(Symbol.Syntax); - - /* - * RFC2579 definition: - * Syntax ::= -- Must be one of the following: - * -- a base type (or its refinement), or - * -- a BITS pseudo-type - * type - * | "BITS" "{" NamedBits "}" - * - * From section 3.5: - * The data structure must be one of the alternatives defined - * in the ObjectSyntax CHOICE or the BITS construct. Note - * that this means that the SYNTAX clause of a Textual - * Convention can not refer to a previously defined Textual - * Convention. - * - * The SYNTAX clause of a TEXTUAL CONVENTION macro may be - * sub-typed in the same way as the SYNTAX clause of an - * OBJECT-TYPE macro. - * - * Therefore the possible values are (grouped by underlying type): - * INTEGER, Integer32 - * OCTET STRING, Opaque - * OBJECT IDENTIFIER - * IpAddress - * Counter64 - * Unsigned32, Counter32, Gauge32, TimeTicks - * BITS - * With appropriate sub-typing. - */ - - return Lexer.ParseBasicTypeDef(module, String.Empty, symbols, isMacroSyntax: true); - } - - public IModule Module - { - get { return _module; } - } - - public string Name - { - get { return _name; } - } - - public string DisplayHint - { - get { return _displayHint == null ? null : _displayHint.ToString(); } - } - - public Status Status - { - get { return _status; } - } - - public string Description - { - get { return _description; } - } - - public string Reference - { - get { return _reference; } - } - - public ITypeAssignment Syntax - { - get { return _syntax; } - } - - //internal object Decode(Variable v) - //{ - // if (_syntax is IntegerType) - // { - // Integer32 i = v.Data as Integer32; - // if (i == null || (_syntax as IntegerType).IsEnumeration) - // { - // return null; - // } - // else if (_displayHint != null) - // { - // return _displayHint.Decode(i.ToInt32()); - // } - // else - // { - // return i.ToInt32(); - // } - // } - // else if (_syntax is UnsignedType) - // { - // Integer32 i = v.Data as Integer32; - // if (i == null) - // { - // return null; - // } - // else if (_displayHint != null) - // { - // return _displayHint.Decode(i.ToInt32()); - // } - // else - // { - // return i.ToInt32(); - // } - // } - // else if (_syntax is OctetStringType) - // { - // OctetString o = v.Data as OctetString; - // if (o == null) - // { - // return null; - // } - // else - // { - // // TODO: Follow the format specifier for octet strings. - // return null; - // } - // } - // else - // { - // return null; - // } - //} - - #region ITypeReferrer Member - - public ITypeAssignment ReferredType - { - get { return _syntax; } - set { _syntax = value; } - } - - public ITypeAssignment BaseType - { - get - { - ITypeReferrer tr = this; - ITypeAssignment result = this; - - while ((tr != null) && (tr.ReferredType != null)) - { - result = tr.ReferredType; - tr = tr.ReferredType as ITypeReferrer; - } - - return result; - } - } - - #endregion - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/TypeAssignment.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/TypeAssignment.cs deleted file mode 100644 index b074ef62..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/TypeAssignment.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Created by SharpDevelop. - * User: lextm - * Date: 2008/5/18 - * Time: 13:24 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ -using System; -using System.Collections.Generic; - -namespace Lextm.SharpSnmpLib.Mib.Elements.Types -{ - /* Please be aware of the following possible constructs: - * - * isnsRegEntityIndex OBJECT-TYPE - * SYNTAX IsnsEntityIndexIdOrZero - * ( 1 .. 4294967295 ) - * MAX-ACCESS not-accessible - * - * - */ - - /// - /// - public sealed class TypeAssignment : ITypeAssignment - { - private IModule _module; - private string _name; - private string _type; - private ValueRanges _ranges; - private ValueMap _map; - - /// - /// Creates an . - /// - /// The module. - /// The name. - /// The type. - /// The symbols. - /// if set to true indicates that the syntax clause of a macro is parsed (e.g. OBJECT-TYPE, TEXTUAL-CONVENTION). - public TypeAssignment(IModule module, string name, Symbol type, ISymbolEnumerator symbols, bool isMacroSyntax) - { - _module = module; - _name = name; - - SymbolList typeSymbols = new SymbolList(); - typeSymbols.Add(type); - - Symbol current = symbols.NextSymbol(); - while (current != Symbol.EOL) - { - if (current == Symbol.OpenParentheses) - { - // parse range of unknown type - symbols.PutBack(current); - _ranges = Lexer.DecodeRanges(symbols); - break; - } - else if (current == Symbol.OpenBracket) - { - symbols.PutBack(current); - _map = Lexer.DecodeEnumerations(symbols); - break; - } - - typeSymbols.Add(current); - current = symbols.NextSymbol(); - } - - _type = typeSymbols.Join(" "); - - if ((_ranges == null) && (_map == null)) - { - current = symbols.NextNonEOLSymbol(); - if (current == Symbol.OpenParentheses) - { - // parse range of unknown type - symbols.PutBack(current); - _ranges = Lexer.DecodeRanges(symbols); - } - else if (current == Symbol.OpenBracket) - { - symbols.PutBack(current); - _map = Lexer.DecodeEnumerations(symbols); - } - else if (current != null) - { - symbols.PutBack(current); - } - } - - if (isMacroSyntax) - { - // inside a macro the syntax is limited to one line, except there are brackets used for ranges/enums - return; - } - - // outside macro Syntax clause we wait for two consecutive linebreaks with a following valid identifier as end condition - Symbol previous = current; - Symbol veryPrevious = null; - - while ((current = symbols.NextSymbol()) != null) - { - if ((veryPrevious == Symbol.EOL) && (previous == Symbol.EOL) && current.IsValidIdentifier()) - { - symbols.PutBack(current); - return; - } - - veryPrevious = previous; - previous = current; - } - - previous.Assert(false, "end of file reached"); - } - - public string Type - { - get { return _type; } - } - - public ValueRanges Ranges - { - get { return _ranges; } - } - - public IDictionary Map - { - get { return _map; } - } - - #region ITypeAssignment Member - - public IModule Module - { - get { return _module; } - } - - public string Name - { - get { return _name; } - } - - #endregion - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/UnsignedType.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/UnsignedType.cs deleted file mode 100644 index 4866fc90..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Elements/Types/UnsignedType.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System.Collections.Generic; - -namespace Lextm.SharpSnmpLib.Mib.Elements.Types -{ - /** - * As this type is used for Counter32 and TimeTicks as well as Unsigned32 - * and Gauge32 it incorrectly allows range restrictions of Counter32 and - * TimeTicks. This is ok as currently we do not care about detecting - * incorrect MIBs and this doesn't block the decoding of correct MIBs. - */ - public class UnsignedType : BaseType - { - public enum Types - { - Unsigned32, - Gauge32, - Counter32, - TimeTicks, - Counter64, - } - - private Types _type; - private ValueRanges _ranges; - - public UnsignedType(IModule module, string name, Symbol type, ISymbolEnumerator symbols) - : base(module, name) - { - Types? t = GetExactType(type); - type.Assert(t.HasValue, "Unknown symbol for unsigned type!"); - _type = t.Value; - - Symbol current = symbols.NextNonEOLSymbol(); - if (current == Symbol.OpenParentheses) - { - current.Assert((_type != Types.Counter64), "Ranges are not supported for Counter64 type!"); // our internal struct can only hold int64 values - - symbols.PutBack(current); - _ranges = Lexer.DecodeRanges(symbols); - current.Assert(!_ranges.IsSizeDeclaration, "SIZE keyword is not allowed for ranges of unsigned types!"); - } - else - { - symbols.PutBack(current); - } - } - - public Types Type - { - get { return _type; } - } - - public ValueRanges Ranges - { - get { return _ranges; } - } - - internal static Types? GetExactType(Symbol symbol) - { - if (symbol == Symbol.Unsigned32) - { - // [APPLICATION 2] IMPLICIT INTEGER (0..4294967295) // from SNMPv2-SMI - return Types.Unsigned32; - } - else if (symbol == Symbol.Gauge32) - { - // [APPLICATION 2] IMPLICIT INTEGER (0..4294967295) // from SNMPv2-SMI - return Types.Gauge32; - } - else if (symbol == Symbol.Counter32) - { - // [APPLICATION 1] IMPLICIT INTEGER (0..4294967295) // from SNMPv2-SMI - return Types.Counter32; - } - else if (symbol == Symbol.TimeTicks) - { - // [APPLICATION 3] IMPLICIT INTEGER (0..4294967295) // from SNMPv2-SMI + RFC1155-SMI - return Types.TimeTicks; - } - else if (symbol == Symbol.Gauge) - { - // [APPLICATION 2] IMPLICIT INTEGER (0..4294967295) // from RFC1155-SMI - return Types.Gauge32; - } - else if (symbol == Symbol.Counter) - { - // [APPLICATION 1] IMPLICIT INTEGER (0..4294967295) // from RFC1155-SMI - return Types.Counter32; - } - else if (symbol == Symbol.Counter64) - { - // [APPLICATION 6] IMPLICIT INTEGER (0..18446744073709551615) // from SNMPv2-SMI - return Types.Counter64; - } - - return null; - } - - internal static bool IsUnsignedType(Symbol symbol) - { - return GetExactType(symbol).HasValue; - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/IModule.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/IModule.cs deleted file mode 100644 index d41ab129..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/IModule.cs +++ /dev/null @@ -1,81 +0,0 @@ -// Module interface. -// Copyright (C) 2008-2010 Malcolm Crowe, Lex Li, and other contributors. -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -/* - * Created by SharpDevelop. - * User: lextm - * Date: 5/1/2009 - * Time: 10:40 AM - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ -using System.Collections.Generic; -using Lextm.SharpSnmpLib.Mib.Elements.Entities; -using Lextm.SharpSnmpLib.Mib.Elements.Types; -using Lextm.SharpSnmpLib.Mib.Elements; - -namespace Lextm.SharpSnmpLib.Mib -{ - /// - /// MIB Module interface. - /// - public interface IModule - { - /// - /// Module name. - /// - string Name - { - get; - } - - Exports Exports - { - get; - } - - Imports Imports - { - get; - } - - /// - /// Entities + Types + all other elements implementing IDeclaration - /// - IList Declarations - { - get; - } - - /// - /// Entities. - /// - IList Entities - { - get; - } - - /// - /// Known types. - /// - IList Types - { - get; - } - - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/ISymbolEnumerator.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/ISymbolEnumerator.cs deleted file mode 100644 index e9dd5920..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/ISymbolEnumerator.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Collections.Generic; - -namespace Lextm.SharpSnmpLib.Mib -{ - public interface ISymbolEnumerator: IEnumerator - { - bool PutBack(Symbol item); - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Lexer.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Lexer.cs deleted file mode 100644 index d54b9b93..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Lexer.cs +++ /dev/null @@ -1,581 +0,0 @@ -/* - * Created by SharpDevelop. - * User: lextm - * Date: 2008/5/17 - * Time: 16:50 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ - -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using Lextm.SharpSnmpLib.Mib.Elements.Types; - -namespace Lextm.SharpSnmpLib.Mib -{ - /// - /// Lexer class that parses MIB files into symbol list. - /// - public sealed class Lexer - { - private readonly SymbolList _symbols = new SymbolList(); - - public Lexer(string file) - : this(file, new StreamReader(file)) - { - } - - public Lexer(string file, TextReader stream) - { - this.Parse(file, stream); - } - - - public ISymbolEnumerator GetEnumerator() - { - return _symbols.GetSymbolEnumerator(); - } - - - #region Parsing of MIB File - - private class ParseParams - { - public string File; - public StringBuilder Temp = new StringBuilder(); - public bool StringSection = false; - public bool AssignSection = false; - public bool AssignAhead = false; - public bool DotSection = false; - - } - - /// - /// Parses MIB file to symbol list. - /// - /// File - /// File stream - private void Parse(string file, TextReader stream) - { - if (stream == null) - { - throw new ArgumentNullException("stream"); - } - - ParseParams pp = new ParseParams(); - pp.File = file; - - string line; - int row = 0; - while ((line = stream.ReadLine()) != null) - { - if (!pp.StringSection && line.TrimStart().StartsWith("--", StringComparison.Ordinal)) - { - row++; - continue; // commented line - } - - ParseLine(pp, line, row); - row++; - } - } - - private void ParseLine(ParseParams pp, string line, int row) - { - line = line + "\n"; - int count = line.Length; - for (int i = 0; i < count; i++) - { - char current = line[i]; - bool moveNext = Parse(pp, current, row, i); - if (moveNext) - { - break; - } - } - } - - private bool Parse(ParseParams pp, char current, int row, int column) - { - switch (current) - { - case '\n': - case '{': - case '}': - case '(': - case ')': - case '[': - case ']': - case ';': - case ',': - case '|': - if (!pp.StringSection) - { - bool moveNext = ParseLastSymbol(pp, row, column); - if (moveNext) - { - _symbols.Add(CreateSpecialSymbol(pp.File, '\n', row, column)); - return true; - } - - _symbols.Add(CreateSpecialSymbol(pp.File, current, row, column)); - return false; - } - - break; - case '"': - pp.StringSection = !pp.StringSection; - break; - case '\r': - return false; - default: - if ((int)current == 0x1A) - { - // IMPORTANT: ignore invisible characters such as SUB. - return false; - } - - if (Char.IsWhiteSpace(current) && !pp.AssignSection && !pp.StringSection) - { - bool moveNext = ParseLastSymbol(pp, row, column); - if (moveNext) - { - _symbols.Add(CreateSpecialSymbol(pp.File, '\n', row, column)); - return true; - } - - return false; - } - - if (pp.AssignAhead) - { - pp.AssignAhead = false; - ParseLastSymbol(pp, row, column); - break; - } - - if (pp.DotSection && current != '.') - { - ParseLastSymbol(pp, row, column); - pp.DotSection = false; - } - - if (current == '.' && !pp.StringSection) - { - if (!pp.DotSection) - { - ParseLastSymbol(pp, row, column); - pp.DotSection = true; - } - } - - if (current == ':' && !pp.StringSection) - { - if (!pp.AssignSection) - { - ParseLastSymbol(pp, row, column); - } - - pp.AssignSection = true; - } - - if (current == '=' && !pp.StringSection) - { - pp.AssignSection = false; - pp.AssignAhead = true; - } - - break; - } - - pp.Temp.Append(current); - return false; - } - - private bool ParseLastSymbol(ParseParams pp, int row, int column) - { - if (pp.Temp.Length > 0) - { - Symbol s = new Symbol(pp.File, pp.Temp.ToString(), row, column); - - pp.Temp.Length = 0; - - if (s.ToString().StartsWith(Symbol.Comment.ToString())) - { - // ignore the rest symbols on this line because they are in comment. - return true; - } - - _symbols.Add(s); - } - - return false; - } - - private static Symbol CreateSpecialSymbol(string file, char value, int row, int column) - { - string str; - switch (value) - { - case '\n': - str = Environment.NewLine; - break; - case '{': - str = "{"; - break; - case '}': - str = "}"; - break; - case '(': - str = "("; - break; - case ')': - str = ")"; - break; - case '[': - str = "["; - break; - case ']': - str = "]"; - break; - case ';': - str = ";"; - break; - case ',': - str = ","; - break; - case '|': - str = "|"; - break; - default: - throw new ArgumentException("value is not a special character"); - } - - return new Symbol(file, str, row, column); - } - - #endregion - - #region Static Parse Helper - - public static ITypeAssignment ParseBasicTypeDef(IModule module, string name, ISymbolEnumerator symbols, bool isMacroSyntax = false) - { - Symbol current = symbols.NextNonEOLSymbol(); - - if (current == Symbol.Bits) - { - return new BitsType(module, name, symbols); - } - if (IntegerType.IsIntegerType(current)) - { - return new IntegerType(module, name, current, symbols); - } - if (UnsignedType.IsUnsignedType(current)) - { - return new UnsignedType(module, name, current, symbols); - } - if (current == Symbol.Opaque) - { - return new OpaqueType(module, name, symbols); - } - if (current == Symbol.IpAddress) - { - return new IpAddressType(module, name, symbols); - } - if (current == Symbol.TextualConvention) - { - return new TextualConvention(module, name, symbols); - } - if (current == Symbol.Octet) - { - Symbol next = symbols.NextNonEOLSymbol(); - - if (next == Symbol.String) - { - return new OctetStringType(module, name, symbols); - } - - symbols.PutBack(next); - } - if (current == Symbol.Object) - { - Symbol next = symbols.NextNonEOLSymbol(); - - if (next == Symbol.Identifier) - { - return new ObjectIdentifierType(module, name, symbols); - } - - symbols.PutBack(next); - } - if (current == Symbol.Sequence) - { - Symbol next = symbols.NextNonEOLSymbol(); - - if (next == Symbol.Of) - { - return new SequenceOf(module, name, symbols); - } - else - { - symbols.PutBack(next); - return new Sequence(module, name, symbols); - } - } - if (current == Symbol.Choice) - { - return new Choice(module, name, symbols); - } - - - return new TypeAssignment(module, name, current, symbols, isMacroSyntax); - } - - public static void ParseOidValue(ISymbolEnumerator symbols, out string parent, out uint value) - { - parent = null; - value = 0; - - Symbol current = symbols.NextNonEOLSymbol(); - current.Expect(Symbol.OpenBracket); - - Symbol previous = null; - StringBuilder longParent = new StringBuilder(); - - current = symbols.NextNonEOLSymbol(); - longParent.Append(current); - - while ((current = symbols.NextNonEOLSymbol()) != null) - { - bool succeeded; - - if (current == Symbol.OpenParentheses) - { - longParent.Append(current); - - current = symbols.NextNonEOLSymbol(); - succeeded = UInt32.TryParse(current.ToString(), out value); - current.Assert(succeeded, "not a decimal"); - longParent.Append(current); - current = symbols.NextNonEOLSymbol(); - current.Expect(Symbol.CloseParentheses); - longParent.Append(current); - continue; - } - - if (current == Symbol.CloseBracket) - { - parent = longParent.ToString(); - return; - } - - succeeded = UInt32.TryParse(current.ToString(), out value); - if (succeeded) - { - // numerical way - while ((current = symbols.NextNonEOLSymbol()) != Symbol.CloseBracket) - { - longParent.Append(".").Append(value); - succeeded = UInt32.TryParse(current.ToString(), out value); - current.Assert(succeeded, "not a decimal"); - } - - current.Expect(Symbol.CloseBracket); - parent = longParent.ToString(); - return; - } - - longParent.Append("."); - longParent.Append(current); - current = symbols.NextNonEOLSymbol(); - current.Expect(Symbol.OpenParentheses); - longParent.Append(current); - current = symbols.NextNonEOLSymbol(); - succeeded = UInt32.TryParse(current.ToString(), out value); - current.Assert(succeeded, "not a decimal"); - longParent.Append(current); - current = symbols.NextNonEOLSymbol(); - current.Expect(Symbol.CloseParentheses); - longParent.Append(current); - previous = current; - } - - throw MibException.Create("end of file reached", previous); - } - - - public static ValueRanges DecodeRanges(ISymbolEnumerator symbols) - { - ValueRanges result = new ValueRanges(); - - Symbol startSymbol = symbols.NextNonEOLSymbol(); - Symbol current = startSymbol; - current.Expect(Symbol.OpenParentheses); - - while (current != Symbol.CloseParentheses) - { - Symbol value1Symbol = symbols.NextNonEOLSymbol(); - - if ((value1Symbol == Symbol.Size) && !result.IsSizeDeclaration) - { - result.IsSizeDeclaration = true; - symbols.NextNonEOLSymbol().Expect(Symbol.OpenParentheses); - continue; - } - - // check for valid number - Int64? value1 = DecodeNumber(value1Symbol); - if (!value1.HasValue) - { - value1Symbol.Assert(false, "Invalid range declaration!"); - } - - // process next symbol - ValueRange range; - current = symbols.NextNonEOLSymbol(); - - if (current == Symbol.DoubleDot) - { - // its a continous range - Symbol value2Symbol = symbols.NextNonEOLSymbol(); - Int64? value2 = DecodeNumber(value2Symbol); - value2Symbol.Assert(value2.HasValue && (value2.Value >= value1.Value), "Invalid range declaration!"); - - if (value2.Value == value1.Value) - { - range = new ValueRange(value1.Value, null); - } - else - { - range = new ValueRange(value1.Value, value2.Value); - } - - current = symbols.NextNonEOLSymbol(); - } - else - { - // its a single number - range = new ValueRange(value1.Value, null); - } - - // validate range - if (result.IsSizeDeclaration) - { - value1Symbol.Assert(range.Start >= 0, "Invalid range declaration! Size must be greater than 0"); - } - - result.Add(range); - - // check next symbol - current.Expect(Symbol.Pipe, Symbol.CloseParentheses); - } - - if (result.IsSizeDeclaration) - { - current = symbols.NextNonEOLSymbol(); - current.Expect(Symbol.CloseParentheses); - } - - // validate ranges in between - for (int i=0; i 3)) - { - // search second apostrophe - int end = numString.IndexOf('\'', 1); - if (end == (numString.Length - 2)) - { - try - { - switch (numString[numString.Length - 1]) - { - case 'b': - case 'B': - result = Convert.ToInt64(numString.Substring(1, numString.Length - 3), 2); - return result; - case 'h': - case 'H': - result = Convert.ToInt64(numString.Substring(1, numString.Length - 3), 16); - return result; - } - } - catch - { - } - } - } - else if (Int64.TryParse(numString, out result)) - { - return result; - } - } - - return null; - } - - public static ValueMap DecodeEnumerations(ISymbolEnumerator symbols) - { - Symbol current = symbols.NextNonEOLSymbol(); - current.Expect(Symbol.OpenBracket); - - ValueMap map = new ValueMap(); - do - { - current = symbols.NextNonEOLSymbol(); - string identifier = current.ToString(); - - current = symbols.NextNonEOLSymbol(); - current.Expect(Symbol.OpenParentheses); - - current = symbols.NextNonEOLSymbol(); - Int64 enumValue; - if (Int64.TryParse(current.ToString(), out enumValue)) - { - try - { - // Have to include the number as it seems repeated identifiers are allowed ?? - map.Add(enumValue, String.Format("{0}({1})", identifier, enumValue)); - } - catch (ArgumentException ex) - { - current.Assert(false, ex.Message); - } - } - else - { - // Need to get "DefinedValue". - } - - current = symbols.NextNonEOLSymbol(); - current.Expect(Symbol.CloseParentheses); - - current = symbols.NextNonEOLSymbol(); - } while (current == Symbol.Comma); - - current.Expect(Symbol.CloseBracket); - - return map; - } - - #endregion - - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MaxAccess.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MaxAccess.cs deleted file mode 100644 index f8029900..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MaxAccess.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Lextm.SharpSnmpLib.Mib -{ - public enum MaxAccess - { - notAccessible, - accessibleForNotify, - readOnly, - readWrite, - readCreate - } - -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibDocument.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibDocument.cs deleted file mode 100644 index aac3b280..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibDocument.cs +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Created by SharpDevelop. - * User: lextm - * Date: 2008/5/17 - * Time: 17:38 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ - -using System.Collections.Generic; - -namespace Lextm.SharpSnmpLib.Mib -{ - /// - /// MIB document. - /// - public sealed class MibDocument - { - private readonly List _modules = new List(); - - /// - /// Initializes a new instance of the class. - /// - /// The file. - public MibDocument(string file) - : this(new Lexer(file)) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// The lexer. - public MibDocument(Lexer lexer) - { - ISymbolEnumerator symbols = lexer.GetEnumerator(); - - Symbol current; - while ((current = symbols.NextNonEOLSymbol()) != null) - { - symbols.PutBack(current); - _modules.Add(new MibModule(symbols)); - } - } - - /// - /// containing in this document. - /// - public IList Modules - { - get - { - return _modules; - } - } - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibException.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibException.cs deleted file mode 100644 index efd89b3f..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibException.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Created by SharpDevelop. - * User: lextm - * Date: 2008/5/17 - * Time: 16:33 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ - -using System; -using System.Globalization; -#if (!SILVERLIGHT) -using System.Runtime.Serialization; -using System.Security.Permissions; -#endif - -namespace Lextm.SharpSnmpLib.Mib -{ - /// - /// Description of MibException. - /// - [Serializable] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Mib")] - public sealed class MibException : Exception - { - /// - /// Symbol. - /// - public Symbol Symbol { get; private set; } - - /// - /// Creates a . - /// - public MibException() - { - } - - /// - /// Creates a instance with a specific . - /// - /// Message - public MibException(string message) : base(message) - { - } - - /// - /// Creates a instance with a specific and an . - /// - /// Message - /// Inner exception - public MibException(string message, Exception inner) - : base(message, inner) - { - } -#if (!SILVERLIGHT) - /// - /// Creates a instance. - /// - /// Info - /// Context - private MibException(SerializationInfo info, StreamingContext context) : base(info, context) - { - if (info == null) - { - throw new ArgumentNullException("info"); - } - - Symbol = (Symbol)info.GetValue("Symbol", typeof(Symbol)); - } - - /// - /// Gets object data. - /// - /// Info - /// Context - [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] - public override void GetObjectData(SerializationInfo info, StreamingContext context) - { - base.GetObjectData(info, context); - info.AddValue("Symbol", Symbol); - } -#endif - - /// - /// Creates a with a specific . - /// - /// Message - /// Symbol - /// - public static MibException Create(string message, Symbol symbol) - { - if (symbol == null) - { - throw new ArgumentNullException("symbol"); - } - - if (String.IsNullOrEmpty(message)) - { - message = "Unknown MIB Exception"; - } - - message = String.Format( - "{0} (file: \"{1}\"; row: {2}; column: {3})", - message, - symbol.File, - symbol.Row + 1, - symbol.Column + 1); - - MibException ex = new MibException(message) { Symbol = symbol }; - return ex; - } - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibModule.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibModule.cs deleted file mode 100644 index 3c6b7707..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibModule.cs +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Created by SharpDevelop. - * User: lextm - * Date: 2008/5/17 - * Time: 17:38 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ - -using System; -using System.Collections.Generic; -using Lextm.SharpSnmpLib.Mib.Elements; -using Lextm.SharpSnmpLib.Mib.Elements.Entities; -using Lextm.SharpSnmpLib.Mib.Elements.Types; - -namespace Lextm.SharpSnmpLib.Mib -{ - /// - /// MIB module class. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Mib")] - public sealed class MibModule : IModule - { - private readonly string _name; - private readonly Imports _imports; - private readonly Exports _exports; - private readonly List _tokens = new List(); - - /// - /// Creates a with a specific . - /// - /// Module name - /// Lexer - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "lexer")] - public MibModule(ISymbolEnumerator symbols) - { - if (symbols == null) - { - throw new ArgumentNullException("lexer"); - } - - Symbol temp = symbols.NextNonEOLSymbol(); - temp.AssertIsValidIdentifier(); - _name = temp.ToString().ToUpperInvariant(); // all module names are uppercase - - temp = symbols.NextNonEOLSymbol(); - temp.Expect(Symbol.Definitions); - - temp = symbols.NextNonEOLSymbol(); - temp.Expect(Symbol.Assign); - - temp = symbols.NextSymbol(); - temp.Expect(Symbol.Begin); - - temp = symbols.NextNonEOLSymbol(); - if (temp == Symbol.Imports) - { - _imports = ParseDependents(symbols); - } - else if (temp == Symbol.Exports) - { - _exports = ParseExports(symbols); - } - else - { - symbols.PutBack(temp); - } - - ParseEntities(symbols); - } - - #region Accessors - - /// - /// Module name. - /// - public string Name - { - get { return _name; } - } - - public Exports Exports - { - get { return _exports; } - } - - public Imports Imports - { - get { return _imports; } - } - - public List Tokens - { - get { return this._tokens; } - } - - /// - /// Entities + Types + all other elements implementing IDeclaration - /// - public IList Declarations - { - get - { - IList result = new List(); - foreach (IElement e in _tokens) - { - IDeclaration decl = e as IDeclaration; - if (decl != null) - { - result.Add(decl); - } - } - - return result; - } - } - - /// - /// OID nodes. - /// - public IList Entities - { - get - { - IList result = new List(); - foreach (IElement e in _tokens) - { - IEntity entity = e as IEntity; - if (entity != null) - { - result.Add(entity); - } - } - - return result; - } - } - - public IList Types - { - get - { - IList result = new List(); - foreach (IElement e in _tokens) - { - ITypeAssignment type = e as ITypeAssignment; - if (type != null) - { - result.Add(type); - } - } - - return result; - } - } - - #endregion - - #region Parsing of Symbols - - private Exports ParseExports(ISymbolEnumerator symbols) - { - return new Exports(this, symbols); - } - - private Imports ParseDependents(ISymbolEnumerator symbols) - { - return new Imports(this, symbols); - } - - private void ParseEntities(ISymbolEnumerator symbols) - { - Symbol temp = symbols.NextNonEOLSymbol(); - SymbolList buffer = new SymbolList(); - - while (temp != Symbol.End) - { - if (temp == Symbol.Assign) - { - ParseEntity(buffer, symbols); - buffer.Clear(); - // skip linebreaks behind an entity - temp = symbols.NextNonEOLSymbol(); - } - else - { - buffer.Add(temp); - temp = symbols.NextSymbol(); - } - } - } - - private void ParseEntity(SymbolList preAssignSymbols, ISymbolEnumerator symbols) - { - if ((preAssignSymbols == null) || (preAssignSymbols.Count == 0)) - { - Symbol s = symbols.NextSymbol(); - if (s != null) - { - s.Assert(false, "Invalid Entitiy declaration"); - } - else - { - throw new MibException("Invalid Entitiy declaration"); - } - } - - // check for a valid identifier - preAssignSymbols[0].AssertIsValidIdentifier(); - - if (preAssignSymbols.Count == 1) - { - // its a typedef - _tokens.Add(Lexer.ParseBasicTypeDef(this, preAssignSymbols[0].ToString(), symbols, isMacroSyntax: false)); - return; - } - - ISymbolEnumerator preAssignSymbolsEnumerator = preAssignSymbols.GetSymbolEnumerator(); - preAssignSymbolsEnumerator.NextNonEOLSymbol(); // returns identifier - Symbol type = preAssignSymbolsEnumerator.NextNonEOLSymbol(); - - // parse declarations - if (type == Symbol.Object) - { - Symbol next = preAssignSymbolsEnumerator.NextNonEOLSymbol(); - - if (next == Symbol.Identifier) - { - _tokens.Add(new OidValueAssignment(this, preAssignSymbols, symbols)); - return; - } - else if (next != null) - { - preAssignSymbolsEnumerator.PutBack(next); - } - } - if (type == Symbol.ModuleIdentity) - { - _tokens.Add(new ModuleIdentity(this, preAssignSymbols, symbols)); - return; - } - if (type == Symbol.ObjectType) - { - _tokens.Add(new ObjectType(this, preAssignSymbols, symbols)); - return; - } - if (type == Symbol.ObjectGroup) - { - _tokens.Add(new ObjectGroup(this, preAssignSymbols, symbols)); - return; - } - if (type == Symbol.NotificationGroup) - { - _tokens.Add(new NotificationGroup(this, preAssignSymbols, symbols)); - return; - } - if (type == Symbol.ModuleCompliance) - { - _tokens.Add(new ModuleCompliance(this, preAssignSymbols, symbols)); - return; - } - if (type == Symbol.NotificationType) - { - _tokens.Add(new NotificationType(this, preAssignSymbols, symbols)); - return; - } - if (type == Symbol.ObjectIdentity) - { - _tokens.Add(new ObjectIdentity(this, preAssignSymbols, symbols)); - return; - } - if (type == Symbol.Macro) - { - _tokens.Add(new Macro(this, preAssignSymbols, symbols)); - return; - } - if (type == Symbol.TrapType) - { - _tokens.Add(new TrapType(this, preAssignSymbols, symbols)); - return; - } - if (type == Symbol.AgentCapabilities) - { - _tokens.Add(new AgentCapabilities(this, preAssignSymbols, symbols)); - return; - } - - preAssignSymbols[1].Assert(false, "Unknown/Invalid declaration"); - } - - #endregion - - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibResolver.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibResolver.cs deleted file mode 100644 index 96978e1a..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibResolver.cs +++ /dev/null @@ -1,97 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.IO; -using System.Reflection; - -namespace Lextm.SharpSnmpLib.Mib -{ - public interface IMibResolver - { - IModule Resolve(string moduleName); - } - - public class FileSystemMibResolver : IMibResolver - { - private string _path; - private bool _recursive; - - public FileSystemMibResolver(string path, bool recursive) - { - _path = path; - _recursive = recursive; - } - - #region IMibResolver Member - - public IModule Resolve(string moduleName) - { - if (Directory.Exists(_path)) - { - string[] matchedFiles = Directory.GetFiles( - _path, - "*", - (_recursive) ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly); - - if ((matchedFiles != null) && (matchedFiles.Length >= 1)) - { - foreach (string matchedFile in matchedFiles) - { - if (Path.GetFileNameWithoutExtension(matchedFile.ToLowerInvariant()) == moduleName.ToLowerInvariant()) - { - try - { - MibDocument md = new MibDocument (matchedFile); - if (md.Modules.Count > 0) - { - return md.Modules [0]; - } - } catch - { - } - } - } - } - } - - return null; - } - - #endregion - - } - - // earlier code for search of versioned MIBs: - // - //private const string Pattern = "-V[0-9]+$"; - //public static bool AllDependentsAvailable(MibModule module, IDictionary modules) - //{ - // foreach (string dependent in module.Dependents) - // { - // if (!DependentFound(dependent, modules)) - // { - // return false; - // } - // } - - // return true; - //} - - //private static bool DependentFound(string dependent, IDictionary modules) - //{ - // if (!Regex.IsMatch(dependent, Pattern)) - // { - // return modules.ContainsKey(dependent); - // } - - // if (modules.ContainsKey(dependent)) - // { - // return true; - // } - - // string dependentNonVersion = Regex.Replace(dependent, Pattern, string.Empty); - // return modules.ContainsKey(dependentNonVersion); - //} - -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibTree.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibTree.cs deleted file mode 100644 index a5174bc1..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibTree.cs +++ /dev/null @@ -1,130 +0,0 @@ -using System.Collections.Generic; -using Lextm.SharpSnmpLib.Mib.Elements.Entities; - -namespace Lextm.SharpSnmpLib.Mib -{ - /// - /// Builds up a tree from a single MIB - /// - public class MibTree - { - private readonly List _root = new List(); - - public MibTree(MibModule module) - { - IList entities = module.Entities; - - if (entities.Count > 0) - { - // try to find module identity as root - foreach (IEntity element in entities) - { - ModuleIdentity mi = element as ModuleIdentity; - - if (mi != null) - { - _root.Add(new MibTreeNode(null, mi)); - } - } - - // find OID assignments as root, if there are any that are not below ModuleIdentity - foreach (IEntity element in entities) - { - OidValueAssignment oa = element as OidValueAssignment; - - if (oa != null) - { - _root.Add(new MibTreeNode(null, oa)); - } - } - - FilterRealRoots (entities); - - foreach (MibTreeNode mibTreeNode in _root) - { - entities.Remove (mibTreeNode.Entity); - } - - if (_root.Count == 0) - { - //no module identity, assume first entity is root - _root.Add(new MibTreeNode(null, entities[0])); - } - - foreach (MibTreeNode mibTreeNode in _root) - { - if (entities.Contains (mibTreeNode.Entity)) - { - entities.Remove (mibTreeNode.Entity); - } - BuildTree(mibTreeNode, entities); - UpdateTreeNodeTypes(mibTreeNode); - } - } - } - - public IList Root - { - get { return _root; } - } - - private bool EntityExists(IList entities, string name) - { - foreach(IEntity entity in entities) - { - if (entity.Name == name) - { - return true; - } - } - return false; - } - - private void FilterRealRoots(IList entities) - { - int i = 0; - while (i < _root.Count) - { - if (EntityExists(entities, _root[i].Entity.Parent)) - { - _root.RemoveAt(i); - } - else - { - i++; - } - } - } - - private void BuildTree(MibTreeNode node, IList entities) - { - int i = 0; - while (i < entities.Count) - { - if (entities[i].Parent == node.Entity.Name) - { - node.AddChild(entities[i]); - entities.RemoveAt(i); - } - else - { - i++; - } - } - - foreach (MibTreeNode childNode in node.ChildNodes) - { - BuildTree(childNode, entities); - } - } - - private void UpdateTreeNodeTypes(MibTreeNode node) - { - node.UpdateNodeType(); - foreach (MibTreeNode childNode in node.ChildNodes) - { - UpdateTreeNodeTypes(childNode); - } - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibTreeNode.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibTreeNode.cs deleted file mode 100644 index 386c8e5c..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibTreeNode.cs +++ /dev/null @@ -1,112 +0,0 @@ -using System; -using System.Collections.Generic; -using Lextm.SharpSnmpLib.Mib.Elements.Entities; -using Lextm.SharpSnmpLib.Mib.Elements.Types; - -namespace Lextm.SharpSnmpLib.Mib -{ - [Flags] - public enum MibTreeNodeType - { - Unknown = 0, - Container = (1 << 0), - Scalar = (1 << 1), - Table = (1 << 2), - TableRow = (1 << 3), - TableCell = (1 << 4), - NotificationRelated = (1 << 5), - ConformanceRelated = (1 << 6) - } - - - public class MibTreeNode - { - private MibTreeNode _parent = null; - private List _childNodes = new List(); - private IEntity _entity = null; - private MibTreeNodeType _nodeType = MibTreeNodeType.Unknown; - - public MibTreeNode(MibTreeNode parent, IEntity entity) - { - _parent = parent; - _entity = entity; - } - - public MibTreeNode Parent - { - get { return _parent; } - } - - public IEntity Entity - { - get { return _entity; } - } - - public MibTreeNodeType NodeType - { - get { return _nodeType; } - } - - public List ChildNodes - { - get { return _childNodes; } - } - - public MibTreeNode AddChild(IEntity element) - { - MibTreeNode result = new MibTreeNode(this, element); - this.ChildNodes.Add(result); - - return result; - } - - public void UpdateNodeType() - { - _nodeType = MibTreeNodeType.Unknown; - - if (_entity != null) - { - if ((_entity is OidValueAssignment) || (_entity is ObjectIdentity)) - { - _nodeType |= MibTreeNodeType.Container; - return; - } - else if (_childNodes.Count > 0) - { - _nodeType |= MibTreeNodeType.Container; - } - - if (_entity is ObjectType) - { - ObjectType ot = _entity as ObjectType; - - if (ot.Syntax is SequenceOf) - { - _nodeType |= MibTreeNodeType.Table; - } - else if (ot.Syntax is Sequence) - { - _nodeType |= MibTreeNodeType.TableRow; - } - else if ((_parent != null) && ((_parent.NodeType & MibTreeNodeType.TableRow) != 0)) - { - _nodeType |= MibTreeNodeType.TableCell; - _nodeType |= MibTreeNodeType.Scalar; - } - else - { - _nodeType |= MibTreeNodeType.Scalar; - } - } - else if ((_entity is ModuleCompliance) || (_entity is ObjectGroup) || (_entity is NotificationGroup)) - { - _nodeType |= MibTreeNodeType.ConformanceRelated; - } - else if ((_entity is NotificationGroup) || (_entity is NotificationType)) - { - _nodeType |= MibTreeNodeType.NotificationRelated; - } - } - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibTypesResolver.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibTypesResolver.cs deleted file mode 100644 index 1e7529af..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/MibTypesResolver.cs +++ /dev/null @@ -1,216 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.RegularExpressions; -using Lextm.SharpSnmpLib.Mib.Elements; -using Lextm.SharpSnmpLib.Mib.Elements.Entities; -using Lextm.SharpSnmpLib.Mib.Elements.Types; - -namespace Lextm.SharpSnmpLib.Mib -{ - public static class MibTypesResolver - { - private static readonly Regex _namedOidPathRegex = new Regex(@"^(?[^\(]+)\((?\d+)\)$"); - private static readonly List _resolver = new List(); - private static readonly List _cachedModules = new List(); - - public static void RegisterResolver(IMibResolver resolver) - { - if (resolver != null) - { - _resolver.Add(resolver); - } - } - - public static IModule ResolveModule(string moduleName) - { - // check if module is already cached - foreach (MibModule cachedModule in _cachedModules) - { - if (cachedModule.Name == moduleName) - { - return cachedModule; - } - } - - foreach (IMibResolver resolver in _resolver) - { - IModule resolvedModule = resolver.Resolve(moduleName); - if (resolvedModule != null) - { - ResolveTypes(resolvedModule); - _cachedModules.Add(resolvedModule); - return resolvedModule; - } - } - - return null; - } - - public static void ResolveTypes(IModule module) - { - foreach (IEntity entity in module.Entities) - { - ITypeReferrer typeReferringEntity = entity as ITypeReferrer; - - if (typeReferringEntity != null) - { - CheckTypeReferrer(module, typeReferringEntity); - } - } - - if (!_cachedModules.Contains(module)) - { - _cachedModules.Add(module); - } - } - - private static void CheckTypeReferrer(IModule module, ITypeReferrer typeReferringEntity) - { - TypeAssignment unknownType = typeReferringEntity.ReferredType as TypeAssignment; - if (unknownType != null) - { - typeReferringEntity.ReferredType = ResolveType(module, unknownType); - - if (typeReferringEntity.ReferredType is TypeAssignment) - { - Console.WriteLine(String.Format("Could not resolve type '{0}' declared in module '{1}'", (typeReferringEntity.ReferredType as TypeAssignment).Type, typeReferringEntity.ReferredType.Module.Name)); - } - } - - ITypeReferrer nextTypeReferringEntity = typeReferringEntity.ReferredType as ITypeReferrer; - if (nextTypeReferringEntity != null) - { - CheckTypeReferrer(module, nextTypeReferringEntity); - } - } - - public static ITypeAssignment ResolveType(IModule module, TypeAssignment type) - { - ITypeAssignment result = ResolveDeclaration(module, type.Type) as ITypeAssignment; - - return (result != null) ? result : type; - } - - public static IDeclaration ResolveDeclaration(IModule module, string name) - { - if ((module == null) || String.IsNullOrEmpty(name)) - { - return null; - } - - // check module internal types - foreach (IDeclaration decl in module.Declarations) - { - if (decl.Name == name) - { - return decl; - } - } - - // check if type is imported - if (module.Imports != null) - { - ImportsFrom imports = module.Imports.GetImportFromType(name); - if (imports != null) - { - IModule importedModule = ResolveModule(imports.Module); - if (importedModule != null) - { - return ResolveDeclaration(importedModule, name); - } - } - } - - return null; - } - - public static ObjectIdentifier ResolveOid(IEntity entity) - { - ObjectIdentifier result = new ObjectIdentifier(); - - if (entity != null) - { - ResolveOid(entity, result); - } - - return result; - } - - private static void ResolveOid(IEntity entity, ObjectIdentifier result) - { - result.Prepend(entity.Name, entity.Value); - - // check parent - if (!String.IsNullOrEmpty(entity.Parent)) - { - string[] pathParts = entity.Parent.Split('.'); - uint value; - - // all parts except the first should have their value directly or indirectly with them - if (pathParts.Length > 1) - { - for (int i=pathParts.Length-1; i>=1; i--) - { - if (uint.TryParse(pathParts[i], out value)) - { - result.Prepend("", value); - } - else - { - Match m = _namedOidPathRegex.Match(pathParts[i]); - if (m.Success) - { - result.Prepend(m.Groups["Name"].Value, uint.Parse(m.Groups["Value"].Value)); - } - else - { - throw new MibException("Invalid OID path detected for entity '" + entity.Name + "' in module '" + entity.Module + "'!"); - } - } - } - } - - // parse root part: either another entity or a standard root object - if (IsOidRoot(pathParts[0], out value)) - { - result.Prepend(pathParts[0], value); - } - else - { - // try to find entity inside this module - if (entity.Module != null) - { - entity = ResolveDeclaration(entity.Module, pathParts[0]) as IEntity; - - if (entity != null) - { - ResolveOid(entity, result); - } - else - { - result.Prepend("", uint.MaxValue); - } - } - else - { - result.Prepend("", uint.MaxValue); - } - } - } - } - - public static bool IsOidRoot(string name, out uint value) - { - value = uint.MaxValue; - - switch (name) - { - case "ccitt": value = 0; return true; - case "iso": value = 1; return true; - case "joint-iso-ccitt": value = 2; return true; - } - - return false; - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/ObjectIdentifier.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/ObjectIdentifier.cs deleted file mode 100644 index 04248043..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/ObjectIdentifier.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System.Collections.Generic; -using System.Text; - -namespace Lextm.SharpSnmpLib.Mib -{ - public class ObjectIdentifier: List> - { - public void Add(string name, uint oid) - { - this.Add(new KeyValuePair(name, oid)); - } - - public void Prepend(string name, uint oid) - { - this.Insert(0, new KeyValuePair(name, oid)); - } - - public void Insert(int index, string name, uint oid) - { - this.Insert(index, new KeyValuePair(name, oid)); - } - - public string GetOidString() - { - StringBuilder result = new StringBuilder(); - - foreach (KeyValuePair level in this) - { - result.Append(level.Value); - result.Append('.'); - } - - if (result.Length > 0) - { - result.Length--; - } - - return result.ToString(); - } - - public uint[] GetOidValues() - { - List result = new List(); - - foreach (KeyValuePair level in this) - { - result.Add(level.Value); - } - - return result.ToArray(); - } - - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Status.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Status.cs deleted file mode 100644 index 4ddd3bab..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Status.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Lextm.SharpSnmpLib.Mib -{ - public enum Status - { - current, - deprecated, - obsolete, - mandatory, - optional - } - -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Symbol.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Symbol.cs deleted file mode 100644 index b11386d8..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/Symbol.cs +++ /dev/null @@ -1,357 +0,0 @@ -/* - * Created by SharpDevelop. - * User: lextm - * Date: 2008/5/17 - * Time: 17:14 - * - * To change this template use Tools | Options | Coding | Edit Standard Headers. - */ - -using System; -using System.Configuration; -using System.Globalization; -using System.Text; - -namespace Lextm.SharpSnmpLib.Mib -{ - /// - /// Description of Symbol. - /// - public sealed class Symbol : IEquatable - { - private readonly string _text; - private readonly int _row; - private readonly int _column; - private readonly string _file; - - private Symbol(string text) : this(null, text, -1, -1) - { - } - - /// - /// Creates a . - /// - /// File - /// Text - /// Row number - /// column number - public Symbol(string file, string text, int row, int column) - { - _file = file; - _text = text; - _row = row; - _column = column; - } - - /// - /// File. - /// - public string File - { - get - { - return _file; - } - } - - /// - /// Row number. - /// - public int Row - { - get - { - return _row; - } - } - - /// - /// Column number. - /// - public int Column - { - get - { - return _column; - } - } - - /// - /// Returns a that represents this . - /// - /// - public override string ToString() - { - return _text; - } - - /// - /// Determines whether the specified is equal to the current . - /// - /// The to compare with the current . - /// true if the specified is equal to the current ; otherwise, false. - /// - public override bool Equals(object obj) - { - if (obj == null) - { - return false; - } - - if (ReferenceEquals(this, obj)) - { - return true; - } - - return GetType() == obj.GetType() && Equals((Symbol)obj); - } - - /// - /// Serves as a hash function for a particular type. - /// - /// A hash code for the current . - public override int GetHashCode() - { - return _text.GetHashCode(); - } - - /// - /// The equality operator. - /// - /// Left object - /// Right object - /// - /// Returns true if the values of its operands are equal, false otherwise. - public static bool operator ==(Symbol left, Symbol right) - { - return Equals(left, right); - } - - /// - /// Determines whether the specified is equal to the current . - /// - /// Left object - /// Right object - /// - /// Returns true if the values of its operands are equal, false otherwise. - public static bool Equals(Symbol left, Symbol right) - { - object l = left; - object r = right; - if (l == r) - { - return true; - } - - if (l == null || r == null) - { - return false; - } - - return left._text.Equals(right._text); - } - - /// - /// The inequality operator. - /// - /// Left object - /// Right object - /// - /// Returns true if the values of its operands are not equal, false otherwise. - public static bool operator !=(Symbol left, Symbol right) - { - return !(left == right); - } - - #region IEquatable Members - /// - /// Indicates whether the current object is equal to another object of the same type. - /// - /// An object to compare with this object. - /// true if the current object is equal to the parameter; otherwise, false. - /// - public bool Equals(Symbol other) - { - return Equals(this, other); - } - - #endregion - - public static readonly Symbol Definitions = new Symbol("DEFINITIONS"); - public static readonly Symbol Begin = new Symbol("BEGIN"); - public static readonly Symbol Object = new Symbol("OBJECT"); - public static readonly Symbol Identifier = new Symbol("IDENTIFIER"); - public static readonly Symbol Assign = new Symbol("::="); - public static readonly Symbol OpenBracket = new Symbol("{"); - public static readonly Symbol CloseBracket = new Symbol("}"); - public static readonly Symbol Comment = new Symbol("--"); - public static readonly Symbol Imports = new Symbol("IMPORTS"); - public static readonly Symbol Semicolon = new Symbol(";"); - public static readonly Symbol From = new Symbol("FROM"); - public static readonly Symbol ModuleIdentity = new Symbol("MODULE-IDENTITY"); - public static readonly Symbol ObjectType = new Symbol("OBJECT-TYPE"); - public static readonly Symbol ObjectGroup = new Symbol("OBJECT-GROUP"); - public static readonly Symbol NotificationGroup = new Symbol("NOTIFICATION-GROUP"); - public static readonly Symbol ModuleCompliance = new Symbol("MODULE-COMPLIANCE"); - public static readonly Symbol Sequence = new Symbol("SEQUENCE"); - public static readonly Symbol NotificationType = new Symbol("NOTIFICATION-TYPE"); - public static readonly Symbol EOL = new Symbol(Environment.NewLine); - public static readonly Symbol ObjectIdentity = new Symbol("OBJECT-IDENTITY"); - public static readonly Symbol End = new Symbol("END"); - public static readonly Symbol Macro = new Symbol("MACRO"); - public static readonly Symbol Choice = new Symbol("CHOICE"); - public static readonly Symbol TrapType = new Symbol("TRAP-TYPE"); - public static readonly Symbol AgentCapabilities = new Symbol("AGENT-CAPABILITIES"); - public static readonly Symbol Comma = new Symbol(","); - public static readonly Symbol TextualConvention = new Symbol("TEXTUAL-CONVENTION"); - public static readonly Symbol Syntax = new Symbol("SYNTAX"); - public static readonly Symbol Bits = new Symbol("BITS"); - public static readonly Symbol Octet = new Symbol("OCTET"); - public static readonly Symbol String = new Symbol("STRING"); - public static readonly Symbol OpenParentheses = new Symbol("("); - public static readonly Symbol CloseParentheses = new Symbol(")"); - public static readonly Symbol Exports = new Symbol("EXPORTS"); - public static readonly Symbol DisplayHint = new Symbol("DISPLAY-HINT"); - public static readonly Symbol Status = new Symbol("STATUS"); - public static readonly Symbol Description = new Symbol("DESCRIPTION"); - public static readonly Symbol Reference = new Symbol("REFERENCE"); - public static readonly Symbol DoubleDot = new Symbol(".."); - public static readonly Symbol Pipe = new Symbol("|"); - public static readonly Symbol Size = new Symbol("SIZE"); - public static readonly Symbol Units = new Symbol("UNITS"); - public static readonly Symbol MaxAccess = new Symbol("MAX-ACCESS"); - public static readonly Symbol Access = new Symbol("ACCESS"); - public static readonly Symbol Index = new Symbol("INDEX"); - public static readonly Symbol Augments = new Symbol("AUGMENTS"); - public static readonly Symbol DefVal = new Symbol("DEFVAL"); - public static readonly Symbol Of = new Symbol("OF"); - public static readonly Symbol Integer = new Symbol("INTEGER"); - public static readonly Symbol Integer32 = new Symbol("Integer32"); - public static readonly Symbol IpAddress = new Symbol("IpAddress"); - public static readonly Symbol Counter32 = new Symbol("Counter32"); - public static readonly Symbol Counter = new Symbol("Counter"); - public static readonly Symbol TimeTicks = new Symbol("TimeTicks"); - public static readonly Symbol Opaque = new Symbol("Opaque"); - public static readonly Symbol Counter64 = new Symbol("Counter64"); - public static readonly Symbol Unsigned32 = new Symbol("Unsigned32"); - public static readonly Symbol Gauge32 = new Symbol("Gauge32"); - public static readonly Symbol Gauge = new Symbol("Gauge"); - public static readonly Symbol TruthValue = new Symbol("TruthValue"); - public static readonly Symbol Implied = new Symbol("IMPLIED"); - - internal void Expect(Symbol expected, params Symbol[] orExpected) - { - bool isExpected = (this == expected); - - if (!isExpected && (orExpected != null) && (orExpected.Length > 0)) - { - // check the alternatives - for (int i=0; i 64)) - { - message = "an identifier must consist of 1 to 64 letters, digits, and hyphens"; - return false; - } - - if (!Char.IsLetter(name[0])) - { - message = "the initial character must be a letter"; - return false; - } - - if (name.EndsWith("-", StringComparison.Ordinal)) - { - message = "a hyphen cannot be the last character of an identifier"; - return false; - } - - if (name.Contains("--")) - { - message = "a hyphen cannot be immediately followed by another hyphen in an identifier"; - return false; - } - - if (UseStricterValidation && name.Contains("_")) - { - message = "underscores are not allowed in identifiers"; - return false; - } - - // TODO: SMIv2 forbids "-" except in module names and keywords - message = null; - return true; - } - - private static bool? _useStricterValidation; - - private static bool UseStricterValidation - { - get - { - if (_useStricterValidation == null) - { - object setting = ConfigurationManager.AppSettings["StricterValidationEnabled"]; - _useStricterValidation = setting != null && Convert.ToBoolean(setting.ToString(), CultureInfo.InvariantCulture); - } - - return _useStricterValidation.Value; - } - } - } -} \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/SymbolList.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/SymbolList.cs deleted file mode 100644 index 5b2218e8..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/SymbolList.cs +++ /dev/null @@ -1,146 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Lextm.SharpSnmpLib.Mib -{ - public class SymbolList : List - { - public class SymbolEnumerator : ISymbolEnumerator - { - private SymbolList _list = null; - private int _index = -1; - - internal SymbolEnumerator(SymbolList list) - { - if (list == null) - { - throw new ArgumentNullException("lexer"); - } - - _list = list; - } - - #region ISymbolEnumerator Member - - public bool PutBack(Symbol item) - { - if ((_index < 0) || (_index >= _list.Count) || (item != _list[_index])) - { - throw new ArgumentException(@"wrong last symbol", "last"); - //return false; - } - - _index--; - return true; - } - - #endregion - - #region IEnumerator Member - - public Symbol Current - { - get - { - if ((_index >= 0) && (_index <= _list.Count)) - { - return _list[_index]; - } - - return null; - } - } - - #endregion - - #region IDisposable Member - - public void Dispose() - { - } - - #endregion - - #region IEnumerator Member - - object System.Collections.IEnumerator.Current - { - get { return this.Current; } - } - - public bool MoveNext() - { - _index++; - return (_index >= 0) && (_index < _list.Count); - } - - public void Reset() - { - _index = -1; - } - - #endregion - } - - /// - /// Initializes a new instance of the class. - /// - public SymbolList() - { - } - - public ISymbolEnumerator GetSymbolEnumerator() - { - return new SymbolEnumerator(this); - } - - public string Join(string separator) - { - if (separator == null) - separator = ""; - - StringBuilder result = new StringBuilder(); - - foreach (Symbol s in this) - { - result.Append(s); - result.Append(separator); - } - - if (result.Length > 0) - { - result.Length -= separator.Length; - } - - return result.ToString(); - } - } - - public static class SymbolEnumeratorExtension - { - public static Symbol NextSymbol(this IEnumerator enumerator) - { - if (enumerator.MoveNext()) - { - return enumerator.Current; - } - - return null; - } - - public static Symbol NextNonEOLSymbol(this IEnumerator enumerator) - { - while (enumerator.MoveNext()) - { - if (enumerator.Current != Symbol.EOL) - { - return enumerator.Current; - } - } - - return null; - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/ValueMap.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/ValueMap.cs deleted file mode 100644 index 184dd580..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/ValueMap.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Lextm.SharpSnmpLib.Mib -{ - public class ValueMap : Dictionary - { - public ValueMap() - { - } - - /// - /// Returns the values of the map as continous range. At best as one range. - /// - /// - public ValueRanges GetContinousRanges() - { - ValueRanges result = new ValueRanges(); - - if (this.Count > 0) - { - List values = new List(this.Keys); - values.Sort(); - - Int64 last = values[0]; - Int64 offset = values[0]; - for (int i=1; i - /// Gets the highest value contained in this value map. - /// - /// - public Int64 GetHighestValue() - { - Int64 result = 0; - - foreach (Int64 value in this.Keys) - { - if (value > result) - { - result = value; - } - } - - return result; - } - - /// - /// Interprets the single values as bit positions and creates a mask of it. - /// - /// - public UInt32 GetBitMask() - { - UInt32 result = 0; - - foreach (Int64 key in this.Keys) - { - if (key < 0) - { - throw new NotSupportedException("Negative numbers are not allowed for Bits!"); - } - if (key > 31) - { - throw new NotSupportedException("Bits with more than 32 bits are not supported!"); - } - - result |= (UInt32)(1 << (int)key); - } - - return result; - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/ValueRange.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/ValueRange.cs deleted file mode 100644 index 3ff5bcb7..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Mib/ValueRange.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Lextm.SharpSnmpLib.Mib -{ - public class ValueRanges: List - { - public bool IsSizeDeclaration { get; internal set; } - - public ValueRanges(bool isSizeDecl = false) - { - IsSizeDeclaration = isSizeDecl; - } - - public bool Contains(Int64 value) - { - foreach (ValueRange range in this) - { - if (range.Contains(value)) - { - return true; - } - } - - return false; - } - } - - public class ValueRange - { - private readonly Int64 _start; - private readonly Int64? _end; - - public ValueRange(Int64 first, Int64? second) - { - _start = first; - _end = second; - } - - public Int64 Start - { - get { return _start; } - } - - public Int64? End - { - get { return _end; } - } - - public bool IntersectsWith(ValueRange other) - { - if (this._end == null) - { - return other.Contains(this._start); - } - else if (other._end == null) - { - return this.Contains(other._start); - } - - return (this._start <= other.End) && (this._end >= other._start); - } - - public bool Contains(Int64 value) - { - if (_end == null) - { - return value == _start; - } - else - { - return (_start <= value) && (value <= _end); - } - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Properties/AssemblyInfo.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Properties/AssemblyInfo.cs deleted file mode 100644 index f96080d0..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,61 +0,0 @@ -// #SNMP Library. An open source SNMP implementation for .NET. -// Copyright (C) 2008 Lex Y. Li -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -#region Using directives - -using System; -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -#endregion - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("SharpSnmpLib")] -[assembly: AssemblyDescription("#SNMP Library for .NET")] -[assembly: AssemblyConfiguration("Lesser GPL 2.1+")] -[assembly: AssemblyCompany("LeXtudio")] -[assembly: AssemblyProduct("#SNMPLib")] -[assembly: AssemblyCopyright("(C) 2008-2010 Malcolm Crowe, Lex Li, Steve Santacroce, and other contributors.")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// This sets the default COM visibility of types in the assembly to invisible. -// If you need to expose index type to COM, use [ComVisible(true)] on that type. -[assembly: ComVisible(false)] - -// The assembly version has following format : -// -// Major.Minor.Build.Revision -// -// You can specify all the values or you can use the default the Revision and -// Build Numbers by using the '*' as shown below: -[assembly: AssemblyVersion("7.0.011207.31")] -#if (!CF) -[assembly: AssemblyFileVersion("7.0.011207.31")] -#endif -[assembly: NeutralResourcesLanguage("en-US")] -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Lextm")] - -[assembly: InternalsVisibleTo("SharpSnmpLib.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f7030532c52524" -+ "993841a0d09420340f3814e1b65473851bdcd18815510b035a2ae9ecee69c4cd2d9e4d6e6d5fbf" -+ "a564e86c4a4cddc9597619a31c060846ebb2e99511a0323ff82b1ebd95d6a4912502945f0e769f" -+ "190a69a439dbfb969ebad72a6f7e2e047907da4a7b9c08c6e98d5f1be8b8cafaf3eb978914059a" -+ "245d4bc1")] diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Properties/Resources.Designer.cs b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Properties/Resources.Designer.cs deleted file mode 100644 index 38bc6bb9..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// Dieser Code wurde von einem Tool generiert. -// Laufzeitversion:4.0.30319.225 -// -// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn -// der Code erneut generiert wird. -// -//------------------------------------------------------------------------------ - -namespace Lextm.SharpSnmpLib.Mib { - using System; - - - /// - /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. - /// - // Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert - // -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert. - // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen - // mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Lextm.SharpSnmpLib.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle - /// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Properties/Resources.resx b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Properties/Resources.resx deleted file mode 100644 index 7080a7d1..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/Properties/Resources.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/SharpSnmpLib.Mib.csproj b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/SharpSnmpLib.Mib.csproj deleted file mode 100644 index 2cf86578..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/SharpSnmpLib.Mib.csproj +++ /dev/null @@ -1,140 +0,0 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {CBE20411-5DB7-487D-825D-7694267BB6F5} - Library - Properties - Lextm.SharpSnmpLib - SharpSnmpLib.Mib - ..\bin\SharpSnmpLib.Mib.xml - 512 - - True - sharpsnmplib.snk - False - File - - - - - - - - - False - v4.0 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - True - True - Resources.resx - - - - - - - - - - - ResXFileCodeGenerator - Resources.Designer.cs - Lextm.SharpSnmpLib.Mib - Designer - - - - - - - - \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/license.txt b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/license.txt deleted file mode 100644 index 27946de2..00000000 --- a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/license.txt +++ /dev/null @@ -1,458 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/sharpsnmplib.snk b/src/apps/snmp/LwipMibCompiler/SharpSnmpLib/sharpsnmplib.snk deleted file mode 100644 index fe6f345af4820b6758f6909a2d489ac524eaf889..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50098^0|he0B_x?RL7>o-AT$p+6ydg1bA=n+ z(TEjM3jFn-l#LX?9O>S*pzolg8Y)VYs$ys(8qZ|eZM(eWal@XvaKlm#iy_MFa zktG6@Uk-Mk8478nIotb|p1Rj6Z+5X3-=(x)I^Xr$16a|_jT}#2q z4>os95Q>xdhUx6jI|K!RX~hw1f!(|e#!5;$P6^h;CwzlPPCzNSv5=EJ`&INw3Z=7z zpCl>Gkp_CX1_JoM)uqwp7RO;18$@HiTuXhh8G#I(lCQ>caMi|5DbsK=Ij`BFCHTSV z)k^SjW~pvk&&IH|pd-nVVYBt0_=U$ArZ<6G8WE6Fm+B494}Ss(+%Lc_4Ia8yP8XWx z#8OMKTbAeI*{B6YjJi>DVo}}N8VwM^Q}Dt#D!-QYa4P@XO=Y9CSTeQ4?wa diff --git a/src/apps/snmp/LwipMibCompiler/example/compile_udp_mib.cmd b/src/apps/snmp/LwipMibCompiler/example/compile_udp_mib.cmd deleted file mode 100644 index 1c84dbfe..00000000 --- a/src/apps/snmp/LwipMibCompiler/example/compile_udp_mib.cmd +++ /dev/null @@ -1 +0,0 @@ -..\LwipMibCompiler\bin\Debug\LwipMibCompiler.exe ..\Mibs\UDP-MIB .\ ..\Mibs\ diff --git a/src/apps/snmp/LwipMibCompiler/example/compile_udp_mib.sh b/src/apps/snmp/LwipMibCompiler/example/compile_udp_mib.sh deleted file mode 100755 index 93798c01..00000000 --- a/src/apps/snmp/LwipMibCompiler/example/compile_udp_mib.sh +++ /dev/null @@ -1 +0,0 @@ -../LwipMibCompiler/bin/Debug/LwipMibCompiler.exe ../Mibs/UDP-MIB ./ ../Mibs/ diff --git a/src/apps/snmp/snmp_core.c b/src/apps/snmp/snmp_core.c index 5c8b42fe..0887243c 100644 --- a/src/apps/snmp/snmp_core.c +++ b/src/apps/snmp/snmp_core.c @@ -37,7 +37,8 @@ * @defgroup snmp SNMPv2c agent * @ingroup apps * SNMPv2c compatible agent\n - * There is also a MIB compiler and a MIB viewer included in this project.\n + * There is also a MIB compiler and a MIB viewer in lwIP contrib repository + * (lwip-contrib/apps/LwipMibCompiler).\n * The agent implements the most important MIB2 MIBs including IPv6 support * (interfaces, UDP, TCP, SNMP, ICMP, SYSTEM). IP MIB is an older version * whithout IPv6 statistics (TODO).\n From 3f0dae29e996f5f2015524500bc3e8f136315d8c Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Thu, 28 Jul 2016 18:59:36 +0200 Subject: [PATCH 257/275] Fix my messing of opt.h and the other options files - it was actually caused by a cyclic #include which I did not see Read the comments inside opt.h if you are interested. --- doc/doxygen/lwip.Doxyfile | 9 +- src/include/lwip/apps/httpd_opts.h | 92 ++-- src/include/lwip/apps/netbiosns_opts.h | 2 +- src/include/lwip/apps/snmp_opts.h | 46 +- src/include/lwip/apps/sntp_opts.h | 32 +- src/include/lwip/opt.h | 591 ++++++++++++++----------- 6 files changed, 413 insertions(+), 359 deletions(-) diff --git a/doc/doxygen/lwip.Doxyfile b/doc/doxygen/lwip.Doxyfile index dd5f828c..0908d858 100644 --- a/doc/doxygen/lwip.Doxyfile +++ b/doc/doxygen/lwip.Doxyfile @@ -2098,7 +2098,7 @@ PREDEFINED = __DOXYGEN__=1 \ LWIP_STATS=1 \ MEM_USE_POOLS=0 \ LWIP_DNS=1 \ - LWIP_SOCKETS=1 \ + LWIP_SOCKET=1 \ LWIP_NETCONN=1 \ IP_SOF_BROADCAST=1 \ IP_SOF_BROADCAST_RECV=1 \ @@ -2109,9 +2109,10 @@ PREDEFINED = __DOXYGEN__=1 \ SO_REUSE=1 \ SO_REUSE_RXTOALL=1 \ LWIP_HAVE_SLIPIF=1 \ - LWIP_6LOWPAN=1 \ - "LWIP_DNS && LWIP_SOCKET " \ - "(LWIP_DNS && LWIP_SOCKET)=1 " + LWIP_6LOWPAN=1 + +# DONT FORGET to #undef EVERY OPTION IN opt.h AGAIN! +# ================================================== # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The diff --git a/src/include/lwip/apps/httpd_opts.h b/src/include/lwip/apps/httpd_opts.h index 5fa84024..9f5d8b89 100644 --- a/src/include/lwip/apps/httpd_opts.h +++ b/src/include/lwip/apps/httpd_opts.h @@ -50,33 +50,33 @@ */ /** Set this to 1 to support CGI (old style) */ -#if !defined LWIP_HTTPD_CGI || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_CGI #define LWIP_HTTPD_CGI 0 #endif /** Set this to 1 to support CGI (new style) */ -#if !defined LWIP_HTTPD_CGI_SSI || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_CGI_SSI #define LWIP_HTTPD_CGI_SSI 0 #endif /** Set this to 1 to support SSI (Server-Side-Includes) */ -#if !defined LWIP_HTTPD_SSI || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_SSI #define LWIP_HTTPD_SSI 0 #endif /** Set this to 1 to implement an SSI tag handler callback that gets a const char* * to the tag (instead of an index into a pre-registered array of known tags) */ -#if !defined LWIP_HTTPD_SSI_RAW || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_SSI_RAW #define LWIP_HTTPD_SSI_RAW 0 #endif /** Set this to 1 to support HTTP POST */ -#if !defined LWIP_HTTPD_SUPPORT_POST || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_SUPPORT_POST #define LWIP_HTTPD_SUPPORT_POST 0 #endif /* The maximum number of parameters that the CGI handler can be sent. */ -#if !defined LWIP_HTTPD_MAX_CGI_PARAMETERS || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_MAX_CGI_PARAMETERS #define LWIP_HTTPD_MAX_CGI_PARAMETERS 16 #endif @@ -84,26 +84,26 @@ * arguments indicating a counter for insert string that are too long to be * inserted at once: the SSI handler function must then set 'next_tag_part' * which will be passed back to it in the next call. */ -#if !defined LWIP_HTTPD_SSI_MULTIPART || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_SSI_MULTIPART #define LWIP_HTTPD_SSI_MULTIPART 0 #endif /* The maximum length of the string comprising the tag name */ -#if !defined LWIP_HTTPD_MAX_TAG_NAME_LEN || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_MAX_TAG_NAME_LEN #define LWIP_HTTPD_MAX_TAG_NAME_LEN 8 #endif /* The maximum length of string that can be returned to replace any given tag */ -#if !defined LWIP_HTTPD_MAX_TAG_INSERT_LEN || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_MAX_TAG_INSERT_LEN #define LWIP_HTTPD_MAX_TAG_INSERT_LEN 192 #endif -#if !defined LWIP_HTTPD_POST_MANUAL_WND || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_POST_MANUAL_WND #define LWIP_HTTPD_POST_MANUAL_WND 0 #endif /** This string is passed in the HTTP header as "Server: " */ -#if !defined HTTPD_SERVER_AGENT || defined __DOXYGEN__ +#ifndef HTTPD_SERVER_AGENT #define HTTPD_SERVER_AGENT "lwIP/" LWIP_VERSION_STRING " (http://savannah.nongnu.org/projects/lwip)" #endif @@ -112,23 +112,23 @@ * by the makefsdata tool. Static headers mean smaller code size, but * the (readonly) fsdata will grow a bit as every file includes the HTTP * header. */ -#if !defined LWIP_HTTPD_DYNAMIC_HEADERS || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_DYNAMIC_HEADERS #define LWIP_HTTPD_DYNAMIC_HEADERS 0 #endif -#if !defined HTTPD_DEBUG || defined __DOXYGEN__ +#ifndef HTTPD_DEBUG #define HTTPD_DEBUG LWIP_DBG_OFF #endif /** Set this to 1 to use a memp pool for allocating * struct http_state instead of the heap. */ -#if !defined HTTPD_USE_MEM_POOL || defined __DOXYGEN__ +#ifndef HTTPD_USE_MEM_POOL #define HTTPD_USE_MEM_POOL 0 #endif /** The server port for HTTPD to use */ -#if !defined HTTPD_SERVER_PORT || defined __DOXYGEN__ +#ifndef HTTPD_SERVER_PORT #define HTTPD_SERVER_PORT 80 #endif @@ -136,44 +136,44 @@ * - number of times pcb->poll is called -> default is 4*500ms = 2s; * - reset when pcb->sent is called */ -#if !defined HTTPD_MAX_RETRIES || defined __DOXYGEN__ +#ifndef HTTPD_MAX_RETRIES #define HTTPD_MAX_RETRIES 4 #endif /** The poll delay is X*500ms */ -#if !defined HTTPD_POLL_INTERVAL || defined __DOXYGEN__ +#ifndef HTTPD_POLL_INTERVAL #define HTTPD_POLL_INTERVAL 4 #endif /** Priority for tcp pcbs created by HTTPD (very low by default). * Lower priorities get killed first when running out of memory. */ -#if !defined HTTPD_TCP_PRIO || defined __DOXYGEN__ +#ifndef HTTPD_TCP_PRIO #define HTTPD_TCP_PRIO TCP_PRIO_MIN #endif /** Set this to 1 to enable timing each file sent */ -#if !defined LWIP_HTTPD_TIMING || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_TIMING #define LWIP_HTTPD_TIMING 0 #endif /** Set this to 1 to enable timing each file sent */ -#if !defined HTTPD_DEBUG_TIMING || defined __DOXYGEN__ +#ifndef HTTPD_DEBUG_TIMING #define HTTPD_DEBUG_TIMING LWIP_DBG_OFF #endif /** Set this to 1 on platforms where strnstr is not available */ -#if !defined LWIP_HTTPD_STRNSTR_PRIVATE || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_STRNSTR_PRIVATE #define LWIP_HTTPD_STRNSTR_PRIVATE 1 #endif /** Set this to 1 on platforms where stricmp is not available */ -#if !defined LWIP_HTTPD_STRICMP_PRIVATE || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_STRICMP_PRIVATE #define LWIP_HTTPD_STRICMP_PRIVATE 0 #endif /** Define this to a smaller function if you have itoa() at hand... */ -#if !defined LWIP_HTTPD_ITOA || defined __DOXYGEN__ -#if !defined LWIP_HTTPD_ITOA_PRIVATE || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_ITOA +#ifndef LWIP_HTTPD_ITOA_PRIVATE #define LWIP_HTTPD_ITOA_PRIVATE 1 #endif #if LWIP_HTTPD_ITOA_PRIVATE @@ -185,12 +185,12 @@ /** Set this to one to show error pages when parsing a request fails instead of simply closing the connection. */ -#if !defined LWIP_HTTPD_SUPPORT_EXTSTATUS || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_SUPPORT_EXTSTATUS #define LWIP_HTTPD_SUPPORT_EXTSTATUS 0 #endif /** Set this to 0 to drop support for HTTP/0.9 clients (to save some bytes) */ -#if !defined LWIP_HTTPD_SUPPORT_V09 || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_SUPPORT_V09 #define LWIP_HTTPD_SUPPORT_V09 1 #endif @@ -198,32 +198,32 @@ * ATTENTION: If the generated file system includes HTTP headers, these must * include the "Connection: keep-alive" header (pass argument "-11" to makefsdata). */ -#if !defined LWIP_HTTPD_SUPPORT_11_KEEPALIVE || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_SUPPORT_11_KEEPALIVE #define LWIP_HTTPD_SUPPORT_11_KEEPALIVE 0 #endif /** Set this to 1 to support HTTP request coming in in multiple packets/pbufs */ -#if !defined LWIP_HTTPD_SUPPORT_REQUESTLIST || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_SUPPORT_REQUESTLIST #define LWIP_HTTPD_SUPPORT_REQUESTLIST 1 #endif #if LWIP_HTTPD_SUPPORT_REQUESTLIST /** Number of rx pbufs to enqueue to parse an incoming request (up to the first newline) */ -#if !defined LWIP_HTTPD_REQ_QUEUELEN || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_REQ_QUEUELEN #define LWIP_HTTPD_REQ_QUEUELEN 5 #endif /** Number of (TCP payload-) bytes (in pbufs) to enqueue to parse and incoming request (up to the first double-newline) */ -#if !defined LWIP_HTTPD_REQ_BUFSIZE || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_REQ_BUFSIZE #define LWIP_HTTPD_REQ_BUFSIZE LWIP_HTTPD_MAX_REQ_LENGTH #endif /** Defines the maximum length of a HTTP request line (up to the first CRLF, copied from pbuf into this a global buffer when pbuf- or packet-queues are received - otherwise the input pbuf is used directly) */ -#if !defined LWIP_HTTPD_MAX_REQ_LENGTH || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_MAX_REQ_LENGTH #define LWIP_HTTPD_MAX_REQ_LENGTH LWIP_MIN(1023, (LWIP_HTTPD_REQ_QUEUELEN * PBUF_POOL_BUFSIZE)) #endif #endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ @@ -233,27 +233,27 @@ * configured default file names. * Set to 0 to disable checking default filenames on non-root directories. */ -#if !defined LWIP_HTTPD_MAX_REQUEST_URI_LEN || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_MAX_REQUEST_URI_LEN #define LWIP_HTTPD_MAX_REQUEST_URI_LEN 63 #endif /** Maximum length of the filename to send as response to a POST request, * filled in by the application when a POST is finished. */ -#if !defined LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN #define LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN 63 #endif /** Set this to 0 to not send the SSI tag (default is on, so the tag will * be sent in the HTML page */ -#if !defined LWIP_HTTPD_SSI_INCLUDE_TAG || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_SSI_INCLUDE_TAG #define LWIP_HTTPD_SSI_INCLUDE_TAG 1 #endif /** Set this to 1 to call tcp_abort when tcp_close fails with memory error. * This can be used to prevent consuming all memory in situations where the * HTTP server has low priority compared to other communication. */ -#if !defined LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR #define LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR 0 #endif @@ -261,30 +261,30 @@ * memory for 'struct http_state' or 'struct http_ssi_state'. * ATTENTION: This puts all connections on a linked list, so may be kind of slow. */ -#if !defined LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED #define LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED 0 #endif /** Set this to 1 to send URIs without extension without headers * (who uses this at all??) */ -#if !defined LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI #define LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI 0 #endif /** Default: Tags are sent from struct http_state and are therefore volatile */ -#if !defined HTTP_IS_TAG_VOLATILE || defined __DOXYGEN__ +#ifndef HTTP_IS_TAG_VOLATILE #define HTTP_IS_TAG_VOLATILE(ptr) TCP_WRITE_FLAG_COPY #endif /* By default, the httpd is limited to send 2*pcb->mss to keep resource usage low when http is not an important protocol in the device. */ -#if !defined HTTPD_LIMIT_SENDING_TO_2MSS || defined __DOXYGEN__ +#ifndef HTTPD_LIMIT_SENDING_TO_2MSS #define HTTPD_LIMIT_SENDING_TO_2MSS 1 #endif /* Define this to a function that returns the maximum amount of data to enqueue. The function have this signature: u16_t fn(struct tcp_pcb* pcb); */ -#if !defined HTTPD_MAX_WRITE_LEN || defined __DOXYGEN__ +#ifndef HTTPD_MAX_WRITE_LEN #if HTTPD_LIMIT_SENDING_TO_2MSS #define HTTPD_MAX_WRITE_LEN(pcb) (2 * tcp_mss(pcb)) #endif @@ -299,7 +299,7 @@ * - "void fs_close_custom(struct fs_file *file)" * Called to free resources allocated by fs_open_custom(). */ -#if !defined LWIP_HTTPD_CUSTOM_FILES || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_CUSTOM_FILES #define LWIP_HTTPD_CUSTOM_FILES 0 #endif @@ -307,34 +307,34 @@ * Without this (default=off), only one-block files are supported, * and the contents must be ready after fs_open(). */ -#if !defined LWIP_HTTPD_DYNAMIC_FILE_READ || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_DYNAMIC_FILE_READ #define LWIP_HTTPD_DYNAMIC_FILE_READ 0 #endif /** Set this to 1 to include an application state argument per file * that is opened. This allows to keep a state per connection/file. */ -#if !defined LWIP_HTTPD_FILE_STATE || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_FILE_STATE #define LWIP_HTTPD_FILE_STATE 0 #endif /** HTTPD_PRECALCULATED_CHECKSUM==1: include precompiled checksums for * predefined (MSS-sized) chunks of the files to prevent having to calculate * the checksums at runtime. */ -#if !defined HTTPD_PRECALCULATED_CHECKSUM || defined __DOXYGEN__ +#ifndef HTTPD_PRECALCULATED_CHECKSUM #define HTTPD_PRECALCULATED_CHECKSUM 0 #endif /** LWIP_HTTPD_FS_ASYNC_READ==1: support asynchronous read operations * (fs_read_async returns FS_READ_DELAYED and calls a callback when finished). */ -#if !defined LWIP_HTTPD_FS_ASYNC_READ || defined __DOXYGEN__ +#ifndef LWIP_HTTPD_FS_ASYNC_READ #define LWIP_HTTPD_FS_ASYNC_READ 0 #endif /** Set this to 1 to include "fsdata_custom.c" instead of "fsdata.c" for the * file system (to prevent changing the file included in CVS) */ -#if !defined HTTPD_USE_CUSTOM_FSDATA || defined __DOXYGEN__ +#ifndef HTTPD_USE_CUSTOM_FSDATA #define HTTPD_USE_CUSTOM_FSDATA 0 #endif diff --git a/src/include/lwip/apps/netbiosns_opts.h b/src/include/lwip/apps/netbiosns_opts.h index 870b9fdf..6b7616c3 100644 --- a/src/include/lwip/apps/netbiosns_opts.h +++ b/src/include/lwip/apps/netbiosns_opts.h @@ -46,7 +46,7 @@ * If not defined, comparision is case sensitive and the provided hostname must be * uppercase. */ -#if !defined NETBIOS_STRCMP || defined __DOXYGEN__ +#ifndef NETBIOS_STRCMP #define NETBIOS_STRCMP(str1, str2) strcmp(str1, str2) #endif diff --git a/src/include/lwip/apps/snmp_opts.h b/src/include/lwip/apps/snmp_opts.h index bf6f0093..a921b1c7 100644 --- a/src/include/lwip/apps/snmp_opts.h +++ b/src/include/lwip/apps/snmp_opts.h @@ -53,7 +53,7 @@ * LWIP_MIB2_CALLBACKS and MIB2_STATS. This will give you the callbacks * and statistics counters you need to get MIB2 working. */ -#if !defined LWIP_SNMP || defined __DOXYGEN__ +#ifndef LWIP_SNMP #define LWIP_SNMP 0 #endif @@ -62,7 +62,7 @@ * Makes SNMP agent run in a worker thread, so blocking operations * can be done in MIB calls. */ -#if !defined SNMP_USE_NETCONN || defined __DOXYGEN__ +#ifndef SNMP_USE_NETCONN #define SNMP_USE_NETCONN 0 #endif @@ -71,7 +71,7 @@ * SNMP agent does not run in a worker thread, so blocking operations * should not be done in MIB calls. */ -#if !defined SNMP_USE_RAW || defined __DOXYGEN__ +#ifndef SNMP_USE_RAW #define SNMP_USE_RAW 1 #endif @@ -87,14 +87,14 @@ /** * SNMP_STACK_SIZE: Stack size of SNMP netconn worker thread */ -#if !defined SNMP_STACK_SIZE || defined __DOXYGEN__ +#ifndef SNMP_STACK_SIZE #define SNMP_STACK_SIZE DEFAULT_THREAD_STACKSIZE #endif /** * SNMP_THREAD_PRIO: SNMP netconn worker thread priority */ -#if !defined SNMP_THREAD_PRIO || defined __DOXYGEN__ +#ifndef SNMP_THREAD_PRIO #define SNMP_THREAD_PRIO DEFAULT_THREAD_PRIO #endif #endif /* SNMP_USE_NETCONN */ @@ -103,7 +103,7 @@ * SNMP_TRAP_DESTINATIONS: Number of trap destinations. At least one trap * destination is required */ -#if !defined SNMP_TRAP_DESTINATIONS || defined __DOXYGEN__ +#ifndef SNMP_TRAP_DESTINATIONS #define SNMP_TRAP_DESTINATIONS 1 #endif @@ -112,14 +112,14 @@ * a safe action and disabled when SNMP_SAFE_REQUESTS = 1). * Unsafe requests are disabled by default! */ -#if !defined SNMP_SAFE_REQUESTS || defined __DOXYGEN__ +#ifndef SNMP_SAFE_REQUESTS #define SNMP_SAFE_REQUESTS 1 #endif /** * The maximum length of strings used. */ -#if !defined SNMP_MAX_OCTET_STRING_LEN || defined __DOXYGEN__ +#ifndef SNMP_MAX_OCTET_STRING_LEN #define SNMP_MAX_OCTET_STRING_LEN 127 #endif @@ -127,11 +127,11 @@ * The maximum number of Sub ID's inside an object identifier. * Indirectly this also limits the maximum depth of SNMP tree. */ -#if !defined SNMP_MAX_OBJ_ID_LEN || defined __DOXYGEN__ +#ifndef SNMP_MAX_OBJ_ID_LEN #define SNMP_MAX_OBJ_ID_LEN 50 #endif -#if !defined SNMP_MAX_VALUE_SIZE || defined __DOXYGEN__ +#ifndef SNMP_MAX_VALUE_SIZE /** * The maximum size of a value. */ @@ -146,7 +146,7 @@ * The snmp read-access community. Used for write-access and traps, too * unless SNMP_COMMUNITY_WRITE or SNMP_COMMUNITY_TRAP are enabled, respectively. */ -#if !defined SNMP_COMMUNITY || defined __DOXYGEN__ +#ifndef SNMP_COMMUNITY #define SNMP_COMMUNITY "public" #endif @@ -154,14 +154,14 @@ * The snmp write-access community. * Set this community to "" in order to disallow any write access. */ -#if !defined SNMP_COMMUNITY_WRITE || defined __DOXYGEN__ +#ifndef SNMP_COMMUNITY_WRITE #define SNMP_COMMUNITY_WRITE "private" #endif /** * The snmp community used for sending traps. */ -#if !defined SNMP_COMMUNITY_TRAP || defined __DOXYGEN__ +#ifndef SNMP_COMMUNITY_TRAP #define SNMP_COMMUNITY_TRAP "public" #endif @@ -170,14 +170,14 @@ * If community names shall be adjusted at runtime via snmp_set_community() calls, * enter here the possible maximum length (+1 for terminating null character). */ -#if !defined SNMP_MAX_COMMUNITY_STR_LEN || defined __DOXYGEN__ +#ifndef SNMP_MAX_COMMUNITY_STR_LEN #define SNMP_MAX_COMMUNITY_STR_LEN LWIP_MAX(LWIP_MAX(sizeof(SNMP_COMMUNITY), sizeof(SNMP_COMMUNITY_WRITE)), sizeof(SNMP_COMMUNITY_TRAP)) #endif /** * The OID identifiying the device. This may be the enterprise OID itself or any OID located below it in tree. */ -#if !defined SNMP_DEVICE_ENTERPRISE_OID || defined __DOXYGEN__ +#ifndef SNMP_DEVICE_ENTERPRISE_OID #define SNMP_LWIP_ENTERPRISE_OID 26381 /** * IANA assigned enterprise ID for lwIP is 26381 @@ -202,28 +202,28 @@ /** * SNMP_DEBUG: Enable debugging for SNMP messages. */ -#if !defined SNMP_DEBUG || defined __DOXYGEN__ +#ifndef SNMP_DEBUG #define SNMP_DEBUG LWIP_DBG_OFF #endif /** * SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs. */ -#if !defined SNMP_MIB_DEBUG || defined __DOXYGEN__ +#ifndef SNMP_MIB_DEBUG #define SNMP_MIB_DEBUG LWIP_DBG_OFF #endif /** * Indicates if the MIB2 implementation of LWIP SNMP stack is used. */ -#if !defined SNMP_LWIP_MIB2 || defined __DOXYGEN__ +#ifndef SNMP_LWIP_MIB2 #define SNMP_LWIP_MIB2 LWIP_SNMP #endif /** * Value return for sysDesc field of MIB2. */ -#if !defined SNMP_LWIP_MIB2_SYSDESC || defined __DOXYGEN__ +#ifndef SNMP_LWIP_MIB2_SYSDESC #define SNMP_LWIP_MIB2_SYSDESC "lwIP" #endif @@ -231,7 +231,7 @@ * Value return for sysName field of MIB2. * To make sysName field settable, call snmp_mib2_set_sysname() to provide the necessary buffers. */ -#if !defined SNMP_LWIP_MIB2_SYSNAME || defined __DOXYGEN__ +#ifndef SNMP_LWIP_MIB2_SYSNAME #define SNMP_LWIP_MIB2_SYSNAME "FQDN-unk" #endif @@ -239,7 +239,7 @@ * Value return for sysContact field of MIB2. * To make sysContact field settable, call snmp_mib2_set_syscontact() to provide the necessary buffers. */ -#if !defined SNMP_LWIP_MIB2_SYSCONTACT || defined __DOXYGEN__ +#ifndef SNMP_LWIP_MIB2_SYSCONTACT #define SNMP_LWIP_MIB2_SYSCONTACT "" #endif @@ -247,7 +247,7 @@ * Value return for sysLocation field of MIB2. * To make sysLocation field settable, call snmp_mib2_set_syslocation() to provide the necessary buffers. */ -#if !defined SNMP_LWIP_MIB2_SYSLOCATION || defined __DOXYGEN__ +#ifndef SNMP_LWIP_MIB2_SYSLOCATION #define SNMP_LWIP_MIB2_SYSLOCATION "" #endif @@ -259,7 +259,7 @@ * For the stack this could be useful in case that SNMP processing is done in TCP/IP thread. In this situation a request with many * repetitions could block the thread for a longer time. Setting limit here will keep the stack more responsive. */ -#if !defined SNMP_LWIP_GETBULK_MAX_REPETITIONS || defined __DOXYGEN__ +#ifndef SNMP_LWIP_GETBULK_MAX_REPETITIONS #define SNMP_LWIP_GETBULK_MAX_REPETITIONS 0 #endif diff --git a/src/include/lwip/apps/sntp_opts.h b/src/include/lwip/apps/sntp_opts.h index f3651f90..f6731231 100644 --- a/src/include/lwip/apps/sntp_opts.h +++ b/src/include/lwip/apps/sntp_opts.h @@ -49,18 +49,18 @@ * Define SNTP_SET_SYSTEM_TIME_US(sec, us) to set the time in microseconds instead of this one * if you need the additional precision. */ -#if !defined SNTP_SET_SYSTEM_TIME || defined __DOXYGEN__ +#ifndef SNTP_SET_SYSTEM_TIME #define SNTP_SET_SYSTEM_TIME(sec) LWIP_UNUSED_ARG(sec) #endif /** The maximum number of SNTP servers that can be set */ -#if !defined SNTP_MAX_SERVERS || defined __DOXYGEN__ +#ifndef SNTP_MAX_SERVERS #define SNTP_MAX_SERVERS LWIP_DHCP_MAX_NTP_SERVERS #endif /** Set this to 1 to implement the callback function called by dhcp when * NTP servers are received. */ -#if !defined SNTP_GET_SERVERS_FROM_DHCP || defined __DOXYGEN__ +#ifndef SNTP_GET_SERVERS_FROM_DHCP #define SNTP_GET_SERVERS_FROM_DHCP LWIP_DHCP_GET_NTP_SRV #endif @@ -68,24 +68,24 @@ * One server address/name can be defined as default if SNTP_SERVER_DNS == 1: * \#define SNTP_SERVER_ADDRESS "pool.ntp.org" */ -#if !defined SNTP_SERVER_DNS || defined __DOXYGEN__ +#ifndef SNTP_SERVER_DNS #define SNTP_SERVER_DNS 0 #endif /** * SNTP_DEBUG: Enable debugging for SNTP. */ -#if !defined SNTP_DEBUG || defined __DOXYGEN__ +#ifndef SNTP_DEBUG #define SNTP_DEBUG LWIP_DBG_OFF #endif /** SNTP server port */ -#if !defined SNTP_PORT || defined __DOXYGEN__ +#ifndef SNTP_PORT #define SNTP_PORT 123 #endif /** Set this to 1 to allow config of SNTP server(s) by DNS name */ -#if !defined SNTP_SERVER_DNS || defined __DOXYGEN__ +#ifndef SNTP_SERVER_DNS #define SNTP_SERVER_DNS 0 #endif @@ -103,7 +103,7 @@ * currently a cozy number like one second. This check avoids using a * server whose synchronization source has expired for a very long time. */ -#if !defined SNTP_CHECK_RESPONSE || defined __DOXYGEN__ +#ifndef SNTP_CHECK_RESPONSE #define SNTP_CHECK_RESPONSE 0 #endif @@ -113,14 +113,14 @@ * which must return the delay in milliseconds as u32_t. * Turned off by default. */ -#if !defined SNTP_STARTUP_DELAY || defined __DOXYGEN__ +#ifndef SNTP_STARTUP_DELAY #define SNTP_STARTUP_DELAY 0 #endif /** If you want the startup delay to be a function, define this * to a function (including the brackets) and define SNTP_STARTUP_DELAY to 1. */ -#if !defined SNTP_STARTUP_DELAY_FUNC || defined __DOXYGEN__ +#ifndef SNTP_STARTUP_DELAY_FUNC #define SNTP_STARTUP_DELAY_FUNC SNTP_STARTUP_DELAY #endif @@ -128,21 +128,21 @@ * Also used as retry timeout - this shouldn't be too low. * Default is 3 seconds. */ -#if !defined SNTP_RECV_TIMEOUT || defined __DOXYGEN__ +#ifndef SNTP_RECV_TIMEOUT #define SNTP_RECV_TIMEOUT 3000 #endif /** SNTP update delay - in milliseconds * Default is 1 hour. Must not be beolw 15 seconds by specification (i.e. 15000) */ -#if !defined SNTP_UPDATE_DELAY || defined __DOXYGEN__ +#ifndef SNTP_UPDATE_DELAY #define SNTP_UPDATE_DELAY 3600000 #endif /** SNTP macro to get system time, used with SNTP_CHECK_RESPONSE >= 2 * to send in request and compare in response. */ -#if !defined SNTP_GET_SYSTEM_TIME || defined __DOXYGEN__ +#ifndef SNTP_GET_SYSTEM_TIME #define SNTP_GET_SYSTEM_TIME(sec, us) do { (sec) = 0; (us) = 0; } while(0) #endif @@ -150,19 +150,19 @@ * received is invalid. * This is doubled with each retry until SNTP_RETRY_TIMEOUT_MAX is reached. */ -#if !defined SNTP_RETRY_TIMEOUT || defined __DOXYGEN__ +#ifndef SNTP_RETRY_TIMEOUT #define SNTP_RETRY_TIMEOUT SNTP_RECV_TIMEOUT #endif /** Maximum retry timeout (in milliseconds). */ -#if !defined SNTP_RETRY_TIMEOUT_MAX || defined __DOXYGEN__ +#ifndef SNTP_RETRY_TIMEOUT_MAX #define SNTP_RETRY_TIMEOUT_MAX (SNTP_RETRY_TIMEOUT * 10) #endif /** Increase retry timeout with every retry sent * Default is on to conform to RFC. */ -#if !defined SNTP_RETRY_TIMEOUT_EXP || defined __DOXYGEN__ +#ifndef SNTP_RETRY_TIMEOUT_EXP #define SNTP_RETRY_TIMEOUT_EXP 1 #endif diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index b37124ce..76d050dd 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -36,12 +36,7 @@ * */ -/* - * NOTE: || defined __DOXYGEN__ is a workaround for doxygen bug - - * without this, doxygen does not see the actual #define - */ - -#if !defined LWIP_HDR_OPT_H +#ifndef LWIP_HDR_OPT_H #define LWIP_HDR_OPT_H /* @@ -49,7 +44,65 @@ * will be set to standard values. Override anything you don't like! */ #include "lwipopts.h" + +/* + * By #including lwip/debug.h which in turn includes opt.h again, + * all macros are #defined and doxygen won't see them any more + * due to #ifndef foo - #endif guards. This is circumvented + * by surrounding the #include with #ifndef __DOXYGEN__ + */ +#ifndef __DOXYGEN__ #include "lwip/debug.h" +#endif + +/* + * Some #defines are made in lwip.Doxygen to make the tool pick up + * all code in the source files. Unfortunately, this prevents picking up + * the same #define in here, so we need to #undef them first... + */ +#ifdef __DOXYGEN__ +#undef NO_SYS +#undef SYS_LIGHTWEIGHT_PROT +#undef LWIP_IPV4 +#undef LWIP_IPV6 +#undef LWIP_ICMP +#undef LWIP_RAW +#undef LWIP_DHCP +#undef LWIP_UDPLITE +#undef LWIP_UDP +#undef LWIP_IGMP +#undef LWIP_TCP +#undef LWIP_SNMP +#undef SNMP_USE_NETCONN +#undef SNMP_USE_RAW +#undef MEMP_OVERFLOW_CHECK +#undef MEMP_SANITY_CHECK +#undef LWIP_ARP +#undef LWIP_HAVE_LOOPIF +#undef LWIP_NETIF_HOSTNAME +#undef LWIP_NETIF_API +#undef LWIP_NETIF_CALLBACK +#undef LWIP_NETIF_REMOVE_CALLBACK +#undef LWIP_NETIF_LINK_CALLBACK +#undef ENABLE_LOOPBACK +#undef LWIP_AUTOIP +#undef ARP_QUEUEING +#undef LWIP_STATS +#undef MEM_USE_POOLS +#undef LWIP_DNS +#undef LWIP_SOCKET +#undef LWIP_NETCONN +#undef IP_SOF_BROADCAST +#undef IP_SOF_BROADCAST_RECV +#undef LWIP_NETIF_API +#undef LWIP_SO_SNDTIMEO +#undef LWIP_SO_RCVBUF +#undef LWIP_SO_LINGER +#undef SO_REUSE +#undef SO_REUSE_RXTOALL +#undef LWIP_HAVE_SLIPIF +#undef LWIP_6LOWPAN +#endif /** * @defgroup lwip_opts Options (lwipopts.h) @@ -85,7 +138,7 @@ * available (and you have to watch out for yourself that you don't access * lwIP functions/structures from more than one context at a time!) */ -#if !defined NO_SYS || defined __DOXYGEN__ +#ifndef NO_SYS #define NO_SYS 0 #endif /** @@ -102,7 +155,7 @@ * (the array of lwip-internal cyclic timers is still provided) * (check NO_SYS_NO_TIMERS for compatibility to old versions) */ -#if !defined LWIP_TIMERS || defined __DOXYGEN__ +#ifndef LWIP_TIMERS #ifdef NO_SYS_NO_TIMERS #define LWIP_TIMERS (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS)) #else @@ -117,7 +170,7 @@ * will be required: sys_timeouts_init(), sys_timeout(), sys_untimeout(), * sys_timeouts_mbox_fetch() */ -#if !defined LWIP_TIMERS_CUSTOM || defined __DOXYGEN__ +#ifndef LWIP_TIMERS_CUSTOM #define LWIP_TIMERS_CUSTOM 0 #endif /** @@ -133,7 +186,7 @@ * MEMCPY: override this if you have a faster implementation at hand than the * one included in your C library */ -#if !defined MEMCPY || defined __DOXYGEN__ +#ifndef MEMCPY #define MEMCPY(dst,src,len) memcpy(dst,src,len) #endif @@ -141,7 +194,7 @@ * SMEMCPY: override this with care! Some compilers (e.g. gcc) can inline a * call to memcpy() if the length is known at compile time and is small. */ -#if !defined SMEMCPY || defined __DOXYGEN__ +#ifndef SMEMCPY #define SMEMCPY(dst,src,len) memcpy(dst,src,len) #endif /** @@ -165,7 +218,7 @@ * (this decreases performance as memory is allocated from pools instead * of keeping it on the stack) */ -#if !defined LWIP_MPU_COMPATIBLE || defined __DOXYGEN__ +#ifndef LWIP_MPU_COMPATIBLE #define LWIP_MPU_COMPATIBLE 0 #endif @@ -177,7 +230,7 @@ * UNLOCK_TCPIP_CORE(). * Your system should provide mutexes supporting priority inversion to use this. */ -#if !defined LWIP_TCPIP_CORE_LOCKING || defined __DOXYGEN__ +#ifndef LWIP_TCPIP_CORE_LOCKING #define LWIP_TCPIP_CORE_LOCKING 1 #endif @@ -189,7 +242,7 @@ * ATTENTION: this does not work when tcpip_input() is called from * interrupt context! */ -#if !defined LWIP_TCPIP_CORE_LOCKING_INPUT || defined __DOXYGEN__ +#ifndef LWIP_TCPIP_CORE_LOCKING_INPUT #define LWIP_TCPIP_CORE_LOCKING_INPUT 0 #endif @@ -200,7 +253,7 @@ * ATTENTION: This is required when using lwIP from more than one context! If * you disable this, you must be sure what you are doing! */ -#if !defined SYS_LIGHTWEIGHT_PROT || defined __DOXYGEN__ +#ifndef SYS_LIGHTWEIGHT_PROT #define SYS_LIGHTWEIGHT_PROT 1 #endif /** @@ -222,7 +275,7 @@ * instead of the lwip internal allocator. Can save code size if you * already use it. */ -#if !defined MEM_LIBC_MALLOC || defined __DOXYGEN__ +#ifndef MEM_LIBC_MALLOC #define MEM_LIBC_MALLOC 0 #endif @@ -235,7 +288,7 @@ * ATTENTION: Currently, this uses the heap for ALL pools (also for private pools, * not only for internal pools defined in memp_std.h)! */ -#if !defined MEMP_MEM_MALLOC || defined __DOXYGEN__ +#ifndef MEMP_MEM_MALLOC #define MEMP_MEM_MALLOC 0 #endif @@ -244,7 +297,7 @@ * 4 byte alignment -> \#define MEM_ALIGNMENT 4 * 2 byte alignment -> \#define MEM_ALIGNMENT 2 */ -#if !defined MEM_ALIGNMENT || defined __DOXYGEN__ +#ifndef MEM_ALIGNMENT #define MEM_ALIGNMENT 1 #endif @@ -252,7 +305,7 @@ * MEM_SIZE: the size of the heap memory. If the application will send * a lot of data that needs to be copied, this should be set high. */ -#if !defined MEM_SIZE || defined __DOXYGEN__ +#ifndef MEM_SIZE #define MEM_SIZE 1600 #endif @@ -265,7 +318,7 @@ * MEMP_OVERFLOW_CHECK >= 2 checks each element in every pool every time * memp_malloc() or memp_free() is called (useful but slow!) */ -#if !defined MEMP_OVERFLOW_CHECK || defined __DOXYGEN__ +#ifndef MEMP_OVERFLOW_CHECK #define MEMP_OVERFLOW_CHECK 0 #endif @@ -273,7 +326,7 @@ * MEMP_SANITY_CHECK==1: run a sanity check after each memp_free() to make * sure that there are no cycles in the linked lists. */ -#if !defined MEMP_SANITY_CHECK || defined __DOXYGEN__ +#ifndef MEMP_SANITY_CHECK #define MEMP_SANITY_CHECK 0 #endif @@ -283,7 +336,7 @@ * the smallest pool that can provide the length needed is returned. * To use this, MEMP_USE_CUSTOM_POOLS also has to be enabled. */ -#if !defined MEM_USE_POOLS || defined __DOXYGEN__ +#ifndef MEM_USE_POOLS #define MEM_USE_POOLS 0 #endif @@ -291,7 +344,7 @@ * MEM_USE_POOLS_TRY_BIGGER_POOL==1: if one malloc-pool is empty, try the next * bigger pool - WARNING: THIS MIGHT WASTE MEMORY but it can make a system more * reliable. */ -#if !defined MEM_USE_POOLS_TRY_BIGGER_POOL || defined __DOXYGEN__ +#ifndef MEM_USE_POOLS_TRY_BIGGER_POOL #define MEM_USE_POOLS_TRY_BIGGER_POOL 0 #endif @@ -301,7 +354,7 @@ * by lwIP. If you set this to 1, you must have lwippools.h in your * include path somewhere. */ -#if !defined MEMP_USE_CUSTOM_POOLS || defined __DOXYGEN__ +#ifndef MEMP_USE_CUSTOM_POOLS #define MEMP_USE_CUSTOM_POOLS 0 #endif @@ -323,7 +376,7 @@ * - pbuf_free_callback(p); * - mem_free_callback(m); */ -#if !defined LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT || defined __DOXYGEN__ +#ifndef LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT #define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 0 #endif /** @@ -345,7 +398,7 @@ * If the application sends a lot of data out of ROM (or other static memory), * this should be set high. */ -#if !defined MEMP_NUM_PBUF || defined __DOXYGEN__ +#ifndef MEMP_NUM_PBUF #define MEMP_NUM_PBUF 16 #endif @@ -353,7 +406,7 @@ * MEMP_NUM_RAW_PCB: Number of raw connection PCBs * (requires the LWIP_RAW option) */ -#if !defined MEMP_NUM_RAW_PCB || defined __DOXYGEN__ +#ifndef MEMP_NUM_RAW_PCB #define MEMP_NUM_RAW_PCB 4 #endif @@ -362,7 +415,7 @@ * per active UDP "connection". * (requires the LWIP_UDP option) */ -#if !defined MEMP_NUM_UDP_PCB || defined __DOXYGEN__ +#ifndef MEMP_NUM_UDP_PCB #define MEMP_NUM_UDP_PCB 4 #endif @@ -370,7 +423,7 @@ * MEMP_NUM_TCP_PCB: the number of simultaneously active TCP connections. * (requires the LWIP_TCP option) */ -#if !defined MEMP_NUM_TCP_PCB || defined __DOXYGEN__ +#ifndef MEMP_NUM_TCP_PCB #define MEMP_NUM_TCP_PCB 5 #endif @@ -378,7 +431,7 @@ * MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections. * (requires the LWIP_TCP option) */ -#if !defined MEMP_NUM_TCP_PCB_LISTEN || defined __DOXYGEN__ +#ifndef MEMP_NUM_TCP_PCB_LISTEN #define MEMP_NUM_TCP_PCB_LISTEN 8 #endif @@ -386,7 +439,7 @@ * MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments. * (requires the LWIP_TCP option) */ -#if !defined MEMP_NUM_TCP_SEG || defined __DOXYGEN__ +#ifndef MEMP_NUM_TCP_SEG #define MEMP_NUM_TCP_SEG 16 #endif @@ -394,7 +447,7 @@ * MEMP_NUM_REASSDATA: the number of IP packets simultaneously queued for * reassembly (whole packets, not fragments!) */ -#if !defined MEMP_NUM_REASSDATA || defined __DOXYGEN__ +#ifndef MEMP_NUM_REASSDATA #define MEMP_NUM_REASSDATA 5 #endif @@ -405,7 +458,7 @@ * LWIP_NETIF_TX_SINGLE_PBUF==0 and only has to be > 1 with DMA-enabled MACs * where the packet is not yet sent when netif->output returns. */ -#if !defined MEMP_NUM_FRAG_PBUF || defined __DOXYGEN__ +#ifndef MEMP_NUM_FRAG_PBUF #define MEMP_NUM_FRAG_PBUF 15 #endif @@ -415,7 +468,7 @@ * their destination address) to finish. * (requires the ARP_QUEUEING option) */ -#if !defined MEMP_NUM_ARP_QUEUE || defined __DOXYGEN__ +#ifndef MEMP_NUM_ARP_QUEUE #define MEMP_NUM_ARP_QUEUE 30 #endif @@ -425,7 +478,7 @@ * per netif membership). * (requires the LWIP_IGMP option) */ -#if !defined MEMP_NUM_IGMP_GROUP || defined __DOXYGEN__ +#ifndef MEMP_NUM_IGMP_GROUP #define MEMP_NUM_IGMP_GROUP 8 #endif @@ -434,7 +487,7 @@ * The default number of timeouts is calculated here for all enabled modules. * The formula expects settings to be either '0' or '1'. */ -#if !defined MEMP_NUM_SYS_TIMEOUT || defined __DOXYGEN__ +#ifndef MEMP_NUM_SYS_TIMEOUT #define MEMP_NUM_SYS_TIMEOUT (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + (PPP_SUPPORT*6*MEMP_NUM_PPP_PCB) + (LWIP_IPV6 ? (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD) : 0)) #endif @@ -442,7 +495,7 @@ * MEMP_NUM_NETBUF: the number of struct netbufs. * (only needed if you use the sequential API, like api_lib.c) */ -#if !defined MEMP_NUM_NETBUF || defined __DOXYGEN__ +#ifndef MEMP_NUM_NETBUF #define MEMP_NUM_NETBUF 2 #endif @@ -450,7 +503,7 @@ * MEMP_NUM_NETCONN: the number of struct netconns. * (only needed if you use the sequential API, like api_lib.c) */ -#if !defined MEMP_NUM_NETCONN || defined __DOXYGEN__ +#ifndef MEMP_NUM_NETCONN #define MEMP_NUM_NETCONN 4 #endif @@ -459,7 +512,7 @@ * for callback/timeout API communication. * (only needed if you use tcpip.c) */ -#if !defined MEMP_NUM_TCPIP_MSG_API || defined __DOXYGEN__ +#ifndef MEMP_NUM_TCPIP_MSG_API #define MEMP_NUM_TCPIP_MSG_API 8 #endif @@ -468,7 +521,7 @@ * for incoming packets. * (only needed if you use tcpip.c) */ -#if !defined MEMP_NUM_TCPIP_MSG_INPKT || defined __DOXYGEN__ +#ifndef MEMP_NUM_TCPIP_MSG_INPKT #define MEMP_NUM_TCPIP_MSG_INPKT 8 #endif @@ -476,7 +529,7 @@ * MEMP_NUM_NETDB: the number of concurrently running lwip_addrinfo() calls * (before freeing the corresponding memory using lwip_freeaddrinfo()). */ -#if !defined MEMP_NUM_NETDB || defined __DOXYGEN__ +#ifndef MEMP_NUM_NETDB #define MEMP_NUM_NETDB 1 #endif @@ -484,41 +537,41 @@ * MEMP_NUM_LOCALHOSTLIST: the number of host entries in the local host list * if DNS_LOCAL_HOSTLIST_IS_DYNAMIC==1. */ -#if !defined MEMP_NUM_LOCALHOSTLIST || defined __DOXYGEN__ +#ifndef MEMP_NUM_LOCALHOSTLIST #define MEMP_NUM_LOCALHOSTLIST 1 #endif /** * PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */ -#if !defined PBUF_POOL_SIZE || defined __DOXYGEN__ +#ifndef PBUF_POOL_SIZE #define PBUF_POOL_SIZE 16 #endif /** MEMP_NUM_API_MSG: the number of concurrently active calls to various * socket, netconn, and tcpip functions */ -#if !defined MEMP_NUM_API_MSG || defined __DOXYGEN__ +#ifndef MEMP_NUM_API_MSG #define MEMP_NUM_API_MSG MEMP_NUM_TCPIP_MSG_API #endif /** MEMP_NUM_DNS_API_MSG: the number of concurrently active calls to netconn_gethostbyname */ -#if !defined MEMP_NUM_DNS_API_MSG || defined __DOXYGEN__ +#ifndef MEMP_NUM_DNS_API_MSG #define MEMP_NUM_DNS_API_MSG MEMP_NUM_TCPIP_MSG_API #endif /** MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA: the number of concurrently active calls * to getsockopt/setsockopt */ -#if !defined MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA || defined __DOXYGEN__ +#ifndef MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA #define MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA MEMP_NUM_TCPIP_MSG_API #endif /** MEMP_NUM_NETIFAPI_MSG: the number of concurrently active calls to the * netifapi functions */ -#if !defined MEMP_NUM_NETIFAPI_MSG || defined __DOXYGEN__ +#ifndef MEMP_NUM_NETIFAPI_MSG #define MEMP_NUM_NETIFAPI_MSG MEMP_NUM_TCPIP_MSG_API #endif /** @@ -538,14 +591,14 @@ /** * LWIP_ARP==1: Enable ARP functionality. */ -#if !defined LWIP_ARP || defined __DOXYGEN__ +#ifndef LWIP_ARP #define LWIP_ARP 1 #endif /** * ARP_TABLE_SIZE: Number of active MAC-IP address pairs cached. */ -#if !defined ARP_TABLE_SIZE || defined __DOXYGEN__ +#ifndef ARP_TABLE_SIZE #define ARP_TABLE_SIZE 10 #endif @@ -553,7 +606,7 @@ * for ARP_TMR_INTERVAL = 1000, this is * (60 * 5) seconds = 5 minutes. */ -#if !defined ARP_MAXAGE || defined __DOXYGEN__ +#ifndef ARP_MAXAGE #define ARP_MAXAGE 300 #endif @@ -564,7 +617,7 @@ * startup time. Set this to 1 if you know your application sends more than one * packet in a row to an IP address that is not in the ARP cache. */ -#if !defined ARP_QUEUEING || defined __DOXYGEN__ +#ifndef ARP_QUEUEING #define ARP_QUEUEING 0 #endif @@ -572,7 +625,7 @@ * unresolved address by other network layers. Defaults to 3, 0 means disabled. * Old packets are dropped, new packets are queued. */ -#if !defined ARP_QUEUE_LEN || defined __DOXYGEN__ +#ifndef ARP_QUEUE_LEN #define ARP_QUEUE_LEN 3 #endif @@ -586,7 +639,7 @@ * The peer *is* in the ARP table if it requested our address before. * Also notice that this slows down input processing of every IP packet! */ -#if !defined ETHARP_TRUST_IP_MAC || defined __DOXYGEN__ +#ifndef ETHARP_TRUST_IP_MAC #define ETHARP_TRUST_IP_MAC 0 #endif @@ -600,13 +653,13 @@ * Alternatively, define a function/define ETHARP_VLAN_CHECK_FN(eth_hdr, vlan) * that returns 1 to accept a packet or 0 to drop a packet. */ -#if !defined ETHARP_SUPPORT_VLAN || defined __DOXYGEN__ +#ifndef ETHARP_SUPPORT_VLAN #define ETHARP_SUPPORT_VLAN 0 #endif /** LWIP_ETHERNET==1: enable ethernet support even though ARP might be disabled */ -#if !defined LWIP_ETHERNET || defined __DOXYGEN__ +#ifndef LWIP_ETHERNET #define LWIP_ETHERNET LWIP_ARP #endif @@ -615,14 +668,14 @@ * without this padding e.g. addresses in the IP header will not be aligned * on a 32-bit boundary, so setting this to 2 can speed up 32-bit-platforms. */ -#if !defined ETH_PAD_SIZE || defined __DOXYGEN__ +#ifndef ETH_PAD_SIZE #define ETH_PAD_SIZE 0 #endif /** ETHARP_SUPPORT_STATIC_ENTRIES==1: enable code to support static ARP table * entries (using etharp_add_static_entry/etharp_remove_static_entry). */ -#if !defined ETHARP_SUPPORT_STATIC_ENTRIES || defined __DOXYGEN__ +#ifndef ETHARP_SUPPORT_STATIC_ENTRIES #define ETHARP_SUPPORT_STATIC_ENTRIES 0 #endif @@ -630,7 +683,7 @@ * If disabled, duplicate IP address on multiple netifs are not supported * (but this should only occur for AutoIP). */ -#if !defined ETHARP_TABLE_MATCH_NETIF || defined __DOXYGEN__ +#ifndef ETHARP_TABLE_MATCH_NETIF #define ETHARP_TABLE_MATCH_NETIF 0 #endif /** @@ -650,7 +703,7 @@ /** * LWIP_IPV4==1: Enable IPv4 */ -#if !defined LWIP_IPV4 || defined __DOXYGEN__ +#ifndef LWIP_IPV4 #define LWIP_IPV4 1 #endif @@ -659,7 +712,7 @@ * interfaces. If you are going to run lwIP on a device with only one network * interface, define this to 0. */ -#if !defined IP_FORWARD || defined __DOXYGEN__ +#ifndef IP_FORWARD #define IP_FORWARD 0 #endif @@ -668,7 +721,7 @@ * this option does not affect outgoing packet sizes, which can be controlled * via IP_FRAG. */ -#if !defined IP_REASSEMBLY || defined __DOXYGEN__ +#ifndef IP_REASSEMBLY #define IP_REASSEMBLY 1 #endif @@ -677,7 +730,7 @@ * that this option does not affect incoming packet sizes, which can be * controlled via IP_REASSEMBLY. */ -#if !defined IP_FRAG || defined __DOXYGEN__ +#ifndef IP_FRAG #define IP_FRAG 1 #endif @@ -696,7 +749,7 @@ * IP_OPTIONS_ALLOWED==0: All packets with IP options are dropped. * IP_OPTIONS_ALLOWED==1: IP options are allowed (but not parsed). */ -#if !defined IP_OPTIONS_ALLOWED || defined __DOXYGEN__ +#ifndef IP_OPTIONS_ALLOWED #define IP_OPTIONS_ALLOWED 1 #endif @@ -705,7 +758,7 @@ * a fragmented IP packet waits for all fragments to arrive. If not all fragments arrived * in this time, the whole packet is discarded. */ -#if !defined IP_REASS_MAXAGE || defined __DOXYGEN__ +#ifndef IP_REASS_MAXAGE #define IP_REASS_MAXAGE 3 #endif @@ -715,7 +768,7 @@ * PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS so that the stack is still able to receive * packets even if the maximum amount of fragments is enqueued for reassembly! */ -#if !defined IP_REASS_MAX_PBUFS || defined __DOXYGEN__ +#ifndef IP_REASS_MAX_PBUFS #define IP_REASS_MAX_PBUFS 10 #endif @@ -726,7 +779,7 @@ * new PBUF_RAM pbufs are used for fragments). * ATTENTION: IP_FRAG_USES_STATIC_BUF==1 may not be used for DMA-enabled MACs! */ -#if !defined IP_FRAG_USES_STATIC_BUF || defined __DOXYGEN__ +#ifndef IP_FRAG_USES_STATIC_BUF #define IP_FRAG_USES_STATIC_BUF 0 #endif @@ -734,14 +787,14 @@ * IP_FRAG_MAX_MTU: Assumed max MTU on any interface for IP frag buffer * (requires IP_FRAG_USES_STATIC_BUF==1) */ -#if IP_FRAG_USES_STATIC_BUF && !defined(IP_FRAG_MAX_MTU) || defined __DOXYGEN__ +#if IP_FRAG_USES_STATIC_BUF && !defined(IP_FRAG_MAX_MTU) #define IP_FRAG_MAX_MTU 1500 #endif /** * IP_DEFAULT_TTL: Default value for Time-To-Live used by transport layers. */ -#if !defined IP_DEFAULT_TTL || defined __DOXYGEN__ +#ifndef IP_DEFAULT_TTL #define IP_DEFAULT_TTL 255 #endif @@ -750,7 +803,7 @@ * filter per pcb on udp and raw send operations. To enable broadcast filter * on recv operations, you also have to set IP_SOF_BROADCAST_RECV=1. */ -#if !defined IP_SOF_BROADCAST || defined __DOXYGEN__ +#ifndef IP_SOF_BROADCAST #define IP_SOF_BROADCAST 0 #endif @@ -758,7 +811,7 @@ * IP_SOF_BROADCAST_RECV (requires IP_SOF_BROADCAST=1) enable the broadcast * filter on recv operations. */ -#if !defined IP_SOF_BROADCAST_RECV || defined __DOXYGEN__ +#ifndef IP_SOF_BROADCAST_RECV #define IP_SOF_BROADCAST_RECV 0 #endif @@ -769,7 +822,7 @@ * ATTENTION: When this is 1, make sure your netif driver correctly marks incoming * link-layer-broadcast/multicast packets as such using the corresponding pbuf flags! */ -#if !defined IP_FORWARD_ALLOW_TX_ON_RX_NETIF || defined __DOXYGEN__ +#ifndef IP_FORWARD_ALLOW_TX_ON_RX_NETIF #define IP_FORWARD_ALLOW_TX_ON_RX_NETIF 0 #endif @@ -778,7 +831,7 @@ * local TCP/UDP pcb (default==0). This can prevent creating predictable port * numbers after booting a device. */ -#if !defined LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS || defined __DOXYGEN__ +#ifndef LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS #define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 0 #endif /** @@ -799,28 +852,28 @@ * LWIP_ICMP==1: Enable ICMP module inside the IP stack. * Be careful, disable that make your product non-compliant to RFC1122 */ -#if !defined LWIP_ICMP || defined __DOXYGEN__ +#ifndef LWIP_ICMP #define LWIP_ICMP 1 #endif /** * ICMP_TTL: Default value for Time-To-Live used by ICMP packets. */ -#if !defined ICMP_TTL || defined __DOXYGEN__ +#ifndef ICMP_TTL #define ICMP_TTL (IP_DEFAULT_TTL) #endif /** * LWIP_BROADCAST_PING==1: respond to broadcast pings (default is unicast only) */ -#if !defined LWIP_BROADCAST_PING || defined __DOXYGEN__ +#ifndef LWIP_BROADCAST_PING #define LWIP_BROADCAST_PING 0 #endif /** * LWIP_MULTICAST_PING==1: respond to multicast pings (default is unicast only) */ -#if !defined LWIP_MULTICAST_PING || defined __DOXYGEN__ +#ifndef LWIP_MULTICAST_PING #define LWIP_MULTICAST_PING 0 #endif /** @@ -840,14 +893,14 @@ /** * LWIP_RAW==1: Enable application layer to hook into the IP layer itself. */ -#if !defined LWIP_RAW || defined __DOXYGEN__ +#ifndef LWIP_RAW #define LWIP_RAW 0 #endif /** * LWIP_RAW==1: Enable application layer to hook into the IP layer itself. */ -#if !defined RAW_TTL || defined __DOXYGEN__ +#ifndef RAW_TTL #define RAW_TTL (IP_DEFAULT_TTL) #endif /** @@ -867,7 +920,7 @@ /** * LWIP_DHCP==1: Enable DHCP module. */ -#if !defined LWIP_DHCP || defined __DOXYGEN__ +#ifndef LWIP_DHCP #define LWIP_DHCP 0 #endif #if !LWIP_IPV4 @@ -879,7 +932,7 @@ /** * DHCP_DOES_ARP_CHECK==1: Do an ARP check on the offered address. */ -#if !defined DHCP_DOES_ARP_CHECK || defined __DOXYGEN__ +#ifndef DHCP_DOES_ARP_CHECK #define DHCP_DOES_ARP_CHECK ((LWIP_DHCP) && (LWIP_ARP)) #endif @@ -889,14 +942,14 @@ * netif drivers might not set this flag, the default is off. If enabled, * netif_set_link_up() must be called to continue dhcp starting. */ -#if !defined LWIP_DHCP_CHECK_LINK_UP +#ifndef LWIP_DHCP_CHECK_LINK_UP #define LWIP_DHCP_CHECK_LINK_UP 0 #endif /** * LWIP_DHCP_BOOTP_FILE==1: Store offered_si_addr and boot_file_name. */ -#if !defined LWIP_DHCP_BOOTP_FILE || defined __DOXYGEN__ +#ifndef LWIP_DHCP_BOOTP_FILE #define LWIP_DHCP_BOOTP_FILE 0 #endif @@ -905,14 +958,14 @@ * response packet, an callback is called, which has to be provided by the port: * void dhcp_set_ntp_servers(u8_t num_ntp_servers, ip_addr_t* ntp_server_addrs); */ -#if !defined LWIP_DHCP_GET_NTP_SRV || defined __DOXYGEN__ +#ifndef LWIP_DHCP_GET_NTP_SRV #define LWIP_DHCP_GET_NTP_SRV 0 #endif /** * The maximum of NTP servers requested */ -#if !defined LWIP_DHCP_MAX_NTP_SERVERS || defined __DOXYGEN__ +#ifndef LWIP_DHCP_MAX_NTP_SERVERS #define LWIP_DHCP_MAX_NTP_SERVERS 1 #endif /** @@ -932,7 +985,7 @@ /** * LWIP_AUTOIP==1: Enable AUTOIP module. */ -#if !defined LWIP_AUTOIP || defined __DOXYGEN__ +#ifndef LWIP_AUTOIP #define LWIP_AUTOIP 0 #endif #if !LWIP_IPV4 @@ -945,7 +998,7 @@ * LWIP_DHCP_AUTOIP_COOP==1: Allow DHCP and AUTOIP to be both enabled on * the same interface at the same time. */ -#if !defined LWIP_DHCP_AUTOIP_COOP || defined __DOXYGEN__ +#ifndef LWIP_DHCP_AUTOIP_COOP #define LWIP_DHCP_AUTOIP_COOP 0 #endif @@ -956,7 +1009,7 @@ * very quickly, but you should be prepared to handle a changing IP address * when DHCP overrides AutoIP. */ -#if !defined LWIP_DHCP_AUTOIP_COOP_TRIES || defined __DOXYGEN__ +#ifndef LWIP_DHCP_AUTOIP_COOP_TRIES #define LWIP_DHCP_AUTOIP_COOP_TRIES 9 #endif /** @@ -978,7 +1031,7 @@ * Turn this on to get callbacks needed to implement MIB2. * Usually MIB2_STATS should be enabled, too. */ -#if !defined LWIP_MIB2_CALLBACKS || defined __DOXYGEN__ +#ifndef LWIP_MIB2_CALLBACKS #define LWIP_MIB2_CALLBACKS 0 #endif /** @@ -998,7 +1051,7 @@ /** * LWIP_IGMP==1: Turn on IGMP module. */ -#if !defined LWIP_IGMP || defined __DOXYGEN__ +#ifndef LWIP_IGMP #define LWIP_IGMP 0 #endif #if !LWIP_IPV4 @@ -1010,7 +1063,7 @@ * LWIP_MULTICAST_TX_OPTIONS==1: Enable multicast TX support like the socket options * IP_MULTICAST_TTL/IP_MULTICAST_IF/IP_MULTICAST_LOOP */ -#if !defined LWIP_MULTICAST_TX_OPTIONS || defined __DOXYGEN__ +#ifndef LWIP_MULTICAST_TX_OPTIONS #define LWIP_MULTICAST_TX_OPTIONS LWIP_IGMP #endif /** @@ -1031,17 +1084,17 @@ * LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS * transport. */ -#if !defined LWIP_DNS || defined __DOXYGEN__ +#ifndef LWIP_DNS #define LWIP_DNS 0 #endif /** DNS maximum number of entries to maintain locally. */ -#if !defined DNS_TABLE_SIZE || defined __DOXYGEN__ +#ifndef DNS_TABLE_SIZE #define DNS_TABLE_SIZE 4 #endif /** DNS maximum host name length supported in the name table. */ -#if !defined DNS_MAX_NAME_LENGTH || defined __DOXYGEN__ +#ifndef DNS_MAX_NAME_LENGTH #define DNS_MAX_NAME_LENGTH 256 #endif @@ -1049,12 +1102,12 @@ * The first server can be initialized automatically by defining * DNS_SERVER_ADDRESS(ipaddr), where 'ipaddr' is an 'ip_addr_t*' */ -#if !defined DNS_MAX_SERVERS || defined __DOXYGEN__ +#ifndef DNS_MAX_SERVERS #define DNS_MAX_SERVERS 2 #endif /** DNS do a name checking between the query and the response. */ -#if !defined DNS_DOES_NAME_CHECK || defined __DOXYGEN__ +#ifndef DNS_DOES_NAME_CHECK #define DNS_DOES_NAME_CHECK 1 #endif @@ -1062,7 +1115,7 @@ * Use all DNS security features by default. * This is overridable but should only be needed by very small targets * or when using against non standard DNS servers. */ -#if !defined LWIP_DNS_SECURE || defined __DOXYGEN__ +#ifndef LWIP_DNS_SECURE #define LWIP_DNS_SECURE (LWIP_DNS_SECURE_RAND_XID | LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING | LWIP_DNS_SECURE_RAND_SRC_PORT) #endif @@ -1081,13 +1134,13 @@ * \#define DNS_LOOKUP_LOCAL_EXTERN(x) extern err_t my_lookup_function(const char *name, ip_addr_t *addr, u8_t dns_addrtype) * that looks up the IP address and returns ERR_OK if found (LWIP_DNS_ADDRTYPE_xxx is passed in dns_addrtype). */ -#if !defined DNS_LOCAL_HOSTLIST || defined __DOXYGEN__ +#ifndef DNS_LOCAL_HOSTLIST #define DNS_LOCAL_HOSTLIST 0 #endif /* DNS_LOCAL_HOSTLIST */ /** If this is turned on, the local host-list can be dynamically changed * at runtime. */ -#if !defined DNS_LOCAL_HOSTLIST_IS_DYNAMIC || defined __DOXYGEN__ +#ifndef DNS_LOCAL_HOSTLIST_IS_DYNAMIC #define DNS_LOCAL_HOSTLIST_IS_DYNAMIC 0 #endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ /** @@ -1107,28 +1160,28 @@ /** * LWIP_UDP==1: Turn on UDP. */ -#if !defined LWIP_UDP || defined __DOXYGEN__ +#ifndef LWIP_UDP #define LWIP_UDP 1 #endif /** * LWIP_UDPLITE==1: Turn on UDP-Lite. (Requires LWIP_UDP) */ -#if !defined LWIP_UDPLITE || defined __DOXYGEN__ +#ifndef LWIP_UDPLITE #define LWIP_UDPLITE 0 #endif /** * UDP_TTL: Default Time-To-Live value. */ -#if !defined UDP_TTL || defined __DOXYGEN__ +#ifndef UDP_TTL #define UDP_TTL (IP_DEFAULT_TTL) #endif /** * LWIP_NETBUF_RECVINFO==1: append destination addr and port to every netbuf. */ -#if !defined LWIP_NETBUF_RECVINFO || defined __DOXYGEN__ +#ifndef LWIP_NETBUF_RECVINFO #define LWIP_NETBUF_RECVINFO 0 #endif /** @@ -1148,14 +1201,14 @@ /** * LWIP_TCP==1: Turn on TCP. */ -#if !defined LWIP_TCP || defined __DOXYGEN__ +#ifndef LWIP_TCP #define LWIP_TCP 1 #endif /** * TCP_TTL: Default Time-To-Live value. */ -#if !defined TCP_TTL || defined __DOXYGEN__ +#ifndef TCP_TTL #define TCP_TTL (IP_DEFAULT_TTL) #endif @@ -1163,21 +1216,21 @@ * TCP_WND: The size of a TCP window. This must be at least * (2 * TCP_MSS) for things to work well */ -#if !defined TCP_WND || defined __DOXYGEN__ +#ifndef TCP_WND #define TCP_WND (4 * TCP_MSS) #endif /** * TCP_MAXRTX: Maximum number of retransmissions of data segments. */ -#if !defined TCP_MAXRTX || defined __DOXYGEN__ +#ifndef TCP_MAXRTX #define TCP_MAXRTX 12 #endif /** * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments. */ -#if !defined TCP_SYNMAXRTX || defined __DOXYGEN__ +#ifndef TCP_SYNMAXRTX #define TCP_SYNMAXRTX 6 #endif @@ -1185,7 +1238,7 @@ * TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order. * Define to 0 if your device is low on memory. */ -#if !defined TCP_QUEUE_OOSEQ || defined __DOXYGEN__ +#ifndef TCP_QUEUE_OOSEQ #define TCP_QUEUE_OOSEQ (LWIP_TCP) #endif @@ -1196,7 +1249,7 @@ * when opening a connection. For the transmit size, this MSS sets * an upper limit on the MSS advertised by the remote host. */ -#if !defined TCP_MSS || defined __DOXYGEN__ +#ifndef TCP_MSS #define TCP_MSS 536 #endif @@ -1208,7 +1261,7 @@ * Setting this to 1 enables code that checks TCP_MSS against the MTU of the * netif used for a connection and limits the MSS if it would be too big otherwise. */ -#if !defined TCP_CALCULATE_EFF_SEND_MSS || defined __DOXYGEN__ +#ifndef TCP_CALCULATE_EFF_SEND_MSS #define TCP_CALCULATE_EFF_SEND_MSS 1 #endif @@ -1217,7 +1270,7 @@ * TCP_SND_BUF: TCP sender buffer space (bytes). * To achieve good performance, this should be at least 2 * TCP_MSS. */ -#if !defined TCP_SND_BUF || defined __DOXYGEN__ +#ifndef TCP_SND_BUF #define TCP_SND_BUF (2 * TCP_MSS) #endif @@ -1225,7 +1278,7 @@ * TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least * as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. */ -#if !defined TCP_SND_QUEUELEN || defined __DOXYGEN__ +#ifndef TCP_SND_QUEUELEN #define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS)) #endif @@ -1234,7 +1287,7 @@ * TCP_SND_BUF. It is the amount of space which must be available in the * TCP snd_buf for select to return writable (combined with TCP_SNDQUEUELOWAT). */ -#if !defined TCP_SNDLOWAT || defined __DOXYGEN__ +#ifndef TCP_SNDLOWAT #define TCP_SNDLOWAT LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1) #endif @@ -1243,7 +1296,7 @@ * than TCP_SND_QUEUELEN. If the number of pbufs queued on a pcb drops below * this number, select returns writable (combined with TCP_SNDLOWAT). */ -#if !defined TCP_SNDQUEUELOWAT || defined __DOXYGEN__ +#ifndef TCP_SNDQUEUELOWAT #define TCP_SNDQUEUELOWAT LWIP_MAX(((TCP_SND_QUEUELEN)/2), 5) #endif @@ -1251,7 +1304,7 @@ * TCP_OOSEQ_MAX_BYTES: The maximum number of bytes queued on ooseq per pcb. * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==0. */ -#if !defined TCP_OOSEQ_MAX_BYTES || defined __DOXYGEN__ +#ifndef TCP_OOSEQ_MAX_BYTES #define TCP_OOSEQ_MAX_BYTES 0 #endif @@ -1259,14 +1312,14 @@ * TCP_OOSEQ_MAX_PBUFS: The maximum number of pbufs queued on ooseq per pcb. * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==0. */ -#if !defined TCP_OOSEQ_MAX_PBUFS || defined __DOXYGEN__ +#ifndef TCP_OOSEQ_MAX_PBUFS #define TCP_OOSEQ_MAX_PBUFS 0 #endif /** * TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb. */ -#if !defined TCP_LISTEN_BACKLOG || defined __DOXYGEN__ +#ifndef TCP_LISTEN_BACKLOG #define TCP_LISTEN_BACKLOG 0 #endif @@ -1275,7 +1328,7 @@ * This backlog is used unless another is explicitly specified. * 0xff is the maximum (u8_t). */ -#if !defined TCP_DEFAULT_LISTEN_BACKLOG || defined __DOXYGEN__ +#ifndef TCP_DEFAULT_LISTEN_BACKLOG #define TCP_DEFAULT_LISTEN_BACKLOG 0xff #endif @@ -1293,7 +1346,7 @@ * TCP_MSS: Try to create unfragmented TCP packets. * TCP_MSS/4: Try to create 4 fragments or less per TCP packet. */ -#if !defined TCP_OVERSIZE || defined __DOXYGEN__ +#ifndef TCP_OVERSIZE #define TCP_OVERSIZE TCP_MSS #endif @@ -1303,7 +1356,7 @@ * really used locally. Therefore, it is only enabled when a TS option is * received in the initial SYN packet from a remote host. */ -#if !defined LWIP_TCP_TIMESTAMPS || defined __DOXYGEN__ +#ifndef LWIP_TCP_TIMESTAMPS #define LWIP_TCP_TIMESTAMPS 0 #endif @@ -1311,7 +1364,7 @@ * TCP_WND_UPDATE_THRESHOLD: difference in window to trigger an * explicit window update */ -#if !defined TCP_WND_UPDATE_THRESHOLD || defined __DOXYGEN__ +#ifndef TCP_WND_UPDATE_THRESHOLD #define TCP_WND_UPDATE_THRESHOLD LWIP_MIN((TCP_WND / 4), (TCP_MSS * 4)) #endif @@ -1322,7 +1375,7 @@ * LWIP_CALLBACK_API==1: The PCB callback function is called directly * for the event. This is the default. */ -#if !defined(LWIP_EVENT_API) && !defined(LWIP_CALLBACK_API) || defined __DOXYGEN__ +#if !defined(LWIP_EVENT_API) && !defined(LWIP_CALLBACK_API) #define LWIP_EVENT_API 0 #define LWIP_CALLBACK_API 1 #endif @@ -1335,7 +1388,7 @@ * When LWIP_WND_SCALE is enabled but TCP_RCV_SCALE is 0, we can use a large * send window while having a small receive window only. */ -#if !defined LWIP_WND_SCALE || defined __DOXYGEN__ +#ifndef LWIP_WND_SCALE #define LWIP_WND_SCALE 0 #define TCP_RCV_SCALE 0 #endif @@ -1358,8 +1411,8 @@ * link level header. The default is 14, the standard value for * Ethernet. */ -#if !defined PBUF_LINK_HLEN || defined __DOXYGEN__ -#if defined LWIP_HOOK_VLAN_SET || defined __DOXYGEN__ +#ifndef PBUF_LINK_HLEN +#if defined LWIP_HOOK_VLAN_SET #define PBUF_LINK_HLEN (18 + ETH_PAD_SIZE) #else /* LWIP_HOOK_VLAN_SET */ #define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE) @@ -1370,7 +1423,7 @@ * PBUF_LINK_ENCAPSULATION_HLEN: the number of bytes that should be allocated * for an additional encapsulation header before ethernet headers (e.g. 802.11) */ -#if !defined PBUF_LINK_ENCAPSULATION_HLEN || defined __DOXYGEN__ +#ifndef PBUF_LINK_ENCAPSULATION_HLEN #define PBUF_LINK_ENCAPSULATION_HLEN 0 #endif @@ -1379,7 +1432,7 @@ * designed to accommodate single full size TCP frame in one pbuf, including * TCP_MSS, IP header, and link header. */ -#if !defined PBUF_POOL_BUFSIZE || defined __DOXYGEN__ +#ifndef PBUF_POOL_BUFSIZE #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) #endif /** @@ -1400,14 +1453,14 @@ * LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname * field. */ -#if !defined LWIP_NETIF_HOSTNAME || defined __DOXYGEN__ +#ifndef LWIP_NETIF_HOSTNAME #define LWIP_NETIF_HOSTNAME 0 #endif /** * LWIP_NETIF_API==1: Support netif api (in netifapi.c) */ -#if !defined LWIP_NETIF_API || defined __DOXYGEN__ +#ifndef LWIP_NETIF_API #define LWIP_NETIF_API 0 #endif @@ -1415,7 +1468,7 @@ * LWIP_NETIF_STATUS_CALLBACK==1: Support a callback function whenever an interface * changes its up/down status (i.e., due to DHCP IP acquisition) */ -#if !defined LWIP_NETIF_STATUS_CALLBACK || defined __DOXYGEN__ +#ifndef LWIP_NETIF_STATUS_CALLBACK #define LWIP_NETIF_STATUS_CALLBACK 0 #endif @@ -1423,7 +1476,7 @@ * LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface * whenever the link changes (i.e., link down) */ -#if !defined LWIP_NETIF_LINK_CALLBACK || defined __DOXYGEN__ +#ifndef LWIP_NETIF_LINK_CALLBACK #define LWIP_NETIF_LINK_CALLBACK 0 #endif @@ -1431,7 +1484,7 @@ * LWIP_NETIF_REMOVE_CALLBACK==1: Support a callback function that is called * when a netif has been removed */ -#if !defined LWIP_NETIF_REMOVE_CALLBACK || defined __DOXYGEN__ +#ifndef LWIP_NETIF_REMOVE_CALLBACK #define LWIP_NETIF_REMOVE_CALLBACK 0 #endif @@ -1442,7 +1495,7 @@ * ARP tables or many concurrent connections, it might be counterproductive * if you have a tiny ARP table or if there never are concurrent connections. */ -#if !defined LWIP_NETIF_HWADDRHINT || defined __DOXYGEN__ +#ifndef LWIP_NETIF_HWADDRHINT #define LWIP_NETIF_HWADDRHINT 0 #endif @@ -1455,7 +1508,7 @@ * * @todo: TCP and IP-frag do not work with this, yet: */ -#if !defined LWIP_NETIF_TX_SINGLE_PBUF || defined __DOXYGEN__ +#ifndef LWIP_NETIF_TX_SINGLE_PBUF #define LWIP_NETIF_TX_SINGLE_PBUF 0 #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ /** @@ -1477,14 +1530,14 @@ * This is only needed when no real netifs are available. If at least one other * netif is available, loopback traffic uses this netif. */ -#if !defined LWIP_HAVE_LOOPIF || defined __DOXYGEN__ +#ifndef LWIP_HAVE_LOOPIF #define LWIP_HAVE_LOOPIF LWIP_NETIF_LOOPBACK #endif /** * LWIP_LOOPIF_MULTICAST==1: Support multicast/IGMP on loop interface (127.0.0.1). */ -#if !defined LWIP_LOOPIF_MULTICAST || defined __DOXYGEN__ +#ifndef LWIP_LOOPIF_MULTICAST #define LWIP_LOOPIF_MULTICAST 0 #endif @@ -1492,7 +1545,7 @@ * LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP * address equal to the netif IP address, looping them back up the stack. */ -#if !defined LWIP_NETIF_LOOPBACK || defined __DOXYGEN__ +#ifndef LWIP_NETIF_LOOPBACK #define LWIP_NETIF_LOOPBACK 0 #endif @@ -1500,7 +1553,7 @@ * LWIP_LOOPBACK_MAX_PBUFS: Maximum number of pbufs on queue for loopback * sending for each netif (0 = disabled) */ -#if !defined LWIP_LOOPBACK_MAX_PBUFS || defined __DOXYGEN__ +#ifndef LWIP_LOOPBACK_MAX_PBUFS #define LWIP_LOOPBACK_MAX_PBUFS 0 #endif @@ -1517,7 +1570,7 @@ * The packets are put on a list and netif_poll() must be called in * the main application loop. */ -#if !defined LWIP_NETIF_LOOPBACK_MULTITHREADING || defined __DOXYGEN__ +#ifndef LWIP_NETIF_LOOPBACK_MULTITHREADING #define LWIP_NETIF_LOOPBACK_MULTITHREADING (!NO_SYS) #endif /** @@ -1537,7 +1590,7 @@ /** * TCPIP_THREAD_NAME: The name assigned to the main tcpip thread. */ -#if !defined TCPIP_THREAD_NAME || defined __DOXYGEN__ +#ifndef TCPIP_THREAD_NAME #define TCPIP_THREAD_NAME "tcpip_thread" #endif @@ -1546,7 +1599,7 @@ * The stack size value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */ -#if !defined TCPIP_THREAD_STACKSIZE || defined __DOXYGEN__ +#ifndef TCPIP_THREAD_STACKSIZE #define TCPIP_THREAD_STACKSIZE 0 #endif @@ -1555,7 +1608,7 @@ * The priority value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */ -#if !defined TCPIP_THREAD_PRIO || defined __DOXYGEN__ +#ifndef TCPIP_THREAD_PRIO #define TCPIP_THREAD_PRIO 1 #endif @@ -1564,7 +1617,7 @@ * The queue size value itself is platform-dependent, but is passed to * sys_mbox_new() when tcpip_init is called. */ -#if !defined TCPIP_MBOX_SIZE || defined __DOXYGEN__ +#ifndef TCPIP_MBOX_SIZE #define TCPIP_MBOX_SIZE 0 #endif @@ -1572,14 +1625,14 @@ * Define this to something that triggers a watchdog. This is called from * tcpip_thread after processing a message. */ -#if !defined LWIP_TCPIP_THREAD_ALIVE || defined __DOXYGEN__ +#ifndef LWIP_TCPIP_THREAD_ALIVE #define LWIP_TCPIP_THREAD_ALIVE() #endif /** * SLIPIF_THREAD_NAME: The name assigned to the slipif_loop thread. */ -#if !defined SLIPIF_THREAD_NAME || defined __DOXYGEN__ +#ifndef SLIPIF_THREAD_NAME #define SLIPIF_THREAD_NAME "slipif_loop" #endif @@ -1588,7 +1641,7 @@ * The stack size value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */ -#if !defined SLIPIF_THREAD_STACKSIZE || defined __DOXYGEN__ +#ifndef SLIPIF_THREAD_STACKSIZE #define SLIPIF_THREAD_STACKSIZE 0 #endif @@ -1597,14 +1650,14 @@ * The priority value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */ -#if !defined SLIPIF_THREAD_PRIO || defined __DOXYGEN__ +#ifndef SLIPIF_THREAD_PRIO #define SLIPIF_THREAD_PRIO 1 #endif /** * DEFAULT_THREAD_NAME: The name assigned to any other lwIP thread. */ -#if !defined DEFAULT_THREAD_NAME || defined __DOXYGEN__ +#ifndef DEFAULT_THREAD_NAME #define DEFAULT_THREAD_NAME "lwIP" #endif @@ -1613,7 +1666,7 @@ * The stack size value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */ -#if !defined DEFAULT_THREAD_STACKSIZE || defined __DOXYGEN__ +#ifndef DEFAULT_THREAD_STACKSIZE #define DEFAULT_THREAD_STACKSIZE 0 #endif @@ -1622,7 +1675,7 @@ * The priority value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */ -#if !defined DEFAULT_THREAD_PRIO || defined __DOXYGEN__ +#ifndef DEFAULT_THREAD_PRIO #define DEFAULT_THREAD_PRIO 1 #endif @@ -1631,7 +1684,7 @@ * NETCONN_RAW. The queue size value itself is platform-dependent, but is passed * to sys_mbox_new() when the recvmbox is created. */ -#if !defined DEFAULT_RAW_RECVMBOX_SIZE || defined __DOXYGEN__ +#ifndef DEFAULT_RAW_RECVMBOX_SIZE #define DEFAULT_RAW_RECVMBOX_SIZE 0 #endif @@ -1640,7 +1693,7 @@ * NETCONN_UDP. The queue size value itself is platform-dependent, but is passed * to sys_mbox_new() when the recvmbox is created. */ -#if !defined DEFAULT_UDP_RECVMBOX_SIZE || defined __DOXYGEN__ +#ifndef DEFAULT_UDP_RECVMBOX_SIZE #define DEFAULT_UDP_RECVMBOX_SIZE 0 #endif @@ -1649,7 +1702,7 @@ * NETCONN_TCP. The queue size value itself is platform-dependent, but is passed * to sys_mbox_new() when the recvmbox is created. */ -#if !defined DEFAULT_TCP_RECVMBOX_SIZE || defined __DOXYGEN__ +#ifndef DEFAULT_TCP_RECVMBOX_SIZE #define DEFAULT_TCP_RECVMBOX_SIZE 0 #endif @@ -1658,7 +1711,7 @@ * The queue size value itself is platform-dependent, but is passed to * sys_mbox_new() when the acceptmbox is created. */ -#if !defined DEFAULT_ACCEPTMBOX_SIZE || defined __DOXYGEN__ +#ifndef DEFAULT_ACCEPTMBOX_SIZE #define DEFAULT_ACCEPTMBOX_SIZE 0 #endif /** @@ -1678,14 +1731,14 @@ /** * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c) */ -#if !defined LWIP_NETCONN || defined __DOXYGEN__ +#ifndef LWIP_NETCONN #define LWIP_NETCONN 1 #endif /** LWIP_TCPIP_TIMEOUT==1: Enable tcpip_timeout/tcpip_untimeout to create * timers running in tcpip_thread from another thread. */ -#if !defined LWIP_TCPIP_TIMEOUT || defined __DOXYGEN__ +#ifndef LWIP_TCPIP_TIMEOUT #define LWIP_TCPIP_TIMEOUT 0 #endif @@ -1699,7 +1752,7 @@ * The latter 2 can be invoked up by calling netconn_thread_init()/netconn_thread_cleanup(). * Ports may call these for threads created with sys_thread_new(). */ -#if !defined LWIP_NETCONN_SEM_PER_THREAD || defined __DOXYGEN__ +#ifndef LWIP_NETCONN_SEM_PER_THREAD #define LWIP_NETCONN_SEM_PER_THREAD 0 #endif @@ -1711,7 +1764,7 @@ * - sys_mbox_free() has to unblock receive tasks waiting on recvmbox/acceptmbox * and prevent a task pending on this during/after deletion */ -#if !defined LWIP_NETCONN_FULLDUPLEX || defined __DOXYGEN__ +#ifndef LWIP_NETCONN_FULLDUPLEX #define LWIP_NETCONN_FULLDUPLEX 0 #endif /** @@ -1731,14 +1784,14 @@ /** * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c) */ -#if !defined LWIP_SOCKET || defined __DOXYGEN__ +#ifndef LWIP_SOCKET #define LWIP_SOCKET 1 #endif /* LWIP_SOCKET_SET_ERRNO==1: Set errno when socket functions cannot complete * successfully, as required by POSIX. Default is POSIX-compliant. */ -#if !defined LWIP_SOCKET_SET_ERRNO || defined __DOXYGEN__ +#ifndef LWIP_SOCKET_SET_ERRNO #define LWIP_SOCKET_SET_ERRNO 1 #endif @@ -1748,7 +1801,7 @@ * While this helps code completion, it might conflict with existing libraries. * (only used if you use sockets.c) */ -#if !defined LWIP_COMPAT_SOCKETS || defined __DOXYGEN__ +#ifndef LWIP_COMPAT_SOCKETS #define LWIP_COMPAT_SOCKETS 1 #endif @@ -1757,7 +1810,7 @@ * Disable this option if you use a POSIX operating system that uses the same * names (read, write & close). (only used if you use sockets.c) */ -#if !defined LWIP_POSIX_SOCKETS_IO_NAMES || defined __DOXYGEN__ +#ifndef LWIP_POSIX_SOCKETS_IO_NAMES #define LWIP_POSIX_SOCKETS_IO_NAMES 1 #endif @@ -1768,7 +1821,7 @@ * re implement read/write/close/ioctl/fnctl to send the requested action to the right * library (sharing select will need more work though). */ -#if !defined LWIP_SOCKET_OFFSET || defined __DOXYGEN__ +#ifndef LWIP_SOCKET_OFFSET #define LWIP_SOCKET_OFFSET 0 #endif @@ -1777,7 +1830,7 @@ * options processing. Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set * in seconds. (does not require sockets.c, and will affect tcp.c) */ -#if !defined LWIP_TCP_KEEPALIVE || defined __DOXYGEN__ +#ifndef LWIP_TCP_KEEPALIVE #define LWIP_TCP_KEEPALIVE 0 #endif @@ -1785,7 +1838,7 @@ * LWIP_SO_SNDTIMEO==1: Enable send timeout for sockets/netconns and * SO_SNDTIMEO processing. */ -#if !defined LWIP_SO_SNDTIMEO || defined __DOXYGEN__ +#ifndef LWIP_SO_SNDTIMEO #define LWIP_SO_SNDTIMEO 0 #endif @@ -1793,7 +1846,7 @@ * LWIP_SO_RCVTIMEO==1: Enable receive timeout for sockets/netconns and * SO_RCVTIMEO processing. */ -#if !defined LWIP_SO_RCVTIMEO || defined __DOXYGEN__ +#ifndef LWIP_SO_RCVTIMEO #define LWIP_SO_RCVTIMEO 0 #endif @@ -1801,42 +1854,42 @@ * LWIP_SO_SNDRCVTIMEO_NONSTANDARD==1: SO_RCVTIMEO/SO_SNDTIMEO take an int * (milliseconds, much like winsock does) instead of a struct timeval (default). */ -#if !defined LWIP_SO_SNDRCVTIMEO_NONSTANDARD || defined __DOXYGEN__ +#ifndef LWIP_SO_SNDRCVTIMEO_NONSTANDARD #define LWIP_SO_SNDRCVTIMEO_NONSTANDARD 0 #endif /** * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing. */ -#if !defined LWIP_SO_RCVBUF || defined __DOXYGEN__ +#ifndef LWIP_SO_RCVBUF #define LWIP_SO_RCVBUF 0 #endif /** * LWIP_SO_LINGER==1: Enable SO_LINGER processing. */ -#if !defined LWIP_SO_LINGER || defined __DOXYGEN__ +#ifndef LWIP_SO_LINGER #define LWIP_SO_LINGER 0 #endif /** * If LWIP_SO_RCVBUF is used, this is the default value for recv_bufsize. */ -#if !defined RECV_BUFSIZE_DEFAULT || defined __DOXYGEN__ +#ifndef RECV_BUFSIZE_DEFAULT #define RECV_BUFSIZE_DEFAULT INT_MAX #endif /** * By default, TCP socket/netconn close waits 20 seconds max to send the FIN */ -#if !defined LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT || defined __DOXYGEN__ +#ifndef LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT #define LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT 20000 #endif /** * SO_REUSE==1: Enable SO_REUSEADDR option. */ -#if !defined SO_REUSE || defined __DOXYGEN__ +#ifndef SO_REUSE #define SO_REUSE 0 #endif @@ -1845,7 +1898,7 @@ * to all local matches if SO_REUSEADDR is turned on. * WARNING: Adds a memcpy for every packet if passing to more than one pcb! */ -#if !defined SO_REUSE_RXTOALL || defined __DOXYGEN__ +#ifndef SO_REUSE_RXTOALL #define SO_REUSE_RXTOALL 0 #endif @@ -1857,7 +1910,7 @@ * pending datagram in bytes. This is the way linux does it. This code is only * here for compatibility. */ -#if !defined LWIP_FIONREAD_LINUXMODE || defined __DOXYGEN__ +#ifndef LWIP_FIONREAD_LINUXMODE #define LWIP_FIONREAD_LINUXMODE 0 #endif /** @@ -1877,7 +1930,7 @@ /** * LWIP_STATS==1: Enable statistics collection in lwip_stats. */ -#if !defined LWIP_STATS || defined __DOXYGEN__ +#ifndef LWIP_STATS #define LWIP_STATS 1 #endif @@ -1886,28 +1939,28 @@ /** * LWIP_STATS_DISPLAY==1: Compile in the statistics output functions. */ -#if !defined LWIP_STATS_DISPLAY || defined __DOXYGEN__ +#ifndef LWIP_STATS_DISPLAY #define LWIP_STATS_DISPLAY 0 #endif /** * LINK_STATS==1: Enable link stats. */ -#if !defined LINK_STATS || defined __DOXYGEN__ +#ifndef LINK_STATS #define LINK_STATS 1 #endif /** * ETHARP_STATS==1: Enable etharp stats. */ -#if !defined ETHARP_STATS || defined __DOXYGEN__ +#ifndef ETHARP_STATS #define ETHARP_STATS (LWIP_ARP) #endif /** * IP_STATS==1: Enable IP stats. */ -#if !defined IP_STATS || defined __DOXYGEN__ +#ifndef IP_STATS #define IP_STATS 1 #endif @@ -1915,21 +1968,21 @@ * IPFRAG_STATS==1: Enable IP fragmentation stats. Default is * on if using either frag or reass. */ -#if !defined IPFRAG_STATS || defined __DOXYGEN__ +#ifndef IPFRAG_STATS #define IPFRAG_STATS (IP_REASSEMBLY || IP_FRAG) #endif /** * ICMP_STATS==1: Enable ICMP stats. */ -#if !defined ICMP_STATS || defined __DOXYGEN__ +#ifndef ICMP_STATS #define ICMP_STATS 1 #endif /** * IGMP_STATS==1: Enable IGMP stats. */ -#if !defined IGMP_STATS || defined __DOXYGEN__ +#ifndef IGMP_STATS #define IGMP_STATS (LWIP_IGMP) #endif @@ -1937,7 +1990,7 @@ * UDP_STATS==1: Enable UDP stats. Default is on if * UDP enabled, otherwise off. */ -#if !defined UDP_STATS || defined __DOXYGEN__ +#ifndef UDP_STATS #define UDP_STATS (LWIP_UDP) #endif @@ -1945,70 +1998,70 @@ * TCP_STATS==1: Enable TCP stats. Default is on if TCP * enabled, otherwise off. */ -#if !defined TCP_STATS || defined __DOXYGEN__ +#ifndef TCP_STATS #define TCP_STATS (LWIP_TCP) #endif /** * MEM_STATS==1: Enable mem.c stats. */ -#if !defined MEM_STATS || defined __DOXYGEN__ +#ifndef MEM_STATS #define MEM_STATS ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0)) #endif /** * MEMP_STATS==1: Enable memp.c pool stats. */ -#if !defined MEMP_STATS || defined __DOXYGEN__ +#ifndef MEMP_STATS #define MEMP_STATS (MEMP_MEM_MALLOC == 0) #endif /** * SYS_STATS==1: Enable system stats (sem and mbox counts, etc). */ -#if !defined SYS_STATS || defined __DOXYGEN__ +#ifndef SYS_STATS #define SYS_STATS (NO_SYS == 0) #endif /** * IP6_STATS==1: Enable IPv6 stats. */ -#if !defined IP6_STATS || defined __DOXYGEN__ +#ifndef IP6_STATS #define IP6_STATS (LWIP_IPV6) #endif /** * ICMP6_STATS==1: Enable ICMP for IPv6 stats. */ -#if !defined ICMP6_STATS || defined __DOXYGEN__ +#ifndef ICMP6_STATS #define ICMP6_STATS (LWIP_IPV6 && LWIP_ICMP6) #endif /** * IP6_FRAG_STATS==1: Enable IPv6 fragmentation stats. */ -#if !defined IP6_FRAG_STATS || defined __DOXYGEN__ +#ifndef IP6_FRAG_STATS #define IP6_FRAG_STATS (LWIP_IPV6 && (LWIP_IPV6_FRAG || LWIP_IPV6_REASS)) #endif /** * MLD6_STATS==1: Enable MLD for IPv6 stats. */ -#if !defined MLD6_STATS || defined __DOXYGEN__ +#ifndef MLD6_STATS #define MLD6_STATS (LWIP_IPV6 && LWIP_IPV6_MLD) #endif /** * ND6_STATS==1: Enable Neighbor discovery for IPv6 stats. */ -#if !defined ND6_STATS || defined __DOXYGEN__ +#ifndef ND6_STATS #define ND6_STATS (LWIP_IPV6) #endif /** * MIB2_STATS==1: Stats for SNMP MIB2. */ -#if !defined MIB2_STATS || defined __DOXYGEN__ +#ifndef MIB2_STATS #define MIB2_STATS 0 #endif @@ -2053,77 +2106,77 @@ * per netif. * ATTENTION: if enabled, the CHECKSUM_GEN_* and CHECKSUM_CHECK_* defines must be enabled! */ -#if !defined LWIP_CHECKSUM_CTRL_PER_NETIF || defined __DOXYGEN__ +#ifndef LWIP_CHECKSUM_CTRL_PER_NETIF #define LWIP_CHECKSUM_CTRL_PER_NETIF 0 #endif /** * CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets. */ -#if !defined CHECKSUM_GEN_IP || defined __DOXYGEN__ +#ifndef CHECKSUM_GEN_IP #define CHECKSUM_GEN_IP 1 #endif /** * CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets. */ -#if !defined CHECKSUM_GEN_UDP || defined __DOXYGEN__ +#ifndef CHECKSUM_GEN_UDP #define CHECKSUM_GEN_UDP 1 #endif /** * CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets. */ -#if !defined CHECKSUM_GEN_TCP || defined __DOXYGEN__ +#ifndef CHECKSUM_GEN_TCP #define CHECKSUM_GEN_TCP 1 #endif /** * CHECKSUM_GEN_ICMP==1: Generate checksums in software for outgoing ICMP packets. */ -#if !defined CHECKSUM_GEN_ICMP || defined __DOXYGEN__ +#ifndef CHECKSUM_GEN_ICMP #define CHECKSUM_GEN_ICMP 1 #endif /** * CHECKSUM_GEN_ICMP6==1: Generate checksums in software for outgoing ICMP6 packets. */ -#if !defined CHECKSUM_GEN_ICMP6 || defined __DOXYGEN__ +#ifndef CHECKSUM_GEN_ICMP6 #define CHECKSUM_GEN_ICMP6 1 #endif /** * CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets. */ -#if !defined CHECKSUM_CHECK_IP || defined __DOXYGEN__ +#ifndef CHECKSUM_CHECK_IP #define CHECKSUM_CHECK_IP 1 #endif /** * CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets. */ -#if !defined CHECKSUM_CHECK_UDP || defined __DOXYGEN__ +#ifndef CHECKSUM_CHECK_UDP #define CHECKSUM_CHECK_UDP 1 #endif /** * CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets. */ -#if !defined CHECKSUM_CHECK_TCP || defined __DOXYGEN__ +#ifndef CHECKSUM_CHECK_TCP #define CHECKSUM_CHECK_TCP 1 #endif /** * CHECKSUM_CHECK_ICMP==1: Check checksums in software for incoming ICMP packets. */ -#if !defined CHECKSUM_CHECK_ICMP || defined __DOXYGEN__ +#ifndef CHECKSUM_CHECK_ICMP #define CHECKSUM_CHECK_ICMP 1 #endif /** * CHECKSUM_CHECK_ICMP6==1: Check checksums in software for incoming ICMPv6 packets */ -#if !defined CHECKSUM_CHECK_ICMP6 || defined __DOXYGEN__ +#ifndef CHECKSUM_CHECK_ICMP6 #define CHECKSUM_CHECK_ICMP6 1 #endif @@ -2131,7 +2184,7 @@ * LWIP_CHECKSUM_ON_COPY==1: Calculate checksum when copying data from * application buffers to pbufs. */ -#if !defined LWIP_CHECKSUM_ON_COPY || defined __DOXYGEN__ +#ifndef LWIP_CHECKSUM_ON_COPY #define LWIP_CHECKSUM_ON_COPY 0 #endif /** @@ -2151,35 +2204,35 @@ /** * LWIP_IPV6==1: Enable IPv6 */ -#if !defined LWIP_IPV6 || defined __DOXYGEN__ +#ifndef LWIP_IPV6 #define LWIP_IPV6 0 #endif /** * LWIP_IPV6_NUM_ADDRESSES: Number of IPv6 addresses per netif. */ -#if !defined LWIP_IPV6_NUM_ADDRESSES || defined __DOXYGEN__ +#ifndef LWIP_IPV6_NUM_ADDRESSES #define LWIP_IPV6_NUM_ADDRESSES 3 #endif /** * LWIP_IPV6_FORWARD==1: Forward IPv6 packets across netifs */ -#if !defined LWIP_IPV6_FORWARD || defined __DOXYGEN__ +#ifndef LWIP_IPV6_FORWARD #define LWIP_IPV6_FORWARD 0 #endif /** * LWIP_IPV6_FRAG==1: Fragment outgoing IPv6 packets that are too big. */ -#if !defined LWIP_IPV6_FRAG || defined __DOXYGEN__ +#ifndef LWIP_IPV6_FRAG #define LWIP_IPV6_FRAG 0 #endif /** * LWIP_IPV6_REASS==1: reassemble incoming IPv6 packets that fragmented */ -#if !defined LWIP_IPV6_REASS || defined __DOXYGEN__ || defined __DOXYGEN__ +#ifndef LWIP_IPV6_REASS #define LWIP_IPV6_REASS (LWIP_IPV6) #endif @@ -2187,21 +2240,21 @@ * LWIP_IPV6_SEND_ROUTER_SOLICIT==1: Send router solicitation messages during * network startup. */ -#if !defined LWIP_IPV6_SEND_ROUTER_SOLICIT || defined __DOXYGEN__ +#ifndef LWIP_IPV6_SEND_ROUTER_SOLICIT #define LWIP_IPV6_SEND_ROUTER_SOLICIT 1 #endif /** * LWIP_IPV6_AUTOCONFIG==1: Enable stateless address autoconfiguration as per RFC 4862. */ -#if !defined LWIP_IPV6_AUTOCONFIG || defined __DOXYGEN__ +#ifndef LWIP_IPV6_AUTOCONFIG #define LWIP_IPV6_AUTOCONFIG (LWIP_IPV6) #endif /** * LWIP_IPV6_DUP_DETECT_ATTEMPTS: Number of duplicate address detection attempts. */ -#if !defined LWIP_IPV6_DUP_DETECT_ATTEMPTS || defined __DOXYGEN__ +#ifndef LWIP_IPV6_DUP_DETECT_ATTEMPTS #define LWIP_IPV6_DUP_DETECT_ATTEMPTS 1 #endif /** @@ -2216,7 +2269,7 @@ /** * LWIP_ICMP6==1: Enable ICMPv6 (mandatory per RFC) */ -#if !defined LWIP_ICMP6 || defined __DOXYGEN__ +#ifndef LWIP_ICMP6 #define LWIP_ICMP6 (LWIP_IPV6) #endif @@ -2224,14 +2277,14 @@ * LWIP_ICMP6_DATASIZE: bytes from original packet to send back in * ICMPv6 error messages. */ -#if !defined LWIP_ICMP6_DATASIZE || defined __DOXYGEN__ +#ifndef LWIP_ICMP6_DATASIZE #define LWIP_ICMP6_DATASIZE 8 #endif /** * LWIP_ICMP6_HL: default hop limit for ICMPv6 messages */ -#if !defined LWIP_ICMP6_HL || defined __DOXYGEN__ +#ifndef LWIP_ICMP6_HL #define LWIP_ICMP6_HL 255 #endif /** @@ -2246,14 +2299,14 @@ /** * LWIP_IPV6_MLD==1: Enable multicast listener discovery protocol. */ -#if !defined LWIP_IPV6_MLD || defined __DOXYGEN__ +#ifndef LWIP_IPV6_MLD #define LWIP_IPV6_MLD (LWIP_IPV6) #endif /** * MEMP_NUM_MLD6_GROUP: Max number of IPv6 multicast that can be joined. */ -#if !defined MEMP_NUM_MLD6_GROUP || defined __DOXYGEN__ +#ifndef MEMP_NUM_MLD6_GROUP #define MEMP_NUM_MLD6_GROUP 4 #endif /** @@ -2269,42 +2322,42 @@ * LWIP_ND6_QUEUEING==1: queue outgoing IPv6 packets while MAC address * is being resolved. */ -#if !defined LWIP_ND6_QUEUEING || defined __DOXYGEN__ +#ifndef LWIP_ND6_QUEUEING #define LWIP_ND6_QUEUEING (LWIP_IPV6) #endif /** * MEMP_NUM_ND6_QUEUE: Max number of IPv6 packets to queue during MAC resolution. */ -#if !defined MEMP_NUM_ND6_QUEUE || defined __DOXYGEN__ +#ifndef MEMP_NUM_ND6_QUEUE #define MEMP_NUM_ND6_QUEUE 20 #endif /** * LWIP_ND6_NUM_NEIGHBORS: Number of entries in IPv6 neighbor cache */ -#if !defined LWIP_ND6_NUM_NEIGHBORS || defined __DOXYGEN__ +#ifndef LWIP_ND6_NUM_NEIGHBORS #define LWIP_ND6_NUM_NEIGHBORS 10 #endif /** * LWIP_ND6_NUM_DESTINATIONS: number of entries in IPv6 destination cache */ -#if !defined LWIP_ND6_NUM_DESTINATIONS || defined __DOXYGEN__ +#ifndef LWIP_ND6_NUM_DESTINATIONS #define LWIP_ND6_NUM_DESTINATIONS 10 #endif /** * LWIP_ND6_NUM_PREFIXES: number of entries in IPv6 on-link prefixes cache */ -#if !defined LWIP_ND6_NUM_PREFIXES || defined __DOXYGEN__ +#ifndef LWIP_ND6_NUM_PREFIXES #define LWIP_ND6_NUM_PREFIXES 5 #endif /** * LWIP_ND6_NUM_ROUTERS: number of entries in IPv6 default router cache */ -#if !defined LWIP_ND6_NUM_ROUTERS || defined __DOXYGEN__ +#ifndef LWIP_ND6_NUM_ROUTERS #define LWIP_ND6_NUM_ROUTERS 3 #endif @@ -2312,7 +2365,7 @@ * LWIP_ND6_MAX_MULTICAST_SOLICIT: max number of multicast solicit messages to send * (neighbor solicit and router solicit) */ -#if !defined LWIP_ND6_MAX_MULTICAST_SOLICIT || defined __DOXYGEN__ +#ifndef LWIP_ND6_MAX_MULTICAST_SOLICIT #define LWIP_ND6_MAX_MULTICAST_SOLICIT 3 #endif @@ -2320,21 +2373,21 @@ * LWIP_ND6_MAX_UNICAST_SOLICIT: max number of unicast neighbor solicitation messages * to send during neighbor reachability detection. */ -#if !defined LWIP_ND6_MAX_UNICAST_SOLICIT || defined __DOXYGEN__ +#ifndef LWIP_ND6_MAX_UNICAST_SOLICIT #define LWIP_ND6_MAX_UNICAST_SOLICIT 3 #endif /** * Unused: See ND RFC (time in milliseconds). */ -#if !defined LWIP_ND6_MAX_ANYCAST_DELAY_TIME || defined __DOXYGEN__ +#ifndef LWIP_ND6_MAX_ANYCAST_DELAY_TIME #define LWIP_ND6_MAX_ANYCAST_DELAY_TIME 1000 #endif /** * Unused: See ND RFC */ -#if !defined LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT || defined __DOXYGEN__ +#ifndef LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT #define LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT 3 #endif @@ -2342,14 +2395,14 @@ * LWIP_ND6_REACHABLE_TIME: default neighbor reachable time (in milliseconds). * May be updated by router advertisement messages. */ -#if !defined LWIP_ND6_REACHABLE_TIME || defined __DOXYGEN__ +#ifndef LWIP_ND6_REACHABLE_TIME #define LWIP_ND6_REACHABLE_TIME 30000 #endif /** * LWIP_ND6_RETRANS_TIMER: default retransmission timer for solicitation messages */ -#if !defined LWIP_ND6_RETRANS_TIMER || defined __DOXYGEN__ +#ifndef LWIP_ND6_RETRANS_TIMER #define LWIP_ND6_RETRANS_TIMER 1000 #endif @@ -2357,7 +2410,7 @@ * LWIP_ND6_DELAY_FIRST_PROBE_TIME: Delay before first unicast neighbor solicitation * message is sent, during neighbor reachability detection. */ -#if !defined LWIP_ND6_DELAY_FIRST_PROBE_TIME || defined __DOXYGEN__s +#ifndef LWIP_ND6_DELAY_FIRST_PROBE_TIMEs #define LWIP_ND6_DELAY_FIRST_PROBE_TIME 5000 #endif @@ -2365,7 +2418,7 @@ * LWIP_ND6_ALLOW_RA_UPDATES==1: Allow Router Advertisement messages to update * Reachable time and retransmission timers, and netif MTU. */ -#if !defined LWIP_ND6_ALLOW_RA_UPDATES || defined __DOXYGEN__ +#ifndef LWIP_ND6_ALLOW_RA_UPDATES #define LWIP_ND6_ALLOW_RA_UPDATES 1 #endif @@ -2374,7 +2427,7 @@ * with reachability hints for connected destinations. This helps avoid sending * unicast neighbor solicitation messages. */ -#if !defined LWIP_ND6_TCP_REACHABILITY_HINTS || defined __DOXYGEN__ || defined __DOXYGEN__ +#ifndef LWIP_ND6_TCP_REACHABILITY_HINTS #define LWIP_ND6_TCP_REACHABILITY_HINTS 1 #endif /** @@ -2384,7 +2437,7 @@ /** * LWIP_IPV6_DHCP6==1: enable DHCPv6 stateful address autoconfiguration. */ -#if !defined LWIP_IPV6_DHCP6 || defined __DOXYGEN__ +#ifndef LWIP_IPV6_DHCP6 #define LWIP_IPV6_DHCP6 0 #endif @@ -2533,7 +2586,7 @@ * compared against this value. If it is smaller, then debugging * messages are written. */ -#if !defined LWIP_DBG_MIN_LEVEL || defined __DOXYGEN__ || defined __DOXYGEN__ +#ifndef LWIP_DBG_MIN_LEVEL #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL #endif @@ -2541,140 +2594,140 @@ * LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable * debug messages of certain types. */ -#if !defined LWIP_DBG_TYPES_ON || defined __DOXYGEN__ +#ifndef LWIP_DBG_TYPES_ON #define LWIP_DBG_TYPES_ON LWIP_DBG_ON #endif /** * ETHARP_DEBUG: Enable debugging in etharp.c. */ -#if !defined ETHARP_DEBUG || defined __DOXYGEN__ +#ifndef ETHARP_DEBUG #define ETHARP_DEBUG LWIP_DBG_OFF #endif /** * NETIF_DEBUG: Enable debugging in netif.c. */ -#if !defined NETIF_DEBUG || defined __DOXYGEN__ +#ifndef NETIF_DEBUG #define NETIF_DEBUG LWIP_DBG_OFF #endif /** * PBUF_DEBUG: Enable debugging in pbuf.c. */ -#if !defined PBUF_DEBUG || defined __DOXYGEN__ +#ifndef PBUF_DEBUG #define PBUF_DEBUG LWIP_DBG_OFF #endif /** * API_LIB_DEBUG: Enable debugging in api_lib.c. */ -#if !defined API_LIB_DEBUG || defined __DOXYGEN__ +#ifndef API_LIB_DEBUG #define API_LIB_DEBUG LWIP_DBG_OFF #endif /** * API_MSG_DEBUG: Enable debugging in api_msg.c. */ -#if !defined API_MSG_DEBUG || defined __DOXYGEN__ +#ifndef API_MSG_DEBUG #define API_MSG_DEBUG LWIP_DBG_OFF #endif /** * SOCKETS_DEBUG: Enable debugging in sockets.c. */ -#if !defined SOCKETS_DEBUG || defined __DOXYGEN__ +#ifndef SOCKETS_DEBUG #define SOCKETS_DEBUG LWIP_DBG_OFF #endif /** * ICMP_DEBUG: Enable debugging in icmp.c. */ -#if !defined ICMP_DEBUG || defined __DOXYGEN__ +#ifndef ICMP_DEBUG #define ICMP_DEBUG LWIP_DBG_OFF #endif /** * IGMP_DEBUG: Enable debugging in igmp.c. */ -#if !defined IGMP_DEBUG || defined __DOXYGEN__ +#ifndef IGMP_DEBUG #define IGMP_DEBUG LWIP_DBG_OFF #endif /** * INET_DEBUG: Enable debugging in inet.c. */ -#if !defined INET_DEBUG || defined __DOXYGEN__ +#ifndef INET_DEBUG #define INET_DEBUG LWIP_DBG_OFF #endif /** * IP_DEBUG: Enable debugging for IP. */ -#if !defined IP_DEBUG || defined __DOXYGEN__ +#ifndef IP_DEBUG #define IP_DEBUG LWIP_DBG_OFF #endif /** * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass. */ -#if !defined IP_REASS_DEBUG || defined __DOXYGEN__ +#ifndef IP_REASS_DEBUG #define IP_REASS_DEBUG LWIP_DBG_OFF #endif /** * RAW_DEBUG: Enable debugging in raw.c. */ -#if !defined RAW_DEBUG || defined __DOXYGEN__ +#ifndef RAW_DEBUG #define RAW_DEBUG LWIP_DBG_OFF #endif /** * MEM_DEBUG: Enable debugging in mem.c. */ -#if !defined MEM_DEBUG || defined __DOXYGEN__ +#ifndef MEM_DEBUG #define MEM_DEBUG LWIP_DBG_OFF #endif /** * MEMP_DEBUG: Enable debugging in memp.c. */ -#if !defined MEMP_DEBUG || defined __DOXYGEN__ +#ifndef MEMP_DEBUG #define MEMP_DEBUG LWIP_DBG_OFF #endif /** * SYS_DEBUG: Enable debugging in sys.c. */ -#if !defined SYS_DEBUG || defined __DOXYGEN__ +#ifndef SYS_DEBUG #define SYS_DEBUG LWIP_DBG_OFF #endif /** * TIMERS_DEBUG: Enable debugging in timers.c. */ -#if !defined TIMERS_DEBUG || defined __DOXYGEN__ +#ifndef TIMERS_DEBUG #define TIMERS_DEBUG LWIP_DBG_OFF #endif /** * TCP_DEBUG: Enable debugging for TCP. */ -#if !defined TCP_DEBUG || defined __DOXYGEN__ +#ifndef TCP_DEBUG #define TCP_DEBUG LWIP_DBG_OFF #endif /** * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug. */ -#if !defined TCP_INPUT_DEBUG || defined __DOXYGEN__ +#ifndef TCP_INPUT_DEBUG #define TCP_INPUT_DEBUG LWIP_DBG_OFF #endif /** * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit. */ -#if !defined TCP_FR_DEBUG || defined __DOXYGEN__ +#ifndef TCP_FR_DEBUG #define TCP_FR_DEBUG LWIP_DBG_OFF #endif @@ -2682,91 +2735,91 @@ * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit * timeout. */ -#if !defined TCP_RTO_DEBUG || defined __DOXYGEN__ +#ifndef TCP_RTO_DEBUG #define TCP_RTO_DEBUG LWIP_DBG_OFF #endif /** * TCP_CWND_DEBUG: Enable debugging for TCP congestion window. */ -#if !defined TCP_CWND_DEBUG || defined __DOXYGEN__ +#ifndef TCP_CWND_DEBUG #define TCP_CWND_DEBUG LWIP_DBG_OFF #endif /** * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating. */ -#if !defined TCP_WND_DEBUG || defined __DOXYGEN__ +#ifndef TCP_WND_DEBUG #define TCP_WND_DEBUG LWIP_DBG_OFF #endif /** * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions. */ -#if !defined TCP_OUTPUT_DEBUG || defined __DOXYGEN__ +#ifndef TCP_OUTPUT_DEBUG #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF #endif /** * TCP_RST_DEBUG: Enable debugging for TCP with the RST message. */ -#if !defined TCP_RST_DEBUG || defined __DOXYGEN__ +#ifndef TCP_RST_DEBUG #define TCP_RST_DEBUG LWIP_DBG_OFF #endif /** * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths. */ -#if !defined TCP_QLEN_DEBUG || defined __DOXYGEN__ +#ifndef TCP_QLEN_DEBUG #define TCP_QLEN_DEBUG LWIP_DBG_OFF #endif /** * UDP_DEBUG: Enable debugging in UDP. */ -#if !defined UDP_DEBUG || defined __DOXYGEN__ +#ifndef UDP_DEBUG #define UDP_DEBUG LWIP_DBG_OFF #endif /** * TCPIP_DEBUG: Enable debugging in tcpip.c. */ -#if !defined TCPIP_DEBUG || defined __DOXYGEN__ +#ifndef TCPIP_DEBUG #define TCPIP_DEBUG LWIP_DBG_OFF #endif /** * SLIP_DEBUG: Enable debugging in slipif.c. */ -#if !defined SLIP_DEBUG || defined __DOXYGEN__ +#ifndef SLIP_DEBUG #define SLIP_DEBUG LWIP_DBG_OFF #endif /** * DHCP_DEBUG: Enable debugging in dhcp.c. */ -#if !defined DHCP_DEBUG || defined __DOXYGEN__ +#ifndef DHCP_DEBUG #define DHCP_DEBUG LWIP_DBG_OFF #endif /** * AUTOIP_DEBUG: Enable debugging in autoip.c. */ -#if !defined AUTOIP_DEBUG || defined __DOXYGEN__ +#ifndef AUTOIP_DEBUG #define AUTOIP_DEBUG LWIP_DBG_OFF #endif /** * DNS_DEBUG: Enable debugging for DNS. */ -#if !defined DNS_DEBUG || defined __DOXYGEN__ +#ifndef DNS_DEBUG #define DNS_DEBUG LWIP_DBG_OFF #endif /** * IP6_DEBUG: Enable debugging for IPv6. */ -#if !defined IP6_DEBUG || defined __DOXYGEN__ +#ifndef IP6_DEBUG #define IP6_DEBUG LWIP_DBG_OFF #endif /** @@ -2787,7 +2840,7 @@ * LWIP_PERF: Enable performance testing for lwIP * (if enabled, arch/perf.h is included) */ -#if !defined LWIP_PERF || defined __DOXYGEN__ +#ifndef LWIP_PERF #define LWIP_PERF 0 #endif /** From 90fba8773f9c0bd77e8661289e4f575d88439298 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Thu, 28 Jul 2016 23:34:16 +0200 Subject: [PATCH 258/275] Revert "Fix my messing of opt.h and the other options files - it was actually caused by a cyclic #include which I did not see" It still does not work, due to #undef of options in opt.h, the documentation of many files is incomplete This reverts commit 3f0dae29e996f5f2015524500bc3e8f136315d8c. --- doc/doxygen/lwip.Doxyfile | 9 +- src/include/lwip/apps/httpd_opts.h | 92 ++-- src/include/lwip/apps/netbiosns_opts.h | 2 +- src/include/lwip/apps/snmp_opts.h | 46 +- src/include/lwip/apps/sntp_opts.h | 32 +- src/include/lwip/opt.h | 591 +++++++++++-------------- 6 files changed, 359 insertions(+), 413 deletions(-) diff --git a/doc/doxygen/lwip.Doxyfile b/doc/doxygen/lwip.Doxyfile index 0908d858..dd5f828c 100644 --- a/doc/doxygen/lwip.Doxyfile +++ b/doc/doxygen/lwip.Doxyfile @@ -2098,7 +2098,7 @@ PREDEFINED = __DOXYGEN__=1 \ LWIP_STATS=1 \ MEM_USE_POOLS=0 \ LWIP_DNS=1 \ - LWIP_SOCKET=1 \ + LWIP_SOCKETS=1 \ LWIP_NETCONN=1 \ IP_SOF_BROADCAST=1 \ IP_SOF_BROADCAST_RECV=1 \ @@ -2109,10 +2109,9 @@ PREDEFINED = __DOXYGEN__=1 \ SO_REUSE=1 \ SO_REUSE_RXTOALL=1 \ LWIP_HAVE_SLIPIF=1 \ - LWIP_6LOWPAN=1 - -# DONT FORGET to #undef EVERY OPTION IN opt.h AGAIN! -# ================================================== + LWIP_6LOWPAN=1 \ + "LWIP_DNS && LWIP_SOCKET " \ + "(LWIP_DNS && LWIP_SOCKET)=1 " # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The diff --git a/src/include/lwip/apps/httpd_opts.h b/src/include/lwip/apps/httpd_opts.h index 9f5d8b89..5fa84024 100644 --- a/src/include/lwip/apps/httpd_opts.h +++ b/src/include/lwip/apps/httpd_opts.h @@ -50,33 +50,33 @@ */ /** Set this to 1 to support CGI (old style) */ -#ifndef LWIP_HTTPD_CGI +#if !defined LWIP_HTTPD_CGI || defined __DOXYGEN__ #define LWIP_HTTPD_CGI 0 #endif /** Set this to 1 to support CGI (new style) */ -#ifndef LWIP_HTTPD_CGI_SSI +#if !defined LWIP_HTTPD_CGI_SSI || defined __DOXYGEN__ #define LWIP_HTTPD_CGI_SSI 0 #endif /** Set this to 1 to support SSI (Server-Side-Includes) */ -#ifndef LWIP_HTTPD_SSI +#if !defined LWIP_HTTPD_SSI || defined __DOXYGEN__ #define LWIP_HTTPD_SSI 0 #endif /** Set this to 1 to implement an SSI tag handler callback that gets a const char* * to the tag (instead of an index into a pre-registered array of known tags) */ -#ifndef LWIP_HTTPD_SSI_RAW +#if !defined LWIP_HTTPD_SSI_RAW || defined __DOXYGEN__ #define LWIP_HTTPD_SSI_RAW 0 #endif /** Set this to 1 to support HTTP POST */ -#ifndef LWIP_HTTPD_SUPPORT_POST +#if !defined LWIP_HTTPD_SUPPORT_POST || defined __DOXYGEN__ #define LWIP_HTTPD_SUPPORT_POST 0 #endif /* The maximum number of parameters that the CGI handler can be sent. */ -#ifndef LWIP_HTTPD_MAX_CGI_PARAMETERS +#if !defined LWIP_HTTPD_MAX_CGI_PARAMETERS || defined __DOXYGEN__ #define LWIP_HTTPD_MAX_CGI_PARAMETERS 16 #endif @@ -84,26 +84,26 @@ * arguments indicating a counter for insert string that are too long to be * inserted at once: the SSI handler function must then set 'next_tag_part' * which will be passed back to it in the next call. */ -#ifndef LWIP_HTTPD_SSI_MULTIPART +#if !defined LWIP_HTTPD_SSI_MULTIPART || defined __DOXYGEN__ #define LWIP_HTTPD_SSI_MULTIPART 0 #endif /* The maximum length of the string comprising the tag name */ -#ifndef LWIP_HTTPD_MAX_TAG_NAME_LEN +#if !defined LWIP_HTTPD_MAX_TAG_NAME_LEN || defined __DOXYGEN__ #define LWIP_HTTPD_MAX_TAG_NAME_LEN 8 #endif /* The maximum length of string that can be returned to replace any given tag */ -#ifndef LWIP_HTTPD_MAX_TAG_INSERT_LEN +#if !defined LWIP_HTTPD_MAX_TAG_INSERT_LEN || defined __DOXYGEN__ #define LWIP_HTTPD_MAX_TAG_INSERT_LEN 192 #endif -#ifndef LWIP_HTTPD_POST_MANUAL_WND +#if !defined LWIP_HTTPD_POST_MANUAL_WND || defined __DOXYGEN__ #define LWIP_HTTPD_POST_MANUAL_WND 0 #endif /** This string is passed in the HTTP header as "Server: " */ -#ifndef HTTPD_SERVER_AGENT +#if !defined HTTPD_SERVER_AGENT || defined __DOXYGEN__ #define HTTPD_SERVER_AGENT "lwIP/" LWIP_VERSION_STRING " (http://savannah.nongnu.org/projects/lwip)" #endif @@ -112,23 +112,23 @@ * by the makefsdata tool. Static headers mean smaller code size, but * the (readonly) fsdata will grow a bit as every file includes the HTTP * header. */ -#ifndef LWIP_HTTPD_DYNAMIC_HEADERS +#if !defined LWIP_HTTPD_DYNAMIC_HEADERS || defined __DOXYGEN__ #define LWIP_HTTPD_DYNAMIC_HEADERS 0 #endif -#ifndef HTTPD_DEBUG +#if !defined HTTPD_DEBUG || defined __DOXYGEN__ #define HTTPD_DEBUG LWIP_DBG_OFF #endif /** Set this to 1 to use a memp pool for allocating * struct http_state instead of the heap. */ -#ifndef HTTPD_USE_MEM_POOL +#if !defined HTTPD_USE_MEM_POOL || defined __DOXYGEN__ #define HTTPD_USE_MEM_POOL 0 #endif /** The server port for HTTPD to use */ -#ifndef HTTPD_SERVER_PORT +#if !defined HTTPD_SERVER_PORT || defined __DOXYGEN__ #define HTTPD_SERVER_PORT 80 #endif @@ -136,44 +136,44 @@ * - number of times pcb->poll is called -> default is 4*500ms = 2s; * - reset when pcb->sent is called */ -#ifndef HTTPD_MAX_RETRIES +#if !defined HTTPD_MAX_RETRIES || defined __DOXYGEN__ #define HTTPD_MAX_RETRIES 4 #endif /** The poll delay is X*500ms */ -#ifndef HTTPD_POLL_INTERVAL +#if !defined HTTPD_POLL_INTERVAL || defined __DOXYGEN__ #define HTTPD_POLL_INTERVAL 4 #endif /** Priority for tcp pcbs created by HTTPD (very low by default). * Lower priorities get killed first when running out of memory. */ -#ifndef HTTPD_TCP_PRIO +#if !defined HTTPD_TCP_PRIO || defined __DOXYGEN__ #define HTTPD_TCP_PRIO TCP_PRIO_MIN #endif /** Set this to 1 to enable timing each file sent */ -#ifndef LWIP_HTTPD_TIMING +#if !defined LWIP_HTTPD_TIMING || defined __DOXYGEN__ #define LWIP_HTTPD_TIMING 0 #endif /** Set this to 1 to enable timing each file sent */ -#ifndef HTTPD_DEBUG_TIMING +#if !defined HTTPD_DEBUG_TIMING || defined __DOXYGEN__ #define HTTPD_DEBUG_TIMING LWIP_DBG_OFF #endif /** Set this to 1 on platforms where strnstr is not available */ -#ifndef LWIP_HTTPD_STRNSTR_PRIVATE +#if !defined LWIP_HTTPD_STRNSTR_PRIVATE || defined __DOXYGEN__ #define LWIP_HTTPD_STRNSTR_PRIVATE 1 #endif /** Set this to 1 on platforms where stricmp is not available */ -#ifndef LWIP_HTTPD_STRICMP_PRIVATE +#if !defined LWIP_HTTPD_STRICMP_PRIVATE || defined __DOXYGEN__ #define LWIP_HTTPD_STRICMP_PRIVATE 0 #endif /** Define this to a smaller function if you have itoa() at hand... */ -#ifndef LWIP_HTTPD_ITOA -#ifndef LWIP_HTTPD_ITOA_PRIVATE +#if !defined LWIP_HTTPD_ITOA || defined __DOXYGEN__ +#if !defined LWIP_HTTPD_ITOA_PRIVATE || defined __DOXYGEN__ #define LWIP_HTTPD_ITOA_PRIVATE 1 #endif #if LWIP_HTTPD_ITOA_PRIVATE @@ -185,12 +185,12 @@ /** Set this to one to show error pages when parsing a request fails instead of simply closing the connection. */ -#ifndef LWIP_HTTPD_SUPPORT_EXTSTATUS +#if !defined LWIP_HTTPD_SUPPORT_EXTSTATUS || defined __DOXYGEN__ #define LWIP_HTTPD_SUPPORT_EXTSTATUS 0 #endif /** Set this to 0 to drop support for HTTP/0.9 clients (to save some bytes) */ -#ifndef LWIP_HTTPD_SUPPORT_V09 +#if !defined LWIP_HTTPD_SUPPORT_V09 || defined __DOXYGEN__ #define LWIP_HTTPD_SUPPORT_V09 1 #endif @@ -198,32 +198,32 @@ * ATTENTION: If the generated file system includes HTTP headers, these must * include the "Connection: keep-alive" header (pass argument "-11" to makefsdata). */ -#ifndef LWIP_HTTPD_SUPPORT_11_KEEPALIVE +#if !defined LWIP_HTTPD_SUPPORT_11_KEEPALIVE || defined __DOXYGEN__ #define LWIP_HTTPD_SUPPORT_11_KEEPALIVE 0 #endif /** Set this to 1 to support HTTP request coming in in multiple packets/pbufs */ -#ifndef LWIP_HTTPD_SUPPORT_REQUESTLIST +#if !defined LWIP_HTTPD_SUPPORT_REQUESTLIST || defined __DOXYGEN__ #define LWIP_HTTPD_SUPPORT_REQUESTLIST 1 #endif #if LWIP_HTTPD_SUPPORT_REQUESTLIST /** Number of rx pbufs to enqueue to parse an incoming request (up to the first newline) */ -#ifndef LWIP_HTTPD_REQ_QUEUELEN +#if !defined LWIP_HTTPD_REQ_QUEUELEN || defined __DOXYGEN__ #define LWIP_HTTPD_REQ_QUEUELEN 5 #endif /** Number of (TCP payload-) bytes (in pbufs) to enqueue to parse and incoming request (up to the first double-newline) */ -#ifndef LWIP_HTTPD_REQ_BUFSIZE +#if !defined LWIP_HTTPD_REQ_BUFSIZE || defined __DOXYGEN__ #define LWIP_HTTPD_REQ_BUFSIZE LWIP_HTTPD_MAX_REQ_LENGTH #endif /** Defines the maximum length of a HTTP request line (up to the first CRLF, copied from pbuf into this a global buffer when pbuf- or packet-queues are received - otherwise the input pbuf is used directly) */ -#ifndef LWIP_HTTPD_MAX_REQ_LENGTH +#if !defined LWIP_HTTPD_MAX_REQ_LENGTH || defined __DOXYGEN__ #define LWIP_HTTPD_MAX_REQ_LENGTH LWIP_MIN(1023, (LWIP_HTTPD_REQ_QUEUELEN * PBUF_POOL_BUFSIZE)) #endif #endif /* LWIP_HTTPD_SUPPORT_REQUESTLIST */ @@ -233,27 +233,27 @@ * configured default file names. * Set to 0 to disable checking default filenames on non-root directories. */ -#ifndef LWIP_HTTPD_MAX_REQUEST_URI_LEN +#if !defined LWIP_HTTPD_MAX_REQUEST_URI_LEN || defined __DOXYGEN__ #define LWIP_HTTPD_MAX_REQUEST_URI_LEN 63 #endif /** Maximum length of the filename to send as response to a POST request, * filled in by the application when a POST is finished. */ -#ifndef LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN +#if !defined LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN || defined __DOXYGEN__ #define LWIP_HTTPD_POST_MAX_RESPONSE_URI_LEN 63 #endif /** Set this to 0 to not send the SSI tag (default is on, so the tag will * be sent in the HTML page */ -#ifndef LWIP_HTTPD_SSI_INCLUDE_TAG +#if !defined LWIP_HTTPD_SSI_INCLUDE_TAG || defined __DOXYGEN__ #define LWIP_HTTPD_SSI_INCLUDE_TAG 1 #endif /** Set this to 1 to call tcp_abort when tcp_close fails with memory error. * This can be used to prevent consuming all memory in situations where the * HTTP server has low priority compared to other communication. */ -#ifndef LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR +#if !defined LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR || defined __DOXYGEN__ #define LWIP_HTTPD_ABORT_ON_CLOSE_MEM_ERROR 0 #endif @@ -261,30 +261,30 @@ * memory for 'struct http_state' or 'struct http_ssi_state'. * ATTENTION: This puts all connections on a linked list, so may be kind of slow. */ -#ifndef LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED +#if !defined LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED || defined __DOXYGEN__ #define LWIP_HTTPD_KILL_OLD_ON_CONNECTIONS_EXCEEDED 0 #endif /** Set this to 1 to send URIs without extension without headers * (who uses this at all??) */ -#ifndef LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI +#if !defined LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI || defined __DOXYGEN__ #define LWIP_HTTPD_OMIT_HEADER_FOR_EXTENSIONLESS_URI 0 #endif /** Default: Tags are sent from struct http_state and are therefore volatile */ -#ifndef HTTP_IS_TAG_VOLATILE +#if !defined HTTP_IS_TAG_VOLATILE || defined __DOXYGEN__ #define HTTP_IS_TAG_VOLATILE(ptr) TCP_WRITE_FLAG_COPY #endif /* By default, the httpd is limited to send 2*pcb->mss to keep resource usage low when http is not an important protocol in the device. */ -#ifndef HTTPD_LIMIT_SENDING_TO_2MSS +#if !defined HTTPD_LIMIT_SENDING_TO_2MSS || defined __DOXYGEN__ #define HTTPD_LIMIT_SENDING_TO_2MSS 1 #endif /* Define this to a function that returns the maximum amount of data to enqueue. The function have this signature: u16_t fn(struct tcp_pcb* pcb); */ -#ifndef HTTPD_MAX_WRITE_LEN +#if !defined HTTPD_MAX_WRITE_LEN || defined __DOXYGEN__ #if HTTPD_LIMIT_SENDING_TO_2MSS #define HTTPD_MAX_WRITE_LEN(pcb) (2 * tcp_mss(pcb)) #endif @@ -299,7 +299,7 @@ * - "void fs_close_custom(struct fs_file *file)" * Called to free resources allocated by fs_open_custom(). */ -#ifndef LWIP_HTTPD_CUSTOM_FILES +#if !defined LWIP_HTTPD_CUSTOM_FILES || defined __DOXYGEN__ #define LWIP_HTTPD_CUSTOM_FILES 0 #endif @@ -307,34 +307,34 @@ * Without this (default=off), only one-block files are supported, * and the contents must be ready after fs_open(). */ -#ifndef LWIP_HTTPD_DYNAMIC_FILE_READ +#if !defined LWIP_HTTPD_DYNAMIC_FILE_READ || defined __DOXYGEN__ #define LWIP_HTTPD_DYNAMIC_FILE_READ 0 #endif /** Set this to 1 to include an application state argument per file * that is opened. This allows to keep a state per connection/file. */ -#ifndef LWIP_HTTPD_FILE_STATE +#if !defined LWIP_HTTPD_FILE_STATE || defined __DOXYGEN__ #define LWIP_HTTPD_FILE_STATE 0 #endif /** HTTPD_PRECALCULATED_CHECKSUM==1: include precompiled checksums for * predefined (MSS-sized) chunks of the files to prevent having to calculate * the checksums at runtime. */ -#ifndef HTTPD_PRECALCULATED_CHECKSUM +#if !defined HTTPD_PRECALCULATED_CHECKSUM || defined __DOXYGEN__ #define HTTPD_PRECALCULATED_CHECKSUM 0 #endif /** LWIP_HTTPD_FS_ASYNC_READ==1: support asynchronous read operations * (fs_read_async returns FS_READ_DELAYED and calls a callback when finished). */ -#ifndef LWIP_HTTPD_FS_ASYNC_READ +#if !defined LWIP_HTTPD_FS_ASYNC_READ || defined __DOXYGEN__ #define LWIP_HTTPD_FS_ASYNC_READ 0 #endif /** Set this to 1 to include "fsdata_custom.c" instead of "fsdata.c" for the * file system (to prevent changing the file included in CVS) */ -#ifndef HTTPD_USE_CUSTOM_FSDATA +#if !defined HTTPD_USE_CUSTOM_FSDATA || defined __DOXYGEN__ #define HTTPD_USE_CUSTOM_FSDATA 0 #endif diff --git a/src/include/lwip/apps/netbiosns_opts.h b/src/include/lwip/apps/netbiosns_opts.h index 6b7616c3..870b9fdf 100644 --- a/src/include/lwip/apps/netbiosns_opts.h +++ b/src/include/lwip/apps/netbiosns_opts.h @@ -46,7 +46,7 @@ * If not defined, comparision is case sensitive and the provided hostname must be * uppercase. */ -#ifndef NETBIOS_STRCMP +#if !defined NETBIOS_STRCMP || defined __DOXYGEN__ #define NETBIOS_STRCMP(str1, str2) strcmp(str1, str2) #endif diff --git a/src/include/lwip/apps/snmp_opts.h b/src/include/lwip/apps/snmp_opts.h index a921b1c7..bf6f0093 100644 --- a/src/include/lwip/apps/snmp_opts.h +++ b/src/include/lwip/apps/snmp_opts.h @@ -53,7 +53,7 @@ * LWIP_MIB2_CALLBACKS and MIB2_STATS. This will give you the callbacks * and statistics counters you need to get MIB2 working. */ -#ifndef LWIP_SNMP +#if !defined LWIP_SNMP || defined __DOXYGEN__ #define LWIP_SNMP 0 #endif @@ -62,7 +62,7 @@ * Makes SNMP agent run in a worker thread, so blocking operations * can be done in MIB calls. */ -#ifndef SNMP_USE_NETCONN +#if !defined SNMP_USE_NETCONN || defined __DOXYGEN__ #define SNMP_USE_NETCONN 0 #endif @@ -71,7 +71,7 @@ * SNMP agent does not run in a worker thread, so blocking operations * should not be done in MIB calls. */ -#ifndef SNMP_USE_RAW +#if !defined SNMP_USE_RAW || defined __DOXYGEN__ #define SNMP_USE_RAW 1 #endif @@ -87,14 +87,14 @@ /** * SNMP_STACK_SIZE: Stack size of SNMP netconn worker thread */ -#ifndef SNMP_STACK_SIZE +#if !defined SNMP_STACK_SIZE || defined __DOXYGEN__ #define SNMP_STACK_SIZE DEFAULT_THREAD_STACKSIZE #endif /** * SNMP_THREAD_PRIO: SNMP netconn worker thread priority */ -#ifndef SNMP_THREAD_PRIO +#if !defined SNMP_THREAD_PRIO || defined __DOXYGEN__ #define SNMP_THREAD_PRIO DEFAULT_THREAD_PRIO #endif #endif /* SNMP_USE_NETCONN */ @@ -103,7 +103,7 @@ * SNMP_TRAP_DESTINATIONS: Number of trap destinations. At least one trap * destination is required */ -#ifndef SNMP_TRAP_DESTINATIONS +#if !defined SNMP_TRAP_DESTINATIONS || defined __DOXYGEN__ #define SNMP_TRAP_DESTINATIONS 1 #endif @@ -112,14 +112,14 @@ * a safe action and disabled when SNMP_SAFE_REQUESTS = 1). * Unsafe requests are disabled by default! */ -#ifndef SNMP_SAFE_REQUESTS +#if !defined SNMP_SAFE_REQUESTS || defined __DOXYGEN__ #define SNMP_SAFE_REQUESTS 1 #endif /** * The maximum length of strings used. */ -#ifndef SNMP_MAX_OCTET_STRING_LEN +#if !defined SNMP_MAX_OCTET_STRING_LEN || defined __DOXYGEN__ #define SNMP_MAX_OCTET_STRING_LEN 127 #endif @@ -127,11 +127,11 @@ * The maximum number of Sub ID's inside an object identifier. * Indirectly this also limits the maximum depth of SNMP tree. */ -#ifndef SNMP_MAX_OBJ_ID_LEN +#if !defined SNMP_MAX_OBJ_ID_LEN || defined __DOXYGEN__ #define SNMP_MAX_OBJ_ID_LEN 50 #endif -#ifndef SNMP_MAX_VALUE_SIZE +#if !defined SNMP_MAX_VALUE_SIZE || defined __DOXYGEN__ /** * The maximum size of a value. */ @@ -146,7 +146,7 @@ * The snmp read-access community. Used for write-access and traps, too * unless SNMP_COMMUNITY_WRITE or SNMP_COMMUNITY_TRAP are enabled, respectively. */ -#ifndef SNMP_COMMUNITY +#if !defined SNMP_COMMUNITY || defined __DOXYGEN__ #define SNMP_COMMUNITY "public" #endif @@ -154,14 +154,14 @@ * The snmp write-access community. * Set this community to "" in order to disallow any write access. */ -#ifndef SNMP_COMMUNITY_WRITE +#if !defined SNMP_COMMUNITY_WRITE || defined __DOXYGEN__ #define SNMP_COMMUNITY_WRITE "private" #endif /** * The snmp community used for sending traps. */ -#ifndef SNMP_COMMUNITY_TRAP +#if !defined SNMP_COMMUNITY_TRAP || defined __DOXYGEN__ #define SNMP_COMMUNITY_TRAP "public" #endif @@ -170,14 +170,14 @@ * If community names shall be adjusted at runtime via snmp_set_community() calls, * enter here the possible maximum length (+1 for terminating null character). */ -#ifndef SNMP_MAX_COMMUNITY_STR_LEN +#if !defined SNMP_MAX_COMMUNITY_STR_LEN || defined __DOXYGEN__ #define SNMP_MAX_COMMUNITY_STR_LEN LWIP_MAX(LWIP_MAX(sizeof(SNMP_COMMUNITY), sizeof(SNMP_COMMUNITY_WRITE)), sizeof(SNMP_COMMUNITY_TRAP)) #endif /** * The OID identifiying the device. This may be the enterprise OID itself or any OID located below it in tree. */ -#ifndef SNMP_DEVICE_ENTERPRISE_OID +#if !defined SNMP_DEVICE_ENTERPRISE_OID || defined __DOXYGEN__ #define SNMP_LWIP_ENTERPRISE_OID 26381 /** * IANA assigned enterprise ID for lwIP is 26381 @@ -202,28 +202,28 @@ /** * SNMP_DEBUG: Enable debugging for SNMP messages. */ -#ifndef SNMP_DEBUG +#if !defined SNMP_DEBUG || defined __DOXYGEN__ #define SNMP_DEBUG LWIP_DBG_OFF #endif /** * SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs. */ -#ifndef SNMP_MIB_DEBUG +#if !defined SNMP_MIB_DEBUG || defined __DOXYGEN__ #define SNMP_MIB_DEBUG LWIP_DBG_OFF #endif /** * Indicates if the MIB2 implementation of LWIP SNMP stack is used. */ -#ifndef SNMP_LWIP_MIB2 +#if !defined SNMP_LWIP_MIB2 || defined __DOXYGEN__ #define SNMP_LWIP_MIB2 LWIP_SNMP #endif /** * Value return for sysDesc field of MIB2. */ -#ifndef SNMP_LWIP_MIB2_SYSDESC +#if !defined SNMP_LWIP_MIB2_SYSDESC || defined __DOXYGEN__ #define SNMP_LWIP_MIB2_SYSDESC "lwIP" #endif @@ -231,7 +231,7 @@ * Value return for sysName field of MIB2. * To make sysName field settable, call snmp_mib2_set_sysname() to provide the necessary buffers. */ -#ifndef SNMP_LWIP_MIB2_SYSNAME +#if !defined SNMP_LWIP_MIB2_SYSNAME || defined __DOXYGEN__ #define SNMP_LWIP_MIB2_SYSNAME "FQDN-unk" #endif @@ -239,7 +239,7 @@ * Value return for sysContact field of MIB2. * To make sysContact field settable, call snmp_mib2_set_syscontact() to provide the necessary buffers. */ -#ifndef SNMP_LWIP_MIB2_SYSCONTACT +#if !defined SNMP_LWIP_MIB2_SYSCONTACT || defined __DOXYGEN__ #define SNMP_LWIP_MIB2_SYSCONTACT "" #endif @@ -247,7 +247,7 @@ * Value return for sysLocation field of MIB2. * To make sysLocation field settable, call snmp_mib2_set_syslocation() to provide the necessary buffers. */ -#ifndef SNMP_LWIP_MIB2_SYSLOCATION +#if !defined SNMP_LWIP_MIB2_SYSLOCATION || defined __DOXYGEN__ #define SNMP_LWIP_MIB2_SYSLOCATION "" #endif @@ -259,7 +259,7 @@ * For the stack this could be useful in case that SNMP processing is done in TCP/IP thread. In this situation a request with many * repetitions could block the thread for a longer time. Setting limit here will keep the stack more responsive. */ -#ifndef SNMP_LWIP_GETBULK_MAX_REPETITIONS +#if !defined SNMP_LWIP_GETBULK_MAX_REPETITIONS || defined __DOXYGEN__ #define SNMP_LWIP_GETBULK_MAX_REPETITIONS 0 #endif diff --git a/src/include/lwip/apps/sntp_opts.h b/src/include/lwip/apps/sntp_opts.h index f6731231..f3651f90 100644 --- a/src/include/lwip/apps/sntp_opts.h +++ b/src/include/lwip/apps/sntp_opts.h @@ -49,18 +49,18 @@ * Define SNTP_SET_SYSTEM_TIME_US(sec, us) to set the time in microseconds instead of this one * if you need the additional precision. */ -#ifndef SNTP_SET_SYSTEM_TIME +#if !defined SNTP_SET_SYSTEM_TIME || defined __DOXYGEN__ #define SNTP_SET_SYSTEM_TIME(sec) LWIP_UNUSED_ARG(sec) #endif /** The maximum number of SNTP servers that can be set */ -#ifndef SNTP_MAX_SERVERS +#if !defined SNTP_MAX_SERVERS || defined __DOXYGEN__ #define SNTP_MAX_SERVERS LWIP_DHCP_MAX_NTP_SERVERS #endif /** Set this to 1 to implement the callback function called by dhcp when * NTP servers are received. */ -#ifndef SNTP_GET_SERVERS_FROM_DHCP +#if !defined SNTP_GET_SERVERS_FROM_DHCP || defined __DOXYGEN__ #define SNTP_GET_SERVERS_FROM_DHCP LWIP_DHCP_GET_NTP_SRV #endif @@ -68,24 +68,24 @@ * One server address/name can be defined as default if SNTP_SERVER_DNS == 1: * \#define SNTP_SERVER_ADDRESS "pool.ntp.org" */ -#ifndef SNTP_SERVER_DNS +#if !defined SNTP_SERVER_DNS || defined __DOXYGEN__ #define SNTP_SERVER_DNS 0 #endif /** * SNTP_DEBUG: Enable debugging for SNTP. */ -#ifndef SNTP_DEBUG +#if !defined SNTP_DEBUG || defined __DOXYGEN__ #define SNTP_DEBUG LWIP_DBG_OFF #endif /** SNTP server port */ -#ifndef SNTP_PORT +#if !defined SNTP_PORT || defined __DOXYGEN__ #define SNTP_PORT 123 #endif /** Set this to 1 to allow config of SNTP server(s) by DNS name */ -#ifndef SNTP_SERVER_DNS +#if !defined SNTP_SERVER_DNS || defined __DOXYGEN__ #define SNTP_SERVER_DNS 0 #endif @@ -103,7 +103,7 @@ * currently a cozy number like one second. This check avoids using a * server whose synchronization source has expired for a very long time. */ -#ifndef SNTP_CHECK_RESPONSE +#if !defined SNTP_CHECK_RESPONSE || defined __DOXYGEN__ #define SNTP_CHECK_RESPONSE 0 #endif @@ -113,14 +113,14 @@ * which must return the delay in milliseconds as u32_t. * Turned off by default. */ -#ifndef SNTP_STARTUP_DELAY +#if !defined SNTP_STARTUP_DELAY || defined __DOXYGEN__ #define SNTP_STARTUP_DELAY 0 #endif /** If you want the startup delay to be a function, define this * to a function (including the brackets) and define SNTP_STARTUP_DELAY to 1. */ -#ifndef SNTP_STARTUP_DELAY_FUNC +#if !defined SNTP_STARTUP_DELAY_FUNC || defined __DOXYGEN__ #define SNTP_STARTUP_DELAY_FUNC SNTP_STARTUP_DELAY #endif @@ -128,21 +128,21 @@ * Also used as retry timeout - this shouldn't be too low. * Default is 3 seconds. */ -#ifndef SNTP_RECV_TIMEOUT +#if !defined SNTP_RECV_TIMEOUT || defined __DOXYGEN__ #define SNTP_RECV_TIMEOUT 3000 #endif /** SNTP update delay - in milliseconds * Default is 1 hour. Must not be beolw 15 seconds by specification (i.e. 15000) */ -#ifndef SNTP_UPDATE_DELAY +#if !defined SNTP_UPDATE_DELAY || defined __DOXYGEN__ #define SNTP_UPDATE_DELAY 3600000 #endif /** SNTP macro to get system time, used with SNTP_CHECK_RESPONSE >= 2 * to send in request and compare in response. */ -#ifndef SNTP_GET_SYSTEM_TIME +#if !defined SNTP_GET_SYSTEM_TIME || defined __DOXYGEN__ #define SNTP_GET_SYSTEM_TIME(sec, us) do { (sec) = 0; (us) = 0; } while(0) #endif @@ -150,19 +150,19 @@ * received is invalid. * This is doubled with each retry until SNTP_RETRY_TIMEOUT_MAX is reached. */ -#ifndef SNTP_RETRY_TIMEOUT +#if !defined SNTP_RETRY_TIMEOUT || defined __DOXYGEN__ #define SNTP_RETRY_TIMEOUT SNTP_RECV_TIMEOUT #endif /** Maximum retry timeout (in milliseconds). */ -#ifndef SNTP_RETRY_TIMEOUT_MAX +#if !defined SNTP_RETRY_TIMEOUT_MAX || defined __DOXYGEN__ #define SNTP_RETRY_TIMEOUT_MAX (SNTP_RETRY_TIMEOUT * 10) #endif /** Increase retry timeout with every retry sent * Default is on to conform to RFC. */ -#ifndef SNTP_RETRY_TIMEOUT_EXP +#if !defined SNTP_RETRY_TIMEOUT_EXP || defined __DOXYGEN__ #define SNTP_RETRY_TIMEOUT_EXP 1 #endif diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 76d050dd..b37124ce 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -36,7 +36,12 @@ * */ -#ifndef LWIP_HDR_OPT_H +/* + * NOTE: || defined __DOXYGEN__ is a workaround for doxygen bug - + * without this, doxygen does not see the actual #define + */ + +#if !defined LWIP_HDR_OPT_H #define LWIP_HDR_OPT_H /* @@ -44,65 +49,7 @@ * will be set to standard values. Override anything you don't like! */ #include "lwipopts.h" - -/* - * By #including lwip/debug.h which in turn includes opt.h again, - * all macros are #defined and doxygen won't see them any more - * due to #ifndef foo - #endif guards. This is circumvented - * by surrounding the #include with #ifndef __DOXYGEN__ - */ -#ifndef __DOXYGEN__ #include "lwip/debug.h" -#endif - -/* - * Some #defines are made in lwip.Doxygen to make the tool pick up - * all code in the source files. Unfortunately, this prevents picking up - * the same #define in here, so we need to #undef them first... - */ -#ifdef __DOXYGEN__ -#undef NO_SYS -#undef SYS_LIGHTWEIGHT_PROT -#undef LWIP_IPV4 -#undef LWIP_IPV6 -#undef LWIP_ICMP -#undef LWIP_RAW -#undef LWIP_DHCP -#undef LWIP_UDPLITE -#undef LWIP_UDP -#undef LWIP_IGMP -#undef LWIP_TCP -#undef LWIP_SNMP -#undef SNMP_USE_NETCONN -#undef SNMP_USE_RAW -#undef MEMP_OVERFLOW_CHECK -#undef MEMP_SANITY_CHECK -#undef LWIP_ARP -#undef LWIP_HAVE_LOOPIF -#undef LWIP_NETIF_HOSTNAME -#undef LWIP_NETIF_API -#undef LWIP_NETIF_CALLBACK -#undef LWIP_NETIF_REMOVE_CALLBACK -#undef LWIP_NETIF_LINK_CALLBACK -#undef ENABLE_LOOPBACK -#undef LWIP_AUTOIP -#undef ARP_QUEUEING -#undef LWIP_STATS -#undef MEM_USE_POOLS -#undef LWIP_DNS -#undef LWIP_SOCKET -#undef LWIP_NETCONN -#undef IP_SOF_BROADCAST -#undef IP_SOF_BROADCAST_RECV -#undef LWIP_NETIF_API -#undef LWIP_SO_SNDTIMEO -#undef LWIP_SO_RCVBUF -#undef LWIP_SO_LINGER -#undef SO_REUSE -#undef SO_REUSE_RXTOALL -#undef LWIP_HAVE_SLIPIF -#undef LWIP_6LOWPAN -#endif /** * @defgroup lwip_opts Options (lwipopts.h) @@ -138,7 +85,7 @@ * available (and you have to watch out for yourself that you don't access * lwIP functions/structures from more than one context at a time!) */ -#ifndef NO_SYS +#if !defined NO_SYS || defined __DOXYGEN__ #define NO_SYS 0 #endif /** @@ -155,7 +102,7 @@ * (the array of lwip-internal cyclic timers is still provided) * (check NO_SYS_NO_TIMERS for compatibility to old versions) */ -#ifndef LWIP_TIMERS +#if !defined LWIP_TIMERS || defined __DOXYGEN__ #ifdef NO_SYS_NO_TIMERS #define LWIP_TIMERS (!NO_SYS || (NO_SYS && !NO_SYS_NO_TIMERS)) #else @@ -170,7 +117,7 @@ * will be required: sys_timeouts_init(), sys_timeout(), sys_untimeout(), * sys_timeouts_mbox_fetch() */ -#ifndef LWIP_TIMERS_CUSTOM +#if !defined LWIP_TIMERS_CUSTOM || defined __DOXYGEN__ #define LWIP_TIMERS_CUSTOM 0 #endif /** @@ -186,7 +133,7 @@ * MEMCPY: override this if you have a faster implementation at hand than the * one included in your C library */ -#ifndef MEMCPY +#if !defined MEMCPY || defined __DOXYGEN__ #define MEMCPY(dst,src,len) memcpy(dst,src,len) #endif @@ -194,7 +141,7 @@ * SMEMCPY: override this with care! Some compilers (e.g. gcc) can inline a * call to memcpy() if the length is known at compile time and is small. */ -#ifndef SMEMCPY +#if !defined SMEMCPY || defined __DOXYGEN__ #define SMEMCPY(dst,src,len) memcpy(dst,src,len) #endif /** @@ -218,7 +165,7 @@ * (this decreases performance as memory is allocated from pools instead * of keeping it on the stack) */ -#ifndef LWIP_MPU_COMPATIBLE +#if !defined LWIP_MPU_COMPATIBLE || defined __DOXYGEN__ #define LWIP_MPU_COMPATIBLE 0 #endif @@ -230,7 +177,7 @@ * UNLOCK_TCPIP_CORE(). * Your system should provide mutexes supporting priority inversion to use this. */ -#ifndef LWIP_TCPIP_CORE_LOCKING +#if !defined LWIP_TCPIP_CORE_LOCKING || defined __DOXYGEN__ #define LWIP_TCPIP_CORE_LOCKING 1 #endif @@ -242,7 +189,7 @@ * ATTENTION: this does not work when tcpip_input() is called from * interrupt context! */ -#ifndef LWIP_TCPIP_CORE_LOCKING_INPUT +#if !defined LWIP_TCPIP_CORE_LOCKING_INPUT || defined __DOXYGEN__ #define LWIP_TCPIP_CORE_LOCKING_INPUT 0 #endif @@ -253,7 +200,7 @@ * ATTENTION: This is required when using lwIP from more than one context! If * you disable this, you must be sure what you are doing! */ -#ifndef SYS_LIGHTWEIGHT_PROT +#if !defined SYS_LIGHTWEIGHT_PROT || defined __DOXYGEN__ #define SYS_LIGHTWEIGHT_PROT 1 #endif /** @@ -275,7 +222,7 @@ * instead of the lwip internal allocator. Can save code size if you * already use it. */ -#ifndef MEM_LIBC_MALLOC +#if !defined MEM_LIBC_MALLOC || defined __DOXYGEN__ #define MEM_LIBC_MALLOC 0 #endif @@ -288,7 +235,7 @@ * ATTENTION: Currently, this uses the heap for ALL pools (also for private pools, * not only for internal pools defined in memp_std.h)! */ -#ifndef MEMP_MEM_MALLOC +#if !defined MEMP_MEM_MALLOC || defined __DOXYGEN__ #define MEMP_MEM_MALLOC 0 #endif @@ -297,7 +244,7 @@ * 4 byte alignment -> \#define MEM_ALIGNMENT 4 * 2 byte alignment -> \#define MEM_ALIGNMENT 2 */ -#ifndef MEM_ALIGNMENT +#if !defined MEM_ALIGNMENT || defined __DOXYGEN__ #define MEM_ALIGNMENT 1 #endif @@ -305,7 +252,7 @@ * MEM_SIZE: the size of the heap memory. If the application will send * a lot of data that needs to be copied, this should be set high. */ -#ifndef MEM_SIZE +#if !defined MEM_SIZE || defined __DOXYGEN__ #define MEM_SIZE 1600 #endif @@ -318,7 +265,7 @@ * MEMP_OVERFLOW_CHECK >= 2 checks each element in every pool every time * memp_malloc() or memp_free() is called (useful but slow!) */ -#ifndef MEMP_OVERFLOW_CHECK +#if !defined MEMP_OVERFLOW_CHECK || defined __DOXYGEN__ #define MEMP_OVERFLOW_CHECK 0 #endif @@ -326,7 +273,7 @@ * MEMP_SANITY_CHECK==1: run a sanity check after each memp_free() to make * sure that there are no cycles in the linked lists. */ -#ifndef MEMP_SANITY_CHECK +#if !defined MEMP_SANITY_CHECK || defined __DOXYGEN__ #define MEMP_SANITY_CHECK 0 #endif @@ -336,7 +283,7 @@ * the smallest pool that can provide the length needed is returned. * To use this, MEMP_USE_CUSTOM_POOLS also has to be enabled. */ -#ifndef MEM_USE_POOLS +#if !defined MEM_USE_POOLS || defined __DOXYGEN__ #define MEM_USE_POOLS 0 #endif @@ -344,7 +291,7 @@ * MEM_USE_POOLS_TRY_BIGGER_POOL==1: if one malloc-pool is empty, try the next * bigger pool - WARNING: THIS MIGHT WASTE MEMORY but it can make a system more * reliable. */ -#ifndef MEM_USE_POOLS_TRY_BIGGER_POOL +#if !defined MEM_USE_POOLS_TRY_BIGGER_POOL || defined __DOXYGEN__ #define MEM_USE_POOLS_TRY_BIGGER_POOL 0 #endif @@ -354,7 +301,7 @@ * by lwIP. If you set this to 1, you must have lwippools.h in your * include path somewhere. */ -#ifndef MEMP_USE_CUSTOM_POOLS +#if !defined MEMP_USE_CUSTOM_POOLS || defined __DOXYGEN__ #define MEMP_USE_CUSTOM_POOLS 0 #endif @@ -376,7 +323,7 @@ * - pbuf_free_callback(p); * - mem_free_callback(m); */ -#ifndef LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT +#if !defined LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT || defined __DOXYGEN__ #define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 0 #endif /** @@ -398,7 +345,7 @@ * If the application sends a lot of data out of ROM (or other static memory), * this should be set high. */ -#ifndef MEMP_NUM_PBUF +#if !defined MEMP_NUM_PBUF || defined __DOXYGEN__ #define MEMP_NUM_PBUF 16 #endif @@ -406,7 +353,7 @@ * MEMP_NUM_RAW_PCB: Number of raw connection PCBs * (requires the LWIP_RAW option) */ -#ifndef MEMP_NUM_RAW_PCB +#if !defined MEMP_NUM_RAW_PCB || defined __DOXYGEN__ #define MEMP_NUM_RAW_PCB 4 #endif @@ -415,7 +362,7 @@ * per active UDP "connection". * (requires the LWIP_UDP option) */ -#ifndef MEMP_NUM_UDP_PCB +#if !defined MEMP_NUM_UDP_PCB || defined __DOXYGEN__ #define MEMP_NUM_UDP_PCB 4 #endif @@ -423,7 +370,7 @@ * MEMP_NUM_TCP_PCB: the number of simultaneously active TCP connections. * (requires the LWIP_TCP option) */ -#ifndef MEMP_NUM_TCP_PCB +#if !defined MEMP_NUM_TCP_PCB || defined __DOXYGEN__ #define MEMP_NUM_TCP_PCB 5 #endif @@ -431,7 +378,7 @@ * MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP connections. * (requires the LWIP_TCP option) */ -#ifndef MEMP_NUM_TCP_PCB_LISTEN +#if !defined MEMP_NUM_TCP_PCB_LISTEN || defined __DOXYGEN__ #define MEMP_NUM_TCP_PCB_LISTEN 8 #endif @@ -439,7 +386,7 @@ * MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP segments. * (requires the LWIP_TCP option) */ -#ifndef MEMP_NUM_TCP_SEG +#if !defined MEMP_NUM_TCP_SEG || defined __DOXYGEN__ #define MEMP_NUM_TCP_SEG 16 #endif @@ -447,7 +394,7 @@ * MEMP_NUM_REASSDATA: the number of IP packets simultaneously queued for * reassembly (whole packets, not fragments!) */ -#ifndef MEMP_NUM_REASSDATA +#if !defined MEMP_NUM_REASSDATA || defined __DOXYGEN__ #define MEMP_NUM_REASSDATA 5 #endif @@ -458,7 +405,7 @@ * LWIP_NETIF_TX_SINGLE_PBUF==0 and only has to be > 1 with DMA-enabled MACs * where the packet is not yet sent when netif->output returns. */ -#ifndef MEMP_NUM_FRAG_PBUF +#if !defined MEMP_NUM_FRAG_PBUF || defined __DOXYGEN__ #define MEMP_NUM_FRAG_PBUF 15 #endif @@ -468,7 +415,7 @@ * their destination address) to finish. * (requires the ARP_QUEUEING option) */ -#ifndef MEMP_NUM_ARP_QUEUE +#if !defined MEMP_NUM_ARP_QUEUE || defined __DOXYGEN__ #define MEMP_NUM_ARP_QUEUE 30 #endif @@ -478,7 +425,7 @@ * per netif membership). * (requires the LWIP_IGMP option) */ -#ifndef MEMP_NUM_IGMP_GROUP +#if !defined MEMP_NUM_IGMP_GROUP || defined __DOXYGEN__ #define MEMP_NUM_IGMP_GROUP 8 #endif @@ -487,7 +434,7 @@ * The default number of timeouts is calculated here for all enabled modules. * The formula expects settings to be either '0' or '1'. */ -#ifndef MEMP_NUM_SYS_TIMEOUT +#if !defined MEMP_NUM_SYS_TIMEOUT || defined __DOXYGEN__ #define MEMP_NUM_SYS_TIMEOUT (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + (PPP_SUPPORT*6*MEMP_NUM_PPP_PCB) + (LWIP_IPV6 ? (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD) : 0)) #endif @@ -495,7 +442,7 @@ * MEMP_NUM_NETBUF: the number of struct netbufs. * (only needed if you use the sequential API, like api_lib.c) */ -#ifndef MEMP_NUM_NETBUF +#if !defined MEMP_NUM_NETBUF || defined __DOXYGEN__ #define MEMP_NUM_NETBUF 2 #endif @@ -503,7 +450,7 @@ * MEMP_NUM_NETCONN: the number of struct netconns. * (only needed if you use the sequential API, like api_lib.c) */ -#ifndef MEMP_NUM_NETCONN +#if !defined MEMP_NUM_NETCONN || defined __DOXYGEN__ #define MEMP_NUM_NETCONN 4 #endif @@ -512,7 +459,7 @@ * for callback/timeout API communication. * (only needed if you use tcpip.c) */ -#ifndef MEMP_NUM_TCPIP_MSG_API +#if !defined MEMP_NUM_TCPIP_MSG_API || defined __DOXYGEN__ #define MEMP_NUM_TCPIP_MSG_API 8 #endif @@ -521,7 +468,7 @@ * for incoming packets. * (only needed if you use tcpip.c) */ -#ifndef MEMP_NUM_TCPIP_MSG_INPKT +#if !defined MEMP_NUM_TCPIP_MSG_INPKT || defined __DOXYGEN__ #define MEMP_NUM_TCPIP_MSG_INPKT 8 #endif @@ -529,7 +476,7 @@ * MEMP_NUM_NETDB: the number of concurrently running lwip_addrinfo() calls * (before freeing the corresponding memory using lwip_freeaddrinfo()). */ -#ifndef MEMP_NUM_NETDB +#if !defined MEMP_NUM_NETDB || defined __DOXYGEN__ #define MEMP_NUM_NETDB 1 #endif @@ -537,41 +484,41 @@ * MEMP_NUM_LOCALHOSTLIST: the number of host entries in the local host list * if DNS_LOCAL_HOSTLIST_IS_DYNAMIC==1. */ -#ifndef MEMP_NUM_LOCALHOSTLIST +#if !defined MEMP_NUM_LOCALHOSTLIST || defined __DOXYGEN__ #define MEMP_NUM_LOCALHOSTLIST 1 #endif /** * PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */ -#ifndef PBUF_POOL_SIZE +#if !defined PBUF_POOL_SIZE || defined __DOXYGEN__ #define PBUF_POOL_SIZE 16 #endif /** MEMP_NUM_API_MSG: the number of concurrently active calls to various * socket, netconn, and tcpip functions */ -#ifndef MEMP_NUM_API_MSG +#if !defined MEMP_NUM_API_MSG || defined __DOXYGEN__ #define MEMP_NUM_API_MSG MEMP_NUM_TCPIP_MSG_API #endif /** MEMP_NUM_DNS_API_MSG: the number of concurrently active calls to netconn_gethostbyname */ -#ifndef MEMP_NUM_DNS_API_MSG +#if !defined MEMP_NUM_DNS_API_MSG || defined __DOXYGEN__ #define MEMP_NUM_DNS_API_MSG MEMP_NUM_TCPIP_MSG_API #endif /** MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA: the number of concurrently active calls * to getsockopt/setsockopt */ -#ifndef MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA +#if !defined MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA || defined __DOXYGEN__ #define MEMP_NUM_SOCKET_SETGETSOCKOPT_DATA MEMP_NUM_TCPIP_MSG_API #endif /** MEMP_NUM_NETIFAPI_MSG: the number of concurrently active calls to the * netifapi functions */ -#ifndef MEMP_NUM_NETIFAPI_MSG +#if !defined MEMP_NUM_NETIFAPI_MSG || defined __DOXYGEN__ #define MEMP_NUM_NETIFAPI_MSG MEMP_NUM_TCPIP_MSG_API #endif /** @@ -591,14 +538,14 @@ /** * LWIP_ARP==1: Enable ARP functionality. */ -#ifndef LWIP_ARP +#if !defined LWIP_ARP || defined __DOXYGEN__ #define LWIP_ARP 1 #endif /** * ARP_TABLE_SIZE: Number of active MAC-IP address pairs cached. */ -#ifndef ARP_TABLE_SIZE +#if !defined ARP_TABLE_SIZE || defined __DOXYGEN__ #define ARP_TABLE_SIZE 10 #endif @@ -606,7 +553,7 @@ * for ARP_TMR_INTERVAL = 1000, this is * (60 * 5) seconds = 5 minutes. */ -#ifndef ARP_MAXAGE +#if !defined ARP_MAXAGE || defined __DOXYGEN__ #define ARP_MAXAGE 300 #endif @@ -617,7 +564,7 @@ * startup time. Set this to 1 if you know your application sends more than one * packet in a row to an IP address that is not in the ARP cache. */ -#ifndef ARP_QUEUEING +#if !defined ARP_QUEUEING || defined __DOXYGEN__ #define ARP_QUEUEING 0 #endif @@ -625,7 +572,7 @@ * unresolved address by other network layers. Defaults to 3, 0 means disabled. * Old packets are dropped, new packets are queued. */ -#ifndef ARP_QUEUE_LEN +#if !defined ARP_QUEUE_LEN || defined __DOXYGEN__ #define ARP_QUEUE_LEN 3 #endif @@ -639,7 +586,7 @@ * The peer *is* in the ARP table if it requested our address before. * Also notice that this slows down input processing of every IP packet! */ -#ifndef ETHARP_TRUST_IP_MAC +#if !defined ETHARP_TRUST_IP_MAC || defined __DOXYGEN__ #define ETHARP_TRUST_IP_MAC 0 #endif @@ -653,13 +600,13 @@ * Alternatively, define a function/define ETHARP_VLAN_CHECK_FN(eth_hdr, vlan) * that returns 1 to accept a packet or 0 to drop a packet. */ -#ifndef ETHARP_SUPPORT_VLAN +#if !defined ETHARP_SUPPORT_VLAN || defined __DOXYGEN__ #define ETHARP_SUPPORT_VLAN 0 #endif /** LWIP_ETHERNET==1: enable ethernet support even though ARP might be disabled */ -#ifndef LWIP_ETHERNET +#if !defined LWIP_ETHERNET || defined __DOXYGEN__ #define LWIP_ETHERNET LWIP_ARP #endif @@ -668,14 +615,14 @@ * without this padding e.g. addresses in the IP header will not be aligned * on a 32-bit boundary, so setting this to 2 can speed up 32-bit-platforms. */ -#ifndef ETH_PAD_SIZE +#if !defined ETH_PAD_SIZE || defined __DOXYGEN__ #define ETH_PAD_SIZE 0 #endif /** ETHARP_SUPPORT_STATIC_ENTRIES==1: enable code to support static ARP table * entries (using etharp_add_static_entry/etharp_remove_static_entry). */ -#ifndef ETHARP_SUPPORT_STATIC_ENTRIES +#if !defined ETHARP_SUPPORT_STATIC_ENTRIES || defined __DOXYGEN__ #define ETHARP_SUPPORT_STATIC_ENTRIES 0 #endif @@ -683,7 +630,7 @@ * If disabled, duplicate IP address on multiple netifs are not supported * (but this should only occur for AutoIP). */ -#ifndef ETHARP_TABLE_MATCH_NETIF +#if !defined ETHARP_TABLE_MATCH_NETIF || defined __DOXYGEN__ #define ETHARP_TABLE_MATCH_NETIF 0 #endif /** @@ -703,7 +650,7 @@ /** * LWIP_IPV4==1: Enable IPv4 */ -#ifndef LWIP_IPV4 +#if !defined LWIP_IPV4 || defined __DOXYGEN__ #define LWIP_IPV4 1 #endif @@ -712,7 +659,7 @@ * interfaces. If you are going to run lwIP on a device with only one network * interface, define this to 0. */ -#ifndef IP_FORWARD +#if !defined IP_FORWARD || defined __DOXYGEN__ #define IP_FORWARD 0 #endif @@ -721,7 +668,7 @@ * this option does not affect outgoing packet sizes, which can be controlled * via IP_FRAG. */ -#ifndef IP_REASSEMBLY +#if !defined IP_REASSEMBLY || defined __DOXYGEN__ #define IP_REASSEMBLY 1 #endif @@ -730,7 +677,7 @@ * that this option does not affect incoming packet sizes, which can be * controlled via IP_REASSEMBLY. */ -#ifndef IP_FRAG +#if !defined IP_FRAG || defined __DOXYGEN__ #define IP_FRAG 1 #endif @@ -749,7 +696,7 @@ * IP_OPTIONS_ALLOWED==0: All packets with IP options are dropped. * IP_OPTIONS_ALLOWED==1: IP options are allowed (but not parsed). */ -#ifndef IP_OPTIONS_ALLOWED +#if !defined IP_OPTIONS_ALLOWED || defined __DOXYGEN__ #define IP_OPTIONS_ALLOWED 1 #endif @@ -758,7 +705,7 @@ * a fragmented IP packet waits for all fragments to arrive. If not all fragments arrived * in this time, the whole packet is discarded. */ -#ifndef IP_REASS_MAXAGE +#if !defined IP_REASS_MAXAGE || defined __DOXYGEN__ #define IP_REASS_MAXAGE 3 #endif @@ -768,7 +715,7 @@ * PBUF_POOL_SIZE > IP_REASS_MAX_PBUFS so that the stack is still able to receive * packets even if the maximum amount of fragments is enqueued for reassembly! */ -#ifndef IP_REASS_MAX_PBUFS +#if !defined IP_REASS_MAX_PBUFS || defined __DOXYGEN__ #define IP_REASS_MAX_PBUFS 10 #endif @@ -779,7 +726,7 @@ * new PBUF_RAM pbufs are used for fragments). * ATTENTION: IP_FRAG_USES_STATIC_BUF==1 may not be used for DMA-enabled MACs! */ -#ifndef IP_FRAG_USES_STATIC_BUF +#if !defined IP_FRAG_USES_STATIC_BUF || defined __DOXYGEN__ #define IP_FRAG_USES_STATIC_BUF 0 #endif @@ -787,14 +734,14 @@ * IP_FRAG_MAX_MTU: Assumed max MTU on any interface for IP frag buffer * (requires IP_FRAG_USES_STATIC_BUF==1) */ -#if IP_FRAG_USES_STATIC_BUF && !defined(IP_FRAG_MAX_MTU) +#if IP_FRAG_USES_STATIC_BUF && !defined(IP_FRAG_MAX_MTU) || defined __DOXYGEN__ #define IP_FRAG_MAX_MTU 1500 #endif /** * IP_DEFAULT_TTL: Default value for Time-To-Live used by transport layers. */ -#ifndef IP_DEFAULT_TTL +#if !defined IP_DEFAULT_TTL || defined __DOXYGEN__ #define IP_DEFAULT_TTL 255 #endif @@ -803,7 +750,7 @@ * filter per pcb on udp and raw send operations. To enable broadcast filter * on recv operations, you also have to set IP_SOF_BROADCAST_RECV=1. */ -#ifndef IP_SOF_BROADCAST +#if !defined IP_SOF_BROADCAST || defined __DOXYGEN__ #define IP_SOF_BROADCAST 0 #endif @@ -811,7 +758,7 @@ * IP_SOF_BROADCAST_RECV (requires IP_SOF_BROADCAST=1) enable the broadcast * filter on recv operations. */ -#ifndef IP_SOF_BROADCAST_RECV +#if !defined IP_SOF_BROADCAST_RECV || defined __DOXYGEN__ #define IP_SOF_BROADCAST_RECV 0 #endif @@ -822,7 +769,7 @@ * ATTENTION: When this is 1, make sure your netif driver correctly marks incoming * link-layer-broadcast/multicast packets as such using the corresponding pbuf flags! */ -#ifndef IP_FORWARD_ALLOW_TX_ON_RX_NETIF +#if !defined IP_FORWARD_ALLOW_TX_ON_RX_NETIF || defined __DOXYGEN__ #define IP_FORWARD_ALLOW_TX_ON_RX_NETIF 0 #endif @@ -831,7 +778,7 @@ * local TCP/UDP pcb (default==0). This can prevent creating predictable port * numbers after booting a device. */ -#ifndef LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS +#if !defined LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS || defined __DOXYGEN__ #define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 0 #endif /** @@ -852,28 +799,28 @@ * LWIP_ICMP==1: Enable ICMP module inside the IP stack. * Be careful, disable that make your product non-compliant to RFC1122 */ -#ifndef LWIP_ICMP +#if !defined LWIP_ICMP || defined __DOXYGEN__ #define LWIP_ICMP 1 #endif /** * ICMP_TTL: Default value for Time-To-Live used by ICMP packets. */ -#ifndef ICMP_TTL +#if !defined ICMP_TTL || defined __DOXYGEN__ #define ICMP_TTL (IP_DEFAULT_TTL) #endif /** * LWIP_BROADCAST_PING==1: respond to broadcast pings (default is unicast only) */ -#ifndef LWIP_BROADCAST_PING +#if !defined LWIP_BROADCAST_PING || defined __DOXYGEN__ #define LWIP_BROADCAST_PING 0 #endif /** * LWIP_MULTICAST_PING==1: respond to multicast pings (default is unicast only) */ -#ifndef LWIP_MULTICAST_PING +#if !defined LWIP_MULTICAST_PING || defined __DOXYGEN__ #define LWIP_MULTICAST_PING 0 #endif /** @@ -893,14 +840,14 @@ /** * LWIP_RAW==1: Enable application layer to hook into the IP layer itself. */ -#ifndef LWIP_RAW +#if !defined LWIP_RAW || defined __DOXYGEN__ #define LWIP_RAW 0 #endif /** * LWIP_RAW==1: Enable application layer to hook into the IP layer itself. */ -#ifndef RAW_TTL +#if !defined RAW_TTL || defined __DOXYGEN__ #define RAW_TTL (IP_DEFAULT_TTL) #endif /** @@ -920,7 +867,7 @@ /** * LWIP_DHCP==1: Enable DHCP module. */ -#ifndef LWIP_DHCP +#if !defined LWIP_DHCP || defined __DOXYGEN__ #define LWIP_DHCP 0 #endif #if !LWIP_IPV4 @@ -932,7 +879,7 @@ /** * DHCP_DOES_ARP_CHECK==1: Do an ARP check on the offered address. */ -#ifndef DHCP_DOES_ARP_CHECK +#if !defined DHCP_DOES_ARP_CHECK || defined __DOXYGEN__ #define DHCP_DOES_ARP_CHECK ((LWIP_DHCP) && (LWIP_ARP)) #endif @@ -942,14 +889,14 @@ * netif drivers might not set this flag, the default is off. If enabled, * netif_set_link_up() must be called to continue dhcp starting. */ -#ifndef LWIP_DHCP_CHECK_LINK_UP +#if !defined LWIP_DHCP_CHECK_LINK_UP #define LWIP_DHCP_CHECK_LINK_UP 0 #endif /** * LWIP_DHCP_BOOTP_FILE==1: Store offered_si_addr and boot_file_name. */ -#ifndef LWIP_DHCP_BOOTP_FILE +#if !defined LWIP_DHCP_BOOTP_FILE || defined __DOXYGEN__ #define LWIP_DHCP_BOOTP_FILE 0 #endif @@ -958,14 +905,14 @@ * response packet, an callback is called, which has to be provided by the port: * void dhcp_set_ntp_servers(u8_t num_ntp_servers, ip_addr_t* ntp_server_addrs); */ -#ifndef LWIP_DHCP_GET_NTP_SRV +#if !defined LWIP_DHCP_GET_NTP_SRV || defined __DOXYGEN__ #define LWIP_DHCP_GET_NTP_SRV 0 #endif /** * The maximum of NTP servers requested */ -#ifndef LWIP_DHCP_MAX_NTP_SERVERS +#if !defined LWIP_DHCP_MAX_NTP_SERVERS || defined __DOXYGEN__ #define LWIP_DHCP_MAX_NTP_SERVERS 1 #endif /** @@ -985,7 +932,7 @@ /** * LWIP_AUTOIP==1: Enable AUTOIP module. */ -#ifndef LWIP_AUTOIP +#if !defined LWIP_AUTOIP || defined __DOXYGEN__ #define LWIP_AUTOIP 0 #endif #if !LWIP_IPV4 @@ -998,7 +945,7 @@ * LWIP_DHCP_AUTOIP_COOP==1: Allow DHCP and AUTOIP to be both enabled on * the same interface at the same time. */ -#ifndef LWIP_DHCP_AUTOIP_COOP +#if !defined LWIP_DHCP_AUTOIP_COOP || defined __DOXYGEN__ #define LWIP_DHCP_AUTOIP_COOP 0 #endif @@ -1009,7 +956,7 @@ * very quickly, but you should be prepared to handle a changing IP address * when DHCP overrides AutoIP. */ -#ifndef LWIP_DHCP_AUTOIP_COOP_TRIES +#if !defined LWIP_DHCP_AUTOIP_COOP_TRIES || defined __DOXYGEN__ #define LWIP_DHCP_AUTOIP_COOP_TRIES 9 #endif /** @@ -1031,7 +978,7 @@ * Turn this on to get callbacks needed to implement MIB2. * Usually MIB2_STATS should be enabled, too. */ -#ifndef LWIP_MIB2_CALLBACKS +#if !defined LWIP_MIB2_CALLBACKS || defined __DOXYGEN__ #define LWIP_MIB2_CALLBACKS 0 #endif /** @@ -1051,7 +998,7 @@ /** * LWIP_IGMP==1: Turn on IGMP module. */ -#ifndef LWIP_IGMP +#if !defined LWIP_IGMP || defined __DOXYGEN__ #define LWIP_IGMP 0 #endif #if !LWIP_IPV4 @@ -1063,7 +1010,7 @@ * LWIP_MULTICAST_TX_OPTIONS==1: Enable multicast TX support like the socket options * IP_MULTICAST_TTL/IP_MULTICAST_IF/IP_MULTICAST_LOOP */ -#ifndef LWIP_MULTICAST_TX_OPTIONS +#if !defined LWIP_MULTICAST_TX_OPTIONS || defined __DOXYGEN__ #define LWIP_MULTICAST_TX_OPTIONS LWIP_IGMP #endif /** @@ -1084,17 +1031,17 @@ * LWIP_DNS==1: Turn on DNS module. UDP must be available for DNS * transport. */ -#ifndef LWIP_DNS +#if !defined LWIP_DNS || defined __DOXYGEN__ #define LWIP_DNS 0 #endif /** DNS maximum number of entries to maintain locally. */ -#ifndef DNS_TABLE_SIZE +#if !defined DNS_TABLE_SIZE || defined __DOXYGEN__ #define DNS_TABLE_SIZE 4 #endif /** DNS maximum host name length supported in the name table. */ -#ifndef DNS_MAX_NAME_LENGTH +#if !defined DNS_MAX_NAME_LENGTH || defined __DOXYGEN__ #define DNS_MAX_NAME_LENGTH 256 #endif @@ -1102,12 +1049,12 @@ * The first server can be initialized automatically by defining * DNS_SERVER_ADDRESS(ipaddr), where 'ipaddr' is an 'ip_addr_t*' */ -#ifndef DNS_MAX_SERVERS +#if !defined DNS_MAX_SERVERS || defined __DOXYGEN__ #define DNS_MAX_SERVERS 2 #endif /** DNS do a name checking between the query and the response. */ -#ifndef DNS_DOES_NAME_CHECK +#if !defined DNS_DOES_NAME_CHECK || defined __DOXYGEN__ #define DNS_DOES_NAME_CHECK 1 #endif @@ -1115,7 +1062,7 @@ * Use all DNS security features by default. * This is overridable but should only be needed by very small targets * or when using against non standard DNS servers. */ -#ifndef LWIP_DNS_SECURE +#if !defined LWIP_DNS_SECURE || defined __DOXYGEN__ #define LWIP_DNS_SECURE (LWIP_DNS_SECURE_RAND_XID | LWIP_DNS_SECURE_NO_MULTIPLE_OUTSTANDING | LWIP_DNS_SECURE_RAND_SRC_PORT) #endif @@ -1134,13 +1081,13 @@ * \#define DNS_LOOKUP_LOCAL_EXTERN(x) extern err_t my_lookup_function(const char *name, ip_addr_t *addr, u8_t dns_addrtype) * that looks up the IP address and returns ERR_OK if found (LWIP_DNS_ADDRTYPE_xxx is passed in dns_addrtype). */ -#ifndef DNS_LOCAL_HOSTLIST +#if !defined DNS_LOCAL_HOSTLIST || defined __DOXYGEN__ #define DNS_LOCAL_HOSTLIST 0 #endif /* DNS_LOCAL_HOSTLIST */ /** If this is turned on, the local host-list can be dynamically changed * at runtime. */ -#ifndef DNS_LOCAL_HOSTLIST_IS_DYNAMIC +#if !defined DNS_LOCAL_HOSTLIST_IS_DYNAMIC || defined __DOXYGEN__ #define DNS_LOCAL_HOSTLIST_IS_DYNAMIC 0 #endif /* DNS_LOCAL_HOSTLIST_IS_DYNAMIC */ /** @@ -1160,28 +1107,28 @@ /** * LWIP_UDP==1: Turn on UDP. */ -#ifndef LWIP_UDP +#if !defined LWIP_UDP || defined __DOXYGEN__ #define LWIP_UDP 1 #endif /** * LWIP_UDPLITE==1: Turn on UDP-Lite. (Requires LWIP_UDP) */ -#ifndef LWIP_UDPLITE +#if !defined LWIP_UDPLITE || defined __DOXYGEN__ #define LWIP_UDPLITE 0 #endif /** * UDP_TTL: Default Time-To-Live value. */ -#ifndef UDP_TTL +#if !defined UDP_TTL || defined __DOXYGEN__ #define UDP_TTL (IP_DEFAULT_TTL) #endif /** * LWIP_NETBUF_RECVINFO==1: append destination addr and port to every netbuf. */ -#ifndef LWIP_NETBUF_RECVINFO +#if !defined LWIP_NETBUF_RECVINFO || defined __DOXYGEN__ #define LWIP_NETBUF_RECVINFO 0 #endif /** @@ -1201,14 +1148,14 @@ /** * LWIP_TCP==1: Turn on TCP. */ -#ifndef LWIP_TCP +#if !defined LWIP_TCP || defined __DOXYGEN__ #define LWIP_TCP 1 #endif /** * TCP_TTL: Default Time-To-Live value. */ -#ifndef TCP_TTL +#if !defined TCP_TTL || defined __DOXYGEN__ #define TCP_TTL (IP_DEFAULT_TTL) #endif @@ -1216,21 +1163,21 @@ * TCP_WND: The size of a TCP window. This must be at least * (2 * TCP_MSS) for things to work well */ -#ifndef TCP_WND +#if !defined TCP_WND || defined __DOXYGEN__ #define TCP_WND (4 * TCP_MSS) #endif /** * TCP_MAXRTX: Maximum number of retransmissions of data segments. */ -#ifndef TCP_MAXRTX +#if !defined TCP_MAXRTX || defined __DOXYGEN__ #define TCP_MAXRTX 12 #endif /** * TCP_SYNMAXRTX: Maximum number of retransmissions of SYN segments. */ -#ifndef TCP_SYNMAXRTX +#if !defined TCP_SYNMAXRTX || defined __DOXYGEN__ #define TCP_SYNMAXRTX 6 #endif @@ -1238,7 +1185,7 @@ * TCP_QUEUE_OOSEQ==1: TCP will queue segments that arrive out of order. * Define to 0 if your device is low on memory. */ -#ifndef TCP_QUEUE_OOSEQ +#if !defined TCP_QUEUE_OOSEQ || defined __DOXYGEN__ #define TCP_QUEUE_OOSEQ (LWIP_TCP) #endif @@ -1249,7 +1196,7 @@ * when opening a connection. For the transmit size, this MSS sets * an upper limit on the MSS advertised by the remote host. */ -#ifndef TCP_MSS +#if !defined TCP_MSS || defined __DOXYGEN__ #define TCP_MSS 536 #endif @@ -1261,7 +1208,7 @@ * Setting this to 1 enables code that checks TCP_MSS against the MTU of the * netif used for a connection and limits the MSS if it would be too big otherwise. */ -#ifndef TCP_CALCULATE_EFF_SEND_MSS +#if !defined TCP_CALCULATE_EFF_SEND_MSS || defined __DOXYGEN__ #define TCP_CALCULATE_EFF_SEND_MSS 1 #endif @@ -1270,7 +1217,7 @@ * TCP_SND_BUF: TCP sender buffer space (bytes). * To achieve good performance, this should be at least 2 * TCP_MSS. */ -#ifndef TCP_SND_BUF +#if !defined TCP_SND_BUF || defined __DOXYGEN__ #define TCP_SND_BUF (2 * TCP_MSS) #endif @@ -1278,7 +1225,7 @@ * TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least * as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. */ -#ifndef TCP_SND_QUEUELEN +#if !defined TCP_SND_QUEUELEN || defined __DOXYGEN__ #define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS)) #endif @@ -1287,7 +1234,7 @@ * TCP_SND_BUF. It is the amount of space which must be available in the * TCP snd_buf for select to return writable (combined with TCP_SNDQUEUELOWAT). */ -#ifndef TCP_SNDLOWAT +#if !defined TCP_SNDLOWAT || defined __DOXYGEN__ #define TCP_SNDLOWAT LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1) #endif @@ -1296,7 +1243,7 @@ * than TCP_SND_QUEUELEN. If the number of pbufs queued on a pcb drops below * this number, select returns writable (combined with TCP_SNDLOWAT). */ -#ifndef TCP_SNDQUEUELOWAT +#if !defined TCP_SNDQUEUELOWAT || defined __DOXYGEN__ #define TCP_SNDQUEUELOWAT LWIP_MAX(((TCP_SND_QUEUELEN)/2), 5) #endif @@ -1304,7 +1251,7 @@ * TCP_OOSEQ_MAX_BYTES: The maximum number of bytes queued on ooseq per pcb. * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==0. */ -#ifndef TCP_OOSEQ_MAX_BYTES +#if !defined TCP_OOSEQ_MAX_BYTES || defined __DOXYGEN__ #define TCP_OOSEQ_MAX_BYTES 0 #endif @@ -1312,14 +1259,14 @@ * TCP_OOSEQ_MAX_PBUFS: The maximum number of pbufs queued on ooseq per pcb. * Default is 0 (no limit). Only valid for TCP_QUEUE_OOSEQ==0. */ -#ifndef TCP_OOSEQ_MAX_PBUFS +#if !defined TCP_OOSEQ_MAX_PBUFS || defined __DOXYGEN__ #define TCP_OOSEQ_MAX_PBUFS 0 #endif /** * TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb. */ -#ifndef TCP_LISTEN_BACKLOG +#if !defined TCP_LISTEN_BACKLOG || defined __DOXYGEN__ #define TCP_LISTEN_BACKLOG 0 #endif @@ -1328,7 +1275,7 @@ * This backlog is used unless another is explicitly specified. * 0xff is the maximum (u8_t). */ -#ifndef TCP_DEFAULT_LISTEN_BACKLOG +#if !defined TCP_DEFAULT_LISTEN_BACKLOG || defined __DOXYGEN__ #define TCP_DEFAULT_LISTEN_BACKLOG 0xff #endif @@ -1346,7 +1293,7 @@ * TCP_MSS: Try to create unfragmented TCP packets. * TCP_MSS/4: Try to create 4 fragments or less per TCP packet. */ -#ifndef TCP_OVERSIZE +#if !defined TCP_OVERSIZE || defined __DOXYGEN__ #define TCP_OVERSIZE TCP_MSS #endif @@ -1356,7 +1303,7 @@ * really used locally. Therefore, it is only enabled when a TS option is * received in the initial SYN packet from a remote host. */ -#ifndef LWIP_TCP_TIMESTAMPS +#if !defined LWIP_TCP_TIMESTAMPS || defined __DOXYGEN__ #define LWIP_TCP_TIMESTAMPS 0 #endif @@ -1364,7 +1311,7 @@ * TCP_WND_UPDATE_THRESHOLD: difference in window to trigger an * explicit window update */ -#ifndef TCP_WND_UPDATE_THRESHOLD +#if !defined TCP_WND_UPDATE_THRESHOLD || defined __DOXYGEN__ #define TCP_WND_UPDATE_THRESHOLD LWIP_MIN((TCP_WND / 4), (TCP_MSS * 4)) #endif @@ -1375,7 +1322,7 @@ * LWIP_CALLBACK_API==1: The PCB callback function is called directly * for the event. This is the default. */ -#if !defined(LWIP_EVENT_API) && !defined(LWIP_CALLBACK_API) +#if !defined(LWIP_EVENT_API) && !defined(LWIP_CALLBACK_API) || defined __DOXYGEN__ #define LWIP_EVENT_API 0 #define LWIP_CALLBACK_API 1 #endif @@ -1388,7 +1335,7 @@ * When LWIP_WND_SCALE is enabled but TCP_RCV_SCALE is 0, we can use a large * send window while having a small receive window only. */ -#ifndef LWIP_WND_SCALE +#if !defined LWIP_WND_SCALE || defined __DOXYGEN__ #define LWIP_WND_SCALE 0 #define TCP_RCV_SCALE 0 #endif @@ -1411,8 +1358,8 @@ * link level header. The default is 14, the standard value for * Ethernet. */ -#ifndef PBUF_LINK_HLEN -#if defined LWIP_HOOK_VLAN_SET +#if !defined PBUF_LINK_HLEN || defined __DOXYGEN__ +#if defined LWIP_HOOK_VLAN_SET || defined __DOXYGEN__ #define PBUF_LINK_HLEN (18 + ETH_PAD_SIZE) #else /* LWIP_HOOK_VLAN_SET */ #define PBUF_LINK_HLEN (14 + ETH_PAD_SIZE) @@ -1423,7 +1370,7 @@ * PBUF_LINK_ENCAPSULATION_HLEN: the number of bytes that should be allocated * for an additional encapsulation header before ethernet headers (e.g. 802.11) */ -#ifndef PBUF_LINK_ENCAPSULATION_HLEN +#if !defined PBUF_LINK_ENCAPSULATION_HLEN || defined __DOXYGEN__ #define PBUF_LINK_ENCAPSULATION_HLEN 0 #endif @@ -1432,7 +1379,7 @@ * designed to accommodate single full size TCP frame in one pbuf, including * TCP_MSS, IP header, and link header. */ -#ifndef PBUF_POOL_BUFSIZE +#if !defined PBUF_POOL_BUFSIZE || defined __DOXYGEN__ #define PBUF_POOL_BUFSIZE LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_ENCAPSULATION_HLEN+PBUF_LINK_HLEN) #endif /** @@ -1453,14 +1400,14 @@ * LWIP_NETIF_HOSTNAME==1: use DHCP_OPTION_HOSTNAME with netif's hostname * field. */ -#ifndef LWIP_NETIF_HOSTNAME +#if !defined LWIP_NETIF_HOSTNAME || defined __DOXYGEN__ #define LWIP_NETIF_HOSTNAME 0 #endif /** * LWIP_NETIF_API==1: Support netif api (in netifapi.c) */ -#ifndef LWIP_NETIF_API +#if !defined LWIP_NETIF_API || defined __DOXYGEN__ #define LWIP_NETIF_API 0 #endif @@ -1468,7 +1415,7 @@ * LWIP_NETIF_STATUS_CALLBACK==1: Support a callback function whenever an interface * changes its up/down status (i.e., due to DHCP IP acquisition) */ -#ifndef LWIP_NETIF_STATUS_CALLBACK +#if !defined LWIP_NETIF_STATUS_CALLBACK || defined __DOXYGEN__ #define LWIP_NETIF_STATUS_CALLBACK 0 #endif @@ -1476,7 +1423,7 @@ * LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface * whenever the link changes (i.e., link down) */ -#ifndef LWIP_NETIF_LINK_CALLBACK +#if !defined LWIP_NETIF_LINK_CALLBACK || defined __DOXYGEN__ #define LWIP_NETIF_LINK_CALLBACK 0 #endif @@ -1484,7 +1431,7 @@ * LWIP_NETIF_REMOVE_CALLBACK==1: Support a callback function that is called * when a netif has been removed */ -#ifndef LWIP_NETIF_REMOVE_CALLBACK +#if !defined LWIP_NETIF_REMOVE_CALLBACK || defined __DOXYGEN__ #define LWIP_NETIF_REMOVE_CALLBACK 0 #endif @@ -1495,7 +1442,7 @@ * ARP tables or many concurrent connections, it might be counterproductive * if you have a tiny ARP table or if there never are concurrent connections. */ -#ifndef LWIP_NETIF_HWADDRHINT +#if !defined LWIP_NETIF_HWADDRHINT || defined __DOXYGEN__ #define LWIP_NETIF_HWADDRHINT 0 #endif @@ -1508,7 +1455,7 @@ * * @todo: TCP and IP-frag do not work with this, yet: */ -#ifndef LWIP_NETIF_TX_SINGLE_PBUF +#if !defined LWIP_NETIF_TX_SINGLE_PBUF || defined __DOXYGEN__ #define LWIP_NETIF_TX_SINGLE_PBUF 0 #endif /* LWIP_NETIF_TX_SINGLE_PBUF */ /** @@ -1530,14 +1477,14 @@ * This is only needed when no real netifs are available. If at least one other * netif is available, loopback traffic uses this netif. */ -#ifndef LWIP_HAVE_LOOPIF +#if !defined LWIP_HAVE_LOOPIF || defined __DOXYGEN__ #define LWIP_HAVE_LOOPIF LWIP_NETIF_LOOPBACK #endif /** * LWIP_LOOPIF_MULTICAST==1: Support multicast/IGMP on loop interface (127.0.0.1). */ -#ifndef LWIP_LOOPIF_MULTICAST +#if !defined LWIP_LOOPIF_MULTICAST || defined __DOXYGEN__ #define LWIP_LOOPIF_MULTICAST 0 #endif @@ -1545,7 +1492,7 @@ * LWIP_NETIF_LOOPBACK==1: Support sending packets with a destination IP * address equal to the netif IP address, looping them back up the stack. */ -#ifndef LWIP_NETIF_LOOPBACK +#if !defined LWIP_NETIF_LOOPBACK || defined __DOXYGEN__ #define LWIP_NETIF_LOOPBACK 0 #endif @@ -1553,7 +1500,7 @@ * LWIP_LOOPBACK_MAX_PBUFS: Maximum number of pbufs on queue for loopback * sending for each netif (0 = disabled) */ -#ifndef LWIP_LOOPBACK_MAX_PBUFS +#if !defined LWIP_LOOPBACK_MAX_PBUFS || defined __DOXYGEN__ #define LWIP_LOOPBACK_MAX_PBUFS 0 #endif @@ -1570,7 +1517,7 @@ * The packets are put on a list and netif_poll() must be called in * the main application loop. */ -#ifndef LWIP_NETIF_LOOPBACK_MULTITHREADING +#if !defined LWIP_NETIF_LOOPBACK_MULTITHREADING || defined __DOXYGEN__ #define LWIP_NETIF_LOOPBACK_MULTITHREADING (!NO_SYS) #endif /** @@ -1590,7 +1537,7 @@ /** * TCPIP_THREAD_NAME: The name assigned to the main tcpip thread. */ -#ifndef TCPIP_THREAD_NAME +#if !defined TCPIP_THREAD_NAME || defined __DOXYGEN__ #define TCPIP_THREAD_NAME "tcpip_thread" #endif @@ -1599,7 +1546,7 @@ * The stack size value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */ -#ifndef TCPIP_THREAD_STACKSIZE +#if !defined TCPIP_THREAD_STACKSIZE || defined __DOXYGEN__ #define TCPIP_THREAD_STACKSIZE 0 #endif @@ -1608,7 +1555,7 @@ * The priority value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */ -#ifndef TCPIP_THREAD_PRIO +#if !defined TCPIP_THREAD_PRIO || defined __DOXYGEN__ #define TCPIP_THREAD_PRIO 1 #endif @@ -1617,7 +1564,7 @@ * The queue size value itself is platform-dependent, but is passed to * sys_mbox_new() when tcpip_init is called. */ -#ifndef TCPIP_MBOX_SIZE +#if !defined TCPIP_MBOX_SIZE || defined __DOXYGEN__ #define TCPIP_MBOX_SIZE 0 #endif @@ -1625,14 +1572,14 @@ * Define this to something that triggers a watchdog. This is called from * tcpip_thread after processing a message. */ -#ifndef LWIP_TCPIP_THREAD_ALIVE +#if !defined LWIP_TCPIP_THREAD_ALIVE || defined __DOXYGEN__ #define LWIP_TCPIP_THREAD_ALIVE() #endif /** * SLIPIF_THREAD_NAME: The name assigned to the slipif_loop thread. */ -#ifndef SLIPIF_THREAD_NAME +#if !defined SLIPIF_THREAD_NAME || defined __DOXYGEN__ #define SLIPIF_THREAD_NAME "slipif_loop" #endif @@ -1641,7 +1588,7 @@ * The stack size value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */ -#ifndef SLIPIF_THREAD_STACKSIZE +#if !defined SLIPIF_THREAD_STACKSIZE || defined __DOXYGEN__ #define SLIPIF_THREAD_STACKSIZE 0 #endif @@ -1650,14 +1597,14 @@ * The priority value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */ -#ifndef SLIPIF_THREAD_PRIO +#if !defined SLIPIF_THREAD_PRIO || defined __DOXYGEN__ #define SLIPIF_THREAD_PRIO 1 #endif /** * DEFAULT_THREAD_NAME: The name assigned to any other lwIP thread. */ -#ifndef DEFAULT_THREAD_NAME +#if !defined DEFAULT_THREAD_NAME || defined __DOXYGEN__ #define DEFAULT_THREAD_NAME "lwIP" #endif @@ -1666,7 +1613,7 @@ * The stack size value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */ -#ifndef DEFAULT_THREAD_STACKSIZE +#if !defined DEFAULT_THREAD_STACKSIZE || defined __DOXYGEN__ #define DEFAULT_THREAD_STACKSIZE 0 #endif @@ -1675,7 +1622,7 @@ * The priority value itself is platform-dependent, but is passed to * sys_thread_new() when the thread is created. */ -#ifndef DEFAULT_THREAD_PRIO +#if !defined DEFAULT_THREAD_PRIO || defined __DOXYGEN__ #define DEFAULT_THREAD_PRIO 1 #endif @@ -1684,7 +1631,7 @@ * NETCONN_RAW. The queue size value itself is platform-dependent, but is passed * to sys_mbox_new() when the recvmbox is created. */ -#ifndef DEFAULT_RAW_RECVMBOX_SIZE +#if !defined DEFAULT_RAW_RECVMBOX_SIZE || defined __DOXYGEN__ #define DEFAULT_RAW_RECVMBOX_SIZE 0 #endif @@ -1693,7 +1640,7 @@ * NETCONN_UDP. The queue size value itself is platform-dependent, but is passed * to sys_mbox_new() when the recvmbox is created. */ -#ifndef DEFAULT_UDP_RECVMBOX_SIZE +#if !defined DEFAULT_UDP_RECVMBOX_SIZE || defined __DOXYGEN__ #define DEFAULT_UDP_RECVMBOX_SIZE 0 #endif @@ -1702,7 +1649,7 @@ * NETCONN_TCP. The queue size value itself is platform-dependent, but is passed * to sys_mbox_new() when the recvmbox is created. */ -#ifndef DEFAULT_TCP_RECVMBOX_SIZE +#if !defined DEFAULT_TCP_RECVMBOX_SIZE || defined __DOXYGEN__ #define DEFAULT_TCP_RECVMBOX_SIZE 0 #endif @@ -1711,7 +1658,7 @@ * The queue size value itself is platform-dependent, but is passed to * sys_mbox_new() when the acceptmbox is created. */ -#ifndef DEFAULT_ACCEPTMBOX_SIZE +#if !defined DEFAULT_ACCEPTMBOX_SIZE || defined __DOXYGEN__ #define DEFAULT_ACCEPTMBOX_SIZE 0 #endif /** @@ -1731,14 +1678,14 @@ /** * LWIP_NETCONN==1: Enable Netconn API (require to use api_lib.c) */ -#ifndef LWIP_NETCONN +#if !defined LWIP_NETCONN || defined __DOXYGEN__ #define LWIP_NETCONN 1 #endif /** LWIP_TCPIP_TIMEOUT==1: Enable tcpip_timeout/tcpip_untimeout to create * timers running in tcpip_thread from another thread. */ -#ifndef LWIP_TCPIP_TIMEOUT +#if !defined LWIP_TCPIP_TIMEOUT || defined __DOXYGEN__ #define LWIP_TCPIP_TIMEOUT 0 #endif @@ -1752,7 +1699,7 @@ * The latter 2 can be invoked up by calling netconn_thread_init()/netconn_thread_cleanup(). * Ports may call these for threads created with sys_thread_new(). */ -#ifndef LWIP_NETCONN_SEM_PER_THREAD +#if !defined LWIP_NETCONN_SEM_PER_THREAD || defined __DOXYGEN__ #define LWIP_NETCONN_SEM_PER_THREAD 0 #endif @@ -1764,7 +1711,7 @@ * - sys_mbox_free() has to unblock receive tasks waiting on recvmbox/acceptmbox * and prevent a task pending on this during/after deletion */ -#ifndef LWIP_NETCONN_FULLDUPLEX +#if !defined LWIP_NETCONN_FULLDUPLEX || defined __DOXYGEN__ #define LWIP_NETCONN_FULLDUPLEX 0 #endif /** @@ -1784,14 +1731,14 @@ /** * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c) */ -#ifndef LWIP_SOCKET +#if !defined LWIP_SOCKET || defined __DOXYGEN__ #define LWIP_SOCKET 1 #endif /* LWIP_SOCKET_SET_ERRNO==1: Set errno when socket functions cannot complete * successfully, as required by POSIX. Default is POSIX-compliant. */ -#ifndef LWIP_SOCKET_SET_ERRNO +#if !defined LWIP_SOCKET_SET_ERRNO || defined __DOXYGEN__ #define LWIP_SOCKET_SET_ERRNO 1 #endif @@ -1801,7 +1748,7 @@ * While this helps code completion, it might conflict with existing libraries. * (only used if you use sockets.c) */ -#ifndef LWIP_COMPAT_SOCKETS +#if !defined LWIP_COMPAT_SOCKETS || defined __DOXYGEN__ #define LWIP_COMPAT_SOCKETS 1 #endif @@ -1810,7 +1757,7 @@ * Disable this option if you use a POSIX operating system that uses the same * names (read, write & close). (only used if you use sockets.c) */ -#ifndef LWIP_POSIX_SOCKETS_IO_NAMES +#if !defined LWIP_POSIX_SOCKETS_IO_NAMES || defined __DOXYGEN__ #define LWIP_POSIX_SOCKETS_IO_NAMES 1 #endif @@ -1821,7 +1768,7 @@ * re implement read/write/close/ioctl/fnctl to send the requested action to the right * library (sharing select will need more work though). */ -#ifndef LWIP_SOCKET_OFFSET +#if !defined LWIP_SOCKET_OFFSET || defined __DOXYGEN__ #define LWIP_SOCKET_OFFSET 0 #endif @@ -1830,7 +1777,7 @@ * options processing. Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set * in seconds. (does not require sockets.c, and will affect tcp.c) */ -#ifndef LWIP_TCP_KEEPALIVE +#if !defined LWIP_TCP_KEEPALIVE || defined __DOXYGEN__ #define LWIP_TCP_KEEPALIVE 0 #endif @@ -1838,7 +1785,7 @@ * LWIP_SO_SNDTIMEO==1: Enable send timeout for sockets/netconns and * SO_SNDTIMEO processing. */ -#ifndef LWIP_SO_SNDTIMEO +#if !defined LWIP_SO_SNDTIMEO || defined __DOXYGEN__ #define LWIP_SO_SNDTIMEO 0 #endif @@ -1846,7 +1793,7 @@ * LWIP_SO_RCVTIMEO==1: Enable receive timeout for sockets/netconns and * SO_RCVTIMEO processing. */ -#ifndef LWIP_SO_RCVTIMEO +#if !defined LWIP_SO_RCVTIMEO || defined __DOXYGEN__ #define LWIP_SO_RCVTIMEO 0 #endif @@ -1854,42 +1801,42 @@ * LWIP_SO_SNDRCVTIMEO_NONSTANDARD==1: SO_RCVTIMEO/SO_SNDTIMEO take an int * (milliseconds, much like winsock does) instead of a struct timeval (default). */ -#ifndef LWIP_SO_SNDRCVTIMEO_NONSTANDARD +#if !defined LWIP_SO_SNDRCVTIMEO_NONSTANDARD || defined __DOXYGEN__ #define LWIP_SO_SNDRCVTIMEO_NONSTANDARD 0 #endif /** * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing. */ -#ifndef LWIP_SO_RCVBUF +#if !defined LWIP_SO_RCVBUF || defined __DOXYGEN__ #define LWIP_SO_RCVBUF 0 #endif /** * LWIP_SO_LINGER==1: Enable SO_LINGER processing. */ -#ifndef LWIP_SO_LINGER +#if !defined LWIP_SO_LINGER || defined __DOXYGEN__ #define LWIP_SO_LINGER 0 #endif /** * If LWIP_SO_RCVBUF is used, this is the default value for recv_bufsize. */ -#ifndef RECV_BUFSIZE_DEFAULT +#if !defined RECV_BUFSIZE_DEFAULT || defined __DOXYGEN__ #define RECV_BUFSIZE_DEFAULT INT_MAX #endif /** * By default, TCP socket/netconn close waits 20 seconds max to send the FIN */ -#ifndef LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT +#if !defined LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT || defined __DOXYGEN__ #define LWIP_TCP_CLOSE_TIMEOUT_MS_DEFAULT 20000 #endif /** * SO_REUSE==1: Enable SO_REUSEADDR option. */ -#ifndef SO_REUSE +#if !defined SO_REUSE || defined __DOXYGEN__ #define SO_REUSE 0 #endif @@ -1898,7 +1845,7 @@ * to all local matches if SO_REUSEADDR is turned on. * WARNING: Adds a memcpy for every packet if passing to more than one pcb! */ -#ifndef SO_REUSE_RXTOALL +#if !defined SO_REUSE_RXTOALL || defined __DOXYGEN__ #define SO_REUSE_RXTOALL 0 #endif @@ -1910,7 +1857,7 @@ * pending datagram in bytes. This is the way linux does it. This code is only * here for compatibility. */ -#ifndef LWIP_FIONREAD_LINUXMODE +#if !defined LWIP_FIONREAD_LINUXMODE || defined __DOXYGEN__ #define LWIP_FIONREAD_LINUXMODE 0 #endif /** @@ -1930,7 +1877,7 @@ /** * LWIP_STATS==1: Enable statistics collection in lwip_stats. */ -#ifndef LWIP_STATS +#if !defined LWIP_STATS || defined __DOXYGEN__ #define LWIP_STATS 1 #endif @@ -1939,28 +1886,28 @@ /** * LWIP_STATS_DISPLAY==1: Compile in the statistics output functions. */ -#ifndef LWIP_STATS_DISPLAY +#if !defined LWIP_STATS_DISPLAY || defined __DOXYGEN__ #define LWIP_STATS_DISPLAY 0 #endif /** * LINK_STATS==1: Enable link stats. */ -#ifndef LINK_STATS +#if !defined LINK_STATS || defined __DOXYGEN__ #define LINK_STATS 1 #endif /** * ETHARP_STATS==1: Enable etharp stats. */ -#ifndef ETHARP_STATS +#if !defined ETHARP_STATS || defined __DOXYGEN__ #define ETHARP_STATS (LWIP_ARP) #endif /** * IP_STATS==1: Enable IP stats. */ -#ifndef IP_STATS +#if !defined IP_STATS || defined __DOXYGEN__ #define IP_STATS 1 #endif @@ -1968,21 +1915,21 @@ * IPFRAG_STATS==1: Enable IP fragmentation stats. Default is * on if using either frag or reass. */ -#ifndef IPFRAG_STATS +#if !defined IPFRAG_STATS || defined __DOXYGEN__ #define IPFRAG_STATS (IP_REASSEMBLY || IP_FRAG) #endif /** * ICMP_STATS==1: Enable ICMP stats. */ -#ifndef ICMP_STATS +#if !defined ICMP_STATS || defined __DOXYGEN__ #define ICMP_STATS 1 #endif /** * IGMP_STATS==1: Enable IGMP stats. */ -#ifndef IGMP_STATS +#if !defined IGMP_STATS || defined __DOXYGEN__ #define IGMP_STATS (LWIP_IGMP) #endif @@ -1990,7 +1937,7 @@ * UDP_STATS==1: Enable UDP stats. Default is on if * UDP enabled, otherwise off. */ -#ifndef UDP_STATS +#if !defined UDP_STATS || defined __DOXYGEN__ #define UDP_STATS (LWIP_UDP) #endif @@ -1998,70 +1945,70 @@ * TCP_STATS==1: Enable TCP stats. Default is on if TCP * enabled, otherwise off. */ -#ifndef TCP_STATS +#if !defined TCP_STATS || defined __DOXYGEN__ #define TCP_STATS (LWIP_TCP) #endif /** * MEM_STATS==1: Enable mem.c stats. */ -#ifndef MEM_STATS +#if !defined MEM_STATS || defined __DOXYGEN__ #define MEM_STATS ((MEM_LIBC_MALLOC == 0) && (MEM_USE_POOLS == 0)) #endif /** * MEMP_STATS==1: Enable memp.c pool stats. */ -#ifndef MEMP_STATS +#if !defined MEMP_STATS || defined __DOXYGEN__ #define MEMP_STATS (MEMP_MEM_MALLOC == 0) #endif /** * SYS_STATS==1: Enable system stats (sem and mbox counts, etc). */ -#ifndef SYS_STATS +#if !defined SYS_STATS || defined __DOXYGEN__ #define SYS_STATS (NO_SYS == 0) #endif /** * IP6_STATS==1: Enable IPv6 stats. */ -#ifndef IP6_STATS +#if !defined IP6_STATS || defined __DOXYGEN__ #define IP6_STATS (LWIP_IPV6) #endif /** * ICMP6_STATS==1: Enable ICMP for IPv6 stats. */ -#ifndef ICMP6_STATS +#if !defined ICMP6_STATS || defined __DOXYGEN__ #define ICMP6_STATS (LWIP_IPV6 && LWIP_ICMP6) #endif /** * IP6_FRAG_STATS==1: Enable IPv6 fragmentation stats. */ -#ifndef IP6_FRAG_STATS +#if !defined IP6_FRAG_STATS || defined __DOXYGEN__ #define IP6_FRAG_STATS (LWIP_IPV6 && (LWIP_IPV6_FRAG || LWIP_IPV6_REASS)) #endif /** * MLD6_STATS==1: Enable MLD for IPv6 stats. */ -#ifndef MLD6_STATS +#if !defined MLD6_STATS || defined __DOXYGEN__ #define MLD6_STATS (LWIP_IPV6 && LWIP_IPV6_MLD) #endif /** * ND6_STATS==1: Enable Neighbor discovery for IPv6 stats. */ -#ifndef ND6_STATS +#if !defined ND6_STATS || defined __DOXYGEN__ #define ND6_STATS (LWIP_IPV6) #endif /** * MIB2_STATS==1: Stats for SNMP MIB2. */ -#ifndef MIB2_STATS +#if !defined MIB2_STATS || defined __DOXYGEN__ #define MIB2_STATS 0 #endif @@ -2106,77 +2053,77 @@ * per netif. * ATTENTION: if enabled, the CHECKSUM_GEN_* and CHECKSUM_CHECK_* defines must be enabled! */ -#ifndef LWIP_CHECKSUM_CTRL_PER_NETIF +#if !defined LWIP_CHECKSUM_CTRL_PER_NETIF || defined __DOXYGEN__ #define LWIP_CHECKSUM_CTRL_PER_NETIF 0 #endif /** * CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets. */ -#ifndef CHECKSUM_GEN_IP +#if !defined CHECKSUM_GEN_IP || defined __DOXYGEN__ #define CHECKSUM_GEN_IP 1 #endif /** * CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets. */ -#ifndef CHECKSUM_GEN_UDP +#if !defined CHECKSUM_GEN_UDP || defined __DOXYGEN__ #define CHECKSUM_GEN_UDP 1 #endif /** * CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets. */ -#ifndef CHECKSUM_GEN_TCP +#if !defined CHECKSUM_GEN_TCP || defined __DOXYGEN__ #define CHECKSUM_GEN_TCP 1 #endif /** * CHECKSUM_GEN_ICMP==1: Generate checksums in software for outgoing ICMP packets. */ -#ifndef CHECKSUM_GEN_ICMP +#if !defined CHECKSUM_GEN_ICMP || defined __DOXYGEN__ #define CHECKSUM_GEN_ICMP 1 #endif /** * CHECKSUM_GEN_ICMP6==1: Generate checksums in software for outgoing ICMP6 packets. */ -#ifndef CHECKSUM_GEN_ICMP6 +#if !defined CHECKSUM_GEN_ICMP6 || defined __DOXYGEN__ #define CHECKSUM_GEN_ICMP6 1 #endif /** * CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets. */ -#ifndef CHECKSUM_CHECK_IP +#if !defined CHECKSUM_CHECK_IP || defined __DOXYGEN__ #define CHECKSUM_CHECK_IP 1 #endif /** * CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets. */ -#ifndef CHECKSUM_CHECK_UDP +#if !defined CHECKSUM_CHECK_UDP || defined __DOXYGEN__ #define CHECKSUM_CHECK_UDP 1 #endif /** * CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets. */ -#ifndef CHECKSUM_CHECK_TCP +#if !defined CHECKSUM_CHECK_TCP || defined __DOXYGEN__ #define CHECKSUM_CHECK_TCP 1 #endif /** * CHECKSUM_CHECK_ICMP==1: Check checksums in software for incoming ICMP packets. */ -#ifndef CHECKSUM_CHECK_ICMP +#if !defined CHECKSUM_CHECK_ICMP || defined __DOXYGEN__ #define CHECKSUM_CHECK_ICMP 1 #endif /** * CHECKSUM_CHECK_ICMP6==1: Check checksums in software for incoming ICMPv6 packets */ -#ifndef CHECKSUM_CHECK_ICMP6 +#if !defined CHECKSUM_CHECK_ICMP6 || defined __DOXYGEN__ #define CHECKSUM_CHECK_ICMP6 1 #endif @@ -2184,7 +2131,7 @@ * LWIP_CHECKSUM_ON_COPY==1: Calculate checksum when copying data from * application buffers to pbufs. */ -#ifndef LWIP_CHECKSUM_ON_COPY +#if !defined LWIP_CHECKSUM_ON_COPY || defined __DOXYGEN__ #define LWIP_CHECKSUM_ON_COPY 0 #endif /** @@ -2204,35 +2151,35 @@ /** * LWIP_IPV6==1: Enable IPv6 */ -#ifndef LWIP_IPV6 +#if !defined LWIP_IPV6 || defined __DOXYGEN__ #define LWIP_IPV6 0 #endif /** * LWIP_IPV6_NUM_ADDRESSES: Number of IPv6 addresses per netif. */ -#ifndef LWIP_IPV6_NUM_ADDRESSES +#if !defined LWIP_IPV6_NUM_ADDRESSES || defined __DOXYGEN__ #define LWIP_IPV6_NUM_ADDRESSES 3 #endif /** * LWIP_IPV6_FORWARD==1: Forward IPv6 packets across netifs */ -#ifndef LWIP_IPV6_FORWARD +#if !defined LWIP_IPV6_FORWARD || defined __DOXYGEN__ #define LWIP_IPV6_FORWARD 0 #endif /** * LWIP_IPV6_FRAG==1: Fragment outgoing IPv6 packets that are too big. */ -#ifndef LWIP_IPV6_FRAG +#if !defined LWIP_IPV6_FRAG || defined __DOXYGEN__ #define LWIP_IPV6_FRAG 0 #endif /** * LWIP_IPV6_REASS==1: reassemble incoming IPv6 packets that fragmented */ -#ifndef LWIP_IPV6_REASS +#if !defined LWIP_IPV6_REASS || defined __DOXYGEN__ || defined __DOXYGEN__ #define LWIP_IPV6_REASS (LWIP_IPV6) #endif @@ -2240,21 +2187,21 @@ * LWIP_IPV6_SEND_ROUTER_SOLICIT==1: Send router solicitation messages during * network startup. */ -#ifndef LWIP_IPV6_SEND_ROUTER_SOLICIT +#if !defined LWIP_IPV6_SEND_ROUTER_SOLICIT || defined __DOXYGEN__ #define LWIP_IPV6_SEND_ROUTER_SOLICIT 1 #endif /** * LWIP_IPV6_AUTOCONFIG==1: Enable stateless address autoconfiguration as per RFC 4862. */ -#ifndef LWIP_IPV6_AUTOCONFIG +#if !defined LWIP_IPV6_AUTOCONFIG || defined __DOXYGEN__ #define LWIP_IPV6_AUTOCONFIG (LWIP_IPV6) #endif /** * LWIP_IPV6_DUP_DETECT_ATTEMPTS: Number of duplicate address detection attempts. */ -#ifndef LWIP_IPV6_DUP_DETECT_ATTEMPTS +#if !defined LWIP_IPV6_DUP_DETECT_ATTEMPTS || defined __DOXYGEN__ #define LWIP_IPV6_DUP_DETECT_ATTEMPTS 1 #endif /** @@ -2269,7 +2216,7 @@ /** * LWIP_ICMP6==1: Enable ICMPv6 (mandatory per RFC) */ -#ifndef LWIP_ICMP6 +#if !defined LWIP_ICMP6 || defined __DOXYGEN__ #define LWIP_ICMP6 (LWIP_IPV6) #endif @@ -2277,14 +2224,14 @@ * LWIP_ICMP6_DATASIZE: bytes from original packet to send back in * ICMPv6 error messages. */ -#ifndef LWIP_ICMP6_DATASIZE +#if !defined LWIP_ICMP6_DATASIZE || defined __DOXYGEN__ #define LWIP_ICMP6_DATASIZE 8 #endif /** * LWIP_ICMP6_HL: default hop limit for ICMPv6 messages */ -#ifndef LWIP_ICMP6_HL +#if !defined LWIP_ICMP6_HL || defined __DOXYGEN__ #define LWIP_ICMP6_HL 255 #endif /** @@ -2299,14 +2246,14 @@ /** * LWIP_IPV6_MLD==1: Enable multicast listener discovery protocol. */ -#ifndef LWIP_IPV6_MLD +#if !defined LWIP_IPV6_MLD || defined __DOXYGEN__ #define LWIP_IPV6_MLD (LWIP_IPV6) #endif /** * MEMP_NUM_MLD6_GROUP: Max number of IPv6 multicast that can be joined. */ -#ifndef MEMP_NUM_MLD6_GROUP +#if !defined MEMP_NUM_MLD6_GROUP || defined __DOXYGEN__ #define MEMP_NUM_MLD6_GROUP 4 #endif /** @@ -2322,42 +2269,42 @@ * LWIP_ND6_QUEUEING==1: queue outgoing IPv6 packets while MAC address * is being resolved. */ -#ifndef LWIP_ND6_QUEUEING +#if !defined LWIP_ND6_QUEUEING || defined __DOXYGEN__ #define LWIP_ND6_QUEUEING (LWIP_IPV6) #endif /** * MEMP_NUM_ND6_QUEUE: Max number of IPv6 packets to queue during MAC resolution. */ -#ifndef MEMP_NUM_ND6_QUEUE +#if !defined MEMP_NUM_ND6_QUEUE || defined __DOXYGEN__ #define MEMP_NUM_ND6_QUEUE 20 #endif /** * LWIP_ND6_NUM_NEIGHBORS: Number of entries in IPv6 neighbor cache */ -#ifndef LWIP_ND6_NUM_NEIGHBORS +#if !defined LWIP_ND6_NUM_NEIGHBORS || defined __DOXYGEN__ #define LWIP_ND6_NUM_NEIGHBORS 10 #endif /** * LWIP_ND6_NUM_DESTINATIONS: number of entries in IPv6 destination cache */ -#ifndef LWIP_ND6_NUM_DESTINATIONS +#if !defined LWIP_ND6_NUM_DESTINATIONS || defined __DOXYGEN__ #define LWIP_ND6_NUM_DESTINATIONS 10 #endif /** * LWIP_ND6_NUM_PREFIXES: number of entries in IPv6 on-link prefixes cache */ -#ifndef LWIP_ND6_NUM_PREFIXES +#if !defined LWIP_ND6_NUM_PREFIXES || defined __DOXYGEN__ #define LWIP_ND6_NUM_PREFIXES 5 #endif /** * LWIP_ND6_NUM_ROUTERS: number of entries in IPv6 default router cache */ -#ifndef LWIP_ND6_NUM_ROUTERS +#if !defined LWIP_ND6_NUM_ROUTERS || defined __DOXYGEN__ #define LWIP_ND6_NUM_ROUTERS 3 #endif @@ -2365,7 +2312,7 @@ * LWIP_ND6_MAX_MULTICAST_SOLICIT: max number of multicast solicit messages to send * (neighbor solicit and router solicit) */ -#ifndef LWIP_ND6_MAX_MULTICAST_SOLICIT +#if !defined LWIP_ND6_MAX_MULTICAST_SOLICIT || defined __DOXYGEN__ #define LWIP_ND6_MAX_MULTICAST_SOLICIT 3 #endif @@ -2373,21 +2320,21 @@ * LWIP_ND6_MAX_UNICAST_SOLICIT: max number of unicast neighbor solicitation messages * to send during neighbor reachability detection. */ -#ifndef LWIP_ND6_MAX_UNICAST_SOLICIT +#if !defined LWIP_ND6_MAX_UNICAST_SOLICIT || defined __DOXYGEN__ #define LWIP_ND6_MAX_UNICAST_SOLICIT 3 #endif /** * Unused: See ND RFC (time in milliseconds). */ -#ifndef LWIP_ND6_MAX_ANYCAST_DELAY_TIME +#if !defined LWIP_ND6_MAX_ANYCAST_DELAY_TIME || defined __DOXYGEN__ #define LWIP_ND6_MAX_ANYCAST_DELAY_TIME 1000 #endif /** * Unused: See ND RFC */ -#ifndef LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT +#if !defined LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT || defined __DOXYGEN__ #define LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT 3 #endif @@ -2395,14 +2342,14 @@ * LWIP_ND6_REACHABLE_TIME: default neighbor reachable time (in milliseconds). * May be updated by router advertisement messages. */ -#ifndef LWIP_ND6_REACHABLE_TIME +#if !defined LWIP_ND6_REACHABLE_TIME || defined __DOXYGEN__ #define LWIP_ND6_REACHABLE_TIME 30000 #endif /** * LWIP_ND6_RETRANS_TIMER: default retransmission timer for solicitation messages */ -#ifndef LWIP_ND6_RETRANS_TIMER +#if !defined LWIP_ND6_RETRANS_TIMER || defined __DOXYGEN__ #define LWIP_ND6_RETRANS_TIMER 1000 #endif @@ -2410,7 +2357,7 @@ * LWIP_ND6_DELAY_FIRST_PROBE_TIME: Delay before first unicast neighbor solicitation * message is sent, during neighbor reachability detection. */ -#ifndef LWIP_ND6_DELAY_FIRST_PROBE_TIMEs +#if !defined LWIP_ND6_DELAY_FIRST_PROBE_TIME || defined __DOXYGEN__s #define LWIP_ND6_DELAY_FIRST_PROBE_TIME 5000 #endif @@ -2418,7 +2365,7 @@ * LWIP_ND6_ALLOW_RA_UPDATES==1: Allow Router Advertisement messages to update * Reachable time and retransmission timers, and netif MTU. */ -#ifndef LWIP_ND6_ALLOW_RA_UPDATES +#if !defined LWIP_ND6_ALLOW_RA_UPDATES || defined __DOXYGEN__ #define LWIP_ND6_ALLOW_RA_UPDATES 1 #endif @@ -2427,7 +2374,7 @@ * with reachability hints for connected destinations. This helps avoid sending * unicast neighbor solicitation messages. */ -#ifndef LWIP_ND6_TCP_REACHABILITY_HINTS +#if !defined LWIP_ND6_TCP_REACHABILITY_HINTS || defined __DOXYGEN__ || defined __DOXYGEN__ #define LWIP_ND6_TCP_REACHABILITY_HINTS 1 #endif /** @@ -2437,7 +2384,7 @@ /** * LWIP_IPV6_DHCP6==1: enable DHCPv6 stateful address autoconfiguration. */ -#ifndef LWIP_IPV6_DHCP6 +#if !defined LWIP_IPV6_DHCP6 || defined __DOXYGEN__ #define LWIP_IPV6_DHCP6 0 #endif @@ -2586,7 +2533,7 @@ * compared against this value. If it is smaller, then debugging * messages are written. */ -#ifndef LWIP_DBG_MIN_LEVEL +#if !defined LWIP_DBG_MIN_LEVEL || defined __DOXYGEN__ || defined __DOXYGEN__ #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ALL #endif @@ -2594,140 +2541,140 @@ * LWIP_DBG_TYPES_ON: A mask that can be used to globally enable/disable * debug messages of certain types. */ -#ifndef LWIP_DBG_TYPES_ON +#if !defined LWIP_DBG_TYPES_ON || defined __DOXYGEN__ #define LWIP_DBG_TYPES_ON LWIP_DBG_ON #endif /** * ETHARP_DEBUG: Enable debugging in etharp.c. */ -#ifndef ETHARP_DEBUG +#if !defined ETHARP_DEBUG || defined __DOXYGEN__ #define ETHARP_DEBUG LWIP_DBG_OFF #endif /** * NETIF_DEBUG: Enable debugging in netif.c. */ -#ifndef NETIF_DEBUG +#if !defined NETIF_DEBUG || defined __DOXYGEN__ #define NETIF_DEBUG LWIP_DBG_OFF #endif /** * PBUF_DEBUG: Enable debugging in pbuf.c. */ -#ifndef PBUF_DEBUG +#if !defined PBUF_DEBUG || defined __DOXYGEN__ #define PBUF_DEBUG LWIP_DBG_OFF #endif /** * API_LIB_DEBUG: Enable debugging in api_lib.c. */ -#ifndef API_LIB_DEBUG +#if !defined API_LIB_DEBUG || defined __DOXYGEN__ #define API_LIB_DEBUG LWIP_DBG_OFF #endif /** * API_MSG_DEBUG: Enable debugging in api_msg.c. */ -#ifndef API_MSG_DEBUG +#if !defined API_MSG_DEBUG || defined __DOXYGEN__ #define API_MSG_DEBUG LWIP_DBG_OFF #endif /** * SOCKETS_DEBUG: Enable debugging in sockets.c. */ -#ifndef SOCKETS_DEBUG +#if !defined SOCKETS_DEBUG || defined __DOXYGEN__ #define SOCKETS_DEBUG LWIP_DBG_OFF #endif /** * ICMP_DEBUG: Enable debugging in icmp.c. */ -#ifndef ICMP_DEBUG +#if !defined ICMP_DEBUG || defined __DOXYGEN__ #define ICMP_DEBUG LWIP_DBG_OFF #endif /** * IGMP_DEBUG: Enable debugging in igmp.c. */ -#ifndef IGMP_DEBUG +#if !defined IGMP_DEBUG || defined __DOXYGEN__ #define IGMP_DEBUG LWIP_DBG_OFF #endif /** * INET_DEBUG: Enable debugging in inet.c. */ -#ifndef INET_DEBUG +#if !defined INET_DEBUG || defined __DOXYGEN__ #define INET_DEBUG LWIP_DBG_OFF #endif /** * IP_DEBUG: Enable debugging for IP. */ -#ifndef IP_DEBUG +#if !defined IP_DEBUG || defined __DOXYGEN__ #define IP_DEBUG LWIP_DBG_OFF #endif /** * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass. */ -#ifndef IP_REASS_DEBUG +#if !defined IP_REASS_DEBUG || defined __DOXYGEN__ #define IP_REASS_DEBUG LWIP_DBG_OFF #endif /** * RAW_DEBUG: Enable debugging in raw.c. */ -#ifndef RAW_DEBUG +#if !defined RAW_DEBUG || defined __DOXYGEN__ #define RAW_DEBUG LWIP_DBG_OFF #endif /** * MEM_DEBUG: Enable debugging in mem.c. */ -#ifndef MEM_DEBUG +#if !defined MEM_DEBUG || defined __DOXYGEN__ #define MEM_DEBUG LWIP_DBG_OFF #endif /** * MEMP_DEBUG: Enable debugging in memp.c. */ -#ifndef MEMP_DEBUG +#if !defined MEMP_DEBUG || defined __DOXYGEN__ #define MEMP_DEBUG LWIP_DBG_OFF #endif /** * SYS_DEBUG: Enable debugging in sys.c. */ -#ifndef SYS_DEBUG +#if !defined SYS_DEBUG || defined __DOXYGEN__ #define SYS_DEBUG LWIP_DBG_OFF #endif /** * TIMERS_DEBUG: Enable debugging in timers.c. */ -#ifndef TIMERS_DEBUG +#if !defined TIMERS_DEBUG || defined __DOXYGEN__ #define TIMERS_DEBUG LWIP_DBG_OFF #endif /** * TCP_DEBUG: Enable debugging for TCP. */ -#ifndef TCP_DEBUG +#if !defined TCP_DEBUG || defined __DOXYGEN__ #define TCP_DEBUG LWIP_DBG_OFF #endif /** * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug. */ -#ifndef TCP_INPUT_DEBUG +#if !defined TCP_INPUT_DEBUG || defined __DOXYGEN__ #define TCP_INPUT_DEBUG LWIP_DBG_OFF #endif /** * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit. */ -#ifndef TCP_FR_DEBUG +#if !defined TCP_FR_DEBUG || defined __DOXYGEN__ #define TCP_FR_DEBUG LWIP_DBG_OFF #endif @@ -2735,91 +2682,91 @@ * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit * timeout. */ -#ifndef TCP_RTO_DEBUG +#if !defined TCP_RTO_DEBUG || defined __DOXYGEN__ #define TCP_RTO_DEBUG LWIP_DBG_OFF #endif /** * TCP_CWND_DEBUG: Enable debugging for TCP congestion window. */ -#ifndef TCP_CWND_DEBUG +#if !defined TCP_CWND_DEBUG || defined __DOXYGEN__ #define TCP_CWND_DEBUG LWIP_DBG_OFF #endif /** * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating. */ -#ifndef TCP_WND_DEBUG +#if !defined TCP_WND_DEBUG || defined __DOXYGEN__ #define TCP_WND_DEBUG LWIP_DBG_OFF #endif /** * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions. */ -#ifndef TCP_OUTPUT_DEBUG +#if !defined TCP_OUTPUT_DEBUG || defined __DOXYGEN__ #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF #endif /** * TCP_RST_DEBUG: Enable debugging for TCP with the RST message. */ -#ifndef TCP_RST_DEBUG +#if !defined TCP_RST_DEBUG || defined __DOXYGEN__ #define TCP_RST_DEBUG LWIP_DBG_OFF #endif /** * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths. */ -#ifndef TCP_QLEN_DEBUG +#if !defined TCP_QLEN_DEBUG || defined __DOXYGEN__ #define TCP_QLEN_DEBUG LWIP_DBG_OFF #endif /** * UDP_DEBUG: Enable debugging in UDP. */ -#ifndef UDP_DEBUG +#if !defined UDP_DEBUG || defined __DOXYGEN__ #define UDP_DEBUG LWIP_DBG_OFF #endif /** * TCPIP_DEBUG: Enable debugging in tcpip.c. */ -#ifndef TCPIP_DEBUG +#if !defined TCPIP_DEBUG || defined __DOXYGEN__ #define TCPIP_DEBUG LWIP_DBG_OFF #endif /** * SLIP_DEBUG: Enable debugging in slipif.c. */ -#ifndef SLIP_DEBUG +#if !defined SLIP_DEBUG || defined __DOXYGEN__ #define SLIP_DEBUG LWIP_DBG_OFF #endif /** * DHCP_DEBUG: Enable debugging in dhcp.c. */ -#ifndef DHCP_DEBUG +#if !defined DHCP_DEBUG || defined __DOXYGEN__ #define DHCP_DEBUG LWIP_DBG_OFF #endif /** * AUTOIP_DEBUG: Enable debugging in autoip.c. */ -#ifndef AUTOIP_DEBUG +#if !defined AUTOIP_DEBUG || defined __DOXYGEN__ #define AUTOIP_DEBUG LWIP_DBG_OFF #endif /** * DNS_DEBUG: Enable debugging for DNS. */ -#ifndef DNS_DEBUG +#if !defined DNS_DEBUG || defined __DOXYGEN__ #define DNS_DEBUG LWIP_DBG_OFF #endif /** * IP6_DEBUG: Enable debugging for IPv6. */ -#ifndef IP6_DEBUG +#if !defined IP6_DEBUG || defined __DOXYGEN__ #define IP6_DEBUG LWIP_DBG_OFF #endif /** @@ -2840,7 +2787,7 @@ * LWIP_PERF: Enable performance testing for lwIP * (if enabled, arch/perf.h is included) */ -#ifndef LWIP_PERF +#if !defined LWIP_PERF || defined __DOXYGEN__ #define LWIP_PERF 0 #endif /** From b7da649944267e9bae50c4ed2def0500a75bf96c Mon Sep 17 00:00:00 2001 From: goldsimon Date: Fri, 29 Jul 2016 08:01:41 +0200 Subject: [PATCH 259/275] sio.h: include opt.h for checking #ifndef's --- src/include/lwip/sio.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/include/lwip/sio.h b/src/include/lwip/sio.h index 09cf799a..7643e195 100644 --- a/src/include/lwip/sio.h +++ b/src/include/lwip/sio.h @@ -36,6 +36,7 @@ #define SIO_H #include "lwip/arch.h" +#include "lwip/opt.h" #ifdef __cplusplus extern "C" { From 5f9c944da47d51eb14ccb17c70b231f99ce048fa Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Sat, 30 Jul 2016 10:06:06 +0200 Subject: [PATCH 260/275] Add some netif related macros to docs --- src/include/lwip/netif.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/include/lwip/netif.h b/src/include/lwip/netif.h index 6f615c94..ad09ebbb 100644 --- a/src/include/lwip/netif.h +++ b/src/include/lwip/netif.h @@ -73,6 +73,12 @@ extern "C" { #define NETIF_MAX_HWADDR_LEN 6U #endif +/** + * @defgroup netif_flags + * @ingroup netif + * @{ + */ + /** Whether the network interface is 'up'. This is * a software flag used to control whether this network * interface is enabled and processes traffic. @@ -104,6 +110,10 @@ extern "C" { * Set by the netif driver in its init function. */ #define NETIF_FLAG_MLD6 0x40U +/** + * @} + */ + #if LWIP_CHECKSUM_CTRL_PER_NETIF #define NETIF_CHECKSUM_GEN_IP 0x0001 #define NETIF_CHECKSUM_GEN_UDP 0x0002 @@ -270,7 +280,7 @@ struct netif { u8_t hwaddr_len; /** link level hardware address of this interface */ u8_t hwaddr[NETIF_MAX_HWADDR_LEN]; - /** flags (see NETIF_FLAG_ above) */ + /** flags (@see @ref netif_flags) */ u8_t flags; /** descriptive abbreviation */ char name[2]; @@ -358,7 +368,9 @@ void netif_set_gw(struct netif *netif, const ip4_addr_t *gw); void netif_set_up(struct netif *netif); void netif_set_down(struct netif *netif); -/** Ask if an interface is up */ +/** @ingroup netif + * Ask if an interface is up + */ #define netif_is_up(netif) (((netif)->flags & NETIF_FLAG_UP) ? (u8_t)1 : (u8_t)0) #if LWIP_NETIF_STATUS_CALLBACK @@ -402,7 +414,9 @@ void netif_poll_all(void); #endif /* ENABLE_LOOPBACK */ #if LWIP_IPV6 +/** @ingroup netif */ #define netif_ip_addr6(netif, i) ((const ip_addr_t*)(&((netif)->ip6_addr[i]))) +/** @ingroup netif */ #define netif_ip6_addr(netif, i) ((const ip6_addr_t*)ip_2_ip6(&((netif)->ip6_addr[i]))) #define netif_ip6_addr_set(netif, i, addr6) do { ip6_addr_set(ip_2_ip6(&((netif)->ip6_addr[i])), addr6); IP_SET_TYPE_VAL((netif)->ip6_addr[i], IPADDR_TYPE_V6); } while(0) #define netif_ip6_addr_state(netif, i) ((netif)->ip6_addr_state[i]) From 4b67c582f6ec79a08ce6c0f46e716bedc95d9a5f Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Sat, 30 Jul 2016 10:19:16 +0200 Subject: [PATCH 261/275] Create netif_input function that decides according to netif flags where to pass an incoming packet. Allow to pass a NULL pointer to netif_add() input function - if so, use the function mentioned above as input function. --- src/core/netif.c | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/src/core/netif.c b/src/core/netif.c index 1281fa63..92a822ba 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -172,6 +172,21 @@ netif_init(void) #endif /* LWIP_HAVE_LOOPIF */ } +/** + * Pass a received packet for input processing with + * ethernet_input or ip_input depending on netif flags. + */ +static err_t +netif_input(struct pbuf *p, struct netif *inp) +{ +#if LWIP_ETHERNET + if (inp->flags & (NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET)) { + return ethernet_input(p, inp); + } else +#endif /* LWIP_ETHERNET */ + return ip_input(p, inp); +} + /** * @ingroup netif * Add a network interface to the list of lwIP netifs. @@ -183,7 +198,14 @@ netif_init(void) * @param state opaque data passed to the new netif * @param init callback function that initializes the interface * @param input callback function that is called to pass - * ingress packets up in the protocol layer stack. + * ingress packets up in the protocol layer stack. If a NULL + * pointer is supplied, a default input function is used + * that uses netif flags NETIF_FLAG_ETHARP and NETIF_FLAG_ETHERNET + * to decide whether to pass to ethernet_input() or ip_input(). Since + * the flags are usually managed by the one implementing the ethernet + * driver, the end user does not have to worry about choosing the correct + * one here. In other words, this only works when the netif driver is + * implemented correctly! * * @return netif, or NULL if failed. */ @@ -254,7 +276,11 @@ netif_add(struct netif *netif, /* remember netif specific state information data */ netif->state = state; netif->num = netif_num++; - netif->input = input; + if(input != NULL) { + netif->input = input; + } else { + netif->input = netif_input; + } NETIF_SET_HWADDRHINT(netif, NULL); #if ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS netif->loop_cnt_current = 0; From 0c7d015ec422301f979b8c2aa71d36130aa96cc5 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Sat, 30 Jul 2016 10:29:14 +0200 Subject: [PATCH 262/275] Further improvement to netif input function autoselection: Select between netif_input() and tcpip_input() depending on NO_SYS setting --- src/core/netif.c | 21 ++++++++++++++------- src/include/lwip/netif.h | 2 ++ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/core/netif.c b/src/core/netif.c index 92a822ba..952d63df 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -176,7 +176,7 @@ netif_init(void) * Pass a received packet for input processing with * ethernet_input or ip_input depending on netif flags. */ -static err_t +err_t netif_input(struct pbuf *p, struct netif *inp) { #if LWIP_ETHERNET @@ -198,14 +198,17 @@ netif_input(struct pbuf *p, struct netif *inp) * @param state opaque data passed to the new netif * @param init callback function that initializes the interface * @param input callback function that is called to pass - * ingress packets up in the protocol layer stack. If a NULL - * pointer is supplied, a default input function is used + * ingress packets up in the protocol layer stack.\n + * If a NULL pointer is supplied, a default input function is used * that uses netif flags NETIF_FLAG_ETHARP and NETIF_FLAG_ETHERNET - * to decide whether to pass to ethernet_input() or ip_input(). Since - * the flags are usually managed by the one implementing the ethernet + * to decide whether to forward to ethernet_input() or ip_input().\n + * Depending on NO_SYS, a function that passes the input directly to the stack + * (netif_input()) or via sending a message to TCPIP thread (tcpip_input()) + * is used.\n + * Since the flags are usually managed by the one implementing the ethernet * driver, the end user does not have to worry about choosing the correct - * one here. In other words, this only works when the netif driver is - * implemented correctly! + * input function here. In other words, this only works when the netif + * driver is implemented correctly! * * @return netif, or NULL if failed. */ @@ -279,7 +282,11 @@ netif_add(struct netif *netif, if(input != NULL) { netif->input = input; } else { +#if NO_SYS netif->input = netif_input; +#else + netif->input = tcpip_input; +#endif } NETIF_SET_HWADDRHINT(netif, NULL); #if ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS diff --git a/src/include/lwip/netif.h b/src/include/lwip/netif.h index ad09ebbb..b7dd6155 100644 --- a/src/include/lwip/netif.h +++ b/src/include/lwip/netif.h @@ -413,6 +413,8 @@ void netif_poll_all(void); #endif /* !LWIP_NETIF_LOOPBACK_MULTITHREADING */ #endif /* ENABLE_LOOPBACK */ +err_t netif_input(struct pbuf *p, struct netif *inp); + #if LWIP_IPV6 /** @ingroup netif */ #define netif_ip_addr6(netif, i) ((const ip_addr_t*)(&((netif)->ip6_addr[i]))) From 4cb7e31d2daee8b4dd89cc0210f03cfc5bb95ca8 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Sat, 30 Jul 2016 10:36:11 +0200 Subject: [PATCH 263/275] Add missing #include in netif.c --- src/core/netif.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/netif.c b/src/core/netif.c index 952d63df..6e968e2b 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -52,6 +52,7 @@ #include "lwip/etharp.h" #include "lwip/stats.h" #include "lwip/sys.h" +#include "lwip/tcpip.h" #if ENABLE_LOOPBACK #include "lwip/sys.h" #if LWIP_NETIF_LOOPBACK_MULTITHREADING From 2c2d11fa4d887f85258a5aeb0311292e95733afb Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Sat, 30 Jul 2016 10:40:36 +0200 Subject: [PATCH 264/275] Update documentation of netif_input function --- src/core/netif.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/netif.c b/src/core/netif.c index 6e968e2b..a635a608 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -174,8 +174,13 @@ netif_init(void) } /** - * Pass a received packet for input processing with - * ethernet_input or ip_input depending on netif flags. + * @ingroup lwip_nosys + * Forwards a received packet for input processing with + * ethernet_input() or ip_input() depending on netif flags. + * Don't call directly, pass to netif_add() and call + * netif->input(). + * Only works if the netif driver correctly sets + * NETIF_FLAG_ETHARP and/or NETIF_FLAG_ETHERNET flag! */ err_t netif_input(struct pbuf *p, struct netif *inp) From 6cc7f38c99e0a58e1e34c8b9962911c5f4360c19 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Sat, 30 Jul 2016 11:08:05 +0200 Subject: [PATCH 265/275] Fix typo in lwip.Doxyfile --- doc/doxygen/doxygenopts.h | 29 +++++++++++++++++++++++++++++ doc/doxygen/lwip.Doxyfile | 2 +- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 doc/doxygen/doxygenopts.h diff --git a/doc/doxygen/doxygenopts.h b/doc/doxygen/doxygenopts.h new file mode 100644 index 00000000..f2a19094 --- /dev/null +++ b/doc/doxygen/doxygenopts.h @@ -0,0 +1,29 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +/* + * File: doxygenopts.h + * Author: dziegel + * + * Created on July 30, 2016, 11:06 AM + */ + +#ifndef DOXYGENOPTS_H +#define DOXYGENOPTS_H + +#ifdef __cplusplus +extern "C" { +#endif + + + + +#ifdef __cplusplus +} +#endif + +#endif /* DOXYGENOPTS_H */ + diff --git a/doc/doxygen/lwip.Doxyfile b/doc/doxygen/lwip.Doxyfile index dd5f828c..e5a84065 100644 --- a/doc/doxygen/lwip.Doxyfile +++ b/doc/doxygen/lwip.Doxyfile @@ -2098,7 +2098,7 @@ PREDEFINED = __DOXYGEN__=1 \ LWIP_STATS=1 \ MEM_USE_POOLS=0 \ LWIP_DNS=1 \ - LWIP_SOCKETS=1 \ + LWIP_SOCKET=1 \ LWIP_NETCONN=1 \ IP_SOF_BROADCAST=1 \ IP_SOF_BROADCAST_RECV=1 \ From d00609257b6513cb3fc29fa11d1e2a2fc1d26a51 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Sun, 31 Jul 2016 15:49:32 +0200 Subject: [PATCH 266/275] Fix doxygen warning in netif.h (forgotten title) --- src/include/lwip/netif.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/lwip/netif.h b/src/include/lwip/netif.h index b7dd6155..8903a563 100644 --- a/src/include/lwip/netif.h +++ b/src/include/lwip/netif.h @@ -74,7 +74,7 @@ extern "C" { #endif /** - * @defgroup netif_flags + * @defgroup netif_flags Flags * @ingroup netif * @{ */ From e76b8b2551d53e19aa35e61ed95277aef5767310 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Sun, 31 Jul 2016 16:02:22 +0200 Subject: [PATCH 267/275] Document SNMP MIB2 netif stats counters --- doc/doxygen/lwip.Doxyfile | 1 + src/include/lwip/snmp.h | 25 ++++++++++++++++++++++--- src/include/lwip/stats.h | 27 +++++++++++++++------------ 3 files changed, 38 insertions(+), 15 deletions(-) diff --git a/doc/doxygen/lwip.Doxyfile b/doc/doxygen/lwip.Doxyfile index e5a84065..f9d5fc17 100644 --- a/doc/doxygen/lwip.Doxyfile +++ b/doc/doxygen/lwip.Doxyfile @@ -2083,6 +2083,7 @@ PREDEFINED = __DOXYGEN__=1 \ LWIP_SNMP=1 \ SNMP_USE_NETCONN=1 \ SNMP_USE_RAW=1 \ + MIB2_STATS=1 \ MEMP_OVERFLOW_CHECK=0 \ MEMP_SANITY_CHECK=1 \ LWIP_ARP=1 \ diff --git a/src/include/lwip/snmp.h b/src/include/lwip/snmp.h index b261a763..8704d0b4 100644 --- a/src/include/lwip/snmp.h +++ b/src/include/lwip/snmp.h @@ -47,9 +47,15 @@ extern "C" { struct udp_pcb; struct netif; +/** + * @defgroup netif_mib2 MIB2 statistics + * @ingroup netif + */ + /* MIB2 statistics functions */ #if MIB2_STATS /* don't build if not configured for use in lwipopts.h */ /** + * @ingroup netif_mib2 * @see RFC1213, "MIB-II, 6. Definitions" */ enum snmp_ifType { @@ -87,18 +93,31 @@ enum snmp_ifType { snmp_ifType_frame_relay }; -/** This macro has a precision of ~49 days because sys_now returns u32_t. #define your own if you want ~490 days. */ +/** This macro has a precision of ~49 days because sys_now returns u32_t. \#define your own if you want ~490 days. */ #ifndef MIB2_COPY_SYSUPTIME_TO #define MIB2_COPY_SYSUPTIME_TO(ptrToVal) (*(ptrToVal) = (sys_now() / 10)) #endif +/** + * @ingroup netif_mib2 + * Increment stats member for SNMP MIB2 stats (struct stats_mib2_netif_ctrs) + */ #define MIB2_STATS_NETIF_INC(n, x) do { ++(n)->mib2_counters.x; } while(0) +/** + * @ingroup netif_mib2 + * Add value to stats member for SNMP MIB2 stats (struct stats_mib2_netif_ctrs) + */ #define MIB2_STATS_NETIF_ADD(n, x, val) do { (n)->mib2_counters.x += (val); } while(0) +/** + * @ingroup netif_mib2 + * Init MIB2 statistic counters in netif + * @param netif Netif to init + * @param type one of enum @ref snmp_ifType + * @param speed your link speed here (units: bits per second) + */ #define MIB2_INIT_NETIF(netif, type, speed) do { \ - /* use "snmp_ifType" enum from snmp_mib2.h for "type", snmp_ifType_ethernet_csmacd by example */ \ (netif)->link_type = (type); \ - /* your link speed here (units: bits per second) */ \ (netif)->link_speed = (speed);\ (netif)->ts = 0; \ (netif)->mib2_counters.ifinoctets = 0; \ diff --git a/src/include/lwip/stats.h b/src/include/lwip/stats.h index 45aac704..99f49cce 100644 --- a/src/include/lwip/stats.h +++ b/src/include/lwip/stats.h @@ -179,47 +179,50 @@ struct stats_mib2 { u32_t icmpoutechoreps; }; -/** SNMP MIB2 interface stats */ +/** + * @ingroup netif_mib2 + * SNMP MIB2 interface stats + */ struct stats_mib2_netif_ctrs { - /* The total number of octets received on the interface, including framing characters */ + /** The total number of octets received on the interface, including framing characters */ u32_t ifinoctets; - /* The number of packets, delivered by this sub-layer to a higher (sub-)layer, which were + /** The number of packets, delivered by this sub-layer to a higher (sub-)layer, which were * not addressed to a multicast or broadcast address at this sub-layer */ u32_t ifinucastpkts; - /* The number of packets, delivered by this sub-layer to a higher (sub-)layer, which were + /** The number of packets, delivered by this sub-layer to a higher (sub-)layer, which were * addressed to a multicast or broadcast address at this sub-layer */ u32_t ifinnucastpkts; - /* The number of inbound packets which were chosen to be discarded even though no errors had + /** The number of inbound packets which were chosen to be discarded even though no errors had * been detected to prevent their being deliverable to a higher-layer protocol. One possible * reason for discarding such a packet could be to free up buffer space */ u32_t ifindiscards; - /* For packet-oriented interfaces, the number of inbound packets that contained errors + /** For packet-oriented interfaces, the number of inbound packets that contained errors * preventing them from being deliverable to a higher-layer protocol. For character- * oriented or fixed-length interfaces, the number of inbound transmission units that * contained errors preventing them from being deliverable to a higher-layer protocol. */ u32_t ifinerrors; - /* For packet-oriented interfaces, the number of packets received via the interface which + /** For packet-oriented interfaces, the number of packets received via the interface which * were discarded because of an unknown or unsupported protocol. For character-oriented * or fixed-length interfaces that support protocol multiplexing the number of transmission * units received via the interface which were discarded because of an unknown or unsupported * protocol. For any interface that does not support protocol multiplexing, this counter will * always be 0 */ u32_t ifinunknownprotos; - /* The total number of octets transmitted out of the interface, including framing characters. */ + /** The total number of octets transmitted out of the interface, including framing characters. */ u32_t ifoutoctets; - /* The total number of packets that higher-level protocols requested be transmitted, and + /** The total number of packets that higher-level protocols requested be transmitted, and * which were not addressed to a multicast or broadcast address at this sub-layer, including * those that were discarded or not sent. */ u32_t ifoutucastpkts; - /* The total number of packets that higher-level protocols requested be transmitted, and which + /** The total number of packets that higher-level protocols requested be transmitted, and which * were addressed to a multicast or broadcast address at this sub-layer, including * those that were discarded or not sent. */ u32_t ifoutnucastpkts; - /* The number of outbound packets which were chosen to be discarded even though no errors had + /** The number of outbound packets which were chosen to be discarded even though no errors had * been detected to prevent their being transmitted. One possible reason for discarding * such a packet could be to free up buffer space. */ u32_t ifoutdiscards; - /* For packet-oriented interfaces, the number of outbound packets that could not be transmitted + /** For packet-oriented interfaces, the number of outbound packets that could not be transmitted * because of errors. For character-oriented or fixed-length interfaces, the number of outbound * transmission units that could not be transmitted because of errors. */ u32_t ifouterrors; From 52d6d696aed6d9839cb52cc6aa66bd173bd754f3 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Sun, 31 Jul 2016 16:05:42 +0200 Subject: [PATCH 268/275] Document lwIP version #defines --- src/include/lwip/init.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/include/lwip/init.h b/src/include/lwip/init.h index 1b83923c..97914e58 100644 --- a/src/include/lwip/init.h +++ b/src/include/lwip/init.h @@ -43,6 +43,12 @@ extern "C" { #endif +/** + * @defgroup lwip_version Version + * @ingroup lwip + * @{ + */ + /** X.x.x: Major version of the stack */ #define LWIP_VERSION_MAJOR 2 /** x.X.x: Minor version of the stack */ @@ -77,8 +83,13 @@ extern "C" { /** Provides the version of the stack */ #define LWIP_VERSION (((u32_t)LWIP_VERSION_MAJOR) << 24 | ((u32_t)LWIP_VERSION_MINOR) << 16 | \ ((u32_t)LWIP_VERSION_REVISION) << 8 | ((u32_t)LWIP_VERSION_RC)) +/** Provides the version of the stack as string */ #define LWIP_VERSION_STRING LWIP_VERSTR(LWIP_VERSION_MAJOR) "." LWIP_VERSTR(LWIP_VERSION_MINOR) "." LWIP_VERSTR(LWIP_VERSION_REVISION) LWIP_VERSION_STRING_SUFFIX +/** + * @} + */ + /* Modules initialization */ void lwip_init(void); From a7979d7d241e9fad60eebf9f46ebc5a86da909f0 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Sun, 31 Jul 2016 16:08:17 +0200 Subject: [PATCH 269/275] Document lwIP error codes --- src/include/lwip/err.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/include/lwip/err.h b/src/include/lwip/err.h index cad360a8..97a7ab85 100644 --- a/src/include/lwip/err.h +++ b/src/include/lwip/err.h @@ -43,6 +43,12 @@ extern "C" { #endif +/** + * @defgroup infrastructure_errors Error codes + * @ingroup infrastructure + * @{ + */ + /** Define LWIP_ERR_T in cc.h if you want to use * a different type for your platform (must be signed). */ #ifdef LWIP_ERR_T @@ -90,6 +96,10 @@ typedef s8_t err_t; /** Illegal argument. */ #define ERR_ARG -16 +/** + * @} + */ + #ifdef LWIP_DEBUG extern const char *lwip_strerr(err_t err); #else From 501cfbe02bd1f68c6e1fe3a9bd1d649d2ad2350b Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Sun, 31 Jul 2016 16:59:12 +0200 Subject: [PATCH 270/275] Document netconn API some more --- src/include/lwip/api.h | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/include/lwip/api.h b/src/include/lwip/api.h index 8c07fed5..8bd8bf1e 100644 --- a/src/include/lwip/api.h +++ b/src/include/lwip/api.h @@ -99,25 +99,32 @@ extern "C" { */ enum netconn_type { NETCONN_INVALID = 0, - /* NETCONN_TCP Group */ + /** TCP IPv4 */ NETCONN_TCP = 0x10, #if LWIP_IPV6 + /** TCP IPv6 */ NETCONN_TCP_IPV6 = NETCONN_TCP | NETCONN_TYPE_IPV6 /* 0x18 */, #endif /* LWIP_IPV6 */ - /* NETCONN_UDP Group */ + /** UDP IPv4 */ NETCONN_UDP = 0x20, + /** UDP IPv4 lite */ NETCONN_UDPLITE = 0x21, + /** UDP IPv4 no checksum */ NETCONN_UDPNOCHKSUM = 0x22, #if LWIP_IPV6 + /** UDP IPv6 (dual-stack by default, unless you call @ref netconn_set_ipv6only) */ NETCONN_UDP_IPV6 = NETCONN_UDP | NETCONN_TYPE_IPV6 /* 0x28 */, + /** UDP IPv6 lite (dual-stack by default, unless you call @ref netconn_set_ipv6only) */ NETCONN_UDPLITE_IPV6 = NETCONN_UDPLITE | NETCONN_TYPE_IPV6 /* 0x29 */, + /** UDP IPv6 no checksum (dual-stack by default, unless you call @ref netconn_set_ipv6only) */ NETCONN_UDPNOCHKSUM_IPV6 = NETCONN_UDPNOCHKSUM | NETCONN_TYPE_IPV6 /* 0x2a */, #endif /* LWIP_IPV6 */ - /* NETCONN_RAW Group */ + /** Raw connection IPv4 */ NETCONN_RAW = 0x40 #if LWIP_IPV6 + /** Raw connection IPv6 (dual-stack by default, unless you call @ref netconn_set_ipv6only) */ , NETCONN_RAW_IPV6 = NETCONN_RAW | NETCONN_TYPE_IPV6 /* 0x48 */ #endif /* LWIP_IPV6 */ }; @@ -255,7 +262,9 @@ struct netconn { /* Network connection functions: */ -/** @ingroup netconn_common */ +/** @ingroup netconn_common + * Create new netconn connection + * @param t @ref netconn_type */ #define netconn_new(t) netconn_new_with_proto_and_callback(t, 0, NULL) #define netconn_new_with_callback(t, c) netconn_new_with_proto_and_callback(t, 0, c) struct netconn *netconn_new_with_proto_and_callback(enum netconn_type t, u8_t proto, @@ -317,12 +326,16 @@ err_t netconn_gethostbyname(const char *name, ip_addr_t *addr); #define netconn_is_nonblocking(conn) (((conn)->flags & NETCONN_FLAG_NON_BLOCKING) != 0) #if LWIP_IPV6 -/** TCP: Set the IPv6 ONLY status of netconn calls (see NETCONN_FLAG_IPV6_V6ONLY) */ +/** @ingroup netconn_common + * TCP: Set the IPv6 ONLY status of netconn calls (see NETCONN_FLAG_IPV6_V6ONLY) + */ #define netconn_set_ipv6only(conn, val) do { if(val) { \ (conn)->flags |= NETCONN_FLAG_IPV6_V6ONLY; \ } else { \ (conn)->flags &= ~ NETCONN_FLAG_IPV6_V6ONLY; }} while(0) -/** TCP: Get the IPv6 ONLY status of netconn calls (see NETCONN_FLAG_IPV6_V6ONLY) */ +/** @ingroup netconn_common + * TCP: Get the IPv6 ONLY status of netconn calls (see NETCONN_FLAG_IPV6_V6ONLY) + */ #define netconn_get_ipv6only(conn) (((conn)->flags & NETCONN_FLAG_IPV6_V6ONLY) != 0) #endif /* LWIP_IPV6 */ From e4d75a75ea4f4bca66386ce1574122dbd57f40a0 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Sun, 31 Jul 2016 20:01:33 +0200 Subject: [PATCH 271/275] Remove accidentally committed file --- doc/doxygen/doxygenopts.h | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 doc/doxygen/doxygenopts.h diff --git a/doc/doxygen/doxygenopts.h b/doc/doxygen/doxygenopts.h deleted file mode 100644 index f2a19094..00000000 --- a/doc/doxygen/doxygenopts.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ - -/* - * File: doxygenopts.h - * Author: dziegel - * - * Created on July 30, 2016, 11:06 AM - */ - -#ifndef DOXYGENOPTS_H -#define DOXYGENOPTS_H - -#ifdef __cplusplus -extern "C" { -#endif - - - - -#ifdef __cplusplus -} -#endif - -#endif /* DOXYGENOPTS_H */ - From 2f7e6d06612bfefa5fa31ef3a7ef74cdac5fce96 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Mon, 1 Aug 2016 09:32:54 +0200 Subject: [PATCH 272/275] Remove hard reference from netif.c to tcpip.c - avoids pulling in unnecessary code --- src/core/netif.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/src/core/netif.c b/src/core/netif.c index a635a608..4993ef41 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -205,15 +205,12 @@ netif_input(struct pbuf *p, struct netif *inp) * @param init callback function that initializes the interface * @param input callback function that is called to pass * ingress packets up in the protocol layer stack.\n - * If a NULL pointer is supplied, a default input function is used - * that uses netif flags NETIF_FLAG_ETHARP and NETIF_FLAG_ETHERNET - * to decide whether to forward to ethernet_input() or ip_input().\n - * Depending on NO_SYS, a function that passes the input directly to the stack - * (netif_input()) or via sending a message to TCPIP thread (tcpip_input()) - * is used.\n - * Since the flags are usually managed by the one implementing the ethernet - * driver, the end user does not have to worry about choosing the correct - * input function here. In other words, this only works when the netif + * It is recommended to use a function that passes the input directly + * to the stack (netif_input(), NO_SYS=1 mode) or via sending a + * message to TCPIP thread (tcpip_input(), NO_SYS=0 mode).\n + * These functions use netif flags NETIF_FLAG_ETHARP and NETIF_FLAG_ETHERNET + * to decide whether to forward to ethernet_input() or ip_input(). + * In other words, the functions only work when the netif * driver is implemented correctly! * * @return netif, or NULL if failed. @@ -285,15 +282,8 @@ netif_add(struct netif *netif, /* remember netif specific state information data */ netif->state = state; netif->num = netif_num++; - if(input != NULL) { - netif->input = input; - } else { -#if NO_SYS - netif->input = netif_input; -#else - netif->input = tcpip_input; -#endif - } + netif->input = input; + NETIF_SET_HWADDRHINT(netif, NULL); #if ENABLE_LOOPBACK && LWIP_LOOPBACK_MAX_PBUFS netif->loop_cnt_current = 0; From 92f385aaed7dcccde632502711281234ccda958c Mon Sep 17 00:00:00 2001 From: goldsimon Date: Mon, 1 Aug 2016 09:35:59 +0200 Subject: [PATCH 273/275] fixed compiling lowpan6 for NO_SYS==1 --- src/include/netif/lowpan6.h | 2 ++ src/netif/lowpan6.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/include/netif/lowpan6.h b/src/include/netif/lowpan6.h index 21552938..4174644b 100644 --- a/src/include/netif/lowpan6.h +++ b/src/include/netif/lowpan6.h @@ -73,7 +73,9 @@ err_t lowpan6_if_init(struct netif *netif); /* pan_id in network byte order. */ err_t lowpan6_set_pan_id(u16_t pan_id); +#if !NO_SYS err_t tcpip_6lowpan_input(struct pbuf *p, struct netif *inp); +#endif /* !NO_SYS */ #ifdef __cplusplus } diff --git a/src/netif/lowpan6.c b/src/netif/lowpan6.c index b073efd4..407848c4 100644 --- a/src/netif/lowpan6.c +++ b/src/netif/lowpan6.c @@ -1186,6 +1186,7 @@ lowpan6_set_pan_id(u16_t pan_id) return ERR_OK; } +#if !NO_SYS /** * Pass a received packet to tcpip_thread for input processing * @@ -1198,5 +1199,6 @@ tcpip_6lowpan_input(struct pbuf *p, struct netif *inp) { return tcpip_inpkt(p, inp, lowpan6_input); } +#endif /* !NO_SYS */ #endif /* LWIP_IPV6 && LWIP_6LOWPAN */ From 247d2e97a0f51e1fcaca25cd02d141b697cc75bb Mon Sep 17 00:00:00 2001 From: goldsimon Date: Mon, 1 Aug 2016 09:36:15 +0200 Subject: [PATCH 274/275] minor: removed trailing spaces --- src/include/lwip/err.h | 2 +- src/include/lwip/init.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/lwip/err.h b/src/include/lwip/err.h index 97a7ab85..81a049d8 100644 --- a/src/include/lwip/err.h +++ b/src/include/lwip/err.h @@ -48,7 +48,7 @@ extern "C" { * @ingroup infrastructure * @{ */ - + /** Define LWIP_ERR_T in cc.h if you want to use * a different type for your platform (must be signed). */ #ifdef LWIP_ERR_T diff --git a/src/include/lwip/init.h b/src/include/lwip/init.h index 97914e58..b655b43e 100644 --- a/src/include/lwip/init.h +++ b/src/include/lwip/init.h @@ -48,7 +48,7 @@ extern "C" { * @ingroup lwip * @{ */ - + /** X.x.x: Major version of the stack */ #define LWIP_VERSION_MAJOR 2 /** x.X.x: Minor version of the stack */ From 018294d287192c1206bcdf7fa49e568fb8362207 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Mon, 1 Aug 2016 09:44:18 +0200 Subject: [PATCH 275/275] remove doubled include (tcpip.h) --- src/core/netif.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/core/netif.c b/src/core/netif.c index 4993ef41..86003175 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -52,7 +52,6 @@ #include "lwip/etharp.h" #include "lwip/stats.h" #include "lwip/sys.h" -#include "lwip/tcpip.h" #if ENABLE_LOOPBACK #include "lwip/sys.h" #if LWIP_NETIF_LOOPBACK_MULTITHREADING