Bobillier Posted February 9, 2011 Report Share Posted February 9, 2011 Hi Is there simple way to get tcp/ip parameters (IP,Mask, DNS,WINS) ? I have try with netsh cmd, but it's a bit confuse for me. Eric Quote Link to comment
ShaunR Posted February 9, 2011 Report Share Posted February 9, 2011 Hi Is there simple way to get tcp/ip parameters (IP,Mask, DNS,WINS) ? I have try with netsh cmd, but it's a bit confuse for me. Eric Simple? Define simple The IP address you can get using the function in the palette. The others (including the IP) you will find in the registry under "SOFTWARE\MICROSOFT\WINDOWS NT\CURRENTVERSION\NetworkCards". However the "proper" way is to call WSAIOctl with the SIO_GET_INTERFACE_LIST flag or it's .NET equivalent. (there's probably a WMI equivalent too). Quote Link to comment
Phillip Brooks Posted February 9, 2011 Report Share Posted February 9, 2011 I posted this .NET example a while back on the dark side. To get the DNS info, you would need to modify it and extract the IPInterfaceProperties.DNSAddresses collection, then iterate over that (getenumerator, movenext, current) Quote Link to comment
dannyt Posted February 9, 2011 Report Share Posted February 9, 2011 Hi, We use run an ipconfig /all from the a system exec and parse out all the information we need from there. Dannyt Quote Link to comment
Bobillier Posted February 9, 2011 Author Report Share Posted February 9, 2011 Hi, We use run an ipconfig /all from the a system exec and parse out all the information we need from there. Dannyt Yes it's near netsh commands, but difficult to parse because langage and perhapse os sensitive. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.