SORT_ASC = 0
SORT_DESC = 1
SORT_ORDER = ["ASC", "DESC"]
LIMITS = ["LIMIT 50", "LIMIT 100", "LIMIT 200", "LIMIT 300", ""]
LAST_GROUP_BY = ""

# general
COL_TIME    = 0
COL_NODE    = 1
COL_ACTION  = 2
COL_SRCPORT = 3
COL_SRCIP   = 4
COL_DSTIP   = 5
COL_DSTHOST = 6
COL_DSTPORT = 7
COL_PROTO   = 8
COL_UID     = 9
COL_PID     = 10
COL_PROCS   = 11
COL_CMDLINE = 12
COL_RULES   = 13
# total number of columns: cols + 1
GENERAL_COL_NUM = 14

# nodes
COL_N_STATUS = 2
COL_N_HOSTNAME = 3
COL_N_VERSION = 4
COL_N_UPTIME = 5
COL_N_RULES = 6
COL_N_CONNECTIONS = 7
COL_N_DROPPED = 8
COL_N_KERNEL = 9

# stats
COL_WHAT   = 0

# rules
COL_R_NODE = 1
COL_R_NAME = 2
COL_R_ENABLED = 3
COL_R_PRECEDENCE = 4
COL_R_ACTION = 5
COL_R_DURATION = 6
COL_R_DESCRIPTION = 7
COL_R_NOLOG = 8
COL_R_OP_TYPE = 9
COL_R_OP_OPERAND = 10
COL_R_OP_DATA = 11
COL_R_CREATED = 12

# alerts
COL_ALERT_TYPE = 2
COL_ALERT_BODY = 3
COL_ALERT_WHAT = 4
COL_ALERT_PRIO = 5

# procs
COL_PROC_PID = 11

# netstat
COL_NET_COMM = 0
COL_NET_PROC = 1
COL_NET_DST_IP = 5
COL_NET_DST_PORT = 6
COL_NET_UID = 8
COL_NET_PID = 9
COL_NET_FAMILY = 10
COL_NET_IFACE = 11
COL_NET_METADATA = 12

TAB_MAIN  = 0
TAB_NODES = 1
TAB_RULES = 2
TAB_HOSTS = 3
TAB_PROCS = 4
TAB_ADDRS = 5
TAB_PORTS = 6
TAB_USERS = 7
TAB_NETSTAT = 8
# these "specials" tables must be placed after the "real" tabs
TAB_FIREWALL = 9 # in rules tab
TAB_ALERTS = 10 # in rules tab

TAB_TOTAL = 11

# tree's top level items
NO_PARENT = -1

RULES_TREE_APPS  = 0
RULES_TREE_ALERTS = 1
RULES_TREE_NODES = 2
RULES_TREE_FIREWALL = 3

RULES_TREE_PERMANENT = 0
RULES_TREE_TEMPORARY = 1

RULES_COMBO_PERMANENT = 1
RULES_COMBO_TEMPORARY = 2
RULES_COMBO_ALERTS = 3
RULES_COMBO_FW = 4

RULES_TYPE_PERMANENT = 0
RULES_TYPE_TEMPORARY = 1

FILTER_TREE_APPS = 0
FILTER_TREE_NODES = 3

FILTER_TREE_FW_NODE = 0
FILTER_TREE_FW_TABLE = 1
FILTER_TREE_FW_CHAIN = 2

