VxWorks API Reference : OS Libraries
wvNetLib - WindView for Networking Interface Library
wvNetEnable( ) - begin reporting network events to WindView
wvNetDisable( ) - end reporting of network events to WindView
wvNetLevelAdd( ) - enable network events with specific priority level
wvNetLevelRemove( ) - disable network events with specific priority level
wvNetEventEnable( ) - activate specific network events
wvNetEventDisable( ) - deactivate specific network events
wvNetAddressFilterSet( ) - specify an address filter for events
wvNetAddressFilterClear( ) - remove the address filter for events
wvNetPortFilterSet( ) - specify an address filter for events
wvNetPortFilterClear( ) - remove the port number filter for events
This library provides the user interface to the network-related events for the WindView system visualization tool. These events are divided into two WindView classes. The NET_CORE_EVENT class indicates events directly related to data transfer. All other events (such as memory allocation and API routines) use the NET_AUX_EVENT class. Within each class, events are assigned one of eight priority levels. The four highest priority levels (EMERGENCY, ALERT, CRITICAL, and ERROR) indicate the occurrence of errors and the remaining four (WARNING, NOTICE, INFO, and VERBOSE) provide progressively more detailed information about the internal processing in the network stack.
If WindView support is included, the wvNetStart( ) and wvNetStop( ) routines will enable and disable event reporting for the network stack. The start routine takes a single parameter specifying the minimum priority level for all network components. That setting may be modified with the wvNetLevelAdd( ) and wvNetLevelRemove( ) routines. Individual events may be included or removed with the wvNetEventEnable( ) and wvNetDisable( ) routines.
The wvNetAddressFilterSet( ) and wvNetPortFilterSet( ) routines provide further screening for some events.
WindView for Tornado User's Guide
wvNetEnable( ) - begin reporting network events to WindView
void wvNetEnable ( int priority /* minimum priority, or 0 for default of */ /* WV_NET_VERBOSE */ )
This routine activates WindView event reporting for network components, after disabling all events with a priority less than level. The default value (or a level of WV_NET_VERBOSE) will not disable any additional events. The available priority values are:
WV_NET_EMERGENCY (1)
WV_NET_ALERT (2)
WV_NET_CRITICAL (3)
WV_NET_ERROR (4)
WV_NET_WARNING (5)
WV_NET_NOTICE (6)
WV_NET_INFO (7)
WV_NET_VERBOSE (8)If an event is not explicitly disabled by the priority level, it uses the current event selection map and class settings. The initial values enable all events of both classes.
N/A
N/A
wvNetDisable( ) - end reporting of network events to WindView
void wvNetDisable (void)
This routine stops WindView event reporting for all network components.
N/A
N/A
wvNetLevelAdd( ) - enable network events with specific priority level
STATUS wvNetLevelAdd ( int priority /* priority level to enable */ )
This routine changes the event selection map to allow reporting of any events with priority equal to level. It will override current event selections for the given priority, but has no effect on settings for events with higher or lower priorities. The available priority values are:
WV_NET_EMERGENCY (1)
WV_NET_ALERT (2)
WV_NET_CRITICAL (3)
WV_NET_ERROR (4)
WV_NET_WARNING (5)
WV_NET_NOTICE (6)
WV_NET_INFO (7)
WV_NET_VERBOSE (8)Events are only reported based on the current WindView class setting. The initial (default) setting includes networking events from both classes.
OK, or ERROR for unknown event level.
N/A
wvNetLevelRemove( ) - disable network events with specific priority level
STATUS wvNetLevelRemove ( int priority /* priority level to disable */ )
This routine changes the event selection map to prevent reporting of any events with priority equal to level. It will override the current event selection for the given priority, but has no effect on settings for events with higher or lower priorities. The available priority values are:
WV_NET_EMERGENCY (1)
WV_NET_ALERT (2)
WV_NET_CRITICAL (3)
WV_NET_ERROR (4)
WV_NET_WARNING (5)
WV_NET_NOTICE (6)
WV_NET_INFO (7)
WV_NET_VERBOSE (8)Events are only reported based on the current WindView class setting. The initial (default) setting includes networking events from both classes.
OK, or ERROR for unknown event level.
N/A
wvNetEventEnable( ) - activate specific network events
STATUS wvNetEventEnable ( int priority, /* priority level of event */ int offset /* identifier within priority level */ )
This routine allows reporting of a single event within the priority equal to level. The activation is overridden if the setting for the entire priority level changes. The available priority values are:
WV_NET_EMERGENCY (1)
WV_NET_ALERT (2)
WV_NET_CRITICAL (3)
WV_NET_ERROR (4)
WV_NET_WARNING (5)
WV_NET_NOTICE (6)
WV_NET_INFO (7)
WV_NET_VERBOSE (8)Offset values for individual events are listed in the documentation.
OK, or ERROR for unknown event.
N/A
wvNetEventDisable( ) - deactivate specific network events
STATUS wvNetEventDisable ( int priority, /* priority level of event */ int offset /* identifier within priority level */ )
This routine prevents reporting of a single event within the priority equal to level. The activation is overridden if the setting for the entire priority level changes. The available priority values are:
WV_NET_EMERGENCY (1)
WV_NET_ALERT (2)
WV_NET_CRITICAL (3)
WV_NET_ERROR (4)
WV_NET_WARNING (5)
WV_NET_NOTICE (6)
WV_NET_INFO (7)
WV_NET_VERBOSE (8)Offset values for individual events are listed in the documentation.
OK, or ERROR for unknown event.
N/A
wvNetAddressFilterSet( ) - specify an address filter for events
STATUS wvNetAddressFilterSet ( char * pAddress, /* target address for event comparisons */ char * pMask, /* mask value applied to data fields */ int type, /* 0 for source, 1 for destination */ int direction /* 0 for input, 1 for output */ )
This routine activates an additional test that disables certain events that do not match the specified IP address. The pAddress parameter provides the test value in dotted-decimal format. The type parameter indicates whether that address is compared against the source or destination values, and the direction value identifies whether the type is interpreted from the perspective of incoming or outgoing traffic. The pMask parameter provides a network mask to support testing for a group of events.
OK if filter set, or ERROR otherwise.
N/A
wvNetAddressFilterClear( ) - remove the address filter for events
void wvNetAddressFilterClear ( int type, /* 0 for source, 1 for destination */ int direction /* 0 for input, 1 for output */ )
This routine removes any active address filter test indicated by the type and direction parameters used to enable it. Affected events will be reported unconditionally.
N/A
N/A
wvNetPortFilterSet( ) - specify an address filter for events
STATUS wvNetPortFilterSet ( int port, /* target port for event comparisons */ int type, /* 0 for source, 1 for destination */ int direction /* 0 for input, 1 for output */ )
This routine activates an additional filter, which disables certain events that do not match the specified port value. The port parameter provides the test value and the type parameter indicates whether that value is compared against the source or destination fields. The direction setting identifies whether the type is interpreted from the perspective of incoming or outgoing traffic.
OK if filter set, or ERROR otherwise.
N/A
wvNetPortFilterClear( ) - remove the port number filter for events
void wvNetPortFilterClear ( int type, /* 0 for source, 1 for destination */ int direction /* 0 for input, 1 for output */ )
This routine removes any active port filter test indicated by the type and direction parameters used to enable it. Affected events will be reported unconditionally.
N/A
N/A