On Tue, May 06, 2003 at 11:52:55AM +0530, Sriram Neelakanta Subramoney wrote: > How to dynamically get a free TCP/UDP port that can be used at the > client's end when connecting to a server[@ a pre-defined destination > port] over socket. Is there any call available for this??. You should probably be re-examining your design if you want to initiate tcp/ip sessions from within the kernel. This is a horrible design -- you should be writing these applications using the system call interface. (That is why the system calls exist!) In userspace, you would use connect() for this task -- and so, if you're intent on making your sessions from within the kernel, start by looking for sys_connect(). When you find it, figure out what isn't needed because your call is coming from kernelspace, not userspace, and re-implement the important bits that you can't just call. Best of luck. -- "The Constitution of the United States is the law for rulers and people, equally in war and peace, and covers with the shield of its protection all classes of men, at all times, and under all circumstances." -- David Davis
Attachment:
pgp00392.pgp
Description: PGP signature