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. >
Attachment:
signature.asc
Description: OpenPGP digital signature