Adding all enterprise numbers for 2006.
[obnox/wireshark/wip.git] / README.hpux
1 $Id$
2
3 Contents:
4
5 1 - Building wireshark
6 2 - Building GTK+/GLib with HP's C compiler
7 3 - nettl support
8 4 - libpcap on HP-UX
9 5 - HP-UX patches to fix packet capture problems
10
11 1 - Building wireshark
12
13 The Software Porting And Archive Centre for HP-UX, at
14
15         http://hpux.connect.org.uk/
16
17 (with mirrors in various countries, listed on the Centre's home page;
18 you may want to choose a mirror closer to you) has ported versions, in
19 both source and binary form, for Wireshark, as well as for the libpcap,
20 GLib, GTK+, and zlib libraries that it uses.
21
22 The changes they've made appear largely to be compile option changes; if
23 you've downloaded the source to the latest version of Wireshark (the
24 version on the Centre's site may not necessarily be the latest version),
25 it should be able to compile, perhaps with those changes.
26
27 They appear to have used HP-UX's "cc" compiler, with the options "-Ae
28 -O"; there's a comment "Add -Dhpux_9 if building under 9.X".  It may
29 also build with GCC.
30
31 They currently have libpcap 0.6.2; libpcap 0.6.2, and later versions,
32 include changes to properly open network devices when given the name
33 reported by the lanscan and ifconfig commands - earlier versions didn't
34 do this correctly.  Therefore, we strongly suggest you use libpcap 0.6.2
35 or later, not libpcap 0.5.2.
36
37 2 - Building GTK+/GLib with HP's C compiler
38
39 By default, HP's C compiler doesn't support "long long int" to provide
40 64-bit integral data types on 32-bit platforms; the "-Ae" flag must be
41 supplied to enable extensions such as that.
42
43 Wireshark's "configure" script automatically includes that flag if it
44 detects that the native compiler is being used on HP-UX; however, the
45 configure scripts for GTK+ and GLib don't do so, which means that 64-bit
46 integer support won't be enabled.
47
48 This may prevent some parts of Wireshark from compiling; in order to get
49 64-bit integer support in GTK+/GLib, edit all the Makefiles for GTK+ and
50 GLib, as generated by the GTK+ and GLib "configure" scripts, to add
51 "-Ae" to all "CFLAGS = " definitions found in those Makefiles.  (If a
52 Makefile lacks a "CFLAGS = " definition, there's no need to add a
53 definition that includes "-Ae".)
54
55 3 - nettl support
56
57 nettl is used on HP-UX to trace various streams based subsystems.  Wireshark
58 can read nettl files containing raw IP frames (NS_LS_IP, NS_LS_TCP,
59 NS_LS_UDP, NS_LS_ICMP subsystems), all ethernet/tokenring/fddi driver
60 level frames (such as BTLAN, BASE100, GELAN, IGELAN subsystems) and LAPB
61 frames (SX25L2 subsystem).  Use "ioscan -kfClan" to see the driver
62 names and compare that to /etc/nettlgen.conf to find the nettl subsystem
63 name for your particular release.
64
65 It has been tested with files generated on HP-UX 9.04, 10.20, and 11.x.
66
67 Use the following commands to generate a trace (cf. nettl(1M)):
68
69 # IP capture:
70 nettl -tn pduin pduout -e NS_LS_IP -f tracefile
71 # Driver level capture.  Replace btlan with the name of your interface:
72 nettl -tn pduin pduout -e btlan -f tracefile
73 # X25 capture. You must specify an interface :
74 nettl -tn pduin pduout -e SX25l2 -d /dev/x25_0 -f tracefile
75 # stop capture. subsystem is NS_LS_IP, btlan, SX25L2 :
76 nettl -tf -e subsystem
77
78 You may have to use "-tn 0x30000000" instead of "-tn pduin pduout"
79 on old versions of 10.20 and 9.04.
80
81 4 - libpcap on HP-UX
82
83 If you want to use Wireshark to capture packets, you will have to install
84 libpcap; binary distributions are, as noted above, available from the
85 Software Porting And Archive Centre for HP-UX, as well as source code.
86
87 Versions of libpcap prior to 0.6 didn't handle HP-UX as well as 0.6 and
88 later versions do.  You should install the latest version.
89
90 The source code is also available from the official home of libpcap and
91 tcpdump, at
92
93         http://www.tcpdump.org/
94
95 if you want a version later than the version available from the Software
96 Porting And Archive Centre; however, the versions available from
97 tcpdump.org might not, for example, include support for building libpcap
98 as a shared library.
99
100 5 - HP-UX patches to fix packet capture problems
101
102 Note that packet-capture programs such as Wireshark/TShark or tcpdump
103 may, on HP-UX, not be able to see packets sent from the machine on which
104 they're running.  Make sure you have a recent "LAN Cummulative/DLPI" patch
105 installed.
106
107 Some articles on groups.google.com discussing this are:
108
109         http://groups.google.com/groups?selm=82ld3v%2480i%241%40mamenchi.zrz.TU-Berlin.DE
110
111 which says:
112
113   Newsgroups: comp.sys.hp.hpux 
114   Subject:  Re: Did someone made tcpdump working on 10.20 ?
115   Date: 12/08/1999
116   From: Lutz Jaenicke <jaenicke@emserv1.ee.TU-Berlin.DE>
117
118   In article <82ks5i$5vc$1@news1.dti.ne.jp>, mtsat <mtsat@iris.dti.ne.jp>
119   wrote:
120    >Hello,
121    >
122    >I downloaded and compiled tcpdump3.4 a couple of week ago. I tried to use
123    >it, but I can only see incoming data, never outgoing.
124    >Someone (raj) explained me that a patch was missing, and that this patch
125    >must me "patched" (poked) in order to see outbound data in promiscuous mode.
126    >Many things to do .... So the question is : did someone has already this
127    >"ready to use" PHNE_**** patch ?
128   
129    Two things:
130    1. You do need a late "LAN products cumulative patch" (e.g.  PHNE_18173
131   for   s700/10.20).
132    2. You must use
133 echo 'lanc_outbound_promisc_flag/W1' | /usr/bin/adb -w /stand/vmunix /dev/kmem
134      You can insert this e.g. into /sbin/init.d/lan
135   
136    Best regards,
137    Lutz
138
139 and
140
141         http://groups.google.com/groups?selm=88cf4t%24p03%241%40web1.cup.hp.com
142
143 which says:
144
145   Newsgroups: comp.sys.hp.hpux 
146   Subject: Re: tcpdump only shows incoming packets
147   Date: 02/15/2000
148   From: Rick Jones <foo@bar.baz.invalid>
149
150   Harald Skotnes <harald@cc.uit.no> wrote:
151   > I am running HPUX 11.0 on a C200 hanging on a 100Mb switch. I have
152   > compiled libpcap-0.4 an tcpdump-3.4 and it seems to work. But at a
153   > closer look I only get to see the incoming packets not the
154   > outgoing. I have tried tcpflow-0.12 which also uses libpcap and the
155   > same thing happens.  Could someone please give me a hint on how to
156   > get this right?
157   
158   Search/Read the archives ?-)
159   
160   What you are seeing is expected, un-patched, behaviour for an HP-UX
161   system.  On 11.00, you need to install the latest lancommon/DLPI
162   patches, and then the latest driver patch for the interface(s) in use. 
163   At that point, a miracle happens and you should start seeing outbound
164   traffic.
165
166 [That article also mentions the patch that appears below.]
167
168 and
169
170         http://groups.google.com/groups?selm=38AA973E.96BE7DF7%40cc.uit.no
171
172 which says:
173
174   Newsgroups: comp.sys.hp.hpux
175   Subject: Re: tcpdump only shows incoming packets
176   Date: 02/16/2000
177   From: Harald Skotnes <harald@cc.uit.no>
178
179   Rick Jones wrote:
180   
181         ...
182
183   > What you are seeing is expected, un-patched, behaviour for an HP-UX
184   > system. On 11.00, you need to install the latest lancommon/DLPI
185   > patches, and then the latest driver patch for the interface(s) in
186   > use. At that point, a miracle happens and you should start seeing
187   > outbound traffic.
188   
189   Thanks a lot.  I have this problem on several machines running HPUX
190   10.20 and 11.00.  The machines where patched up before y2k so did not
191   know what to think.  Anyway I have now installed PHNE_19766,
192   PHNE_19826, PHNE_20008, PHNE_20735 on the C200 and now I can see the
193   outbound traffic too.  Thanks again.
194
195 (although those patches may not be the ones to install - there may be
196 later patches).
197
198 And another message to tcpdump-workers@tcpdump.org, from Rick Jones:
199
200   Date: Mon, 29 Apr 2002 15:59:55 -0700
201   From: Rick Jones
202   To: tcpdump-workers@tcpdump.org 
203   Subject: Re: [tcpdump-workers] I Can't Capture the Outbound Traffic
204
205         ...
206
207   http://itrc.hp.com/ would be one place to start in a search for the most
208   up-to-date patches for DLPI and the lan driver(s) used on your system (I
209   cannot guess because 9000/800 is too generic - one hs to use the "model"
210   command these days and/or an ioscan command (see manpage) to guess what
211   the drivers (btlan[3456], gelan, etc) might be involved in addition to
212   DLPI.
213
214   Another option is to upgrade to 11i as outbound promiscuous mode support
215   is there in the base OS, no patches required.
216
217 Another posting:
218
219         http://groups.google.com/groups?selm=7d6gvn%24b3%241%40ocean.cup.hp.com
220
221 indicates that you need to install the optional STREAMS product to do
222 captures on HP-UX 9.x:
223
224   Newsgroups: comp.sys.hp.hpux
225   Subject:  Re: tcpdump HP/UX 9.x
226   Date: 03/22/1999
227   From: Rick Jones <foo@bar.baz>
228
229   Dave Barr (barr@cis.ohio-state.edu) wrote:
230   : Has anyone ported tcpdump (or something similar) to HP/UX 9.x?
231   
232   I'm reasonably confident that any port of tcpdump to 9.X would require
233   the (then optional) STREAMS product.  This would bring DLPI, which is
234   what one uses to access interfaces in promiscuous mode.
235   
236   I'm not sure that HP even sells the 9.X STREAMS product any longer,
237   since HP-UX 9.X is off the pricelist (well, maybe 9.10 for the old 68K
238   devices). 
239   
240   Your best bet is to be up on 10.20 or better if that is at all
241   possible.  If your hardware is supported by it, I'd go with HP-UX 11. 
242   If you want to see the system's own outbound traffic, you'll never get
243   that functionality on 9.X, but it might happen at some point for 10.20
244   and 11.X. 
245   
246   rick jones
247
248 (as per other messages cited here, the ability to see the system's own
249 outbound traffic did happen).
250
251 Rick Jones reports that HP-UX 11i needs no patches for outbound
252 promiscuous mode support.
253
254 An additional note, from Jost Martin, for HP-UX 10.20:
255
256         Q: How do I get ethereral on HPUX to capture the _outgoing_ packets
257            of an interface
258         A: You need to get PHNE_20892,PHNE_20725 and PHCO_10947 (or
259            newer, this is as of 4.4.00) and its dependencies.  Then you can
260            enable the feature as descibed below:
261
262         Patch Name: PHNE_20892
263         Patch Description: s700 10.20 PCI 100Base-T cumulative patch
264                 To trace the outbound packets, please do the following
265                 to turn on a global promiscuous switch before running
266                 the promiscuous applications like snoop or tcpdump:
267
268                 adb -w /stand/vmunix /dev/mem
269                 lanc_outbound_promisc_flag/W 1
270                 (adb will echo the result showing that the flag has
271                 been changed)
272                 $quit
273         (Thanks for this part to HP-support, Ratingen)
274
275                 The attached hack does this and some security-related stuff
276         (thanks to hildeb@www.stahl.bau.tu-bs.de (Ralf Hildebrandt) who
277         posted the security-part some time ago)
278
279                  <<hack_ip_stack>> 
280
281                 (Don't switch IP-forwarding off, if you need it !)
282                 Install the hack as /sbin/init.d/hacl_ip_stack (adjust
283         permissions !) and make a sequencing-symlink
284         /sbin/rc2.d/S350hack_ip_stack pointing to this script. 
285                 Now all this is done on every reboot.
286
287 According to Rick Jones, the global promiscuous switch also has to be
288 turned on for HP-UX 11.00, but not for 11i - and, in fact, the switch
289 doesn't even exist on 11i.
290
291 Here's the "hack_ip_stack" script:
292
293 -----------------------------------Cut Here-------------------------------------
294 #!/sbin/sh
295 #
296 # nettune:  hack kernel parms for safety
297
298 OKAY=0
299 ERROR=-1
300
301 # /usr/contrib/bin fuer nettune auf Pfad
302 PATH=/sbin:/usr/sbin:/usr/bin:/usr/contrib/bin
303 export PATH
304
305
306 ##########
307 #  main  #
308 ##########
309
310 case $1 in
311    start_msg)
312       print "Tune IP-Stack for security"
313       exit $OKAY
314       ;;
315
316    stop_msg)
317       print "This action is not applicable"
318       exit $OKAY
319       ;;
320
321    stop)
322       exit $OKAY
323       ;;
324
325    start)
326       ;;  # fall through
327
328    *)
329       print "USAGE: $0 {start_msg | stop_msg | start | stop}" >&2
330       exit $ERROR
331       ;;
332    esac
333
334 ###########
335 #  start  #
336 ###########
337
338 #
339 # tcp-Sequence-Numbers nicht mehr inkrementieren sondern random
340 # Syn-Flood-Protection an
341 # ip_forwarding aus
342 # Source-Routing aus
343 # Ausgehende Packets an ethereal/tcpdump etc.
344
345 /usr/contrib/bin/nettune -s tcp_random_seq 2 || exit $ERROR
346 /usr/contrib/bin/nettune -s hp_syn_protect 1 || exit $ERROR
347 /usr/contrib/bin/nettune -s ip_forwarding 0 || exit $ERROR
348 echo 'ip_block_source_routed/W1' | /usr/bin/adb -w /stand/vmunix /dev/kmem || exit $ERROR
349 echo 'lanc_outbound_promisc_flag/W 1' | adb -w /stand/vmunix /dev/mem  || exit $ERROR
350
351 exit $OKAY
352 -----------------------------------Cut Here-------------------------------------