Removed artifacts of former uip_appdata handling.
Adam Dunkels writes on 2/5/2017 on the Contiki mailing list: [...] the original idea was that the application could just point the uip_appdata pointer to wherever the data was, but we then changed it so that the data actually had to be copied into the uip_aligned_buf buffer. So, yes, the network device driver should only need to read from this buffer. [...] This change removes comments on the possibility of uip_appdata pointing somewhere outside the uip_aligned_buf. And it removes code in the SLIP drivers not necessary anymore. Additionally it makes code in a SLIP driver optional that takes care of the Microsoft-specific CLIENT / SERVER / CLIENTSERVER chat.
This commit is contained in:
parent
a6472c8dd9
commit
6463c91a4f
7 changed files with 5 additions and 39 deletions
|
@ -490,26 +490,8 @@ void uip_reass_over(void);
|
|||
*
|
||||
* The uip_aligned_buf array is used to hold incoming and outgoing
|
||||
* packets. The device driver should place incoming data into this
|
||||
* buffer. When sending data, the device driver should read the link
|
||||
* level headers and the TCP/IP headers from this buffer. The size of
|
||||
* the link level headers is configured by the UIP_LLH_LEN define.
|
||||
*
|
||||
* \note The application data need not be placed in this buffer, so
|
||||
* the device driver must read it from the place pointed to by the
|
||||
* uip_appdata pointer as illustrated by the following example:
|
||||
\code
|
||||
void
|
||||
devicedriver_send(void)
|
||||
{
|
||||
hwsend(&uip_buf[0], UIP_LLH_LEN);
|
||||
if(uip_len <= UIP_LLH_LEN + UIP_TCPIP_HLEN) {
|
||||
hwsend(&uip_buf[UIP_LLH_LEN], uip_len - UIP_LLH_LEN);
|
||||
} else {
|
||||
hwsend(&uip_buf[UIP_LLH_LEN], UIP_TCPIP_HLEN);
|
||||
hwsend(uip_appdata, uip_len - UIP_TCPIP_HLEN - UIP_LLH_LEN);
|
||||
}
|
||||
}
|
||||
\endcode
|
||||
* buffer. When sending data, the device driver should read the
|
||||
* outgoing data from this buffer.
|
||||
*/
|
||||
|
||||
typedef union {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue