Diagnostic SpaceWire Interface
EtherSpaceLink family User Manual
17.
6
.
2
7.
EtherSpaceLink_get_HWA()
S
ynops
i
s
int EtherSpaceLink_get_HWA ( EtherSpaceLink
DSI_unit,
unsigned char * HWA
)
D
esc
ri
pt
i
on
EtherSpaceLink_get_HWA()
r
etu
r
n
s
t
h
e
E
t
h
e
r
net me
di
a acc
e
ss
c
ont
r
olle
r
(
MAC
)
a
ddr
e
ss
o
f a
n
E
t
h
e
r
S
pac
eL
i
n
k
un
i
t.
Th
is is
a
un
i
q
ue
4
8
-
b
i
t
a
ddr
e
ss
.
I
t
ca
n be m
app
e
d
to t
h
e un
i
t
’s s
e
ri
a
l numbe
r
u
si
n
g
E
t
h
e
r
S
pac
eL
i
n
k_
H
WA_
to
_s
e
ri
a
l
_
numbe
r
.
I
nput p
ara
mete
r
s
DSI_unit
t
h
e
ha
n
d
le
r
etu
r
ne
d
b
y a s
u
cc
e
ssf
ul
EtherSpaceLink_open()
c
omm
a
n
d
.
Output p
ara
mete
r
s
HWA
a p
o
i
nte
r
to
a
n
a
rr
ay
o
f
6
b
y
te
s
to
r
e
c
e
i
ve t
h
e
add
r
e
ss
.
Retu
r
ns
0
i
f s
u
cc
e
ssf
ul.
-1
i
f a
n e
rr
o
r
o
cc
u
rr
e
d wh
i
le
g
ett
i
n
g
da
t
a
.
Note
Be
awa
r
e t
ha
t
EtherSpaceLink_get_HWA()
sh
oul
d
onl
y
be
ca
lle
d a
t t
h
e
s
t
a
r
t o
f a
n
A
P
I p
r
o
gr
a
m
,
be
f
o
r
e t
h
e S
pac
e
W
ir
e l
i
n
k
(
s
)
a
r
e en
a
ble
d
. See
s
e
c
t
i
on
E
xa
mple
EtherSpaceLink DSI_unit;
unsigned char HWA[6];
DSI_unit = EtherSpaceLink_open ( "192.168.3.40" );
EtherSpaceLink_get_HWA ( DSI_unit, HWA );
printf ( "MAC address %2.2X-%2.2X-%2.2X-%2.2X-%2.2X-%2.2X",
HWA[0], HWA[1], HWA[2], HWA[3], HWA[4], HWA[5]
);
4Links Limited
www.4Links.co.uk
[email protected]
page 104 of 130
T +44 1908 642001; F +44 1908 363463
Milton Keynes MK3 6EB, UK
Suite EU2, Bletchley Park