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

Print Element Documentation

NAME

Print — Click element; prints packet contents

SYNOPSIS

Print([LABEL, MAXLENGTH, keywords])

Batching: Batching natively supported
Ports: 1 input, 1 output
Processing: agnostic

DESCRIPTION

Prints up to MAXLENGTH bytes of data from each packet, in hex, preceded by the LABEL text. Default MAXLENGTH is 24.

Keyword arguments are:

  • MAXLENGTH — Maximum number of content bytes to print. If negative, print entire packet. Default is 24.
  • CONTENTS — Determines whether the packet data is printed. May be `NONE' (do not print packet data), `HEX' (print packet data in hexadecimal), or `ASCII' (print packet data in plaintext). Default is `HEX'.
  • TIMESTAMP — Boolean. If true, prints each packet's timestamp in seconds since 1970. Default is false.
  • PRINTANNO — Boolean. If true, prints each packet's user annotation bytes. Default is false.
  • CPU — Boolean; available only in the Linux kernel module. If true, prints the current CPU ID for every packet. Default is false.
  • HEADROOM — Boolean. If true, prints each packet's headroom and tailroom, in the format "(h[headroom] t[tailroom])". Defaut is false.
  • ACTIVE — Boolean. If false, don't print messages. Default is true.

ELEMENT HANDLERS

  • active (read/write) — Returns or sets the ACTIVE parameter.

SEE ALSO

IPPrint

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

Clone this wiki locally