Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Macros | Enumerations | Functions
User Manager Configuration And Status [OPENAPI_USER_MANAGER]

Macros

#define OPEN_LOGIN_SIZE   65 /** Login session username buffer size */
 

Enumerations

enum  OPEN_ACCESS_LEVEL_t { OPEN_ACCESS_LEVEL_UNKNOWN = 0, OPEN_ACCESS_LEVEL_LOGIN = 1, OPEN_ACCESS_LEVEL_ENABLE = 2 }
 OpEN uses this enumeration to define access levels. More...
 
enum  OPEN_AUTHOR_METHOD_t {
  OPEN_AUTHOR_METHOD_UNDEFINED = 0, OPEN_AUTHOR_METHOD_TACACS = 1, OPEN_AUTHOR_METHOD_RADIUS = 2, OPEN_AUTHOR_METHOD_LOCAL = 3,
  OPEN_AUTHOR_METHOD_NONE = 4, OPEN_AUTHOR_METHOD_MAX = 5
}
 OpEN uses this enumeration to define Authorization methods. More...
 
enum  OPEN_LOGIN_ACCESS_LEVELS_t { OPEN_LOGIN_ACCESS_NONE = 0, OPEN_LOGIN_ACCESS_READ_ONLY = 1, OPEN_LOGIN_ACCESS_READ_WRITE = 2 }
 OpEN uses this enumeration to define Login Access Permissions. More...
 
enum  OPEN_LOGIN_TYPE_t {
  OPEN_LOGIN_TYPE_UNKNWN = 0, OPEN_LOGIN_TYPE_SERIAL = 1, OPEN_LOGIN_TYPE_TELNET = 2, OPEN_LOGIN_TYPE_SSH = 3,
  OPEN_LOGIN_TYPE_HTTP = 4, OPEN_LOGIN_TYPE_HTTPS = 5, OPEN_LOGIN_TYPE_SNMP = 6, OPEN_LOGIN_TYPE_PING = 7,
  OPEN_LOGIN_TYPE_UDS = 8, OPEN_LOGIN_TYPE_LAST = 9
}
 OpEN Session ID list which use to specify the login type. More...
 
enum  OPEN_USER_MGR_ACCT_METHOD_t { OPEN_ACCT_METHOD_UNDEFINED = 0, OPEN_ACCT_METHOD_TACACS = 1, OPEN_ACCT_METHOD_RADIUS = 2, OPEN_ACCT_METHOD_MAX = 3 }
 OpEN uses this enumeration to define Accounting Methods. More...
 
enum  OPEN_USER_MGR_ACCT_TYPES_t { OPEN_ACCT_TYPE_UNDEFINED = 0, OPEN_ACCT_TYPE_EXEC_SESSION = 1, OPEN_ACCT_TYPE_COMMANDS = 2, OPEN_ACCT_TYPE_MAX = 3 }
 OpEN uses this enumeration to define Accounting Types. More...
 
enum  OPEN_USER_MGR_AUTH_METHOD_t {
  OPEN_AUTH_METHOD_UNDEFINED = 0, OPEN_AUTH_METHOD_ENABLE = 1, OPEN_AUTH_METHOD_LINE = 2, OPEN_AUTH_METHOD_LOCAL = 3,
  OPEN_AUTH_METHOD_NONE = 4, OPEN_AUTH_METHOD_RADIUS = 5, OPEN_AUTH_METHOD_TACACS = 6, OPEN_AUTH_METHOD_REJECT = 7,
  OPEN_AUTH_METHOD_IAS = 8
}
 OpEN uses this enumeration to define Authentication method types. More...
 
enum  OPEN_USER_MGR_AUTHOR_TYPES_t { OPEN_AUTHOR_TYPE_UNKNOWN = 0, OPEN_AUTHOR_TYPE_COMMANDS = 1, OPEN_AUTHOR_TYPE_EXEC = 2, OPEN_AUTHOR_TYPE_MAX = 3 }
 OpEN uses this enumeration to define Authorization types. More...
 
enum  OPEN_USER_MGR_RECORD_TYPES_t {
  OPEN_ACCT_RECORD_TYPE_UNDEFINED = 0, OPEN_ACCT_RECORD_TYPE_START_STOP = 1, OPEN_ACCT_RECORD_TYPE_STOP_ONLY = 2, OPEN_ACCT_RECORD_TYPE_NONE = 3,
  OPEN_ACCT_RECORD_TYPE_MAX = 4
}
 OpEN uses this enumeration to define Accounting Record types. More...
 

Functions

open_error_t openapiAccountingListCreate (openapiClientHandle_t *client_handle, OPEN_USER_MGR_ACCT_TYPES_t acctType, OPEN_USER_MGR_RECORD_TYPES_t recordType, open_buffdesc *acctListName)
 Create an Accounting List. More...
 
open_error_t openapiAccountingListDelete (openapiClientHandle_t *client_handle, OPEN_USER_MGR_ACCT_TYPES_t acctType, open_buffdesc *acctListName)
 Delete an Accounting List. More...
 
open_error_t openapiAccountingListFirstGet (openapiClientHandle_t *client_handle, OPEN_USER_MGR_ACCT_TYPES_t acctType, open_buffdesc *acctListName)
 Get the first Accounting List name. More...
 
open_error_t openapiAccountingListLineDelete (openapiClientHandle_t *client_handle, OPEN_ACCESS_LINE_t accessLine, OPEN_USER_MGR_ACCT_TYPES_t acctType)
 Delete Accounting List from an access line. More...
 
open_error_t openapiAccountingListLineGet (openapiClientHandle_t *client_handle, OPEN_ACCESS_LINE_t accessLine, OPEN_USER_MGR_ACCT_TYPES_t acctType, open_buffdesc *acctListName)
 Get the Accounting list assigned to an access line. More...
 
open_error_t openapiAccountingListLineSet (openapiClientHandle_t *client_handle, OPEN_ACCESS_LINE_t accessLine, OPEN_USER_MGR_ACCT_TYPES_t acctType, open_buffdesc *acctListName)
 Set Accounting List to an access line. More...
 
open_error_t openapiAccountingListNameSizeGet (openapiClientHandle_t *client_handle, uint32_t *acctListNameSize)
 Get the maximum size of Accounting List name. More...
 
open_error_t openapiAccountingListNameValidate (openapiClientHandle_t *client_handle, open_buffdesc *acctListName)
 Validate Accounting list name. More...
 
open_error_t openapiAccountingListNextGet (openapiClientHandle_t *client_handle, OPEN_USER_MGR_ACCT_TYPES_t acctType, open_buffdesc *prevAcctListName, open_buffdesc *nextAcctListName)
 Get the next Accounting List name. More...
 
open_error_t openapiAccountingListRecordTypeGet (openapiClientHandle_t *client_handle, OPEN_USER_MGR_ACCT_TYPES_t acctType, open_buffdesc *acctListName, OPEN_USER_MGR_RECORD_TYPES_t *recordType)
 Get the record type assigned to the Accounting List. More...
 
open_error_t openapiAccountingMethodListGet (openapiClientHandle_t *client_handle, OPEN_USER_MGR_ACCT_TYPES_t acctType, open_buffdesc *acctListName, open_buffdesc *methodList)
 Get the method(s) assigned to the Accounting List. More...
 
open_error_t openapiAccountingMethodsAdd (openapiClientHandle_t *client_handle, OPEN_USER_MGR_ACCT_TYPES_t acctType, open_buffdesc *acctListName, open_buffdesc *acctMethod)
 Add methods to Accounting List. More...
 
open_error_t openapiAccountingMethodsMaxGet (openapiClientHandle_t *client_handle, uint32_t *maxAcctMethods)
 Get the maximum Accounting Methods supported. More...
 
open_error_t openapiAuthenticateUser (openapiClientHandle_t *client_handle, open_buffdesc *userName, open_buffdesc *password, OPEN_LOGIN_ACCESS_LEVELS_t *accessLevel)
 Authenticate Login User. More...
 
open_error_t openapiAuthenticationListCreate (openapiClientHandle_t *client_handle, OPEN_ACCESS_LEVEL_t accessLevel, open_buffdesc *authListName)
 Create an Authentication List. More...
 
