00001 /* 00002 * $Id$ 00003 * 00004 * UNIX Domain Socket Server 00005 * 00006 * Copyright (C) 2001-2004 FhG Fokus 00007 * Copyright (C) 2005 iptelorg GmbH 00008 * 00009 * This file is part of ser, a free SIP server. 00010 * 00011 * ser is free software; you can redistribute it and/or modify 00012 * it under the terms of the GNU General Public License as published by 00013 * the Free Software Foundation; either version 2 of the License, or 00014 * (at your option) any later version 00015 * 00016 * For a license to use the ser software under conditions 00017 * other than those described here, or to purchase support for this 00018 * software, please contact iptel.org by e-mail at the following addresses: 00019 * info@iptel.org 00020 * 00021 * ser is distributed in the hope that it will be useful, 00022 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00023 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00024 * GNU General Public License for more details. 00025 * 00026 * You should have received a copy of the GNU General Public License 00027 * along with this program; if not, write to the Free Software 00028 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00029 */ 00030 00031 #ifndef _UNIXSOCK_SERVER_H 00032 #define _UNIXSOCK_SERVER_H 00033 00034 00035 #include <sys/types.h> 00036 #include <sys/un.h> 00037 #include <unistd.h> 00038 #include "../../str.h" 00039 00040 extern char* unixsock_name; 00041 extern char* unixsock_user; 00042 extern char* unixsock_mode; 00043 extern char* unixsock_group; 00044 extern unsigned int unixsock_children; 00045 extern unsigned int unixsock_tx_timeout; 00046 00047 /* 00048 * Initialize Unix domain socket server 00049 */ 00050 int init_unixsock_socket(void); 00051 00052 00053 /* 00054 * Initialize Unix domain socket server 00055 */ 00056 int init_unixsock_children(void); 00057 00058 00059 /* 00060 * Clean up 00061 */ 00062 void close_unixsock_server(void); 00063 00064 00065 /* 00066 * Send the reply 00067 */ 00068 ssize_t unixsock_reply_send(void); 00069 00070 00071 /* 00072 * Send the reply to the given destination 00073 */ 00074 ssize_t unixsock_reply_sendto(struct sockaddr_un* to); 00075 00076 /* 00077 * Return the address of the sender 00078 */ 00079 struct sockaddr_un* unixsock_sender_addr(void); 00080 00081 void unixsock_reply_reset(void); 00082 00083 #endif /* _UNIXSOCK_SERVER_H */
1.7.1