xref: /freebsd/libexec/talkd/extern.h (revision b3e7694832e81d7a904a10f525f8797b753bf0d3)
1e6209940SPedro F. Giffuni /*-
2*4d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
3e6209940SPedro F. Giffuni  *
4f86e6000SWarner Losh  * Copyright (c) 2002 M. Warner Losh <imp@FreeBSD.org>
50b67b493SWarner Losh  *
60b67b493SWarner Losh  * Redistribution and use in source and binary forms, with or without
70b67b493SWarner Losh  * modification, are permitted provided that the following conditions
80b67b493SWarner Losh  * are met:
90b67b493SWarner Losh  * 1. Redistributions of source code must retain the above copyright
100b67b493SWarner Losh  *    notice, this list of conditions and the following disclaimer.
110b67b493SWarner Losh  * 2. Redistributions in binary form must reproduce the above copyright
120b67b493SWarner Losh  *    notice, this list of conditions and the following disclaimer in the
130b67b493SWarner Losh  *    documentation and/or other materials provided with the distribution.
140b67b493SWarner Losh  *
150b67b493SWarner Losh  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
160b67b493SWarner Losh  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
170b67b493SWarner Losh  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
180b67b493SWarner Losh  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
190b67b493SWarner Losh  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
200b67b493SWarner Losh  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
210b67b493SWarner Losh  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
220b67b493SWarner Losh  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
230b67b493SWarner Losh  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
240b67b493SWarner Losh  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
250b67b493SWarner Losh  * SUCH DAMAGE.
260b67b493SWarner Losh  */
270b67b493SWarner Losh 
28eccad222SEd Schouten extern int debug;
29eccad222SEd Schouten extern char hostname[];
30eccad222SEd Schouten 
310b67b493SWarner Losh int	announce(CTL_MSG *, const char *);
3202a0965eSJuli Mallett int	delete_invite(u_int32_t);
330b67b493SWarner Losh void	do_announce(CTL_MSG *, CTL_RESPONSE *);
340b67b493SWarner Losh CTL_MSG	*find_match(CTL_MSG *request);
354974a170SWarner Losh CTL_MSG	*find_request(CTL_MSG *request);
360b67b493SWarner Losh int	find_user(const char *name, char *tty);
370b67b493SWarner Losh void	insert_table(CTL_MSG *, CTL_RESPONSE *);
380b67b493SWarner Losh int	new_id(void);
3902a0965eSJuli Mallett int	print_mesg(const char *, CTL_MSG *, const char *);
400b67b493SWarner Losh void	print_request(const char *, CTL_MSG *);
410b67b493SWarner Losh void	print_response(const char *, CTL_RESPONSE *);
420b67b493SWarner Losh void	process_request(CTL_MSG *mp, CTL_RESPONSE *rp);
430b67b493SWarner Losh void	timeout(int sig);
44