157 lines
5.1 KiB
C
157 lines
5.1 KiB
C
/* ipmip_netlink_kern.h - ipmip_netlink_kern.h */
|
|
/*
|
|
******************************************************************************
|
|
* HEADER FILE
|
|
*
|
|
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipmip_netlink_kern.h,v $ $Revision: 1.6.10.1 $
|
|
* $Source: /home/interpeak/CVSRoot/ipmip/include/private/ipmip_netlink_kern.h,v $
|
|
* $Author: svc-cmnet $ $Date: 2013-03-13 07:45:30 $
|
|
* $State: Exp $ $Locker: $
|
|
*
|
|
* INTERPEAK_COPYRIGHT_STRING
|
|
* Design and implementation by Joel Hortelius <joel.hortelius@interpeak.se>
|
|
******************************************************************************
|
|
*/
|
|
#ifndef IPMIP_NETLINK_KERN_H
|
|
#define IPMIP_NETLINK_KERN_H
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 1 DESCRIPTION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 2 CONFIGURATION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 3 INCLUDE FILES
|
|
****************************************************************************
|
|
*/
|
|
|
|
#ifndef IPMIP_NATIVE_KERNEL
|
|
#include "ipnet_dst_cache.h"
|
|
#include "ipnet_routesock.h"
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 4 DEFINES
|
|
****************************************************************************
|
|
*/
|
|
#ifndef IPMIP_NATIVE_KERNEL
|
|
#define IPMIP_RTF_TUNNELEND IPNET_RTF_TUNNELEND
|
|
#define IPMIP_RTF_SKIP IPNET_RTF_SKIP
|
|
#define IPMIP_RTF_MBINDING IPNET_RTF_MBINDING
|
|
#else
|
|
#define IPMIP_RTF_TUNNELEND (1 << 0)
|
|
#define IPMIP_RTF_SKIP (1 << 1)
|
|
#define IPMIP_RTF_MBINDING (1 << 2)
|
|
#endif
|
|
/*
|
|
****************************************************************************
|
|
* 5 TYPES
|
|
****************************************************************************
|
|
*/
|
|
|
|
#ifndef IPMIP_NATIVE_KERNEL
|
|
struct Ipnet_route_entry_struct;
|
|
struct Ipcom_pkt_struct;
|
|
struct Ipnet_route_func_info;
|
|
struct Ipnet_netif_struct;
|
|
struct Ip_rtattr;
|
|
|
|
enum
|
|
{
|
|
IPMIP_NETLINK_KERN_SRCMAC = (1 << 0),
|
|
IPMIP_NETLINK_KERN_TUNNEL = (1 << 1),
|
|
IPMIP_NETLINK_KERN_GREKEY = (1 << 2),
|
|
IPMIP_NETLINK_KERN_INGRESS_IFINDEX = (1 << 3),
|
|
IPMIP_NETLINK_KERN_EGRESS_IFINDEX = (1 << 4),
|
|
IPMIP_NETLINK_KERN_PROTO = (1 << 5)
|
|
};
|
|
|
|
typedef struct Ipmip_netlink_route_flow_info
|
|
{
|
|
Ipnet_mip_flow_spec flow;
|
|
|
|
Ip_u32 type;
|
|
Ip_u32 ifindex;
|
|
Ipnet_dst_cache_mip_handle flow_handle;
|
|
} Ipmip_netlink_route_flow_info_t;
|
|
#endif
|
|
|
|
typedef struct Ipmip_netlink_kern_compare
|
|
{
|
|
Ip_u16 srcmac_type;
|
|
struct
|
|
{
|
|
union
|
|
{
|
|
#ifdef IPCOM_USE_INET
|
|
struct Ip_in_addr ip;
|
|
#endif
|
|
#ifdef IPCOM_USE_INET6
|
|
struct Ip_in6_addr ip6;
|
|
#endif
|
|
Ip_u8 opaque[16];
|
|
} hdr;
|
|
|
|
Ip_u32 gre_key;
|
|
Ip_u32 ifindex;
|
|
Ip_u8 srcmac_len;
|
|
Ip_u8 proto;
|
|
} srcmac;
|
|
} Ipmip_netlink_kern_compare_t;
|
|
|
|
|
|
typedef struct Ipmip_netlink_kern_handle
|
|
{
|
|
Ip_u32 mip_ident;
|
|
Ip_u32 mip_facility;
|
|
} Ipmip_netlink_kern_handle_t;
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 6 FUNCTIONS
|
|
****************************************************************************
|
|
*/
|
|
|
|
#ifndef IPMIP_NATIVE_KERNEL
|
|
IP_GLOBAL Ip_bool ipmip_netlink_kern_rt_flow_set(struct Ipnet_route_func_info *rtinfo,
|
|
Ipmip_netlink_kern_compare_t *srccmp,
|
|
Ipnet_dst_cache_mip_handle flow_handle);
|
|
|
|
IP_GLOBAL Ipmip_netlink_kern_handle_t *ipmip_netlink_kern_handle_get(Ip_u32 vr, Ipmip_netlink_kern_handle_t *handle);
|
|
IP_GLOBAL Ipmip_netlink_kern_handle_t *ipmip_netlink_kern_handle_del(Ip_u32 vr, Ipmip_netlink_kern_handle_t *handle);
|
|
IP_GLOBAL void ipmip_netlink_kern_handle_add(Ip_u32 vr, Ipmip_netlink_kern_handle_t *handle);
|
|
IP_GLOBAL void ipmip_netlink_kern_handle_free(Ip_u32 vr, Ipmip_netlink_kern_handle_t *handle);
|
|
IP_GLOBAL void ipmip_netlink_kern_if_include(struct Ipnet_netif_struct *netif);
|
|
IP_GLOBAL void ipmip_netlink_kern_if_exclude(struct Ipnet_netif_struct *netif);
|
|
IP_GLOBAL void ipmip_netlink_kern_hoa_activate(struct Ipnet_netif_struct *netif, struct Ip_rtattr *rta);
|
|
IP_GLOBAL void ipmip_netlink_kern_hoa_deactivate(struct Ipnet_netif_struct *netif, struct Ip_rtattr *rta);
|
|
|
|
IP_GLOBAL void ipmip_rtnetlink_init(void);
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* END OF FILE
|
|
****************************************************************************
|
|
*/
|