When initializing a capture filter, assign a pointer to an empty string
[obnox/wireshark/wip.git] / README.hpux
1 The Software Porting And Archive Centre for HP-UX, at
2
3         http://hpux.csc.liv.ac.uk/
4
5 (and with mirrors in various countries, listed on the Centre's home
6 page) has ported versions, in both source and binary form, for Ethereal,
7 as well as for the "libpcap", GLib, GTK+, "zlib", and CMU SNMP libraries
8 that it uses.
9
10 The changes they've made appear largely to be compile option changes; if
11 you've downloaded the source to the latest version of Ethereal (the
12 version on the Centre's site may not necessarily be the latest version),
13 it should be able to compile, perhaps with those changes.
14
15 They appear to have used HP-UX's "cc" compiler, with the options "-Ae
16 -O"; there's a comment "Add -Dhpux_9 if building under 9.X".  It may
17 also build with GCC.
18
19 If you want to use Ethereal to capture packets, you will have to install
20 "libpcap"; the INSTALL file for "libpcap" has several comments about
21 HP-UX, which you should read if you're going to install and use
22 "libpcap" on HP-UX.
23
24 Another note, from a mail message to the "ethereal-users" list:
25
26   Date: Wed, 22 Dec 1999 09:05:47 -0600 (EST)
27   From: Gerald Combs <gerald@zing.org>
28   To: Lothar Seitter <lothar.seitter@arcormail.de>
29   cc: ethereal-users@zing.org
30   Subject: Re: [ethereal-users] permission problem with capturing
31
32   On Wed, 22 Dec 1999, Lothar Seitter wrote:
33
34   > running 'ethereal' under HP-UX 11 with root permission and
35   > /dev/lan0 set to 777, I always get the message:
36   > "There are no network interfaces that can be opened.
37   > Please to make sure you have sufficient permission to 
38   > capture packets."
39   > 
40   > I start ethereal with 'etheral -i lan0' and lan0 is definitely
41   > the lan interface.
42   > 
43   > What am I missing???
44
45   You may need to reference the card's DLPI device directly.  We were having
46   trouble getting Ethereal to capture on an HP-UX 10.20 machine here.  I
47   found an article on Deja News that says:
48
49   "To access a particular interface, you would say "tcpdump -i /dev/dlpiN"
50   where N is the PPA of the interface you wish to use. You get the PPA by
51   looking at the output of lanscan. On 10.20, it is the same value as the
52   NMID. On 11.X, it is the Card Instance number."
53
54   This didn't help in our case, but it might in yours.  The full article is
55   at http://x34.deja.com/[ST_rn=ps]/getdoc.xp?AN=549366486 .
56
57   Another article by the same author mentions that experimental versions of
58   libpcap and tcpdump are available at
59   ftp://ftp.cup.hp.com/dist/networking/tools/ .  The article itself is at
60   http://x34.deja.com/[ST_rn=ps]/getdoc.xp?AN=558665378 .
61
62 The first of those articles also says:
63
64   BTW, before you have to make a follow-up post, you will find that
65   unless you have the latest lan common/DLPI/driver patches installed,
66   you will _not_ see the system's own outbound traffic.
67
68 It appears that a consequence of the fact that HP-UX's DLPI doesn't work
69 like Solaris's, in that, on Solaris, to get at the device "hme0", say,
70 "libpcap" has to open "/dev/hme" and then tell it to use the 0th
71 interface, whilst on HP-UX you have to go through "/dev/dlpi", you won't
72 get a list of interfaces in the dialog box for "Capture:Start" - you'll
73 have to do through the aforementioned song and dance to find the PPA of
74 the interface you want to use, and supply the "dlpiN" name by hand (I
75 think you can omit the "/dev/" in both "tcpdump" and Ethereal).
76
77 It looks as if vanilla "libpcap-0.4" will use various DLPI calls to get
78 the PPA on systems such as HP-UX 10.x that have DL_HP_PPA_ACK_OBS
79 defined, and will try to dredge it out of the kernel on HP-UX 9.x - but
80 if 11.x doesn't define DL_HP_PPA_ACK_OBS, it will do neither on 11.x,
81 which may mean you're stuck with the "dlpiN" hack on 11.x, at least
82 until somebody indicates how to get the PPA on 11.x.  (Given the comment
83 about the PPA:
84
85         You get the PPA by looking at the output of lanscan.  On 10.20,
86         it is the same value as the NMID.  On 11.X, it is the Card
87         Instance number.
88
89 in Rick's posting, it may well be that the code has to do something
90 different on 11.x.)
91
92 The experimental stuff to which the second article refers is a STREAMS
93 module that implements BPF-style filtering and buffering, an
94 experimental version of "libpcap-0.4" that pushes that STREAMS module,
95 and source to "tcpdump-3.4".
96
97 The STREAMS module is in source form - no binary has been provided. 
98 It's in
99
100         ftp://ftp.cup.hp.com/dist/networking/tools/bpfmod/bpfmod_0.1.tar.gz
101
102 "libpcap" and "tcpdump" are in both source and binary form; they're in
103
104         ftp://ftp.cup.hp.com/dist/networking/tools/bpfmod/tcpdump_bpfmod.tar.gz
105
106 NOTE: the "libpcap" source has "pcap-bpfmod.c" and "pcap-dlpi.c" and
107 "pcap-dlpi.c.real".
108
109 "pcap-dlpi.c.real" appears to be the "libpcap-0.4" "pcap-dlpi.c"
110 modified to push the BPF STREAMS module but not to do anything with it.
111
112 "pcap-dlpi.c" is the same as "pcap-bpfmod.c".
113
114 "pcap-bpfmod.c"/"pcap-dlpi.c" appears to have had a pile of stuff
115 removed (e.g., the SunOS 5/Solaris support), and stuff added to push the
116 BPF STREAMS module - however, it doesn't appear to include anything to
117 hand the BPF filter to the STREAMS module or otherwise use it.