302 lines
6.5 KiB
C
302 lines
6.5 KiB
C
/* ipmipfa_route.h - ipmipfa_route.h */
|
|
/*
|
|
******************************************************************************
|
|
* HEADER FILE
|
|
*
|
|
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipmipfa_route.h,v $ $Revision: 1.9 $
|
|
* $Source: /home/interpeak/CVSRoot/ipmipfa/src/ipmipfa_route.h,v $
|
|
* $Author: jhorteli $ $Date: 2010-10-15 11:28:07 $
|
|
* $State: Exp $ $Locker: $
|
|
*
|
|
* INTERPEAK_COPYRIGHT_STRING
|
|
* Design and implementation by Joel Hortelius <joel.hortelius@interpeak.se>
|
|
******************************************************************************
|
|
*/
|
|
#ifndef IPMIPFA_ROUTE_H
|
|
#define IPMIPFA_ROUTE_H
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 1 DESCRIPTION
|
|
****************************************************************************
|
|
*/
|
|
/*
|
|
DESCRIPTION
|
|
|
|
No description currently provided
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 2 CONFIGURATION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 3 INCLUDE FILES
|
|
****************************************************************************
|
|
*/
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 4 DEFINES
|
|
****************************************************************************
|
|
*/
|
|
#define IPMIPFA_ROUTE_BASE_PRID (100)
|
|
#define IPMIPFA_ROUTE_PRID(x) (IPMIPFA_ROUTE_BASE_PRID + (x))
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 5 TYPES
|
|
****************************************************************************
|
|
*/
|
|
struct Ipmipfa_data;
|
|
struct Ipmipfa_iff;
|
|
struct Ipmipfa_node;
|
|
struct Ipnet_policy_routing_rule;
|
|
|
|
typedef struct Ipmipfa_route_context
|
|
{
|
|
struct Ipmipfa_data *data;
|
|
/* */
|
|
Ip_u32 fwd_table; /* Basic forwarding table */
|
|
|
|
Ip_u32 blk_table; /* Home agent routing table */
|
|
|
|
#if 0
|
|
Ip_u32 tnl_if_rule_id;
|
|
Ip_u32 fwd_fa_rule_id;
|
|
#endif
|
|
} Ipmipfa_route_context_t;
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 6 FUNCTIONS
|
|
****************************************************************************
|
|
*/
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmipfa_route_context_alloc - ipmipfa_route_context_alloc
|
|
*
|
|
* Allocate a route context
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i data
|
|
* The FA context
|
|
* \i proc
|
|
* Current process
|
|
* \ie
|
|
*
|
|
* RETURNS: IP_TRUE on success
|
|
*
|
|
* ERRNO:
|
|
*
|
|
* \NOMANUAL
|
|
*/
|
|
IP_GLOBAL Ip_bool ipmipfa_route_context_alloc
|
|
(
|
|
struct Ipmipfa_data *data,
|
|
struct Ipmip_proc *proc
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmipfa_route_context_destroy - ipmipfa_route_context_destroy
|
|
*
|
|
* Destroy a route context
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i data
|
|
* Context
|
|
* \i proc
|
|
* Process
|
|
* \ie
|
|
*
|
|
* RETURNS: No return value
|
|
*
|
|
* ERRNO:
|
|
*
|
|
* \NOMANUAL
|
|
*/
|
|
IP_GLOBAL void ipmipfa_route_context_destroy
|
|
(
|
|
struct Ipmipfa_data *data,
|
|
struct Ipmip_proc *proc
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmipfa_route_policy_init - ipmipfa_route_policy_init
|
|
*
|
|
* Initialize a routing policy rule based on a routing
|
|
* table.
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i rule
|
|
* The rule to initialize.
|
|
* \i table
|
|
* The table to initialize it to.
|
|
* \ie
|
|
*
|
|
* RETURNS: No return value
|
|
*
|
|
* ERRNO:
|
|
*
|
|
* \NOMANUAL
|
|
*/
|
|
IP_GLOBAL void ipmipfa_route_policy_init
|
|
(
|
|
struct Ipnet_policy_routing_rule *rule,
|
|
Ip_u32 table
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmipfa_route_local - ipmipfa_route_local
|
|
*
|
|
* Add or delete a forward route for a specific node.
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i data
|
|
* Context
|
|
* \i proc
|
|
* Process
|
|
* \i add
|
|
* IP_TRUE to add, IP_FALSE to delete.
|
|
* \i node
|
|
* The node to route for
|
|
* \ie
|
|
*
|
|
* RETURNS: IP_TRUE if the route was successfully processed
|
|
*
|
|
* ERRNO:
|
|
*
|
|
* \NOMANUAL
|
|
*/
|
|
IP_GLOBAL Ip_bool ipmipfa_route_local
|
|
(
|
|
struct Ipmipfa_data *data,
|
|
struct Ipmip_proc *proc,
|
|
Ip_bool add,
|
|
struct Ipmipfa_node *node
|
|
);
|
|
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmipfa_route_tunnel - ipmipfa_route_tunnel
|
|
*
|
|
* Setup the tunnel for a specific node.
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i data
|
|
* Context
|
|
* \i proc
|
|
* Current process.
|
|
* \i add
|
|
* IP_TRUE to add, IP_FALSE to delete.
|
|
* \i node
|
|
* The node we're dealing with
|
|
* \i nat_t
|
|
* Is NAT-T enabled or not.
|
|
* \ie
|
|
*
|
|
* RETURNS: No return value
|
|
*
|
|
* ERRNO:
|
|
*
|
|
* \NOMANUAL
|
|
*/
|
|
IP_GLOBAL void ipmipfa_route_tunnel
|
|
(
|
|
struct Ipmipfa_data *data,
|
|
struct Ipmip_proc *proc,
|
|
Ip_bool add,
|
|
struct Ipmipfa_node *node,
|
|
Ip_bool nat_t
|
|
);
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmipfa_route_skip - ipmipfa_route_skip
|
|
*
|
|
* Setup the skip route for a specific node.
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i data
|
|
* Context
|
|
* \i proc
|
|
* Current process
|
|
* \i add
|
|
* IP_TRUE to add, IP_FALSE to delete
|
|
* \i node
|
|
* The node we're dealing with
|
|
* \ie
|
|
*
|
|
* RETURNS: No return value
|
|
*
|
|
* ERRNO:
|
|
*
|
|
* \NOMANUAL
|
|
*/
|
|
IP_GLOBAL void ipmipfa_route_skip
|
|
(
|
|
struct Ipmipfa_data *data,
|
|
struct Ipmip_proc *proc,
|
|
Ip_bool add,
|
|
struct Ipmipfa_node *node
|
|
);
|
|
|
|
|
|
|
|
IP_GLOBAL int ipmipfa_netlink_new_handle
|
|
(
|
|
struct Ipmipfa_data *ctx,
|
|
struct Ipmip_proc *proc,
|
|
struct Ipmipfa_node *node
|
|
);
|
|
|
|
IP_GLOBAL int ipmipfa_netlink_del_handle
|
|
(
|
|
struct Ipmipfa_data *ctx,
|
|
struct Ipmip_proc *proc,
|
|
struct Ipmipfa_node *node
|
|
);
|
|
|
|
|
|
IP_GLOBAL Ip_bool ipmipfa_netlink_get_handle_stat
|
|
(
|
|
struct Ipmipfa_data *ctx,
|
|
struct Ipmip_proc *proc,
|
|
struct Ipmipfa_node *node
|
|
);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* END OF FILE
|
|
****************************************************************************
|
|
*/
|