Skip to content

Commit

Permalink
libnet: use LIBNET_*RESOLVE const in libnet_name2addr*
Browse files Browse the repository at this point in the history
and fix tab vs space issue in that changed line

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
  • Loading branch information
Gilles Espinasse authored and sam-github committed Apr 15, 2013
1 parent ae8a843 commit a44a4f7
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion libnet/sample/icmp6_echoreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ main(int argc, char **argv)
}
*cp++ = 0;
dst_prt = (u_short)atoi(cp);
dst_ip = libnet_name2addr6(l, optarg, 1);
dst_ip = libnet_name2addr6(l, optarg, LIBNET_RESOLVE);
if (strncmp((char*)&dst_ip,(char*)&in6addr_error,sizeof(in6addr_error))==0)
{
fprintf(stderr, "Bad IP6 address: %s\n", optarg);
Expand Down
2 changes: 1 addition & 1 deletion libnet/sample/icmp6_unreach.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ main(int argc, char **argv)
}
*cp++ = 0;
dst_prt = (u_short)atoi(cp);
dst_ip = libnet_name2addr6(l, optarg, 1);
dst_ip = libnet_name2addr6(l, optarg, LIBNET_RESOLVE);
if (strncmp((char*)&dst_ip,(char*)&in6addr_error,sizeof(in6addr_error))==0)
{
fprintf(stderr, "Bad IP6 address: %s\n", optarg);
Expand Down
2 changes: 1 addition & 1 deletion libnet/sample/synflood.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ main(int argc, char **argv)
}
*cp++ = 0;
dst_prt = (u_short)atoi(cp);
if ((dst_ip = libnet_name2addr4(l, optarg, 1)) == -1)
if ((dst_ip = libnet_name2addr4(l, optarg, LIBNET_RESOLVE)) == -1)
{
fprintf(stderr, "Bad IP address: %s\n", optarg);
exit(EXIT_FAILURE);
Expand Down
2 changes: 1 addition & 1 deletion libnet/sample/synflood6_frag.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ main(int argc, char **argv)
}
*cp++ = 0;
dst_prt = (u_short)atoi(cp);
dst_ip = libnet_name2addr6(l, optarg, 1);
dst_ip = libnet_name2addr6(l, optarg, LIBNET_RESOLVE);
if (strncmp((char*)&dst_ip,
(char*)&in6addr_error,sizeof(in6addr_error))==0)
{
Expand Down
2 changes: 1 addition & 1 deletion libnet/src/libnet_if_addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ libnet_select_device(libnet_t *l)
al = address_list;
if (l->device)
{
addr = libnet_name2addr4(l, l->device, 0);
addr = libnet_name2addr4(l, l->device, LIBNET_DONT_RESOLVE);

for (i = c; i; --i, ++address_list)
{
Expand Down

0 comments on commit a44a4f7

Please sign in to comment.