xref: /freebsd/libexec/talkd/extern.h (revision f86e60008bdf690b61af2c18e98ee791ca91433f)
1e6209940SPedro F. Giffuni /*-
2e6209940SPedro F. Giffuni  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3e6209940SPedro F. Giffuni  *
4*f86e6000SWarner 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  * $FreeBSD$
280b67b493SWarner Losh  */
290b67b493SWarner Losh 
30eccad222SEd Schouten extern int debug;
31eccad222SEd Schouten extern char hostname[];
32eccad222SEd Schouten 
330b67b493SWarner Losh int	announce(CTL_MSG *, const char *);
3402a0965eSJuli Mallett int	delete_invite(u_int32_t);
350b67b493SWarner Losh void	do_announce(CTL_MSG *, CTL_RESPONSE *);
360b67b493SWarner Losh CTL_MSG	*find_match(CTL_MSG *request);
374974a170SWarner Losh CTL_MSG	*find_request(CTL_MSG *request);
380b67b493SWarner Losh int	find_user(const char *name, char *tty);
390b67b493SWarner Losh void	insert_table(CTL_MSG *, CTL_RESPONSE *);
400b67b493SWarner Losh int	new_id(void);
4102a0965eSJuli Mallett int	print_mesg(const char *, CTL_MSG *, const char *);
420b67b493SWarner Losh void	print_request(const char *, CTL_MSG *);
430b67b493SWarner Losh void	print_response(const char *, CTL_RESPONSE *);
440b67b493SWarner Losh void	process_request(CTL_MSG *mp, CTL_RESPONSE *rp);
450b67b493SWarner Losh void	timeout(int sig);
46