On 23 Mar 2007, in the Usenet newsgroup comp.os.linux.networking, in article
<(E-Mail Removed). com>, dew wrote:
> Can anyone tell me whether the Source port(eg., 8080,etc) ,dest port
> are in decimal format.And how many bits does it take up.There can be
> 65535 ports.so 16 bits am i right?
It's a 16 bit number. How you represent 16 bits is up to you. Most
people speak in decimal, but the protocol represents it as a binary.
See the appropriate specification
0768 User Datagram Protocol. J. Postel. August 1980. (Format: TXT=5896
bytes) (Also STD0006) (Status: STANDARD)
0793 Transmission Control Protocol. J. Postel. September 1981.
(Format: TXT=172710 bytes) (Updated by RFC3168) (Also STD0007)
(Status: STANDARD)
Remember that any service _MIGHT_ use any port number. There exists a
number of "well-known" port numbers where you can expect to find a
service, but just because something is using port $FOO does NOT mean that
it must be service $BAR. See
http://www.iana.org/assignments/port-numbers
> Also, the tcp,ip,udp,other protocols have a protocol number.So, that
> is represented by how many bits?
See RFC0791 section 3.1 - or read your textbook. For a list of those
protocols see
http://www.iana.org/assignments/protocol-numbers
0791 Internet Protocol. J. Postel. September 1981. (Format: TXT=97779
bytes) (Obsoletes RFC0760) (Updated by RFC1349) (Also STD0005)
(Status: STANDARD)
You can find the RFCs using the search engine you are posting from.
Oh, and please stop posting the same article to multiple groups. You
are acting like a spammer when you do so.
Old guy