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

169 lines
4.8 KiB
C

/* ipmip6_attr.h - ipmip6_attr.h */
/*
******************************************************************************
* HEADER FILE
*
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipmip6_attr.h,v $ $Revision: 1.4 $
* $Source: /home/interpeak/CVSRoot/ipmip6/include/private/ipmip6_attr.h,v $
* $Author: jhorteli $ $Date: 2010-12-07 09:55:18 $
* $State: Exp $ $Locker: $
*
* INTERPEAK_COPYRIGHT_STRING
* Design and implementation by Joel Hortelius <joel.hortelius@interpeak.se>
******************************************************************************
*/
#ifndef IPMIP6_ATTR_H
#define IPMIP6_ATTR_H
/*
****************************************************************************
* 1 DESCRIPTION
****************************************************************************
*/
/*
DESCRIPTION
MIP6 attribute functions required for mobile IPv6. Deals with retrieval
and assignment of MIPv6 specific attributes.
EXAMPLE
A basic example of how the IPMIP6 attribute function can be used. See
my_init_func in ipmip_cli.h for an example as to how to properly register
ipmip6myattr_attr_command.
.CS
/@ Define some attributes that the node have @/
enum
{
IPMIP6MYATTR_CLI_LIST = IPMIP6_CLI_BASE,
IPMIP6MYATTR_CLI_MAX
};
IP_GLOBAL int
ipmip6myattr_attr_command(struct Ipmip6my_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 IPMIP6MYATTR_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 MIP6 command @/
return ipmip6_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/ipmip6_cli.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
****************************************************************************
* 4 DEFINES
****************************************************************************
*/
/*
****************************************************************************
* 5 TYPES
****************************************************************************
*/
struct Ipmip6_context;
struct Ipmip_proc;
struct Ipmip_cli_message;
/*
****************************************************************************
* 6 FUNCTIONS
****************************************************************************
*/
/*******************************************************************************
*
* ipmip6_attr_command - ipmip6_attr_command
*
* Process MIP6 specific attributes
*
* Parameters:
* \is
* \i ctx
* The generic mobility singleton context for IPMIP6. 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 ipmip6_context_create(). See ipmip6_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 ipmip6_attr_command
(
struct Ipmip6_context *ctx,
struct Ipmip_proc *proc,
struct Ipmip_cli_message *request
);
#ifdef __cplusplus
}
#endif
#endif
/*
****************************************************************************
* END OF FILE
****************************************************************************
*/