<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16788" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>That will give you the IPv4/v6 address(es) of the
adapter.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>There's no pcap API to retrieve the MAC address of an adapter
(if any).</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>You need to use the undocumented packet APIs to do that, the
developer's pack for WinPcap has a sample showing how to do that,
it's</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT
size=2>WpdPack\Examples-remote\PacketDriver\GetMacAddress</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Have a nice day</FONT></DIV>
<DIV><FONT size=2>GV</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=ssak22@gmail.com href="mailto:ssak22@gmail.com">ss ak</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=winpcap-users@winpcap.org
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, December 18, 2008 11:16
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Winpcap-users] Retireving MAC
Address</DIV>
<DIV><FONT size=2></FONT><FONT size=2></FONT><BR></DIV>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>
<P>
<HR>
<P></P>_______________________________________________<BR>Winpcap-users
mailing
list<BR>Winpcap-users@winpcap.org<BR>https://www.winpcap.org/mailman/listinfo/winpcap-users<BR></BLOCKQUOTE></BODY></HTML>