|
|
| version 1.2, 2003/06/17 04:30:03 | version 1.3, 2004/03/13 21:08:38 |
|---|---|
| Line 32 | Line 32 |
| * | * |
| * @(#)byteorder.c 8.1 (Berkeley) 6/6/93 | * @(#)byteorder.c 8.1 (Berkeley) 6/6/93 |
| * $FreeBSD: src/usr.sbin/timed/timed/byteorder.c,v 1.4 1999/08/28 01:20:16 peter Exp $ | * $FreeBSD: src/usr.sbin/timed/timed/byteorder.c,v 1.4 1999/08/28 01:20:16 peter Exp $ |
| * $DragonFly: src/usr.sbin/timed/timed/byteorder.c,v 1.1 2003/06/16 07:38:36 dillon Exp $ | * $DragonFly$ |
| */ | */ |
| #include "globals.h" | #include "globals.h" |
| Line 42 | Line 42 |
| * messages. Protocol is defined in /usr/include/protocols/timed.h | * messages. Protocol is defined in /usr/include/protocols/timed.h |
| */ | */ |
| void | void |
| bytenetorder(ptr) | bytenetorder(struct tsp *ptr) |
| struct tsp *ptr; | |
| { | { |
| ptr->tsp_seq = htons((u_short)ptr->tsp_seq); | ptr->tsp_seq = htons((u_short)ptr->tsp_seq); |
| switch (ptr->tsp_type) { | switch (ptr->tsp_type) { |
| Line 62 bytenetorder(ptr) | Line 62 bytenetorder(ptr) |
| } | } |
| void | void |
| bytehostorder(ptr) | bytehostorder(struct tsp *ptr) |
| struct tsp *ptr; | |
| { | { |
| ptr->tsp_seq = ntohs((u_short)ptr->tsp_seq); | ptr->tsp_seq = ntohs((u_short)ptr->tsp_seq); |
| switch (ptr->tsp_type) { | switch (ptr->tsp_type) { |