OpenVAS Scanner  6.0.0~git
Macros | Functions | Variables
utils.c File Reference

A bunch of miscellaneous functions, mostly file conversions. More...

#include "utils.h"
#include "../misc/network.h"
#include "comm.h"
#include "ntp.h"
#include "pluginscheduler.h"
#include <errno.h>
#include <gvm/base/prefs.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/wait.h>

Macros

#define G_LOG_DOMAIN   "sd main"
 GLib log domain. More...
 

Functions

int is_otp_scan ()
 Check the scan type. More...
 
void set_scan_type (int type)
 Set the scan type. More...
 
int get_max_hosts_number (void)
 
int get_max_checks_number (void)
 
int process_alive (pid_t pid)
 
int data_left (int soc)
 
void wait_for_children1 (void)
 
int is_scanner_only_pref (const char *pref)
 
static void auth_send (int soc, char *data)
 Writes data to a socket. More...
 
void send_printf (int soc, char *data,...)
 Writes data to a socket. More...
 

Variables

int global_max_hosts
 
int global_max_checks
 
int global_scan_type = 1
 

Detailed Description

A bunch of miscellaneous functions, mostly file conversions.

Macro Definition Documentation

◆ G_LOG_DOMAIN

#define G_LOG_DOMAIN   "sd main"

GLib log domain.

Function Documentation

◆ auth_send()

static void auth_send ( int  soc,
char *  data 
)
static

Writes data to a socket.

◆ data_left()

int data_left ( int  soc)

◆ get_max_checks_number()

int get_max_checks_number ( void  )

Get the max number of plugins to launch against the remote host at the same time

◆ get_max_hosts_number()

int get_max_hosts_number ( void  )

Get the max number of hosts to test at the same time.

◆ is_otp_scan()

int is_otp_scan ( void  )

Check the scan type.

Returns
1 if OTP type, 0 if OSP.

◆ is_scanner_only_pref()

int is_scanner_only_pref ( const char *  pref)

◆ process_alive()

int process_alive ( pid_t  pid)

Determines if a process is alive - as reliably as we can

◆ send_printf()

void send_printf ( int  soc,
char *  data,
  ... 
)

Writes data to a socket.

◆ set_scan_type()

void set_scan_type ( int  type)

Set the scan type.

◆ wait_for_children1()

void wait_for_children1 ( void  )

Variable Documentation

◆ global_max_checks

int global_max_checks

◆ global_max_hosts

int global_max_hosts

Globals that should not be touched (used in utils module).

◆ global_scan_type

int global_scan_type = 1