217 lines
6.5 KiB
C
217 lines
6.5 KiB
C
|
|
/*
|
|
******************************************************************************
|
|
* HEADER FILE
|
|
*
|
|
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipmipfa_pktbuf.h,v $ $Revision: 1.11 $
|
|
* $Source: /home/interpeak/CVSRoot/ipmipfa/config/ipmipfa_pktbuf.h,v $
|
|
* $Author: jhorteli $ $Date: 2009-06-17 11:00:48 $
|
|
* $State: Exp $ $Locker: $
|
|
*
|
|
* INTERPEAK_COPYRIGHT_STRING
|
|
* Design and implementation by Joel Hortelius <joel.hortelius@interpeak.se>
|
|
******************************************************************************
|
|
*/
|
|
#ifndef IPMIPFA_PKTBUF_H
|
|
#define IPMIPFA_PKTBUF_H
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 1 DESCRIPTION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 2 CONFIGURATION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 3 INCLUDE FILES
|
|
****************************************************************************
|
|
*/
|
|
|
|
#include <private/ipmip4_pktbuf.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 4 DEFINES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 5 TYPES
|
|
****************************************************************************
|
|
*/
|
|
struct Ipmipfa_pktbuf;
|
|
struct Ipmipfa_node;
|
|
struct Ipmipfa_data;
|
|
struct Ipmipfa_extension;
|
|
|
|
typedef void (*Ipmipfa_pktbuf_rrp_t)
|
|
(
|
|
struct Ipmipfa_data *ctx,
|
|
struct Ipmip_proc *proc,
|
|
struct Ipmipfa_pktbuf *pbuf
|
|
);
|
|
|
|
struct Ipmip4_if;
|
|
struct Ipmip4_auth_spi;
|
|
typedef struct Ipmipfa_pktbuf_pktinfo
|
|
{
|
|
Ip_u32 faVisitorHomeAgentAddress;
|
|
Ip_u32 faVisitorHomeAgentAddressRequested;
|
|
Ip_u32 faVisitorHomeAddress;
|
|
Ip_u32 faVisitorHomeAddressRequested;
|
|
Ip_u32 faVisitorRegIDLow;
|
|
Ip_u32 faVisitorRevocationTimeStamp;
|
|
|
|
Ip_u32 faVisitorAccessType;
|
|
|
|
Ip_u16 faVisitorTimeGranted;
|
|
Ip_u16 faVisitorOptions;
|
|
|
|
|
|
/* Non MIB related variables */
|
|
Ip_u8 faVisitorHAErrorCode;
|
|
Ip_u8 faVisitorFAErrorCode;
|
|
Ip_u8 faVisitorRegType;
|
|
Ip_u8 faVisitorParsingState;
|
|
|
|
Ip_u8 faVisitorMobileHomeSAPolicyOK;
|
|
Ip_u8 faVisitorMobileForeignSAPolicyOK;
|
|
Ip_u8 faVisitorForeignHomeSAPolicyOK;
|
|
|
|
/* Inner auth */
|
|
Ipmip4_msgext_uhdr_t *faVisitorInnerAuth;
|
|
Ip_size_t faVisitorInnerAuthSize;
|
|
|
|
/* Intermediate auth */
|
|
Ipmip4_msgext_uhdr_t *faVisitorAAAAuth;
|
|
Ip_size_t faVisitorAAAAuthSize;
|
|
|
|
/* Outer auth */
|
|
Ipmip4_msgext_uhdr_t *faVisitorOuterAuth;
|
|
Ip_size_t faVisitorOuterAuthSize;
|
|
} Ipmipfa_pktbuf_pktinfo_t;
|
|
|
|
typedef struct Ipmipfa_pktbuf_reginfo
|
|
{
|
|
Ip_u32 faVisitorRegIDHigh;
|
|
|
|
struct Ipmip4_auth_spi *faVisitorSPIMobileForeign;
|
|
struct Ipmip4_auth_spi *faVisitorSPIForeignHome;
|
|
struct Ipmip4_auth_spi *faVisitorSPIForeignForeign;
|
|
|
|
Ip_u32 faVisitorSPIMobileAAA;
|
|
Ip_u32 faVisitorCOA;
|
|
|
|
Ip_u8 faVisitorRegFlags;
|
|
Ip_u8 faVisitorTunnelType;
|
|
Ip_u8 faVisitorTunnelFlags;
|
|
Ip_u16 faVisitorNATTraversalKeepAlive;
|
|
|
|
/**/
|
|
Ip_u32 faVisitorResolvedHomeAgent;
|
|
Ip_u32 faVisitorResolvedHomeAddress;
|
|
|
|
} Ipmipfa_pktbuf_reginfo_t;
|
|
|
|
typedef struct Ipmipfa_pktbuf_llhinfo
|
|
{
|
|
Ipmip_lladdr_t *faVisitorLLA;
|
|
Ipmip_lladdr_t *faVisitorAFA;
|
|
Ip_u32 faVisitorLLHType;
|
|
} Ipmipfa_pktbuf_llhinfo_t;
|
|
|
|
|
|
typedef struct Ipmipfa_pktbuf
|
|
{
|
|
Ipmip4_pktbuf_t ipmip4;
|
|
|
|
/* The arriving interface */
|
|
union
|
|
{
|
|
struct Ipmipfa_iff *priv;
|
|
struct Ipmip4_if *pub;
|
|
} iff;
|
|
|
|
/* The node */
|
|
struct Ipmipfa_node *node;
|
|
|
|
Ip_u32 processed[IPMIPFA_FUNCTION_MAX];
|
|
|
|
/* The received reply for a request */
|
|
Ip_u32 from;
|
|
Ipmipfa_pktbuf_pktinfo_t pktinfo;
|
|
Ipmipfa_pktbuf_reginfo_t reginfo;
|
|
Ipmipfa_pktbuf_llhinfo_t llhinfo;
|
|
|
|
/* Persistent information */
|
|
Ipmip4_msgext_uhdr_t *faVisitorChallenge;
|
|
|
|
struct Ipmipfa_extension *request_transport;
|
|
|
|
Ipmipfa_pktbuf_rrp_t rrp_transport;
|
|
void *rrp_transport_opaque;
|
|
} Ipmipfa_pktbuf_t;
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 6 FUNCTIONS
|
|
****************************************************************************
|
|
*/
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipmipfa_pktbuf_alloc
|
|
*===========================================================================
|
|
* Description: Allocate a packet buffer
|
|
* Parameters: ctx - Context
|
|
* proc - Process
|
|
* Returns: A newly allocated packet buffer
|
|
*
|
|
*/
|
|
IP_GLOBAL Ipmip_pktbuf_t *ipmipfa_pktbuf_alloc(struct Ipmip4_context *ctx,
|
|
struct Ipmip_proc *proc,
|
|
Ip_size_t extra);
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipmipfa_pktbuf_free
|
|
*===========================================================================
|
|
* Description: Free a packet buffer
|
|
* Parameters: ctx - Context
|
|
* proc - Process
|
|
* pbuf - The packet buffer
|
|
* Returns:
|
|
*
|
|
*/
|
|
IP_GLOBAL void ipmipfa_pktbuf_free(struct Ipmip4_context *ctx,
|
|
struct Ipmip_proc *proc,
|
|
Ipmipfa_pktbuf_t *pbuf);
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* END OF FILE
|
|
****************************************************************************
|
|
*/
|