SCCS-vsn: libexec/talkd/announce.c 5.9
SCCS-vsn: libexec/talkd/print.c 5.8
SCCS-vsn: libexec/talkd/process.c 5.10
SCCS-vsn: libexec/talkd/table.c 5.7
SCCS-vsn: libexec/talkd/talkd.c 5.8
-static char sccsid[] = "@(#)announce.c 5.8 (Berkeley) %G%";
+static char sccsid[] = "@(#)announce.c 5.9 (Berkeley) %G%";
#endif /* not lint */
#include <sys/types.h>
#include <sys/stat.h>
#endif /* not lint */
#include <sys/types.h>
#include <sys/stat.h>
-#include <sgtty.h>
-#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <protocols/talkd.h>
+#include <sgtty.h>
#include <errno.h>
#include <syslog.h>
#include <errno.h>
#include <syslog.h>
-
-#include <protocols/talkd.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <string.h>
-extern int errno;
-extern char hostname[];
/*
* Announce an invitation to talk.
/*
* Announce an invitation to talk.
-static char sccsid[] = "@(#)print.c 5.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)print.c 5.8 (Berkeley) %G%";
#endif /* not lint */
/* debug print routines */
#endif /* not lint */
/* debug print routines */
-#include <stdio.h>
-#include <syslog.h>
-#include <sys/param.h>
-
+#include <sys/types.h>
+#include <sys/socket.h>
#include <protocols/talkd.h>
#include <protocols/talkd.h>
+#include <syslog.h>
+#include <stdio.h>
static char *types[] =
{ "leave_invite", "look_up", "delete", "announce" };
static char *types[] =
{ "leave_invite", "look_up", "delete", "announce" };
-static char sccsid[] = "@(#)process.c 5.9 (Berkeley) %G%";
+static char sccsid[] = "@(#)process.c 5.10 (Berkeley) %G%";
* in the table for the local user
* DELETE - delete invitation
*/
* in the table for the local user
* DELETE - delete invitation
*/
-#include <stdio.h>
-#include <syslog.h>
-#include <netdb.h>
#include <protocols/talkd.h>
#include <protocols/talkd.h>
+#include <netdb.h>
+#include <syslog.h>
+#include <stdio.h>
+#include <string.h>
CTL_MSG *find_request();
CTL_MSG *find_match();
CTL_MSG *find_request();
CTL_MSG *find_match();
return;
}
#define satosin(sa) ((struct sockaddr_in *)(sa))
return;
}
#define satosin(sa) ((struct sockaddr_in *)(sa))
- hp = gethostbyaddr(&satosin(&mp->ctl_addr)->sin_addr,
+ hp = gethostbyaddr((char *)&satosin(&mp->ctl_addr)->sin_addr,
sizeof (struct in_addr), AF_INET);
if (hp == (struct hostent *)0) {
rp->answer = MACHINE_UNKNOWN;
sizeof (struct in_addr), AF_INET);
if (hp == (struct hostent *)0) {
rp->answer = MACHINE_UNKNOWN;
-static char sccsid[] = "@(#)table.c 5.6 (Berkeley) %G%";
+static char sccsid[] = "@(#)table.c 5.7 (Berkeley) %G%";
*
* Consider this a mis-guided attempt at modularity
*/
*
* Consider this a mis-guided attempt at modularity
*/
-#include <stdio.h>
-#include <sys/time.h>
-#include <syslog.h>
+#include <sys/time.h>
+#include <sys/socket.h>
#include <protocols/talkd.h>
#include <protocols/talkd.h>
+#include <syslog.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#define MAX_ID 16000 /* << 2^15 so I don't have sign troubles */
#define MAX_ID 16000 /* << 2^15 so I don't have sign troubles */
extern int debug;
struct timeval tp;
extern int debug;
struct timeval tp;
typedef struct table_entry TABLE_ENTRY;
typedef struct table_entry TABLE_ENTRY;
TABLE_ENTRY *table = NIL;
CTL_MSG *find_request();
CTL_MSG *find_match();
TABLE_ENTRY *table = NIL;
CTL_MSG *find_request();
CTL_MSG *find_match();
/*
* Look in the table for an invitation that matches the current
/*
* Look in the table for an invitation that matches the current
register CTL_MSG *request;
{
register TABLE_ENTRY *ptr;
register CTL_MSG *request;
{
register TABLE_ENTRY *ptr;
gettimeofday(&tp, &txp);
current_time = tp.tv_sec;
gettimeofday(&tp, &txp);
current_time = tp.tv_sec;
register CTL_MSG *request;
{
register TABLE_ENTRY *ptr;
register CTL_MSG *request;
{
register TABLE_ENTRY *ptr;
gettimeofday(&tp, &txp);
current_time = tp.tv_sec;
gettimeofday(&tp, &txp);
current_time = tp.tv_sec;
CTL_RESPONSE *response;
{
register TABLE_ENTRY *ptr;
CTL_RESPONSE *response;
{
register TABLE_ENTRY *ptr;
gettimeofday(&tp, &txp);
current_time = tp.tv_sec;
gettimeofday(&tp, &txp);
current_time = tp.tv_sec;
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)talkd.c 5.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)talkd.c 5.8 (Berkeley) %G%";
* disconnect all descriptors and ttys, and then endless
* loop on waiting for and processing requests
*/
* disconnect all descriptors and ttys, and then endless
* loop on waiting for and processing requests
*/
-#include <stdio.h>
-#include <errno.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <protocols/talkd.h>
#include <signal.h>
#include <syslog.h>
#include <signal.h>
#include <syslog.h>
-
-#include <protocols/talkd.h>
+#include <time.h>
+#include <errno.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <paths.h>
CTL_MSG request;
#include <paths.h>
CTL_MSG request;
int sockt;
int debug = 0;
int sockt;
int debug = 0;
long lastmsgtime;
char hostname[32];
long lastmsgtime;
char hostname[32];