Changeset 5141 for trunk/oscam-config.c
- Timestamp:
- 05/01/11 02:46:12 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/oscam-config.c
r5140 r5141 3412 3412 #elif defined OS_SOLARIS 3413 3413 // no mac address specified so use first filled mac 3414 int32_t j = 0, sock,niccount;3414 int32_t j, sock, niccount; 3415 3415 struct ifreq nicnumber[16]; 3416 3416 struct ifconf ifconf; … … 3422 3422 if (!ioctl(sock,SIOCGIFCONF,(char*)&ifconf)){ 3423 3423 niccount = ifconf.ifc_len/(sizeof(struct ifreq)); 3424 while(j < niccount){3424 for(i = 0; i < niccount, ++i){ 3425 3425 memset(&arpreq, 0, sizeof(arpreq)); 3426 ((struct sockaddr_in*)&arpreq.arp_pa)->sin_addr.s_addr = ((struct sockaddr_in*)&nicnumber[ j].ifr_addr)->sin_addr.s_addr;3426 ((struct sockaddr_in*)&arpreq.arp_pa)->sin_addr.s_addr = ((struct sockaddr_in*)&nicnumber[i].ifr_addr)->sin_addr.s_addr; 3427 3427 if (!(ioctl(sock,SIOCGARP,(char*)&arpreq))){ 3428 for ( i = 0; i < 6; ++i)3429 mac[ i] = (unsigned char)arpreq.arp_ha.sa_data[i];3428 for (j = 0; j < 6; ++j) 3429 mac[j] = (unsigned char)arpreq.arp_ha.sa_data[j]; 3430 3430 if(check_filled(mac, 6) > 0) break; 3431 3431 }
Note:
See TracChangeset
for help on using the changeset viewer.