/* ****************************************************************************** * HEADER FILE * * Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipmipha_pktbuf.h,v $ $Revision: 1.10 $ * $Source: /home/interpeak/CVSRoot/ipmipha/config/ipmipha_pktbuf.h,v $ * $Author: jhorteli $ $Date: 2009-12-02 08:50:37 $ * $State: Exp $ $Locker: $ * * INTERPEAK_COPYRIGHT_STRING * Design and implementation by Joel Hortelius ****************************************************************************** */ #ifndef IPMIPHA_PKTBUF_H #define IPMIPHA_PKTBUF_H /* **************************************************************************** * 1 DESCRIPTION **************************************************************************** */ /* **************************************************************************** * 2 CONFIGURATION **************************************************************************** */ /* **************************************************************************** * 3 INCLUDE FILES **************************************************************************** */ #include #ifdef __cplusplus extern "C" { #endif /* **************************************************************************** * 4 DEFINES **************************************************************************** */ /* **************************************************************************** * 5 TYPES **************************************************************************** */ struct Ipmip4_if; struct Ipmipha_data; struct Ipmipha_iff; struct Ipmipha_pktbuf; struct Ipmipha_node; typedef struct Ipmipha_pktbuf_pktinfo { Ip_u32 haBindingHomeAgentAddress; Ip_u32 haBindingResolvedHomeAgentAddress; Ip_u32 haBindingResolvedHomeAddress; Ip_u32 haBindingHomeAddress; Ip_u32 haBindingRegIDLow; Ip_u32 haBindingRegIDHigh; Ip_u16 haBindingTimeGranted; /* Non MIB related variables */ struct Ipmip4_auth_spi *haBindingSPIMobileHome; struct Ipmip4_auth_spi *haBindingSPIForeignHome; Ip_u32 haBindingSPIMobileAAA; Ip_u32 haBindingCOA; Ip_u32 haBindingTunnelEndpoint; Ip_u8 haBindingHomeAddressRequested; Ip_u8 haBindingHAErrorCode; Ip_u8 haBindingRegType; Ip_u8 haBindingParsingState; Ip_u8 haBindingRegFlags; Ip_u8 haBindingTunnelType; Ip_u8 haBindingTunnelFlags; Ip_u8 haBindingMobileHomeSAPolicyOK; Ip_u8 haBindingForeignHomeSAPolicyOK; Ip_u16 haBindingOptions; Ip_u8 haBindingRevocationInform; Ip_u32 haBindingRevocationTimeStamp; /* Inner auth */ Ipmip4_msgext_uhdr_t *haBindingInnerAuth; Ip_size_t haBindingInnerAuthSize; /* AAA auth */ Ipmip4_msgext_uhdr_t *haBindingAAAAuth; Ip_size_t haBindingAAAAuthSize; /* Inner auth */ Ipmip4_msgext_uhdr_t *haBindingOuterAuth; Ip_size_t haBindingOuterAuthSize; } Ipmipha_pktbuf_pktinfo_t; struct Ipmipha_node; struct Ipmipha_node_binding; struct Ipmipha_extension; typedef struct Ipmipha_pktbuf { Ipmip4_pktbuf_t ipmip4; /* The arriving interface */ union { struct Ipmipha_iff *priv; struct Ipmip4_if *pub; } iff; /* The node */ struct Ipmipha_node *node; struct Ipmipha_node_binding *binding; /* The received reply for a request */ Ipmipha_pktbuf_pktinfo_t pktinfo; /* Persistent information */ Ip_time_t haBindingTimeStamp; struct Ipmip4_auth_spi *haBindingHomeSA; struct Ipmip4_auth_spi *haBindingForeignSA; Ip_bool haBindingAAAVerified; Ip_u32 processed[IPMIPHA_FUNCTION_MAX]; Ipmip_buffer_t reply_mn; Ipmip_buffer_t reply_fa; struct Ipmipha_extension *reply_transport; } Ipmipha_pktbuf_t; /* **************************************************************************** * 6 FUNCTIONS **************************************************************************** */ /* *=========================================================================== * ipmipha_pktbuf_alloc *=========================================================================== * Description: Allocate a packet buffer * Parameters: ctx - Context * proc - Process * Returns: A newly allocated packet buffer * */ IP_GLOBAL Ipmip_pktbuf_t *ipmipha_pktbuf_alloc(struct Ipmip4_context *ctx, struct Ipmip_proc *proc, Ip_size_t extra); /* *=========================================================================== * ipmipha_pktbuf_free *=========================================================================== * Description: Free a packet buffer * Parameters: ctx - Context * proc - Process * pbuf - The packet buffer * Returns: * */ IP_GLOBAL void ipmipha_pktbuf_free(struct Ipmip4_context *ctx, struct Ipmip_proc *proc, Ipmipha_pktbuf_t *pbuf); #ifdef __cplusplus } #endif #endif /* **************************************************************************** * END OF FILE **************************************************************************** */