head	1.2;
access;
symbols
	pkgsrc-2013Q2:1.2.0.44
	pkgsrc-2013Q2-base:1.2
	pkgsrc-2012Q4:1.2.0.42
	pkgsrc-2012Q4-base:1.2
	pkgsrc-2011Q4:1.2.0.40
	pkgsrc-2011Q4-base:1.2
	pkgsrc-2011Q2:1.2.0.38
	pkgsrc-2011Q2-base:1.2
	pkgsrc-2009Q4:1.2.0.36
	pkgsrc-2009Q4-base:1.2
	pkgsrc-2008Q4:1.2.0.34
	pkgsrc-2008Q4-base:1.2
	pkgsrc-2008Q3:1.2.0.32
	pkgsrc-2008Q3-base:1.2
	cube-native-xorg:1.2.0.30
	cube-native-xorg-base:1.2
	pkgsrc-2008Q2:1.2.0.28
	pkgsrc-2008Q2-base:1.2
	pkgsrc-2008Q1:1.2.0.26
	pkgsrc-2008Q1-base:1.2
	pkgsrc-2007Q4:1.2.0.24
	pkgsrc-2007Q4-base:1.2
	pkgsrc-2007Q3:1.2.0.22
	pkgsrc-2007Q3-base:1.2
	pkgsrc-2007Q2:1.2.0.20
	pkgsrc-2007Q2-base:1.2
	pkgsrc-2007Q1:1.2.0.18
	pkgsrc-2007Q1-base:1.2
	pkgsrc-2006Q4:1.2.0.16
	pkgsrc-2006Q4-base:1.2
	pkgsrc-2006Q3:1.2.0.14
	pkgsrc-2006Q3-base:1.2
	pkgsrc-2006Q2:1.2.0.12
	pkgsrc-2006Q2-base:1.2
	pkgsrc-2006Q1:1.2.0.10
	pkgsrc-2006Q1-base:1.2
	pkgsrc-2005Q4:1.2.0.8
	pkgsrc-2005Q4-base:1.2
	pkgsrc-2005Q3:1.2.0.6
	pkgsrc-2005Q3-base:1.2
	pkgsrc-2005Q2:1.2.0.4
	pkgsrc-2005Q2-base:1.2
	pkgsrc-2005Q1:1.2.0.2
	pkgsrc-2005Q1-base:1.2
	pkgsrc-2004Q4:1.1.1.1.0.18
	pkgsrc-2004Q4-base:1.1.1.1
	pkgsrc-2004Q3:1.1.1.1.0.16
	pkgsrc-2004Q3-base:1.1.1.1
	pkgsrc-2004Q2:1.1.1.1.0.14
	pkgsrc-2004Q2-base:1.1.1.1
	pkgsrc-2004Q1:1.1.1.1.0.12
	pkgsrc-2004Q1-base:1.1.1.1
	pkgsrc-2003Q4:1.1.1.1.0.10
	pkgsrc-2003Q4-base:1.1.1.1
	netbsd-1-6-1:1.1.1.1.0.6
	netbsd-1-6-1-base:1.1.1.1
	netbsd-1-6:1.1.1.1.0.8
	netbsd-1-6-RELEASE-base:1.1.1.1
	pkgviews:1.1.1.1.0.4
	pkgviews-base:1.1.1.1
	buildlink2:1.1.1.1.0.2
	buildlink2-base:1.1.1.1
	netbsd-1-5-PATCH003:1.1.1.1
	pkgsrc-base:1.1.1.1
	TNF:1.1.1;
locks; strict;
comment	@# @;


1.2
date	2005.02.05.16.50.10;	author adrianp;	state dead;
branches;
next	1.1;

1.1
date	2001.10.11.15.13.49;	author agc;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2001.10.11.15.13.49;	author agc;	state Exp;
branches;
next	;


desc
@@


1.2
log
@firewalk-gtk is now obsolete with firewalk 5.x
@
text
@$NetBSD: patch-aa,v 1.1 2001/10/11 15:13:49 agc Exp $

