| 35 | #include "../pb/module_msg.pb.h" |
| 36 | |
| 37 | class Source final : public Module { |
| 38 | public: |
| 39 | static const gate_idx_t kNumIGates = 0; |
| 40 | |
| 41 | static const Commands cmds; |
| 42 | |
| 43 | Source() : Module(), pkt_size_(), burst_() { is_task_ = true; } |
| 44 | |
| 45 | CommandResponse Init(const bess::pb::SourceArg &arg); |
| 46 | |
| 47 | struct task_result RunTask(Context *ctx, bess::PacketBatch *batch, |
| 48 | void *arg) override; |
| 49 | |
| 50 | CommandResponse CommandSetBurst( |
| 51 | const bess::pb::SourceCommandSetBurstArg &arg); |
| 52 | CommandResponse CommandSetPktSize( |
| 53 | const bess::pb::SourceCommandSetPktSizeArg &arg); |
| 54 | |
| 55 | private: |
| 56 | int pkt_size_; |
| 57 | int burst_; |
| 58 | }; |
| 59 | |
| 60 | #endif // BESS_MODULES_FLOWGEN_H_ |
no outgoing calls