mirror of
https://code.semirocket.science/wrapsix
synced 2024-12-22 04:20:18 +02:00
Extended packet buffer
This commit is contained in:
parent
34025797b1
commit
5b50001a5c
@ -43,6 +43,8 @@
|
||||
#define IPV4_ADDR "192.168.0.111"
|
||||
/* --- CONFIGURATION --- */
|
||||
|
||||
#define PACKET_SIZE MTU + sizeof(struct s_ethernet)
|
||||
|
||||
|
||||
struct ifreq interface;
|
||||
struct s_mac_addr mac;
|
||||
@ -61,7 +63,7 @@ int main(int argc, char **argv)
|
||||
|
||||
int sniff_sock;
|
||||
int length;
|
||||
char buffer[MTU];
|
||||
char buffer[PACKET_SIZE];
|
||||
|
||||
log_info(PACKAGE_STRING " is starting");
|
||||
|
||||
@ -126,7 +128,7 @@ int main(int argc, char **argv)
|
||||
/* sniff! :c) */
|
||||
for (;;) {
|
||||
addr_size = sizeof(addr);
|
||||
if ((length = recv(sniff_sock, buffer, MTU, 0)) == -1) {
|
||||
if ((length = recv(sniff_sock, buffer, PACKET_SIZE, 0)) == -1) {
|
||||
log_error("Unable to retrieve data from socket");
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user