--- packet.c.orig	Sat Sep  8 22:43:44 2001
+++ packet.c	Sat Sep  8 22:44:45 2001
@@@@ -42,24 +42,24 @@@@
 int
 icmp_verify(u_char *packet, struct firepack *fp)
 {
-    struct ip *ip_hdr;
-    struct icmphdr *icmp_hdr;
-    struct ip *origip_hdr;
-    struct udphdr *origudp_hdr;
+    struct libnet_ip_hdr *ip_hdr;
+    struct libnet_icmp_hdr *icmp_hdr;
+    struct libnet_ip_hdr *origip_hdr;
+    struct libnet_udp_hdr *origudp_hdr;
 
-    ip_hdr   = (struct ip *)(packet + fp->packet_offset);
-    icmp_hdr = (struct icmphdr *)(packet + fp->packet_offset + IP_H);
+    ip_hdr   = (struct libnet_ip_hdr *)(packet + fp->packet_offset);
+    icmp_hdr = (struct libnet_icmp_hdr *)(packet + fp->packet_offset + IP_H);
 
-    switch (icmp_hdr->type)
+    switch (icmp_hdr->icmp_type)
     {
-        case ICMP_DEST_UNREACH:
-        case ICMP_TIME_EXCEEDED:
+        case ICMP_UNREACH:
+        case ICMP_TIMXCEED:
             /*
              *  The ICMP error message contains the IP header and first 8
              *  bytes of data of datagram that caused the error.
              */
             origip_hdr =
-                (struct ip *)(packet + fp->packet_offset + IP_H + ICMP_H + 4);
+                (struct libnet_ip_hdr *)(packet + fp->packet_offset + IP_H + ICMP_H + 4);
 
             /*
              *  Was this a UDP or TCP packet that caused the problem?  If not,
@@@@ -78,7 +78,7 @@@@
              *  having a UDP header.
              */
             origudp_hdr =
-                (struct udphdr *)
+                (struct libnet_udp_hdr *)
                 (packet + fp->packet_offset + 2 * IP_H + ICMP_H + 4);
 
             /*
@@@@ -92,22 +92,22 @@@@
                  */
                 if (ip_hdr->ip_src.s_addr == fp->gateway)
                 {
-                    return (icmp_hdr->type == ICMP_DEST_UNREACH ?
+                    return (icmp_hdr->icmp_type == ICMP_UNREACH ?
                         UNREACH_GW_REPLY : EXPIRED_GW_REPLY);
                 }
                 /*
                  *  This is a response from the destination host.
                  */
-                if (icmp_hdr->type == ICMP_DEST_UNREACH &&
+                if (icmp_hdr->icmp_type == ICMP_UNREACH &&
                     ip_hdr->ip_src.s_addr == fp->destination)
                 {
-                    return (icmp_hdr->type == ICMP_DEST_UNREACH ?
+                    return (icmp_hdr->icmp_type == ICMP_UNREACH ?
                         UNREACH_DEST_REPLY : EXPIRED_DEST_REPLY);
                 }
             /*
              *  This is just a standard TTL expired reply.
              */
-             return (icmp_hdr->type == ICMP_DEST_UNREACH ? UNREACH_REPLY :
+             return (icmp_hdr->icmp_type == ICMP_UNREACH ? UNREACH_REPLY :
                 EXPIRED_REPLY);
             }
         default:
@@@@ -249,9 +249,9 @@@@
 void
 print_ip(u_char *packet)
 {
-    struct ip *ip_hdr;
+    struct libnet_ip_hdr *ip_hdr;
 
-    ip_hdr = (struct ip *)(packet + fp->packet_offset);
+    ip_hdr = (struct libnet_ip_hdr *)(packet + fp->packet_offset);
     fire_write("[%s]", libnet_host_lookup(ip_hdr->ip_src.s_addr, fp->use_name));
 }
 
@@@@ -259,14 +259,14 @@@@
 u_char *
 print_unreach_code(u_char *packet)
 {
-    struct icmphdr *icmp_hdr;
+    struct libnet_icmp_hdr *icmp_hdr;
 
-    icmp_hdr = (struct icmphdr *)(packet + fp->packet_offset + IP_H);
-    if (icmp_hdr->code > 15)
+    icmp_hdr = (struct libnet_icmp_hdr *)(packet + fp->packet_offset + IP_H);
+    if (icmp_hdr->icmp_code > 15)
     {
         return ("Unkown unreachable code");
     }
-    return (unreachables[icmp_hdr->code]);
+    return (unreachables[icmp_hdr->icmp_code]);
 }
 
 
@


1.1
log
@Initial revision
@
text
@d1 1
a1 1
$NetBSD$
@


1.1.1.1
log
@Initial import of firewalk-gtk-1.0 into the NetBSD Packages Collection.

Firewalking is a technique developed by Mike D. Schiffman and David E.
Goldsmith that employs traceroute-like techniques to analyze IP packet
responses to determine gateway ACL filters and map networks.
Firewalk the tool employs the technique to determine the filter rules
in place on a packet forwarding device.

This package was provided in PR 14020 by xs@@nitric.net. I split it into
two separate packages, firewalk-gtk and firewalk, and modified it to use
buildlink functionality.

@
text
@@
