* Getting ETHERNET address of VAX adapter
@ 1990-04-12 16:14 brodie
1990-04-13 3:00 ` George Robbins
1990-04-13 17:31 ` Matt Thomas
0 siblings, 2 replies; 5+ messages in thread
From: brodie @ 1990-04-12 16:14 UTC (permalink / raw)
This is ALMOST a really stupid question....
How does one go about finding out the ethernet address of the
ethernet adapter of a VAX? (via software, that is...)
With NCP, etc., I can easily see the addresses of the SERVERS,
but stuff like SHOW EXEC CHAR doesn't tell me what I need to know.
What am I missing?
-------------------------------------------------------------------------------
Kent C. Brodie - Systems Manager brodie@fps.mcw.edu
Medical College of Wisconsin voice: +1 414 778 4500
FAX: +1 414 778 6694
"My dear, killing you would be like killing the Easter Bunny."
-Mr. Kincaid (the "hunter") spoken to Mary Ann ; _Gilligan's Island_
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Getting ETHERNET address of VAX adapter
@ 1990-04-12 23:46 Christopher Ho
0 siblings, 0 replies; 5+ messages in thread
From: Christopher Ho @ 1990-04-12 23:46 UTC (permalink / raw)
In article <3431.26246304@fps.mcw.edu>, brodie@fps.mcw.edu writes...
>How does one go about finding out the ethernet address of the
>ethernet adapter of a VAX? (via software, that is...)
NCP> show known line char
The newer VAXes also support
>>> SHOW ETHER
at the ROM boot prompt.
Chris
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Getting ETHERNET address of VAX adapter
1990-04-12 16:14 brodie
@ 1990-04-13 3:00 ` George Robbins
1990-04-13 16:49 ` Ted Marshall
1990-04-13 17:31 ` Matt Thomas
1 sibling, 1 reply; 5+ messages in thread
From: George Robbins @ 1990-04-13 3:00 UTC (permalink / raw)
In article <3431.26246304@fps.mcw.edu> brodie@fps.mcw.edu writes:
> This is ALMOST a really stupid question....
> How does one go about finding out the ethernet address of the
> ethernet adapter of a VAX? (via software, that is...)
>
> With NCP, etc., I can easily see the addresses of the SERVERS,
> but stuff like SHOW EXEC CHAR doesn't tell me what I need to know.
ncp show line xyz-n characteristics
Note that this shows you the original hardware address, not whatever
deviated thing DECnet sets it to (something based on the DECnet area.node).
--
George Robbins - now working for, uucp: {uunet|pyramid|rutgers}!cbmvax!grr
but no way officially representing: domain: grr@cbmvax.commodore.com
Commodore, Engineering Department phone: 215-431-9349 (only by moonlite)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Getting ETHERNET address of VAX adapter
1990-04-13 3:00 ` George Robbins
@ 1990-04-13 16:49 ` Ted Marshall
0 siblings, 0 replies; 5+ messages in thread
From: Ted Marshall @ 1990-04-13 16:49 UTC (permalink / raw)
In article <10847@cbmvax.commodore.com>, grr@cbmvax.commodore.com (George Robbins) writes:
> Note that this shows you the original hardware address, not whatever
> deviated thing DECnet sets it to (something based on the DECnet area.node).
The working Ethernet address is set from the DECnet address as follows:
Compute (Area * 1024) + Node_within_area, byte swap the result, producing
the low two bytes of the Ethernet address (The other four bytes are
AA-00-04-00).
For example, DECnet address 4.72 yields (4 * 1024) + 72 = 4168 = 0x1048.
Swap the bytes and insert into the Ethernet address, yielding
AA-00-04-00-48-01.
Hope this helps.
--
Ted Marshall ...!ucbvax!mtxinu!blia!ted <or> ted@blia.bli.com
ShareBase Corp., 14600 Winchester Blvd, Los Gatos, Ca 95030 (408)378-7000
The opinions expressed above are those of the poster and not his employer.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Getting ETHERNET address of VAX adapter
1990-04-12 16:14 brodie
1990-04-13 3:00 ` George Robbins
@ 1990-04-13 17:31 ` Matt Thomas
1 sibling, 0 replies; 5+ messages in thread
From: Matt Thomas @ 1990-04-13 17:31 UTC (permalink / raw)
> This is ALMOST a really stupid question....
> How does one go about finding out the ethernet address of the
> ethernet adapter of a VAX? (via software, that is...)
>
> With NCP, etc., I can easily see the addresses of the SERVERS,
> but stuff like SHOW EXEC CHAR doesn't tell me what I need to know.
Try this program. It will list any interface that has an physical
address (which may not be limited to just Ethernet adapters).
#include <stdio.h> /* standard I/O */
#include <errno.h> /* error numbers */
#include <time.h> /* time definitions */
#include <sys/types.h> /* system types */
#include <sys/socket.h> /* socket stuff */
#include <sys/ioctl.h> /* ioctls */
#include <net/if.h> /* generic interface structs */
extern char *optarg;
extern int optind;
extern char *sys_errlist[];
main( argc, argv )
int argc;
char *argv[];
{
struct ifdevea devea;
struct ifreq *ifr, ifreqs[32];
struct ifconf ifc;
int s, i;
bzero(&devea, sizeof(devea));
/* we need a socket -- any old socket will do. */
s = socket(AF_UNIX, SOCK_DGRAM, 0);
if (s < 0) {
perror("socket");
exit(1);
}
ifc.ifc_req = ifreqs;
ifc.ifc_len = sizeof(ifreqs);
if (ioctl(s, SIOCGIFCONF, &ifc) < 0) {
perror("siocgifconf");
exit(1);
}
for (ifr = ifreqs; ifc.ifc_len > 0; ifr++, ifc.ifc_len -= sizeof(*ifr)) {
if (strcmp(devea.ifr_name, ifr->ifr_name)) {
(void) strcpy(devea.ifr_name, ifr->ifr_name);
/* read the address of the interface */
if (ioctl(s, SIOCRPHYSADDR, &devea) < 0) {
/* error? */
if (errno != EOPNOTSUPP && errno |= EINVAL) {
/* unexpected error */
perror(devea.ifr_name);
}
continue;
}
printf("%s: ", devea.ifr_name);
printf("current = %02x-%02x-%02x-%02x-%02x-%02x, ",
devea.current_pa[0], devea.current_pa[1], devea.current_pa[2],
devea.current_pa[3], devea.current_pa[4], devea.current_pa[5]
);
printf("default = %02x-%02x-%02x-%02x-%02x-%02x\n",
devea.default_pa[0], devea.default_pa[1], devea.default_pa[2],
devea.default_pa[3], devea.default_pa[4], devea.default_pa[5]
);
}
}
}
--
Matt Thomas Internet: thomas@wrl.dec.com
DECnet-ULTRIX Development UUCP: ...!decwrl!thomas
Digital Equipment Corporation Disclaimer: This message reflects my own
Littleton, MA warped views, etc.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1990-04-13 17:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1990-04-12 23:46 Getting ETHERNET address of VAX adapter Christopher Ho
-- strict thread matches above, loose matches on Subject: below --
1990-04-12 16:14 brodie
1990-04-13 3:00 ` George Robbins
1990-04-13 16:49 ` Ted Marshall
1990-04-13 17:31 ` Matt Thomas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox