destination port changes every time



*Hi,
I wrote a client/server programs, the server listen on port 5000 and
of course the client connected on that port , I check the communication via
the sniffex.c program from pcap (adapting something) , I noticed that
destination port ( used by the client) is not always the same and
completely different from the source port.
Here is an output example:

Device: lo Filter expression: ip
Packet number 1:
From: 127.0.0.1
To: 127.0.0.1
Protocol: TCP ---->The client send a request
Src port: 49611 ---->The port is randomly choosed by
the client ??
Dst port: 5000

Packet number 2:
From: 127.0.0.1
To: 127.0.0.1
Protocol: TCP -----------> The answer from the server
Src port: 5000
Dst port: 49611

When I stopped the client and ran it again I got another Src port from the
client
The question is : why the port opened by the client is not the same, and
takes one randomly ??

thanks for help








*


Relevant Pages

  • Re: thin client com ports
    ... I'm glad that you got at least one more client working! ... MCSE, CCEA, Microsoft MVP - Terminal Server ... the COM port settings? ... I am testing several thin clients. ...
    (microsoft.public.windows.terminal_services)
  • Re: network installation manager
    ... there is a firewall between master and client machines, ... NIM Communication within a Firewall Environment ... master via nimclient calls to the nimesis daemon. ... reserved port range of 1023-513. ...
    (comp.unix.aix)
  • help: using smtp.gmail.com as SMART_HOST
    ... with my Google gmail address. ... is pop.gmail.com, using port 995. ... Retrieving mail is not the problem since my Google searches ... client, I believe the term is) to send my mail to Google's ...
    (comp.mail.sendmail)
  • Re: Unable to print to networked printer - get access denied messa
    ... Check the permissions on the server assuming the client has a true RPC ... How is the Standard TCP/IP port configured for the device? ...
    (microsoft.public.windowsxp.print_fax)
  • Re: Why encapsulate state pattern......
    ... >>>without changing the interface nor the object's identity. ... >> closing an already closed port. ... is that the client has to track a rule that says old states need to be ... is open, in order to send data, so it needs to know that open, opens ...
    (comp.object)