Diff for /src/usr.sbin/timed/timed/readmsg.c between versions 1.2 and 1.3

version 1.2, 2003/06/17 04:30:03 version 1.3, 2004/03/13 21:08:38
Line 32 Line 32
  *   *
  * @(#)readmsg.c        8.1 (Berkeley) 6/6/93   * @(#)readmsg.c        8.1 (Berkeley) 6/6/93
  * $FreeBSD: src/usr.sbin/timed/timed/readmsg.c,v 1.5.2.3 2001/08/31 08:02:05 kris Exp $   * $FreeBSD: src/usr.sbin/timed/timed/readmsg.c,v 1.5.2.3 2001/08/31 08:02:05 kris Exp $
 * $DragonFly: src/usr.sbin/timed/timed/readmsg.c,v 1.1 2003/06/16 07:38:46 dillon Exp $ * $DragonFly$
  */   */
   
 #include "globals.h"  #include "globals.h"
Line 70  struct timeval from_when; Line 70  struct timeval from_when;
  */   */
   
 struct tsp *  struct tsp *
readmsg(type, machfrom, intvl, netfrom)readmsg(int type, char *machfrom, struct timeval *intvl,
        int type;        struct netinfo *netfrom)
        char *machfrom; 
        struct timeval *intvl; 
        struct netinfo *netfrom; 
 {  {
         int length;          int length;
         fd_set ready;          fd_set ready;
Line 82  readmsg(type, machfrom, intvl, netfrom) Line 79  readmsg(type, machfrom, intvl, netfrom)
         static struct tsplist *tail = &msgslist;          static struct tsplist *tail = &msgslist;
         static int msgcnt = 0;          static int msgcnt = 0;
         struct tsplist *prev;          struct tsplist *prev;
        register struct netinfo *ntp;        struct netinfo *ntp;
        register struct tsplist *ptr;        struct tsplist *ptr;
         ssize_t n;          ssize_t n;
   
         if (trace) {          if (trace) {
Line 343  again: Line 340  again:
  * only the type ACK is to be sent by a slave   * only the type ACK is to be sent by a slave
  */   */
 void  void
slaveack()slaveack(void)
 {  {
   
         switch(msgin.tsp_type) {          switch(msgin.tsp_type) {
   
         case TSP_ADJTIME:          case TSP_ADJTIME:
Line 375  slaveack() Line 373  slaveack()
  * These packets should be acknowledged.   * These packets should be acknowledged.
  */   */
 void  void
ignoreack()ignoreack(void)
 {  {
   
         switch(msgin.tsp_type) {          switch(msgin.tsp_type) {
   
         case TSP_TRACEON:          case TSP_TRACEON:
Line 403  ignoreack() Line 402  ignoreack()
  * to the messages received by a master   * to the messages received by a master
  */   */
 void  void
masterack()masterack(void)
 {  {
         struct tsp resp;          struct tsp resp;
   
Line 446  masterack() Line 445  masterack()
  * Print a TSP message   * Print a TSP message
  */   */
 void  void
print(msg, addr)print(struct tsp *msg, struct sockaddr_in *addr)
        struct tsp *msg; 
        struct sockaddr_in *addr; 
 {  {
         char tm[26];          char tm[26];
         time_t tsp_time_sec;          time_t tsp_time_sec;

Removed from v.1.2  
changed lines
  Added in v.1.3