Files
2026-07-30 11:19:44 +05:30

1619 lines
31 KiB
C

/*
******************************************************************************
* HEADER FILE
*
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipmip6pm_cli.h,v $ $Revision: 1.12 $
* $Source: /home/interpeak/CVSRoot/ipmip6pm/include/ipmip6pm_cli.h,v $
* $Author: jhorteli $ $Date: 2009-12-02 15:33:30 $
* $State: Exp $ $Locker: $
*
* INTERPEAK_COPYRIGHT_STRING
* Design and implementation by Joel Hortelius <joel.hortelius@interpeak.se>
******************************************************************************
*/
#ifndef IPMIP6PM_CLI_H
#define IPMIP6PM_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 Ip_in6_addr;
struct Ipmip6_inet;
/*
****************************************************************************
* 6 FUNCTIONS
****************************************************************************
*/
/*******************************************************************************
*
* ipmip6pm_cli_connect - ipmip6pm_cli_connect
*
* Connect to the proxy mobility 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 ipmip6pm_cli_connect
(
Ipmip_cli_daemon_t *daemon_info
);
/*******************************************************************************
*
* ipmip6pm_cli_request_set_nai - ipmip6pm_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 ipmip6pm_cli_request_set_nai
(
Ipmip_cli_daemon_req_t *req,
const char *nai
);
/*******************************************************************************
*
* ipmip6pm_cli_request_set_handle - ipmip6pm_cli_request_set_handle
*
* Set a handle identifier in the request
*
* Parameters:
* \is
* \i req
* Daemon request structure
* \i handle
* The handle
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6pm_cli_request_set_handle
(
Ipmip_cli_daemon_req_t *req,
Ip_u32 handle
);
/*******************************************************************************
*
* ipmip6pm_cli_request_set_ifname - ipmip6pm_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 ipmip6pm_cli_request_set_ifname
(
Ipmip_cli_daemon_req_t *req,
const char *ifname
);
/*******************************************************************************
*
* ipmip6pm_cli_request_set_service - ipmip6pm_cli_request_set_service
*
* Set a SERVICE configuration in the request
*
* Parameters:
* \is
* \i req
* Daemon request structure
* \i module
* Service module
* \i value
* Configuration value
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6pm_cli_request_set_service
(
Ipmip_cli_daemon_req_t *req,
const char *module,
const char *value
);
/*******************************************************************************
*
* ipmip6pm_cli_request_set_link - ipmip6pm_cli_request_set_link
*
* Set a LINK-SERVICE configuration in the request
*
* Parameters:
* \is
* \i req
* Daemon request structure
* \i module
* Link-Service module
* \i value
* Configuration value
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6pm_cli_request_set_link
(
Ipmip_cli_daemon_req_t *req,
const char *module,
const char *value
);
/*******************************************************************************
*
* ipmip6pm_cli_request_set_MAG_configuration - ipmip6pm_cli_request_set_MAG_configuration
*
* Set the MAG interface configuration that this node should be associated with.
*
* Parameters:
* \is
* \i req
* Daemon request structure
* \i ifname
* MAG configuration interface
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6pm_cli_request_set_MAG_configuration
(
Ipmip_cli_daemon_req_t *req,
const char *ifname
);
/*******************************************************************************
*
* ipmip6pm_cli_request_add_prefix - ipmip6pm_cli_request_add_prefix
*
* Add a prefix to the request
*
* Parameters:
* \is
* \i req
* Daemon request structure
* \i prefix
* prefix to add to the request
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6pm_cli_request_add_prefix
(
Ipmip_cli_daemon_req_t *req,
struct Ipmip6_address *prefix
);
#ifdef IPMIP_USE_INET
/*******************************************************************************
*
* ipmip6pm_cli_request_add_home_address_inet - ipmip6pm_cli_request_add_home_address_inet
*
* Add a inet prefix to the request
*
* Parameters:
* \is
* \i req
* Daemon request structure
* \i prefix
* prefix to add to the request
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6pm_cli_request_add_home_address_inet
(
Ipmip_cli_daemon_req_t *req,
struct Ipmip6_inet *prefix
);
#endif
/*******************************************************************************
*
* ipmip6pm_cli_request_set_link_layer - ipmip6pm_cli_request_set_link_layer
*
* Set the node's link layer address
*
* Parameters:
* \is
* \i req
* Daemon request structure
* \i lla
* Link Layer Address
* \i lla_size
* The size of the Link Layer Address
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6pm_cli_request_set_link_layer
(
Ipmip_cli_daemon_req_t *req,
void *lla,
Ip_size_t lla_size
);
/*******************************************************************************
*
* ipmip6pm_cli_request_set_gre_downlink - ipmip6pm_cli_request_set_gre_downlink
*
* Set the GRE downlink key
*
* Parameters:
* \is
* \i req
* Daemon request structure
* \i downlink
* The downlink key
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6pm_cli_request_set_gre_downlink
(
Ipmip_cli_daemon_req_t *req,
Ip_u32 downlink
);
/*******************************************************************************
*
* ipmip6pm_cli_request_set_transport_mask - ipmip6pm_cli_request_set_transport_mask
*
* Set the transport mask used by this node
*
* Parameters:
* \is
* \i req
* Daemon request structure
* \i mask
* The transport mask
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6pm_cli_request_set_transport_mask
(
Ipmip_cli_daemon_req_t *req,
Ip_u32 mask
);
/*******************************************************************************
*
* ipmip6pm_cli_request_set_tunnel_type - ipmip6pm_cli_request_set_tunnel_type
*
* Set the initial tunnel type in the node. The transport mask must either not
* be specified, or contain appropriate bits for this tunnel type. And the
* MAG must be configured to allow the Type.
*
* Parameters:
* \is
* \i req
* Daemon request structure
* \i tunnel_type
* The tunnel type
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6pm_cli_request_set_tunnel_type
(
Ipmip_cli_daemon_req_t *req,
Ip_u8 tunnel_type
);
/*******************************************************************************
*
* ipmip6pm_cli_request_set_homeagent - ipmip6pm_cli_request_set_homeagent
*
* Set the INET6 homeagent the request
*
* Parameters:
* \is
* \i req
* Daemon request structure
* \i homeagent
* The home agent
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6pm_cli_request_set_homeagent
(
Ipmip_cli_daemon_req_t *req,
const struct Ip_in6_addr *homeagent
);
#ifdef IPMIP_USE_INET
/*******************************************************************************
*
* ipmip6pm_cli_request_set_homeagent_inet - ipmip6pm_cli_request_set_homeagent_inet
*
* Set the INET homeagent the request
*
* Parameters:
* \is
* \i req
* Daemon request structure
* \i homeagent
* The home agent
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6pm_cli_request_set_homeagent_inet
(
Ipmip_cli_daemon_req_t *req,
Ip_u32 homeagent
);
#endif
/*******************************************************************************
*
* ipmip6pm_cli_request_set_handoff_indicator - ipmip6pm_cli_request_set_handoff_indicator
*
* Set the HANDOFF INDICATOR value in the request
*
* Parameters:
* \is
* \i req
* Daemon request structure
* \i handoff_indicator
* The handoff indicator value
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6pm_cli_request_set_handoff_indicator
(
Ipmip_cli_daemon_req_t *req,
Ip_u32 handoff_indicator
);
/*******************************************************************************
*
* ipmip6pm_cli_request_set_access_type - ipmip6pm_cli_request_set_access_type
*
* Set the ACCESS TYPE value in the request
*
* Parameters:
* \is
* \i req
* Daemon request structure
* \i access_type
* The access type value
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6pm_cli_request_set_access_type
(
Ipmip_cli_daemon_req_t *req,
Ip_u32 access_type
);
/*******************************************************************************
*
* ipmip6pm_cli_node_get_ifname - ipmip6pm_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 *ipmip6pm_cli_node_get_ifname
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmip6pm_cli_node_get_tunnel_ifname - ipmip6pm_cli_node_get_tunnel_ifname
*
* Return the tunnel interface name of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The tunnel interface name or IP_NULL
*
* ERRNO:
*
*/
IP_PUBLIC const char *ipmip6pm_cli_node_get_tunnel_ifname
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmip6pm_cli_node_get_tunnel_type - ipmip6pm_cli_node_get_tunnel_type
*
* Return the current Tunneling Type
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: An IPMIP Tunneling Type descriptor
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u8 ipmip6pm_cli_node_get_tunnel_type
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmip6pm_cli_node_get_transport_mask - ipmip6pm_cli_node_get_transport_mask
*
* Return the current Transport Mask
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: An IPMIP Transport Mask
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmip6pm_cli_node_get_transport_mask
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmip6pm_cli_node_get_gre_keys - ipmip6pm_cli_node_get_gre_keys
*
* Return the current GRE settings
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The GRE attribute if found
*
* ERRNO:
*
*/
IP_PUBLIC struct Ipmip_attr *ipmip6pm_cli_node_get_gre_keys
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmip6pm_cli_node_get_home_agent - ipmip6pm_cli_node_get_home_agent
*
* Return the v6 Home Agent name of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The v6 Home Agent
*
* ERRNO:
*
*/
IP_PUBLIC struct Ip_in6_addr *ipmip6pm_cli_node_get_home_agent
(
struct Ipmip_attr *node
);
#ifdef IPMIP_USE_INET
/*******************************************************************************
*
* ipmip6pm_cli_node_get_home_agent_inet - ipmip6pm_cli_node_get_home_agent_inet
*
* Return the v4 Home Agent name of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The v4 Home Agent or 0.
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmip6pm_cli_node_get_home_agent_inet
(
struct Ipmip_attr *node
);
#endif
/*******************************************************************************
*
* ipmip6pm_cli_node_get_nai - ipmip6pm_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 *ipmip6pm_cli_node_get_nai
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmip6pm_cli_node_get_mip6MnBLTable - ipmip6pm_cli_node_get_mip6MnBLTable
*
* Return the mip6MnBLTable of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The mip6MnBLTable or IP_NULL
*
* ERRNO:
*
*/
IP_PUBLIC struct Ipmip6_mib_mip6MnBLTable *ipmip6pm_cli_node_get_mip6MnBLTable
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmip6pm_cli_node_get_mip6NodeTrafficEntry - ipmip6pm_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 struct Ipmip6_mib_mip6NodeTrafficEntry *ipmip6pm_cli_node_get_mip6NodeTrafficEntry
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmip6pm_cli_node_get_iflla - ipmip6pm_cli_node_get_iflla
*
* Return the interface link layer address of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The link layer address of the node or IP_NULL
*
* ERRNO:
*
*/
IP_PUBLIC struct Ipmip_lladdr *ipmip6pm_cli_node_get_iflla
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmip6pm_cli_node_get_MAG_iflla - ipmip6pm_cli_node_get_MAG_iflla
*
* Return the interface link layer address of the MAG
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The link layer address of the MAG or IP_NULL
*
* ERRNO:
*
*/
IP_PUBLIC struct Ipmip_lladdr *ipmip6pm_cli_node_get_MAG_iflla
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmip6pm_cli_node_get_MAG_link_local - ipmip6pm_cli_node_get_MAG_link_local
*
* Return the interface link local address of the MAG
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The link local address of the MAG or IP_NULL
*
* ERRNO:
*
*/
IP_PUBLIC struct Ipmip6_address *ipmip6pm_cli_node_get_MAG_link_local
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmip6pm_cli_node_get_home_prefix_list - ipmip6pm_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 struct Ipmip6_address *ipmip6pm_cli_node_get_home_prefix_list
(
struct Ipmip_attr *node,
Ip_u32 *sz
);
#ifdef IPMIP_USE_INET
/*******************************************************************************
*
* ipmip6pm_cli_node_get_home_address_inet - ipmip6pm_cli_node_get_home_address_inet
*
* Returns the INET home address
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The INET home address
*
* ERRNO:
*
*/
IP_PUBLIC struct Ipmip6_inet *ipmip6pm_cli_node_get_home_address_inet
(
struct Ipmip_attr *node
);
#endif
/*******************************************************************************
*
* ipmip6pm_cli_node_get_created - ipmip6pm_cli_node_get_created
*
* Returns the time when the node was created
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The creation time or zero if not found
*
* ERRNO:
*
*/
IP_PUBLIC Ip_time_t ipmip6pm_cli_node_get_created
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmip6pm_cli_node_get_access_type - ipmip6pm_cli_node_get_access_type
*
* Returns the access type of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The access type or zero if not found
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmip6pm_cli_node_get_access_type
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmip6pm_cli_node_get_handoff_indicator - ipmip6pm_cli_node_get_handoff_indicator
*
* Returns the initial handoff indicator of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The initial handoff indicator or zero if not found
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmip6pm_cli_node_get_handoff_indicator
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmip6pm_cli_node_get_status - ipmip6pm_cli_node_get_status
*
* Returns the status of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The status or zero if not found
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmip6pm_cli_node_get_status
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmip6pm_cli_node_get_handle - ipmip6pm_cli_node_get_handle
*
* Returns the handle of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The handle or zero if not found
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmip6pm_cli_node_get_handle
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmip6pm_cli_node_list - ipmip6pm_cli_node_list
*
* List all nodes matching the specified search criteries
*
* Parameters:
* \is
* \i dameon
* Connection to the IPMIP6PM daemon
* \i req
* Request to use.
* \i nai
* NAI to look for, or IP_NULL
* \i ifname
* Interface name to look for, or IP_NULL
* \ie
*
* RETURNS: IPCOM_SUCCESS if the request was successful
*
* ERRNO:
*
*/
IP_PUBLIC int ipmip6pm_cli_node_list
(
Ipmip_cli_daemon_t *daemon,
Ipmip_cli_daemon_req_t *req,
const char *nai,
const char *ifname
);
/*******************************************************************************
*
* ipmip6pm_cli_service_list - ipmip6pm_cli_service_list
*
* List all services currently registered in the daemon
*
* Parameters:
* \is
* \i dameon
* Connection to the IPMIP6PM daemon
* \i req
* Request to use.
* \ie
*
* RETURNS: IPCOM_SUCCESS if the request was successful
*
* ERRNO:
*
*/
IP_PUBLIC int ipmip6pm_cli_service_list
(
Ipmip_cli_daemon_t *daemon,
Ipmip_cli_daemon_req_t *req
);
/*******************************************************************************
*
* ipmip6pm_cli_link_list - ipmip6pm_cli_link_list
*
* List all link-services currently registered in the daemon
*
* Parameters:
* \is
* \i dameon
* Connection to the IPMIP6PM daemon
* \i req
* Request to use.
* \ie
*
* RETURNS: IPCOM_SUCCESS if the request was successful
*
* ERRNO:
*
*/
IP_PUBLIC int ipmip6pm_cli_link_list
(
Ipmip_cli_daemon_t *daemon,
Ipmip_cli_daemon_req_t *req
);
/*******************************************************************************
*
* ipmip6pm_cli_node_get - ipmip6pm_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
* Handle
* \ie
*
* RETURNS: The RTA containing the node's attributes if found, or IP_NULL.
*
* ERRNO:
*
*/
IP_PUBLIC struct Ipmip_attr *ipmip6pm_cli_node_get
(
Ipmip_cli_daemon_t *daemon,
Ipmip_cli_daemon_req_t *req,
Ip_u32 handle
);
/*******************************************************************************
*
* ipmip6pm_cli_node_delete - ipmip6pm_cli_node_delete
*
* Unconditionally delete a particular node, without issuing any
* notification to the home agent.
*
* 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 ipmip6pm_cli_node_delete
(
Ipmip_cli_daemon_t *daemon,
Ip_u32 handle
);
/*******************************************************************************
*
* ipmip6pm_cli_handle_next - ipmip6pm_cli_handle_next
*
* Return the next handle
*
* Parameters:
* \is
* \i iter
* Iterator
* \ie
*
* RETURNS: The next handle or 0
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmip6pm_cli_handle_next
(
Ipmip_attr_iter_t *iter
);
/*******************************************************************************
*
* ipmip6pm_cli_handle_get - ipmip6pm_cli_handle_get
*
* Return the handle
*
* Parameters:
* \is
* \i req
* Request
* \ie
*
* RETURNS: The handle or 0
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmip6pm_cli_handle_get
(
Ipmip_cli_daemon_req_t *req
);
/*******************************************************************************
*
* ipmip6pm_cli_service_next - ipmip6pm_cli_service_next
*
* Return the next service
*
* Parameters:
* \is
* \i iter
* Iterator
* \i name
* Name of the service
* \i value
* Value of the service
* \ie
*
* RETURNS: IP_TRUE on success
*
* ERRNO:
*
*/
IP_PUBLIC Ip_bool ipmip6pm_cli_service_next
(
Ipmip_attr_iter_t *iter,
char **name,
char **value
);
/*******************************************************************************
*
* ipmip6pm_cli_link_next - ipmip6pm_cli_link_next
*
* Return the next link-service
*
* Parameters:
* \is
* \i iter
* Iterator
* \i name
* Name of the service
* \i value
* Value of the service
* \ie
*
* RETURNS: IP_TRUE on success
*
* ERRNO:
*
*/
IP_PUBLIC Ip_bool ipmip6pm_cli_link_next
(
Ipmip_attr_iter_t *iter,
char **name,
char **value
);
/*******************************************************************************
*
* ipmip6pm_cli_node_deregister - ipmip6pm_cli_node_deregister
*
* Deregister a particular node from the home agent. If the 'ack' parameter
* is set to IP_TRUE, the proxy mip agent will wait for an acknowledgement or
* a timeout from the home agent. If set to false, a single deregistration
* message will be sent and then the node immediately deleted.
*
* Parameters:
* \is
* \i dameon
* Connection to the IPMIP6PM daemon
* \i req
* Request to use.
* \i handle
* \i ack
* If TRUE, wait for an acknowledgement or timeout from the home agent.
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6pm_cli_node_deregister
(
Ipmip_cli_daemon_t *daemon,
Ip_u32 handle,
Ip_bool ack
);
/*******************************************************************************
*
* ipmip6pm_cli_handoff_request_init - ipmip6pm_cli_handoff_request_init
*
* Create the embryo to a handoff request
*
* Parameters:
* \is
* \i req
* Request to use.
* \i nai
* NAI to look for. MUST be specified or this function will fail.
* \i ifname
* Interface name to look for. MUST be specified or this function will fail.
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6pm_cli_handoff_request_init
(
Ipmip_cli_daemon_req_t *req,
const char *nai,
const char *ifname
);
/*******************************************************************************
*
* ipmip6pm_cli_multicast_status - ipmip6pm_cli_multicast_status
*
* Enable or disable multicast status messages
*
* Parameters:
* \is
* \i daemon
* Handle to daemon instance
* \i enable
* IP_TRUE to listen, IP_FALSE to stop listen.
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6pm_cli_multicast_status
(
Ipmip_cli_daemon_t *daemon,
Ip_bool enable
);
/*******************************************************************************
*
* ipmip6pm_cli_node_wait_status - ipmip6pm_cli_node_wait_status
*
* Wait for a specific status to be reported by the handle.
*
* Parameters:
* \is
* \i daemon
* Daemon structure
* \i handle
* The node's handle
* \i status
* Status we're waiting for
* \i tv
* Time value to wait
* \ie
*
* RETURNS: IP_TRUE on success, IP_FALSE on timeout or terminal state.
*
* ERRNO:
*
*/
IP_PUBLIC Ip_bool ipmip6pm_cli_node_wait_status
(
Ipmip_cli_daemon_t *daemon,
Ip_u32 handle,
Ip_u32 status,
struct Ip_timeval *tv
);
/*******************************************************************************
*
* ipmip6pm_cli_node_retrieve_status - ipmip6pm_cli_node_retrieve_status
*
* Get current status
*
* Parameters:
* \is
* \i daemon
* Daemon structure
* \i handle
* The node's handle
* \ie
*
* RETURNS: The status
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmip6pm_cli_node_retrieve_status
(
Ipmip_cli_daemon_t *daemon,
Ip_u32 handle
);
/*******************************************************************************
*
* ipmip6pm_cli_lma_list - ipmip6pm_cli_lma_list
*
* List all LMAs in the system
*
* Parameters:
* \is
* \i dameon
* Connection to the IPMIP6PM daemon
* \i req
* Request to use.
* \ie
*
* RETURNS: IPCOM_SUCCESS on success
*
* ERRNO:
*
*/
IP_PUBLIC int ipmip6pm_cli_lma_list
(
Ipmip_cli_daemon_t *daemon,
Ipmip_cli_daemon_req_t *req
);
/*******************************************************************************
*
* ipmip6pm_cli_lma_next - ipmip6pm_cli_lma_next
*
* Return the next LMA attribute block
*
* Parameters:
* \is
* \i iter
* Iterator
* \ie
*
* RETURNS: The next LMA attribute block or IP_NULL
*
* ERRNO:
*
*/
IP_PUBLIC struct Ipmip_attr* ipmip6pm_cli_lma_next
(
Ipmip_attr_iter_t *iter
);
/*******************************************************************************
*
* ipmip6pm_cli_lma_get_addr_v6 - ipmip6pm_cli_lma_get_addr_v6
*
* Return the v6 address of the LMA
*
* Parameters:
* \is
* \i node
* rta containing the lma attributes
* \ie
*
* RETURNS: The v6 LMA address
*
* ERRNO:
*
*/
IP_PUBLIC struct Ip_in6_addr *ipmip6pm_cli_lma_get_addr_v6
(
struct Ipmip_attr *lma
);
#ifdef IPMIP_USE_INET
/*******************************************************************************
*
* ipmip6pm_cli_lma_get_addr_v4 - ipmip6pm_cli_lma_get_addr_v4
*
* Return the v4 address of the LMA
*
* Parameters:
* \is
* \i node
* rta containing the LMA attributes
* \ie
*
* RETURNS: The v4 LMA address or 0.
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmip6pm_cli_lma_get_addr_v4
(
struct Ipmip_attr *lma
);
#endif
/*******************************************************************************
*
* ipmip6pm_cli_lma_get_ifname - ipmip6pm_cli_lma_get_ifname
*
* Return the interface name of the LMA
*
* Parameters:
* \is
* \i node
* rta containing the LMA attributes
* \ie
*
* RETURNS: The interface name or IP_NULL
*
* ERRNO:
*
*/
IP_PUBLIC const char *ipmip6pm_cli_lma_get_ifname
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmip6pm_cli_request_set_revoke_reason - ipmip6pm_cli_request_set_revoke_reason
*
* Set a revocation reason in the request
*
* Parameters:
* \is
* \i req
* Daemon request structure
* \i reason
* The revocation reason
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6pm_cli_request_set_revoke_reason
(
Ipmip_cli_daemon_req_t *req,
Ip_u8 reason
);
/*******************************************************************************
*
* ipmip6pm_cli_node_revoke - ipmip6pm_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 ipmip6pm_cli_node_revoke
(
Ipmip_cli_daemon_t *daemon,
Ip_u32 handle,
Ip_u32 reason
);
#ifdef IPMIP_USE_INET
/*******************************************************************************
*
* ipmip6pm_cli_node_revoke_inet - ipmip6pm_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 ipmip6pm_cli_node_revoke_inet
(
Ipmip_cli_daemon_t *daemon,
Ip_u32 handle,
Ip_u32 reason
);
#endif
/*******************************************************************************
*
* ipmip6pm_cli_lma_revoke - ipmip6pm_cli_lma_revoke
*
* Revoke a particular LMA
*
* Parameters:
* \is
* \i dameon
* Connection to the IPMIP6PM daemon
* \i ifname
* Interface of this LMA
* \i mag
* LMA v6 address
* \i reason
* Reason for the revokation
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6pm_cli_lma_revoke
(
Ipmip_cli_daemon_t *daemon,
const char *ifname,
const struct Ip_in6_addr *lma,
Ip_u8 reason
);
#ifdef __cplusplus
}
#endif
#endif
/*
****************************************************************************
* END OF FILE
****************************************************************************
*/