From 219266b7de0a4c3832dbd39ed53544fb785462b7 Mon Sep 17 00:00:00 2001 From: jani Date: Wed, 18 Dec 2002 10:36:43 +0000 Subject: [PATCH] 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. --- src/arch/unix/include/arch/lib.h | 2 -- src/arch/unix/netif/tapif.c | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/arch/unix/include/arch/lib.h b/src/arch/unix/include/arch/lib.h index fe2ccb11..c800489c 100644 --- a/src/arch/unix/include/arch/lib.h +++ b/src/arch/unix/include/arch/lib.h @@ -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_ */ diff --git a/src/arch/unix/netif/tapif.c b/src/arch/unix/netif/tapif.c index 700efe1c..c7ab0998 100644 --- a/src/arch/unix/netif/tapif.c +++ b/src/arch/unix/netif/tapif.c @@ -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(); */