190261Simp/*
290261Simp * Copyright (c) 2002 M. Warner Losh.  All rights reserved.
390261Simp *
490261Simp * Redistribution and use in source and binary forms, with or without
590261Simp * modification, are permitted provided that the following conditions
690261Simp * are met:
790261Simp * 1. Redistributions of source code must retain the above copyright
890261Simp *    notice, this list of conditions and the following disclaimer.
990261Simp * 2. Redistributions in binary form must reproduce the above copyright
1090261Simp *    notice, this list of conditions and the following disclaimer in the
1190261Simp *    documentation and/or other materials provided with the distribution.
1290261Simp *
1390261Simp * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
1490261Simp * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1590261Simp * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1690261Simp * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
1790261Simp * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1890261Simp * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
1990261Simp * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2090261Simp * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2190261Simp * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2290261Simp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2390261Simp * SUCH DAMAGE.
2490261Simp *
2590261Simp * $FreeBSD$
2690261Simp */
2790261Simp
28241777Sedextern int debug;
29241777Sedextern char hostname[];
30241777Sed
3190261Simpint	announce(CTL_MSG *, const char *);
32112998Sjmallettint	delete_invite(u_int32_t);
3390261Simpvoid	do_announce(CTL_MSG *, CTL_RESPONSE *);
3490262SimpCTL_MSG	*find_match(CTL_MSG *request);
3590261SimpCTL_MSG	*find_request(CTL_MSG *request);
3690261Simpint	find_user(const char *name, char *tty);
3790261Simpvoid	insert_table(CTL_MSG *, CTL_RESPONSE *);
3890261Simpint	new_id(void);
39112998Sjmallettint	print_mesg(const char *, CTL_MSG *, const char *);
4090261Simpvoid	print_request(const char *, CTL_MSG *);
4190261Simpvoid	print_response(const char *, CTL_RESPONSE *);
4290261Simpvoid	process_request(CTL_MSG *mp, CTL_RESPONSE *rp);
4390261Simpvoid	timeout(int sig);
44