open_error_t openapiAuthenticationListDelete (openapiClientHandle_t *client_handle, OPEN_ACCESS_LEVEL_t accessLevel, open_buffdesc *authListName)
 Delete an Authentication List. More...
 
open_error_t openapiAuthenticationListFirstGet (openapiClientHandle_t *client_handle, OPEN_ACCESS_LEVEL_t authLevel, open_buffdesc *authListName)
 Get the first Authentication List name. More...
 
open_error_t openapiAuthenticationListLineDelete (openapiClientHandle_t *client_handle, OPEN_ACCESS_LINE_t accessLine, OPEN_ACCESS_LEVEL_t accessLevel)
 Delete Authentication List from an access line. More...
 
open_error_t openapiAuthenticationListLineGet (openapiClientHandle_t *client_handle, OPEN_ACCESS_LINE_t accessLine, OPEN_ACCESS_LEVEL_t accessLevel, open_buffdesc *authListName)
 Get Authentication List assigned to an access line. More...
 
open_error_t openapiAuthenticationListLineSet (openapiClientHandle_t *client_handle, OPEN_ACCESS_LINE_t accessLine, OPEN_ACCESS_LEVEL_t accessLevel, open_buffdesc *authListName)
 Set Authentication List to an access line. More...
 
open_error_t openapiAuthenticationListNameSizeGet (openapiClientHandle_t *client_handle, uint32_t *authListNameSize)
 Get the maximum size of Authentication List name. More...
 
open_error_t openapiAuthenticationListNameValidate (openapiClientHandle_t *client_handle, open_buffdesc *authListName)
 Validate Authentication list name. More...
 
open_error_t openapiAuthenticationListNextGet (openapiClientHandle_t *client_handle, OPEN_ACCESS_LEVEL_t authLevel, open_buffdesc *prevAuthListName, open_buffdesc *nextAuthListName)
 Get the next Authentication List name. More...
 
open_error_t openapiAuthenticationMethodListGet (openapiClientHandle_t *client_handle, OPEN_ACCESS_LEVEL_t authLevel, open_buffdesc *authListName, open_buffdesc *methodList)
 Get the method(s) assigned to Authentication List. More...
 
open_error_t openapiAuthenticationMethodsAdd (openapiClientHandle_t *client_handle, OPEN_ACCESS_LEVEL_t accessLevel, open_buffdesc *authListName, open_buffdesc *authMethod)
 Add methods to the Authentication list. More...
 
open_error_t openapiAuthenticationMethodsMaxGet (openapiClientHandle_t *client_handle, uint32_t *maxAuthMethods)
 Get the maximum Authentication Methods supported. More...
 
open_error_t openapiAuthorizationListCreate (openapiClientHandle_t *client_handle, OPEN_USER_MGR_AUTHOR_TYPES_t type, open_buffdesc *authorListName)
 Create an Authorization List. More...
 
open_error_t openapiAuthorizationListDelete (openapiClientHandle_t *client_handle, OPEN_USER_MGR_AUTHOR_TYPES_t type, open_buffdesc *authorListName)
 Delete an Authorization List. More...
 
open_error_t openapiAuthorizationListFirstGet (openapiClientHandle_t *client_handle, OPEN_USER_MGR_AUTHOR_TYPES_t type, open_buffdesc *authorListName)
 Get the first Authorization List name. More...
 
open_error_t openapiAuthorizationListLineDelete (openapiClientHandle_t *client_handle, OPEN_ACCESS_LINE_t accessLine, OPEN_USER_MGR_AUTHOR_TYPES_t type)
 Delete Authorization List from an access line. More...
 
open_error_t openapiAuthorizationListLineGet (openapiClientHandle_t *client_handle, OPEN_ACCESS_LINE_t accessLine, OPEN_USER_MGR_AUTHOR_TYPES_t type, open_buffdesc *authorListName)
 Get the Authorization List name assigned to an access level. More...
 
open_error_t openapiAuthorizationListLineSet (openapiClientHandle_t *client_handle, OPEN_ACCESS_LINE_t accessLine, OPEN_USER_MGR_AUTHOR_TYPES_t type, open_buffdesc *authorListName)
 Set Authorization List to an access line. More...
 
open_error_t openapiAuthorizationListNameSizeGet (openapiClientHandle_t *client_handle, uint32_t *authorListNameSize)
 Get the maximum and minimum size of Authorization List name. More...
 
open_error_t openapiAuthorizationListNameValidate (openapiClientHandle_t *client_handle, open_buffdesc *authorListName)
 Validate Authorization list name. More...
 
open_error_t openapiAuthorizationListNextGet (openapiClientHandle_t *client_handle, OPEN_USER_MGR_AUTHOR_TYPES_t type, open_buffdesc *prevAuthorListName, open_buffdesc *nextAuthorListName)
 Get the next Authorization List name. More...
 
open_error_t openapiAuthorizationMethodListGet (openapiClientHandle_t *client_handle, OPEN_USER_MGR_AUTHOR_TYPES_t type, open_buffdesc *authorListName, open_buffdesc *authorMethodList)
 Get the method(s) assigned to Authorization List. More...
 
open_error_t openapiAuthorizationMethodsAdd (openapiClientHandle_t *client_handle, OPEN_USER_MGR_AUTHOR_TYPES_t type, open_buffdesc *authorListName, open_buffdesc *authorMethod)
 Add methods to Authorization List. More...
 
open_error_t openapiAuthorizationMethodsMaxGet (openapiClientHandle_t *client_handle, uint32_t *maxAuthorMethods)
 Get maximum Authorization Methods supported. More...
 
open_error_t openapiEnablePasswordRemove (openapiClientHandle_t *client_handle)
 Delete enable password. More...
 
open_error_t openapiEnablePasswordSet (openapiClientHandle_t *client_handle, open_buffdesc *enablePswd)
 Set enable password. More...
 
open_error_t openapiIsAuthenticationRequiredGet (openapiClientHandle_t *client_handle, OPEN_ACCESS_LINE_t accessLine, OPEN_ACCESS_LEVEL_t accessLevel, OPEN_BOOL_t *authStatus)
 Get whether Authentication is required. More...
 
open_error_t openapiLoginSessionIdleTimeGet (openapiClientHandle_t *client_handle, uint32_t id, uint32_t *timeVal)
 Get the login session idle time. More...
 
open_error_t openapiLoginSessionRemoteIpAddrGet (openapiClientHandle_t *client_handle, uint32_t id, open_inet_addr_t *addr)
 Get the login session remote IP address. More...
 
open_error_t openapiLoginSessionTimeGet (openapiClientHandle_t *client_handle, uint32_t id, uint32_t *timeVal)
 Get the login session time. More...
 
open_error_t openapiLoginSessionTypeGet (openapiClientHandle_t *client_handle, uint32_t id, OPEN_LOGIN_TYPE_t *type)
 Get the login session type. More...
 
open_error_t openapiLoginSessionUserGet (openapiClientHandle_t *client_handle, uint32_t id, open_buffdesc *name)
 Get the login session username. More...
 
open_error_t openapiMaxUsersSupportedGet (openapiClientHandle_t *client_handle, uint32_t *maxUsers)
 Get the maximum number of users supported. More...
 
open_error_t openapiPasswordSizeGet (openapiClientHandle_t *client_handle, uint32_t *passwordMinSize, uint32_t *passwordMaxSize)
 Get the minimum and maximum supported sizes of password. More...
 
open_error_t openapiSessionIDNextValidGet (openapiClientHandle_t *client_handle, OPEN_LOGIN_TYPE_t sessionType, uint32_t *prevSessionID)
 Search the next valid ID of SSH session. More...
 
open_error_t openapiSessionLogout (openapiClientHandle_t *client_handle, uint32_t sessionID)
 Closes the session by ID. More...
 
open_error_t openapiUserDelete (openapiClientHandle_t *client_handle, open_buffdesc *userName)
 Delete user. More...
 
open_error_t openapiUserFirstGet (openapiClientHandle_t *client_handle, open_buffdesc *username)
 Get the first user. More...
 
open_error_t openapiUserLevelGet (openapiClientHandle_t *client_handle, open_buffdesc *userName, OPEN_LOGIN_ACCESS_LEVELS_t *level)
 Get the access level of a user. More...
 
open_error_t openapiUserLevelSet (openapiClientHandle_t *client_handle, open_buffdesc *userName, OPEN_LOGIN_ACCESS_LEVELS_t level)
 Set the access level for an existing user. More...
 
open_error_t openapiUserNameSizeGet (openapiClientHandle_t *client_handle, uint32_t *userNameSize)
 Get the maximum supported size of username. More...
 
open_error_t openapiUserNameValidate (openapiClientHandle_t *client_handle, open_buffdesc *userName)
 Validate the username string. More...
 
open_error_t openapiUserNextGet (openapiClientHandle_t *client_handle, open_buffdesc *prevUserName, open_buffdesc *nextUserName)
 Get next user name. More...
 
open_error_t openapiUserPasswordGet (openapiClientHandle_t *client_handle, open_buffdesc *userName, open_buffdesc *userPassword)
 Get the password for specified user. More...
 
open_error_t openapiUserSet (openapiClientHandle_t *client_handle, open_buffdesc *userName, open_buffdesc *password)
 Set the user name and password. More...
 
open_error_t openapiWebSessionLogout (openapiClientHandle_t *client_handle, open_buffdesc *sessionId)
 End session for an existing user. More...
 
open_error_t openapiWebSessionUserLogin (openapiClientHandle_t *client_handle, open_buffdesc *userName, open_buffdesc *password, open_buffdesc *logintype, open_buffdesc *inetaddr, uint32_t *accessLevel, open_buffdesc *sessionId)
 Create session for an existing user. More...
 
open_error_t openapiWebSessionValidate (openapiClientHandle_t *client_handle, open_buffdesc *sessionId, open_buffdesc *logintype, open_buffdesc *inetaddr, uint32_t *accessLevel)
 validate session for an existing user. More...
 

Detailed Description

Enumeration Type Documentation

OpEN uses this enumeration to define access levels.

Enumerator
OPEN_ACCESS_LEVEL_UNKNOWN 

Unknown Access Level.

OPEN_ACCESS_LEVEL_LOGIN 

Login Access Level.

OPEN_ACCESS_LEVEL_ENABLE 

Enable Access Level.

Definition at line 52 of file openapi_user_manager.h.

OpEN uses this enumeration to define Authorization methods.

Enumerator
OPEN_AUTHOR_METHOD_UNDEFINED 

Authorization method undefined.

OPEN_AUTHOR_METHOD_TACACS 

Authorization method TACACS.

OPEN_AUTHOR_METHOD_RADIUS 

Authorization method radius.

OPEN_AUTHOR_METHOD_LOCAL 

Authorization method local.

OPEN_AUTHOR_METHOD_NONE 

Authorization method none.

OPEN_AUTHOR_METHOD_MAX 

Enum to track maximum Authorization methods.

Definition at line 83 of file openapi_user_manager.h.

OpEN uses this enumeration to define Login Access Permissions.

Enumerator
OPEN_LOGIN_ACCESS_NONE 

No Login Access.

OPEN_LOGIN_ACCESS_READ_ONLY 

Read-only Login Access.

OPEN_LOGIN_ACCESS_READ_WRITE 

Read-write Login Access.

Definition at line 44 of file openapi_user_manager.h.

OpEN Session ID list which use to specify the login type.

Examples:
user_accounts_example.c.

Definition at line 122 of file openapi_user_manager.h.

OpEN uses this enumeration to define Accounting Methods.

Enumerator
OPEN_ACCT_METHOD_UNDEFINED 

Accounting Methods Undefined.

OPEN_ACCT_METHOD_TACACS 

TACACS Accounting Method.

OPEN_ACCT_METHOD_RADIUS 

RADIUS Accounting Method.

OPEN_ACCT_METHOD_MAX 

Useful to identify maximum Accounting Methods.

Definition at line 113 of file openapi_user_manager.h.

OpEN uses this enumeration to define Accounting Types.

Enumerator
OPEN_ACCT_TYPE_UNDEFINED 

Undefined Accounting Type.

OPEN_ACCT_TYPE_EXEC_SESSION 

Exec Accounting.

OPEN_ACCT_TYPE_COMMANDS 

Command Accounting.

OPEN_ACCT_TYPE_MAX 

Useful to identify maximum Accounting types supported.

Definition at line 94 of file openapi_user_manager.h.

OpEN uses this enumeration to define Authentication method types.

Enumerator
OPEN_AUTH_METHOD_UNDEFINED 

Undefined Authentication Method.

OPEN_AUTH_METHOD_ENABLE 

Enable Authentication Method.

OPEN_AUTH_METHOD_LINE 

Line Authentication Method.

OPEN_AUTH_METHOD_LOCAL 

Local Authentication Method.

OPEN_AUTH_METHOD_NONE 

No Authentication Method.

OPEN_AUTH_METHOD_RADIUS 

RADIUS Authentication Method.

OPEN_AUTH_METHOD_TACACS 

TACACS Authentication Method.

OPEN_AUTH_METHOD_REJECT 

Reject Authentication.

OPEN_AUTH_METHOD_IAS 

Internal.

Definition at line 60 of file openapi_user_manager.h.

OpEN uses this enumeration to define Authorization types.

Enumerator
OPEN_AUTHOR_TYPE_UNKNOWN 

Unknown Authorization type.

OPEN_AUTHOR_TYPE_COMMANDS 

Command Authorization.

OPEN_AUTHOR_TYPE_EXEC 

Exec Authorization.

OPEN_AUTHOR_TYPE_MAX 

Useful to check maximum Authorization types.

Definition at line 74 of file openapi_user_manager.h.

OpEN uses this enumeration to define Accounting Record types.

Enumerator
OPEN_ACCT_RECORD_TYPE_UNDEFINED 

Undefined Record Type.

OPEN_ACCT_RECORD_TYPE_START_STOP 

Start-Stop Record Type.

OPEN_ACCT_RECORD_TYPE_STOP_ONLY 

Stop-only Record Type.

OPEN_ACCT_RECORD_TYPE_NONE 

No Record.

OPEN_ACCT_RECORD_TYPE_MAX 

Useful to identify maximum record types supported.

Definition at line 103 of file openapi_user_manager.h.

Function Documentation

open_error_t openapiAccountingListCreate ( openapiClientHandle_t client_handle,
OPEN_USER_MGR_ACCT_TYPES_t  acctType,
OPEN_USER_MGR_RECORD_TYPES_t  recordType,
open_buffdesc acctListName 
)

Create an Accounting List.

Parameters
[in]client_handleClient handle from registration API
[in]acctTypeAccounting type: OPEN_USER_MGR_ACCT_TYPES_t
[in]recordTypeAccounting record type: OPEN_USER_MGR_RECORD_TYPES_t
[in]acctListNameAccounting list name
Return values
OPEN_E_NONEif Accounting List is created successfully.
OPEN_E_FAILif failed to create Accounting List or if failed to set record type.
OPEN_E_EXISTSif Accounting List already exists.
OPEN_E_FULLif maximum number of Accounting Lists have been reached.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Maximum size for acctListName is determined by calling openapiAccountingListNameSizeGet().

OpEN API Version: 1.1

Examples:
accounting_example.c.
open_error_t openapiAccountingListDelete ( openapiClientHandle_t client_handle,
OPEN_USER_MGR_ACCT_TYPES_t  acctType,
open_buffdesc acctListName 
)

Delete an Accounting List.

Parameters
[in]client_handleClient handle from registration API
[in]acctTypeAccounting type: OPEN_USER_MGR_ACCT_TYPES_t
[in]acctListNameBuff descriptor to Accounting List name
Return values
OPEN_E_NONEif Accounting List is deleted.
OPEN_E_FAILif invalid Accounting List name is passed or if the Accounting List name is not found or if Accounting List is in use by Console/Telnet/SSH access lines.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Maximum size for acctListName is determined by calling openapiAccountingListNameSizeGet().

OpEN API Version: 1.1

Examples:
accounting_example.c.
open_error_t openapiAccountingListFirstGet ( openapiClientHandle_t client_handle,
OPEN_USER_MGR_ACCT_TYPES_t  acctType,
open_buffdesc acctListName 
)

Get the first Accounting List name.

Parameters
[in]client_handleClient handle from registration API
[in]acctTypeAccounting type: OPEN_USER_MGR_ACCT_TYPES_t
[out]acctListNameBuff descriptor to Accounting List name
Return values
OPEN_E_NONEif first Accounting List name is returned.
OPEN_E_FAILif Accounting List name does not exist.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for acctListName is determined by calling openapiAccountingListNameSizeGet().

OpEN API Version: 1.1

Examples:
accounting_example.c.
open_error_t openapiAccountingListLineDelete ( openapiClientHandle_t client_handle,
OPEN_ACCESS_LINE_t  accessLine,
OPEN_USER_MGR_ACCT_TYPES_t  acctType 
)

Delete Accounting List from an access line.

Parameters
[in]client_handleClient handle from registration API
[in]accessLineAccess line: OPEN_ACCESS_LINE_t
[in]acctTypeAccounting type OPEN_USER_MGR_ACCT_TYPES_t
Return values
OPEN_E_NONEif the Accounting is deleted from access line.
OPEN_E_FAILif Accounting List is not configured.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
accounting_example.c.
open_error_t openapiAccountingListLineGet ( openapiClientHandle_t client_handle,
OPEN_ACCESS_LINE_t  accessLine,
OPEN_USER_MGR_ACCT_TYPES_t  acctType,
open_buffdesc acctListName 
)

Get the Accounting list assigned to an access line.

Parameters
[in]client_handleClient handle from registration API
[in]accessLineAccess line: OPEN_ACCESS_LINE_t
[in]acctTypeAccounting type: OPEN_USER_MGR_ACCT_TYPES_t
[out]acctListNameBuff descriptor to Accounting List name
Return values
OPEN_E_NONEif Accounting List assigned to access line is returned.
OPEN_E_FAILif Accounting List is not assigned to the access line.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for acctListName is determined by calling openapiAccountingListNameSizeGet().

OpEN API Version: 1.1

Examples:
accounting_example.c.
open_error_t openapiAccountingListLineSet ( openapiClientHandle_t client_handle,
OPEN_ACCESS_LINE_t  accessLine,
OPEN_USER_MGR_ACCT_TYPES_t  acctType,
open_buffdesc acctListName 
)

Set Accounting List to an access line.

Parameters
[in]client_handleClient handle from registration API
[in]accessLineAccess line: OPEN_ACCESS_LINE_t
[in]acctTypeAccounting type: OPEN_USER_MGR_ACCT_TYPES_t
[in]acctListNameBuff descriptor to Accounting List name
Return values
OPEN_E_NONEif Accounting List is applied to access line.
OPEN_E_FAILif Accounting List name is not configured.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Maximum size for acctListName is determined by calling openapiAccountingListNameSizeGet().

OpEN API Version: 1.1

Examples:
accounting_example.c.
open_error_t openapiAccountingListNameSizeGet ( openapiClientHandle_t client_handle,
uint32_t *  acctListNameSize 
)

Get the maximum size of Accounting List name.

Parameters
[in]client_handleClient handle from registration API
[out]acctListNameSizeMaximum size of Accounting List name
Return values
OPEN_E_NONEif maximum size of Accounting list name is returned.
OPEN_E_FAILif failed to return Accounting List name size.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
accounting_example.c.
open_error_t openapiAccountingListNameValidate ( openapiClientHandle_t client_handle,
open_buffdesc acctListName 
)

Validate Accounting list name.

Parameters
[in]client_handleClient handle from registration API
[in]acctListNameAccounting list name.
Return values
OPEN_E_NONEif Accounting list name is valid.
OPEN_E_FAILif the validation fails.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for acctListName is determined by calling openapiAccountingListNameSizeGet().
Valid characters include alphanumeric, '-', '_' and ' '

OpEN API Version: 1.1

Examples:
accounting_example.c.
open_error_t openapiAccountingListNextGet ( openapiClientHandle_t client_handle,
OPEN_USER_MGR_ACCT_TYPES_t  acctType,
open_buffdesc prevAcctListName,
open_buffdesc nextAcctListName 
)

Get the next Accounting List name.

Parameters
[in]client_handleClient handle from registration API
[in]acctTypeAccounting type: OPEN_USER_MGR_ACCT_TYPES_t
[in]prevAcctListNameBuff descriptor to previous Accounting List name
[out]nextAcctListNameBuff descriptor to next Accounting List name
Return values
OPEN_E_NONEif next Accounting List name is returned.
OPEN_E_FAILif previous Accounting List name does not exist or if no more Accounting List names exist.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for the acct names is determined by calling openapiAccountingListNameSizeGet().

OpEN API Version: 1.1

Examples:
accounting_example.c.
open_error_t openapiAccountingListRecordTypeGet ( openapiClientHandle_t client_handle,
OPEN_USER_MGR_ACCT_TYPES_t  acctType,
open_buffdesc acctListName,
OPEN_USER_MGR_RECORD_TYPES_t recordType 
)

Get the record type assigned to the Accounting List.

Parameters
[in]client_handleClient handle from registration API
[in]acctTypeAccounting type: OPEN_USER_MGR_ACCT_TYPES_t
[in]acctListNameBuff descriptor to Accounting List name
[out]recordTypeRecord type associated with Accounting list: OPEN_USER_MGR_RECORD_TYPES_t
Return values
OPEN_E_NONEif Accounting record type is returned.
OPEN_E_FAILif the Accounting List does not exist.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for acctListName is determined by calling openapiAccountingListNameSizeGet().

OpEN API Version: 1.1

Examples:
accounting_example.c.
open_error_t openapiAccountingMethodListGet ( openapiClientHandle_t client_handle,
OPEN_USER_MGR_ACCT_TYPES_t  acctType,
open_buffdesc acctListName,
open_buffdesc methodList 
)

Get the method(s) assigned to the Accounting List.

Parameters
[in]client_handleClient handle from registration API
[in]acctTypeAccounting type: OPEN_USER_MGR_ACCT_TYPES_t
[in]acctListNameBuff descriptor to Accounting List name
[out]methodListOrder of the methods assigned to the Accounting List.
Return values
OPEN_E_NONEif method list is returned
OPEN_E_FAILif the Accounting List does not exist.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for acctListName is determined by calling openapiAccountingListNameSizeGet().
Maximum size for methodList is determined by calling openapiAuthenticationMethodsMaxGet().

OpEN API Version: 1.1

Examples:
accounting_example.c.
open_error_t openapiAccountingMethodsAdd ( openapiClientHandle_t client_handle,
OPEN_USER_MGR_ACCT_TYPES_t  acctType,
open_buffdesc acctListName,
open_buffdesc acctMethod 
)

Add methods to Accounting List.

Parameters
[in]client_handleClient handle from registration API
[in]acctTypeAccounting type: OPEN_USER_MGR_ACCT_TYPES_t
[in]acctListNameAccounting list name
[in]acctMethodAccounting method
Return values
OPEN_E_NONEif methods are added to the Accounting List.
OPEN_E_FAILif failed to add methods or if invalid methods are passed.
OPEN_E_EXISTSif the methods are already configured or if duplicate methods are configured.
OPEN_E_NOT_FOUNDif the Accounting List name is not found.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Maximum size for acctListName is determined by calling openapiAccountingListNameSizeGet().
Maximum size for acctMethod is determined by calling openapiAuthenticationMethodsMaxGet().
Creation of Accounting list would be complete only if methods are added successfully.
Methods followed by "none" will not be added to the list.
Methods for Commands Accounting: TACACS.
Methods for Exec Accounting: RADIUS, TACACS.

OpEN API Version: 1.1

Examples:
accounting_example.c.
open_error_t openapiAccountingMethodsMaxGet ( openapiClientHandle_t client_handle,
uint32_t *  maxAcctMethods 
)

Get the maximum Accounting Methods supported.

Parameters
[in]client_handleClient handle from registration API
[out]maxAcctMethodsMaximum Accounting methods supported
Return values
OPEN_E_NONEif maximum number of Accounting methods is returned successfully.
OPEN_E_FAILif failed to return maximum Accounting methods.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
accounting_example.c.
open_error_t openapiAuthenticateUser ( openapiClientHandle_t client_handle,
open_buffdesc userName,
open_buffdesc password,
OPEN_LOGIN_ACCESS_LEVELS_t accessLevel 
)

Authenticate Login User.

