Ethereal-dev: Re: [Ethereal-dev] pppdump patch

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

From: Guy Harris <guy@xxxxxxxxxx>
Date: Mon, 17 Dec 2001 14:01:20 -0800 (PST)
> 2)  A time stamp bug where the reset and long time records are treated 
> incorrectly.

	...


> -			case PPPD_TIME_STEP_LONG:
> +			case PPPD_RESET_TIME:
>  				wtap_file_read_unknown_bytes(&time_long, sizeof(guint32), fh, err);
>  				state->offset += sizeof(guint32);
> -				state->timestamp = time_long;
> +				state->timestamp = pntohl(&time_long);
>  				state->tenths = 0;
>  				break;
>  
> -			case PPPD_RESET_TIME:
> +			case PPPD_TIME_STEP_LONG:
>  				wtap_file_read_unknown_bytes(&time_long, sizeof(guint32), fh, err);
>  				state->offset += sizeof(guint32);
> -				state->tenths += time_long;
> +				state->tenths += pntohl(&time_long);
>  
>  				if (state->tenths >= 10) {
>  					state->timestamp += state->tenths / 10;

So they're guaranteed to be big-endian?