Forum Replies Created
-
AuthorPosts
-
on the other hand,Smile if my net traffice reach on 7mbps,can cause lose packet?
You loose packets ONLY if your application does not get processor time for some relatively large time interval.
because u had said:my app work in usermode. i want t deal with every packet, but it is still will be done in usermode not in the ring0.
please tell me System efficiency can Affected much more?
Of course Ring0 packet processing is more effective than Ring3 one, however most of the modern systems are powerful enough to afford packet processing in user mode even on high speed links.
by the way,when i use pkfilter, i found you alloc 1534 bytes for everypacket,why not 1514?
If you mean INTERMEDIATE_BUFFER structure then in addition to raw Ethernet frame it us used to keep some extra information about the packet (NDIS flags, direction and etc…)
can u tell me what’s the meaning for “500 packets”
WinpkFilter driver preallocates 500 buffers for packets (to avoid overhead from allocate/release operations).
in what situation,we need modi the value?
User mode WinpkFilter application usually is not the only application running on the system and it is possible that it won’t get processor time (to read packets from driver) during some time interval. During this time interval packets are stored in the driver preallocated buffers. Once application gets processor time it can read packets from the driver and process. If your application can be prevented from execution for large time intervals but still gets enough processor time to read and filter packets on the high speed network then you may need to increase the amount of preallocated packet buffers.
An example, real network throughput for 100 Mbit network is about 10 megabytes per second. The maximum size of the Ethernet frame is 1514 bytes. The simple calculation gives you approximately 7000 packet per second rate on 100 Mbit network. So if WinpkFilter application is prevented from execution for less than 500/7000 ~ 0.07sec time interval you won’t notice any packet loss.
Гм, полез смотреть, и правда, при использовании IoAttachDeviceXXX обратная совместимость с TDI-фильтрами по видимому сохраняется. Так что беру свое утверждение обратно. 8)
Другое дело, что если переносить LNM под Висту, то придется переделать его с патча мажоров на аттач к устройству. Разница невеликая конечно, но все же…
TDI_EVENT_DISCONNECT посылается, когда user-mode прога просит disconnect. Но до TDI_EVENT_DISCONNECT, должно быть несколько TDI_EVENT_RECEIVE, а ведь их вызывает драйвер TDI-протокола. Но почему тогда один раз?
А что собственно видит сетевой сниффер? Два дампа для сравнения в студию, один с сети, другой с клиента. И кстати ClientEventChainedReceive, ClientEventReceiveExpedited, ClientEventChainedReceiveExpedited пошли лесом? С каким статусом обработался ClientEventReceive?
А вообще, гадать по чему не работает код, которого ты никогда в жизни не видел можно долго… Советую поискать в сети что-то вроде оберток в виде сокетов или вспоиогательных функций вокруг TDI (от PCAUSA например, или те что в DriverStudio). TDI клиента написать это не пару функций вызвать, в свое время мне пришлось изрядно повозиться…
TDI клиентов писать не так уж просто, так что ошибка в драйвере – самое вероятное. Какая, это разбираться надо…
ЗЫ: вроде же в висте остался ТДИ уровень, да и фильтры там работают как нада. Если только аттач делать а не хук мажорных функций.
Отсался он там для обратной совместимости, но теперь через него не идет весь трафик.
How can I do this?
If you are asking about NDIS hooking driver modification then this can be done in your custom build by special request if you have got Developer license. If you have got the source code then you can do it yourself (the exact details can be queried from support(at)ntkernel.com).
but some network attack tool made by winpcap library.
If network attack is performed from remote host to the system with WinpkFilter installed you will be able to intercept/block attacker packets sent with winpcap or anything else.
If you want to block/inspect locally installed winpcap activities than this is also possible to do with simple extension of WinpkFilter (add winpcap to the list of hooked protocols in the NDIS hooking driver, NDIS IM build filters all protocols by default).
The sample above is good for blocking undesired content (not only URL’s). So I don’t think it is applicable for the reversed solution.
Basically you have several possibilities:
1) Allow only those IP’s which host permitted URL’s. If outgoing HTTP packet (with destination port 80) is destined to the IP address not in the list then just drop it.
2) Parse outgoing DNS packets and allow only those queries which are allowed in your URL list.
3) Parse HTTP GET request for each outgoing HTTP packet and match URL against your URL list.А не планируются ли какие правила для NDISRD ? Гонять каждый пакет в юзермоду слишком накладно получается
В принципе ничего сложного нет, в течении дня можно сделать, если на уровне протокол/адрес/порт. Правда не уверен насколько это будет востребовано. Были случаи когда просили что-то подобное для кастом сборки, например когда нужно было ловить только SYN пакеты. Насколько кому-то нужны универсальные фильтры сказать сложно, но над возможностью реализации подумаю. 8)
Собственно вот какой вопросец, в каком месте нужно получать ПИД процесса, который послал запрос на коннект, что бы при первом же поступлении этого пакета в WinPkFilter можно его отбросить или пропустить. Например я думаю если это сделать в комплит роутине на коннект, то NDIS филттру нечем будет руководствоваться при запросе или разрешении ПЕРВОГО пакета, т.к. такой инфы еще не будет.
Можно в запросе на коннет например…
Когда делаю IoCallDriver с параметром TDI_QUERY_ADDRESS_INFO, то возвращается ошибка STATUS_CANCELLED ((NTSTATUS)0xC0000120L)
В чем тут проблема то?Судя по статусу IRP отменили… Может не на тот обьект был запрос?
Xp Sp2, yes i rebooted after the installation…and edited the reg’s files according to the installation in the help file.
Installer creates required registry entries itself and you don’t have to manually edit anything. The instructions are given for those who create their own installer which includes WinpkFilter. So may be editing the registry caused the observed behavior.
Another possible reason is installed third-party firewall/VPN/NAT software.
What operating system do you have? Have you rebooted after installation?
How can i modify the destination MAC?
MAC header is right before IP header.
That depends from proxy, if it is HTTP proxy there is no problem since HTTP GET request contains the exact URL.
-
AuthorPosts