diff --git a/src/core/udp.c b/src/core/udp.c index eb64affa..7456f9b0 100644 --- a/src/core/udp.c +++ b/src/core/udp.c @@ -61,7 +61,7 @@ /* The list of UDP PCBs */ #if LWIP_UDP -/* was static, but we may want to access this from a socket layer */ +/* exported in udp.h (was static) */ struct udp_pcb *udp_pcbs = NULL; static struct udp_pcb *pcb_cache = NULL; diff --git a/src/include/lwip/udp.h b/src/include/lwip/udp.h index ede04745..346898e8 100644 --- a/src/include/lwip/udp.h +++ b/src/include/lwip/udp.h @@ -68,6 +68,8 @@ struct udp_pcb { struct ip_addr *addr, u16_t port); void *recv_arg; }; +/* udp_pcbs export for exernal reference (e.g. SNMP agent) */ +extern struct udp_pcb *udp_pcbs; /* The following functions is the application layer interface to the UDP code. */