1160 lines
22 KiB
C
1160 lines
22 KiB
C
|
|
/*
|
|
******************************************************************************
|
|
* HEADER FILE
|
|
*
|
|
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipmip6ha_cli.h,v $ $Revision: 1.7 $
|
|
* $Source: /home/interpeak/CVSRoot/ipmip6ha/include/ipmip6ha_cli.h,v $
|
|
* $Author: jhorteli $ $Date: 2009-12-02 15:33:16 $
|
|
* $State: Exp $ $Locker: $
|
|
*
|
|
* INTERPEAK_COPYRIGHT_STRING
|
|
* Design and implementation by Joel Hortelius <joel.hortelius@interpeak.se>
|
|
******************************************************************************
|
|
*/
|
|
#ifndef IPMIP6HA_CLI_H
|
|
#define IPMIP6HA_CLI_H
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 1 DESCRIPTION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 2 CONFIGURATION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 3 INCLUDE FILES
|
|
****************************************************************************
|
|
*/
|
|
|
|
#include <private/ipmip6_cli.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 4 DEFINES
|
|
****************************************************************************
|
|
*/
|
|
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 5 TYPES
|
|
****************************************************************************
|
|
*/
|
|
struct Ipmip6_mib_mip6MnBLTable;
|
|
struct Ipmip6_mib_mip6NodeTrafficEntry;
|
|
struct Ipmip_attr;
|
|
struct Ipmip_lladdr;
|
|
struct Ipmip6_address;
|
|
struct Ipmip6_inet;
|
|
struct Ip_in6_addr;
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 6 FUNCTIONS
|
|
****************************************************************************
|
|
*/
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_connect - ipmip6ha_cli_connect
|
|
*
|
|
* Connect to the home agent v6 daemon.
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i daemon_info
|
|
* Will be filled in by the function
|
|
* \ie
|
|
*
|
|
* RETURNS: IP_TRUE on success
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC Ip_bool ipmip6ha_cli_connect
|
|
(
|
|
Ipmip_cli_daemon_t *daemon_info
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_node_list - ipmip6ha_cli_node_list
|
|
*
|
|
* List all nodes matching the specified search criteries
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i dameon
|
|
* Connection to the IPMIP6HA daemon
|
|
* \i req
|
|
* Request to use.
|
|
* \i ifname
|
|
* Interface name or IP_NULL
|
|
* \i nai
|
|
* Home Address to look for or IP_NULL
|
|
* \i nai
|
|
* NAI to look for, or IP_NULL
|
|
* \ie
|
|
*
|
|
* RETURNS: IPCOM_SUCCESS if the request was successful
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC int ipmip6ha_cli_node_list
|
|
(
|
|
Ipmip_cli_daemon_t *daemon,
|
|
Ipmip_cli_daemon_req_t *req,
|
|
const char *ifname,
|
|
const struct Ip_in6_addr *hoa,
|
|
const char *nai
|
|
);
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_handle_next - ipmip6ha_cli_handle_next
|
|
*
|
|
* Return the next handle
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i iter
|
|
* Iterator
|
|
* \ie
|
|
*
|
|
* RETURNS: The next handle or 0
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC Ip_u32 ipmip6ha_cli_handle_next
|
|
(
|
|
Ipmip_attr_iter_t *iter
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_request_set_nai - ipmip6ha_cli_request_set_nai
|
|
*
|
|
* Set a NAI identifier in the request
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i req
|
|
* Daemon request structure
|
|
* \i nai
|
|
* Network Access Identifier (if NULL this call will do nothing)
|
|
* \ie
|
|
*
|
|
* RETURNS: No return value
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC void ipmip6ha_cli_request_set_nai
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
const char *nai
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_request_set_ifname - ipmip6ha_cli_request_set_ifname
|
|
*
|
|
* Set an IFNAME identifier in the request
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i req
|
|
* Daemon request structure
|
|
* \i ifname
|
|
* Interface name
|
|
* \ie
|
|
*
|
|
* RETURNS: No return value
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC void ipmip6ha_cli_request_set_ifname
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
const char *ifname
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_request_set_hoa - ipmip6ha_cli_request_set_hoa
|
|
*
|
|
* Set the INET6 Home Address the request
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i req
|
|
* Daemon request structure
|
|
* \i hoa
|
|
* The home address
|
|
* \ie
|
|
*
|
|
* RETURNS: No return value
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC void ipmip6ha_cli_request_set_hoa
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
const struct Ip_in6_addr *hoa
|
|
);
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_mag_request_set_mag - ipmip6ha_cli_mag_request_set_mag
|
|
*
|
|
* Set the INET6 MAG Address the request
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i req
|
|
* Daemon request structure
|
|
* \i mag
|
|
* The MAG address
|
|
* \ie
|
|
*
|
|
* RETURNS: No return value
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC void ipmip6ha_cli_mag_request_set_mag
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
const struct Ip_in6_addr *mag
|
|
);
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_mag_request_set_revoke_reason - ipmip6ha_cli_mag_request_set_revoke_reason
|
|
*
|
|
* Set the reason for doing a MAG global revocation
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i req
|
|
* Daemon request structure
|
|
* \i reason
|
|
* The reason
|
|
* \ie
|
|
*
|
|
* RETURNS: No return value
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC void ipmip6ha_cli_mag_request_set_revoke_reason
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
Ip_u32 reason
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_mag_request_set_ifname - ipmip6ha_cli_mag_request_set_ifname
|
|
*
|
|
* Set an IFNAME identifier in the MAG request
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i req
|
|
* Daemon request structure
|
|
* \i ifname
|
|
* Interface name
|
|
* \ie
|
|
*
|
|
* RETURNS: No return value
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC void ipmip6ha_cli_mag_request_set_ifname
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
const char *ifname
|
|
);
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_mag_request_set_match - ipmip6ha_cli_mag_request_set_match
|
|
*
|
|
* Set a NAI MATCH identifier in the request
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i req
|
|
* Daemon request structure
|
|
* \i match
|
|
* Network Access Identifier Match string
|
|
* \ie
|
|
*
|
|
* RETURNS: No return value
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC void ipmip6ha_cli_mag_request_set_match
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
const char *match
|
|
);
|
|
|
|
|
|
#ifdef IPMIP_USE_INET
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_request_set_inet_hoa - ipmip6ha_cli_request_set_inet_hoa
|
|
*
|
|
* Set the INET Home Address the request
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i req
|
|
* Daemon request structure
|
|
* \i inet_hoa
|
|
* The home address
|
|
* \ie
|
|
*
|
|
* RETURNS: No return value
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC void ipmip6ha_cli_request_set_inet_hoa
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
Ip_u32 inet_hoa
|
|
);
|
|
#endif
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_request_set_handle - ipmip6ha_cli_request_set_handle
|
|
*
|
|
* Set the u32 handle
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i req
|
|
* Daemon request structure
|
|
* \i handle
|
|
* The handle
|
|
* \ie
|
|
*
|
|
* RETURNS: No return value
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC void ipmip6ha_cli_request_set_handle
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
Ip_u32 handle
|
|
);
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_request_set_revoke_reason - ipmip6ha_cli_request_set_revoke_reason
|
|
*
|
|
* Set the reason to doing a node revocation
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i req
|
|
* Daemon request structure
|
|
* \i reason
|
|
* The reason
|
|
* \ie
|
|
*
|
|
* RETURNS: No return value
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC void ipmip6ha_cli_request_set_revoke_reason
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
Ip_u32 reason
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_node_get_ifname - ipmip6ha_cli_node_get_ifname
|
|
*
|
|
* Return the interface name of the node
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i node
|
|
* rta containing the node attributes
|
|
* \ie
|
|
*
|
|
* RETURNS: The interface name or IP_NULL
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC const char *ipmip6ha_cli_node_get_ifname
|
|
(
|
|
struct Ipmip_attr *node
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_node_get_nai - ipmip6ha_cli_node_get_nai
|
|
*
|
|
* Return the NAI of the node
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i node
|
|
* rta containing the node attributes
|
|
* \ie
|
|
*
|
|
* RETURNS: The NAI or IP_NULL
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC const char *ipmip6ha_cli_node_get_nai
|
|
(
|
|
struct Ipmip_attr *node
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_node_get_hoa - ipmip6ha_cli_node_get_hoa
|
|
*
|
|
* Return the Home Address of the node
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i node
|
|
* rta containing the node attributes
|
|
* \ie
|
|
*
|
|
* RETURNS: The Home Address or IP_NULL
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC const struct Ip_in6_addr *ipmip6ha_cli_node_get_hoa
|
|
(
|
|
struct Ipmip_attr *node
|
|
);
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_node_get - ipmip6ha_cli_node_get
|
|
*
|
|
* Retrieve information on a specific node
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i dameon
|
|
* Connection to the IPMIP6PM daemon
|
|
* \i req
|
|
* Request to use.
|
|
* \i handle
|
|
* The handle to get
|
|
* \ie
|
|
*
|
|
* RETURNS: The RTA containing the node's attributes if found, or IP_NULL.
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC struct Ipmip_attr *ipmip6ha_cli_node_get
|
|
(
|
|
Ipmip_cli_daemon_t *daemon,
|
|
Ipmip_cli_daemon_req_t *req,
|
|
Ip_u32 handle
|
|
);
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_node_delete - ipmip6ha_cli_node_delete
|
|
*
|
|
* Delete a particular binding
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i dameon
|
|
* Connection to the IPMIP6PM daemon
|
|
* \i req
|
|
* Request to use.
|
|
* \i handle
|
|
* Handle
|
|
* \ie
|
|
*
|
|
* RETURNS: No return value
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC void ipmip6ha_cli_node_delete
|
|
(
|
|
Ipmip_cli_daemon_t *daemon,
|
|
Ip_u32 handle
|
|
);
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_node_revoke - ipmip6ha_cli_node_revoke
|
|
*
|
|
* Revoke a particular binding
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i dameon
|
|
* Connection to the IPMIP6PM daemon
|
|
* \i req
|
|
* Request to use.
|
|
* \i handle
|
|
* Handle
|
|
* \i reason
|
|
* Reason for the revokation
|
|
* \ie
|
|
*
|
|
* RETURNS: No return value
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC void ipmip6ha_cli_node_revoke
|
|
(
|
|
Ipmip_cli_daemon_t *daemon,
|
|
Ip_u32 handle,
|
|
Ip_u32 reason
|
|
);
|
|
|
|
#ifdef IPMIP_USE_INET
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_node_revoke_inet - ipmip6ha_cli_node_revoke_inet
|
|
*
|
|
* Revoke the INET part of a particular binding
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i dameon
|
|
* Connection to the IPMIP6PM daemon
|
|
* \i req
|
|
* Request to use.
|
|
* \i handle
|
|
* Handle
|
|
* \i reason
|
|
* Reason for the revokation
|
|
* \ie
|
|
*
|
|
* RETURNS: No return value
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC void ipmip6ha_cli_node_revoke_inet
|
|
(
|
|
Ipmip_cli_daemon_t *daemon,
|
|
Ip_u32 handle,
|
|
Ip_u32 reason
|
|
);
|
|
#endif
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_node_get_updated - ipmip6ha_cli_node_get_updated
|
|
*
|
|
* Returns the time when the node was updated
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i node
|
|
* rta containing the node attributes
|
|
* \ie
|
|
*
|
|
* RETURNS: The updated time or zero if not found
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC Ip_time_t ipmip6ha_cli_node_get_updated
|
|
(
|
|
struct Ipmip_attr *node
|
|
);
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_node_get_handle - ipmip6ha_cli_node_get_handle
|
|
*
|
|
* Returns the handle
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i node
|
|
* rta containing the node attributes
|
|
* \ie
|
|
*
|
|
* RETURNS: The handle or zero if not found
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC Ip_u32 ipmip6ha_cli_node_get_handle
|
|
(
|
|
struct Ipmip_attr *node
|
|
);
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_node_get_regflags - ipmip6ha_cli_node_get_regflags
|
|
*
|
|
* Returns the registration flags for this node
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i node
|
|
* rta containing the node attributes
|
|
* \ie
|
|
*
|
|
* RETURNS: The registration flags or zero if not found
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC Ip_u32 ipmip6ha_cli_node_get_regflags
|
|
(
|
|
struct Ipmip_attr *node
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_node_get_home_prefix_list - ipmip6ha_cli_node_get_home_prefix_list
|
|
*
|
|
* Returns an array of home prefixes.
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i node
|
|
* rta containing the node attributes
|
|
* \i sz
|
|
* [OUT] number of elements in the array
|
|
* \ie
|
|
*
|
|
* RETURNS: The array of prefixes
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC const struct Ipmip6_address *ipmip6ha_cli_node_get_home_prefix_list
|
|
(
|
|
struct Ipmip_attr *node,
|
|
Ip_u32 *sz
|
|
);
|
|
|
|
|
|
#ifdef IPMIP_USE_INET
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_node_get_inet_home_address_list - ipmip6ha_cli_node_get_inet_home_address_list
|
|
*
|
|
* Returns an array of INET home addresses.
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i node
|
|
* rta containing the node attributes
|
|
* \i sz
|
|
* [OUT] number of elements in the array
|
|
* \ie
|
|
*
|
|
* RETURNS: The array of INET home addresses
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC const Ip_u32 *ipmip6ha_cli_node_get_inet_home_address_list
|
|
(
|
|
struct Ipmip_attr *node,
|
|
Ip_u32 *sz
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_node_get_inet_home_prefix_list - ipmip6ha_cli_node_get_inet_home_prefix_list
|
|
*
|
|
* Returns an array of INET home prefixes.
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i node
|
|
* rta containing the node attributes
|
|
* \i sz
|
|
* [OUT] number of elements in the array
|
|
* \ie
|
|
*
|
|
* RETURNS: The array of INET prefixes
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC const struct Ipmip6_inet *ipmip6ha_cli_node_get_inet_home_prefix_list
|
|
(
|
|
struct Ipmip_attr *node,
|
|
Ip_u32 *sz
|
|
);
|
|
|
|
#endif
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_node_get_mip6NodeTrafficEntry - ipmip6ha_cli_node_get_mip6NodeTrafficEntry
|
|
*
|
|
* Return the mip6NodeTrafficEntry of the node
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i node
|
|
* rta containing the node attributes
|
|
* \ie
|
|
*
|
|
* RETURNS: The mip6NodeTrafficEntry or IP_NULL
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC const struct Ipmip6_mib_mip6NodeTrafficEntry *ipmip6ha_cli_node_get_mip6NodeTrafficEntry
|
|
(
|
|
struct Ipmip_attr *node
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_node_get_mip6BindingCacheEntry - ipmip6ha_cli_node_get_mip6BindingCacheEntry
|
|
*
|
|
* Return the mip6BindingCacheEntry of the node
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i node
|
|
* rta containing the node attributes
|
|
* \ie
|
|
*
|
|
* RETURNS: The mip6BindingCacheEntry or IP_NULL
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC const struct Ipmip6_mib_mip6BindingCacheEntry *ipmip6ha_cli_node_get_mip6BindingCacheEntry
|
|
(
|
|
struct Ipmip_attr *node
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_prefix_list - ipmip6ha_cli_prefix_list
|
|
*
|
|
* List all prefixes currently seen by the home agent
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i dameon
|
|
* Connection to the IPMIP6HA daemon
|
|
* \i req
|
|
* Request to use.
|
|
* \ie
|
|
*
|
|
* RETURNS: IPCOM_SUCCESS if the request was successful
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
|
|
IP_PUBLIC int ipmip6ha_cli_prefix_list
|
|
(
|
|
Ipmip_cli_daemon_t *daemon,
|
|
Ipmip_cli_daemon_req_t *req
|
|
);
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_prefix_next - ipmip6ha_cli_prefix_next
|
|
*
|
|
* Return the next prefix
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i iter
|
|
* Iterator
|
|
* \ie
|
|
*
|
|
* RETURNS: The next prefix or IP_NULL
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC struct Ipmip_attr* ipmip6ha_cli_prefix_next
|
|
(
|
|
Ipmip_attr_iter_t *iter
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_prefix_get_ifname - ipmip6ha_cli_prefix_get_ifname
|
|
*
|
|
* Return the interface name of the prefix
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i node
|
|
* rta containing the node attributes
|
|
* \ie
|
|
*
|
|
* RETURNS: The interface name or IP_NULL
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC const char *ipmip6ha_cli_prefix_get_ifname
|
|
(
|
|
struct Ipmip_attr *prefix
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_prefix_get_router - ipmip6ha_cli_prefix_get_router
|
|
*
|
|
* Return the address of the router that enabled this prefix
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i node
|
|
* rta containing the node attributes
|
|
* \ie
|
|
*
|
|
* RETURNS: The router address or IP_NULL
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC const struct Ip_in6_addr *ipmip6ha_cli_prefix_get_router
|
|
(
|
|
struct Ipmip_attr *prefix
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_prefix_get_prefix - ipmip6ha_cli_prefix_get_prefix
|
|
*
|
|
* Return the prefix information
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i node
|
|
* rta containing the node attributes
|
|
* \ie
|
|
*
|
|
* RETURNS: The prefix or IP_NULL
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC const Ipmip6_address_t *ipmip6ha_cli_prefix_get_prefix
|
|
(
|
|
struct Ipmip_attr *prefix
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_prefix_get_prefix_valid - ipmip6ha_cli_prefix_get_prefix_valid
|
|
*
|
|
* Return the prefix valid information
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i node
|
|
* rta containing the node attributes
|
|
* \ie
|
|
*
|
|
* RETURNS: The prefix validity time
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC Ip_time_t ipmip6ha_cli_prefix_get_prefix_valid
|
|
(
|
|
struct Ipmip_attr *prefix
|
|
);
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_prefix_get_prefix_timestamp - ipmip6ha_cli_prefix_get_prefix_timestamp
|
|
*
|
|
* Return the prefix timestamp information
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i node
|
|
* rta containing the node attributes
|
|
* \ie
|
|
*
|
|
* RETURNS: The prefix timestamp time
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC Ip_time_t ipmip6ha_cli_prefix_get_prefix_timestamp
|
|
(
|
|
struct Ipmip_attr *prefix
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_mag_list - ipmip6ha_cli_mag_list
|
|
*
|
|
* List all MAGS currently seen by the home agent
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i dameon
|
|
* Connection to the IPMIP6HA daemon
|
|
* \i req
|
|
* Request to use.
|
|
* \ie
|
|
*
|
|
* RETURNS: IPCOM_SUCCESS if the request was successful
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
|
|
IP_PUBLIC int ipmip6ha_cli_mag_list
|
|
(
|
|
Ipmip_cli_daemon_t *daemon,
|
|
Ipmip_cli_daemon_req_t *req
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_mag_next - ipmip6ha_cli_mag_next
|
|
*
|
|
* Return the next mag
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i iter
|
|
* Iterator
|
|
* \ie
|
|
*
|
|
* RETURNS: The next mag or IP_NULL
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC struct Ipmip_attr* ipmip6ha_cli_mag_next
|
|
(
|
|
Ipmip_attr_iter_t *iter
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_mag_get_ifname - ipmip6ha_cli_mag_get_ifname
|
|
*
|
|
* Return the interface name of the mag
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i node
|
|
* rta containing the mag attributes
|
|
* \ie
|
|
*
|
|
* RETURNS: The interface name or IP_NULL
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC const char *ipmip6ha_cli_mag_get_ifname
|
|
(
|
|
struct Ipmip_attr *prefix
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_mag_get_addr_v6 - ipmip6ha_cli_mag_get_addr_v6
|
|
*
|
|
* Return the address of the mag
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i mag
|
|
* rta containing the mag attributes
|
|
* \ie
|
|
*
|
|
* RETURNS: The MAG address or IP_NULL
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC const struct Ip_in6_addr *ipmip6ha_cli_mag_get_addr_v6
|
|
(
|
|
struct Ipmip_attr *mag
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_mag_get_heartbeat - ipmip6ha_cli_mag_get_heartbeat
|
|
*
|
|
* Return the heartbeat information
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i mag
|
|
* rta containing the mag attributes
|
|
* \ie
|
|
*
|
|
* RETURNS: != 0 if HeartBeat is enabled
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC Ip_u32 ipmip6ha_cli_mag_get_heartbeat
|
|
(
|
|
struct Ipmip_attr *mag
|
|
);
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_mag_get_references - ipmip6ha_cli_mag_get_references
|
|
*
|
|
* Return the references information
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i mag
|
|
* rta containing the mag attributes
|
|
* \ie
|
|
*
|
|
* RETURNS: The number of current references to this MAG
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC Ip_u32 ipmip6ha_cli_mag_get_references
|
|
(
|
|
struct Ipmip_attr *mag
|
|
);
|
|
|
|
#ifdef IPMIP_USE_INET
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_mag_get_addr_v4 - ipmip6ha_cli_mag_get_addr_v4
|
|
*
|
|
* Return the v4 address of the mag
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i mag
|
|
* rta containing the mag attributes
|
|
* \ie
|
|
*
|
|
* RETURNS: The MAG v4 address or 0
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC Ip_u32 ipmip6ha_cli_mag_get_addr_v4
|
|
(
|
|
struct Ipmip_attr *mag
|
|
);
|
|
#endif
|
|
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip6ha_cli_mag_revoke - ipmip6ha_cli_mag_revoke
|
|
*
|
|
* Revoke a particular MAG
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i dameon
|
|
* Connection to the IPMIP6PM daemon
|
|
* \i ifname
|
|
* Interface of this MAG
|
|
* \i mag
|
|
* MAG v6 address
|
|
* \i reason
|
|
* Reason for the revokation
|
|
* \i nai_match
|
|
* If its node local policy, revoke nai's matching this string
|
|
* \ie
|
|
*
|
|
* RETURNS: No return value
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_PUBLIC void ipmip6ha_cli_mag_revoke
|
|
(
|
|
Ipmip_cli_daemon_t *daemon,
|
|
const char *ifname,
|
|
const struct Ip_in6_addr *mag,
|
|
Ip_u8 reason,
|
|
const char *nai_match
|
|
);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* END OF FILE
|
|
****************************************************************************
|
|
*/
|