openbsd-ports/net/firewalk/patches/patch-main_c
mjc 47dffcf587 update to cope with new libnet
and regen patches while here
ok pvalchev@ msf@
2005-05-24 00:00:11 +00:00

39 lines
1.4 KiB
Plaintext

$OpenBSD: patch-main_c,v 1.1 2005/05/24 00:00:11 mjc Exp $
--- main.c.orig Sat Nov 7 17:37:34 1998
+++ main.c Mon May 23 09:50:51 2005
@@ -223,12 +223,12 @@ main(int argc, char *argv[])
usage(argv[0]);
exit(1);
}
- else if ((fp->gateway = name_resolve(argv[optind], 1)) == -1)
+ else if ((fp->gateway = libnet_name_resolve(argv[optind], 1)) == -1)
{
fprintf(stderr, "Cannot resolve gateway IP address\n");
exit(1);
}
- else if ((fp->destination = name_resolve(argv[optind + 1], 1)) == -1)
+ else if ((fp->destination = libnet_name_resolve(argv[optind + 1], 1)) == -1)
{
fprintf(stderr, "Cannot resolve destination IP address\n");
exit(1);
@@ -242,7 +242,7 @@ main(int argc, char *argv[])
/*
* Open the raw IP socket and set IPHDR_INCL.
*/
- fp->sock = open_raw_sock(IPPROTO_RAW);
+ fp->sock = libnet_open_raw_sock(IPPROTO_RAW);
if (fp->sock == -1)
{
perror("No socket");
@@ -272,8 +272,8 @@ main(int argc, char *argv[])
{
fprintf(stdout,
"Firewalking through %s (towards %s) with a maximum of %d hops.\n",
- host_lookup(fp->gateway, fp->use_name),
- host_lookup(fp->destination, fp->use_name),
+ libnet_host_lookup(fp->gateway, fp->use_name),
+ libnet_host_lookup(fp->destination, fp->use_name),
MAX_HOP);
}