Const
NDIS_PACKET_TYPE_DIRECTED =$0001;
NDIS_PACKET_TYPE_MULTICAST =$0002;
NDIS_PACKET_TYPE_ALL_MULTICAST =$0004;
NDIS_PACKET_TYPE_BROADCAST =$0008;
NDIS_PACKET_TYPE_SOURCE_ROUTING =$0010;
NDIS_PACKET_TYPE_PROMISCUOUS =$0020;
NDIS_PACKET_TYPE_SMT =$0040;
NDIS_PACKET_TYPE_MAC_FRAME =$8000;
NDIS_PACKET_TYPE_FUNCTIONAL =$4000;
NDIS_PACKET_TYPE_ALL_FUNCTIONAL =$2000;
NDIS_PACKET_TYPE_GROUP =$1000;
function SetOid(hVxD:THandle; ulOid,ulLength,data:ULong)
BYTE;
var
cbin,cbRet,a
Word;
ioctl:ULong;
pOidData
PACKET_OID_DATA;
begin
cbIn := sizeof(PACKET_OID_DATA) + ulLength;
pOidData:= PPACKET_OID_DATA(@InBuff);
if (ulOid = OID_GEN_CURRENT_PACKET_FILTER) then
ioctl := ULONG (IOCTL_PROTOCOL_SET_OID);
fillchar(InBuff, 0, cbIn+1);
pOidData.Oid := ulOid;
pOidData.Length := ulLength;
pOidData.Data[0] := UCHAR(data);
cbRet := QueryPacket( hVxD, ioctl, @InBuff, cbIn, @InBuff, cbIn );
result:=0;
end;
SetOid(hVxD, OID_GEN_CURRENT_PACKET_FILTER, 4, NDIS_PACKET_TYPE_PROMISCUOUS);