Back to index

citadel  8.12
serv_network.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2000-2012 by the citadel.org team
00003  *
00004  *  This program is open source software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 3 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017  */
00018 
00019 extern int NetQDebugEnabled;
00020 
00021 #define DBGLOG(LEVEL) if ((LEVEL != LOG_DEBUG) || (NetQDebugEnabled != 0))
00022 
00023 #define QN_syslog(LEVEL, FORMAT, ...)                          \
00024        DBGLOG(LEVEL) syslog(LEVEL,                      \
00025                           "CC[%d]" FORMAT, \
00026                           CCC->cs_pid, __VA_ARGS__)
00027 
00028 #define QNM_syslog(LEVEL, FORMAT)                       \
00029        DBGLOG(LEVEL) syslog(LEVEL,                      \
00030                           "CC[%d]" FORMAT, \
00031                           CCC->cs_pid)
00032 
00033 typedef struct namelist namelist;
00034 
00035 struct namelist {
00036        namelist *next;
00037        char name[SIZ];
00038 };
00039 
00040 
00041 void free_netfilter_list(void);
00042 void load_network_filter_list(void);
00043 
00044 
00045 
00046 void network_queue_room(struct ctdlroom *, void *);
00048 void network_bounce(struct CtdlMessage *msg, char *reason);
00049 int network_usetable(struct CtdlMessage *msg);
00050 
00051 int network_talking_to(const char *nodename, long len, int operation);
00052 
00053 /*
00054  * Operations that can be performed by network_talking_to()
00055  */
00056 enum {
00057         NTT_ADD,
00058         NTT_REMOVE,
00059         NTT_CHECK
00060 };