This is a discussion on Mac Adress. How to get it ? within the Sco Unix forums, part of the Unix Operating Systems category; --> Hi all, Can anyone tell me the name of a C function to get the MAC adress ? TIA ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi all, Can anyone tell me the name of a C function to get the MAC adress ? TIA -- Joao Natal jnatal@dcsoftware.pt D&C Software, Lda. www.dcsoftware.pt Rua do Espido, 164 C - 3o Salas 496/7/8 4470-177 Maia Phone: +351 22 943 92 50 Fax: +351 22 943 92 51 |
| |||
| Joćo Natal wrote: > Hi all, > > Can anyone tell me the name of a C function to get the MAC adress ? > > TIA > Well, dunno about a 'C' function but perhaps a simple system(S) with ifconfig <if_name> | awk '/ether/ { print $2 }' will do. Best, Roberto -- Roberto Zini - Technical Support Manager - email:r.zini<AT>strhold.it Technical Support Manager -- Strhold Evolution Division R.E. (ITALY) --------------------------------------------------------------------- "Has anybody around here seen an aircraft carrier?" (Pete "Maverick" Mitchell - Top Gun) |
| |||
| "Joćo Natal" <jnatal@dcsoftware.pt> wrote in message news:<3f8d665b$0$5481$a729d347@news.telepac.pt>... > Hi all, > > Can anyone tell me the name of a C function to get the MAC adress ? How about using ndstat and grabbing the mac address from there? John |
| ||||
| You can try opening the device node with "MACIOC_GETADDR" ioctl. On SCO5 this ioctl must be supported by all the mdi drivers. -M "Joćo Natal" <jnatal@dcsoftware.pt> wrote in message news:<3f8d665b$0$5481$a729d347@news.telepac.pt>... > Hi all, > > Can anyone tell me the name of a C function to get the MAC adress ? > > TIA > > -- > > > Joao Natal > jnatal@dcsoftware.pt > D&C Software, Lda. > www.dcsoftware.pt > Rua do Espido, 164 C - 3o Salas 496/7/8 > 4470-177 Maia > Phone: +351 22 943 92 50 > Fax: +351 22 943 92 51 |