Try PacketRequest with the OID_802_3_CURRENT_ADDRESS OID. Loris
----- Original Message ----- From: "Devesh Pujari" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, July 23, 2004 1:27 PM Subject: RE: [WinPcap-users] How do I get the MAC address of the local adapter opened Hi Loris, So there is no method in wpcap or packet lib to get the Mac Address of adapter opened for now ? Do I have to do any thing special while compiling the packet.dll ? other then I have to get the DDK first .. how do I expose those functions ? I found GetAdaptersInfo() method in platform SDK of visual studio ? Do I need any thing extra to use this other then IpHlpapi.lib to link. it gives output of similar structure of _ADAPTER_INFO . But then question will be how to map _ADAPTER structure and IP_ADAPTER_INFO of windows SDK ? I have not tried using yet. Any one has use this earlier ?? Thanks, Devesh. -----Original Message----- From: Loris Degioanni [mailto:[EMAIL PROTECTED] Sent: Friday, July 23, 2004 11:44 AM To: [EMAIL PROTECTED] Subject: Re: [WinPcap-users] How do I get the MAC address of the local adapter opened You don't access them, unless you export them and recompile the dll. They are internal functions, not part of the public packet.dll API. If you need the MAC address of a card, the best way in this moment is probably to query it through an OID. Loris ----- Original Message ----- From: "Devesh Pujari" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, July 23, 2004 10:02 AM Subject: RE: [WinPcap-users] How do I get the MAC address of the local adapter opened All, How to access these functions ? These are declared in packet32.h but does not get linked with packet.lib . void PacketPopulateAdaptersInfoList(); PWCHAR SChar2WChar(PCHAR string); PCHAR WChar2SChar(PWCHAR string); BOOL PacketGetFileVersion(LPTSTR FileName, PCHAR VersionBuff, UINT VersionBuffLen); PADAPTER_INFO PacketFindAdInfo(PCHAR AdapterName); BOOLEAN PacketUpdateAdInfo(PCHAR AdapterName); Thanks, Devesh. -----Original Message----- From: Devesh Pujari [mailto:[EMAIL PROTECTED] Sent: Thursday, July 22, 2004 7:20 PM To: [EMAIL PROTECTED] Subject: [WinPcap-users] How do I get the MAC address of the local adapter opened Hi All, There is a structure in packet library struct _ADAPTER_INFO . This structure has Mac Address. and there is a method in packet32.h file PADAPTER_INFO PacketFindAdInfo(PCHAR AdapterName); But I could not link this method to my program. I included both library wpcap.lib and packet.lib. Do I have to set any macro to get the this function linked ? Is there any other method to get the PADAPTER_INFO structure ? I need local interface Mac Address to set in the ethernet header and send the raw packets. How do I get Mac Address ? Thanks, Devesh ====================== This is the WinPcap users list. It is archived at http://www.mail-archive.com/[EMAIL PROTECTED]/ To unsubscribe use mailto: [EMAIL PROTECTED] ====================== ================================================================== This is the WinPcap users list. It is archived at http://www.mail-archive.com/[EMAIL PROTECTED]/ To unsubscribe use mailto: [EMAIL PROTECTED] ================================================================== ====================== This is the WinPcap users list. It is archived at http://www.mail-archive.com/[EMAIL PROTECTED]/ To unsubscribe use mailto: [EMAIL PROTECTED] ====================== ================================================================== This is the WinPcap users list. It is archived at http://www.mail-archive.com/[EMAIL PROTECTED]/ To unsubscribe use mailto: [EMAIL PROTECTED] ==================================================================