DELPHI PACKET MANIPLATION AND ROUTING

Home Forums Discussions Support DELPHI PACKET MANIPLATION AND ROUTING

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #5250
    okayoktas
    Participant

      I m trying wireless hotspot software by Delphi 7.
      2 ethernet on my source pc
      first ethernet accept incoming connection and control user aceess finaly redirect to second ethernet (internet connection).
      I am not redirect to ippacket to second connection can you help me please.

      #6729
      Vadim Smirnov
      Keymaster

        You can turn on routing on Windows system and it will route the packet without additional efforts from your side.

        You have only to make user authentication on the internal interface and NAT on the eternal (if necessary).

        Refer Internet Gateway sample for the details about NAT. Install script for this sample also turns on routing (NSIS script function):

        Function EnableRouter
        SetRebootFlag true
        ${If} ${IsNT}
        WriteRegDWORD HKEY_LOCAL_MACHINE SYSTEMCurrentControlSetServicesTcpipParameters IPEnableRouter 1
        ${Else}
        WriteRegDWORD HKEY_LOCAL_MACHINE SYSTEMCurrentControlSetServicesVxDMstcp EnableRouting 1
        WriteRegDWORD HKEY_LOCAL_MACHINE SYSTEMCurrentControlSetServicesVxDMstcp IPEnableRouter 1
        ${EndIf}
        FunctionEnd
        #6730
        okayoktas
        Participant

          pLEASE SEND ME SAMPLE CODE BLOCK I AM NOT UNDERSTAND.

          #6731
          Vadim Smirnov
          Keymaster

            Explain what you don’t understand, otherwise it is difficult to advise…

            #6732
            okayoktas
            Participant

              Ok your code is registry key maniplation isn`t it.
              I want internet connection sharing in my application. I will controling and routing ip packet.
              Firt step is : Users connect to my server application port 80,
              after I will accesbility controling on my database
              after the users ip packet routing or redirect sharing network connection.

              Now ndisapi.dll is controling and generate ip packet. isn`t it.
              Can I generate routing table with ndisapi.dll like hardware router?

              Thank you…

              #6733
              Vadim Smirnov
              Keymaster

                Of course you can implement the routing by yourself. You can read packet from one interface, check/modify and forward to another using NDISAPI interface. You have to support you own routing table and etc.. to implement this properly. IHMO it is doable, but there is easier way…

                Personally I prefer to let the MSTCP to do the routing work like it is done in Internet Gateway advanced sample http://www.ntkernel.com/w&p.php?id=31. This is very similar to what you need but the routing operation is performed by MSTCP, so probably it should help you to start.

                #6734
                okayoktas
                Participant

                  is Internet Gateway sample using ndisapi dll. isnt it.
                  Yes this sample (Internet Gateway) like ı want.
                  But I was not found “Internet Gateway ” delphi source code. Do you have ?
                  I have a Passthru delphi sample but this sample is not Internet Gateway application.
                  What is this Passthru.

                  How can I using MSTCP in my application and Can ı take more info MSTCP?

                  Thank you…

                  #6735
                  Vadim Smirnov
                  Keymaster

                    Internet Gateway is only available in C++.

                    PassThru is basic packet filtering sample.

                    Under MSTCP I mean Microsoft TCP/IP stack implementation. You don’t have to use it from your application, but you can use its default behavior to solve the routing task.

                    #6736
                    okayoktas
                    Participant

                      How can ı use.
                      İs Winsock and Winsock2 Api MSTP function?

                      #6737
                      Vadim Smirnov
                      Keymaster

                        Under “using MSTCP default behavior” I mean that you may modify incoming/outgoing packets and let TCP/IP route them. Like in case of NAT, WIndows TCP/IP stack by default routes packets coming from LAN into default gateway interface (connected to the Internet). To implement NAT you can only capture packets from external (Internet connected) network interface:
                        – For outgoing packets change source IP address to Internet interface assigned one and port allocated/according NAT table
                        -For incoming packets change destination IP/port according NAT table

                        This way you use Microsoft TCP/IP routing and don’t have to implement it on your own.

                        Is that clear now?

                        #6738
                        okayoktas
                        Participant

                          Thanks
                          🙁 I am clear now.
                          I am not blind. just I want to learning which code or function catch ip packet. İn delphi…

                          Thank for all posted message. Please you dont get angry to me…..

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