tcp_mib_module.h
Go to the documentation of this file.
1 /**
2  * @file tcp_mib_module.h
3  * @brief TCP MIB module
4  *
5  * @section License
6  *
7  * Copyright (C) 2010-2018 Oryx Embedded SARL. All rights reserved.
8  *
9  * This file is part of CycloneTCP Open.
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software Foundation,
23  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24  *
25  * @author Oryx Embedded SARL (www.oryx-embedded.com)
26  * @version 1.9.0
27  **/
28 
29 #ifndef _TCP_MIB_MODULE_H
30 #define _TCP_MIB_MODULE_H
31 
32 //Dependencies
33 #include "mibs/mib_common.h"
34 
35 //TCP MIB module support
36 #ifndef TCP_MIB_SUPPORT
37  #define TCP_MIB_SUPPORT DISABLED
38 #elif (TCP_MIB_SUPPORT != ENABLED && TCP_MIB_SUPPORT != DISABLED)
39  #error TCP_MIB_SUPPORT parameter is not valid
40 #endif
41 
42 //Macro definitions
43 #if (TCP_MIB_SUPPORT == ENABLED)
44  #define TCP_MIB_INC_COUNTER32(name, value) tcpMibBase.name += value
45  #define TCP_MIB_INC_COUNTER64(name, value) tcpMibBase.name += value
46 #else
47  #define TCP_MIB_INC_COUNTER32(name, value)
48  #define TCP_MIB_INC_COUNTER64(name, value)
49 #endif
50 
51 //C++ guard
52 #ifdef __cplusplus
53  extern "C" {
54 #endif
55 
56 
57 /**
58  * @brief RTO calculation algorithm
59  **/
60 
61 typedef enum
62 {
68 
69 
70 /**
71  * @brief TCP connection states
72  **/
73 
74 typedef enum
75 {
89 
90 
91 /**
92  * @brief TCP MIB base
93  **/
94 
95 typedef struct
96 {
97  int32_t tcpRtoAlgorithm;
98  int32_t tcpRtoMin;
99  int32_t tcpRtoMax;
100  int32_t tcpMaxConn;
101  uint32_t tcpActiveOpens;
102  uint32_t tcpPassiveOpens;
103  uint32_t tcpAttemptFails;
104  uint32_t tcpEstabResets;
105  uint32_t tcpInSegs;
106  uint32_t tcpOutSegs;
107  uint32_t tcpRetransSegs;
108  uint32_t tcpInErrs;
109  uint32_t tcpOutRsts;
110  uint64_t tcpHCInSegs;
111  uint64_t tcpHCOutSegs;
112 } TcpMibBase;
113 
114 
115 //TCP MIB related constants
116 extern TcpMibBase tcpMibBase;
117 extern const MibObject tcpMibObjects[];
118 extern const MibModule tcpMibModule;
119 
120 //C++ guard
121 #ifdef __cplusplus
122  }
123 #endif
124 
125 #endif
uint32_t tcpRetransSegs
int32_t tcpRtoMin
const MibObject tcpMibObjects[]
TCP MIB objects.
#define MibObject
Definition: mib_common.h:44
uint64_t tcpHCInSegs
uint32_t tcpActiveOpens
uint32_t tcpInSegs
uint32_t tcpEstabResets
TcpMibBase tcpMibBase
TCP MIB base.
uint64_t tcpHCOutSegs
TcpMibConnState
TCP connection states.
uint32_t tcpOutSegs
TCP MIB base.
TcpMibRtoAlgorithm
RTO calculation algorithm.
int32_t tcpRtoMax
int32_t tcpRtoAlgorithm
uint32_t tcpOutRsts
const MibModule tcpMibModule
TCP MIB module.
int32_t tcpMaxConn
Common definitions for MIB modules.
uint32_t tcpInErrs
uint32_t tcpAttemptFails
MIB module.
Definition: mib_common.h:285
uint32_t tcpPassiveOpens