MCPcopy Create free account
hub / github.com/apache/mesos / check

Function check

src/linux/routing/utils.cpp:25–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23namespace routing {
24
25Try<Nothing> check()
26{
27 // As advised in libnl, we use numeric values, instead of defined
28 // macros (which creates compile time dependency), to check
29 // capabilities.
30
31 // Check NL_CAPABILITY_ROUTE_LINK_VETH_GET_PEER_OWN_REFERENCE.
32 if (nl_has_capability(2) == 0) {
33 return Error(
34 "Capability ROUTE_LINK_VETH_GET_PEER_OWN_REFERENCE is not available");
35 }
36
37 // Check NL_CAPABILITY_ROUTE_LINK_CLS_ADD_ACT_OWN_REFERENCE.
38 if (nl_has_capability(3) == 0) {
39 return Error(
40 "Capability ROUTE_LINK_CLS_ADD_ACT_OWN_REFERENCE is not available");
41 }
42
43 // There is a bug in libnl3-idiag from duplicating a kernel header
44 // definition and running certain check logic based on it. The
45 // kernel header it copies is from 3.6. Older kernels have a
46 // different definition and therefore return error on certain calls.
47 // TODO(chzhcn): remove this once the bug in libnl3-idiag is fixed.
48 if (SK_MEMINFO_VARS == 7) {
49 return Error(
50 "libnl3-idiag module has a known bug on kernels older than 3.6");
51 }
52
53 return Nothing();
54}
55
56} // namespace routing {

Callers 15

findFieldMethod · 0.85
findStaticFieldMethod · 0.85
invokeMethod · 0.85
setField<jobject>Method · 0.85
setField<bool>Method · 0.85
setField<char>Method · 0.85
setField<short>Method · 0.85
setField<int>Method · 0.85
setField<long>Method · 0.85
setField<float>Method · 0.85
setField<double>Method · 0.85

Calls 2

NothingClass · 0.85
ErrorFunction · 0.50

Tested by 5

CreateSlaveFlagsMethod · 0.68
SetUpMethod · 0.68
TEST_FFunction · 0.68
SetUpTestCaseMethod · 0.68