version 1.4, 1998/04/27 15:45:49 |
version 1.5, 1998/04/28 22:13:27 |
|
|
static char rcsid[] = "$OpenBSD$"; |
static char rcsid[] = "$OpenBSD$"; |
#endif /* not lint */ |
#endif /* not lint */ |
|
|
#include <sys/types.h> |
#include "talk.h" |
#include <sys/socket.h> |
#include <arpa/inet.h> |
#include <sys/time.h> |
#include <sys/time.h> |
#include <signal.h> |
#include <signal.h> |
#include <netinet/in.h> |
|
#include <netdb.h> |
#include <netdb.h> |
#include <protocols/talkd.h> |
|
#include <errno.h> |
#include <errno.h> |
#include <setjmp.h> |
#include <setjmp.h> |
|
#include <unistd.h> |
#include "talk_ctl.h" |
#include "talk_ctl.h" |
#include "talk.h" |
|
|
|
#define STRING_LENGTH 158 |
#define STRING_LENGTH 158 |
|
|
|
|
* invitations. |
* invitations. |
*/ |
*/ |
int local_id, remote_id; |
int local_id, remote_id; |
void re_invite(); |
|
jmp_buf invitebuf; |
jmp_buf invitebuf; |
|
|
|
void |
invite_remote() |
invite_remote() |
{ |
{ |
int nfd, read_mask, template, new_sockt; |
int new_sockt; |
struct itimerval itimer; |
struct itimerval itimer; |
CTL_RESPONSE response; |
CTL_RESPONSE response; |
struct sockaddr rp; |
struct sockaddr rp; |
|
|
* Routine called on interupt to re-invite the callee |
* Routine called on interupt to re-invite the callee |
*/ |
*/ |
void |
void |
re_invite() |
re_invite(dummy) |
|
int dummy; |
{ |
{ |
|
|
message("Ringing your party again"); |
message("Ringing your party again"); |
/* force a re-announce */ |
/* force a re-announce */ |
msg.id_num = htonl(remote_id + 1); |
msg.id_num = htonl(remote_id + 1); |
|
|
"Target machine indicates protocol botch (addr)",/* BADADDR */ |
"Target machine indicates protocol botch (addr)",/* BADADDR */ |
"Target machine indicates protocol botch (ctl_addr)",/* BADCTLADDR */ |
"Target machine indicates protocol botch (ctl_addr)",/* BADCTLADDR */ |
}; |
}; |
#define NANSWERS (sizeof (answers) / sizeof (answers[0])) |
#define NANSWERS (sizeof (answers) / sizeof (answers[0])) |
|
|
/* |
/* |
* Transmit the invitation and process the response |
* Transmit the invitation and process the response |
*/ |
*/ |
|
void |
announce_invite() |
announce_invite() |
{ |
{ |
CTL_RESPONSE response; |
CTL_RESPONSE response; |
|
|
/* |
/* |
* Tell the daemon to remove your invitation |
* Tell the daemon to remove your invitation |
*/ |
*/ |
|
void |
send_delete() |
send_delete() |
{ |
{ |
|
|