MCPcopy Create free account
hub / github.com/apache/trafficserver / mptcp_supported

Function mptcp_supported

src/records/RecHttp.cc:99–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97} // end anonymous namespace
98
99bool
100mptcp_supported()
101{
102 int value = 0;
103#if defined(HAVE_STRUCT_MPTCP_INFO_SUBFLOWS) && defined(MPTCP_INFO) && MPTCP_INFO == 1
104 ats_scoped_fd fd(::open("/proc/sys/net/mptcp/enabled", O_RDONLY));
105 if (fd > 0) {
106 TextBuffer buffer(16);
107 buffer.slurp(fd.get());
108 value = atoi(buffer.bufPtr());
109 }
110#endif
111
112 return value != 0;
113}
114
115ts::IPAddrPair
116RecHttpLoadIp(char const *name)

Callers 1

processOptionsMethod · 0.85

Calls 3

slurpMethod · 0.80
bufPtrMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected