DAGBITS(1)

NAME
dagbits - view and test ERF records captured using Endace DAG cards

SYNOPSIS
dagbits [options] [tests]

DESCRIPTION
dagbits is a program used to view and test ERF records. Data may be received directly from the DAG interface (using the -d option), or an ERF stream may be piped directly to standard input.

dagbits takes several options that serve as parameters to particular tests. Available tests include monotonic time-stamp increment and frame checksum (FCS, aka CRC) validation.

OPTIONS:

-?,--usage

-h,--help
    Display help

-0,--stripcrc
    CRC has been stripped (DAG 4.2)

-1,--crc16
    PoS CRC16 for FCS test

-3,--crc32
    PoS CRC32 for FCS test

-a,--atmformat
    Sets legacy format to ATM (default)

-A,--align <n>
    Check whether the ERF record lengths are multiples of n-bits. To be used with align test

-b,--bigendian
    Treat Timestamps as big-endian

-c,--count
    Count records processed, progress indicator

-C,--crcfactor <n>
    CRC correction factor for btx test, 0, 16 or 32 bits

-d,--device <device>
    DAG device to be used. Supported syntax includes 0, dag1, and /dev/dag3 to refer to DAG cards, and 0:2, dag1:1, and /dev/dag2:0 to refer to specific streams on cards.

-D,--delay <n>
    Delay processing by an extra n nanoseconds on each record

-e,--ethformat
    Sets legacy format to Ethernet

-E,--haltmax <n>
    Halt operation after a maximum of n errors

-f,--fname <fname>
    Filename to read from

-g,--global
    Global, causes mono to test for globally increasing rather than per-port timestamps

-H,--steer <n>
    Steering control number for steering test, DAG 4.3 and DAG 4.3GE: 0: stream0 force 1: test parity 2: test CRC 3: iface

-i,--api <api>
    Use <api> for live DAG API capture: 0: DAG 2.4 legacy API [dag_offset()] 1: DAG 2.5 API [dag_advance_stream()] 2: DAG 2.5 API [dag_rx_stream_next_record()]

-I,--ipf
    Prints the colour information

-j,--jthresh <t>
    Jitter threshold

-l,--maal <m>
    Check for the specified MAAL error code

-L,--idle_int <n>
    For test idle, interval to detect data is n

-m,--prnmaxerr <n>
    Only print the first n errored records; continue testing records but only count the errors

-n,--numpkts <n>
    Expected number of packets to receive (return code is nonzero if actual number of packets differs)

-p,--posformat
    Sets legacy format to PoS

-P,--params <params>
    DAG 3.5S capture parameters

-q,--quiet
    Quiet - suppresses summary info at end, but not warnings

-r,--reclen <n>
    Record length in bytes for legacy format records

-R,--rlen <n>
    For test rlen, expect rlen to be n

-s,--strict
    Strict, causes mono to test for strictly increasing rather than monotonic timestamps

-S,--stop <n>
    Stop after n seconds (only for live DAG API capture)

-t,--haltany <n>
    Halt operation if any record does not match ERF type n

-T,--pause_timing <x:y:z>
    Pause stream for testing purposes where x is the delay to start y is the period of pause repetition and z is the length of the pause

-u,--count_pad
    Count pad records and strictly check -t option

-U,--maxrec <n>
    Maximum number of records to process in one pass (only for live DAG API capture)

-v,--verbose
    Increase verbosity

-V,--version
    Print version information

-w,--warnings
    Treat warnings as errors

-W,--wlen <n>
    For test wlen, expect wlen to be n

-X,--wait <n>
    Wait before first packet capture from the stream extra n microseconds

-y,--delay_test <n>
    Start testing after n records have been received

-z,--idlestop
    Stop when no traffic is received for one second

--delta-min <sec.ms.us.ns>
    Delta test minmum timestamp difference, any timestamp difference smaller than the value will be reported as a failure

--delta-max <sec.ms.us.ns>
    Delta test maximum timestamp difference, any timestamp difference larger than the value will be reported as a failure

--erase_pad
    Erase padding bytes from print function

--hlb-range <min-max>
    Steer hlb range test range, for example: 15.0-50.0

--no_pad
    Turn off pad record flushing

--nni
    Set ATM network interface to NNI (default UNI)

--plugin <testname:"-p1 -p2 ... -pn">
    Plug-in test to be loaded, including test parameters (p1, p2, etc)

--rxstreams <n>
    Number of streams in capture file (for steer -H2)

--stream <n>
    Stream number file was captured from (for steer -H2)

--tcp_ip_counter
    Print TCP Flow and IP Address Counter erf records

TESTS

  The following tests are available:

print
    Print rec timestamp, CRC, ATM header and payload

decode
    Decode and print IP, TCP, UDP and ICMP headers

delta
    Print timestamp differences, if used with --delta-min --delta-max, this will test timestamp differences with the provided min/max value

mono
    Check for monotonically increasing timestamps

ipsum
    Verify IP checksum

rawsend
    Extended IP test for rawsend source

jitter
    Check if timestamp difference variation between consecutive rec pairs is smaller than t/2^32 sec

ccell
    Check that consecutive cells are identical (ATM only)

ciph
    Check that consecutive IP headers are identical

cpacket
    Check that consecutive IP headers and payloads are identical

cpacket2
    Check that consecutive IP headers and payloads are identical with variable wlen

ipid
    Check that the IP-Id field increments

btx Test for btx sources, checks lengths, seq and loss

lfsr
    Tests artificial data stream for ATM

fcs Test Frame Check Sum on each ERF frame

lctr
    Check and accumulate in-band packet loss indications (not considered an error -- will return 0)

flags
    Check and accumulate in-band packet error indications (these are considered to be errors and return 1)

offset
    Check that offset from API is record aligned (only for live DAG API capture)

wlen
    Check that the wlen in the record is a given value (-W)

rlen
    Check that the rlen in the record is a given value (-R)

dge Test for 4.2ge card against specific traffic format

time
    Check that each record timestamp is within 60s of the host time

idle
    Check that the record arrival rate (per second) is never 0

aal5
    Check aal5 reassembly using cell and frame ordering fields

bopt
    Perform BOPT-specific tests

type
    Check the ERF records are of a known type

align64
    Check the ERF record lengths are multiples of 64-bits

modts
    Modify timestamps timing test

steer
    Check to make sure packets have been sent to the correct memory hole

incr_data
    Check that the payload has incrementing byte values

static_data
    Check that the payload has static byte value

tsvari
    Test the variance between timestamps in multichannel atm streams

sequence
    Test the sequence numbers between ERF records in oc48 and oc192 raw traffic

EXAMPLES
Test traffic on dag0 for 60 seconds running the lctr, flags and fcs tests:
    dagbits -vvc -d dag0 -s 60 lctr flags fcs

To read a trace log file using dagbits:
    dagbits -vvc print < logname.log | less

 ...and to check for errors in the trace:
    dagbits -vvc ltcr flags fcs < logname.log

If dagbits reaches the end of the traffic and prints its report then the ERF records were valid.

SEE ALSO
dagaal5(1), dag_advance_stream(3), daggen(1), dag_offset(3), dag_rx_stream_next_record(3).

BUGS
Report bugs to <support@endace.com>.

LAST UPDATED
$Author: nuwan.gunasekara $
$Revision: 13731 $
$Date: 2011-01-14 17:12:17 +1300 (Fri, 14 Jan 2011) $

COPYRIGHT
(c) 2004-2009 Endace Technology, Hamilton, New Zealand. All Rights Reserved.