| 31 | #include "generic_decap.h" |
| 32 | |
| 33 | CommandResponse 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 | |
| 44 | void GenericDecap::ProcessBatch(Context *ctx, bess::PacketBatch *batch) { |
| 45 | int cnt = batch->cnt(); |
nothing calls this directly
no test coverage detected