1
0
mirror of https://code.semirocket.science/wrapsix synced 2024-11-21 13:31:02 +02:00

Extended packet buffer

This commit is contained in:
Michal Zima 2012-07-04 13:52:11 +02:00
parent 34025797b1
commit 5b50001a5c

View File

@ -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;
}