I am working on example to get the mac address of the adapter.<br><br>Is this the way to get the mac address of the adapter...<br><br>char curAddr[14];<br>std::string macAddrFormat("%02x:%02x:%02x:%02x:%02x:%02x");<br>
/* Jump to the selected adapter */<br> for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++);<br><br> printf("\n adrress %02x:%02x:%02x:%02x:%02x:%02x",<br> d->addresses->addr->sa_data[0],<br>
d->addresses->addr->sa_data[1],<br> d->addresses->addr->sa_data[2],<br> d->addresses->addr->sa_data[3],<br> d->addresses->addr->sa_data[4],<br>
d->addresses->addr->sa_data[5]);<br><br><br>snprintf(&curAddr[0],18,macAddrFormat.c_str(),<br> d->addresses->addr->sa_data[0],<br> d->addresses->addr->sa_data[1],<br>
d->addresses->addr->sa_data[2],<br> d->addresses->addr->sa_data[3],<br> d->addresses->addr->sa_data[4],<br> d->addresses->addr->sa_data[5]);<br>
<br>I have to compare the mac address from my config file and only allow that adapter to capture packets...<br>Please tell me how to do...its URGENT...<br><br>Thanks in advance,,,,<br><br>