OpenVAS Libraries  4.0+rc3.SVN
misc/services.h
00001 /* OpenVAS Libraries
00002  * Copyright (C) 2002 Michel Arboi
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Library General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2 of the License, or (at your option) any later version.
00008  *
00009  * This library 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 GNU
00012  * Library General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Library General Public
00015  * License along with this library; if not, write to the Free
00016  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00017  */
00018 
00019 
00020 #ifndef _OPENVAS_SERVICES_H
00021 #define _OPENVAS_SERVICES_H
00022 
00023 #include "services1.h"
00024 
00025 /* **** FILES **** */
00026 
00027 #define OPENVAS_SERVICES   OPENVAS_DATA_DIR "/openvas-services"
00028 /* If you want OpenVAS to use a second input file, uncomment next line */
00029 /*#define OPENVAS_IANA_PORTS  CONF_DIR "/iana-port-numbers"*/
00030 
00031 #define OPENVAS_SERVICES_TCP  OPENVAS_STATE_DIR "/services.tcp"
00032 #define OPENVAS_SERVICES_UDP  OPENVAS_STATE_DIR "/services.udp"
00033 /* Not really useful but for debug or information */
00034 #define OPENVAS_SERVICES_TXT  OPENVAS_STATE_DIR "/services.txt"
00035 
00036 #define SERVICES_MAGIC 0x42
00037 
00038 struct openvas_service
00039 {
00040   char magic;
00041   unsigned short ns_port;
00042   char ns_name[128];
00043 };
00044 
00045 const char *openvas_get_svc_name (int, const char *);
00046 unsigned short *get_tcp_svcs (int *);
00047 
00048 #endif