/*
+ * $Id: atp_open.c,v 1.5 2001-08-15 02:17:57 srittau Exp $
+ *
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
*
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/param.h>
+#include <sys/socket.h>
#include <netatalk/at.h>
#include <netatalk/endian.h>
#include "atp_internals.h"
-ATP atp_open(port, saddr)
- u_int8_t port;
- const struct at_addr *saddr;
+ATP atp_open(u_int8_t port, const struct at_addr *saddr)
{
struct sockaddr_at addr;
int s;
struct timeval tv;
int pid;
-#ifdef EBUG
+#ifdef DEBUG
printf( "<%d> atp_open\n", getpid());
-#endif
+#endif /* DEBUG */
memset(&addr, 0, sizeof(addr));
addr.sat_port = port;
#ifdef EBUG
srandom( tv.tv_sec );
-#endif
+#endif /* EBUG */
return atp;
}