1
2
3enum linux_mptcp_mib_field {
4 MPTCP_MIB_NUM = 0,
5 MPTCP_MIB_MPCAPABLEPASSIVE,
6 MPTCP_MIB_MPCAPABLEPASSIVEACK,
7 MPTCP_MIB_MPCAPABLEPASSIVEFALLBACK,
8 MPTCP_MIB_MPCAPABLEACTIVEFALLBACK,
9 MPTCP_MIB_RETRANSSEGS,
10 MPTCP_MIB_JOINNOTOKEN,
11 MPTCP_MIB_JOINSYNRX,
12 MPTCP_MIB_JOINSYNACKRX,
13 MPTCP_MIB_JOINSYNACKMAC,
14 MPTCP_MIB_JOINACKRX,
15 MPTCP_MIB_JOINACKMAC,
16 MPTCP_MIB_DSSNOMATCH,
17 MPTCP_MIB_INFINITEMAPRX,
18 MPTCP_MIB_OFOQUEUETAIL,
19 MPTCP_MIB_OFOQUEUE,
20 MPTCP_MIB_OFOMERGE,
21 MPTCP_MIB_NODSSWINDOW,
22 MPTCP_MIB_DUPDATA,
23 MPTCP_MIB_ADDADDR,
24 MPTCP_MIB_ECHOADD,
25 MPTCP_MIB_RMADDR,
26 MPTCP_MIB_RMSUBFLOW,
27 __MPTCP_MIB_MAX
28};
29
30#define LINUX_MIB_MPTCP_MAX __MPTCP_MIB_MAX
31struct mptcp_mib {
32 unsigned long mibs[LINUX_MIB_MPTCP_MAX];
33};
34
35static inline void MPTCP_INC_STATS(struct net *net,
36 enum linux_mptcp_mib_field field)
37{
38 if (likely(net->mib.mptcp_statistics))
39 SNMP_INC_STATS(net->mib.mptcp_statistics, field);
40}
41
42static inline void __MPTCP_INC_STATS(struct net *net,
43 enum linux_mptcp_mib_field field)
44{
45 if (likely(net->mib.mptcp_statistics))
46 __SNMP_INC_STATS(net->mib.mptcp_statistics, field);
47}
48
49bool mptcp_mib_alloc(struct net *net);
50