Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
User sessions

User Manager manages user accounts with their unique credentials to control users from accessing computer or network resources. Each user is associated with a privilege level - read-only, read-write and super-user to restrict the resource usage based on privilege.

Sessions are required for certain external applications like Web browsers which generate a sequence of requests. Users will first establish a session (by supplying unique credentials), the system will verify the credentials and if the user is authorized, a unique session ID is generated and the session is established. once a session is established, the user can access the resources by supplying the session ID.

User session OpEN API

This document provides a brief description of the User session OpEN APIs. User session OpEN APIs allow processes outside of the ICOS main process (switchdrvr) access to establish User sessions. It provides the following services:

Example C Application user_sessions_example

Create session

In the main function, the sample application initializes the OpEN API RPC service by calling openapiClientRegister() and waits for the RPC service in switchdrvr to start. A Client Handle is returned by openapiClientRegister() which is used while invoking the OpEN APIs. The application then exercises the associated OpEN APIs and logs informational and/or error messages on the console. The example application runs to its completion and exits.

user_sessions_example

user_sessions_example.c is a sample application that demonstrates the use of the User sessions OpEN APIs. user_sessions_example is started from the command line and has the following usage syntax:

Usage: user_sessions <test#> <arg1> <arg2> ...

The example code illustrates the User sessions OpEN APIs with appropriate arguments to manage user sessions in the ICOS main process (switchdrvr).