184 lines
5.6 KiB
C
184 lines
5.6 KiB
C
|
|
/*
|
|
******************************************************************************
|
|
* HEADER FILE
|
|
*
|
|
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipl2tp_data.h,v $ $Revision: 1.2 $
|
|
* $Source: /home/interpeak/CVSRoot/ipl2tp/src/ipl2tp_data.h,v $
|
|
* $Author: joel $ $Date: 2006-01-30 10:47:45 $
|
|
* $State: Exp $ $Locker: $
|
|
*
|
|
* INTERPEAK_COPYRIGHT_STRING
|
|
* Design and implementation by Joel Hortelius <joel.hortelius@interpeak.se>
|
|
******************************************************************************
|
|
*/
|
|
#ifndef IPL2TP_DATA_H
|
|
#define IPL2TP_DATA_H
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 1 DESCRIPTION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 2 CONFIGURATION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 3 INCLUDE FILES
|
|
****************************************************************************
|
|
*/
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 4 DEFINES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 5 TYPES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 6 FUNCTIONS
|
|
****************************************************************************
|
|
*/
|
|
extern Ipl2tp_context ipl2tp;
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipl2tp_data_init
|
|
*===========================================================================
|
|
* Description: Init the global data object
|
|
* Parameters:
|
|
* Returns:
|
|
*
|
|
*/
|
|
IP_GLOBAL Ipl2tp_status ipl2tp_data_init(void);
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipl2tp_data_exit
|
|
*===========================================================================
|
|
* Description: Free any resources allocated by ipl2tp_data_init.
|
|
* Parameters:
|
|
* Returns:
|
|
*
|
|
*/
|
|
IP_GLOBAL void ipl2tp_data_exit(void);
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipl2tp_tunnel_new
|
|
*===========================================================================
|
|
* Description: Retrieve a tunnel descriptor.
|
|
* Parameters: version - Protocol version
|
|
* addr - The address being used.
|
|
* Returns: A new tunnel.
|
|
*
|
|
*/
|
|
IP_GLOBAL Ipl2tp_tunnel *ipl2tp_tunnel_new(Ipl2tp_version version,
|
|
union Ip_sockaddr_union *addr);
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipl2tp_session_new
|
|
*===========================================================================
|
|
* Description: Retrieve a session descriptor
|
|
* Parameters: tunnel - The tunnel this session belongs to.
|
|
* cookie - Cookie for identification of the session.
|
|
* cookie_size - Size of the cookie [max 8].
|
|
* Returns: The session
|
|
*
|
|
*/
|
|
IP_GLOBAL Ipl2tp_session *ipl2tp_session_new(Ipl2tp_tunnel *tunnel,
|
|
void *cookie,
|
|
Ip_u8 cookie_size);
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipl2tp_tunnel_malloc
|
|
*===========================================================================
|
|
* Description: Allocate a new tunnel descriptor.
|
|
* Parameters:
|
|
* Returns: The tunnel.
|
|
*
|
|
*/
|
|
IP_GLOBAL Ipl2tp_tunnel *ipl2tp_tunnel_malloc(void);
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipl2tp_session_malloc
|
|
*===========================================================================
|
|
* Description: Allocate a new session descriptor.
|
|
* Parameters:
|
|
* Returns: The session.
|
|
*
|
|
*/
|
|
IP_GLOBAL Ipl2tp_session *ipl2tp_session_malloc(void);
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipl2tp_tunnel_delete
|
|
*===========================================================================
|
|
* Description: Delete a tunnel
|
|
* Parameters: tunnel - The tunnel descriptor.
|
|
* Returns:
|
|
*
|
|
*/
|
|
IP_GLOBAL void ipl2tp_tunnel_delete(Ipl2tp_tunnel *tunnel);
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipl2tp_session_delete
|
|
*===========================================================================
|
|
* Description: Delete a session
|
|
* Parameters: session - The session descriptor.
|
|
* Returns:
|
|
*
|
|
*/
|
|
IP_GLOBAL void ipl2tp_session_delete(Ipl2tp_session *session);
|
|
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipl2tp_disable
|
|
*===========================================================================
|
|
* Description: Disable IPL2TP temporarily. All tunnels and sessions
|
|
* are closed and deleted.
|
|
* Parameters:
|
|
* Returns: IPL2TP_STATUS_OK if success.
|
|
*
|
|
*/
|
|
IP_GLOBAL Ipl2tp_status ipl2tp_disable(void);
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|