## ------------------------------------------------------------------------
## PySilk - A python-based graphical user interface for SiLK
## ------------------------------------------------------------------------
## Copyright (C) 2006-2007 Carnegie Mellon University. All Rights Reserved.
## ------------------------------------------------------------------------
## Authors: Andrew Kompanek (ajk@cert.org)
## ------------------------------------------------------------------------
## GNU General Public License (GPL) Rights pursuant to Version 2, June 1991
## Government Purpose License Rights (GPLR) pursuant to DFARS 252.225-7013
## ------------------------------------------------------------------------
## See LICENSE file included in this distribution
## ------------------------------------------------------------------------

import wx
import os
import config
import logging

opts = {}

def init():
    global opts
    opts["RECVIEW_SHOW_NAMES"] = False
    opts["RECVIEW_SHOW_HOSTNAMES"] = True
    opts["RECVIEW_HIDE_COLUMNS"] = ["nhip"]
    opts["PROTOCOL_NAMES"] = DEFAULT_PROTOCOL_NAMES
    opts["DEFAULT_PORT_NAMES"] = DEFAULT_PORT_NAMES
    
def _save_options():
    global opts
    _xml_save_site_config("recordview", opts)
    
def _read_options():
    global opts
    try:
        opts = _xml_read_site_config("recordview")
        return opts
    except IOError:
        return  None
        DEFAULT_PROTOCOL_NAMES = {
    "1"  : "ICMP",
    "6"  : "TCP",
    "17" : "UDP"
}

DEFAULT_PORT_NAMES = {
    "80"   : "http (80)",
    "8080" : "http (8080)",
    "443"  : "https (443)",
    "25"   : "smtp (25)",
    "53"   : "dns (53)",
    "22"   : "ssh (22)"
}



