Skip to content

Commit

Permalink
refs #17: Apply API changes to more elements.
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Sep 16, 2015
1 parent 591fe18 commit febc93f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions elements/standards/Classifier.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,14 @@ int Classifier::process(int input_port, Packet *pkt)
cur_condition = cur_condition->next;
}
if (is_match) {
return output_port;
output(output_port).push(pkt);
return 0;
}
output_port++;
}

return DROP;
pkt->kill();
return 0;
}

// vim: ts=8 sts=4 sw=4 et
1 change: 1 addition & 0 deletions elements/standards/None.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ int None::configure(comp_thread_context *ctx, std::vector<std::string> &args)

int None::process(int input_port, Packet *pkt)
{
output(0).push(pkt);
return 0;
}

Expand Down
3 changes: 2 additions & 1 deletion elements/standards/PacketSizeClassifier.hh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public:
int process(int input_port, Packet *pkt)
{
unsigned pkt_len = pkt->length();
return buckets[pkt_len >> 4];
output(buckets[pkt_len >> 4]).push(pkt);
return 0;
}

private:
Expand Down

0 comments on commit febc93f

Please sign in to comment.