Files
m241Neelima/components/ip_net2-6.9/ipmip6pm/config/ipmip6pm_pktbuf.c
T
2026-07-30 11:19:44 +05:30

167 lines
4.8 KiB
C

/*
******************************************************************************
* INTERPEAK SOURCE FILE
*
* Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipmip6pm_pktbuf.c,v $ $Revision: 1.6 $
* $Source: /home/interpeak/CVSRoot/ipmip6pm/config/ipmip6pm_pktbuf.c,v $
* $Author: jhorteli $
* $State: Exp $ $Locker: $
*
* INTERPEAK_COPYRIGHT_STRING
* Design and implementation by Joel Hortelius <joel.hortelis@interpeak.se>
******************************************************************************
*/
/*
****************************************************************************
* 1 DESCRIPTION
****************************************************************************
*/
/*
****************************************************************************
* 2 CONFIGURATION
****************************************************************************
*/
#include "ipmip6pm_config.h"
/*
****************************************************************************
* 3 INCLUDE FILES
****************************************************************************
*/
#define IPCOM_USE_CLIB_PROTO
#include <ipcom_clib.h>
#include <ipcom_err.h>
#include <ipcom_hash.h>
#include <ipcom_inet.h>
#include <ipcom_ipd.h>
#include <ipcom_list.h>
#include <ipcom_os.h>
#include <ipcom_sock.h>
#include <ipcom_sock2.h>
#include <ipcom_syslog.h>
#include <ipcom_sysvar.h>
#include <ipmip.h>
#include <private/ipmip_sysvar.h>
#include <ipmip6.h>
#include <private/ipmip6_pkt.h>
#include <private/ipmip6_context.h>
#include <private/ipmip6_util.h>
#include "ipmip6pm_h.h"
#include "ipmip6pm_pktbuf.h"
/*
****************************************************************************
* 4 DEFINES
****************************************************************************
*/
/*
****************************************************************************
* 5 TYPES
****************************************************************************
*/
/*
****************************************************************************
* 6 EXTERN PROTOTYPES
****************************************************************************
*/
/*
****************************************************************************
* 7 LOCAL PROTOTYPES
****************************************************************************
*/
/*
****************************************************************************
* 8 DATA
****************************************************************************
*/
/*
****************************************************************************
* 9 STATIC FUNCTIONS
****************************************************************************
*/
/*
****************************************************************************
* 10 GLOBAL FUNCTIONS
****************************************************************************
*/
/*
*===========================================================================
* ipmip6pm_pktbuf_alloc
*===========================================================================
* Description: Allocate a packet buffer
* Parameters:
* Returns: A newly allocated packet buffer
*
*/
IP_GLOBAL Ipmip_pktbuf_t *
ipmip6pm_pktbuf_alloc(Ipmip6pm_context_t *ctx,
Ipmip_proc_t *proc,
Ip_size_t extra)
{
Ipmip6pm_pktbuf_t *pbuf;
IPMIP_UNUSED_PARAMETER(ctx);
IPMIP_UNUSED_PARAMETER(proc);
pbuf = ipcom_calloc(1, sizeof(Ipmip6pm_pktbuf_t) + extra);
if (pbuf)
{
pbuf->ipmip6.ipmip.pktend = (void *) (pbuf + 1);
return &pbuf->ipmip6.ipmip;
}
return IP_NULL;
}
/*
*===========================================================================
* ipmip6pm_pktbuf_free
*===========================================================================
* Description: Free a packet buffer
* Parameters: pbuf - The packet buffer
* Returns:
*
*/
IP_GLOBAL void
ipmip6pm_pktbuf_free(Ipmip6pm_context_t *ctx,
Ipmip_proc_t *proc,
Ipmip6pm_pktbuf_t *pbuf)
{
IPMIP_UNUSED_PARAMETER(ctx);
IPMIP_UNUSED_PARAMETER(proc);
/* Free the data */
ipcom_free(pbuf);
}
/*
****************************************************************************
* 11 PUBLIC FUNCTIONS
****************************************************************************
*/
/*
****************************************************************************
* END OF FILE
****************************************************************************
*/