* how to obtain ethernet address
@ 1997-06-03 4:00 Eric LaPresto
1997-06-04 4:00 ` Michael C. Vergallen
1997-06-05 4:00 ` Stephen Hoff Hoffman
0 siblings, 2 replies; 4+ messages in thread
From: Eric LaPresto @ 1997-06-03 4:00 UTC (permalink / raw)
Does anyone know of a way to read the Ethernet (MAC) address
of an Alpha running Digital Unix 4.0 through a C
call?
Thanks in advance,
Eric
---------------------------+--------------------------
Eric LaPresto Systems Analyst
lapresto@surgery.ccf.org Dept. of Neurosurgery/CAMIS
(216) 445-9368 Cleveland Clinic Foundation
(216) 444-4795 FAX Cleveland, OH 44195
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: how to obtain ethernet address
1997-06-03 4:00 how to obtain ethernet address Eric LaPresto
@ 1997-06-04 4:00 ` Michael C. Vergallen
1997-06-05 4:00 ` Laurent Yuric
1997-06-05 4:00 ` Stephen Hoff Hoffman
1 sibling, 1 reply; 4+ messages in thread
From: Michael C. Vergallen @ 1997-06-04 4:00 UTC (permalink / raw)
On 3 Jun 1997 20:02:36 GMT, Eric LaPresto <lapresto@surgery.ccf.org> wrote:
>Does anyone know of a way to read the Ethernet (MAC) address
>of an Alpha running Digital Unix 4.0 through a C
call?
Okey, let me make a sugestion you could try to find the source of 'route'
and have a look at the source. I don't have it on line now so I can't
really help you at the moment but their is a version of route available in
source and it does such a call to read the Ethernet address. Have a look for
'net-tools*.tar.gz' where * stands for the version number.
Michael
--
Michael C. Vergallen A.k.A. Mad Mike,
Sportstraat 28 http://www.double-barrel.be/mvergall/
B 9000 Gent ftp://ftp.double-barrel.be/pub/linux/
Belgium tel : 32-9-2227764 Fax : 32-9-2224976
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: how to obtain ethernet address
1997-06-04 4:00 ` Michael C. Vergallen
@ 1997-06-05 4:00 ` Laurent Yuric
0 siblings, 0 replies; 4+ messages in thread
From: Laurent Yuric @ 1997-06-05 4:00 UTC (permalink / raw)
I was looking for a similar program on HP-UX. I think it may work as well
on an Alpha machine (please let me know).
-----------begin-------------
| #include <stdio.h>
| #include <fcntl.h>
| #include <sys/ioctl.h>
| #include <netio.h>
|
| int main()
| {
| int lan;
| struct fis f;
|
| if ((lan = open("/dev/lan0", O_RDONLY)) == -1) {
| printf("Can't open /dev/lan0\n");
| exit(1);
| }
| f.reqtype = LOCAL_ADDRESS;
| if (ioctl(lan, NETSTAT, &f) == -1) {
| printf("ioctl failed\n");
| exit(1);
| }
| printf("LAN Address = 0x%02x%02x%02x%02x%02x%02x\n",
| f.value.s[0],
| f.value.s[1],
| f.value.s[2],
| f.value.s[3],
| f.value.s[4],
| f.value.s[5]);
| exit(0);
| }
------------end--------------
You may have to be root to run this program.
Laurent
---------------------------------------------------------------------------
Laurent YURIC, <Laurent.Yuric@ed.nce.sita.int>
SITA - Research and Development
Sophia Antipolis (FRANCE)
---------------------------------------------------------------------------
Michael C. Vergallen <mvergall@alpha.double-barrel.be> wrote in article
<slrn5pai7p.54n.mvergall@alpha.double-barrel.be>...
> On 3 Jun 1997 20:02:36 GMT, Eric LaPresto <lapresto@surgery.ccf.org>
wrote:
> >Does anyone know of a way to read the Ethernet (MAC) address
> >of an Alpha running Digital Unix 4.0 through a C
> call?
> Okey, let me make a sugestion you could try to find the source of 'route'
> and have a look at the source. I don't have it on line now so I can't
> really help you at the moment but their is a version of route available
in
> source and it does such a call to read the Ethernet address. Have a look
for
> 'net-tools*.tar.gz' where * stands for the version number.
>
> Michael
> --
> Michael C. Vergallen A.k.A. Mad Mike,
> Sportstraat 28 http://www.double-barrel.be/mvergall/
> B 9000 Gent ftp://ftp.double-barrel.be/pub/linux/
> Belgium tel : 32-9-2227764 Fax : 32-9-2224976
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: how to obtain ethernet address
1997-06-03 4:00 how to obtain ethernet address Eric LaPresto
1997-06-04 4:00 ` Michael C. Vergallen
@ 1997-06-05 4:00 ` Stephen Hoff Hoffman
1 sibling, 0 replies; 4+ messages in thread
From: Stephen Hoff Hoffman @ 1997-06-05 4:00 UTC (permalink / raw)
In article <5n1t8s$2kf@slider.bme.ri.ccf.org>, lapresto@surgery.ccf.org (Eric LaPresto) writes:
:Does anyone know of a way to read the Ethernet (MAC) address
:of an Alpha running Digital Unix 4.0 through a C
:call?
Here's the code:
http://www.partner.digital.com/www-swdev/
pages/Home/TECH/faqs/dunix/ethernU.html
-------------------------- pure personal opinion ---------------------------
Hoff (Stephen) Hoffman OpenVMS Engineering h*ffman@xdelta.enet.dec.c*m
headers and addresses munged to avoid automated spammers: junk-e-mail
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1997-06-05 4:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-06-03 4:00 how to obtain ethernet address Eric LaPresto
1997-06-04 4:00 ` Michael C. Vergallen
1997-06-05 4:00 ` Laurent Yuric
1997-06-05 4:00 ` Stephen Hoff Hoffman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox