libauthd.h File Reference

Juniper authentication library functions. More...


Data Structures

struct  authd_basic_auth_params
 Defines the basic authentication parameters. More...
struct  authd_certificate_auth_params
 Defines the certificate authentication parameters. More...
struct  authd_eap_auth_params
 Defines the EAP authentication parameters. More...
struct  authd_auth_params_s
 Defines the authentication parameters. More...
struct  authd_client_functions
 Vector of all callback functions. More...

Defines

#define AUTHD_USERNAME_SIZE   255+1
 added 1 for end null
#define AUTHD_PASSWORD_SIZE   255+1
 added 1 for end null
#define AUTHD_PROFILE_NAME_SIZE   63+1
 FIXME from common.include.dd.
#define AUTHD_INVALID_AUTH_RQST_ID   0
 Auth request id related defines.

Typedefs

typedef OPAQUE_authd_client_session * authd_client_session_handle
 Opaque handle for a connection to AUTHD.
typedef enum authd_session_state authd_session_state_t
 Callback for session connection state change.
typedef void(* authd_cb_session_state_t )(authd_client_session_handle handle, authd_session_state_t state)
typedef authd_attr_list_t authd_client_daemon_info_t
 Client Daemon attributes.
typedef u_int32_t auth_rqst_id_t
 Authentication request id.
typedef authd_auth_params_s authd_auth_params_t
 Defines the authentication parameters.
typedef void(* authd_cb_session_connect_t )(authd_client_session_handle handle, u_int32_t ctx, enum authd_session_connect_return code)
 This callback function is called for the session connect status.
typedef void(* authd_cb_session_register_t )(authd_client_session_handle handle, auth_rqst_id_t auth_rqst_id, int reply_code)
 This callback function is called for the session registration status.
typedef void(* authd_cb_auth_rply_t )(authd_client_session_handle handle, auth_rqst_id_t auth_rqst_id, sdb_session_id_t subscriber_id, u_int32_t return_code, authd_rply_msg_t *auth_rply, authd_attr_list_t *ret_tlvs)
 This callback function is called when there is authentiation reply from the AUTHD.
typedef void(* authd_cb_acct_rply_t )(authd_client_session_handle handle, auth_rqst_id_t auth_rqst_id, sdb_session_id_t subscriber_id, u_int32_t return_code, authd_rply_msg_t *auth_rply, authd_attr_list_t *ret_tlvs)
 This callback function is called when there is accounting reply from the AUTHD.
typedef void(* authd_cb_client_info_update_rply_t )(authd_client_session_handle handle, auth_rqst_id_t rqst_id, int reply_code, authd_attr_list_t *attr_list)
 This callback is triggered whenever there is a reply for client daemon info update.
typedef void(* authd_cb_user_logout_rply_t )(authd_client_session_handle handle, auth_rqst_id_t rqst_id, sdb_session_id_t user_id, int rply_code)
 This callback is triggered whenever there is a reply for user logout.
typedef void(* authd_cb_remove_users_t )(authd_client_session_handle handle, const authd_attr_list_t *attr_list)
 This callback is triggered whenever there is a requst to logout users initiated from AUTHD.
typedef void(* authd_cb_services_activated_t )(authd_client_session_handle handle, auth_rqst_id_t rqst_id, sdb_session_id_t subs_id, int reply_code)
 This callback is triggered whenever the AUTHD notifies the client daemon that all the services for the subscriber are activated.
typedef void(* authd_cb_dyn_rqst_t )(authd_client_session_handle handle, sdb_session_id_t subs_id, authd_msg_sub_op_code_t rqst_subcode, const authd_attr_list_t *dyn_rqst_attrs)
 This callback is triggered if there is a dynamic request from AUTHD.
typedef void(* authd_cb_user_session_terminated_t )(authd_client_session_handle handle, auth_rqst_id_t rqst_id, sdb_session_id_t user_id, int rply_code)
 This callback is triggered whenever there is a reply for user client session terminated notification.
typedef void(* authd_cb_reauth_rply_t )(authd_client_session_handle handle, auth_rqst_id_t auth_rqst_id, sdb_session_id_t sub_id, u_int32_t reply_code, authd_rply_msg_t *auth_rply, authd_attr_list_t *ret_tlvs)
 This callback function is called when there is re-authentiation reply from AUTHD.
typedef void(* authd_cb_reauth_migrate_activated_t )(authd_client_session_handle handle, auth_rqst_id_t rqst_id, sdb_session_id_t sub_id, u_int32_t reply_code)
 This callback is triggered whenever AUTHD notifies the client daemon that all the services for the re-authenticated subscriber are activated.
typedef void(* authd_cb_reauth_abort_t )(authd_client_session_handle handle, auth_rqst_id_t rqst_id, sdb_session_id_t sub_id, u_int32_t rply_code)
 This callback is triggered whenever there is a reply for re-authenticate abort notification.

Enumerations

enum  authd_session_ret_t {
  AUTHD_SESSION_OK, AUTHD_SESSION_INV_HANDLE, AUTHD_SESSION_SC_FAILED, AUTHD_SESSION_BAD_RQST_ID,
  AUTHD_SESSION_AUTH_DUP_RQST, AUTHD_SESSION_NOMEM, AUTHD_SESSION_MSG_QUE_INS_FAILED, AUTHD_SESSION_RQST_PEND_QUE_INS_FAILED,
  AUTHD_SESSION_ACCT_RQST_FAILED, AUTHD_SESSION_PEND_RQST_NOT_FOUND, AUTHD_SESSION_CB_NOT_FOUND, AUTHD_SESSION_INV_PARAM,
  AUTHD_SESSION_MAX_STATUS
}
 Defines the authd_session return status code. More...
enum  authd_session_connect_return { AUTHD_SC_SUCCESS = 0, AUTHD_SC_FAILED }
 Defines the session connect return code.
enum  authd_session_state { AUTHD_SS_DOWN = 0 }
 Callback for session connection state change. More...
enum  auth_attrs_loc_t { AUTHD_ATTR_IN_NONE, AUTHD_ATTR_IN_DB, AUTHD_ATTR_IN_MSG }
 Defines where the additional authentication TLV attrs are passed through (i.e. More...
enum  auth_acct_type_t { AUTH_USER_ACCOUNTING, AUTH_SERVICE_ACCOUNTING }
 Accounting types. More...
enum  auth_acct_status_t { AUTH_ACCT_START, AUTH_ACCT_STOP, AUTH_ACCT_INTERIM_UPDATE }
 Accounting status. More...
enum  credentials_t {
  AUTH_MIN_CREDENTIALS, AUTH_CREDENTIALS_BASIC = 1, AUTH_CREDENTIALS_CERTIFICATE, AUTH_CREDENTIALS_EAP,
  AUTH_MAX_CREDENTIALS
}
 Authentication type. More...

Functions

int junos_authd_session_handle_alloc (evContext ctx, struct authd_client_functions *funs, authd_client_session_handle *handlep)
 This API allocates the client daemon session handle.
void junos_authd_session_handle_free (authd_client_session_handle handle)
 This API frees the client daemon session handle memory.
int junos_authd_session_connect (authd_client_session_handle handle)
 This API is called to connect the client daemon to authd daemon.
int junos_authd_session_connect_register (authd_client_session_handle handle, const char *instance, u_int32_t len, auth_rqst_id_t *auth_rqst_id)
 This API is called to connect the client daemon to authd daemon and register a connection id with authd.
int junos_authd_session_register (authd_client_session_handle handle, const char *instance, u_int32_t len, auth_rqst_id_t *auth_rqst_id)
 This API is called to register a connection id with authd.
int junos_authd_session_authenticate (authd_client_session_handle handle, sdb_session_id_t subscriber_id, const authd_auth_params_t *authd_auth_params, auth_rqst_id_t *auth_rqst_id)
 This API function is called by the client daemon to send the authentication request to AUTHD, if everything is successful, the auth_rqst_id is returned to the client daemon to keep track of the outstanding request.
int junos_authd_session_auth_cancel (authd_client_session_handle handle, const auth_rqst_id_t auth_rqst_id)
 This API function is called by the client daemon to cancel the outstanding authentication.
int junos_authd_session_reply_get (authd_client_session_handle handle)
 This API function is called by the client daemon to handle the reply message from the authd, after decoding the messages the related callback functions are invoked to the client daemon.
int junos_authd_session_update_client_daemon_info (authd_client_session_handle handle, authd_client_daemon_info_t client_info, auth_rqst_id_t *rqst_id)
 This API function is called by the client daemon to send the client daemon information to AUTHD.
int junos_authd_session_user_logout (authd_client_session_handle handle, sdb_session_id_t user_id, auth_rqst_id_t *rqst_id)
 This API function is called by the client daemon to inform the ATUHD that the subscriber is going to logout, the AUTHD might need to do its part of cleaning up.
int junos_authd_session_sub_activate (authd_client_session_handle handle, sdb_session_id_t subs_id, auth_rqst_id_t *rqst_id)
int junos_authd_session_dyn_rqst_rply (authd_client_session_handle handle, sdb_session_id_t dyn_rqst_id, authd_msg_sub_op_code_t rqst_subcode, const authd_attr_list_t dyn_rqst_ret_attrs)
 This API function is called by the client daemon to send the dynamic request response to the AUTHD.
const char * junos_authd_session_strerr (int errnum)
 Get the error string.
int junos_authd_user_session_terminated (authd_client_session_handle handle, sdb_session_id_t user_id, auth_rqst_id_t *rqst_id)
 This API function is called by the client daemon to inform ATUHD that the subscriber session entry has been marked 'terminated', and AUTHD must notify back the client daemon when it is Ok to remove the session entriely.
int junos_authd_session_reauthenticate (authd_client_session_handle handle, sdb_session_id_t sub_id, const authd_auth_params_t *authd_auth_params, auth_rqst_id_t *auth_rqst_id)
 This API function is called by the client daemon to send the re-authenticate request to AUTHD.
int junos_authd_session_reauth_migrate_activate (authd_client_session_handle handle, sdb_session_id_t sub_id, sdb_session_id_t orig_sub_id, auth_rqst_id_t *auth_rqst_id)
int junos_authd_session_reauthenticate_abort (authd_client_session_handle handle, sdb_session_id_t sub_id, auth_rqst_id_t *rqst_id)
 This API function is called by the client daemon to inform AUTHD that the re-authenticate request for the subscriber session is being aborted.


Detailed Description

Juniper authentication library functions.

This code provides the library APIs that facilitate the client of the AUTHD to communicate with the AUTHD.

Here is the typical flow how the client daemon uses the authd library to communicate with AUTHD.

1) The clients of the AUTHD first use authd_session_handle_alloc() to allocate the handle between the client daemon and the ATUHD; 2) The clients call authd_session_connect() to establish the connection between the clients and the AUTHD; 3) The client can then send different requests(i.e. authentication/ client_info_udpate/user_logout) to AUTHD referencing the handle that was created at the beginning.

Warning:
Beginning with JUNOS 9.6, libauthd.h is deprecated for external JUNOS SDK users. It will be removed from the JUNOS SDK in 10.3. Please use libjunos-aaa instead.

Typedef Documentation

typedef void(* authd_cb_acct_rply_t)(authd_client_session_handle handle, auth_rqst_id_t auth_rqst_id, sdb_session_id_t subscriber_id, u_int32_t return_code, authd_rply_msg_t *auth_rply, authd_attr_list_t *ret_tlvs)
 

This callback function is called when there is accounting reply from the AUTHD.

The auth_rqst_id correlates to the accounting request id that was assinged when the accounting request was first sent.

Note:
The memory for the ret_tlvs are created by the authd library, upon the callback the client daemon can parse the ret_tlvs, once the callback is returned it is the authd library's responsibility to free the memory.

typedef void(* authd_cb_auth_rply_t)(authd_client_session_handle handle, auth_rqst_id_t auth_rqst_id, sdb_session_id_t subscriber_id, u_int32_t return_code, authd_rply_msg_t *auth_rply, authd_attr_list_t *ret_tlvs)
 

This callback function is called when there is authentiation reply from the AUTHD.

The auth_rqst_id correlates to the authentication request id that was assinged when the authenticate request was first sent.

Note:
The memory for the ret_tlvs are created by the authd library, upon the callback the client daemon can parse the ret_tlvs, once the callback is returned it is the authd library's responsibility to free the memory.

typedef void(* authd_cb_client_info_update_rply_t)(authd_client_session_handle handle, auth_rqst_id_t rqst_id, int reply_code, authd_attr_list_t *attr_list)
 

This callback is triggered whenever there is a reply for client daemon info update.

Note:
The memory for the returned attr_list is created by the authd library, upon the callback the client daemon can parse the attr_lsit, once the callback is returned it is the authd library's responsibility to free the memory.

typedef void(* authd_cb_dyn_rqst_t)(authd_client_session_handle handle, sdb_session_id_t subs_id, authd_msg_sub_op_code_t rqst_subcode, const authd_attr_list_t *dyn_rqst_attrs)
 

This callback is triggered if there is a dynamic request from AUTHD.

For example, if it is a service activation,

  • rqst_subcode == AUTHD_COA_REQUEST
  • dyn_rqst_attrs should be in the format of, service-id1-tlv; service-attr1-tlv; service-attr2-tlv...

For Radius Disconnect,

  • rqst_subcode == AUTHD_DISCONN_REQUEST
  • dyn_rqst_attrs should be in the format of,

typedef void(* authd_cb_reauth_rply_t)(authd_client_session_handle handle, auth_rqst_id_t auth_rqst_id, sdb_session_id_t sub_id, u_int32_t reply_code, authd_rply_msg_t *auth_rply, authd_attr_list_t *ret_tlvs)
 

This callback function is called when there is re-authentiation reply from AUTHD.

The auth_rqst_id correlates to the authentication request id that was assigned when the re-authenticate request was first sent.

Note:
The memory for the ret_tlvs are created by the authd library, upon the callback the client daemon can parse the ret_tlvs, once the callback is returned it is the authd library's responsibility to free the memory.

typedef void(* authd_cb_services_activated_t)(authd_client_session_handle handle, auth_rqst_id_t rqst_id, sdb_session_id_t subs_id, int reply_code)
 

This callback is triggered whenever the AUTHD notifies the client daemon that all the services for the subscriber are activated.

Note:
The subscriber id is carried in user_id in the auth_rply_msg_hdr_t

typedef authd_attr_list_t authd_client_daemon_info_t
 

Client Daemon attributes.

Defines the client daemon related attributes. They are sent to AUTHD to help it to pick an address from the address pool.

typedef enum authd_session_state authd_session_state_t
 

Callback for session connection state change.

This callback only occurs in response to an unexpected session closure. It does not occur in response to a user-initiated session close.


Enumeration Type Documentation

enum auth_acct_status_t
 

Accounting status.

Enumerator:
AUTH_ACCT_START  The acct-start request.
AUTH_ACCT_STOP  The acct-stop request.
AUTH_ACCT_INTERIM_UPDATE  The interim-update request.

enum auth_acct_type_t
 

Accounting types.

Enumerator:
AUTH_USER_ACCOUNTING  The user accounting.
AUTH_SERVICE_ACCOUNTING  The service accounting.

enum auth_attrs_loc_t
 

Defines where the additional authentication TLV attrs are passed through (i.e.

either through session db or contained inside the socket message)

Note:
If in the future, the AUTHD will only support the client session that is stored in the session db, this enum can then be deprecated.
Enumerator:
AUTHD_ATTR_IN_NONE  The authd TLV attrs is NULL.
AUTHD_ATTR_IN_DB  The authd TLV attrs is in session db.
AUTHD_ATTR_IN_MSG  The authd TLV attrs is within the msg.

enum authd_session_ret_t
 

Defines the authd_session return status code.

Enumerator:
AUTHD_SESSION_OK  Success.
AUTHD_SESSION_INV_HANDLE  Invalid session handle.
AUTHD_SESSION_SC_FAILED  Connect to ATUHD failed.
AUTHD_SESSION_BAD_RQST_ID  Error generating requst id.
AUTHD_SESSION_AUTH_DUP_RQST  Duplicate requst.
AUTHD_SESSION_NOMEM  No memory available.
AUTHD_SESSION_MSG_QUE_INS_FAILED  The queue full.
AUTHD_SESSION_RQST_PEND_QUE_INS_FAILED  RQST pending queue insert fail.
AUTHD_SESSION_ACCT_RQST_FAILED  Accounting rqst failed.
AUTHD_SESSION_PEND_RQST_NOT_FOUND  Pending rqst not found.
AUTHD_SESSION_CB_NOT_FOUND  Callback funcs not found.
AUTHD_SESSION_INV_PARAM  Invalid params.
AUTHD_SESSION_MAX_STATUS  Status boundary.

