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

171 lines
4.8 KiB
C

/* ipmip4_attr.h - ipmip4_attr.h */
/*
******************************************************************************
* HEADER FILE
*
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipmip4_attr.h,v $ $Revision: 1.4 $
* $Source: /home/interpeak/CVSRoot/ipmip4/include/private/ipmip4_attr.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_ATTR_H
#define IPMIP4_ATTR_H
/*
****************************************************************************
* 1 DESCRIPTION
****************************************************************************
*/
/*
DESCRIPTION
MIP4 attribute functions required for mobile IPv4. Deals with retrieval
and assignment of MIPv4 specific attributes.
EXAMPLE
A basic example of how the IPMIP4 attribute function can be used. See
my_init_func in ipmip_cli.h for an example as to how to properly register
ipmip4myattr_attr_command.
.CS
/@ Define some attributes that the node have @/
enum
{
IPMIP4MYATTR_CLI_LIST = IPMIP4_CLI_BASE,
IPMIP4MYATTR_CLI_MAX
};
IP_GLOBAL int
ipmip4myattr_attr_command(struct Ipmip4my_context *ctx,
struct Ipmip_proc *proc,
struct Ipmip_cli_message *request)
{
struct Ipmip_attr_header *hdr = (struct Ipmip_attr_header *)IPMIP_BUFFER_DATA(&request->request);
Ip_size_t rhdr;
unsigned int si, f;
switch (IPMIP_ATTR_HDR_TYPE(hdr))
{
case IPMIP4MYATTR_CLI_LIST:
/@ LIST ALL NODES @/
rhdr = ipmip_attr_hdr_ack(&request->message, hdr);
break;
default:
/@ We did not define this command, see if its a generic MIP4 command @/
return ipmip4_attr_command(&data->ipmip4, proc, request);
}
/@ Terminate the reply header @/
ipmip_attr_hdr_finalize(&request->message, rhdr);
/@ Terminate the reply header @/
ipmip_cli_message_commit(&data->ipmip4.ipmip, proc, request);
return 0;
}
.CE
*/
/*
****************************************************************************
* 2 CONFIGURATION
****************************************************************************
*/
/*
****************************************************************************
* 3 INCLUDE FILES
****************************************************************************
*/
#include <private/ipmip_attr.h>
#include <private/ipmip4_cli.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
****************************************************************************
* 4 DEFINES
****************************************************************************
*/
/*
****************************************************************************
* 5 TYPES
****************************************************************************
*/
struct Ipmip4_context;
struct Ipmip_proc;
struct Ipmip_cli_message;
/*
****************************************************************************
* 6 FUNCTIONS
****************************************************************************
*/
/*******************************************************************************
*
* ipmip4_attr_command - ipmip4_attr_command
*
* Internal function to MIP4 entities
* Process MIP4 specific attributes
*
* Parameters:
* \is
* \i ctx
* The generic mobility singleton context for IPMIP4. For each started mobility
* entity, there exists a mobility context which tracks configuration, system
* events, available features and started processes. The mobility context is
* created using ipmip4_context_create(). See ipmip4_context.h for
* more information regarding the mobility entity context singleton.
* \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 request
* Request header
* \i request
* Request header
* \ie
*
* RETURNS: Return value
*
* ERRNO:
*
*/
IP_GLOBAL int ipmip4_attr_command
(
struct Ipmip4_context *ctx,
struct Ipmip_proc *proc,
struct Ipmip_cli_message *request
);
#ifdef __cplusplus
}
#endif
#endif
/*
****************************************************************************
* END OF FILE
****************************************************************************
*/