1 If you use HP-UX, you must have at least version 10.20 and either the
2 version of `cc` that supports C99 (`cc -AC99`) or else use the GNU C
3 compiler. The required DLPI streams package is standard starting with
6 The HP implementation of DLPI is a little bit eccentric. Unlike
7 Solaris, you must attach `/dev/dlpi` instead of the specific `/dev/*`
8 network pseudo device entry in order to capture packets. The PPA is
9 based on the ifnet "index" number. Under HP-UX 10,
10 DLPI can provide information for determining the PPA. It does not seem
11 to be possible to trace the loopback interface. Unlike other DLPI
12 implementations, PHYS implies MULTI and SAP and you get an error if you
13 try to enable more than one promiscuous mode at a time.
15 To capture outbound packets on HP-UX 10, you will, apparently, need a
16 late "LAN products cumulative
17 patch" (at one point, it was claimed that this would be PHNE_18173 for
18 s700/10.20; at another point, it was claimed that the required patches
19 were PHNE_20892, PHNE_20725 and PHCO_10947, or newer patches), and to do
20 so on HP-UX 11 you will, apparently, need the latest lancommon/DLPI
21 patches and the latest driver patch for the interface(s) in use on HP-UX
22 11 (at one point, it was claimed that patches PHNE_19766, PHNE_19826,
23 PHNE_20008, and PHNE_20735 did the trick).
25 Furthermore, on HP-UX 10, you will need to turn on a kernel switch by
28 echo 'lanc_outbound_promisc_flag/W 1' | adb -w /stand/vmunix /dev/mem
30 You would have to arrange that this happens on reboots; the right way to
31 do that would probably be to put it into an executable script file
32 `/sbin/init.d/outbound_promisc` and making
33 `/sbin/rc2.d/S350outbound_promisc` a symbolic link to that script.
35 Finally, testing shows that there can't be more than one simultaneous
36 DLPI user per network interface.
38 For HP-UX 11i (11.11) and later, there are no known issues with
39 promiscuous mode under HP-UX. If you are using a earlier version of
40 HP-UX and cannot upgrade, please continue reading.
42 HP-UX patches to fix packet capture problems
44 Note that packet-capture programs such as tcpdump may, on HP-UX, not be
45 able to see packets sent from the machine on which they're running.
46 Some articles on groups.google.com discussing this are:
48 https://groups.google.com/groups?selm=82ld3v%2480i%241%40mamenchi.zrz.TU-Berlin.DE
52 Newsgroups: comp.sys.hp.hpux
53 Subject: Re: Did someone made tcpdump working on 10.20 ?
55 From: Lutz Jaenicke <jaenicke@emserv1.ee.TU-Berlin.DE>
57 In article <82ks5i$5vc$1@news1.dti.ne.jp>, mtsat <mtsat@iris.dti.ne.jp>
61 >I downloaded and compiled tcpdump3.4 a couple of week ago. I tried to use
62 >it, but I can only see incoming data, never outgoing.
63 >Someone (raj) explained me that a patch was missing, and that this patch
64 >must me "patched" (poked) in order to see outbound data in promiscuous mode.
65 >Many things to do .... So the question is : did someone has already this
66 >"ready to use" PHNE_**** patch ?
69 1. You do need a late "LAN products cumulative patch" (e.g. PHNE_18173
72 echo 'lanc_outbound_promisc_flag/W1' | /usr/bin/adb -w /stand/vmunix /dev/kmem
73 You can insert this e.g. into /sbin/init.d/lan
80 http://groups.google.com/groups?selm=88cf4t%24p03%241%40web1.cup.hp.com
84 Newsgroups: comp.sys.hp.hpux
85 Subject: Re: tcpdump only shows incoming packets
87 From: Rick Jones <foo@bar.baz.invalid>
89 Harald Skotnes <harald@cc.uit.no> wrote:
90 > I am running HPUX 11.0 on a C200 hanging on a 100Mb switch. I have
91 > compiled libpcap-0.4 an tcpdump-3.4 and it seems to work. But at a
92 > closer look I only get to see the incoming packets not the
93 > outgoing. I have tried tcpflow-0.12 which also uses libpcap and the
94 > same thing happens. Could someone please give me a hint on how to
97 Search/Read the archives ?-)
99 What you are seeing is expected, un-patched, behaviour for an HP-UX
100 system. On 11.00, you need to install the latest lancommon/DLPI
101 patches, and then the latest driver patch for the interface(s) in use.
102 At that point, a miracle happens and you should start seeing outbound
105 [That article also mentions the patch that appears below.]
109 https://groups.google.com/groups?selm=38AA973E.96BE7DF7%40cc.uit.no
113 Newsgroups: comp.sys.hp.hpux
114 Subject: Re: tcpdump only shows incoming packets
116 From: Harald Skotnes <harald@cc.uit.no>
122 > What you are seeing is expected, un-patched, behaviour for an HP-UX
123 > system. On 11.00, you need to install the latest lancommon/DLPI
124 > patches, and then the latest driver patch for the interface(s) in
125 > use. At that point, a miracle happens and you should start seeing
128 Thanks a lot. I have this problem on several machines running HPUX
129 10.20 and 11.00. The machines where patched up before y2k so did not
130 know what to think. Anyway I have now installed PHNE_19766,
131 PHNE_19826, PHNE_20008, PHNE_20735 on the C200 and now I can see the
132 outbound traffic too. Thanks again.
134 (although those patches may not be the ones to install - there may be
137 And another message to tcpdump-workers@tcpdump.org, from Rick Jones:
139 Date: Mon, 29 Apr 2002 15:59:55 -0700
141 To: tcpdump-workers@tcpdump.org
142 Subject: Re: [tcpdump-workers] I Can't Capture the Outbound Traffic
146 http://itrc.hp.com/ would be one place to start in a search for the most
147 up-to-date patches for DLPI and the lan driver(s) used on your system (I
148 cannot guess because 9000/800 is too generic - one hs to use the "model"
149 command these days and/or an ioscan command (see manpage) to guess what
150 the drivers (btlan[3456], gelan, etc) might be involved in addition to
153 Another option is to upgrade to 11i as outbound promiscuous mode support
154 is there in the base OS, no patches required.
156 Rick Jones reports that HP-UX 11i needs no patches for outbound
157 promiscuous mode support.
159 An additional note, from Jost Martin, for HP-UX 10.20:
161 Q: How do I get [Wireshark] on HPUX to capture the _outgoing_ packets
163 A: You need to get PHNE_20892,PHNE_20725 and PHCO_10947 (or
164 newer, this is as of 4.4.00) and its dependencies. Then you can
165 enable the feature as described below:
167 Patch Name: PHNE_20892
168 Patch Description: s700 10.20 PCI 100Base-T cumulative patch
169 To trace the outbound packets, please do the following
170 to turn on a global promiscuous switch before running
171 the promiscuous applications like snoop or tcpdump:
173 adb -w /stand/vmunix /dev/mem
174 lanc_outbound_promisc_flag/W 1
175 (adb will echo the result showing that the flag has
178 (Thanks for this part to HP-support, Ratingen)
180 The attached hack does this and some security-related stuff
181 (thanks to hildeb@www.stahl.bau.tu-bs.de (Ralf Hildebrandt) who
182 posted the security-part some time ago)
186 (Don't switch IP-forwarding off, if you need it !)
187 Install the hack as /sbin/init.d/hacl_ip_stack (adjust
188 permissions !) and make a sequencing-symlink
189 /sbin/rc2.d/S350hack_ip_stack pointing to this script.
190 Now all this is done on every reboot.
192 According to Rick Jones, the global promiscuous switch also has to be
193 turned on for HP-UX 11.00, but not for 11i - and, in fact, the switch
194 doesn't even exist on 11i.
196 Here's the "hack_ip_stack" script:
198 -----------------------------------Cut Here-------------------------------------
201 # nettune: hack kernel params for safety
206 # /usr/contrib/bin fuer nettune auf Pfad
207 PATH=/sbin:/usr/sbin:/usr/bin:/usr/contrib/bin
217 print "Tune IP-Stack for security"
222 print "This action is not applicable"
234 print "USAGE: $0 {start_msg | stop_msg | start | stop}" >&2
244 # tcp-Sequence-Numbers nicht mehr inkrementieren sondern random
245 # Syn-Flood-Protection an
248 # Ausgehende Packets an ethereal/tcpdump etc.
250 /usr/contrib/bin/nettune -s tcp_random_seq 2 || exit $ERROR
251 /usr/contrib/bin/nettune -s hp_syn_protect 1 || exit $ERROR
252 /usr/contrib/bin/nettune -s ip_forwarding 0 || exit $ERROR
253 echo 'ip_block_source_routed/W1' | /usr/bin/adb -w /stand/vmunix /dev/kmem || exit $ERROR
254 echo 'lanc_outbound_promisc_flag/W 1' | adb -w /stand/vmunix /dev/mem || exit $ERROR
257 -----------------------------------Cut Here-------------------------------------
259 If you are trying to do packet capture with a FORE ATM card, you may or
260 may not be able to. They usually only release their driver in object
261 code so unless their driver supports packet capture, there's not much
264 If you get an error like:
266 tcpdump: recv_ack: bind error 0x???
268 when using DLPI, look for the DL_ERROR_ACK error return values, usually
269 in `/usr/include/sys/dlpi.h`, and find the corresponding value.