#!/usr/bin/env bash
#
# Configuration file for nFrstPkts
# ================================
#
# Usage
# -----
#
# $ ./t2plconf
#
# Defining the configurations options
# -----------------------------------
#
# If no configuration options are available, ITEMS must be set as follows:
#   - ITEMS=(none)
#
# Otherwise, enter configurations items as follows:
#   "NAME" "TYPE" "DEPENDENCIES" "DESCRIPTION"
#
#   - TYPE can be:
#       - bitfield
#       - check (boolean),
#       - radio (set of values),
#       - range (min <= val <= max)
#       - text
#
#   - DEPENDENCIES MUST be numeric, e.g., "A == 1 && (B < 4 || C >= 1)"
#
#   - DESCRIPTION for type 'bitfield' MUST NOT contain '\t', ':' or ';'
#   - DESCRIPTION for type 'check' MUST NOT contain tabs ('\t')
#   - DESCRIPTION for type 'radio' MUST NOT contain '\t', ':' or ';'
#   - DESCRIPTION for type 'range' MUST NOT contain '\t' or ':'
#   - DESCRIPTION for type 'text'  MUST NOT contain '\t'
#
#   - DESCRIPTION MUST be formatted according to the type (see examples below):
#       - bitfield : description ';' val1 ':' description1 ';' valN ':' descriptionN
#       - check    : description
#       - radio    : description ';' val1 ':' description1 ';' valN ':' descriptionN
#       - range    : description ':' min ' ' max
#       - text     : description
#
# Examples
# --------
#
#ITEMS=(
#    # An item can be specified in one line...
#    T2PSKEL_VAR1 check "" "Description of option" # No dependencies
#
#    # Or span multiple lines
#    T2PSKEL_VAR1 radio "T2PSKEL_VAR1 == 1"
#           "Description of option; \
#                   0: description of val 0; \
#                   1: description of val 1; \
#                   2: description of val 2"
#
#    T2PSKEL_SIZE range "T2PSKEL_VAR1 == 1 || T2PSKEL_VAR2 > 0"
#           "Description: 0 255" # min=0, max=255
#
#    T2PSKEL_STR text
#           "T2PSKEL_SIZE <= 5 && (T2PSKEL_VAR1 != 0 || T2PSKEL_VAR2 <= 1)"
#           "Description"
#
#    T2PSKEL_BITFIELD bitfield ""
#           "Description of option; \
#                   0x01: description of bit 0; \
#                   0x02: description of bit 1; \
#                   0x04: description of bit 2; \
#                   0x08: description of bit 3; \
#                   0x10: description of bit 4; \
#                   0x20: description of bit 5; \
#                   0x40: description of bit 6; \
#                   0x80: description of bit 7"
#)
#
# If no configuration option is available, use the value 'none'
#ITEMS=(none)
#
# Source the master t2plconf file
# source ../../scripts/t2conf/t2plconf

ITEMS=(
    NFRST_IAT radio "" "; \
        0: Time relative to flow start; \
        1: Inter-arrival time; \
        2: Absolute time"

    NFRST_BCORR radio "" "; \
        0: A,B start at 0.0; \
        1: B shift by flow start (require NFRST_IAT == 0)"

    NFRST_MINIATS    range "" "Minimal IAT sec to define a pulse: 0 255"
    NFRST_MINIATU    range "" "Minimal IAT usec to define a pulse: 0 255"
    NFRST_MINPLENFRC range "" "Minimal pulse length fraction: 0 255"

    NFRST_PLAVE radio "" "; \
        0: Sum(PL) (BPP) (require (NFRST_MINIATS|NFRST_MINIATU) > 0); \
        1: Packet Length Average"

    NFRST_PKTCNT  range "" "Define how many first packets are recorded: 0 255"
    NFRST_HDRINFO check "" "Add L3 and L4 header length"

    NFRST_XCLD radio "" "; \
        0: include all; \
        1: include [NFRST_XMIN,NFRST_XMAX]"

    NFRST_XMIN range "NFRST_XCLD == 1" "Min PL boundary: 0 65535"
    NFRST_XMAX range "NFRST_XCLD == 1" "Max PL boundary: 0 65535"
)

# Source the master t2plconf file
source "$(dirname "$0")/../../scripts/t2conf/t2plconf"
