LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to specify source IP address when opening TCP connection?

Hi ! 

We are building a system in which a server communicates with a multi-homed Linux client with three network interfaces.  All interfaces are routable to the server, but the server only accepts connections from one of those interfaces.

 

We need the server to specify different local source addresses for each client but the Open_TCP_Connection vi does not provide the capability to specify the local source address.  Is there a way in LabVIEW open a TCP client connection and specify the source address?

 

Thanks,

-John

0 Kudos
Message 1 of 4
(3,059 Views)

I don't have a good picture in my head of what you're trying, but might the "TCP Create Listener Function" help?

https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/functions/tcp-create-listener.html

 

Example: TCP Communicator - Passive.vi

0 Kudos
Message 2 of 4
(3,024 Views)

Yes, we thought about that, but wouldn't Create_Listener require the client to open the connection?  We would like to the server to initiate the connection; just wish there was a way to wire the source address to the vi.

0 Kudos
Message 3 of 4
(2,998 Views)

What you are describing would mean that your server machine is creating client to communicate with another server. Client never accept a connection. They alwasy connect to a server.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 4 of 4
(2,974 Views)