Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to get the gateway?
Forum Updated to NodeBB v4.3 + New Features

How to get the gateway?

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 922 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    victor wang
    wrote on last edited by A Former User
    #1

    Hi, i'm using Qt5.5 on my computer.
    I'm trying to get the gateway and ping it on my test program.
    But i can't find any class that could do what i want.
    Does anyone get any advice?

    Please help!

    A 1 Reply Last reply
    0
    • V victor wang

      Hi, i'm using Qt5.5 on my computer.
      I'm trying to get the gateway and ping it on my test program.
      But i can't find any class that could do what i want.
      Does anyone get any advice?

      Please help!

      A Offline
      A Offline
      ambershark
      wrote on last edited by
      #2

      @victor-wang There isn't an easy way to get it with Qt. You'll have to do it on each platform you need to support with native c++ code.

      You can be lazy and shell out to exes on each platform to get the information but it's best if you actually do it with code rather than using a console app. ifconfig or ip on posix OSes, and ipconfig /all on windows. You would still need to parse the results and such so it's probably better to just write the code to do it. :)

      A quick google search will net you plenty of examples on each platform I'm sure. On Windows it's like GetAdapterInfo() or something like that. Linux and OSX are super easy too.

      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

      1 Reply Last reply
      2

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved