/* ipdiameter_client.h - IPNet Diameter client header file */ /* * Copyright (c) 2007 Wind River Systems, Inc. * * The right to copy, distribute or otherwise make use of this software * may be licensed only pursuant to the terms of an applicable Wind River * license agreement. No license to Wind River intellectual property rights * is granted herein. All rights not licensed by Wind River are reserved * by Wind River. */ /* modification history -------------------- 01c,01aug07,tlu Add client specific open function 01b,13jun07,tlu Update after code review 01a,09apr07,tlu Created. */ #ifndef IPDIAMETER_CLIENT_H #define IPDIAMETER_CLIENT_H /* **************************************************************************** * DESCRIPTION **************************************************************************** * Header file for Diameter client */ /* **************************************************************************** * INCLUDE FILES **************************************************************************** */ #include #include "ipdiameter.h" #ifdef __cplusplus extern "C" { #endif /* **************************************************************************** * Application APIs **************************************************************************** */ /* *=========================================================================== * ipdiameter_access_request *=========================================================================== * Description: Send out an access request message * Parameters: * Returns: IPCOM_SUCCESS or error code. * */ IP_PUBLIC Ip_err ipdiameter_access_request(Ipdiameter_header *packet, Ipdiameter_request *request, Ip_u8 *errattr); /* *=========================================================================== * ipdiameter_register_access_function *=========================================================================== * Description: Register a user callback function * Parameters: * Returns: * */ void ipdiameter_register_access_function(Ip_u32 code, void (*callback) (Ip_u32 code, Ipdiameter_header *packet, Ipdiameter_peer_entry *peer, void *opaque_callback_data), void *opaque_callback_data); /* *=========================================================================== * ipdiameter_deregister_access_function *=========================================================================== * Description: Deregister a user callback function * Parameters: * Returns: * */ void ipdiameter_deregister_access_function(Ip_u32 code); /* **************************************************************************** * PUBLIC FUNCTIONS **************************************************************************** */ /* *=========================================================================== * ipdiameterc_create *=========================================================================== * Description: Initialize IPDIAMETER client global data 'ipdiameter' * Parameters: . * Returns: IPCOM_SUCCESS or error code. * */ IP_PUBLIC Ip_err ipdiameterc_create(void); /* *=========================================================================== * ipdiameterc_exit *=========================================================================== * Description: Release, i.e. free, temporary IPDIAMETER dynamic memory. * Parameters: . * Returns: . * */ IP_PUBLIC Ip_err ipdiameterc_exit(void); /* *=========================================================================== * ipdiameterc_close *=========================================================================== * Description: Close an opened IPDIAMETER. * Parameters: . * Returns: IPCOM_ERR_ALREADY_CLOSED - Failed to close since not open. * IPCOM_SUCCESS - Success. * */ IP_PUBLIC Ip_err ipdiameterc_close(void); /* *=========================================================================== * ipdiameterc_open *=========================================================================== * Description: Open IPDIAMETER client: read in client specific * configuration parameters. * Parameters: . * Returns: IPCOM_ERR_INVALID_CONFIG - invalid config parameters. * IPCOM_SUCCESS - Success. * */ IP_PUBLIC Ip_err ipdiameterc_open(void); /* *=========================================================================== * ipdiameterc_start *=========================================================================== * Description: Start IPDIAMETER daemon. * Parameters: . * Returns: IPCOM_ERR_ALREADY_CLOSED - Failed to start the daemon. * IPCOM_SUCCESS - Success. * */ IP_PUBLIC Ip_err ipdiameterc_start(void); /* *=========================================================================== * ipdiameterc_stop *=========================================================================== * Description: Stop IPDIAMETER daemon. * Parameters: . * Returns: IPCOM_ERR_NOT_STARTED - Failed to stop the daemon. * IPCOM_SUCCESS - Success. * */ IP_PUBLIC Ip_err ipdiameterc_stop(void); #ifdef __cplusplus } #endif #endif /*#ifndef IPDIAMETER_CLIENT_H*/ /* **************************************************************************** * END OF FILE **************************************************************************** */