10b67b493SWarner Losh /* 20b67b493SWarner Losh * Copyright (c) 2002 M. Warner Losh. All rights reserved. 30b67b493SWarner Losh * 40b67b493SWarner Losh * Redistribution and use in source and binary forms, with or without 50b67b493SWarner Losh * modification, are permitted provided that the following conditions 60b67b493SWarner Losh * are met: 70b67b493SWarner Losh * 1. Redistributions of source code must retain the above copyright 80b67b493SWarner Losh * notice, this list of conditions and the following disclaimer. 90b67b493SWarner Losh * 2. Redistributions in binary form must reproduce the above copyright 100b67b493SWarner Losh * notice, this list of conditions and the following disclaimer in the 110b67b493SWarner Losh * documentation and/or other materials provided with the distribution. 120b67b493SWarner Losh * 130b67b493SWarner Losh * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 140b67b493SWarner Losh * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 150b67b493SWarner Losh * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 160b67b493SWarner Losh * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 170b67b493SWarner Losh * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 180b67b493SWarner Losh * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 190b67b493SWarner Losh * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 200b67b493SWarner Losh * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 210b67b493SWarner Losh * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 220b67b493SWarner Losh * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 230b67b493SWarner Losh * SUCH DAMAGE. 240b67b493SWarner Losh * 250b67b493SWarner Losh * $FreeBSD$ 260b67b493SWarner Losh */ 270b67b493SWarner Losh 280b67b493SWarner Losh int announce(CTL_MSG *, const char *); 290b67b493SWarner Losh int delete_invite(int); 300b67b493SWarner Losh void do_announce(CTL_MSG *, CTL_RESPONSE *); 310b67b493SWarner Losh CTL_MSG *find_match(CTL_MSG *request); 324974a170SWarner Losh CTL_MSG *find_request(CTL_MSG *request); 330b67b493SWarner Losh int find_user(const char *name, char *tty); 340b67b493SWarner Losh void insert_table(CTL_MSG *, CTL_RESPONSE *); 350b67b493SWarner Losh int new_id(void); 360b67b493SWarner Losh int print_mesg(const char *, FILE *, CTL_MSG *, const char *); 370b67b493SWarner Losh void print_request(const char *, CTL_MSG *); 380b67b493SWarner Losh void print_response(const char *, CTL_RESPONSE *); 390b67b493SWarner Losh void process_request(CTL_MSG *mp, CTL_RESPONSE *rp); 400b67b493SWarner Losh void timeout(int sig); 41