Harald Welte <laforge@gnumonks.org>
[obnox/wireshark/wip.git] / README.hpux
index 51110805d55b6cae5ef1d2ee4b8f578d0dc105bc..e3b3a8aa01e48ef6794060124b988c22ea8f0d69 100644 (file)
@@ -1,25 +1,26 @@
-$Id: README.hpux,v 1.13 2000/08/13 07:48:55 guy Exp $
+$Id$
 
 Contents:
 
-1 - Building ethereal
+1 - Building wireshark
 2 - Building GTK+/GLib with HP's C compiler
 3 - nettl support
 4 - libpcap on HP-UX
+5 - HP-UX patches to fix packet capture problems
 
-1 - Building ethereal
+1 - Building wireshark
 
 The Software Porting And Archive Centre for HP-UX, at
 
        http://hpux.connect.org.uk/
 
-(and with mirrors in various countries, listed on the Centre's home
-page) has ported versions, in both source and binary form, for Ethereal,
-as well as for the libpcap, GLib, GTK+, zlib, and CMU SNMP libraries
-that it uses.
+(with mirrors in various countries, listed on the Centre's home page;
+you may want to choose a mirror closer to you) has ported versions, in
+both source and binary form, for Wireshark, as well as for the libpcap,
+GLib, GTK+, and zlib libraries that it uses.
 
 The changes they've made appear largely to be compile option changes; if
-you've downloaded the source to the latest version of Ethereal (the
+you've downloaded the source to the latest version of Wireshark (the
 version on the Centre's site may not necessarily be the latest version),
 it should be able to compile, perhaps with those changes.
 
@@ -27,13 +28,11 @@ They appear to have used HP-UX's "cc" compiler, with the options "-Ae
 -O"; there's a comment "Add -Dhpux_9 if building under 9.X".  It may
 also build with GCC.
 
-The libpcap library has not been changed to properly open network
-devices when given the name reported by the lanscan and ifconfig
-commands; this means you may have difficulty capturing packets with
-Ethereal on HP-UX.  The "libpcap on HP-UX" item below discusses patches
-to the libpcap source code that should fix this problem, and the process
-you will have to go through to apply those patches and build and install
-a new version of libpcap that includes those patches.
+They currently have libpcap 0.6.2; libpcap 0.6.2, and later versions,
+include changes to properly open network devices when given the name
+reported by the lanscan and ifconfig commands - earlier versions didn't
+do this correctly.  Therefore, we strongly suggest you use libpcap 0.6.2
+or later, not libpcap 0.5.2.
 
 2 - Building GTK+/GLib with HP's C compiler
 
@@ -41,12 +40,12 @@ By default, HP's C compiler doesn't support "long long int" to provide
 64-bit integral data types on 32-bit platforms; the "-Ae" flag must be
 supplied to enable extensions such as that.
 
-Ethereal's "configure" script automatically includes that flag if it
+Wireshark's "configure" script automatically includes that flag if it
 detects that the native compiler is being used on HP-UX; however, the
 configure scripts for GTK+ and GLib don't do so, which means that 64-bit
 integer support won't be enabled.
 
-This may prevent some parts of Ethereal from compiling; in order to get
+This may prevent some parts of Wireshark from compiling; in order to get
 64-bit integer support in GTK+/GLib, edit all the Makefiles for GTK+ and
 GLib, as generated by the GTK+ and GLib "configure" scripts, to add
 "-Ae" to all "CFLAGS = " definitions found in those Makefiles.  (If a
@@ -55,36 +54,59 @@ definition that includes "-Ae".)
 
 3 - nettl support
 
-nettl is used on HP-UX to trace various streams based subsystems.  Ethereal
-can read nettl files containing IP frames (NS_LS_IP subsystem) and LAPB
-frames (SX25L2 subsystem).
-It has been tested with files generated on HP-UX 9.04 and 10.20.
+nettl is used on HP-UX to trace various streams based subsystems.  Wireshark
+can read nettl files containing raw IP frames (NS_LS_IP, NS_LS_TCP,
+NS_LS_UDP, NS_LS_ICMP subsystems), all ethernet/tokenring/fddi driver
+level frames (such as BTLAN, BASE100, GELAN, IGELAN subsystems) and LAPB
+frames (SX25L2 subsystem).  Use "ioscan -kfClan" to see the driver
+names and compare that to /etc/nettlgen.conf to find the nettl subsystem
+name for your particular release.
+
+It has been tested with files generated on HP-UX 9.04, 10.20, and 11.x.
 
 Use the following commands to generate a trace (cf. nettl(1M)):
 
-# IP capture. 0x30000000 means PDU in and PDU out :
-nettl -tn 0x30000000 -e NS_LS_IP -f tracefile
+# IP capture:
+nettl -tn pduin pduout -e NS_LS_IP -f tracefile
+# Driver level capture.  Replace btlan with the name of your interface:
+nettl -tn pduin pduout -e btlan -f tracefile
 # X25 capture. You must specify an interface :
-nettl -tn 0x30000000 -e SX25l2 -d /dev/x25_0 -f tracefile
-# stop capture. subsystem is NS_LS_IP or SX25L2 :
+nettl -tn pduin pduout -e SX25l2 -d /dev/x25_0 -f tracefile
+# stop capture. subsystem is NS_LS_IP, btlan, SX25L2 :
 nettl -tf -e subsystem
 
-One may be able to specify "-tn pduin pduout" rather than
-"-tn 0x30000000"; the nettl man page for HP-UX 10.30 implies that it
-should work.
+You may have to use "-tn 0x30000000" instead of "-tn pduin pduout"
+on old versions of 10.20 and 9.04.
+
+4 - libpcap on HP-UX
+
+If you want to use Wireshark to capture packets, you will have to install
+libpcap; binary distributions are, as noted above, available from the
+Software Porting And Archive Centre for HP-UX, as well as source code.
+
+Versions of libpcap prior to 0.6 didn't handle HP-UX as well as 0.6 and
+later versions do.  You should install the latest version.
 
-4 - "libpcap" on HP-UX
+The source code is also available from the official home of libpcap and
+tcpdump, at
 
-If you want to use Ethereal to capture packets, you will have to install
-"libpcap"; the INSTALL file for "libpcap" has several comments about
-HP-UX, which you should read if you're going to install and use
-"libpcap" on HP-UX.
+       http://www.tcpdump.org/
 
-Note that packet-capture programs such as Ethereal/Tethereal or tcpdump
+if you want a version later than the version available from the Software
+Porting And Archive Centre; however, the versions available from
+tcpdump.org might not, for example, include support for building libpcap
+as a shared library.
+
+5 - HP-UX patches to fix packet capture problems
+
+Note that packet-capture programs such as Wireshark/TShark or tcpdump
 may, on HP-UX, not be able to see packets sent from the machine on which
-they're running.  Some articles on Deja.com discussing this are:
+they're running.  Make sure you have a recent "LAN Cummulative/DLPI" patch
+installed.
+
+Some articles on groups.google.com discussing this are:
 
-       http://www.deja.com/[ST_rn=ps]/getdoc.xp?AN=558092266
+       http://groups.google.com/groups?selm=82ld3v%2480i%241%40mamenchi.zrz.TU-Berlin.DE
 
 which says:
 
@@ -116,7 +138,7 @@ echo 'lanc_outbound_promisc_flag/W1' | /usr/bin/adb -w /stand/vmunix /dev/kmem
 
 and
 
-       http://www.deja.com/[ST_rn=ps]/getdoc.xp?AN=586287166
+       http://groups.google.com/groups?selm=88cf4t%24p03%241%40web1.cup.hp.com
 
 which says:
 
@@ -145,7 +167,7 @@ which says:
 
 and
 
-       http://www.deja.com/[ST_rn=ps]/getdoc.xp?AN=586494200
+       http://groups.google.com/groups?selm=38AA973E.96BE7DF7%40cc.uit.no
 
 which says:
 
