| 42 | } |
| 43 | |
| 44 | void GenericDecap::ProcessBatch(Context *ctx, bess::PacketBatch *batch) { |
| 45 | int cnt = batch->cnt(); |
| 46 | |
| 47 | int decap_size = decap_size_; |
| 48 | |
| 49 | for (int i = 0; i < cnt; i++) { |
| 50 | batch->pkts()[i]->adj(decap_size); |
| 51 | } |
| 52 | |
| 53 | RunNextModule(ctx, batch); |
| 54 | } |
| 55 | |
| 56 | ADD_MODULE(GenericDecap, "generic_decap", |
| 57 | "remove specified bytes from the beginning of packets") |