mikroSDK Reference Manual
tcp_mib_module.h
Go to the documentation of this file.
1
31#ifndef _TCP_MIB_MODULE_H
32#define _TCP_MIB_MODULE_H
33
34//Dependencies
35#include "mibs/mib_common.h"
36
37//TCP MIB module support
38#ifndef TCP_MIB_SUPPORT
39 #define TCP_MIB_SUPPORT DISABLED
40#elif (TCP_MIB_SUPPORT != ENABLED && TCP_MIB_SUPPORT != DISABLED)
41 #error TCP_MIB_SUPPORT parameter is not valid
42#endif
43
44//Macro definitions
45#if (TCP_MIB_SUPPORT == ENABLED)
46 #define TCP_MIB_INC_COUNTER32(name, value) tcpMibBase.name += value
47 #define TCP_MIB_INC_COUNTER64(name, value) tcpMibBase.name += value
48#else
49 #define TCP_MIB_INC_COUNTER32(name, value)
50 #define TCP_MIB_INC_COUNTER64(name, value)
51#endif
52
53//C++ guard
54#ifdef __cplusplus
55extern "C" {
56#endif
57
58
63typedef enum
64{
65 TCP_MIB_RTO_ALGORITHM_OTHER = 1,
66 TCP_MIB_RTO_ALGORITHM_CONSTANT = 2,
67 TCP_MIB_RTO_ALGORITHM_RSRE = 3,
68 TCP_MIB_RTO_ALGORITHM_VANJ = 4
70
71
76typedef enum
77{
78 TCP_MIB_CONN_STATE_CLOSED = 1,
79 TCP_MIB_CONN_STATE_LISTEN = 2,
80 TCP_MIB_CONN_STATE_SYN_SENT = 3,
81 TCP_MIB_CONN_STATE_SYN_RECEIVED = 4,
82 TCP_MIB_CONN_STATE_ESTABLISHED = 5,
83 TCP_MIB_CONN_STATE_FIN_WAIT_1 = 6,
84 TCP_MIB_CONN_STATE_FIN_WAIT_2 = 7,
85 TCP_MIB_CONN_STATE_CLOSE_WAIT = 8,
86 TCP_MIB_CONN_STATE_LAST_ACK = 9,
87 TCP_MIB_CONN_STATE_CLOSING = 10,
88 TCP_MIB_CONN_STATE_TIME_WAIT = 11,
89 TCP_MIB_CONN_STATE_DELETE_TCB = 12
91
92
97typedef struct
98{
99 int32_t tcpRtoAlgorithm;
100 int32_t tcpRtoMin;
101 int32_t tcpRtoMax;
102 int32_t tcpMaxConn;
103 uint32_t tcpActiveOpens;
104 uint32_t tcpPassiveOpens;
105 uint32_t tcpAttemptFails;
106 uint32_t tcpEstabResets;
107 uint32_t tcpInSegs;
108 uint32_t tcpOutSegs;
109 uint32_t tcpRetransSegs;
110 uint32_t tcpInErrs;
111 uint32_t tcpOutRsts;
112 uint64_t tcpHCInSegs;
113 uint64_t tcpHCOutSegs;
114} TcpMibBase;
115
116
117//TCP MIB related constants
118extern TcpMibBase tcpMibBase;
119extern const MibObject tcpMibObjects[];
120extern const MibModule tcpMibModule;
121
122//C++ guard
123#ifdef __cplusplus
124}
125#endif
126
127#endif
Common definitions for MIB modules.
MIB module.
Definition mib_common.h:288
TCP MIB base.
Definition tcp_mib_module.h:98
TcpMibRtoAlgorithm
RTO calculation algorithm.
Definition tcp_mib_module.h:64
TcpMibConnState
TCP connection states.
Definition tcp_mib_module.h:77