summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
ea9dfc1)
more packets should be done this way
SCCS-vsn: usr.sbin/timed/timed/byteorder.c 2.2
-static char sccsid[] = "@(#)byteorder.c 2.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)byteorder.c 2.2 (Berkeley) %G%";
#endif not lint
#include "globals.h"
#endif not lint
#include "globals.h"
struct tsp *ptr;
{
ptr->tsp_seq = htons((u_short)ptr->tsp_seq);
struct tsp *ptr;
{
ptr->tsp_seq = htons((u_short)ptr->tsp_seq);
- ptr->tsp_time.tv_sec = htonl((u_long)ptr->tsp_time.tv_sec);
- ptr->tsp_time.tv_usec = htonl((u_long)ptr->tsp_time.tv_usec);
+ if (ptr->tsp_type != TSP_LOOP) {
+ ptr->tsp_time.tv_sec = htonl((u_long)ptr->tsp_time.tv_sec);
+ ptr->tsp_time.tv_usec = htonl((u_long)ptr->tsp_time.tv_usec);
+ }
}
bytehostorder(ptr)
struct tsp *ptr;
{
ptr->tsp_seq = ntohs((u_short)ptr->tsp_seq);
}
bytehostorder(ptr)
struct tsp *ptr;
{
ptr->tsp_seq = ntohs((u_short)ptr->tsp_seq);
- ptr->tsp_time.tv_sec = ntohl((u_long)ptr->tsp_time.tv_sec);
- ptr->tsp_time.tv_usec = ntohl((u_long)ptr->tsp_time.tv_usec);
+ if (ptr->tsp_type != TSP_LOOP) {
+ ptr->tsp_time.tv_sec = ntohl((u_long)ptr->tsp_time.tv_sec);
+ ptr->tsp_time.tv_usec = ntohl((u_long)ptr->tsp_time.tv_usec);
+ }