Skip to content
Tom Barbette edited this page Oct 3, 2018 · 2 revisions

Switch Element Documentation

NAME

Switch — Click element; sends packet stream to settable output

SYNOPSIS

Switch([OUTPUT])

Batching: Batching natively supported
Ports: 1 input, any number of outputs
Processing: push

DESCRIPTION

Switch sends every incoming packet to one of its output ports -- specifically, OUTPUT. The default OUTPUT is zero; negative OUTPUT means to destroy input packets instead of forwarding them. You can change OUTPUT with a write handler. Switch has an unlimited number of outputs.

ELEMENT HANDLERS

  • switch (read/write) — Return or set the OUTPUT parameter.
  • CLICK_LLRPC_GET_SWITCH (llrpc) — Argument is a pointer to an integer, in which the Switch's K parameter is stored.
  • CLICK_LLRPC_SET_SWITCH (llrpc) — Argument is a pointer to an integer. Sets the K parameter to that integer.

SEE ALSO

StaticSwitch, PullSwitch, RoundRobinSwitch, StrideSwitch, HashSwitch, RandomSwitch

Generated by click-elem2man from ../elements/standard/switch.hh:6 on 2018/10/03.

Clone this wiki locally