Ethereal-cvs: [ethereal-cvs] cvs commit: ethereal packet-ntp.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sun, 5 Dec 1999 21:18:30 -0600 (CST)
guy         1999/12/05 21:18:27 CST

  Modified files:
    .                    packet-ntp.c 
  Log:
  When dissecting the reference clock ID field:
  
  	if it's stratum 0 or 1, use "memcmp()" to compare it against the
  	strings in our table, rather than assuming it's aligned on a
  	4-byte boundary and doing an integral comparison - neither of
  	the strings being compared are necessarily so aligned - and, if
  	it doesn't match any of them, include the value in the
  	"Unidentified reference source" description;
  
  	if it's stratum 2 or higher, extract the value with "pntohl()"
  	before interpreting it as an IP address - IP addresses are in
  	network byte order, and, again, it's not necessarily neatly
  	aligned on a 4-byte boundary.
  
  Revision  Changes    Path
  1.6       +13 -6     ethereal/packet-ntp.c