
How can i get MAC Address by IP address in SCO UNIX C
Quote:
>Hi,
> Please tell me which function i can use to get the physical address
> In C language.
I don't know if it'll work in UNIX, but it works this works for me in DOS:
(I have the lsl, NetworkCardDriver and ipxodi loaded)
typedef struct strLocaladdress{
unsigned char network[4];
unsigned char node[6];
};
struct strLocaladdress local_address;
void GetLocalAddress(struct strLocaladdress __far *pla)
{
union _REGS reg;
struct _SREGS sreg;
reg.x.bx=0x0009;
sreg.es=_FP_SEG(pla);
reg.x.si=_FP_OFF(pla);
_int86x(0x7A,®,®,&sreg);
}
and then call it by:
static struct strLocaladdress local_address;
GetLocalAddress(&local_address);
The GetLocalAdress function you probably have to rewrite, because it's a
call to
one of the previously loaded drivers, that have added/changed an interrupt
call.
I use it to make several old,small dos machines communicate with each other.
Denie Andriessen
D dot Andriessen at pink.nl (you know what to do with this...)