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(&quot;%02x:%02x:%02x:%02x:%02x:%02x&quot;);<br>
&nbsp;&nbsp;&nbsp; /* Jump to the selected adapter */<br>&nbsp;&nbsp;&nbsp; for(d=alldevs, i=0; i&lt; inum-1 ;d=d-&gt;next, i++);<br><br>&nbsp;&nbsp;&nbsp; printf(&quot;\n adrress %02x:%02x:%02x:%02x:%02x:%02x&quot;,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; d-&gt;addresses-&gt;addr-&gt;sa_data[0],<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; d-&gt;addresses-&gt;addr-&gt;sa_data[1],<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; d-&gt;addresses-&gt;addr-&gt;sa_data[2],<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; d-&gt;addresses-&gt;addr-&gt;sa_data[3],<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; d-&gt;addresses-&gt;addr-&gt;sa_data[4],<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; d-&gt;addresses-&gt;addr-&gt;sa_data[5]);<br><br><br>snprintf(&amp;curAddr[0],18,macAddrFormat.c_str(),<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; d-&gt;addresses-&gt;addr-&gt;sa_data[0],<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; d-&gt;addresses-&gt;addr-&gt;sa_data[1],<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; d-&gt;addresses-&gt;addr-&gt;sa_data[2],<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; d-&gt;addresses-&gt;addr-&gt;sa_data[3],<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; d-&gt;addresses-&gt;addr-&gt;sa_data[4],<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; d-&gt;addresses-&gt;addr-&gt;sa_data[5]);<br>
<br>I have to compare the mac address from my config file and only allow that adapter to&nbsp; capture packets...<br>Please tell me how to do...its URGENT...<br><br>Thanks in advance,,,,<br><br>