Skip to content
Tom Barbette edited this page May 7, 2020 · 3 revisions

ToDevice.u Element Documentation

NAME

ToDevice.u — Click element; sends packets to network device (user-level)

SYNOPSIS

ToDevice(DEVNAME [, keywords])

Batching: Batching natively supported
Ports: 1 input, at most 2 outputs
Processing: pull inputs, push outputs
Drivers: userlevel

DESCRIPTION

This manual page describes the user-level version of the ToDevice element. For the Linux kernel module element, read the ToDevice manual page.

Pulls packets and sends them out the named device using Berkeley Packet Filters (or Linux equivalent).

Keyword arguments are:

  • BURST — Integer. Maximum number of packets to pull per scheduling. Defaults to 1.
  • METHOD — Word. Defines the method ToDevice will use to write packets to the device. Linux targets generally support PCAP and LINUX; other targets support PCAP or, occasionally, other methods. Defaults to the method specified for a matching FromDevice, or the first supported method among PCAP, DEVBPF, LINUX and PCAPFD otherwise.
  • DEBUG — Boolean. If true, print out debug messages.

This element is only available at user level.

NOTES

Packets sent via ToDevice should already have a link-level header prepended. This means that ARP processing, for example, must already have been done.

The FromDevice element's OUTBOUND keyword argument determines whether FromDevice receives packets sent by a ToDevice element for the same device.

Packets that are written successfully are sent on output 0, if it exists. Packets that fail to be written are pushed out output 1, if it exists.

KernelTun lets you send IP packets to the host kernel's IP processing code, sort of like the kernel module's ToHost element.

SEE ALSO

FromDevice.u, FromDump, ToDump, KernelTun, ToDevice

Generated by click-elem2man from ../elements/userlevel/todevice.hh:11 on 2020/05/07.

Clone this wiki locally