IMHO this doesn't work (see previous messages on this topic). PacketRequest returns false with either PERMANENT and CURRENT OID ... for this reason some of people here suggested to use SDK instead ... Pierre.
-----Original Message----- From: Fred N. van Kempen [mailto:[EMAIL PROTECTED] Sent: lundi 4 ao�t 2003 14:47 To: [EMAIL PROTECTED] Subject: RE: [WinPcap-users] MAC ADDRESS pcap_if_t > > - Getnetinfo is present from Win2k, older OSes doesn't provide it. > that the problem, i need to retreiv mac address from Win95 > system too.. so what can i use ? PPACKET_OID_DATA OidData; BOOLEAN Status; DWORD dw; /* Create a suitable memory buffer. */ dw = (sizeof(PACKET_OID_DATA) + EADDR_SIZE - 1); OidData = GlobalAllocPtr(GMEM_MOVEABLE | GMEM_ZEROINIT, dw); if (OidData == NULL) return(-1); /* Grab the interface BIA (MAC) address from NDIS. */ OidData->Oid = OID_802_3_PERMANENT_ADDRESS; OidData->Length = EADDR_SIZE; Status = PacketRequest(handle, FALSE, OidData); /* Copy from memory buffer to user buffer. */ memcpy(eaddr, (u_char *)OidData->Data, EADDR_SIZE); GlobalFreePtr(OidData); ====================== 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] =================================================================