enum authd_session_state
 

Callback for session connection state change.

This callback only occurs in response to an unexpected session closure. It does not occur in response to a user-initiated session close.

enum credentials_t
 

Authentication type.

Enumerator:
AUTH_CREDENTIALS_BASIC  The basic credential.
AUTH_CREDENTIALS_CERTIFICATE  The certificate credentials.
AUTH_CREDENTIALS_EAP  The EAP credentials.


Function Documentation

int junos_authd_session_auth_cancel authd_client_session_handle  handle,
const auth_rqst_id_t  auth_rqst_id
 

This API function is called by the client daemon to cancel the outstanding authentication.

Parameters:
[in] handle The client daemon session handle.
[in] auth_rqst_id The authentication request id
Returns:
0 on success, -1 otherwise.
  • AUTHD_SESSION_INV_HANDLE invalid session handle is passed in.
  • AUTHD_SESSION_PEND_RQST_NOT_FOUND the pending rqst id passed not found.
  • AUTHD_SESSION_OK successful

int junos_authd_session_authenticate authd_client_session_handle  handle,
sdb_session_id_t  subscriber_id,
const authd_auth_params_t authd_auth_params,
auth_rqst_id_t auth_rqst_id
 

This API function is called by the client daemon to send the authentication request to AUTHD, if everything is successful, the auth_rqst_id is returned to the client daemon to keep track of the outstanding request.

Note:
The memory that alloced for authd_auth_params by the client daemon, it is the client daemon responsibilty to free it after the API call is returned. The authd library only parses the params not releases them.
Parameters:
[in] handle The client daemon session handle.
[in] subscriber_id The subseriber id is the identifier that uniquely identifies the subscriber If the client daemon does not have such identifier, then it passes in 0.
[in] authd_auth_params The authentication parameters required for authentication
[out] auth_rqst_id The request id is generated and returned so that the client daemon can keep track of the pending request. If however, the client passes a valid auth_rqst_id(!=AUTHD_INVALID_AUTH_RQST_ID) meaning that the client daemon wishes to use its own generated request id, then the authd library will NOT generate a new request id, instead the same passin request id is returned.
Returns:
The possible return values are
  • AUTHD_SESSION_INV_HANDLE invalid session handle is passed in
  • AUTHD_SESSION_AUTH_DUP_RQST the same auth rqst is still pending
  • AUTHD_SESSION_NOMEM out of memory
  • AUTHD_SESSION_OK successful

int junos_authd_session_connect authd_client_session_handle  handle  ) 
 

This API is called to connect the client daemon to authd daemon.

Parameters:
[in] handle The client daemon session handle.
Returns:
0 on success, -1 otherwise.
  • [EINPROGRESS] Connection establishment in progress.
  • [EISCONN] Connection is already open.
  • [ENOMEM] Not enough memory to allocate sockaddrs.

int junos_authd_session_connect_register authd_client_session_handle  handle,
const char *  instance,
u_int32_t  len,
auth_rqst_id_t auth_rqst_id
 

This API is called to connect the client daemon to authd daemon and register a connection id with authd.

Parameters:
[in] handle The client daemon session handle.
[in] instance unique string to identify an instance. Can be null if the application is a singleton.
[in] len Length of the instance array
[out] auth_rqst_id The request id is generated and returned so that the client daemon can keep track of the pending request. If however, the client passes a valid auth_rqst_id(!=AUTHD_INVALID_AUTH_RQST_ID) meaning that the client daemon wishes to use its own generated request id, then the authd library will NOT generate a new request id, instead the same passin request id is returned.
Returns:
0 on success, -1 otherwise.
  • [EINPROGRESS] Connection establishment in progress.
  • [EISCONN] Connection is already open.
  • [ENOMEM] Not enough memory to allocate sockaddrs.

int junos_authd_session_dyn_rqst_rply authd_client_session_handle  handle,
sdb_session_id_t  dyn_rqst_id,
authd_msg_sub_op_code_t  rqst_subcode,
const authd_attr_list_t  dyn_rqst_ret_attrs
 

This API function is called by the client daemon to send the dynamic request response to the AUTHD.

