[Simh] Problem with "attach xq"

David Holland david.w.holland at gmail.com
Thu Jan 24 20:41:44 EST 2008


Unfortunately, it appears there is no way to get an interface's ethernet
address out of libpcap, as it currently stands.  (I don't think libpcap
actually bothers with trying to get the ethernet address.)   You do get the
current IP addresses and netmasks however.

I hacked up a patch to spit the interfaces IP Addresses, and netmasks (as
returned from libpcap) as the default description if there's not a 'real'
description returned from libpcap.   I believe anything further starts
turning rather Linux specific, and unportable quickly.

It spits out things like so:

sim> show xq eth
ETH devices:
  0  eth0   (Cur IP: 192.168.0.2/255.255.255.0)
  1  eth1   (Cur IP: <None>)
  2  vmnet1 (Cur IP: 172.16.133.1/255.255.255.0)
  3  vmnet8 (Cur IP: 192.168.192.1/255.255.255.0)

sim> show xq eth
ETH devices:
  0  eri0 (Cur IP: XXX.XXX.XX.X/255.255.252.0)

sim> show xq eth
ETH devices:
  0  lan0 (Cur IP: 10.196.100.20/255.255.254.0, 10.196.100.13/255.255.254.0)
  1  lan4 (Cur IP: 1.1.1.1/255.0.0.0)


I tested it on Linux (Ubuntu) , Solaris 9 (Sparc) and HPUX 11 (obviously).
I can't test it on Windows since I've no compilers. (Unless SIMH compiles
with Cygwin?)

Hope someone finds this of some vague use...

David


On Jan 24, 2008 9:28 AM, David Holland <david.w.holland at gmail.com> wrote:

>
> On Jan 24, 2008 8:34 AM, Hittner, David T. <david.hittner at ngc.com> wrote:
> >snip<
>
> >
> > We would be happy for anyone familiar with *ix device programming to
> > provide
> > the code to fill in the device description string to help make it more
> > obvious
> > which adapter you are selecting.
>
>
> I  suspect about the only things you're going to get in that regard would
> be for libpcap to give you the ethernet address associated with a given
> device, maybe IP address (if there's one assigned) as well.    Anything
> beyond that I would think starts getting (IMO) rather unportable.
>
> Are you looking for more?
>
>
> >
> > Dave
> > SIMH Ethernet developer
> >
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20080124/e0381729/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipdiff.txt.gz
Type: application/x-gzip
Size: 1112 bytes
Desc: not available
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20080124/e0381729/attachment-0003.bin>


More information about the Simh mailing list