1 silk -- SiLK record and file support

Availability: Unix.

The silk module supplies objects for interfacing with SiLK records and data files.

The silk module exports the following functions:

init_site( filename)
Uses the given filename as the site file. If filename is omitted, the value of $SILK_CONFIG_FILE will be used as the name of the configuration file. If $SILK_CONFIG_FILE is not set, the module looks for a file named silk.conf in the following directories: the directory specified in the $SILK_DATA_ROOTDIR environment variable; the data root directory that is compliled into SiLK; the directories $SILK_PATH/share/silk/, and $SILK_PATH/share/.

This function should not generally be called explicitly unless one wishes to use a non-default site configuration file.

The init_site function can only be called once. Subsequent invocations will throw a RuntimeError.

Several functions and use of class members in PySilk implicitly call init_site if it has not already been called. These include sensors, classtypes, classes, have_site_config, the RWRec.as_dict method, and using the RWRec attributes classname, typename, classtype, or sensor.

sensors( )
Returns a tuple of valid sensor names. Implicitly calls init_site with no argument if it has not yet been called.

classtypes( )
Returns a tuple of valid (class name, type name) tuples. Implicitly calls init_site with no argument if it has not yet been called.

classes( )
Returns a tuple of valid class names. Implicitly calls init_site with no argument if it has not yet been called.

ipv6_enabled( )
Return True if SiLK was compiled with IPv6 support, False otherwise.

initial_tcpflags_enabled( )
Return True if SiLK was compiled with support for initial TCP flags, False otherwise.

have_site_config( )
Returns True if the module was able to locate the SiLK configuration file, False otherwise. Implicitly calls init_site with no argument if it has not yet been called.



Subsections