Parameters:
[in] handle The client daemon session handle.
[in] subscriber_id The subseriber id is the identifier that uniquely identifies the subscriber If the client daemon does not have such identifier, then it passes in 0.
[in] rqst_subcode This param indicates rqst subcode, which is AUTHD_DYNREQ_ACK or AUTHD_DYNREQ_NACK
[in] dyn_rqst_ret_attrs The dynamic request returned TLVs along with the dyn rqst result
Returns:
The possible return values are
  • AUTHD_SESSION_INV_HANDLE invalid session handle is passed in
  • AUTHD_SESSION_NOMEM out of memory
  • AUTHD_SESSION_RQST_PEND_QUE_INS_FAILED insert into pend rqst que failed
  • AUTHD_SESSION_OK successful

int junos_authd_session_handle_alloc evContext  ctx,
struct authd_client_functions funs,
authd_client_session_handle handlep
 

This API allocates the client daemon session handle.

Parameters:
[in] ctx The client event context
[in] funs The struct that holds the client callback functions.
[out] handlep The client daemon session handle
Returns:
0 on success, -1 otherwise.
  • [EINVAL] The funs is NULL or session_connect callback is not defined
  • ENOMEM] Not enough memory to allocate handle.

void junos_authd_session_handle_free authd_client_session_handle  handle  ) 
 

This API frees the client daemon session handle memory.

Parameters:
[in] handle The client daemon session handle.

int junos_authd_session_reauthenticate authd_client_session_handle  handle,
sdb_session_id_t  sub_id,
const authd_auth_params_t authd_auth_params,
auth_rqst_id_t auth_rqst_id
 

This API function is called by the client daemon to send the re-authenticate request to AUTHD.

Parameters:
[in] handle The client daemon session handle.
[in] sub_id The id is the identifier that uniquely identifies the subscriber session.
[in] authd_auth_params The authentication parameters required for authentication
[out] auth_rqst_id The request id is generated and returned so that the client daemon can keep track of the pending request.
Returns:
The possible return values are
  • AUTHD_SESSION_INV_HANDLE invalid session handle is passed in
  • AUTHD_SESSION_AUTH_DUP_RQST the same auth rqst is still pending
  • AUTHD_SESSION_NOMEM out of memory
  • AUTHD_SESSION_OK successful

int junos_authd_session_reauthenticate_abort authd_client_session_handle  handle,
sdb_session_id_t  sub_id,
auth_rqst_id_t rqst_id
 

This API function is called by the client daemon to inform AUTHD that the re-authenticate request for the subscriber session is being aborted.

AUTHD must notify back the client daemon when it has finished processing this abort request.

Parameters:
[in] handle The client daemon session handle.
[in] sub_id The id which uniquely identifies the subscriber session.
[out] rqst_id The request id is generated and returned so that the client daemon can keep track of the pending request.
Returns:
The possible return values are
  • AUTHD_SESSION_INV_HANDLE invalid session handle is passed in
  • AUTHD_SESSION_NOMEM out of memory
  • AUTHD_SESSION_RQST_PEND_QUE_INS_FAILED max pending rqst reached
  • AUTHD_SESSION_OK successful

int junos_authd_session_register authd_client_session_handle  handle,
const char *  instance,
u_int32_t  len,
auth_rqst_id_t auth_rqst_id
 

This API is called to register a connection id with authd.

This connection id is used by authd to identify the connection back to the calling client. It's client's responsibility to provide a consistent instance string across reconnects.

Parameters:
[in] handle The client daemon session handle.
[in] instance unique string to identify an instance. Can be null if the application is a singleton.
[in] len Length of the instance array
[out] auth_rqst_id The request id is generated and returned so that the client daemon can keep track of the pending request. If however, the client passes a valid auth_rqst_id(!=AUTHD_INVALID_AUTH_RQST_ID) meaning that the client daemon wishes to use its own generated request id, then the authd library will NOT generate a new request id, instead the same passin request id is returned.
Returns:
0 on success, -1 otherwise.
  • [EISCONN] Connection is not ready.

int junos_authd_session_reply_get authd_client_session_handle  handle  ) 
 

This API function is called by the client daemon to handle the reply message from the authd, after decoding the messages the related callback functions are invoked to the client daemon.

