Make buffers void*
This commit is contained in:
parent
1d53062f66
commit
fe1c604ccf
2 changed files with 4 additions and 4 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue