Hi Gerald,
with your help I found a work around for the permission problem which could be
worthful to investigate:
1) tcpdump works with /dev/lpiN instead of /dev/lanN but it reports
a warning before listening:
$> tcpdump -i /dev/dlpi0
tcpdump: WARNING: SIOCGIFADDR: /dev/dlpi0: Invalid argument
tcpdump: listening on /dev/dlpi0
(The warning is generated after a pcap_lookupnet-call)
2) ethereal seems to ignore the -i Option. Therefore I hardcoded
the interface dlpi0 in "capture_dlg.c" in
user_data.name = ifr->ifr_name;
3) Keeping 1) in mind I ignored an error reported after the
ioctl(sock, SIOCGIFFLAGS, (char *)&ifrflags)-call as well as
the following Interface-Up test ("if (!(ifrflags.ifr_flags & IFF_UP)).
With these ugly changes ./etheral is running pretty good under HP-UX 11.0
Another things is that only incoming packets are displayed. For this the
second article below from Rick Jones explains the reason and the solution.
I think it's a good idea to include the article in the README.hpux.
Thanks for your immediate response and merry christmas from Germany.
Lothar
Gerald Combs wrote:
>
> 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 .