xref: /openbsd-src/libexec/talkd/talkd.h (revision e33d3bd3b8a4a23ac37a65baf17f90e92afc8157)
1*e33d3bd3Smillert /*	$OpenBSD: talkd.h,v 1.8 2003/06/02 19:38:24 millert Exp $	*/
2eb1968a4Smickey 
3eb1968a4Smickey /*
4eb1968a4Smickey  * Copyright (c) 1983 Regents of the University of California.
5eb1968a4Smickey  * All rights reserved.
6eb1968a4Smickey  *
7eb1968a4Smickey  * Redistribution and use in source and binary forms, with or without
8eb1968a4Smickey  * modification, are permitted provided that the following conditions
9eb1968a4Smickey  * are met:
10eb1968a4Smickey  * 1. Redistributions of source code must retain the above copyright
11eb1968a4Smickey  *    notice, this list of conditions and the following disclaimer.
12eb1968a4Smickey  * 2. Redistributions in binary form must reproduce the above copyright
13eb1968a4Smickey  *    notice, this list of conditions and the following disclaimer in the
14eb1968a4Smickey  *    documentation and/or other materials provided with the distribution.
15*e33d3bd3Smillert  * 3. Neither the name of the University nor the names of its contributors
16eb1968a4Smickey  *    may be used to endorse or promote products derived from this software
17eb1968a4Smickey  *    without specific prior written permission.
18eb1968a4Smickey  *
19eb1968a4Smickey  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20eb1968a4Smickey  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21eb1968a4Smickey  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22eb1968a4Smickey  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23eb1968a4Smickey  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24eb1968a4Smickey  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25eb1968a4Smickey  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26eb1968a4Smickey  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27eb1968a4Smickey  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28eb1968a4Smickey  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29eb1968a4Smickey  * SUCH DAMAGE.
30eb1968a4Smickey  */
31eb1968a4Smickey 
32eb1968a4Smickey /* talkd.c */
33eb1968a4Smickey extern int	debug;
34eb1968a4Smickey extern char	hostname[];
35eb1968a4Smickey 
36eb1968a4Smickey /* table.c */
37c72b5b24Smillert void	init_table(void);
38c72b5b24Smillert CTL_MSG *find_request(CTL_MSG *);
39c72b5b24Smillert CTL_MSG *find_match(CTL_MSG *);
40c72b5b24Smillert void	insert_table(CTL_MSG *, CTL_RESPONSE *);
41c72b5b24Smillert int	new_id(void);
42c72b5b24Smillert int	delete_invite(int);
43eb1968a4Smickey 
44eb1968a4Smickey /* process.c */
45c72b5b24Smillert void	process_request( CTL_MSG *, CTL_RESPONSE *);
46c72b5b24Smillert void	do_announce(CTL_MSG *, CTL_RESPONSE *);
47b68d276fSitojun int	find_user(char *name, char *tty, size_t ttyl);
48eb1968a4Smickey 
49eb1968a4Smickey /* announce.c */
50c72b5b24Smillert int	announce(CTL_MSG *,char *);
51eb1968a4Smickey 
52eb1968a4Smickey /* print.c */
53c72b5b24Smillert void	print_request(char *,CTL_MSG *);
54c72b5b24Smillert void	print_response(char *,CTL_RESPONSE *);
55eb1968a4Smickey 
56