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

Method Init

core/modules/generic_decap.cc:33–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31#include "generic_decap.h"
32
33CommandResponse GenericDecap::Init(const bess::pb::GenericDecapArg &arg) {
34 if (arg.bytes() == 0) {
35 return CommandSuccess();
36 }
37 decap_size_ = arg.bytes();
38 if (decap_size_ <= 0 || decap_size_ > 1024) {
39 return CommandFailure(EINVAL, "invalid decap size");
40 }
41 return CommandSuccess();
42}
43
44void GenericDecap::ProcessBatch(Context *ctx, bess::PacketBatch *batch) {
45 int cnt = batch->cnt();

Callers

nothing calls this directly

Calls 3

CommandSuccessFunction · 0.85
CommandFailureFunction · 0.85
bytesMethod · 0.80

Tested by

no test coverage detected