mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-04-09 21:44:21 +00:00
replace bcopy and bzero with memcpy memset in tapif.Alloc PBUF_RAW instead of PBUF_LINK on input now that the meaning of PBUF_LINK has changed.
This commit is contained in:
parent
f037bfad1e
commit
219266b7de
@ -37,8 +37,6 @@
|
|||||||
#ifndef _STRING_H
|
#ifndef _STRING_H
|
||||||
int strlen(const char *str);
|
int strlen(const char *str);
|
||||||
int strncmp(const char *str1, const char *str2, int len);
|
int strncmp(const char *str1, const char *str2, int len);
|
||||||
void bcopy(const void *src, void *dest, int len);
|
|
||||||
void bzero(void *data, int n);
|
|
||||||
#endif /* _STRING_H */
|
#endif /* _STRING_H */
|
||||||
#endif /* _STRING_H_ */
|
#endif /* _STRING_H_ */
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ low_level_output(struct netif *netif, struct pbuf *p)
|
|||||||
time. The size of the data in each pbuf is kept in the ->len
|
time. The size of the data in each pbuf is kept in the ->len
|
||||||
variable. */
|
variable. */
|
||||||
/* send data from(q->payload, q->len); */
|
/* send data from(q->payload, q->len); */
|
||||||
bcopy(q->payload, bufptr, q->len);
|
memcpy(bufptr, q->payload, q->len);
|
||||||
bufptr += q->len;
|
bufptr += q->len;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,7 +197,7 @@ low_level_input(struct tapif *tapif)
|
|||||||
|
|
||||||
|
|
||||||
/* We allocate a pbuf chain of pbufs from the pool. */
|
/* We allocate a pbuf chain of pbufs from the pool. */
|
||||||
p = pbuf_alloc(PBUF_LINK, len, PBUF_POOL);
|
p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL);
|
||||||
|
|
||||||
if(p != NULL) {
|
if(p != NULL) {
|
||||||
/* We iterate over the pbuf chain until we have read the entire
|
/* We iterate over the pbuf chain until we have read the entire
|
||||||
@ -208,7 +208,7 @@ low_level_input(struct tapif *tapif)
|
|||||||
avaliable data in the pbuf is given by the q->len
|
avaliable data in the pbuf is given by the q->len
|
||||||
variable. */
|
variable. */
|
||||||
/* read data into(q->payload, q->len); */
|
/* read data into(q->payload, q->len); */
|
||||||
bcopy(bufptr, q->payload, q->len);
|
memcpy(q->payload, bufptr, q->len);
|
||||||
bufptr += q->len;
|
bufptr += q->len;
|
||||||
}
|
}
|
||||||
/* acknowledge that packet has been read(); */
|
/* acknowledge that packet has been read(); */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user