• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 280
  • Last Modified:

How To Find TCP Info?

I need to get the following at runtime:

      This machine's IP address
      TCP subnet mask
      List of DNS servers
      Domain name
      Network gateway IP address

I know all of this exists in the TCP control panel, but am wondering the "standard" way to get it.  As a side note, I am using PP.  I don't know if PP has a class that gives direct access to this info?  In any event, I need either a PP solution or a non-PP one that I will code into my PP application.

Thanks
0
staggart
Asked:
staggart
  • 5
  • 4
1 Solution
 
roovCommented:
and for extra credit, how would you check if the modem has an open connection?
0
 
staggartAuthor Commented:
????
0
 
roovCommented:
I meant, that while the question is answered, another very interesting aspect is how to detemine whether the network is available.
Simply trying to connect and failing is not good enough since MacTCP might try to connect using the modem, which might not be the desired behviour.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
staggartAuthor Commented:
Go to:

http://developer.apple.com/technotes/tn/tn1119.html

It will answer your question.

0
 
roovCommented:
Thanks.
Actually, it was <http://developer.apple.com/technotes/tn/tn1145.html> which seems to also have the answer to your questions - it says the following:
"...Network Setup library (introduced with Mac OS 8.5) to read the TCP/IP preferences..."

Go there , and may the force be with you...
0
 
staggartAuthor Commented:
Not acceptable - I can't rely on 8.5 being available to all my users.

Thanks anyway.

0
 
staggartAuthor Commented:
Actually, I have figured out how to get everything except the list of DNS servers.  This stuff seems to be buried somewhere.  I can get the primary DNS, but the secondary, et. al. never show up.
0
 
roovCommented:
How early can you go? Is OS 8 reasonable? If so, the Network Services Library was available as "Subwoofer", and probably still is...
0
 
The_RavenCommented:
Is PP PowerPlant?

If so, CW Pro #4 has the classes you need to do this.  
0
 
staggartAuthor Commented:
This questions is over two months old!!!  If i had that much time to get answers to such questions, I would have a nice, slack job!  Unfortunatley, I don't, and I have already moved on to a different project (after figuring this out).

This just proves to me that the Mac really is dying - people don't even get around to reading, much less answering real-world questions.  At least not on ths forum.

Thanks, anyway.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now