Parameters
[in]client_handleClient handle from registration API
[in]userNameUser name to authenticate
[in]passwordPassword for the user
[out]accessLevelAccess level of the user: read-write/read-only
Return values
OPEN_E_NONEif user is authenticated.
OPEN_E_FAILif user is not authenticated due to invalid username/password or if the user is configured with blocked access level
OPEN_E_ERRORif all configured Authentication methods failed to provide response due to timeout, etc.
OPEN_E_INTERNALif internal error has occurred.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for userName is determined by calling openapiUserNameSizeGet().
Maximum size for password is determined by calling openapiPasswordSizeGet().

OpEN API Version: 1.1

Examples:
user_accounts_example.c.
open_error_t openapiAuthenticationListCreate ( openapiClientHandle_t client_handle,
OPEN_ACCESS_LEVEL_t  accessLevel,
open_buffdesc authListName 
)

Create an Authentication List.

Parameters
[in]client_handleClient handle from registration API
[in]accessLevelAccess levels: OPEN_ACCESS_LEVEL_t
[in]authListNameAuthentication list name buff descriptor
Return values
OPEN_E_NONEif Authentication List is created.
OPEN_E_FAILif failed to create Authentication List.
OPEN_E_FULLif maximum number of Authentication Lists have been reached.
OPEN_E_EXISTSif the Authentication List already exists.
OPEN_E_INTERNALif internal error has occurred.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Creation of Authentication List would be complete only if methods are added successfully.
Maximum size for authListName is determined by calling openapiAuthenticationListNameSizeGet().

OpEN API Version: 1.1

Examples:
authentication_example.c.
open_error_t openapiAuthenticationListDelete ( openapiClientHandle_t client_handle,
OPEN_ACCESS_LEVEL_t  accessLevel,
open_buffdesc authListName 
)

Delete an Authentication List.

Parameters
[in]client_handleClient handle from registration API
[in]accessLevelAccess levels: OPEN_ACCESS_LEVEL_t
[in]authListNameAuthentication list name buff descriptor
Return values
OPEN_E_NONEif Authentication List is deleted successfully.
OPEN_E_NOT_FOUNDif Authentication List does not exist.
OPEN_E_FAILif Authentication List is in use by Console/Telnet/SSH access lines.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Maximum size for authListName is determined by calling openapiAuthenticationListNameSizeGet().

OpEN API Version: 1.1

Examples:
authentication_example.c.
open_error_t openapiAuthenticationListFirstGet ( openapiClientHandle_t client_handle,
OPEN_ACCESS_LEVEL_t  authLevel,
open_buffdesc authListName 
)

Get the first Authentication List name.

Parameters
[in]client_handleClient handle from registration API
[in]authLevelAccess levels: OPEN_ACCESS_LEVEL_t
[out]authListNameFirst Authentication List name
Return values
OPEN_E_NONEif the first Authentication List name is returned.
OPEN_E_FAILif failed to return first Authentication List name.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for authListName is determined by calling openapiAuthenticationListNameSizeGet().

OpEN API Version: 1.1

Examples:
authentication_example.c.
open_error_t openapiAuthenticationListLineDelete ( openapiClientHandle_t client_handle,
OPEN_ACCESS_LINE_t  accessLine,
OPEN_ACCESS_LEVEL_t  accessLevel 
)

Delete Authentication List from an access line.

Parameters
[in]client_handleClient handle from registration API
[in]accessLineAccess line: OPEN_ACCESS_LINE_t
[in]accessLevelAccess levels: OPEN_ACCESS_LEVEL_t
Return values
OPEN_E_NONEif the Authentication List is deleted from access line.
OPEN_E_FAILif Authentication List is not configured.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
This API sets the respective access lines to default methods.

OpEN API Version: 1.1

Examples:
authentication_example.c.
open_error_t openapiAuthenticationListLineGet ( openapiClientHandle_t client_handle,
OPEN_ACCESS_LINE_t  accessLine,
OPEN_ACCESS_LEVEL_t  accessLevel,
open_buffdesc authListName 
)

Get Authentication List assigned to an access line.

Parameters
[in]client_handleClient handle from registration API
[in]accessLineAccess line: OPEN_ACCESS_LINE_t
[in]accessLevelAccess levels: OPEN_ACCESS_LEVEL_t
[out]authListNameAuthentication list name buff descriptor
Return values
OPEN_E_NONEif Authentication List assigned to access line is returned.
OPEN_E_FAILif failed to return Authentication List of an access level.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for authListName is determined by calling openapiAuthenticationListNameSizeGet().

OpEN API Version: 1.1

Examples:
authentication_example.c.
open_error_t openapiAuthenticationListLineSet ( openapiClientHandle_t client_handle,
OPEN_ACCESS_LINE_t  accessLine,
OPEN_ACCESS_LEVEL_t  accessLevel,
open_buffdesc authListName 
)

Set Authentication List to an access line.

Parameters
[in]client_handleClient handle from registration API
[in]accessLineAccess line: OPEN_ACCESS_LINE_t
[in]accessLevelAccess levels: OPEN_ACCESS_LEVEL_t
[in]authListNameAuthentication list name buff descriptor
Return values
OPEN_E_NONEif Authentication List is applied to access line.
OPEN_E_NOT_FOUNDif Authentication List does not exist.
OPEN_E_ERRORif Authentication List being configured to line Console does not have enable/local methods.
OPEN_E_FAILif Authentication List is not configured.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Maximum size for authListName is determined by calling openapiAuthenticationListNameSizeGet().

OpEN API Version: 1.1

Examples:
authentication_example.c.
open_error_t openapiAuthenticationListNameSizeGet ( openapiClientHandle_t client_handle,
uint32_t *  authListNameSize 
)

Get the maximum size of Authentication List name.

Parameters
[in]client_handleClient handle from registration API
[out]authListNameSizeAuthentication list name maximum size
Return values
OPEN_E_NONEif maximum size of Authentication List name is returned successfully.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
authentication_example.c.
open_error_t openapiAuthenticationListNameValidate ( openapiClientHandle_t client_handle,
open_buffdesc authListName 
)

Validate Authentication list name.

Parameters
[in]client_handleClient handle from registration API
[in]authListNameAuthentication list name.
Return values
OPEN_E_NONEif Authentication list name is valid.
OPEN_E_FAILif the validation fails.
OPEN_E_PARAMif invalid parameter is passed.
Note
Valid characters include alphanumeric, '-', '_' and ' '.
Maximum size for authListName is determined by calling openapiAuthenticationListNameSizeGet().

OpEN API Version: 1.1

Examples:
authentication_example.c.
open_error_t openapiAuthenticationListNextGet ( openapiClientHandle_t client_handle,
OPEN_ACCESS_LEVEL_t  authLevel,
open_buffdesc prevAuthListName,
open_buffdesc nextAuthListName 
)

Get the next Authentication List name.

Parameters
[in]client_handleClient handle from registration API
[in]authLevelAccess levels: OPEN_ACCESS_LEVEL_t
[in]prevAuthListNamePrevious Authentication List name
[out]nextAuthListNameNext Authentication List name
Return values
OPEN_E_NONEif the next Authentication List name is returned.
OPEN_E_FAILif the previous Authentication List name does not exist or if no more Authentication List names exist.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for the auth names is determined by calling openapiAuthenticationListNameSizeGet().

OpEN API Version: 1.1

Examples:
authentication_example.c.
open_error_t openapiAuthenticationMethodListGet ( openapiClientHandle_t client_handle,
OPEN_ACCESS_LEVEL_t  authLevel,
open_buffdesc authListName,
open_buffdesc methodList 
)

Get the method(s) assigned to Authentication List.

Parameters
[in]client_handleClient handle from registration API
[in]authLevelAccess levels: OPEN_ACCESS_LEVEL_t
[in]authListNameBuff descriptor to Accounting List name
[out]methodListOrder of the methods assigned to the Accounting List.
Return values
OPEN_E_NONEif method list is returned
OPEN_E_FAILif the Authentication List does not exist.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for authListName is determined by calling openapiAuthenticationListNameSizeGet().
Maximum size for methodList is determined by calling openapiAuthenticationMethodsMaxGet().

OpEN API Version: 1.1

Examples:
authentication_example.c.
open_error_t openapiAuthenticationMethodsAdd ( openapiClientHandle_t client_handle,
OPEN_ACCESS_LEVEL_t  accessLevel,
open_buffdesc authListName,
open_buffdesc authMethod 
)

Add methods to the Authentication list.

Parameters
[in]client_handleClient handle from registration API
[in]accessLevelAccess levels: OPEN_ACCESS_LEVEL_t
[in]authListNameAuthentication list name buff descriptor
[in]authMethodAuthentication method
Return values
OPEN_E_NONEif methods are added to the Authentication List.
OPEN_E_FAILif failed to add methods to Authentication List.
OPEN_E_NOT_FOUNDif Authentication List is not found.
OPEN_E_ERRORif invalid methods are passed or if duplicate methods are passed or if the Login and Enable methods are being removed during reconfiguration of the methods of an Authentication list while it is in use by access line Console.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Maximum size for authListName is determined by calling openapiAuthenticationListNameSizeGet().
Maximum size for authMethod is determined by calling openapiAuthenticationMethodsMaxGet().
To apply Authentication List on line Console, enable/login methods are mandatory. While reconfiguring the methods of a list that is applied on line Console, enable/login cannot be removed. Doing so, openapiAuthenticationMethodsAdd() will return OPEN_E_FAIL.
Methods followed by "none" will not be added to the list.
Creation of Authentication List would be complete only if methods are added successfully.
Methods for Login Authentication: enable, line, local, none, radius and TACACS.
Methods for Enable Authentication: deny, enable, line, none, radius and TACACS.

OpEN API Version: 1.1

Examples:
authentication_example.c.
open_error_t openapiAuthenticationMethodsMaxGet ( openapiClientHandle_t client_handle,
uint32_t *  maxAuthMethods 
)

Get the maximum Authentication Methods supported.

Parameters
[in]client_handleClient handle from registration API
[out]maxAuthMethodsMaximum Authentication methods supported
Return values
OPEN_E_NONEif maximum number of Authentication methods is returned successfully.
OPEN_E_FAILif failed to return maximum Authentication methods.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
authentication_example.c.
open_error_t openapiAuthorizationListCreate ( openapiClientHandle_t client_handle,
OPEN_USER_MGR_AUTHOR_TYPES_t  type,
open_buffdesc authorListName 
)

Create an Authorization List.

Parameters
[in]client_handleClient handle from registration API
[in]typeAuthorization type: OPEN_USER_MGR_AUTHOR_TYPES_t
[in]authorListNameBuff descriptor to Authorization list name
Return values
OPEN_E_NONEif Authorization List name is created successfully.
OPEN_E_FAILif failed to create Authorization List name.
OPEN_E_EXISTSif Authorization List name already exists.
OPEN_E_FULLif maximum number of Authorization Lists have been reached.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for authorListName is determined by calling openapiAuthorizationListNameSizeGet().
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
authorization_example.c.
open_error_t openapiAuthorizationListDelete ( openapiClientHandle_t client_handle,
OPEN_USER_MGR_AUTHOR_TYPES_t  type,
open_buffdesc authorListName 
)

Delete an Authorization List.

Parameters
[in]client_handleClient handle from registration API
[in]typeAuthorization type: OPEN_USER_MGR_AUTHOR_TYPES_t
[in]authorListNameBuff descriptor to Authorization List name
Return values
OPEN_E_NONEif Authorization List is deleted successfully.
OPEN_E_NOT_FOUNDif Authorization List does not exist or invalid.
OPEN_E_FAILif Authorization List is in use by Console/Telnet/SSH access lines.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Maximum size for authorListName is determined by calling openapiAuthorizationListNameSizeGet().

OpEN API Version: 1.1

Examples:
authorization_example.c.
open_error_t openapiAuthorizationListFirstGet ( openapiClientHandle_t client_handle,
OPEN_USER_MGR_AUTHOR_TYPES_t  type,
open_buffdesc authorListName 
)

Get the first Authorization List name.

Parameters
[in]client_handleClient handle from registration API
[in]typeAuthorization type: OPEN_USER_MGR_AUTHOR_TYPES_t
[out]authorListNameBuff descriptor to Authorization List name
Return values
OPEN_E_NONEif first Authorization List is returned successfully.
OPEN_E_FAILif Authorization List name does not exist.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for authorListName is determined by calling openapiAuthorizationListNameSizeGet().

OpEN API Version: 1.1

Examples:
authorization_example.c.
open_error_t openapiAuthorizationListLineDelete ( openapiClientHandle_t client_handle,
OPEN_ACCESS_LINE_t  accessLine,
OPEN_USER_MGR_AUTHOR_TYPES_t  type 
)

Delete Authorization List from an access line.

Parameters
[in]client_handleClient handle from registration API
[in]accessLineAccess line: OPEN_ACCESS_LINE_t
[in]typeAuthorization type: OPEN_USER_MGR_AUTHOR_TYPES_t
Return values
OPEN_E_NONEif the Authorization is deleted from access line.
OPEN_E_FAILif Authorization List is not configured.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Maximum size for authorListName is determined by calling openapiAuthorizationListNameSizeGet().

OpEN API Version: 1.1

Examples:
authorization_example.c.
open_error_t openapiAuthorizationListLineGet ( openapiClientHandle_t client_handle,
OPEN_ACCESS_LINE_t  accessLine,
OPEN_USER_MGR_AUTHOR_TYPES_t  type,
open_buffdesc authorListName 
)

Get the Authorization List name assigned to an access level.

Parameters
[in]client_handleClient handle from registration API
[in]accessLineAccess line: OPEN_ACCESS_LINE_t
[in]typeAuthorization type: OPEN_USER_MGR_AUTHOR_TYPES_t
[out]authorListNameBuff descriptor to Authorization List name
Return values
OPEN_E_NONEif the Authorization List assigned to access line is returned.
OPEN_E_FAILif the Authorization List does not exist.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for authorListName is determined by calling openapiAuthorizationListNameSizeGet().

OpEN API Version: 1.1

Examples:
authorization_example.c.
open_error_t openapiAuthorizationListLineSet ( openapiClientHandle_t client_handle,
OPEN_ACCESS_LINE_t  accessLine,
OPEN_USER_MGR_AUTHOR_TYPES_t  type,
open_buffdesc authorListName 
)

Set Authorization List to an access line.

Parameters
[in]client_handleClient handle from registration API
[in]accessLineAccess line: OPEN_ACCESS_LINE_t
[in]typeAuthorization type: OPEN_USER_MGR_AUTHOR_TYPES_t
[in]authorListNameBuff descriptor to Authorization List name
Return values
OPEN_E_NONEif Authorization List is applied to access line.
OPEN_E_FAILif Authorization List is not configured.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Maximum size for authorListName is determined by calling openapiAuthorizationListNameSizeGet().

OpEN API Version: 1.1

Examples:
authorization_example.c.
open_error_t openapiAuthorizationListNameSizeGet ( openapiClientHandle_t client_handle,
uint32_t *  authorListNameSize 
)

Get the maximum and minimum size of Authorization List name.

Parameters
[in]client_handleClient handle from registration API
[out]authorListNameSizeMaximum size of the Authorization List name
Return values
OPEN_E_NONEif Authorization List name size is returned successfully.
OPEN_E_FAILif failed to return Authorization List name size.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
authorization_example.c.
open_error_t openapiAuthorizationListNameValidate ( openapiClientHandle_t client_handle,
open_buffdesc authorListName 
)

Validate Authorization list name.

Parameters
[in]client_handleClient handle from registration API
[in]authorListNameAuthorization list name.
Return values
OPEN_E_NONEif Authorization list name is valid.
OPEN_E_FAILif the validation fails.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for authListName is determined by calling openapiAuthenticationListNameSizeGet().
Valid characters include alphanumeric, '-', '_' and ' '

OpEN API Version: 1.1

Examples:
authorization_example.c.
open_error_t openapiAuthorizationListNextGet ( openapiClientHandle_t client_handle,
OPEN_USER_MGR_AUTHOR_TYPES_t  type,
open_buffdesc prevAuthorListName,
open_buffdesc nextAuthorListName 
)

Get the next Authorization List name.

Parameters
[in]client_handleClient handle from registration API
[in]typeAuthorization type: OPEN_USER_MGR_AUTHOR_TYPES_t
[in]prevAuthorListNameBuff descriptor to previous Authorization List name
[out]nextAuthorListNameBuff descriptor to next Authorization List name
Return values
OPEN_E_NONEif next Authorization List is returned successfully.
OPEN_E_FAILif the previous Authorization List name does not exist or if no more Authorization List names exist.
OPEN_E_UNAVAILif the Authorization feature is not supported.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for the author names is determined by calling openapiAuthorizationListNameSizeGet().

OpEN API Version: 1.1

Examples:
authorization_example.c.
open_error_t openapiAuthorizationMethodListGet ( openapiClientHandle_t client_handle,
OPEN_USER_MGR_AUTHOR_TYPES_t  type,
open_buffdesc authorListName,
open_buffdesc authorMethodList 
)

Get the method(s) assigned to Authorization List.

Parameters
[in]client_handleClient handle from registration API
[in]typeAuthorization type OPEN_USER_MGR_AUTHOR_TYPES_t
[in]authorListNameBuff descriptor to Authorization List name
[out]authorMethodListOrder of the methods assigned to Authorization List
Return values
OPEN_E_NONEif method list associated with Authorization List is returned.
OPEN_E_FAILif Authorization List does not exist.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for authorListName is determined by calling openapiAuthorizationListNameSizeGet().
Maximum size for authMethod is determined by calling openapiAuthenticationMethodsMaxGet().

OpEN API Version: 1.1

Examples:
authorization_example.c.
open_error_t openapiAuthorizationMethodsAdd ( openapiClientHandle_t client_handle,
OPEN_USER_MGR_AUTHOR_TYPES_t  type,
open_buffdesc authorListName,
open_buffdesc authorMethod 
)

Add methods to Authorization List.

Parameters
[in]client_handleClient handle from registration API
[in]typeAuthorization type OPEN_USER_MGR_AUTHOR_TYPES_t
[in]authorListNameBuff descriptor to Authorization list name
[in]authorMethodAuthorization method
Return values
OPEN_E_NONEif methods are added to the Authorization List.
OPEN_E_FAILif failed to add methods.
OPEN_E_ERRORif duplicate methods are passed.
OPEN_E_NOT_FOUNDif Authorization List does not exist.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Maximum size for authorListName is determined by calling openapiAuthorizationListNameSizeGet().
Maximum size for authMethod is determined by calling openapiAuthenticationMethodsMaxGet().
Creation of Authorization List would be complete only if methods are added successfully.
Methods followed by "none" will not be added to the list.
Valid methods for Command Authorization: radius, TACACS and none.
Valid methods for Exec Authorization: local, radius, TACACS and none.

OpEN API Version: 1.1

Examples:
authorization_example.c.
open_error_t openapiAuthorizationMethodsMaxGet ( openapiClientHandle_t client_handle,
uint32_t *  maxAuthorMethods 
)

Get maximum Authorization Methods supported.

Parameters
[in]client_handleClient handle from registration API
[out]maxAuthorMethodsMaximum Authorization methods supported.
Return values
OPEN_E_NONEif maximum number of Authorization methods is returned successfully.
OPEN_E_FAILif failed to return maximum Authorization methods.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
authorization_example.c.
open_error_t openapiEnablePasswordRemove ( openapiClientHandle_t client_handle)

Delete enable password.

Parameters
[in]client_handleClient handle from registration API
Return values
OPEN_E_NONEif enable password is deleted successfully.
OPEN_E_FAILif failed to delete enable password.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.

OpEN API Version: 1.1

Examples:
user_accounts_example.c.
open_error_t openapiEnablePasswordSet ( openapiClientHandle_t client_handle,
open_buffdesc enablePswd 
)

Set enable password.

Parameters
[in]client_handleClient handle from registration API
[in]enablePswdEnable password.
Return values
OPEN_E_NONEif enable password is set successfully.
OPEN_E_FAILif password is invalid.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Maximum size for password is determined by calling openapiPasswordSizeGet().

OpEN API Version: 1.1

Examples:
user_accounts_example.c.
open_error_t openapiIsAuthenticationRequiredGet ( openapiClientHandle_t client_handle,
OPEN_ACCESS_LINE_t  accessLine,
OPEN_ACCESS_LEVEL_t  accessLevel,
OPEN_BOOL_t authStatus 
)

Get whether Authentication is required.

Parameters
[in]client_handleClient handle from registration API
[in]accessLineAccess line: OPEN_ACCESS_LINE_t
[in]accessLevelAccess levels: OPEN_ACCESS_LEVEL_t
[out]authStatusAuthentication Status: OPEN_BOOL_t
Return values
OPEN_E_NONEif Authentication requirement status is returned.
OPEN_E_FAILif failed to return Authentication requirement status.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

open_error_t openapiLoginSessionIdleTimeGet ( openapiClientHandle_t client_handle,
uint32_t  id,
uint32_t *  timeVal 
)

Get the login session idle time.

Parameters
[in]client_handleClient handle from registration API
[in]idSession ID
[out]timeValIdle time in seconds.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid parameter was passed.

OpEN API Version: 1.18

Examples:
user_sessions_example.c.
open_error_t openapiLoginSessionRemoteIpAddrGet ( openapiClientHandle_t client_handle,
uint32_t  id,
open_inet_addr_t addr 
)

Get the login session remote IP address.

Parameters
[in]client_handleClient handle from registration API
[in]idSession ID
[out]addrIP address
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid parameter was passed.

OpEN API Version: 1.18

Examples:
user_sessions_example.c.
open_error_t openapiLoginSessionTimeGet ( openapiClientHandle_t client_handle,
uint32_t  id,
uint32_t *  timeVal 
)

Get the login session time.

Parameters
[in]client_handleClient handle from registration API
[in]idSession ID
[out]timeValSession time in seconds.
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid parameter was passed.

OpEN API Version: 1.18

Examples:
user_sessions_example.c.
open_error_t openapiLoginSessionTypeGet ( openapiClientHandle_t client_handle,
uint32_t  id,
OPEN_LOGIN_TYPE_t type 
)

Get the login session type.

Parameters
[in]client_handleClient handle from registration API
[in]idSession ID
[out]typeSession type
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid parameter was passed.

OpEN API Version: 1.18

Examples:
user_sessions_example.c.
open_error_t openapiLoginSessionUserGet ( openapiClientHandle_t client_handle,
uint32_t  id,
open_buffdesc name 
)

Get the login session username.

Parameters
[in]client_handleClient handle from registration API
[in]idSession ID
[out]nameUser name
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid parameter was passed.
Note
Minimum size of name buffer is OPEN_LOGIN_SIZE.

OpEN API Version: 1.18

Examples:
user_sessions_example.c.
open_error_t openapiMaxUsersSupportedGet ( openapiClientHandle_t client_handle,
uint32_t *  maxUsers 
)

Get the maximum number of users supported.

Parameters
[in]client_handleClient handle from registration API
[out]maxUsersMaximum number of users
Return values
OPEN_E_NONEif maximum number of login users is returned successfully.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

Examples:
user_accounts_example.c.
open_error_t openapiPasswordSizeGet ( openapiClientHandle_t client_handle,
uint32_t *  passwordMinSize,
uint32_t *  passwordMaxSize 
)

Get the minimum and maximum supported sizes of password.

Parameters
[in]client_handleClient handle from registration API
[out]passwordMinSizeMinimum size of password
[out]passwordMaxSizeMaximum size of password
Return values
OPEN_E_NONEMaximum and minimum size of the password is returned successfully.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
user_accounts_example.c.
open_error_t openapiSessionIDNextValidGet ( openapiClientHandle_t client_handle,
OPEN_LOGIN_TYPE_t  sessionType,
uint32_t *  prevSessionID 
)

Search the next valid ID of SSH session.

Parameters
[in]client_handleClient handle from registration API
[in]sessionTypeThe session type which need to be returned
[in,out]prevSessionIDPrevious ID of session
Return values
OPEN_E_NONEif the next ID of session is returned successfully
OPEN_E_NOT_FOUNDif the valid next ID wasn't found
OPEN_E_PARAMif invalid parameter is passed
Note
The result index will be returned as prevSessionIndex pointer

OpEN API Version: 1.8

Examples:
user_accounts_example.c.
open_error_t openapiSessionLogout ( openapiClientHandle_t client_handle,
uint32_t  sessionID 
)

Closes the session by ID.

Parameters
[in]client_handleClient handle from registration API
[in]sessionIDID of session
Return values
OPEN_E_NONEif the logout of session was successful
OPEN_E_FAILif the logout wasn't done
OPEN_E_PARAMif invalid parameter is passed

OpEN API Version: 1.8

Examples:
user_accounts_example.c.
open_error_t openapiUserDelete ( openapiClientHandle_t client_handle,
open_buffdesc userName 
)

Delete user.

Parameters
[in]client_handleClient handle from registration API
[in]userNameUser name buff descriptor
Return values
OPEN_E_NONEif the user is deleted.
OPEN_E_FAILif failed to delete user or if user is "admin".
OPEN_E_NOT_FOUNDif user does not exist.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
"admin" user cannot be deleted.
Maximum size for userName is determined by calling openapiUserNameSizeGet().

OpEN API Version: 1.1

Examples:
user_accounts_example.c.
open_error_t openapiUserFirstGet ( openapiClientHandle_t client_handle,
open_buffdesc username 
)

Get the first user.

Parameters
[in]client_handleClient handle from registration API
[out]usernameFirst User name.
Return values
OPEN_E_NONEif the user is returned successfully.
OPEN_E_FAILif failed to get first user.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for userName is determined by calling openapiUserNameSizeGet().

OpEN API Version: 1.1

Examples:
user_accounts_example.c.
open_error_t openapiUserLevelGet ( openapiClientHandle_t client_handle,
open_buffdesc userName,
OPEN_LOGIN_ACCESS_LEVELS_t level 
)

Get the access level of a user.

Parameters
[in]client_handleClient handle from registration API
[in]userNameUser name
[out]levelAccess level of the user.
Return values
OPEN_E_NONEif the user level is returned successfully.
OPEN_E_FAILif failed to get user access level.
OPEN_E_ERRORif user does not exist.
OPEN_E_INTERNALif internal error has occurred.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for userName is determined by calling openapiUserNameSizeGet().

OpEN API Version: 1.1

Examples:
user_accounts_example.c.
open_error_t openapiUserLevelSet ( openapiClientHandle_t client_handle,
open_buffdesc userName,
OPEN_LOGIN_ACCESS_LEVELS_t  level 
)

Set the access level for an existing user.

Parameters
[in]client_handleClient handle from registration API
[in]userNameUser name buff descriptor
[in]levelAccess level: OPEN_LOGIN_ACCESS_LEVELS_t
Return values
OPEN_E_NONEif the level is set successfully for the user.
OPEN_E_FAILif failed to set user level.
OPEN_E_NOT_FOUNDif the user does not exist.
OPEN_E_INTERNALif internal error has occurred.
OPEN_E_PARAMif invalid parameter is passed.
Note
Calling this API will change the running configuration of the switch.
Access level cannot be configured for "admin" user.
Maximum size for userName is determined by calling openapiUserNameSizeGet().

OpEN API Version: 1.1

Examples:
user_accounts_example.c.
open_error_t openapiUserNameSizeGet ( openapiClientHandle_t client_handle,
uint32_t *  userNameSize 
)

Get the maximum supported size of username.

Parameters
[in]client_handleClient handle from registration API
[out]userNameSizeMaximum size of username.
Return values
OPEN_E_NONEMaximum size of username returned successfully.
OPEN_E_PARAMError in parameter passed.

OpEN API Version: 1.1

Examples:
user_accounts_example.c.
open_error_t openapiUserNameValidate ( openapiClientHandle_t client_handle,
open_buffdesc userName 
)

Validate the username string.

Parameters
[in]client_handleClient handle from registration API
[in]userNameUser name to validate
Return values
OPEN_E_NONEif username contains valid characters.
OPEN_E_FAILif username contains invalid characters.
OPEN_E_PARAMif invalid parameter is passed.
Note
Valid characters include alphanumeric, '-', '_' and ' '.
Maximum size for userName is determined by calling openapiUserNameSizeGet().

OpEN API Version: 1.1

Examples:
user_accounts_example.c.
open_error_t openapiUserNextGet ( openapiClientHandle_t client_handle,
open_buffdesc prevUserName,
open_buffdesc nextUserName 
)

Get next user name.

Parameters
[in]client_handleClient handle from registration API
[in]prevUserNamePrevious user name
[out]nextUserNameNext user name
Return values
OPEN_E_NONEif the next user is returned successfully.
OPEN_E_FAILif no more users exist.
OPEN_E_NOT_FOUNDif previous user does not exist.
OPEN_E_PARAMif invalid parameter is passed.
Note
Maximum size for user names is determined by calling openapiUserNameSizeGet().

OpEN API Version: 1.1

Examples:
user_accounts_example.c.
open_error_t openapiUserPasswordGet ( openapiClientHandle_t client_handle,
open_buffdesc userName,
open_buffdesc userPassword 
)

Get the password for specified user.

Parameters
[in]client_handleClient handle from registration API
[in]userNameUser name
[out]userPasswordPassword for the user
Return values
OPEN_E_NONEif user password can be get successfully.
OPEN_E_FAILif user password get fail.
OPEN_E_NOT_FOUNDif user is not found.
OPEN_E_PARAMif invalid parameter is passed.

OpEN API Version: 1.1

open_error_t openapiUserSet ( openapiClientHandle_t client_handle,
open_buffdesc userName,
open_buffdesc password 
)

Set the user name and password.

Parameters
[in]client_handleClient handle from registration API
[in]userNameUser name buff descriptor
[in]passwordPassword buff descriptor
Return values
OPEN_E_NONEif user name and password are set successfully.
OPEN_E_FAILif failed to set username and password.
OPEN_E_FULLif no more users can be added.
OPEN_E_PARAMif invalid parameter is passed.
Note
This API allows to create a new user with password and also change the password for an existing user.
Calling this API will change the running configuration of the switch.
This API creates the user with default access level (RO).
Maximum size for userName is determined by calling openapiUserNameSizeGet().
Maximum size for password is determined by calling openapiPasswordSizeGet().
Password accepts all the special characters except '"' and '?'.

OpEN API Version: 1.1

Examples:
user_accounts_example.c.
open_error_t openapiWebSessionLogout ( openapiClientHandle_t client_handle,
open_buffdesc sessionId 
)

End session for an existing user.

Parameters
[in]client_handleClient handle from registration API
[in]sessionIdSession ID of the login.
Return values
OPEN_E_NONEif session is valid.
OPEN_E_FAILif session is not valid.

OpEN API Version: 1.6

Examples:
user_sessions_example.c.
open_error_t openapiWebSessionUserLogin ( openapiClientHandle_t client_handle,
open_buffdesc userName,
open_buffdesc password,
open_buffdesc logintype,
open_buffdesc inetaddr,
uint32_t *  accessLevel,
open_buffdesc sessionId 
)

Create session for an existing user.

Parameters
[in]client_handleClient handle from registration API
[in]userNameUser name to authenticate
[in]passwordPassword for the user
[in]logintypeLogin protocol HTTP/HTTPS
[in]inetaddrClient IP address
[out]accessLevelAccess level of the user
[out]sessionIdSession ID of the login.
Return values
OPEN_E_NONEif user is authenticated.
OPEN_E_FAILif user is not authenticated due to invalid username/password or if the user is configured with blocked access level
OPEN_E_ERRORif all configured Authentication methods failed to provide response due to timeout, etc.
OPEN_E_INTERNALif internal error has occurred.
OPEN_E_PARAMif invalid parameter is passed.
OPEN_E_FULLif maximum login sessions exist already.

OpEN API Version: 1.6

Examples:
user_sessions_example.c.
open_error_t openapiWebSessionValidate ( openapiClientHandle_t client_handle,
open_buffdesc sessionId,
open_buffdesc logintype,
open_buffdesc inetaddr,
uint32_t *  accessLevel 
)

validate session for an existing user.

Parameters
[in]client_handleClient handle from registration API
[in]sessionIdSession ID of the login.
[in]logintypeLogin protocol HTTP/HTTPS
[in]inetaddrClient IP address
[out]accessLevelAccess Level of the session
Return values
OPEN_E_NONEif session is valid.
OPEN_E_FAILif session is not valid.

OpEN API Version: 1.6

Examples:
user_sessions_example.c.