Greenbone Vulnerability Manager  8.0.0~git
Enumerations | Functions | Variables
otp.h File Reference

Headers for Greenbone Vulnerability Manager: the OTP library. More...

#include "manage.h"
#include <glib.h>

Go to the source code of this file.

Enumerations

enum  scanner_init_state_t {
  SCANNER_INIT_CONNECTED, SCANNER_INIT_DONE, SCANNER_INIT_DONE_CACHE_MODE, SCANNER_INIT_DONE_CACHE_MODE_UPDATE,
  SCANNER_INIT_GOT_FEED_VERSION, SCANNER_INIT_GOT_PLUGINS, SCANNER_INIT_SENT_COMPLETE_LIST, SCANNER_INIT_SENT_COMPLETE_LIST_UPDATE,
  SCANNER_INIT_SENT_VERSION, SCANNER_INIT_TOP
}
 Possible initialisation states of the scanner. More...
 

Functions

void init_otp_data ()
 Initialise OTP library data. More...
 
int process_otp_scanner_input ()
 Process any lines available in from_scanner. More...
 
void set_scanner_init_state (scanner_init_state_t state)
 Set the scanner initialisation state, scanner_init_state. More...
 
void reset_scanner_states ()
 Set the scanner initialisation state, scanner_init_state. More...
 

Variables

scanner_init_state_t scanner_init_state
 The initialisation state of the scanner. More...
 
int scanner_current_loading
 Scanner current number of loaded plugins, when still loading.
 
int scanner_total_loading
 Scanner total number of plugins to be loaded, when still loading.
 
int scanner_init_offset
 Offset into initialisation string being sent to scanner. More...
 

Detailed Description

Headers for Greenbone Vulnerability Manager: the OTP library.

Enumeration Type Documentation

◆ scanner_init_state_t

Possible initialisation states of the scanner.

Todo:
Exported for following functions.

Function Documentation

◆ init_otp_data()

void init_otp_data ( )

Initialise OTP library data.

This must run once, before the first call to process_otp_scanner_input.

◆ process_otp_scanner_input()

int process_otp_scanner_input ( )

Process any lines available in from_scanner.

Update scanner information according to the input from the scanner.

This function simply records input from the scanner. Output to the scanner or client is almost always done via process_gmp_client_input in reaction to client requests, the only exception being stop requests initiated in other processes.

Returns
0 success, 1 received scanner BYE, 2 bad login, 3 scanner loading, -1 error.
Todo:
Replace "\n" with newline in description.
Todo:
Field could be "general".
Todo:
Replace "\n" with newline in description.
Todo:
Field could be "general".
Todo:
Replace "\n" with newline in description.
Todo:
Field could be "general".
Todo:
Exit more formally with Scanner?
Todo:
Consider reading all fields up to <|> SERVER?

◆ reset_scanner_states()

void reset_scanner_states ( )

Set the scanner initialisation state, scanner_init_state.

Todo:
Exported for scanner.c.

◆ set_scanner_init_state()

void set_scanner_init_state ( scanner_init_state_t  state)

Set the scanner initialisation state, scanner_init_state.

Todo:
Exported for gmpd.c and scanner.c.
Parameters
[in]stateNew init state.

Variable Documentation

◆ scanner_init_offset

int scanner_init_offset

Offset into initialisation string being sent to scanner.

Todo:
Exported for gmpd.c.

◆ scanner_init_state

scanner_init_state_t scanner_init_state

The initialisation state of the scanner.

Todo:
Exported for gmpd.c.