Added function that removes the header
This commit is contained in:
parent
4c3b69dc07
commit
4e3268e2e2
2 changed files with 12 additions and 9 deletions
|
@ -33,7 +33,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: packetbuf.c,v 1.6 2010/02/28 20:20:19 adamdunkels Exp $
|
||||
* $Id: packetbuf.c,v 1.7 2010/03/29 21:53:04 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -176,6 +176,12 @@ packetbuf_hdralloc(int size)
|
|||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
packetbuf_hdr_remove(int size)
|
||||
{
|
||||
hdrptr += size;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
int
|
||||
packetbuf_hdrreduce(int size)
|
||||
{
|
||||
|
@ -245,19 +251,14 @@ packetbuf_totlen(void)
|
|||
return packetbuf_hdrlen() + packetbuf_datalen();
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
void
|
||||
packetbuf_attr_clear(void)
|
||||
{
|
||||
int i;
|
||||
for(i = 0; i < PACKETBUF_NUM_ATTRS; ++i) {
|
||||
/* packetbuf_attrs[i].type = PACKETBUF_ATTR_NONE; */
|
||||
packetbuf_attrs[i].val = 0;
|
||||
}
|
||||
for(i = 0; i < PACKETBUF_NUM_ADDRS; ++i) {
|
||||
/* packetbuf_addrs[i].type = PACKETBUF_ATTR_NONE; */
|
||||
rimeaddr_copy(&packetbuf_addrs[i].addr, &rimeaddr_null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: packetbuf.h,v 1.7 2010/03/26 12:29:29 nifi Exp $
|
||||
* $Id: packetbuf.h,v 1.8 2010/03/29 21:53:04 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -98,6 +98,8 @@ void packetbuf_clear(void);
|
|||
*/
|
||||
void packetbuf_clear_hdr(void);
|
||||
|
||||
void packetbuf_hdr_remove(int bytes);
|
||||
|
||||
/**
|
||||
* \brief Get a pointer to the data in the packetbuf
|
||||
* \return Pointer to the packetbuf data
|
||||
|
|
Loading…
Reference in a new issue