/* ****************************************************************************** * 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 ****************************************************************************** */ /* **************************************************************************** * 1 DESCRIPTION **************************************************************************** */ /* **************************************************************************** * 2 CONFIGURATION **************************************************************************** */ #include "ipmip6pm_config.h" /* **************************************************************************** * 3 INCLUDE FILES **************************************************************************** */ #define IPCOM_USE_CLIB_PROTO #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #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 **************************************************************************** */