Login  
Search All Forums
Dart Home | Custom Development Reply | General Questions Topics | Forums   
AuthorForum: General Questions
Topic: Is it possible to get the information about network interface card (NIC)
rovicohen

From: New York, NY USA
Posts: 24
Member Since: 09/19/05
posted July 24, 2012 12:26 PM

Hello

We are using Dart.PowerTCP.Sockets.dll (ver 1.1.1.4).

We want to get the information regarding network interface card (NIC).

Like - how many network cards has on the computer and all the details of those cards.

So will Dart.PowerTCP.Sockets.dll (ver 1.1.1.4) get the details of network interface card(NIC)?

Please share your valuable advice.

thanks

Nick B (Admin)

From: Utica, NY USA
Posts: 567
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted July 24, 2012 3:19 PM

Hello,

This may be done with the .NET Framework:

foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces())
{
  IPInterfaceProperties ipProps = nic.GetIPProperties();
}
rovicohen

From: New York, NY USA
Posts: 24
Member Since: 09/19/05
posted July 25, 2012 9:06 AM

Hello,

Thanks for your suggestion.

We have got all the network interface card (NIC) names with their UnicastAddresses from Computer using your sample code.

Now one more questions.

If there are more than one NIC in the computer then how can we use or set any one of them for TCP/IP message sent on a network?

Basically we want to do that, we have a dropdown list where all the NIC will show. Now we can select any of the NIC from the dropdown list and force to set for TCP/IP message communication within a network.

Thanks once again
Nick B (Admin)

From: Utica, NY USA
Posts: 567
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted July 25, 2012 9:39 AM

Hello,

The Connect(string, int32, string, int32) method may be used to set the local binding address used.
rovicohen

From: New York, NY USA
Posts: 24
Member Since: 09/19/05
posted July 27, 2012 11:52 AM

Hello,

thanks for your suggestion.

But i need some more information Regarding (Network Interface Card)NIC.

Suppose we have two NICs on a computer. Both are connected on two different networks.

Now, Can we set a NIC between the two running NICs?

If we can set a NIC then our application can use the selected NIC for communicate with server.

Please help.

thanks
Nick B (Admin)

From: Utica, NY USA
Posts: 567
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted July 27, 2012 12:15 PM

Hello,

I'm sorry, I don't understand what you mean by "can we set a NIC between the two running NICs?", can you explain more?

You can specify the local binding address (from the available NIC addresses) to be used with the third and fourth arguments of the Connect(string, int32, string, int32) method.
rovicohen

From: New York, NY USA
Posts: 24
Member Since: 09/19/05
posted July 30, 2012 7:19 AM

Hello

Thank you once again.

Actually we have got one issue, regarding two Network Information Card (NIC) in a same computer.

We have explained some more details below,

Suppose computer1 has two NICs, named NIC1 and NIC2. NIC1 is connected with NetworkA and NIC2 is connected with NetworkB.

Our server application is on NetworkB.

Now our client application is on computer1. The client application starts to broadcast for getting the Server and by default client application use NIC1 (which is connected with NetworkA).

But actually the server application is on NetworkB.

So the client application cannot find the server application on NetworkA. If we manually disable the NIC1 (which is connected with NetworkA) then Client application can connect with server application using NIC2 (which is connected with NetworkB).

Now we want if more than one NIC in a computer and client cannot find the server then we will pick up all the NIC information and set all the NICs one by one for try to getting the server,

1st set the NIC1 and try, if failed then 2nd set the NIC2 and try.

We have got all the active NIC from computer and put into a list. But we cannot set or use a selected NIC for finding server.

So will it possible to set or use a selected NIC for getting the server?

Please share your valuable advice

thanks
Nick B (Admin)

From: Utica, NY USA
Posts: 567
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted July 30, 2012 9:16 AM

Hello,

Yes, use Connect(string, int32, string, int32):

Connect(Server_Hostname_Or_IP, Server_Port, NIC2_IP_Address, Local_Port) (I recommend that you use 0 for Local_Port to bind to the first available port (default behavior when local binding address is not specified))

The third argument may be the IP address of any local NIC. NIC1, NIC2, etc.
rovicohen

From: New York, NY USA
Posts: 24
Member Since: 09/19/05
posted July 30, 2012 10:32 AM

Hello,

We have tried using this Connect (Server_Hostname_Or_IP, Server_Port, NIC2_IP_Address, Local_Port).

But according our Client and server connection structure,

First of all client start broadcasting with udpClient (As Dart.PowerTCP.Sockets.Udp) using this 255.255.255.255 IP.

After response from server, Client get the Hostname or IP using udpClient_EndReceive().

Now we can easily use the Connect(_Hostname_Or_IP, Server_Port, NIC2_IP_Address, Local_Port).

But if the Client is start broadcasting on different network (like - NIC1) then It cannot find the server and do not get the Hostname or IP also.

We thing this is the actual issue. If we can set the (NIC2) for broadcasting then our client can easily find out the server and connect with the server also.

thanks.
Nick B (Admin)

From: Utica, NY USA
Posts: 567
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted July 30, 2012 10:49 AM

Hello,

Udp.Open(IPEndPoint) and Udp.Open(String, Int32) may be used to specify the local binding address for UDP. Specify NIC2's IP Address as the Udp.Open method's argument, and then you can broadcast on the network it is connected to.
rovicohen

From: New York, NY USA
Posts: 24
Member Since: 09/19/05
posted August 1, 2012 6:03 AM

Hello,

I have used Udp.Open(String, Int32)and Specify NIC2's IP Address as the Udp.Open method's argument.

But when Udp start broadcast using 255.255.255.255 IP.On udpClient_EndReceive() method, it gets the NIC2's Public IP not the Local IP(where the server is).

So, on the connect() method it getting error.

Please give us your valuable suggestion.

thanks
Nick B (Admin)

From: Utica, NY USA
Posts: 567
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted August 1, 2012 8:54 AM

Hello,

Would it be possible to send in a diagram of how your network is setup into support@dart.com? Is the server behind a router, on a different network, etc? The IP addresses (or example IP's) would also help.
rovicohen

From: New York, NY USA
Posts: 24
Member Since: 09/19/05
posted August 2, 2012 6:52 AM

Hello,

We have changed some part of our Network setup.
 
Our updated network diagram will send you shortly.

We have tried using same process, Udp.Open(String, Int32) and Specify NIC2's IP Address as the Udp.Open method's argument and start broadcast using 255.255.255.255 IP.

But now client does not receive any response from Server.

Please suggest us.

Thanks
Nick B (Admin)

From: Utica, NY USA
Posts: 567
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted August 3, 2012 2:21 PM

Hello,

We haven't received that diagram from you yet; has it been sent?
rovicohen

From: New York, NY USA
Posts: 24
Member Since: 09/19/05
posted August 8, 2012 7:59 AM

Hello

Still now, we haven't send you the network diagram yet.

Actually, we will made some changes on our network and test with Udp.Open(String, Int32) again.

After made some test, we will know you the status.

Thanks to you once again.
Reply | General Questions Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX