286 lines
7.4 KiB
C
286 lines
7.4 KiB
C
/* ipmip4_cli.h - ipmip4_cli.h */
|
|
/*
|
|
******************************************************************************
|
|
* HEADER FILE
|
|
*
|
|
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipmip4_cli.h,v $ $Revision: 1.10 $
|
|
* $Source: /home/interpeak/CVSRoot/ipmip4/include/private/ipmip4_cli.h,v $
|
|
* $Author: jhorteli $ $Date: 2010-12-07 09:55:10 $
|
|
* $State: Exp $ $Locker: $
|
|
*
|
|
* INTERPEAK_COPYRIGHT_STRING
|
|
* Design and implementation by Joel Hortelius <joel.hortelius@interpeak.se>
|
|
******************************************************************************
|
|
*/
|
|
#ifndef IPMIP4_CLI_H
|
|
#define IPMIP4_CLI_H
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 1 DESCRIPTION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
DESCRIPTION
|
|
|
|
MIP4 CLI functions required for mobile IPv4. Deals with Command Line Interface
|
|
communication with MIPv4. Also implements inter-MIP4 communcation commands
|
|
for Proxy Mobility. The Proxy Mobility entiteis (PMIPv4 and FAv4) bounces
|
|
registration messages and information between each other.
|
|
|
|
The PMIP functions are considered INTERNAL for this release. Until the
|
|
IPMIPFA and IPMIPPM modules receives more extensive communcation.
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 2 CONFIGURATION
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 3 INCLUDE FILES
|
|
****************************************************************************
|
|
*/
|
|
|
|
#include <private/ipmip_cli.h>
|
|
#include <private/ipmip4_attr.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 4 DEFINES
|
|
****************************************************************************
|
|
*/
|
|
enum
|
|
{
|
|
IPMIP4_CLI_START = 2048,
|
|
/* Proxy Registration Request Transport Message */
|
|
IPMIP4_CLI_PMIPV4_PRRQ,
|
|
/* Proxy Mobile Client Trigger Registration Request Message */
|
|
IPMIP4_CLI_PMIPV4_PTRQ,
|
|
/* Proxy Local Trigger Message */
|
|
IPMIP4_CLI_PMIPV4_PLT,
|
|
/* Registration revocation message */
|
|
IPMIP4_CLI_PMIPV4_PREVRQ,
|
|
|
|
IPMIP4_CLI_BASE = 4096
|
|
};
|
|
|
|
|
|
enum
|
|
{
|
|
IPMIP4_CLI_PMIPV4_ATTR_NONE = 0,
|
|
IPMIP4_CLI_PMIPV4_ATTR_MESSAGE,
|
|
IPMIP4_CLI_PMIPV4_ATTR_HANDLER,
|
|
IPMIP4_CLI_PMIPV4_ATTR_IFNAME,
|
|
IPMIP4_CLI_PMIPV4_ATTR_IFADDR,
|
|
IPMIP4_CLI_PMIPV4_ATTR_NFA_COA,
|
|
IPMIP4_CLI_PMIPV4_ATTR_OFA_COA,
|
|
IPMIP4_CLI_PMIPV4_ATTR_MN_NAI,
|
|
IPMIP4_CLI_PMIPV4_ATTR_LIFETIME,
|
|
IPMIP4_CLI_PMIPV4_ATTR_ACCESS_TYPE,
|
|
IPMIP4_CLI_PMIPV4_ATTR_PER_NODE_AUTH_METHOD,
|
|
IPMIP4_CLI_PMIPV4_ATTR_INTERFACE_ID,
|
|
IPMIP4_CLI_PMIPV4_ATTR_DEVICE_ID,
|
|
IPMIP4_CLI_PMIPV4_ATTR_DEVICE_ID_TYPE,
|
|
IPMIP4_CLI_PMIPV4_ATTR_SUBSCRIBER_ID,
|
|
IPMIP4_CLI_PMIPV4_ATTR_SUBSCRIBER_ID_TYPE,
|
|
IPMIP4_CLI_PMIPV4_ATTR_HOA,
|
|
IPMIP4_CLI_PMIPV4_ATTR_HA,
|
|
IPMIP4_CLI_PMIPV4_ATTR_MN_HA_SPI,
|
|
IPMIP4_CLI_PMIPV4_ATTR_MN_HA_SPI_SECRET,
|
|
IPMIP4_CLI_PMIPV4_ATTR_DHCP_RELAY_SERVER,
|
|
IPMIP4_CLI_PMIPV4_ATTR_TUNNEL_TYPE,
|
|
IPMIP4_CLI_PMIPV4_ATTR_TUNNEL_REVERSE,
|
|
IPMIP4_CLI_PMIPV4_ATTR_MAX
|
|
};
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 5 TYPES
|
|
****************************************************************************
|
|
*/
|
|
|
|
struct Ipmip_proc;
|
|
struct Ipmip_cli_daemon;
|
|
|
|
/*
|
|
****************************************************************************
|
|
* 6 FUNCTIONS
|
|
****************************************************************************
|
|
*/
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip4_cli_shell_cmd - ipmip4_cli_shell_cmd
|
|
*
|
|
* Process global CLI commands
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i argc
|
|
* Number of arguments
|
|
* \i argv
|
|
* Arguments
|
|
* \i proc
|
|
* The process context associated with the currently executing thread. Each
|
|
* thread and/or process in MIP must have its own unique process context.
|
|
* If a process is started using ipmip_proc_start, the process context will
|
|
* be allocated automatically by the IPMIP framework. Otherwise it must
|
|
* be allocated using ipmip_proc_alloc().
|
|
* \i daemon
|
|
* Daemon connection
|
|
* \ie
|
|
*
|
|
* RETURNS: > 0 syntax error, 0 = success
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_GLOBAL int ipmip4_cli_shell_cmd
|
|
(
|
|
int argc,
|
|
char **argv,
|
|
struct Ipmip_proc *proc,
|
|
struct Ipmip_cli_daemon *daemon
|
|
);
|
|
|
|
/*******************************************************************************
|
|
*
|
|
* ipmip4_cli_shell_usage - ipmip4_cli_shell_usage
|
|
*
|
|
* Print usage informatin for MIP4 related commands
|
|
*
|
|
* Parameters:
|
|
* \is
|
|
* \i proc
|
|
* The process context associated with the currently executing thread. Each
|
|
* thread and/or process in MIP must have its own unique process context.
|
|
* If a process is started using ipmip_proc_start, the process context will
|
|
* be allocated automatically by the IPMIP framework. Otherwise it must
|
|
* be allocated using ipmip_proc_alloc().
|
|
* \ie
|
|
*
|
|
* RETURNS: No return value
|
|
*
|
|
* ERRNO:
|
|
*
|
|
*/
|
|
IP_GLOBAL void ipmip4_cli_shell_usage
|
|
(
|
|
struct Ipmip_proc *proc
|
|
);
|
|
|
|
|
|
/*** PMIP functions ***/
|
|
|
|
IP_GLOBAL int ipmip4_cli_shell_pmipv4_cmd
|
|
(
|
|
int argc,
|
|
char **argv,
|
|
struct Ipmip_proc *proc,
|
|
struct Ipmip_cli_daemon *daemon
|
|
);
|
|
|
|
IP_GLOBAL void ipmip4_cli_shell_pmipv4_usage
|
|
(
|
|
struct Ipmip_proc *proc
|
|
);
|
|
|
|
|
|
IP_PUBLIC void ipmip4_cli_pmipv4_local_trigger_request_init
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
const char *nai
|
|
);
|
|
|
|
IP_PUBLIC void ipmip4_cli_pmipv4_request_set_nai
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
const char *nai
|
|
);
|
|
|
|
IP_PUBLIC void ipmip4_cli_request_set_ifname
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
const char *ifname
|
|
);
|
|
|
|
IP_PUBLIC void ipmip4_cli_pmipv4_request_set_home_address
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
Ip_u32 hoa
|
|
);
|
|
|
|
IP_PUBLIC void ipmip4_cli_pmipv4_request_set_home_agent
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
Ip_u32 ha
|
|
);
|
|
|
|
IP_PUBLIC void ipmip4_cli_pmipv4_request_set_ofa
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
Ip_u32 fa
|
|
);
|
|
|
|
IP_PUBLIC void ipmip4_cli_pmipv4_request_set_nfa
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
Ip_u32 fa
|
|
);
|
|
|
|
IP_PUBLIC void ipmip4_cli_pmipv4_request_set_mn_ha_spi
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
Ip_u32 spi
|
|
);
|
|
|
|
IP_PUBLIC void ipmip4_cli_pmipv4_request_set_mn_ha_spi_secret
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
const char *secret
|
|
);
|
|
|
|
IP_PUBLIC void ipmip4_cli_pmipv4_request_set_dhcp_relay_server
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
Ip_u32 srv
|
|
);
|
|
|
|
IP_PUBLIC void ipmip4_cli_pmipv4_request_set_tunnel_type
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
Ip_u32 tunnel_type
|
|
);
|
|
|
|
IP_PUBLIC void ipmip4_cli_pmipv4_request_set_handler
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
const char *handler
|
|
);
|
|
|
|
IP_PUBLIC void ipmip4_cli_pmipv4_request_set_ifaddr
|
|
(
|
|
Ipmip_cli_daemon_req_t *req,
|
|
const char *ifaddr
|
|
);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|
|
/*
|
|
****************************************************************************
|
|
* END OF FILE
|
|
****************************************************************************
|
|
*/
|