> On TCPActiveOpen I am suppose to know the
> remote TCP port. How do I find this?
> I set the ports to zero when setting up the stream
> or using Passive open so that TCP will just sign
> an unused port.
Ports for well-known internet services generally have standard numbersQuote:> But when using active open I need to know the
> port of the remote host. How do I find this?
assigned to them (e.g., FTP is 21, POP is 110, etc.). If you have access
to a UNIX workstation, you may be able to find a list of these numbers in
/etc/services. If not, you can probably find it in one of the RFCs.
Here's a partial list of the ports from my local /etc/services; note that
although most server implementations will use these ports, there's no
requirement that they do. The easiest way to confirm the port is to
telnet into the standard port number for the service you want, and see
what kind of greeting you get. Of course, if you're using a non-standard
service, or some kind of custom protocol, you'll need to talk to the
# Network services, Internet style
discard 9/tcp sink null
discard 9/udp sink null
systat 11/tcp users
chargen 19/tcp ttytst source
chargen 19/udp ttytst source
smtp 25/tcp mail
time 37/tcp timserver
time 37/udp timserver
name 42/udp nameserver
whois 43/tcp nicname # usually to sri-nic
hostnames 101/tcp hostname # usually to sri-nic
sunrpc 111/udp rpcbind
pop-2 109/tcp # Post Office
pop 110/tcp # Post Office
nntp 119/tcp usenet # Network News Transfer
ntp 123/tcp # Network Time Protocol
Hope this helps.
David Walton | Graduate Student and Macintosh pundit
http://www.nd.edu/~dwalton1 | University of Notre Dame
"Beware the advice of successful people; they do not seek company."