Advertisement

06.21.2008 at 09:34AM PDT, ID: 23504732
[x]
Attachment Details

Linux: get socket source port used after connect()

Asked by rocketsbay in Linux Programming

Tags: C

Hello, in Linux, how can I get the source port used by a socket after making a call to the connect system call? I want to save the source port used for later use.
Alternatively, how can I find out which source ports are not used, then I could just make a call to bind with that source port.

thanksStart Free Trial
[+][-]06.21.2008 at 06:56PM PDT, ID: 21839437

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Linux Programming
Tags: C
Sign Up Now!
Solution Provided By: duncan_roe
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628