+++ /dev/null
-/* -*-c-*-
- *
- * $Id: listener.h,v 1.1 1999/07/01 08:56:23 mdw Exp $
- *
- * A port forwarding listener
- *
- * (c) 1999 Mark Wooding
- */
-
-/*----- Licensing notice --------------------------------------------------*
- *
- * This file is part of the `fw' port forwarder.
- *
- * `fw' is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * `fw' is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with `fw'; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-/*----- Revision history --------------------------------------------------*
- *
- * $Log: listener.h,v $
- * Revision 1.1 1999/07/01 08:56:23 mdw
- * Initial revision
- *
- */
-
-#ifndef LISTENER_H
-#define LISTENER_H
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-/*----- Header files ------------------------------------------------------*/
-
-#include <stdio.h>
-
-#include <sys/socket.h>
-#include <netinet/in.h>
-
-#include <mLib/sel.h>
-
-#ifndef ACL_H
-# include "acl.h"
-#endif
-
-/*----- Data structures ---------------------------------------------------*/
-
-/* --- A listener object --- */
-
-typedef struct listener {
- sel_file rd; /* Read selector for new connects */
- struct sockaddr_in sin; /* Destination address */
- const char *desc; /* Description of forwarder */
- acl_entry *acl; /* Access controls */
-} listener;
-
-/*----- Functions provided ------------------------------------------------*/
-
-/* --- @listener_dump@ --- *
- *
- * Arguments: @listener *l@ = pointer to listener block
- * @FILE *fp@ = stream to dump on
- *
- * Returns: ---
- *
- * Use: Dumps a listener to an output stream.
- */
-
-extern void listener_dump(listener */*l*/, FILE */*fp*/);
-
-/* --- @listener_add@ --- *
- *
- * Arguments: @int fd@ = created listening socket
- * @unsigned sp@ = source port number
- * @struct sockaddr_in *sin@ = pointer to destination address
- *
- * Returns: The address of the new listener.
- *
- * Use: Adds a forwarding listener.
- */
-
-extern listener *listener_add(int /*fd*/,
- unsigned /*sp*/, struct sockaddr_in */*sin*/);
-
-/*----- That's all, folks -------------------------------------------------*/
-
-#ifdef __cplusplus
- }
-#endif
-
-#endif