Loading ...
Sorry, an error occurred while loading the content.
 

RE: [libertybasic] get ip address

Expand Messages
  • Stefan Pendl
    ... The code cycles through the list of available IP-addresses and prints out those it finds. What kind of device do you use to connect to the Internet? For a
    Message 1 of 24 , Nov 4, 2010
      >
      > Hi Stefan,
      >
      > Not a bit better. Still only this:
      >
      > 192.168.1.34
      >
      >
      > But where in your code is the second 'print ...'?
      >

      The code cycles through the list of available IP-addresses and prints out those it finds.

      What kind of device do you use to connect to the Internet?

      For a router, you will not get the external address, since it is only known by the router.

      I get the IP-address of my thumb-drive modem, since it is directly connected to the system.

      ---
      Stefan Pendl
      http://stefanpendl.runbasichosting.com/

      Liberty BASIC 4.04 Pro ... http://www.libertybasic.com/assist.html
      Liberty BASIC 4.04 ....... http://www.libertybasic.com/lb404setup.exe

      Liberty BASIC Bug Tracker ... http://libertybasicbugs.wikispaces.com/

      Books at http://www.lulu.com/ and http://www.amazon.com/
      Alyce Watson ... APIs for Liberty BASIC
      Carl Gundel .... Beginning Programming with Liberty BASIC

      Windows 7 Home Premium 64-bit RTM
      AMD Turion X2 RM-70 2GHz, 4GB RAM
    • stefanhes
      I use a ZyXEL prestige 2000 (modem/router, adsl)
      Message 2 of 24 , Nov 4, 2010
        I use a ZyXEL prestige 2000 (modem/router, adsl)

        --- In libertybasic@yahoogroups.com, "Stefan Pendl" <pendl2megabit@...> wrote:
        >
        > >
        > > Hi Stefan,
        > >
        > > Not a bit better. Still only this:
        > >
        > > 192.168.1.34
        > >
        > >
        > > But where in your code is the second 'print ...'?
        > >
        >
        > The code cycles through the list of available IP-addresses and prints out those it finds.
        >
        > What kind of device do you use to connect to the Internet?
        >
        > For a router, you will not get the external address, since it is only known by the router.
        >
        > I get the IP-address of my thumb-drive modem, since it is directly connected to the system.
        >
        > ---
        > Stefan Pendl
        > http://stefanpendl.runbasichosting.com/
        >
        > Liberty BASIC 4.04 Pro ... http://www.libertybasic.com/assist.html
        > Liberty BASIC 4.04 ....... http://www.libertybasic.com/lb404setup.exe
        >
        > Liberty BASIC Bug Tracker ... http://libertybasicbugs.wikispaces.com/
        >
        > Books at http://www.lulu.com/ and http://www.amazon.com/
        > Alyce Watson ... APIs for Liberty BASIC
        > Carl Gundel .... Beginning Programming with Liberty BASIC
        >
        > Windows 7 Home Premium 64-bit RTM
        > AMD Turion X2 RM-70 2GHz, 4GB RAM
        >
      • Stefan Pendl
        ... According to some Google results this is a WLAN rooter. You are either connected via WLAN or a network cable connection to the rooter. This results in
        Message 3 of 24 , Nov 5, 2010
          >
          > I use a ZyXEL prestige 2000 (modem/router, adsl)
          >

          According to some Google results this is a WLAN rooter.

          You are either connected via WLAN or a network cable connection to the rooter.
          This results in being only able to get the local address, which is the one of the network adapter or the WLAN adapter.

          You can only get the external IP, if the device is directly connected to the system and acts like a network adapter, if it is
          connected to a network adapter, you are not able to retrieve the external IP with the posted example.

          You will have to query a web-service in this case as the other example shows.

          ---
          Stefan Pendl
          http://stefanpendl.runbasichosting.com/

          Liberty BASIC 4.04 Pro ... http://www.libertybasic.com/assist.html
          Liberty BASIC 4.04 ....... http://www.libertybasic.com/lb404setup.exe

          Liberty BASIC Bug Tracker ... http://libertybasicbugs.wikispaces.com/

          Books at http://www.lulu.com/ and http://www.amazon.com/
          Alyce Watson ... APIs for Liberty BASIC
          Carl Gundel .... Beginning Programming with Liberty BASIC

          Windows 7 Home Premium 64-bit RTM
          AMD Turion X2 RM-70 2GHz, 4GB RAM
        • Robert Lawson
          ipconfig | more Stephan? I ve always found that the info from ipconfig/all will suffice for most problems and completes a whole lot quicker :S [Non-text
          Message 4 of 24 , Nov 5, 2010
            ipconfig | more Stephan? I've always found that the info from ipconfig/all
            will suffice for most problems and completes a whole lot quicker :S


            [Non-text portions of this message have been removed]
          • Stefan Pendl
            ... ipconfig /all displays more than the bare minimum of information. ipconfig | more displays the bare minimum stopping after each page, which is useful
            Message 5 of 24 , Nov 5, 2010
              >
              > ipconfig | more Stephan? I've always found that the info from
              > ipconfig/all
              > will suffice for most problems and completes a whole lot quicker :S
              >

              "ipconfig /all" displays more than the bare minimum of information.

              "ipconfig | more" displays the bare minimum stopping after each page, which is useful if you run Vista and above, since there are
              numerous ip4 to ip6 virtual adapters listed and the information you are interested is on page one.

              Notice, that the argument /all is separated from the command ipconfig by a space.

              To get a list of all arguments use "ipconfig /?".

              ---
              Stefan Pendl
              http://stefanpendl.runbasichosting.com/

              Liberty BASIC 4.04 Pro ... http://www.libertybasic.com/assist.html
              Liberty BASIC 4.04 ....... http://www.libertybasic.com/lb404setup.exe

              Liberty BASIC Bug Tracker ... http://libertybasicbugs.wikispaces.com/

              Books at http://www.lulu.com/ and http://www.amazon.com/
              Alyce Watson ... APIs for Liberty BASIC
              Carl Gundel .... Beginning Programming with Liberty BASIC

              Windows 7 Home Premium 64-bit RTM
              AMD Turion X2 RM-70 2GHz, 4GB RAM
            • Robert Lawson
              ipconfig | more displays the bare minimum stopping after each page Ah, I was intrigued, it s just one I ve never come across :S ty :) To get a list of all
              Message 6 of 24 , Nov 5, 2010
                ""ipconfig | more" displays the bare minimum stopping after each page"

                Ah, I was intrigued, it's just one I've never come across :S ty :)

                "To get a list of all arguments use "ipconfig /?"."

                Like any other dos command you want help with you mean?

                "Notice, that the argument /all is separated from the command ipconfig by a
                space."

                yes, my bad, oddly it's natural when working with the command prompt, always
                neglected in e-mails and chats :S I'll learn one day that just that space
                can save a whole lotta typing :)


                [Non-text portions of this message have been removed]
              • Stefan Pendl
                ... You use the more command to display a files content page-wise, but you can use it to display the output of any command page-wise too, by using the pipe
                Message 7 of 24 , Nov 6, 2010
                  >
                  > ""ipconfig | more" displays the bare minimum stopping after each page"
                  >
                  > Ah, I was intrigued, it's just one I've never come across :S ty :)
                  >

                  You use the "more" command to display a files content page-wise, but you can use it to display the output of any command page-wise
                  too, by using the pipe (|).

                  ---
                  Stefan Pendl
                  http://stefanpendl.runbasichosting.com/

                  Liberty BASIC 4.04 Pro ... http://www.libertybasic.com/assist.html
                  Liberty BASIC 4.04 ....... http://www.libertybasic.com/lb404setup.exe

                  Liberty BASIC Bug Tracker ... http://libertybasicbugs.wikispaces.com/

                  Books at http://www.lulu.com/ and http://www.amazon.com/
                  Alyce Watson ... APIs for Liberty BASIC
                  Carl Gundel .... Beginning Programming with Liberty BASIC

                  Windows 7 Home Premium 64-bit RTM
                  AMD Turion X2 RM-70 2GHz, 4GB RAM
                Your message has been successfully submitted and would be delivered to recipients shortly.