This document provides a brief description of the authmgr OpEN APIs. It provides the following services:
- Set the authentication manager Dynamic Vlan Creation Mode
- Get the authentication manager Dynamic Vlan Creation Mode
- Set the authentication manager Vlan Assignment Mode
- Get the authentication manager Vlan Assignment Mode
- Set authentication manager method order
- Get authentication manager method order
- Set authentication manager method priority
- Get authentication manager method priority
- Set the max users for the port
- Get the max users of the port
- Set the Authentication fail action (Unauthenticated vlan) value
- Get the Authentication fail action (Unauthenticated vlan) value
- Set the max number of failed authentication attempts value on the specified port
- Get the max number of failed authentication attempts value on the specified port
- Get the Enabled method order
- Get the Enabled method priority
- Get the number of clients authenticated
- Get the client/supplicant Mac address for the logical interface
- Get the client authenticated Status for the logical interface
- Get the client reauth state for the logical interface
- Get the client reauthenticating state for the logical interface
- Get the client username for the logical interface
- Get the client authenticated Method for the logical interface
- Get the authenticated client vlan type (data/voice) for the logical interface
- Get Logical port Session time
- Get the session timeout value for the logical interface
- Get the time left for the session termination action to occur for the logical interface
- Get the logical port termination action value
- Get the filter id for the logical interface
- Get the reauthentication status which is coonfigured on the radius server
- Get the reauthentication period on the specified port
- Gets the first logical port in use for the physcial interface
- Gets the next logical port for the physcial interface
- Get/Set the authentication control mode for the specified interface on switch
- Get/Set the port's guest vlan ID on switch.
- Get the authentication port operating control mode on switch.
- Get the authorization status of the specified port on switch.
- Get the client's assigned VLAN.
- Get the client's VLAN assigned reason on switch.
- Get the Authentication manager's first logical interface of a given physical port on switch.
- Get the Authentication manager's next logical interface of a given physical port on switch.
- Get the MAC address of the specified logical interface on switch.
- Get the assigned VLAN ID and reason for the specified logical interface on switch.
- Get/Set the authentication host mode for the specified interface on switch.
- Get/Set the authentication periodic (reauth) enabled status for the specified interface on switch.
- Get/Set the reauthentication period for the specified interface on switch.
- Get/Set the flag to get reauthentication period from server/user for the specified interface on switch.
- Get/Set the authentication manager global administrative mode on switch.
Example C Application authmgr_example
Initialization
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.
authmgr_example
authmgr_example.c is a sample application that demonstrates the use of OpEN's authmgr APIs. authmgr_example is started from the command line and can be used to exercise the various APIs by specifying arguments on the command line.
Sample Output
- Usage: ./authmgr_example <test#> <arg1> <arg2> ...
- Test 1: Set the authentication manager Dynamic Vlan Creation Mode: authmgr_example 1 <dynamicVlanMode>
- Test 2: Set the authentication manager Vlan Assignment Mode: authmgr_example 2 <vlanAssignmentMode>
- Test 3: Set authentication manager method order: authmgr_example 3 <intIfNum><index><method>
- Test 4: Set authentication manager method priority: authmgr_example 4 <intIfNum><index><method>
- Test 5: Set the max users for the port: authmgr_example 5 <intIfNum><maxUsers>
- Test 6: Set the Authentication fail action (Unauthenticated vlan) value: authmgr_example 6 <intIfNum><vlanId>
- Test 7: Display the authentication interface params: authmgr_example 7 <intIfNum>
- Test 8: Display the authenticated clients info: authmgr_example 8 <intIfNum>
- Test 9: Set authentication port configured control mode: authmgr_example 9 <intIfNum>
- test 10: Set authentication manager admin mode: authmgr_example 10 <mode>
- Test 11: Set authentication manager host mode: authmgr_example 11 <intIfNum> <mode>
- Test 12: Set authentication manager port guest VLAN ID: authmgr_example 12 <intIfNum> <vlan>
- Test 13: Set authentication manager authentication periodic: authmgr_example 13 <intIfNum> <mode>
- Test 14: Set authentication manager reauthentication periodic: authmgr_example 14 <intIfNum> <mode>
- Test 15: Set authentication manager reauth period from server: authmgr_example 15 <intIfNum> <mode>
- Test 16: Set the max number of failed authentication attempts value on the specified port: authmgr_example 16 <intIfNum><maxAuthAttempts>
- Test 17: Run API sanity checks: authmgr_example 17
authmgr CLI/API Cross Reference