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

FromUserDevice Element Documentation

NAME

FromUserDevice — Click element; Emit packets written to a character device.

SYNOPSIS

FromUserDevice(TO_USER_DEVICE, [])

Ports: no inputs, 1 output
Processing: pull
Drivers: linuxmodule

DESCRIPTION

Keyword arguments are:

  • TO_USER_DEVICE — ToUserDevice element. This is the ToUserDevice element that set up the actual character device. The element must be of 'TYPE packet,' as FromUserDevice does not support the streaming interfaces or encapsulations. If only the FromUserDevice functionality is desired, then just include "Idle -> my_tud :: ToUserDevice(...);" in the config.
  • CAPACITY — Unsigned integer. Sets the CAPACITY of the internal ring buffer that stores the packets. Defaults to 64.
  • HEADROOM — Unsigned integer. Sets the headroom on packets. Defaults to the default headroom.
  • TAILROOM — Unsigned integer. Sets the tailroom on packets. Defaults to 0.
  • MAX_PACKET_SIZE — Unsigned integer. Sets the maximum packet size in bytes that this element will accept. Calls to write/send with a larger size will return with errno EMSGSIZE. Defaults to 1536.

FromUserDevice makes no assumptions about the data being written into it. It is necessary to use MarkMACHeader/CheckIPHeader elements if header annotations should be set.

NOTES

SEE ALSO

ToUserDevice

Generated by click-elem2man from ../elements/linuxmodule/fromuserdevice.hh:13 on 2018/10/03.

Clone this wiki locally