MCPcopy Create free account
hub / github.com/NetSys/bess / Init

Method Init

core/modules/replicate.cc:37–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35};
36
37CommandResponse Replicate::Init(const bess::pb::ReplicateArg &arg) {
38 CommandResponse err;
39
40 if (arg.gates_size() > kMaxGates) {
41 return CommandFailure(EINVAL, "no more than %d gates", kMaxGates);
42 }
43
44 for (int i = 0; i < arg.gates_size(); i++) {
45 int elem = arg.gates(i);
46 gates_[i] = elem;
47 }
48 ngates_ = arg.gates_size();
49
50 return CommandSuccess();
51}
52
53CommandResponse Replicate::CommandSetGates(
54 const bess::pb::ReplicateCommandSetGatesArg &arg) {

Callers

nothing calls this directly

Calls 2

CommandFailureFunction · 0.85
CommandSuccessFunction · 0.85

Tested by

no test coverage detected