Parameters:
[in] handle The client daemon session handle.
Returns:
The possible return valures are
  • AUTHD_SESSION_INV_HANDLE invalid session handle is passed in
  • AUTHD_SESSION_CB_NOT_FOUND The callback foundtion is not found
  • AUTHD_SESSION_PEND_RQST_NOT_FOUND The pending rqst is not found.
  • AUTHD_SESSION_OK successful

const char* junos_authd_session_strerr int  errnum  ) 
 

Get the error string.

Parameters:
[in] errnum Error number
Returns:
Error string

int junos_authd_session_update_client_daemon_info authd_client_session_handle  handle,
authd_client_daemon_info_t  client_info,
auth_rqst_id_t rqst_id
 

This API function is called by the client daemon to send the client daemon information to AUTHD.

The client daemon info are client related not subscriber specific. For example in the dhcp case, the option-82 info can be updated to the AUTHD.

Parameters:
[in] handle The client daemon session handle.
[in] client_info The client daemon info TLVs
[out] rqst_id The request id is generated and returned so that the client daemon can keep track of the pending request. If however, the client passes a valid auth_rqst_id(!=AUTHD_INVALID_AUTH_RQST_ID) meaning that the client daemon wishes to use its own generated request id, then the authd library will NOT generate a new request id, instead the same passin request id is returned.
Returns:
The possible return valures are
  • AUTHD_SESSION_INV_HANDLE invalid session handle is passed in
  • AUTHD_SESSION_NOMEM out of memory
  • AUTHD_SESSION_RQST_PEND_QUE_INS_FAILED max pending rqst reached
  • AUTHD_SESSION_OK successful

int junos_authd_session_user_logout authd_client_session_handle  handle,
sdb_session_id_t  user_id,
auth_rqst_id_t rqst_id
 

This API function is called by the client daemon to inform the ATUHD that the subscriber is going to logout, the AUTHD might need to do its part of cleaning up.

(i.e. send out accounting info, etc)

Parameters:
[in] handle The client daemon session handle.
[in] user_id The subscriber session id.
[out] rqst_id The request id is generated and returned so that the client daemon can keep track of the pending request. If however, the client passes a valid auth_rqst_id(!=AUTHD_INVALID_AUTH_RQST_ID) meaning that the client daemon wishes to use its own generated request id, then the authd library will NOT generate a new request id, instead the same passin request id is returned.
Returns:
The possible return valures are
  • AUTHD_SESSION_INV_HANDLE invalid session handle is passed in
  • AUTHD_SESSION_NOMEM out of memory
  • AUTHD_SESSION_RQST_PEND_QUE_INS_FAILED max pending rqst reached
  • AUTHD_SESSION_OK successful

int junos_authd_user_session_terminated authd_client_session_handle  handle,
sdb_session_id_t  user_id,
auth_rqst_id_t rqst_id
 

This API function is called by the client daemon to inform ATUHD that the subscriber session entry has been marked 'terminated', and AUTHD must notify back the client daemon when it is Ok to remove the session entriely.

Parameters:
[in] handle The client daemon session handle.
[in] user_id The subscriber session id.
[out] rqst_id The request id is generated and returned so that the client daemon can keep track of the pending request. If however, the client passes a valid auth_rqst_id(!=AUTHD_INVALID_AUTH_RQST_ID) meaning that the client daemon wishes to use its own generated request id, then the authd library will NOT generate a new request id, instead the same passin request id is returned.
Returns:
The possible return valures are
  • AUTHD_SESSION_INV_HANDLE invalid session handle is passed in
  • AUTHD_SESSION_NOMEM out of memory
  • AUTHD_SESSION_RQST_PEND_QUE_INS_FAILED max pending rqst reached
  • AUTHD_SESSION_OK successful


2007-2009 Juniper Networks, Inc. All rights reserved. The information contained herein is confidential information of Juniper Networks, Inc., and may not be used, disclosed, distributed, modified, or copied without the prior written consent of Juniper Networks, Inc. in an express license. This information is subject to change by Juniper Networks, Inc. Juniper Networks, the Juniper Networks logo, and JUNOS are registered trademarks of Juniper Networks, Inc. in the United States and other countries. All other trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Generated on Sun May 30 20:23:22 2010 for libauthd by Doxygen 1.4.5