Shop OBEX P1 Docs P2 Docs Learn Events
Binding the same port number on different interfaces — Parallax Forums

Binding the same port number on different interfaces

viiiijviiiij Posts: 1
edited 2009-07-29 07:10 in Propeller 1
Hi,

We can use the same port number for two applications based on protocols.(i.e one application is based on TCP and the other application based on UDP).

But i don't know about interfaces, can anyone one help........

1) Can we use same port number for different applications on a single interface.

2) Can we use same port number for different applications on different interfaces(interfaces have separate ip address).


Consider that same port number can be used on different applications, then won,t it be a problem in receiving the packets.

Applications using UDP protocol.

1) Application 1 is binded to the port number 1500 and ip address of an interface.(Transfer the packet through the selected interface).

2) Application 2 is binded to the port number 1500 and ip address is 0.0.0.0

Now, inorder to transfer the packet of Application 2 an interface has to be selected based on destination's ip address.

If application 2 want's to transfer packets with different destination ip adresses, then different interfaces will be selected for different interfaces.(so application 2 may transfer packet through any one of the available interface and where as application 1 will transfer through the specific interface).

--->After receiving the packet, how should i select the socket of application 1 and application 2.

Problem is both sockets are binded to same port number and interface on which application 2 is transferring the packets are not fixed.

Comments

  • BradCBradC Posts: 2,601
    edited 2009-07-29 07:10
    -EMOREINFO

    Given this is your first post, you are obviously new here.. Which IP stack are you using? For interest, which PHY are you using?

    If this is a Windows programming question you are _way_ in the wrong place. Even if you were in the right place, the lack of information enabling anyone to try and assist you is absolutely astounding.

    Allow me to point you at a quick read that might help you learn to formulate questions in a fashion that is more conducive to receiving an answer ..
    catb.org/~esr/faqs/smart-questions.html

    If your question happens to be related to using an IP stack on the Parallax Propeller microprocessor then by all means, clarify your question a little further and help us to help you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <This space for rent>
Sign In or Register to comment.