Can directly send/recieve UDP Packets?

Home Forums Discussions Support Can directly send/recieve UDP Packets?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #5174
    omers
    Participant

      Hi,

      I have some logical problem with winpk filter driver. I’m working on a simple url filter system. When http request try to going out from mstcp, sw checking http headers and requested url. If url is blocked? packet’s marked in my own marking table. When http response recieved from related server, sw checks marked packets and if packet matched, recieved data changed to blocked message. This is basic live cycle of my sw.

      But, my blacklist in other machine at same network. When I try to lookup requested url in my blacklist with UDP queries, I have to hang GET packet on air until UDP answer recieved from server.. Because all of the network traffics pass from same adapter. 🙂

      Mode.dwFlags = MSTCP_FLAG_SENT_TUNNEL|MSTCP_FLAG_RECV_TUNNEL;

      Can UDP packets pass without entering winpk filter?

      #6550
      Vadim Smirnov
      Keymaster

        Can UDP packets pass without entering winpk filter?

        No, unless you have loaded a filter to pass UDP packets without user-mode processing.

        #6551
        omers
        Participant

          Him… Could you give me simple UDP pass example?

          thanks

          #6552
          Vadim Smirnov
          Keymaster

            Loading the following filter will force all UDP packets to pass without processing in user mode, all other packets will be redirected for processing to user mode.

            // Common values
            pFilters->m_StaticFilters[0].m_Adapter.QuadPart = 0; // applied to all adapters
            pFilters->m_StaticFilters[0].m_ValidFields = NETWORK_LAYER_VALID;
            pFilters->m_StaticFilters[0].m_FilterAction = FILTER_PACKET_PASS;
            pFilters->m_StaticFilters[0].m_dwDirectionFlags = PACKET_FLAG_ON_SEND | PACKET_FLAG_ON_RECEIVE;

            // Network layer filter
            pFilters->m_StaticFilters[0].m_NetworkFilter.m_dwUnionSelector = IPV4;
            pFilters->m_StaticFilters[0].m_NetworkFilter.m_IPv4.m_ValidFields = IP_V4_FILTER_PROTOCOL;
            pFilters->m_StaticFilters[0].m_NetworkFilter.m_IPv4.m_Protocol = IPPROTO_UDP;

            Refer “filter” sample for the general filters usage.

            #6553
            omers
            Participant

              Thanks for your reply. I solved my problem 😉 I converted this rule to my delphi project. Now it works!

              Thank you serpentfly, thank you NT Kernel! 8)

            Viewing 5 posts - 1 through 5 (of 5 total)
            • You must be logged in to reply to this topic.