*BSD News Article 30450


Return to BSD News archive

Xref: sserve comp.os.386bsd.bugs:2218 comp.protocols.ppp:4136
Path: sserve!newshost.anu.edu.au!munnari.oz.au!bunyip.cc.uq.oz.au!harbinger.cc.monash.edu.au!msuinfo!agate!howland.reston.ans.net!nctuccca.edu.tw!news.cc.nctu.edu.tw!news.csie.nctu.edu.tw!yenchee
From: yenchee@csie.nctu.edu.tw (Yeng-Chee Su)
Newsgroups: comp.os.386bsd.bugs,comp.protocols.ppp
Subject: Re: priority queuing bug in *BSD ppp (if_ppp.c)
Followup-To: comp.os.386bsd.bugs,comp.protocols.ppp
Date: 13 May 1994 16:12:43 GMT
Organization: Dep. Computer Sci. & Information Eng., Chiao Tung Univ., Taiwan, R.O.C
Lines: 16
Message-ID: <2r08tr$d5r@news.csie.nctu.edu.tw>
References: <1994May7.004353.695@fasterix.frmug.fr.net> <1994May10.130723.28188@zen.void.oz.au> <2qqjq0$iim@newhub.xylogics.com> <1994May13.083740.13535@zen.void.oz.au>
NNTP-Posting-Host: yenchee@gopher.csie.nctu.edu.tw
X-Newsreader: TIN [version 1.2 PL2]

Simon J. Gerraty (sjg@zen.void.oz.au) wrote:
: I have no idea what ntohs(p >> 16) is trying to achieve btw :-)
  On big endian machine, p & 0xffff will get the destination port number.
p >> 16 will get the source port number.  On little endian machine, both
numbers should be changed on byte order and the source and the destination
will be exchanged too.  I am sure the correct patch should be ntohs(p >> 16).
By the way, the other patch can be applied on the p, which can be ntol when
the variable is set.

--
   ________________________________________________________________________
  /              National Chiao Tung University in Taiwan                 / \
 |  Name: Yeng-Chee Su                 Dept:  Computer Engineering       |__/
 |  Phone: +886-35-783513              E-mail: yenchee@csie.nctu.edu.tw  |
 |  Address: 2, Alley 2, Lane 173, Gao Tsui Rd., HsinChu, Taiwan 30038   |___ 
  \______________________________________________________________________\__/