1
2
3enum linux_mptcp_mib_field {
4 MPTCP_MIB_NUM = 0,
5 MPTCP_MIB_MPCAPABLEPASSIVE,
6 MPTCP_MIB_MPCAPABLEACTIVE,
7 MPTCP_MIB_MPCAPABLEACTIVEACK,
8 MPTCP_MIB_MPCAPABLEPASSIVEACK,
9 MPTCP_MIB_MPCAPABLEPASSIVEFALLBACK,
10 MPTCP_MIB_MPCAPABLEACTIVEFALLBACK,
11 MPTCP_MIB_TOKENFALLBACKINIT,
12 MPTCP_MIB_RETRANSSEGS,
13 MPTCP_MIB_JOINNOTOKEN,
14 MPTCP_MIB_JOINSYNRX,
15 MPTCP_MIB_JOINSYNACKRX,
16 MPTCP_MIB_JOINSYNACKMAC,
17 MPTCP_MIB_JOINACKRX,
18 MPTCP_MIB_JOINACKMAC,
19 MPTCP_MIB_DSSNOMATCH,
20 MPTCP_MIB_INFINITEMAPRX,
21 MPTCP_MIB_DSSTCPMISMATCH,
22 MPTCP_MIB_DATACSUMERR,
23 MPTCP_MIB_OFOQUEUETAIL,
24 MPTCP_MIB_OFOQUEUE,
25 MPTCP_MIB_OFOMERGE,
26 MPTCP_MIB_NODSSWINDOW,
27 MPTCP_MIB_DUPDATA,
28 MPTCP_MIB_ADDADDR,
29 MPTCP_MIB_ECHOADD,
30 MPTCP_MIB_PORTADD,
31 MPTCP_MIB_JOINPORTSYNRX,
32 MPTCP_MIB_JOINPORTSYNACKRX,
33 MPTCP_MIB_JOINPORTACKRX,
34 MPTCP_MIB_MISMATCHPORTSYNRX,
35 MPTCP_MIB_MISMATCHPORTACKRX,
36 MPTCP_MIB_RMADDR,
37 MPTCP_MIB_RMSUBFLOW,
38 MPTCP_MIB_MPPRIOTX,
39 MPTCP_MIB_MPPRIORX,
40 MPTCP_MIB_MPFAILTX,
41 MPTCP_MIB_MPFAILRX,
42 MPTCP_MIB_RCVPRUNED,
43 MPTCP_MIB_SUBFLOWSTALE,
44 MPTCP_MIB_SUBFLOWRECOVER,
45 __MPTCP_MIB_MAX
46};
47
48#define LINUX_MIB_MPTCP_MAX __MPTCP_MIB_MAX
49struct mptcp_mib {
50 unsigned long mibs[LINUX_MIB_MPTCP_MAX];
51};
52
53static inline void MPTCP_INC_STATS(struct net *net,
54 enum linux_mptcp_mib_field field)
55{
56 if (likely(net->mib.mptcp_statistics))
57 SNMP_INC_STATS(net->mib.mptcp_statistics, field);
58}
59
60static inline void __MPTCP_INC_STATS(struct net *net,
61 enum linux_mptcp_mib_field field)
62{
63 if (likely(net->mib.mptcp_statistics))
64 __SNMP_INC_STATS(net->mib.mptcp_statistics, field);
65}
66
67bool mptcp_mib_alloc(struct net *net);
68