bind() ing to bound ports ...
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > bind() ing to bound ports ...




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    bind() ing to bound ports ...  
John Galt


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-23-04 10:36 PM

Hi folks ...

I have an application that needs to:
- receive UDP pkts on a specific port
- those UDP pkts must be coming from a specific server/port
(the port may be taken)

To test this app, I did the following:

- connected (via ssh) to the server; this set up a connection
like this:

1.1.1.1:1665 <--> 2.2.2.2:22

- started a server on 1.1.1.1:2000 to listen for
pkts from 2.2.2.2:22 (Note that the port 22 is deliberate,
I wanted to check if it would work this way.)

- started a client on 2.2.2.2 that sent pkts to the server
on 1.1.1.1:2000; the pkts were to be marked as coming from
port 22. But this failed - bind() gives "Permission Denied" -
I am guessing because my TCP ssh connection has already
taken that port.

My questions:
- If a port is bind()-ed over TCP, then will future UDP socket
bind() requests fail? If yes, then how does sshd work - i.e.
many clients can connect to port 22, don't all those outgoing
packets have port 22 as the source port?
- Is there another way to send out UDP datagrams to a given
IP:port such that the datagrams can "originate" from a port
that may already be taken up by another TCP or UDP server?

TIA,
John





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:29 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register