robert@sri-spam.istc.sri.com (Robert Allen) (04/30/88)
In my continuing efforts to port gated to an HP9000/300 I
am looking for the inetsw structure, as well as the kernel
variables rthost and rtnet. On our Sun's these variables are
in the standard release of software (ie. no src license needed).
On the HP the only place I've been able to find the names of
these variables are in the kernel, via 'nm':
[195] % m /hp-ux | fgrep -i inetsw
[196] % ^m^nm
nm /hp-ux | fgrep -i inetsw
0x000E7840 B _inetsw
[197] % ^inetsw^rthost
nm /hp-ux | fgrep -i rthost
0x000DDC94 B _rthost
[198] % ^rthost^rtnet
nm /hp-ux | fgrep -i rtnet
0x000DDCB0 B _rtnet
Am I going to have to wait until our src arrives before I can see
how and where these variables are on the HP?
Any help, pointers, or commiseration will be thankfully accepted.
--
----------------------------------------------------------------
Robert Allen, robert@spam.istc.sri.com
415-859-2143 (work phone, days)
----------------------------------------------------------------ericr@hpvcla.HP.COM (Eric Ross) (05/09/88)
You can use nlist(3C) to find the location of any symbol in a HP-UX binary. In your case, use "/hp-ux" as the file to obtain the symbol address. Then, you can do a lseek/read into "/dev/kmem" to get the value of the symbol. Eric Ross hplabs!hpvclx!ericr Hewlett Packard, Vancouver Division
robert@milk10..istc.sri.com (Robert Allen) (05/12/88)
In article <4340007@hpvcla.HP.COM> ericr@hpvcla.HP.COM (Eric Ross) writes:
+You can use nlist(3C) to find the location of any symbol in a HP-UX binary.
+In your case, use "/hp-ux" as the file to obtain the symbol address.
+Then, you can do a lseek/read into "/dev/kmem" to get the value of the
+symbol.
Thanks, but I guess I misphrased the question. I need two things;
first I see what the inetsw looks like for compatibility reasons,
and two I need to modify it to support gated. Both of these things
require that I find a header or src file with the declaration in
it.
--------------------------------------------------------------------------
Robert Allen,
robert@spam.istc.sri.com,
415-859-2143 (work phone, days)
--------------------------------------------------------------------------