1 #ifndef NVT_H 2 #define NVT_H 1 3 4 #include "dce.h" 5 6 typedef enum { 7 NVT_SE = 240, 8 NVT_NOP = 241, 9 NVT_DM = 242, 10 NVT_SB = 250, 11 NVT_WILL = 251, 12 NVT_WONT = 252, 13 NVT_DO = 253, 14 NVT_DONT = 254, 15 NVT_IAC = 255, 16 } nvt_command; 17 18 typedef enum { 19 NVT_OPT_TRANSMIT_BINARY = 0, 20 NVT_OPT_ECHO = 1, 21 NVT_OPT_SUPPRESS_GO_AHEAD = 3, 22 NVT_OPT_STATUS = 5, 23 NVT_OPT_RCTE = 7, 24 NVT_OPT_TIMING_MARK = 6, 25 NVT_OPT_NAOCRD = 10, 26 NVT_OPT_TERMINAL_TYPE = 24, 27 NVT_OPT_NAWS = 31, 28 NVT_OPT_TERMINAL_SPEED = 32, 29 NVT_OPT_LINEMODE = 34, 30 NVT_OPT_X_DISPLAY_LOCATION = 35, 31 NVT_OPT_ENVIRON = 36, 32 NVT_OPT_NEW_ENVIRON = 39, 33 } nvt_option; 34 35 #define NVT_SB_IS 0 36 #define NVT_SB_SEND 1 37 38 #ifndef TRUE 39 #define TRUE 1 40 #define FALSE 0 41 #endif 42 43 typedef struct nvt_vars { 44 int binary_xmit; 45 int binary_recv; 46 char term[256]; 47 } nvt_vars; 48 49 void nvt_init_config(nvt_vars *vars); 50 unsigned char get_nvt_cmd_response(unsigned char action, unsigned char type); 51 int parse_nvt_subcommand(dce_config *cfg, int fd, nvt_vars *vars , unsigned char *data, int len); 52 int parse_nvt_command(dce_config *cfg, int fd, nvt_vars *vars, nvt_command action, nvt_option opt); 53 int send_nvt_command(int fd, nvt_vars *vars, nvt_command action, nvt_option opt); 54 55 #endif