Files
m241Neelima/components/ip_net2-6.9/ipmipfa/include/ipmipfa_cli.h
T
2026-07-30 11:19:44 +05:30

1067 lines
20 KiB
C

/*
******************************************************************************
* HEADER FILE
*
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipmipfa_cli.h,v $ $Revision: 1.2 $
* $Source: /home/interpeak/CVSRoot/ipmipfa/include/ipmipfa_cli.h,v $
* $Author: jhorteli $ $Date: 2009-12-02 08:50:42 $
* $State: Exp $ $Locker: $
*
* INTERPEAK_COPYRIGHT_STRING
* Design and implementation by Joel Hortelius <joel.hortelius@interpeak.se>
******************************************************************************
*/
#ifndef IPMIPFA_CLI_H
#define IPMIPFA_CLI_H
/*
****************************************************************************
* 1 DESCRIPTION
****************************************************************************
*/
/*
****************************************************************************
* 2 CONFIGURATION
****************************************************************************
*/
/*
****************************************************************************
* 3 INCLUDE FILES
****************************************************************************
*/
#include <private/ipmip4_cli.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
****************************************************************************
* 4 DEFINES
****************************************************************************
*/
/*
****************************************************************************
* 5 TYPES
****************************************************************************
*/
struct Ipmip_attr;
struct Ipmip_lladdr;
struct Ipmipfa_mib_RegistrationCounters;
/*
****************************************************************************
* 6 FUNCTIONS
****************************************************************************
*/
/*******************************************************************************
*
* ipmipfa_cli_connect - ipmipfa_cli_connect
*
* Connect to the foreign agent daemon.
*
* Parameters:
* \is
* \i daemon_info
* Will be filled in by the function
* \ie
*
* RETURNS: IP_TRUE on success
*
* ERRNO:
*
*/
IP_PUBLIC Ip_bool ipmipfa_cli_connect
(
Ipmip_cli_daemon_t *daemon_info
);
/*******************************************************************************
*
* ipmipfa_cli_node_list - ipmipfa_cli_node_list
*
* List all nodes matching the specified search criteries
*
* Parameters:
* \is
* \i dameon
* Connection to the IPMIPFA 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
* \i hoa
* Home Address to look for
* \i ha
* Home Agent to look for
* \ie
*
* RETURNS: IPCOM_SUCCESS if the request was successful
*
* ERRNO:
*
*/
IP_PUBLIC int ipmipfa_cli_node_list
(
Ipmip_cli_daemon_t *daemon,
Ipmip_cli_daemon_req_t *req,
const char *nai,
const char *ifname,
Ip_u32 hoa,
Ip_u32 ha
);
/*******************************************************************************
*
* ipmipfa_cli_request_set_nai - ipmipfa_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 ipmipfa_cli_request_set_nai
(
Ipmip_cli_daemon_req_t *req,
const char *nai
);
/*******************************************************************************
*
* ipmipfa_cli_request_set_handle - ipmipfa_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 ipmipfa_cli_request_set_handle
(
Ipmip_cli_daemon_req_t *req,
Ip_u32 handle
);
/*******************************************************************************
*
* ipmipfa_cli_request_set_home_address - ipmipfa_cli_request_set_home_address
*
* Set a home address identifier in the request
*
* Parameters:
* \is
* \i req
* Daemon request structure
* \i hoa
* The home address
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmipfa_cli_request_set_home_address
(
Ipmip_cli_daemon_req_t *req,
Ip_u32 hoa
);
/*******************************************************************************
*
* ipmipfa_cli_request_set_home_agent - ipmipfa_cli_request_set_home_agent
*
* Set a home agent identifier in the request
*
* Parameters:
* \is
* \i req
* Daemon request structure
* \i ha
* The home agent
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmipfa_cli_request_set_home_agent
(
Ipmip_cli_daemon_req_t *req,
Ip_u32 ha
);
/*******************************************************************************
*
* ipmipfa_cli_request_set_ifname - ipmipfa_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 ipmipfa_cli_request_set_ifname
(
Ipmip_cli_daemon_req_t *req,
const char *ifname
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_created - ipmipfa_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 ipmipfa_cli_node_get_created
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_handle - ipmipfa_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 ipmipfa_cli_node_get_handle
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_home_address - ipmipfa_cli_node_get_home_address
*
* Returns the home address of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The home address or zero if not found
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmipfa_cli_node_get_home_address
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_tunnel_endpoint - ipmipfa_cli_node_get_tunnel_endpoint
*
* Returns the tunneling endpoint of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The tunneling endpoint or zero if not found
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmipfa_cli_node_get_tunnel_endpoint
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_tunnel_type - ipmipfa_cli_node_get_tunnel_type
*
* Returns the tunneling type of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The tunneling type
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmipfa_cli_node_get_tunnel_type
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_tunnel_flags - ipmipfa_cli_node_get_tunnel_flags
*
* Returns the tunneling flags of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The tunneling flags
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmipfa_cli_node_get_tunnel_flags
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_home_agent - ipmipfa_cli_node_get_home_agent
*
* Returns the home agent of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The home agent or zero if not found
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmipfa_cli_node_get_home_agent
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_time_granted - ipmipfa_cli_node_get_time_granted
*
* Returns the granted time of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The granted time
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmipfa_cli_node_get_time_granted
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_time_remaining - ipmipfa_cli_node_get_time_remaining
*
* Returns the remaining time of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The remaining time
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmipfa_cli_node_get_time_remaining
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_last_updated - ipmipfa_cli_node_get_last_updated
*
* Returns the time the node was last updated
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The last updated time
*
* ERRNO:
*
*/
IP_PUBLIC Ip_time_t ipmipfa_cli_node_get_last_updated
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_registration_type - ipmipfa_cli_node_get_registration_type
*
* Returns the registration type of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The registration type
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmipfa_cli_node_get_registration_type
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_spi_mobile_foreign - ipmipfa_cli_node_get_spi_mobile_foreign
*
* Returns MF SPI of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The SPI
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmipfa_cli_node_get_spi_mobile_foreign
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_stats_rcv_octets64 - ipmipfa_cli_node_get_stats_rcv_octets64
*
* Returns the recived octets
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The received octets
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u64 ipmipfa_cli_node_get_stats_rcv_octets64
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_stats_rcv_pkts64 - ipmipfa_cli_node_get_stats_rcv_pkts64
*
* Returns the recived packets
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The received packets
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u64 ipmipfa_cli_node_get_stats_rcv_pkts64
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_stats_snd_octets64 - ipmipfa_cli_node_get_stats_snd_octets64
*
* Returns the sent octets
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The sent octets
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u64 ipmipfa_cli_node_get_stats_snd_octets64
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_stats_snd_pkts64 - ipmipfa_cli_node_get_stats_snd_pkts64
*
* Returns the sent packets
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The sent packets
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u64 ipmipfa_cli_node_get_stats_snd_pkts64
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_spi_foreign_home - ipmipfa_cli_node_get_spi_foreign_home
*
* Returns FH SPI of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The SPI
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmipfa_cli_node_get_spi_foreign_home
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_spi_mobile_AAA - ipmipfa_cli_node_get_spi_mobile_AAA
*
* Returns AAA SPI of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The SPI
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmipfa_cli_node_get_spi_mobile_AAA
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_visitor_ip - ipmipfa_cli_node_get_visitor_ip
*
* Returns the visitor IP
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The visitor IP
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmipfa_cli_node_get_visitor_ip
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_registration_flags - ipmipfa_cli_node_get_registration_flags
*
* Returns the registration flags
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The registration flags
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmipfa_cli_node_get_registration_flags
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_RegIdHigh - ipmipfa_cli_node_get_RegIdHigh
*
* Returns RegIDHigh of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The RegIDHigh
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmipfa_cli_node_get_RegIdHigh
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_RegIdLow - ipmipfa_cli_node_get_RegIdLow
*
* Returns RegIDLow of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The RegIDHigh
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmipfa_cli_node_get_RegIdLow
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_ifname - ipmipfa_cli_node_get_ifname
*
* Returns the interface of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The interface name or zero if not found
*
* ERRNO:
*
*/
IP_PUBLIC const char *ipmipfa_cli_node_get_ifname
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_nai - ipmipfa_cli_node_get_nai
*
* Returns the Mobile NAI of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The mobile NAI or IP_NULL
*
* ERRNO:
*
*/
IP_PUBLIC const char *ipmipfa_cli_node_get_nai
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get_lladdr - ipmipfa_cli_node_get_lladdr
*
* Returns the LLADDR of the node
*
* Parameters:
* \is
* \i node
* rta containing the node attributes
* \ie
*
* RETURNS: The nodes LLADDR
*
* ERRNO:
*
*/
IP_PUBLIC struct Ipmip_lladdr *ipmipfa_cli_node_get_lladdr
(
struct Ipmip_attr *node
);
/*******************************************************************************
*
* ipmipfa_cli_node_get - ipmipfa_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 *ipmipfa_cli_node_get
(
Ipmip_cli_daemon_t *daemon,
Ipmip_cli_daemon_req_t *req,
Ip_u32 handle
);
/*******************************************************************************
*
* ipmipfa_cli_handle_next - ipmipfa_cli_handle_next
*
* Return the next handle
*
* Parameters:
* \is
* \i iter
* Iterator
* \ie
*
* RETURNS: The next handle or 0
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmipfa_cli_handle_next
(
Ipmip_attr_iter_t *iter
);
/*******************************************************************************
*
* ipmipfa_cli_daemon_mute - ipmipfa_cli_daemon_mute
*
* Cancel all router advertisements
*
* Parameters:
* \is
* \i daemon
* The daemon connection
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmipfa_cli_daemon_mute
(
Ipmip_cli_daemon_t *daemon
);
/*******************************************************************************
*
* ipmipfa_cli_daemon_start - ipmipfa_cli_daemon_start
*
* Start foreign agent operation
*
* Parameters:
* \is
* \i daemon
* The daemon connection
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmipfa_cli_daemon_start
(
Ipmip_cli_daemon_t *daemon
);
/*******************************************************************************
*
* ipmipfa_cli_daemon_stop - ipmipfa_cli_daemon_stop
*
* Stop foreign agent operation
*
* Parameters:
* \is
* \i daemon
* The daemon connection
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmipfa_cli_daemon_stop
(
Ipmip_cli_daemon_t *daemon
);
/*******************************************************************************
*
* ipmipfa_cli_daemon_registration_counters - ipmipfa_cli_daemon_registration_counters
*
* Return the foreign agents registration counters
*
* Parameters:
* \is
* \i daemon
* The daemon connection
* \i req
* The request structure
* \ie
*
* RETURNS: The registration counters, or IP_NULL
*
* ERRNO:
*
*/
IP_PUBLIC struct Ipmipfa_mib_RegistrationCounters *ipmipfa_cli_daemon_registration_counters
(
Ipmip_cli_daemon_t *daemon,
Ipmip_cli_daemon_req_t *req
);
/*******************************************************************************
*
* ipmipfa_cli_node_delete - ipmipfa_cli_node_delete
*
* Delete a particular node
*
* Parameters:
* \is
* \i daemon
* The daemon connection
* \i handle
* The node handle
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmipfa_cli_node_delete
(
Ipmip_cli_daemon_t *daemon,
Ip_u32 handle
);
/*******************************************************************************
*
* ipmipfa_cli_node_revoke - ipmipfa_cli_node_revoke
*
* Revoke a particular node
*
* Parameters:
* \is
* \i daemon
* The daemon connection
* \i handle
* The node handle
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmipfa_cli_node_revoke
(
Ipmip_cli_daemon_t *daemon,
Ip_u32 handle
);
/*******************************************************************************
*
* ipmipfa_cli_daemon_l2_trigger - ipmipfa_cli_daemon_l2_trigger
*
* Send an L2 Trigger
*
* Parameters:
* \is
* \i daemon
* The daemon connection
* \i trigger
* A trigger value; one of IPMIPFA_CLI_BC_X_L2_TRIGGER_ST,
* IPMIPFA_CLI_BC_X_L2_TRIGGER_TT, IPMIPFA_CLI_BC_X_L2_TRIGGER_LD or
* IPMIPFA_CLI_BC_X_L2_TRIGGER_LU.
* \i mnip
* Mobile node IP
* \i ifname
* Interface name
* \i faip
* Foreign Agent IP
* \i ll
* Link-Layer address in text form; will be parsed based on ifname.
* \ie
*
* RETURNS: The registration counters, or IP_NULL
*
* ERRNO:
*
*/
IP_PUBLIC Ip_bool ipmipfa_cli_daemon_l2_trigger
(
Ipmip_cli_daemon_t *daemon,
int trigger,
Ip_u32 mnip,
const char *ifname,
Ip_u32 faip,
const char *ll
);
#ifdef __cplusplus
}
#endif
#endif
/*
****************************************************************************
* END OF FILE
****************************************************************************
*/