Re: Purpose of Port 0.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In message <SG2PR06MB071061291C3DC252AA62FCB2C15E0@xxxxxxxxxxxxxxxxxxxxxxxxxxx.
outlook.com>, Danny Niu writes:
> Questions:
> Is "Berkerly Sockets API"  defined seperately from the BSD manpages? Or
> is it just sections of the BSD manpages? What happened to "Berkerly
> Sockets API"?
>
> Proposal:
> Folks at POSIX are a bit unwilling to dis-certify some allegedly existing
> systems, and think it'd be better IETF note the purpose of port 0, so
> that existing app/sys woudn't break.
> So is it too soon to start drafting?

Well UDP source port 0 means don't reply (RFC 768).   It's for uni
directional streams.

As for 0 to select a ephemeral port that is a BSD sockets convention.
That isn't something the IETF should specify.

Mark


> ________________________________________
> From: joel jaeggli <joelja@xxxxxxxxx>
> Sent: Monday, February 20, 2017 16:53
> To: Danny Niu; ietf@xxxxxxxx
> Subject: Re: Purpose of Port 0.
> 
> On 2/20/17 12:30 AM, Danny Niu wrote:
> > Hi, all.
> >
> > Recently on the POSIX mailing list, there's a discussion on the
> > correct way to bind to (or listen on) an ephemeral port. While I
> > referenced the "UNIX Network Programming", we're not quite satisfied
> > because even though it's co-written by someone involved in IETF, it's
> > still JUST a textbook.
> >
> > The canonical way to do this, according to some (from
> > stackoverflow.com, and other places), is to bind to port 0, which I
> > assume had been reserved for this purpose, but I haven't find
> > anything to back this up yet.
> >
> > On the POSIX list, they suggested that IETF should, (or should have
> > already) state(d) that port 0 be reserved for binding to ephemeral
> > ports. So can we find any reference for this? Or should we draft an
> > RFC?
> 
> The original convention is from berkeley sockets api, so it's been that
> way since 1983 or so. it would predate therefore ieee 1003 by some
> years. I would. suspect that Postel et al were well aware that it was
> employed by that convention when it was noted as reserved in rfc 1340/1700.
> 
> > Thanks.
> >
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: marka@xxxxxxx




[Index of Archives]     [IETF Annoucements]     [IETF]     [IP Storage]     [Yosemite News]     [Linux SCTP]     [Linux Newbies]     [Fedora Users]