# Monitoring Ethernet link status events

The oammon utility displays Ethernet link status events. The OAM API also provides a way for applications to monitor board level events associated with CG board Ethernet interfaces. To monitor these events, the application must register with the OAM API, then use the Natural Access function ctaWaitEvent to retrieve the appropriate OAM events.

ctaWaitEvent returns event information that describes what event occurred on what context. The buffer field of the OAM API event provides a pointer to an OAM_MSG structure that provides the following information:

typedef struct oam_msg_tag
{
DWORD dwMsgLen; // Msg length, including appended name & msg strings
DWORD dwCode; // Msg event code (use OAMEVN_xxx)
DWORD dwSeverity; // Msg severity
DWORD dwOfsSzName; // Offset to name string of source managed object
DWORD dwOfsSzMessage; // Offset to text msg string
DWORD dwValue; // Possible additional event-specific data
// string data is appended here
} OAM_MSG;

When state transitions occur at the CG board's Ethernet interfaces (that is, when one of the Ethernet interfaces goes out of service or returns to service), the dwCode field in this structure contains an OAMEVN_ALERT message code, and the dwValue field returns one of the following values:

dwValue | Description
--- | ---
0x121B | The CG board's Ethernet link 1 has gone out of service.
0x121D | The CG board's Ethernet link 1 has returned to service.
0x121C | The CG board's Ethernet link 2 has gone out of service.
0x121E | The CG board's Ethernet link 2 has returned to service.

For information about processing OAM service events, refer to the Dialogic® NaturalAccess™ OAM API Developer's Manual.