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:
jani 2002-12-18 10:36:43 +00:00
parent f037bfad1e
commit 219266b7de
2 changed files with 3 additions and 5 deletions

View File

@ -37,8 +37,6 @@
#ifndef _STRING_H
int strlen(const char *str);
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_ */

View File

@ -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
variable. */
/* send data from(q->payload, q->len); */
bcopy(q->payload, bufptr, q->len);
memcpy(bufptr, q->payload, 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. */
p = pbuf_alloc(PBUF_LINK, len, PBUF_POOL);
p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL);
if(p != NULL) {
/* 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
variable. */
/* read data into(q->payload, q->len); */
bcopy(bufptr, q->payload, q->len);
memcpy(q->payload, bufptr, q->len);
bufptr += q->len;
}
/* acknowledge that packet has been read(); */