Files
m241Neelima/components/ip_net2-6.9/ipdhcpc6/src/ipdhcpc6_rtadv.h
T
2026-07-30 11:19:44 +05:30

190 lines
6.5 KiB
C

/*
******************************************************************************
* HEADER FILE
*
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipdhcpc6_rtadv.h,v $ $Revision: 1.3.56.2 $
* $Source: /home/interpeak/CVSRoot/ipdhcpc6/src/ipdhcpc6_rtadv.h,v $
* $Author: fguo $ $Date: 2012-08-30 08:55:18 $
* $State: Exp $ $Locker: $
*
* INTERPEAK_COPYRIGHT_STRING
* Design and implementation by Joel Hortelius <joel.hortelius@interpeak.se>
******************************************************************************
*/
#ifndef IPDHCPC6_RTADV_H
#define IPDHCPC6_RTADV_H
/*
****************************************************************************
* 1 DESCRIPTION
****************************************************************************
*/
/*
****************************************************************************
* 2 CONFIGURATION
****************************************************************************
*/
/*
****************************************************************************
* 3 INCLUDE FILES
****************************************************************************
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
****************************************************************************
* 4 DEFINES
****************************************************************************
*/
#define IPDHCPC6_RTADV_MSG_MAX_LEN 1500
/*
****************************************************************************
* 5 TYPES
****************************************************************************
*/
typedef struct Ipdhcpc6_rtadv_context
{
Ipdhcpc6_context_t *context;
Ip_fd fd_icmp[IPCOM_VR_MAX];
char dbuf[IPDHCPC6_RTADV_MSG_MAX_LEN];
char cbuf[64];
} Ipdhcpc6_rtadv_context_t;
/*
****************************************************************************
* 6 FUNCTIONS
****************************************************************************
*/
/*
*===========================================================================
* ipdhcpc6_rtadv_sock_create
*===========================================================================
* Description: Allocate an RTADV context ICMP socket
* Parameters: rtadvctx - The RTADV context
* vr_index - vr index
* Returns:
*
*/
IP_GLOBAL void
ipdhcpc6_rtadv_sock_create(Ipdhcpc6_rtadv_context_t *rtadvctx, int vr_index);
/*
*===========================================================================
* ipdhcpc6_rtadv_context_alloc
*===========================================================================
* Description: Allocate an RTADV context
* Parameters: context - The context
* Returns:
*
*/
IP_GLOBAL Ipdhcpc6_rtadv_context_t *ipdhcpc6_rtadv_context_alloc(Ipdhcpc6_context_t *context);
/*
*===========================================================================
* ipdhcpc6_rtadv_context_free
*===========================================================================
* Description: Free an rtsock context
* Parameters: rtctxp - Pointer to the DHCPC6 rtsock context.
* Returns:
*
*/
IP_GLOBAL void ipdhcpc6_rtadv_context_free(Ipdhcpc6_rtadv_context_t **rtctxp);
/*
*===========================================================================
* ipdhcpc6_rtadv_context_fdset_init
*===========================================================================
* Description: Initialize all file descriptors of this context
* Parameters: rtctx - rtsock context
* rset - Read set to initialize.
* mfd - Maximum file descriptor.
* Returns:
*
*/
IP_GLOBAL void ipdhcpc6_rtadv_context_fdset_init(Ipdhcpc6_rtadv_context_t *rtctx,
Ip_fd_set *rset,
int *mfd);
/*
*===========================================================================
* ipdhcpc6_rtadv_context_fdset_process
*===========================================================================
* Description: Process all file descriptors of this context
* Parameters: rtctx - rtsock context
* rset - Read set to initialize.
* status - Incoming status
* Returns: Outgoing status
*
*/
IP_GLOBAL int ipdhcpc6_rtadv_context_fdset_process(Ipdhcpc6_rtadv_context_t *rtctx,
Ip_fd_set *rset,
int status);
/*
*===========================================================================
* ipdhcpc6_rtadv_down
*===========================================================================
* Description: Cleanup any routers & prefixes currently stored in the IFP.
* Parameters: context - The context
* ifp - The IFP.
* Returns:
*
*/
IP_GLOBAL void ipdhcpc6_rtadv_down(Ipdhcpc6_context_t *context,
Ipdhcpc6_if_t *ifp);
/*
*===========================================================================
* ipdhcpc6_rtadv_up
*===========================================================================
* Description: Initialize the RTADV portion of the IFP.
* Parameters: context - The context
* ifp - The IFP.
* Returns:
*
*/
IP_GLOBAL void ipdhcpc6_rtadv_up(Ipdhcpc6_context_t *context,
Ipdhcpc6_if_t *ifp);
/*
*===========================================================================
* ip_func
*===========================================================================
* Description:
* Parameters:
* Returns:
*
*/
IP_GLOBAL Ip_bool ipdhcpc6_rtadv_prefix_set(Ipdhcpc6_context_t *context,
Ipdhcpc6_if_t *ifp,
Ipdhcpc6_attr_binding_t *binding);
#ifdef __cplusplus
}
#endif
#endif
/*
****************************************************************************
* END OF FILE
****************************************************************************
*/