Vadim Smirnov

Forum Replies Created

Viewing 15 posts - 1,036 through 1,050 (of 1,486 total)
  • Author
    Posts
  • in reply to: TDI driver filter #6439
    Vadim Smirnov
    Keymaster

      Ха, сделали пустышку что ли? которая по сути изменяет поле аттач, по которому как я понял и определячется, есть ли кто то присоединенный к стеку в висте.

      Максимальный эффект при минимуме изменений в оттестированной кодовой базе. 8)

      Вообще патч мажоров более универсальный способ, так как драйвер по сути можно загрузить в любой момент, никаких тебе проблем с нехваткой stack locations и жесткого порядка загрузки.

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

        В общем-то тестовый вариант готов. Пошли обходным путем, приататчили девайсы к стеку (что заставляет систему вести трафик через TDI), но архитектуру (патч мажоров) менять не стали.

        Думаю в понедельник можно будет посмотреть.

        in reply to: BSOD in afd!AfdBReceiveEventHandler #6452
        Vadim Smirnov
        Keymaster

          So, my question is – before you get IRP_MJ_CLEANUP on a file object, does the upper client cleans all handlers passed via TDI_SET_EVENT_HANDLER, by calling you via TDI_SET_EVENT_HANDLER with NULL parameters, for the SAME file object?

          Basically this depends from TDI client. In your case you have to check AFD behavior if you suspect it causing the crash. Though the exact reason can be figured out only from the crash dump…

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

            Тогда собственно новый вопрос, можете ли это сделать? Поддрежку висты. Если это возможно то мы купим этот драйвер. Можно канечно самим это сделать, но всеже в чужих сорцах копаться не очень хочется.

            Мы тут посоветуемся с товарищами, если получится сделать это быстро и безболезненно, то сделаем.

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

              Ну в общем все верно, первым делом всегда нужно смотреть что проходит по сети, а потом уже строить предположения 8)

              Не смотрел те обертки, но в принципе почему бы и нет. Другое дело, что чужие баги ловить бывает намного сложнее чем свои…

              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)

                                Viewing 15 posts - 1,036 through 1,050 (of 1,486 total)