Doxygen Source Code Documentation
trusted_hosts.h
Go to the documentation of this file.00001 /***************************************************************************** 00002 Major portions of this software are copyrighted by the Medical College 00003 of Wisconsin, 1994-2000, and are released under the Gnu General Public 00004 License, Version 2. See the file README.Copyright for details. 00005 ******************************************************************************/ 00006 00007 #ifndef _AFNI_TRUSTHOST_HEADER_ 00008 #define _AFNI_TRUSTHOST_HEADER_ 00009 00010 /******************************************************************* 00011 Define which external hosts are allowed to connect to AFNI 00012 ********************************************************************/ 00013 00014 /** list of strings with beginning components of IP addresses **/ 00015 00016 #include "mcw_malloc.h" 00017 00018 static char * trusted_hosts[] = { 00019 "141.106.106.2" , /* MCW Biophysics computers */ 00020 "127.0.0.1" , /* localhost */ 00021 "192.168.0." /* private class B networks */ 00022 } ; 00023 00024 /** if you change the number of elements in trusted_hosts, 00025 then you must also change this macro accordingly. **/ 00026 00027 #define OKHOST(hh) ( strstr((hh),trusted_hosts[0]) == (hh) || \ 00028 strstr((hh),trusted_hosts[1]) == (hh) || \ 00029 strstr((hh),trusted_hosts[2]) == (hh) \ 00030 ) 00031 00032 #endif /* _AFNI_TRUSTHOST_HEADER_ */