#!/usr/bin/env awk
#
# Returns true if the protocol number is equal to 6 (TCP)
#
# Parameters:
#   - [p] : the protocol to test [default: $L4Proto]
#
# Dependencies:
#   - basicFlow
#
# See Also:
#   - proto
#
# Examples:
#   - tawk 'tcp()' file.txt
#   - tawk 'tcp() { print $SrcIP4 }' file.txt
#   - tawk 'tcp($L4Proto)' file.txt
#   - tawk 'tcp($L4Proto) { print $SrcIP4 }' file.txt

@include "proto"

function tcp(p) {
    if (p) return p == 6
    else return proto(6)
}
