From d38db89626ec3d8ca25ff30fbcbe46ed877f32cf Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Thu, 12 Nov 2015 08:09:44 +0100 Subject: [PATCH] Export tcp_pcb_lists from tcp.c - can be used in SNMP code to implement MIB2 tcp connection tables --- src/core/tcp.c | 2 -- src/include/lwip/priv/tcp_priv.h | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/tcp.c b/src/core/tcp.c index e47bff07..eaef4977 100644 --- a/src/core/tcp.c +++ b/src/core/tcp.c @@ -109,8 +109,6 @@ struct tcp_pcb *tcp_active_pcbs; /** List of all TCP PCBs in TIME-WAIT state */ struct tcp_pcb *tcp_tw_pcbs; -#define NUM_TCP_PCB_LISTS 4 -#define NUM_TCP_PCB_LISTS_NO_TIME_WAIT 3 /** An array with all (non-temporary) PCB lists, mainly used for smaller code size */ struct tcp_pcb ** const tcp_pcb_lists[] = {&tcp_listen_pcbs.pcbs, &tcp_bound_pcbs, &tcp_active_pcbs, &tcp_tw_pcbs}; diff --git a/src/include/lwip/priv/tcp_priv.h b/src/include/lwip/priv/tcp_priv.h index af1a95cf..b7ea58b3 100644 --- a/src/include/lwip/priv/tcp_priv.h +++ b/src/include/lwip/priv/tcp_priv.h @@ -360,6 +360,9 @@ extern struct tcp_pcb *tcp_active_pcbs; /* List of all TCP PCBs that are in a data. */ extern struct tcp_pcb *tcp_tw_pcbs; /* List of all TCP PCBs in TIME-WAIT. */ +#define NUM_TCP_PCB_LISTS_NO_TIME_WAIT 3 +#define NUM_TCP_PCB_LISTS 4 +extern struct tcp_pcb ** const tcp_pcb_lists[NUM_TCP_PCB_LISTS]; /* Axioms about the above lists: 1) Every TCP PCB that is not CLOSED is in one of the lists.