From fe1c604ccf92b070293a4ae5c8dc59c50f82c0d7 Mon Sep 17 00:00:00 2001 From: "Joseph C. Lehner" Date: Fri, 29 Jan 2016 19:18:49 +0200 Subject: [PATCH] Make buffers void* --- rawsock.c | 4 ++-- rawsock.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rawsock.c b/rawsock.c index b3d7056..6b30f78 100644 --- a/rawsock.c +++ b/rawsock.c @@ -71,7 +71,7 @@ cleanup_malloc: return NULL; } -ssize_t rawsock_recv(struct rawsock *sock, uint8_t *buf, size_t len) +ssize_t rawsock_recv(struct rawsock *sock, void *buf, size_t len) { struct pcap_pkthdr* hdr; const u_char *capbuf; @@ -107,7 +107,7 @@ ssize_t rawsock_recv(struct rawsock *sock, uint8_t *buf, size_t len) } } -int rawsock_send(struct rawsock *sock, uint8_t *buf, size_t len) +int rawsock_send(struct rawsock *sock, void *buf, size_t len) { #if defined(_WIN32) || defined(_WIN64) if (pcap_sendpacket(sock->pcap, buf, len) == 0) { diff --git a/rawsock.h b/rawsock.h index f7b3d5b..2099b43 100644 --- a/rawsock.h +++ b/rawsock.h @@ -4,6 +4,6 @@ struct rawsock; struct rawsock *rawsock_create(const char *interface, uint16_t protocol); int rawsock_close(struct rawsock *sock); -int rawsock_send(struct rawsock *sock, uint8_t *buf, size_t len); -ssize_t rawsock_recv(struct rawsock *sock, uint8_t *buf, size_t len); +int rawsock_send(struct rawsock *sock, void *buf, size_t len); +ssize_t rawsock_recv(struct rawsock *sock, void *buf, size_t len); int rawsock_set_timeout(struct rawsock *sock, unsigned msec); -- 2.25.1