tcp src port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
I am not sure this question is right on this ML,
so if not please excuse me.

Is there a way (system call or other) to ask the OS
for a free TCP port in order to open a TCP connection with src port
the port returned from the previous system call?
So what I need to do is:

#1- ask the OS for a free TCP port
#2- bind a socket with this port as source port
#3- connect to the remote server with src port = port from #1

Thank you very much,
-- 
Antonio Mancuso
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux