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

784 lines
15 KiB
C

/*
******************************************************************************
* HEADER FILE
*
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipmip6mn_cli.h,v $ $Revision: 1.5 $
* $Source: /home/interpeak/CVSRoot/ipmip6mn/include/ipmip6mn_cli.h,v $
* $Author: jhorteli $ $Date: 2009-03-31 15:00:25 $
* $State: Exp $ $Locker: $
*
* INTERPEAK_COPYRIGHT_STRING
* Design and implementation by Joel Hortelius <joel.hortelius@interpeak.se>
******************************************************************************
*/
#ifndef IPMIP6MN_CLI_H
#define IPMIP6MN_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 Ipmip6mn_attr_dsmipv6;
/*
****************************************************************************
* 6 FUNCTIONS
****************************************************************************
*/
/*******************************************************************************
*
* ipmip6mn_cli_connect - ipmip6mn_cli_connect
*
* Connect to the mobile node 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 ipmip6mn_cli_connect
(
Ipmip_cli_daemon_t *daemon_info
);
/*******************************************************************************
*
* ipmip6mn_cli_network_set_name - ipmip6mn_cli_network_set_name
*
* Set a NAME identifier that identifies the network we're looking for
*
* Parameters:
* \is
* \i req
* Daemon request structure
* \i name
* NAME identifier
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6mn_cli_network_set_name
(
Ipmip_cli_daemon_req_t *req,
const char *name
);
/*******************************************************************************
*
* ipmip6mn_cli_network_list - ipmip6mn_cli_network_list
*
* List all networks matching the specified search criteries
*
* Parameters:
* \is
* \i daemon
* Connection to the IPMIP6MN daemon
* \i req
* Request to use.
* \i name
* If specified will only verify that this particular network exists. If not
* specified (IP_NULL) will result in dumping all available networks.
* \ie
*
* RETURNS: IPCOM_SUCCESS if the request was successful
*
* ERRNO:
*
*/
IP_PUBLIC int ipmip6mn_cli_network_list
(
Ipmip_cli_daemon_t *daemon,
Ipmip_cli_daemon_req_t *req,
const char *name
);
/*******************************************************************************
*
* ipmip6mn_cli_network_next - ipmip6mn_cli_network_next
*
* Return the next network
*
* Parameters:
* \is
* \i iter
* Iterator
* \ie
*
* RETURNS: The next network name or IP_NULL
*
* ERRNO:
*
*/
IP_PUBLIC const char * ipmip6mn_cli_network_next
(
Ipmip_attr_iter_t *iter
);
/*******************************************************************************
*
* ipmip6mn_cli_network_get - ipmip6mn_cli_network_get
*
* Retrieve information on a specific network
*
* Parameters:
* \is
* \i daemon
* Connection to the IPMIP6MN daemon
* \i req
* Request to use.
* \i name
* Network Name to look for.
* \ie
*
* RETURNS: IPCOM_SUCCESS on success, < 0 otherwise
*
* ERRNO:
*
*/
IP_PUBLIC int ipmip6mn_cli_network_get
(
Ipmip_cli_daemon_t *daemon,
Ipmip_cli_daemon_req_t *req,
const char *name
);
/*******************************************************************************
*
* ipmip6mn_cli_network_get_mip6MnHomeAddressEntry - ipmip6mn_cli_network_get_mip6MnHomeAddressEntry
*
* Return the mip6MnHomeAddressEntry of the network
*
* Parameters:
* \is
* \i req
* The request
* \ie
*
* RETURNS: The mip6MnHomeAddressEntry or IP_NULL
*
* ERRNO:
*
*/
IP_PUBLIC const struct Ipmip6_mib_mip6MnHomeAddressEntry *ipmip6mn_cli_network_get_mip6MnHomeAddressEntry
(
Ipmip_cli_daemon_req_t *req
);
/*******************************************************************************
*
* ipmip6mn_cli_network_get_mip6MnConf - ipmip6mn_cli_network_get_mip6MnConf
*
* Return the mip6MnConf of the network
*
* Parameters:
* \is
* \i req
* The request
* \ie
*
* RETURNS: The mip6MnConf or IP_NULL
*
* ERRNO:
*
*/
IP_PUBLIC const struct Ipmip6_mib_mip6MnConf *ipmip6mn_cli_network_get_mip6MnConf
(
Ipmip_cli_daemon_req_t *req
);
/*******************************************************************************
*
* ipmip6mn_cli_network_get_mip6MnRegnCounters - ipmip6mn_cli_network_get_mip6MnRegnCounters
*
* Return the mip6MnRegnCounters of the network
*
* Parameters:
* \is
* \i req
* The request
* \ie
*
* RETURNS: The mip6MnRegnCounters or IP_NULL
*
* ERRNO:
*
*/
IP_PUBLIC const struct Ipmip6_mib_mip6MnRegnCounters *ipmip6mn_cli_network_get_mip6MnRegnCounters
(
Ipmip_cli_daemon_req_t *req
);
/*******************************************************************************
*
* ipmip6mn_cli_network_get_mip6TotalTraffic - ipmip6mn_cli_network_get_mip6TotalTraffic
*
* Return the mip6TotalTraffic of the network
*
* Parameters:
* \is
* \i req
* The request
* \ie
*
* RETURNS: The mip6TotalTraffic or IP_NULL
*
* ERRNO:
*
*/
IP_PUBLIC const struct Ipmip6_mib_mip6TotalTraffic *ipmip6mn_cli_network_get_mip6TotalTraffic
(
Ipmip_cli_daemon_req_t *req
);
/*******************************************************************************
*
* ipmip6mn_cli_network_get_mip6NodeTrafficEntry - ipmip6mn_cli_network_get_mip6NodeTrafficEntry
*
* Return the mip6NodeTrafficEntry of the network
*
* Parameters:
* \is
* \i req
* The request
* \ie
*
* RETURNS: The mip6NodeTrafficEntry or IP_NULL
*
* ERRNO:
*
*/
IP_PUBLIC const struct Ipmip6_mib_mip6NodeTrafficEntry *ipmip6mn_cli_network_get_mip6NodeTrafficEntry
(
Ipmip_cli_daemon_req_t *req
);
/*******************************************************************************
*
* ipmip6mn_cli_network_get_name - ipmip6mn_cli_network_get_name
*
* Return the NAME of the network
*
* Parameters:
* \is
* \i req
* The request
* \ie
*
* RETURNS: The NAME or IP_NULL
*
* ERRNO:
*
*/
IP_PUBLIC const char *ipmip6mn_cli_network_get_name
(
Ipmip_cli_daemon_req_t *req
);
/*******************************************************************************
*
* ipmip6mn_cli_network_get_tunnel_ifname - ipmip6mn_cli_network_get_tunnel_ifname
*
* Return the TUNNEL ifname of the network
*
* Parameters:
* \is
* \i req
* The request
* \ie
*
* RETURNS: The TUNNEL ifname or IP_NULL
*
* ERRNO:
*
*/
IP_PUBLIC const char *ipmip6mn_cli_network_get_tunnel_ifname
(
Ipmip_cli_daemon_req_t *req
);
/*******************************************************************************
*
* ipmip6mn_cli_network_get_ifnames - ipmip6mn_cli_network_get_ifnames
*
* Return the RTA containing the ifnames currently being used
*
* Parameters:
* \is
* \i req
* The request
* \ie
*
* RETURNS: The IFNAMES RTA
*
* ERRNO:
*
*/
IP_PUBLIC struct Ipmip_attr *ipmip6mn_cli_network_get_ifnames
(
Ipmip_cli_daemon_req_t *req
);
/*******************************************************************************
*
* ipmip6mn_cli_network_get_ifnames_iter - ipmip6mn_cli_network_get_ifnames_iter
*
* Initializes the iterator with ifnames block; to be used in
* ipmip6mn_cli_network_get_ifnames_next
*
* Parameters:
* \is
* \i req
* The request
* \i iter
* The iterator
* \ie
*
* RETURNS: IP_TRUE on success.
*
* ERRNO:
*
*/
IP_PUBLIC Ip_bool ipmip6mn_cli_network_get_ifnames_iter
(
Ipmip_cli_daemon_req_t *req,
Ipmip_attr_iter_t *iter
);
/*******************************************************************************
*
* ipmip6mn_cli_network_get_ifnames_next - ipmip6mn_cli_network_get_ifnames_next
*
* Return the next interface name in the iterator
*
* Parameters:
* \is
* \i iter
* The iterator
* \ie
*
* RETURNS: The next interface name
*
* ERRNO:
*
*/
IP_PUBLIC const char *ipmip6mn_cli_network_get_ifnames_next
(
Ipmip_attr_iter_t *iter
);
/*******************************************************************************
*
* ipmip6mn_cli_network_get_cn_bindings - ipmip6mn_cli_network_get_cn_bindings
*
* Return the CN bindings
*
* Parameters:
* \is
* \i req
* The request
* \ie
*
* RETURNS: The CN bindings RTA
*
* ERRNO:
*
*/
IP_PUBLIC struct Ipmip_attr *ipmip6mn_cli_network_get_cn_bindings
(
Ipmip_cli_daemon_req_t *req
);
/*******************************************************************************
*
* ipmip6mn_cli_network_get_ha_bindings - ipmip6mn_cli_network_get_ha_bindings
*
* Return the HA bindings
*
* Parameters:
* \is
* \i req
* The request
* \ie
*
* RETURNS: The HA bindings RTA
*
* ERRNO:
*
*/
IP_PUBLIC struct Ipmip_attr *ipmip6mn_cli_network_get_ha_bindings
(
Ipmip_cli_daemon_req_t *req
);
/*******************************************************************************
*
* ipmip6mn_cli_network_get_cn_bindings_iter - ipmip6mn_cli_network_get_cn_bindings_iter
*
* Initializes the iterator with a CN bindings block; to be used in
* ipmip6mn_cli_network_get_bindings_next
*
* Parameters:
* \is
* \i req
* The request
* \i iter
* The iterator
* \ie
*
* RETURNS: IP_TRUE on success.
*
* ERRNO:
*
*/
IP_PUBLIC Ip_bool ipmip6mn_cli_network_get_cn_bindings_iter
(
Ipmip_cli_daemon_req_t *req,
Ipmip_attr_iter_t *iter
);
/*******************************************************************************
*
* ipmip6mn_cli_network_get_ha_bindings_iter - ipmip6mn_cli_network_get_ha_bindings_iter
*
* Initializes the iterator with a HA bindings block; to be used in
* ipmip6mn_cli_network_get_bindings_next
*
* Parameters:
* \is
* \i req
* The request
* \i iter
* The iterator
* \ie
*
* RETURNS: IP_TRUE on success.
*
* ERRNO:
*
*/
IP_PUBLIC Ip_bool ipmip6mn_cli_network_get_ha_bindings_iter
(
Ipmip_cli_daemon_req_t *req,
Ipmip_attr_iter_t *iter
);
/*******************************************************************************
*
* ipmip6mn_cli_network_get_bindings_next - ipmip6mn_cli_network_get_bindings_next
*
* Return the next mip6MnBLTable in the iterator
*
* Parameters:
* \is
* \i iter
* The iterator
* \ie
*
* RETURNS: The next mip6MnBLTable
*
* ERRNO:
*
*/
IP_PUBLIC struct Ipmip_attr *ipmip6mn_cli_network_get_bindings_next
(
Ipmip_attr_iter_t *iter
);
/*******************************************************************************
*
* ipmip6mn_cli_network_get_bindings_mip6MnBLTable - ipmip6mn_cli_network_get_bindings_mip6MnBLTable
*
* Return the mip6MnBLTable of the binding
*
* Parameters:
* \is
* \i rta
* The binding
* \ie
*
* RETURNS: The mip6MnBLTable
*
* ERRNO:
*
*/
IP_PUBLIC const struct Ipmip6_mib_mip6MnBLTable *ipmip6mn_cli_network_get_bindings_mip6MnBLTable
(
struct Ipmip_attr *rta
);
/*******************************************************************************
*
* ipmip6mn_cli_network_get_bindings_encap - ipmip6mn_cli_network_get_bindings_encap
*
* Return the ENCAP type of the binding
*
* Parameters:
* \is
* \i rta
* The binding
* \ie
*
* RETURNS: The ENCAP type.
*
* ERRNO:
*
*/
IP_PUBLIC Ip_u32 ipmip6mn_cli_network_get_bindings_encap
(
struct Ipmip_attr *rta
);
/*******************************************************************************
*
* ipmip6mn_cli_network_get_bindings_ifname - ipmip6mn_cli_network_get_bindings_ifname
*
* Return the interface used by this binding
*
* Parameters:
* \is
* \i rta
* The binding
* \ie
*
* RETURNS: The interface used by this binding
*
* ERRNO:
*
*/
IP_PUBLIC const char * ipmip6mn_cli_network_get_bindings_ifname
(
struct Ipmip_attr *rta
);
#ifdef IPMIP_USE_INET
/*******************************************************************************
*
* ipmip6mn_cli_network_get_dsmipv6 - ipmip6mn_cli_network_get_dsmipv6
*
* Return the RTA containing the DSMIPV6 currently being used
*
* Parameters:
* \is
* \i req
* The request
* \ie
*
* RETURNS: The DSMIPV6 RTA
*
* ERRNO:
*
*/
IP_PUBLIC struct Ipmip_attr *ipmip6mn_cli_network_get_dsmipv6
(
Ipmip_cli_daemon_req_t *req
);
/*******************************************************************************
*
* ipmip6mn_cli_network_get_dsmipv6_iter - ipmip6mn_cli_network_get_dsmipv6_iter
*
* Initializes the iterator with DSMIPV6 block; to be used in
* ipmip6mn_cli_network_get_dsmipv6_next
*
* Parameters:
* \is
* \i req
* The request
* \i iter
* The iterator
* \ie
*
* RETURNS: IP_TRUE on success.
*
* ERRNO:
*
*/
IP_PUBLIC Ip_bool ipmip6mn_cli_network_get_dsmipv6_iter
(
Ipmip_cli_daemon_req_t *req,
Ipmip_attr_iter_t *iter
);
/*******************************************************************************
*
* ipmip6mn_cli_network_get_dsmipv6_next - ipmip6mn_cli_network_get_dsmipv6_next
*
* Return the next DSMIPV6 in the iterator
*
* Parameters:
* \is
* \i iter
* The iterator
* \ie
*
* RETURNS: The next DSMIPv6 instance
*
* ERRNO:
*
*/
IP_PUBLIC const struct Ipmip6mn_attr_dsmipv6 *ipmip6mn_cli_network_get_dsmipv6_next
(
Ipmip_attr_iter_t *iter
);
#endif
/*******************************************************************************
*
* ipmip6mn_cli_network_addif_init - ipmip6mn_cli_network_addif_init
*
* Create the embryo to a addif request
*
* Parameters:
* \is
* \i req
* Request to use.
* \i network
* NETWORK to update. MUST be specified or this function will fail.
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6mn_cli_network_addif_init
(
Ipmip_cli_daemon_req_t *req,
const char *network
);
/*******************************************************************************
*
* ipmip6mn_cli_network_delif_init - ipmip6mn_cli_network_delif_init
*
* Create the embryo to a delif request
*
* Parameters:
* \is
* \i req
* Request to use.
* \i network
* NETWORK to update. MUST be specified or this function will fail.
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6mn_cli_network_delif_init
(
Ipmip_cli_daemon_req_t *req,
const char *network
);
/*******************************************************************************
*
* ipmip6mn_cli_network_add_ifname - ipmip6mn_cli_network_add_ifname
*
* Add an interface name to a request
*
* Parameters:
* \is
* \i req
* Request to use.
* \i ifname
* Interface name
* \ie
*
* RETURNS: No return value
*
* ERRNO:
*
*/
IP_PUBLIC void ipmip6mn_cli_network_add_ifname
(
Ipmip_cli_daemon_req_t *req,
const char *ifname
);
#ifdef __cplusplus
}
#endif
#endif
/*
****************************************************************************
* END OF FILE
****************************************************************************
*/