174 lines
5.1 KiB
C
174 lines
5.1 KiB
C
|
|
/*
|
|
******************************************************************************
|
|
* HEADER FILE
|
|
*
|
|
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipmipmn_api_pktbuf.h,v $ $Revision: 1.4 $
|
|
* $Source: /home/interpeak/CVSRoot/ipmipmn/include/private/ipmipmn_api_pktbuf.h,v $
|
|
* $Author: ulf $ $Date: 2009-06-08 11:05:54 $
|
|
* $State: Exp $ $Locker: $
|
|
*
|
|
* INTERPEAK_COPYRIGHT_STRING
|
|
* Design and implementation by Joel Hortelius <joel.hortelius@interpeak.se>
|
|
******************************************************************************
|
|
*/
|
|
#ifndef IPMIPMN_API_PKTBUF_H
|
|
#define IPMIPMN_API_PKTBUF_H
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 1 DESCRIPTION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 2 CONFIGURATION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 3 INCLUDE FILES
|
|
****************************************************************************
|
|
*/
|
|
|
|
#include <private/ipmip4_pktbuf.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 4 DEFINES
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 5 TYPES
|
|
****************************************************************************
|
|
*/
|
|
|
|
typedef struct Ipmipmn_api_pktbuf_reginfo
|
|
{
|
|
Ip_u32 mnRegRegIDLow;
|
|
Ip_u32 mnRegSPIMobileForeign;
|
|
Ip_u32 mnRegSPIMobileHome;
|
|
Ip_u8 mnRegTunnelFlags;
|
|
Ip_u8 mnRegTunnelType;
|
|
Ip_u8 mnRegFlags;
|
|
Ip_u8 mnRegReRegistration;
|
|
} Ipmipmn_api_pktbuf_reginfo_t;
|
|
|
|
|
|
typedef struct Ipmipmn_api_pktbuf_pktinfo
|
|
{
|
|
|
|
Ip_u8 mnRegRegType;
|
|
Ip_u8 mnRegErrorCode;
|
|
Ip_u8 mnRegFAErrorCode;
|
|
Ip_u8 mnRegParsingState;
|
|
Ip_u32 mnRegHomeAddress;
|
|
Ip_u32 mnRegHomeAgentAddress;
|
|
Ip_u32 mnRegRegIDHigh;
|
|
Ip_u16 mnRegTimeGranted;
|
|
Ip_u16 mnRegNATTraversalKeepAlive;
|
|
|
|
Ip_u16 mnRegOptions;
|
|
Ip_u32 mnRegRevocationTimeStamp;
|
|
Ip_u32 mnRegCOA;
|
|
} Ipmipmn_api_pktbuf_pktinfo_t;
|
|
|
|
|
|
typedef struct Ipmipmn_api_pktbuf_advinfo
|
|
{
|
|
Ip_u16 lifetime;
|
|
Ip_u16 flags;
|
|
Ip_u16 adv_seq;
|
|
Ip_u32 coa;
|
|
} Ipmipmn_api_pktbuf_advinfo_t;
|
|
|
|
struct Ipmip4_if;
|
|
struct Ipmipmn_api_node;
|
|
struct Ipmipmn_api_pktbuf;
|
|
struct Ipmip_proc;
|
|
struct Ipmipmn_api_context;
|
|
struct Ipmipmn_api_iff;
|
|
|
|
typedef int (*Ipmipmn_api_pktbuf_output_t)
|
|
(
|
|
struct Ipmipmn_api_context *data,
|
|
struct Ipmip_proc *proc,
|
|
struct Ipmipmn_api_node *node,
|
|
struct Ipmipmn_api_pktbuf *pbuf,
|
|
Ip_bool deregister,
|
|
Ip_u32 src,
|
|
Ip_u32 dst
|
|
);
|
|
|
|
|
|
typedef struct Ipmipmn_api_pktbuf
|
|
{
|
|
Ipmip4_pktbuf_t ipmip4;
|
|
|
|
Ip_u32 from;
|
|
Ip_u32 to;
|
|
|
|
Ip_u32 processed;
|
|
|
|
/* The arriving interface */
|
|
union
|
|
{
|
|
struct Ipmipmn_api_iff *priv;
|
|
struct Ipmip4_if *pub;
|
|
} iff;
|
|
|
|
|
|
/* The received reply for a request */
|
|
Ipmipmn_api_pktbuf_pktinfo_t pktinfo;
|
|
Ipmipmn_api_pktbuf_reginfo_t reginfo;
|
|
Ipmipmn_api_pktbuf_advinfo_t advinfo;
|
|
|
|
struct Ipmip4_auth_spi *mnRegSPIMobileHome;
|
|
struct Ipmip4_auth_spi *mnRegSPIMobileForeign;
|
|
} Ipmipmn_api_pktbuf_t;
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 6 FUNCTIONS
|
|
****************************************************************************
|
|
*/
|
|
|
|
|
|
/*
|
|
*===========================================================================
|
|
* ipmipmn_pktbuf_free
|
|
*===========================================================================
|
|
* Description: Free a packet buffer
|
|
* Parameters: ctx - Context
|
|
* proc - Process
|
|
* pbuf - The packet buffer
|
|
* Returns:
|
|
*
|
|
*/
|
|
IP_GLOBAL void ipmipmn_api_pktbuf_free(struct Ipmipmn_api_context *ctx,
|
|
struct Ipmip_proc *proc,
|
|
Ipmipmn_api_pktbuf_t *pbuf);
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* END OF FILE
|
|
****************************************************************************
|
|
*/
|