Removed packetbuf references. This was a feature that is not used anymore and only made the code more complex.

This commit is contained in:
Adam Dunkels 2015-03-24 08:28:25 +01:00
parent c9c6688524
commit 7acf747c1a
14 changed files with 5 additions and 1130 deletions

View file

@ -181,52 +181,12 @@ uint16_t packetbuf_totlen(void);
*/
void packetbuf_set_datalen(uint16_t len);
/**
* \brief Point the packetbuf to external data
* \param ptr A pointer to the external data
* \param len The length of the external data
*
* For outbound packets, the packetbuf consists of two
* parts: header and data. This function is used to make
* the packetbuf point to external data. The function also
* specifies the length of the external data that the
* packetbuf references.
*/
void packetbuf_reference(void *ptr, uint16_t len);
/**
* \brief Check if the packetbuf references external data
* \retval Non-zero if the packetbuf references external data, zero otherwise.
*
* For outbound packets, the packetbuf consists of two
* parts: header and data. This function is used to check
* if the packetbuf points to external data that has
* previously been referenced with packetbuf_reference().
*
*/
int packetbuf_is_reference(void);
/**
* \brief Get a pointer to external data referenced by the packetbuf
* \retval A pointer to the external data
*
* For outbound packets, the packetbuf consists of two
* parts: header and data. The data may point to external
* data that has previously been referenced with
* packetbuf_reference(). This function is used to get a
* pointer to the external data.
*
*/
void *packetbuf_reference_ptr(void);
/**
* \brief Compact the packetbuf
*
* This function compacts the packetbuf by copying the data
* portion of the packetbuf so that becomes consecutive to
* the header. It also copies external data that has
* previously been referenced with packetbuf_reference()
* into the packetbuf.
* the header.
*
* This function is called by the Rime code before a
* packet is to be sent by a device driver. This assures
@ -257,9 +217,7 @@ int packetbuf_copyfrom(const void *from, uint16_t len);
*
* This function copies the packetbuf to an external
* buffer. Both the data portion and the header portion of
* the packetbuf is copied. If the packetbuf referenced
* external data (referenced with packetbuf_reference()) the
* external data is copied.
* the packetbuf is copied.
*
* The external buffer to which the packetbuf is to be
* copied must be able to accomodate at least