|
Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.4.4.5
|
Data Structures | |
| struct | openapiTrapLogEntry_t |
Macros | |
| #define | OPENAPI_LOG_ENTRY_BUF_SIZE (OPENAPI_LOG_FORMAT_BUF_SIZE + 80) |
| #define | OPENAPI_LOG_FORMAT_BUF_SIZE 512 |
| #define | OPENAPI_TRAP_ENTRY_SIZE (300) |
| #define | OPENAPI_TRAP_LOG_BUF_SIZE (256 * sizeof(openapiTrapLogEntry_t)) |
Enumerations | |
| enum | OPEN_LOG_SEVERITY_t { OPEN_LOG_SEVERITY_UNDEFINED = -1, OPEN_LOG_SEVERITY_EMERGENCY = 0, OPEN_LOG_SEVERITY_ALERT = 1, OPEN_LOG_SEVERITY_CRITICAL = 2, OPEN_LOG_SEVERITY_ERROR = 3, OPEN_LOG_SEVERITY_WARNING = 4, OPEN_LOG_SEVERITY_NOTICE = 5, OPEN_LOG_SEVERITY_INFO = 6, OPEN_LOG_SEVERITY_DEBUG = 7 } |
| OpEN uses this enumeration to define Logging Severity Levels. More... | |
Functions | |
| open_error_t | openapiBufferedLogClear (openapiClientHandle_t *client_handle) |
| Clear the content of the buffered messages log. | |
| open_error_t | openapiBufferedLogEntryNextGet (openapiClientHandle_t *client_handle, uint32_t *logIndex, open_buffdesc *logEntry) |
| Get the next entry in the in-memory (buffered) message log. | |
| open_error_t | openapiCliCmdLoggingModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *cmdLoggingMode) |
| Get CLI command logging mode. | |
| open_error_t | openapiCliCmdLoggingModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t cmdLoggingMode) |
| Enable or disable CLI command logging. | |
| open_error_t | openapiConsoleLoggingModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *loggingConsoleMode) |
| Get Console Logging mode. | |
| open_error_t | openapiConsoleLoggingModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t loggingConsoleMode) |
| Set Console Logging mode. | |
| open_error_t | openapiConsoleLoggingSeverityGet (openapiClientHandle_t *client_handle, OPEN_LOG_SEVERITY_t *severityLevel) |
| Get Console Logging severity level. | |
| open_error_t | openapiConsoleLoggingSeveritySet (openapiClientHandle_t *client_handle, OPEN_LOG_SEVERITY_t severityLevel) |
| Set Console Logging severity level. | |
| open_error_t | openapiLoggingHostAdd (openapiClientHandle_t *client_handle, open_buffdesc *loggingHost) |
| Add a logging host. | |
| open_error_t | openapiLoggingHostIpAddrNextGet (openapiClientHandle_t *client_handle, open_buffdesc *loggingHost) |
| Get logging host IP address. | |
| open_error_t | openapiLoggingHostMaxAddrLenGet (openapiClientHandle_t *client_handle, uint32_t *logHostMaxAddrLen) |
| Get the maximum length of logging host address. | |
| open_error_t | openapiLoggingHostPortGet (openapiClientHandle_t *client_handle, open_buffdesc *loggingHost, uint16_t *port) |
| Get logging host port. | |
| open_error_t | openapiLoggingHostPortSet (openapiClientHandle_t *client_handle, open_buffdesc *loggingHost, uint32_t port) |
| Set port number to the logging host. | |
| open_error_t | openapiLoggingHostRemove (openapiClientHandle_t *client_handle, open_buffdesc *loggingHost) |
| Remove a logging host entry. | |
| open_error_t | openapiLoggingHostSeverityGet (openapiClientHandle_t *client_handle, open_buffdesc *loggingHost, OPEN_LOG_SEVERITY_t *severityLevel) |
| Get logging host severity level. | |
| open_error_t | openapiLoggingHostSeveritySet (openapiClientHandle_t *client_handle, open_buffdesc *loggingHost, OPEN_LOG_SEVERITY_t severityLevel) |
| Set severity level to the logging host. | |
| open_error_t | openapiMaxLoggingHostsSupportedGet (openapiClientHandle_t *client_handle, uint32_t *maxLoggingHosts) |
| Get the maximum logging hosts supported. | |
| open_error_t | openapiPersistentLoggingModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *loggingPersistentMode) |
| Get the persistent logging mode. | |
| open_error_t | openapiPersistentLoggingModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t persistentLoggingMode) |
| Set the persistent logging mode. | |
| open_error_t | openapiPersistentLoggingSeverityLevelGet (openapiClientHandle_t *client_handle, OPEN_LOG_SEVERITY_t *severityLevel) |
| Get the persistent logging severity level. | |
| open_error_t | openapiPersistentLoggingSeverityLevelSet (openapiClientHandle_t *client_handle, OPEN_LOG_SEVERITY_t severityLevel) |
| Set persistent logging severity level. | |
| open_error_t | openapiSysLogModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *sysLogMode) |
| Get syslog mode. | |
| open_error_t | openapiSysLogModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t sysLogMode) |
| Set the syslog mode. | |
| open_error_t | openapiSysLogPortGet (openapiClientHandle_t *client_handle, uint16_t *port) |
| Get syslog port. | |
| open_error_t | openapiSysLogPortSet (openapiClientHandle_t *client_handle, uint32_t port) |
| Set syslog port. | |
| open_error_t | openapiSysLogWrite (openapiClientHandle_t *client_handle, open_buffdesc *logMessage, OPEN_LOG_SEVERITY_t severityLevel) |
| Write system log. | |
| open_error_t | openapiTrapLogClear (openapiClientHandle_t *client_handle) |
| Clear the content of the trap log. | |
| open_error_t | openapiTrapLogGet (openapiClientHandle_t *client_handle, open_buffdesc *trapLogData, uint32_t *numberOfEntries) |
| Retrieve the content of the trap log. | |
| enum OPEN_LOG_SEVERITY_t |
OpEN uses this enumeration to define Logging Severity Levels.
Definition at line 44 of file openapi_logging.h.
| open_error_t openapiBufferedLogClear | ( | openapiClientHandle_t * | client_handle | ) |
Clear the content of the buffered messages log.
| [in] | client_handle | Client handle from registration API |
| OPEN_E_NONE | if operation is successful |
| OPEN_E_PARAM | if invalid parameter is passed |
| OPEN_E_FAIL | if operation failed |
OpEN API Version: 1.14
| open_error_t openapiBufferedLogEntryNextGet | ( | openapiClientHandle_t * | client_handle, |
| uint32_t * | logIndex, | ||
| open_buffdesc * | logEntry | ||
| ) |
Get the next entry in the in-memory (buffered) message log.
Allows for iterating over the content of the message log.
| [in] | client_handle | Client handle from registration API |
| [in,out] | logIndex | Index to last retrieved entry. Set to 0 to retrieve first (oldest) log entry. |
| [out] | logEntry | Buffer to hold log message. Size must be OPENAPI_LOG_ENTRY_BUF_SIZE. |
| OPEN_E_NONE | if operation is successful |
| OPEN_E_PARAM | if invalid parameter is passed |
| OPEN_E_NOT_FOUND | if no more log entries are found |
| OPEN_E_FAIL | if failure retrieving next log message |
OpEN API Version: 1.14
| open_error_t openapiCliCmdLoggingModeGet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_CONTROL_t * | cmdLoggingMode | ||
| ) |
Get CLI command logging mode.
| [in] | client_handle | Client handle from registration API |
| [out] | cmdLoggingMode | CLI command logging mode |
| OPEN_E_NONE | if CLI command logging mode is returned successfully. |
| OPEN_E_FAIL | if invalid mode is returned. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiCliCmdLoggingModeSet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_CONTROL_t | cmdLoggingMode | ||
| ) |
Enable or disable CLI command logging.
| [in] | client_handle | Client handle from registration API |
| [in] | cmdLoggingMode | CLI command logging mode |
| OPEN_E_NONE | if CLI command logging mode is set successfully. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiConsoleLoggingModeGet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_CONTROL_t * | loggingConsoleMode | ||
| ) |
Get Console Logging mode.
| [in] | client_handle | Client handle from registration API |
| [out] | loggingConsoleMode | Console Logging mode |
| OPEN_E_NONE | if logging console mode is returned successfully. |
| OPEN_E_FAIL | if failed to get logging console mode. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiConsoleLoggingModeSet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_CONTROL_t | loggingConsoleMode | ||
| ) |
Set Console Logging mode.
| [in] | client_handle | Client handle from registration API |
| [in] | loggingConsoleMode | Console Logging mode |
| OPEN_E_NONE | if logging console mode is set successfully. |
| OPEN_E_EXISTS | if the same mode is already configured. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiConsoleLoggingSeverityGet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_LOG_SEVERITY_t * | severityLevel | ||
| ) |
Get Console Logging severity level.
| [in] | client_handle | Client handle from registration API |
| [out] | severityLevel | Console Logging severity level |
| OPEN_E_NONE | if logging console severity level is returned. |
| OPEN_E_FAIL | if failed to get logging console severity level. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiConsoleLoggingSeveritySet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_LOG_SEVERITY_t | severityLevel | ||
| ) |
Set Console Logging severity level.
| [in] | client_handle | Client handle from registration API |
| [in] | severityLevel | Console Logging severity level |
| OPEN_E_NONE | if logging console severity level is set successfully. |
| OPEN_E_FAIL | if failed to set logging console severity level. |
| OPEN_E_INTERNAL | if internal error. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiLoggingHostAdd | ( | openapiClientHandle_t * | client_handle, |
| open_buffdesc * | loggingHost | ||
| ) |
Add a logging host.
| [in] | client_handle | Client handle from registration API |
| [in] | loggingHost | DNS Name/IP address of Logging host |
| OPEN_E_NONE | if logging host is added. |
| OPEN_E_EXISTS | if host already exists. |
| OPEN_E_FULL | if host table is full. |
| OPEN_E_PARAM | if invalid parameter is passed. |
| OPEN_E_INTERNAL | if internal error has occurred. |
OpEN API Version: 1.1
| open_error_t openapiLoggingHostIpAddrNextGet | ( | openapiClientHandle_t * | client_handle, |
| open_buffdesc * | loggingHost | ||
| ) |
Get logging host IP address.
| [in] | client_handle | Client handle from registration API |
| [in,out] | loggingHost | DNS Name/IP address of Logging host |
| OPEN_E_NONE | if logging host IP address is returned. |
| OPEN_E_FAIL | if failed to get logging host IP address. |
| OPEN_E_NOT_FOUND | if no more entries exist. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiLoggingHostMaxAddrLenGet | ( | openapiClientHandle_t * | client_handle, |
| uint32_t * | logHostMaxAddrLen | ||
| ) |
Get the maximum length of logging host address.
| [in] | client_handle | Client handle from registration API |
| [out] | logHostMaxAddrLen | Maximum length of logging host address |
| OPEN_E_NONE | if maximum length of logging host address is returned. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiLoggingHostPortGet | ( | openapiClientHandle_t * | client_handle, |
| open_buffdesc * | loggingHost, | ||
| uint16_t * | port | ||
| ) |
Get logging host port.
| [in] | client_handle | Client handle from registration API |
| [in] | loggingHost | DNS Name/IP address of Logging host |
| [out] | port | Logging host port |
| OPEN_E_NONE | if logging host port is returned. |
| OPEN_E_NOT_FOUND | if the logging host does not exist. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiLoggingHostPortSet | ( | openapiClientHandle_t * | client_handle, |
| open_buffdesc * | loggingHost, | ||
| uint32_t | port | ||
| ) |
Set port number to the logging host.
| [in] | client_handle | Client handle from registration API |
| [in] | loggingHost | DNS Name/IP address of Logging host |
| [in] | port | Logging host port ID |
| - | Minimum value OPENAPI_TCP_UDP_MIN_PORT | |
| - | Maximum value OPENAPI_TCP_UDP_MAX_PORT |
| OPEN_E_NONE | if port number is set to the logging host. |
| OPEN_E_FAIL | if failed to set port to the logging host. |
| OPEN_E_NOT_FOUND | if logging host does not exist. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiLoggingHostRemove | ( | openapiClientHandle_t * | client_handle, |
| open_buffdesc * | loggingHost | ||
| ) |
Remove a logging host entry.
| [in] | client_handle | Client handle from registration API |
| [in] | loggingHost | DNS Name/IP address of Logging host |
| OPEN_E_NONE | if logging host entry is removed. |
| OPEN_E_FAIL | if unable to remove the host entry. |
| OPEN_E_NOT_FOUND | if host name does not exist. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiLoggingHostSeverityGet | ( | openapiClientHandle_t * | client_handle, |
| open_buffdesc * | loggingHost, | ||
| OPEN_LOG_SEVERITY_t * | severityLevel | ||
| ) |
Get logging host severity level.
| [in] | client_handle | Client handle from registration API |
| [in] | loggingHost | DNS Name/IP address of Logging host |
| [out] | severityLevel | Logging host severity |
| OPEN_E_NONE | if logging host priority is returned. |
| OPEN_E_NOT_FOUND | if the logging host does not exist. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiLoggingHostSeveritySet | ( | openapiClientHandle_t * | client_handle, |
| open_buffdesc * | loggingHost, | ||
| OPEN_LOG_SEVERITY_t | severityLevel | ||
| ) |
Set severity level to the logging host.
| [in] | client_handle | Client handle from registration API |
| [in] | loggingHost | DNS Name/IP address of Logging host |
| [in] | severityLevel | Severity Level |
| OPEN_E_NONE | if severity level is set to the logging host. |
| OPEN_E_FAIL | if failed to set severity level to the logging host. |
| OPEN_E_NOT_FOUND | if logging host does not exist. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiMaxLoggingHostsSupportedGet | ( | openapiClientHandle_t * | client_handle, |
| uint32_t * | maxLoggingHosts | ||
| ) |
Get the maximum logging hosts supported.
| [in] | client_handle | Client handle from registration API |
| [out] | maxLoggingHosts | Maximum logging hosts supported |
| OPEN_E_NONE | if maximum logging hosts are returned. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiPersistentLoggingModeGet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_CONTROL_t * | loggingPersistentMode | ||
| ) |
Get the persistent logging mode.
| [in] | client_handle | Client handle from registration API |
| [out] | loggingPersistentMode | Persistent Logging admin mode |
| OPEN_E_NONE | if persistent logging admin mode is returned. |
| OPEN_E_FAIL | if failed to get persistent logging mode. |
| OPEN_E_PARAM | if invalid parameter is passed. |
| OPEN_E_UNAVAIL | if feature is not supported. |
OpEN API Version: 1.1
| open_error_t openapiPersistentLoggingModeSet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_CONTROL_t | persistentLoggingMode | ||
| ) |
Set the persistent logging mode.
| [in] | client_handle | Client handle from registration API |
| [in] | persistentLoggingMode | Persistent logging mode |
| OPEN_E_NONE | if persistent logging mode is set. |
| OPEN_E_EXISTS | if the mode is already enabled. |
| OPEN_E_PARAM | if invalid parameter is passed. |
| OPEN_E_UNAVAIL | if feature is not supported. |
OpEN API Version: 1.1
| open_error_t openapiPersistentLoggingSeverityLevelGet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_LOG_SEVERITY_t * | severityLevel | ||
| ) |
Get the persistent logging severity level.
| [in] | client_handle | Client handle from registration API |
| [out] | severityLevel | Persistent logging severity level |
| OPEN_E_NONE | if persistent logging severity level is returned. |
| OPEN_E_FAIL | if failed to get persistent logging severity level. |
| OPEN_E_PARAM | if invalid parameter is passed. |
| OPEN_E_UNAVAIL | if feature is not supported. |
OpEN API Version: 1.1
| open_error_t openapiPersistentLoggingSeverityLevelSet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_LOG_SEVERITY_t | severityLevel | ||
| ) |
Set persistent logging severity level.
| [in] | client_handle | Client handle from registration API |
| [in] | severityLevel | Persistent logging severity level |
| OPEN_E_NONE | if persistent logging severity level is set. |
| OPEN_E_FAIL | if failed to set severity level. |
| OPEN_E_PARAM | if invalid parameter is passed. |
| OPEN_E_UNAVAIL | if feature is not supported. |
OpEN API Version: 1.1
| open_error_t openapiSysLogModeGet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_CONTROL_t * | sysLogMode | ||
| ) |
Get syslog mode.
| [in] | client_handle | Client handle from registration API |
| [out] | sysLogMode | Syslog mode: enable/disable |
| OPEN_E_NONE | if syslog status is returned. |
| OPEN_E_FAIL | if failed to get syslog status. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiSysLogModeSet | ( | openapiClientHandle_t * | client_handle, |
| OPEN_CONTROL_t | sysLogMode | ||
| ) |
Set the syslog mode.
| [in] | client_handle | Client handle from registration API |
| [in] | sysLogMode | Syslog mode: enable/disable |
| OPEN_E_NONE | if syslog status is set. |
| OPEN_E_EXISTS | if the admin mode is already enabled. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiSysLogPortGet | ( | openapiClientHandle_t * | client_handle, |
| uint16_t * | port | ||
| ) |
Get syslog port.
| [in] | client_handle | Client handle from registration API |
| [out] | port | Syslog port ID |
| OPEN_E_NONE | if syslog port is returned. |
| OPEN_E_FAIL | if failed to get syslog port. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiSysLogPortSet | ( | openapiClientHandle_t * | client_handle, |
| uint32_t | port | ||
| ) |
Set syslog port.
| [in] | client_handle | Client handle from registration API |
| [in] | port | Syslog port ID |
| - | Minimum value OPENAPI_SYSLOG_MIN_PORT | |
| - | Maximum value OPENAPI_SYSLOG_MAX_PORT |
| OPEN_E_NONE | if syslog port is set. |
| OPEN_E_EXISTS | if the port number is already configured. |
| OPEN_E_PARAM | if invalid parameter is passed. |
OpEN API Version: 1.1
| open_error_t openapiSysLogWrite | ( | openapiClientHandle_t * | client_handle, |
| open_buffdesc * | logMessage, | ||
| OPEN_LOG_SEVERITY_t | severityLevel | ||
| ) |
Write system log.
| [in] | client_handle | Client handle from registration API |
| [in] | logMessage | Log message |
| - | Maximum length OPENAPI_LOG_FORMAT_BUF_SIZE | |
| [in] | severityLevel | Logging severity level |
| OPEN_E_NONE | if operation is successful |
| OPEN_E_PARAM | if invalid parameter is passed. |
| OPEN_E_ERROR | if input log message contains single symbol ''. To print percent symbol in message - double percent must be used. For ex. message "%%s" will be printed as "%s". |
OpEN API Version: 1.8
| open_error_t openapiTrapLogClear | ( | openapiClientHandle_t * | client_handle | ) |
Clear the content of the trap log.
| [in] | client_handle | Client handle from registration API |
| OPEN_E_NONE | if operation is successful |
| OPEN_E_PARAM | if invalid parameter is passed |
| OPEN_E_FAIL | if operation failed |
OpEN API Version: 1.14
| open_error_t openapiTrapLogGet | ( | openapiClientHandle_t * | client_handle, |
| open_buffdesc * | trapLogData, | ||
| uint32_t * | numberOfEntries | ||
| ) |
Retrieve the content of the trap log.
Returns all entries present as an array of openapiTrapLogEntry_t.
| [in] | client_handle | Client handle from registration API |
| [out] | trapLogData | Buffer to hold log message. Size must be OPENAPI_TRAP_LOG_BUF_SIZE. |
| [out] | numberOfEntries | The number of trap log entries returned, |
| OPEN_E_NONE | if operation is successful |
| OPEN_E_PARAM | if invalid parameter is passed |
OpEN API Version: 1.14