summaryrefslogtreecommitdiff
path: root/usr.bin/talk/ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/talk/ctl.c')
-rw-r--r--usr.bin/talk/ctl.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/talk/ctl.c b/usr.bin/talk/ctl.c
index fcfb2c2a0d9..dda08855694 100644
--- a/usr.bin/talk/ctl.c
+++ b/usr.bin/talk/ctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ctl.c,v 1.2 1996/06/26 05:40:20 deraadt Exp $ */
+/* $OpenBSD: ctl.c,v 1.3 1998/04/28 22:13:20 pjanzen Exp $ */
/* $NetBSD: ctl.c,v 1.3 1994/12/09 02:14:10 jtc Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)ctl.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: ctl.c,v 1.2 1996/06/26 05:40:20 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: ctl.c,v 1.3 1998/04/28 22:13:20 pjanzen Exp $";
#endif /* not lint */
/*
@@ -47,11 +47,8 @@ static char rcsid[] = "$OpenBSD: ctl.c,v 1.2 1996/06/26 05:40:20 deraadt Exp $";
* the progress
*/
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <protocols/talkd.h>
-#include <netinet/in.h>
#include "talk.h"
+#include <arpa/inet.h>
#include "talk_ctl.h"
struct sockaddr_in daemon_addr = { sizeof(daemon_addr), AF_INET };
@@ -70,6 +67,7 @@ int invitation_waiting = 0;
CTL_MSG msg;
+void
open_sockt()
{
int length;
@@ -87,6 +85,7 @@ open_sockt()
}
/* open the ctl socket */
+void
open_ctl()
{
int length;
@@ -106,13 +105,14 @@ open_ctl()
}
/* print_addr is a debug print routine */
+void
print_addr(addr)
struct sockaddr_in addr;
{
int i;
- printf("addr = %x, port = %o, family = %o zero = ",
- addr.sin_addr, addr.sin_port, addr.sin_family);
+ printf("addr = %s, port = %o, family = %o zero = ",
+ inet_ntoa(addr.sin_addr), addr.sin_port, addr.sin_family);
for (i = 0; i<8;i++)
printf("%o ", (int)addr.sin_zero[i]);
putchar('\n');