Vadim Smirnov

Forum Replies Created

Viewing 15 posts - 1,051 through 1,065 (of 1,496 total)
  • Author
    Posts
  • in reply to: About "500 packets in current version" #6450
    Vadim Smirnov
    Keymaster

      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…)

      in reply to: About "500 packets in current version" #6447
      Vadim Smirnov
      Keymaster

        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.

        in reply to: TDI driver filter #6433
        Vadim Smirnov
        Keymaster

          Гм, полез смотреть, и правда, при использовании IoAttachDeviceXXX обратная совместимость с TDI-фильтрами по видимому сохраняется. Так что беру свое утверждение обратно. 8)

          Другое дело, что если переносить LNM под Висту, то придется переделать его с патча мажоров на аттач к устройству. Разница невеликая конечно, но все же…

          in reply to: [eng][rus] ClientEventReceive problems #6443
          Vadim Smirnov
          Keymaster

            TDI_EVENT_DISCONNECT посылается, когда user-mode прога просит disconnect. Но до TDI_EVENT_DISCONNECT, должно быть несколько TDI_EVENT_RECEIVE, а ведь их вызывает драйвер TDI-протокола. Но почему тогда один раз?

            А что собственно видит сетевой сниффер? Два дампа для сравнения в студию, один с сети, другой с клиента. И кстати ClientEventChainedReceive, ClientEventReceiveExpedited, ClientEventChainedReceiveExpedited пошли лесом? С каким статусом обработался ClientEventReceive?

            А вообще, гадать по чему не работает код, которого ты никогда в жизни не видел можно долго… Советую поискать в сети что-то вроде оберток в виде сокетов или вспоиогательных функций вокруг TDI (от PCAUSA например, или те что в DriverStudio). TDI клиента написать это не пару функций вызвать, в свое время мне пришлось изрядно повозиться…

            in reply to: [eng][rus] ClientEventReceive problems #6441
            Vadim Smirnov
            Keymaster

              TDI клиентов писать не так уж просто, так что ошибка в драйвере – самое вероятное. Какая, это разбираться надо…

              in reply to: TDI driver filter #6431
              Vadim Smirnov
              Keymaster

                ЗЫ: вроде же в висте остался ТДИ уровень, да и фильтры там работают как нада. Если только аттач делать а не хук мажорных функций.

                Отсался он там для обратной совместимости, но теперь через него не идет весь трафик.

                in reply to: winpkflt can’t filter using winpcap library? #6429
                Vadim Smirnov
                Keymaster

                  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).

                  in reply to: winpkflt can’t filter using winpcap library? #6427
                  Vadim Smirnov
                  Keymaster

                    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).

                    in reply to: TCP/IP Hook – Traffic observing for all IP’s #6398
                    Vadim Smirnov
                    Keymaster

                      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.

                      in reply to: NDISRD rules #6422
                      Vadim Smirnov
                      Keymaster

                        А не планируются ли какие правила для NDISRD ? Гонять каждый пакет в юзермоду слишком накладно получается

                        В принципе ничего сложного нет, в течении дня можно сделать, если на уровне протокол/адрес/порт. Правда не уверен насколько это будет востребовано. Были случаи когда просили что-то подобное для кастом сборки, например когда нужно было ловить только SYN пакеты. Насколько кому-то нужны универсальные фильтры сказать сложно, но над возможностью реализации подумаю. 8)

                        in reply to: NDIS + TDI #6421
                        Vadim Smirnov
                        Keymaster

                          Собственно вот какой вопросец, в каком месте нужно получать ПИД процесса, который послал запрос на коннект, что бы при первом же поступлении этого пакета в WinPkFilter можно его отбросить или пропустить. Например я думаю если это сделать в комплит роутине на коннект, то NDIS филттру нечем будет руководствоваться при запросе или разрешении ПЕРВОГО пакета, т.к. такой инфы еще не будет.

                          Можно в запросе на коннет например…

                          Когда делаю IoCallDriver с параметром TDI_QUERY_ADDRESS_INFO, то возвращается ошибка STATUS_CANCELLED ((NTSTATUS)0xC0000120L)
                          В чем тут проблема то?

                          Судя по статусу IRP отменили… Может не на тот обьект был запрос?

                          in reply to: listadapters.exe doesnt work… #6420
                          Vadim Smirnov
                          Keymaster

                            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.

                            in reply to: listadapters.exe doesnt work… #6418
                            Vadim Smirnov
                            Keymaster

                              What operating system do you have? Have you rebooted after installation?

                              in reply to: IP-Adress Redirect? #6415
                              Vadim Smirnov
                              Keymaster

                                How can i modify the destination MAC?

                                MAC header is right before IP header.

                                in reply to: IP-Adress Redirect? #6413
                                Vadim Smirnov
                                Keymaster

                                  That depends from proxy, if it is HTTP proxy there is no problem since HTTP GET request contains the exact URL.

                                Viewing 15 posts - 1,051 through 1,065 (of 1,496 total)