Files
m241Neelima/components/ip_net2-6.9/ipmipmn/src/ipmipmn_node.h
T
2026-07-30 11:19:44 +05:30

241 lines
5.8 KiB
C

/* ipmipmn_node.h - ipmipmn_node.h */
/*
******************************************************************************
* HEADER FILE
*
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipmipmn_node.h,v $ $Revision: 1.21 $
* $Source: /home/interpeak/CVSRoot/ipmipmn/src/ipmipmn_node.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_NODE_H
#define IPMIPMN_NODE_H
/*
****************************************************************************
* 1 DESCRIPTION
****************************************************************************
*/
/*
DESCRIPTION
No description currently provided
*/
/*
****************************************************************************
* 2 CONFIGURATION
****************************************************************************
*/
/*
****************************************************************************
* 3 INCLUDE FILES
****************************************************************************
*/
#include <private/ipmipmn_api_node.h>
#include "ipmipmn_if.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
****************************************************************************
* 4 DEFINES
****************************************************************************
*/
enum
{
IPMIPMN_NODE_IFP_SOLICIT_DONE = 0,
IPMIPMN_NODE_IFP_SOLICIT_MAY = 1,
IPMIPMN_NODE_IFP_SOLICIT_REQUIRED = 2
};
/*
****************************************************************************
* 5 TYPES
****************************************************************************
*/
/* Changing the config data below requires a complete reboot */
typedef struct Ipmipmn_node_conf_primary
{
Ip_u32 home_address; /* home address */
Ip_u32 home_netmask; /* home network mask */
Ip_u32 home_gateway; /* home network mask */
Ip_bool reordering;
/* Dynamically allocated data below this line */
Ipmip4_msgext_uhdr_t *nai_mn;
int *coa_lookup;
}
Ipmipmn_node_conf_primary_t;
/* Changing this config data allows current connections to survive */
typedef struct Ipmipmn_node_conf_secondary
{
Ip_bool nat_t;
Ip_bool nat_t_forced;
Ip_bool ipike_reconfigure;
Ip_bool ipike_mobility;
Ip_bool revocation;
Ip_bool simbind;
Ip_u16 nat_t_keepalive;
Ip_s8 nat_t_tunnel;
Ip_s8 tunneltype;
int mtu;
int solicitations;
/* Dynamically allocated data below this line */
char *ifname;
}
Ipmipmn_node_conf_secondary_t;
typedef struct Ipmipmn_node_conf
{
Ipmipmn_api_node_conf_t api;
Ipmipmn_node_conf_primary_t primary;
Ipmipmn_node_conf_secondary_t secondary;
char **excluded;
} Ipmipmn_node_conf_t;
struct Ipmipmn_route_node;
typedef struct Ipmipmn_node
{
/* Generic Node */
Ipmipmn_api_node_t api;
Ipmipmn_node_conf_t *conf;
/* Configuration name */
char *name;
/* Policy, tunnel and routes */
struct Ipmipmn_route_node *route;
Ipmipmn_iff_notify_t mnRegIFPNotifier;
int mnRegIFPSyncCounter;
Ip_u8 mnRegIFPSolicit;
Ipmipmn_api_coa_t *mnRegLastCoA;
Ipmip_timer_t mnProbeTimer;
} Ipmipmn_node_t;
extern Ipmipmn_api_node_functable_t ipmipmn_node_func;
extern Ipmipmn_api_node_state_functable_t ipmipmn_node_state_func;
/*
****************************************************************************
* 6 FUNCTIONS
****************************************************************************
*/
/*******************************************************************************
*
* ipmipmn_node_reconfigure - ipmipmn_node_reconfigure
*
* Reconfigure the nodes in the context
*
* Parameters:
* \is
* \i data
* The context
* \i proc
* The process
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
* \NOMANUAL
*/
IP_GLOBAL void ipmipmn_node_reconfigure
(
struct Ipmipmn_context *data,
struct Ipmip_proc *proc
);
/*******************************************************************************
*
* ipmipmn_node_alloc - ipmipmn_node_alloc
*
* Create a node.
*
* Parameters:
* \is
* \i data
* Context
* \i proc
* Process
* \i name
* Node name
* \ie
*
* RETURNS: The allocated node.
*
* ERRNO:
*
* \NOMANUAL
*/
IP_GLOBAL Ipmipmn_node_t * ipmipmn_node_alloc
(
struct Ipmipmn_context *data,
struct Ipmip_proc *proc,
const char *name
);
/*******************************************************************************
*
* ipmipmn_node_init_coa - ipmipmn_node_init_coa
*
* Init parameters for a new CoA
*
* Parameters:
* \is
* \i data
* Context
* \i proc
* Process
* \i node
* The Node
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
* \NOMANUAL
*/
IP_GLOBAL void ipmipmn_node_init_coa
(
struct Ipmipmn_context *data,
struct Ipmip_proc *proc,
Ipmipmn_node_t *node
);
#ifdef __cplusplus
}
#endif
#endif
/*
****************************************************************************
* END OF FILE
****************************************************************************
*/