@@ -170,9 +192,31 @@ which says:
   PHNE_19826, PHNE_20008, PHNE_20735 on the C200 and now I can see the
   outbound traffic too.  Thanks again.
 
+(although those patches may not be the ones to install - there may be
+later patches).
+
+And another message to tcpdump-workers@tcpdump.org, from Rick Jones:
+
+  Date: Mon, 29 Apr 2002 15:59:55 -0700
+  From: Rick Jones
+  To: tcpdump-workers@tcpdump.org 
+  Subject: Re: [tcpdump-workers] I Can't Capture the Outbound Traffic
+
+       ...
+
+  http://itrc.hp.com/ would be one place to start in a search for the most
+  up-to-date patches for DLPI and the lan driver(s) used on your system (I
+  cannot guess because 9000/800 is too generic - one hs to use the "model"
+  command these days and/or an ioscan command (see manpage) to guess what
+  the drivers (btlan[3456], gelan, etc) might be involved in addition to
+  DLPI.
+
+  Another option is to upgrade to 11i as outbound promiscuous mode support
+  is there in the base OS, no patches required.
+
 Another posting:
 
-       http://www.deja.com/[ST_rn=ps]/getdoc.xp?AN=457744130
+       http://groups.google.com/groups?selm=7d6gvn%24b3%241%40ocean.cup.hp.com
 
 indicates that you need to install the optional STREAMS product to do
 captures on HP-UX 9.x:
@@ -204,57 +248,16 @@ captures on HP-UX 9.x:
 (as per other messages cited here, the ability to see the system's own
 outbound traffic did happen).
 
-Another note, from a mail message to the "ethereal-users" list:
-
-  Date: Wed, 22 Dec 1999 09:05:47 -0600 (EST)
-  From: Gerald Combs <gerald@zing.org>
-  To: Lothar Seitter <lothar.seitter@arcormail.de>
-  cc: ethereal-users@zing.org
-  Subject: Re: [ethereal-users] permission problem with capturing
-
-  On Wed, 22 Dec 1999, Lothar Seitter wrote:
-
-  > running 'ethereal' under HP-UX 11 with root permission and
-  > /dev/lan0 set to 777, I always get the message:
-  > "There are no network interfaces that can be opened.
-  > Please to make sure you have sufficient permission to 
-  > capture packets."
-  > 
-  > I start ethereal with 'etheral -i lan0' and lan0 is definitely
-  > the lan interface.
-  > 
-  > What am I missing???
-
-  You may need to reference the card's DLPI device directly.  We were having
-  trouble getting Ethereal to capture on an HP-UX 10.20 machine here.  I
-  found an article on Deja News that says:
-
-  "To access a particular interface, you would say "tcpdump -i /dev/dlpiN"
-  where N is the PPA of the interface you wish to use. You get the PPA by
-  looking at the output of lanscan. On 10.20, it is the same value as the
-  NMID. On 11.X, it is the Card Instance number."
-
-  This didn't help in our case, but it might in yours.  The full article is
-  at http://x34.deja.com/[ST_rn=ps]/getdoc.xp?AN=549366486 .
-
-  Another article by the same author mentions that experimental versions of
-  libpcap and tcpdump are available at
-  ftp://ftp.cup.hp.com/dist/networking/tools/ .  The article itself is at
-  http://x34.deja.com/[ST_rn=ps]/getdoc.xp?AN=558665378 .
-
-The first of those articles also says:
-
-  BTW, before you have to make a follow-up post, you will find that
-  unless you have the latest lan common/DLPI/driver patches installed,
-  you will _not_ see the system's own outbound traffic.
+Rick Jones reports that HP-UX 11i needs no patches for outbound
+promiscuous mode support.
 
 An additional note, from Jost Martin, for HP-UX 10.20:
 
-       Q: How do I get ethereral on HPUX to capture the _outgoing_ packets
+       Q: How do I get wireshark on HPUX to capture the _outgoing_ packets
           of an interface
        A: You need to get PHNE_20892,PHNE_20725 and PHCO_10947 (or
           newer, this is as of 4.4.00) and its dependencies.  Then you can
-          enable the feature as descibed below:
+          enable the feature as described below:
 
        Patch Name: PHNE_20892
        Patch Description: s700 10.20 PCI 100Base-T cumulative patch
@@ -281,6 +284,10 @@ An additional note, from Jost Martin, for HP-UX 10.20:
        /sbin/rc2.d/S350hack_ip_stack pointing to this script. 
                Now all this is done on every reboot.
 
+According to Rick Jones, the global promiscuous switch also has to be
+turned on for HP-UX 11.00, but not for 11i - and, in fact, the switch
+doesn't even exist on 11i.
+
 Here's the "hack_ip_stack" script:
 
 -----------------------------------Cut Here-------------------------------------
@@ -343,62 +350,3 @@ echo 'lanc_outbound_promisc_flag/W 1' | adb -w /stand/vmunix /dev/mem  || exit $
 
 exit $OKAY
 -----------------------------------Cut Here-------------------------------------
-
-It appears that a consequence of the fact that HP-UX's DLPI doesn't work
-like Solaris's, in that, on Solaris, to get at the device "hme0", say,
-"libpcap" has to open "/dev/hme" and then tell it to use the 0th
-interface, whilst on HP-UX you have to go through "/dev/dlpi", you won't
-get a list of interfaces in the dialog box for "Capture:Start" - you'll
-have to do through the aforementioned song and dance to find the PPA of
-the interface you want to use, and supply the "dlpiN" name by hand (I
-think you can omit the "/dev/" in both tcpdump and Ethereal).
-
-Here is a patch to "pcap-dlpi.c" in libpcap that, at least on HP-UX
-11.X, allows the name of the network interface, rather than the "dlpiN"
-name, to be specified to tcpdump and Ethereal.
-
-On HP-UX 11.00, the patch allows a network interface to be specified by
-name as an argument to tcpdump, rather than requiring that you specify a
-"dlpiN" name (and it should work equally well with Ethereal).
-
-If you try this code on HP-UX 10.20, and it doesn't let you specify the
-interface by name, please send mail to ethereal-dev@zing.org, so that we
-know that it didn't work - we'll probably send you debugging patches in
-the hopes of being able to make it work on 10.20 as well.  (It appeared
-to work in some tests done on HP-UX 10.20 systems.)
-
-To use this patch, you will need the source to libpcap; if you don't
-already have it, it is available from the Software Porting And Archive
-Centre for HP-UX (see above for its URL).  Search for "libpcap" in the
-"Package Search" box.
-
-The patch would be applied with the "patch" program; if you don't
-already have it, it is also available from the Software Porting And
-Archive Centre for HP-UX.  Search for "patch" in the "Package Search" -
-it will find many packages; look for the one in the "Sysadmin" category
-with the description "Applies diffs to files to reproduce new versions".
-
-If you have downloaded the source to libpcap 0.4 from the Porting and
-Archive Centre, the patch to use is in the file
-
-       libpcap-0.4.HPUX.HPUXPAC.patch
-
-If you have downloaded the source to libpcap 0.4 from the Lawrence
-Berkeley Laboratory Web site, the patch to use is in the file
-
-       libpcap-0.4.HPUX.LBL.patch
-
-If you have downloaded the source to libpcap 0.5 from the tcpdump.org
-Web site, the patch to use is in the file
-
-       libpcap-0.5.HPUX.tcpdump.org.patch
-
-Note that the versions from Lawrence Berkeley Laboratory and tcpdump.org
-will probably not compile on HP-UX with HP's ANSI C compiler, and will
-not build and install a shared library, so patching, building, and
-installing those versions will require that you have GCC installed, and
-that you download the source to Ethereal and build it from source.
-
-You should apply only the patch file appropriate to the particular
-version of libpcap source that you have downloaded; attempting to apply
-a different patch file will probably cause errors.