version 1.1, 2012/02/21 22:14:23
|
version 1.1.1.2, 2023/09/27 11:11:38
|
Line 31
|
Line 31
|
*/ |
*/ |
|
|
#if (HAVE_CONFIG_H) |
#if (HAVE_CONFIG_H) |
#if ((_WIN32) && !(__CYGWIN__)) |
|
#include "../include/win32/config.h" |
|
#else |
|
#include "../include/config.h" |
#include "../include/config.h" |
#endif |
#endif |
#endif |
|
#include "./libnet_test.h" |
#include "./libnet_test.h" |
|
|
int |
int |
main(int argc, char *argv[]) |
main(int argc, char *argv[]) |
{ |
{ |
int c; |
int c; |
u_int32_t i; | uint32_t i; |
libnet_t *l; |
libnet_t *l; |
libnet_ptag_t t; |
libnet_ptag_t t; |
char *device = NULL; |
char *device = NULL; |
u_int8_t *packet; | uint8_t *packet; |
u_int32_t packet_s; | uint32_t packet_s; |
char errbuf[LIBNET_ERRBUF_SIZE]; |
char errbuf[LIBNET_ERRBUF_SIZE]; |
|
|
printf("libnet 1.1 packet shaping: ARP[link -- autobuilding ethernet]\n"); |
printf("libnet 1.1 packet shaping: ARP[link -- autobuilding ethernet]\n"); |
Line 90 main(int argc, char *argv[])
|
Line 86 main(int argc, char *argv[])
|
t = libnet_autobuild_arp( |
t = libnet_autobuild_arp( |
ARPOP_REPLY, /* operation type */ |
ARPOP_REPLY, /* operation type */ |
enet_src, /* sender hardware addr */ |
enet_src, /* sender hardware addr */ |
(u_int8_t *)&i, /* sender protocol addr */ | (uint8_t *)&i, /* sender protocol addr */ |
enet_dst, /* target hardware addr */ |
enet_dst, /* target hardware addr */ |
(u_int8_t *)&i, /* target protocol addr */ | (uint8_t *)&i, /* target protocol addr */ |
l); /* libnet context */ |
l); /* libnet context */ |
if (t == -1) |
if (t == -1) |
{ |
{ |
Line 141 bad:
|
Line 137 bad:
|
return (EXIT_FAILURE); |
return (EXIT_FAILURE); |
} |
} |
|
|
/* EOF */ |
|