
/*-------------------------------------------------------------*/
typedef enum {
  /* to indicate end */
  NETWOX_TOOLTREENODETYPE_END = 0,
  /* to indicate main node */
  NETWOX_TOOLTREENODETYPE_MAIN,
  /* basic nodes : each tool can be in one or several nodes
                   having "can add" on the line */
  NETWOX_TOOLTREENODETYPE_INFO,
  NETWOX_TOOLTREENODETYPE_INFO_NETW, /* can add */
  NETWOX_TOOLTREENODETYPE_INFO_LOCAL, /* can add */
  NETWOX_TOOLTREENODETYPE_INFO_REMOTE, /* can add */
  NETWOX_TOOLTREENODETYPE_NETPROTO,
  NETWOX_TOOLTREENODETYPE_NETPROTO_ETH,
  NETWOX_TOOLTREENODETYPE_NETPROTO_IP,
  NETWOX_TOOLTREENODETYPE_NETPROTO_UDP,
  NETWOX_TOOLTREENODETYPE_NETPROTO_TCP,
  NETWOX_TOOLTREENODETYPE_NETPROTO_ICMP,
  NETWOX_TOOLTREENODETYPE_NETPROTO_ARP,
  NETWOX_TOOLTREENODETYPE_APPPROTO,
  NETWOX_TOOLTREENODETYPE_APPPROTO_DHCP,
  NETWOX_TOOLTREENODETYPE_APPPROTO_DNS,
  NETWOX_TOOLTREENODETYPE_APPPROTO_FTP,
  NETWOX_TOOLTREENODETYPE_APPPROTO_HTTP,
  NETWOX_TOOLTREENODETYPE_APPPROTO_IDENT,
  NETWOX_TOOLTREENODETYPE_APPPROTO_IRC,
  NETWOX_TOOLTREENODETYPE_APPPROTO_NNTP,
  NETWOX_TOOLTREENODETYPE_APPPROTO_NTP,
  NETWOX_TOOLTREENODETYPE_APPPROTO_SMB,
  NETWOX_TOOLTREENODETYPE_APPPROTO_SMTP,
  NETWOX_TOOLTREENODETYPE_APPPROTO_SNMP,
  NETWOX_TOOLTREENODETYPE_APPPROTO_SYSLOG,
  NETWOX_TOOLTREENODETYPE_APPPROTO_TELNET,
  NETWOX_TOOLTREENODETYPE_APPPROTO_TFTP,
  NETWOX_TOOLTREENODETYPE_APPPROTO_WHOIS,
  NETWOX_TOOLTREENODETYPE_SNIFF, /* can add */
  NETWOX_TOOLTREENODETYPE_SPOOF,
  NETWOX_TOOLTREENODETYPE_SPOOF_ETH, /* can add */
  NETWOX_TOOLTREENODETYPE_SPOOF_IP, /* can add */
  NETWOX_TOOLTREENODETYPE_SPOOF_UDP, /* can add */
  NETWOX_TOOLTREENODETYPE_SPOOF_TCP, /* can add */
  NETWOX_TOOLTREENODETYPE_SPOOF_ICMP, /* can add */
  NETWOX_TOOLTREENODETYPE_SPOOF_ARP, /* can add */
  NETWOX_TOOLTREENODETYPE_RECORD, /* can add */
  NETWOX_TOOLTREENODETYPE_CLIENT,
  NETWOX_TOOLTREENODETYPE_CLIENT_UDP,
  NETWOX_TOOLTREENODETYPE_CLIENT_UDP_GENERIC, /* can add */
  NETWOX_TOOLTREENODETYPE_CLIENT_UDP_DHCP, /* can add */
  NETWOX_TOOLTREENODETYPE_CLIENT_UDP_DNS, /* can add */
  NETWOX_TOOLTREENODETYPE_CLIENT_UDP_NTP, /* can add */
  NETWOX_TOOLTREENODETYPE_CLIENT_UDP_SNMP, /* can add */
  NETWOX_TOOLTREENODETYPE_CLIENT_UDP_SYSLOG, /* can add */
  NETWOX_TOOLTREENODETYPE_CLIENT_UDP_TFTP, /* can add */
  NETWOX_TOOLTREENODETYPE_CLIENT_TCP,
  NETWOX_TOOLTREENODETYPE_CLIENT_TCP_GENERIC, /* can add */
  NETWOX_TOOLTREENODETYPE_CLIENT_TCP_DNS, /* can add */
  NETWOX_TOOLTREENODETYPE_CLIENT_TCP_FTP, /* can add */
  NETWOX_TOOLTREENODETYPE_CLIENT_TCP_HTTP, /* can add */
  NETWOX_TOOLTREENODETYPE_CLIENT_TCP_HTTP_SPIDER, /* can add */
  NETWOX_TOOLTREENODETYPE_CLIENT_TCP_IDENT, /* can add */
  NETWOX_TOOLTREENODETYPE_CLIENT_TCP_IRC, /* can add */
  NETWOX_TOOLTREENODETYPE_CLIENT_TCP_NNTP, /* can add */
  NETWOX_TOOLTREENODETYPE_CLIENT_TCP_SMB, /* can add */
  NETWOX_TOOLTREENODETYPE_CLIENT_TCP_SMTP, /* can add */
  NETWOX_TOOLTREENODETYPE_CLIENT_TCP_TELNET, /* can add */
  NETWOX_TOOLTREENODETYPE_CLIENT_TCP_WHOIS, /* can add */
  NETWOX_TOOLTREENODETYPE_SERVER,
  NETWOX_TOOLTREENODETYPE_SERVER_UDP,
  NETWOX_TOOLTREENODETYPE_SERVER_UDP_GENERIC, /* can add */
  /*notool NETWOX_TOOLTREENODETYPE_SERVER_UDP_DHCP,*/
  NETWOX_TOOLTREENODETYPE_SERVER_UDP_DNS, /* can add */
  NETWOX_TOOLTREENODETYPE_SERVER_UDP_NTP, /* can add */
  /*notool NETWOX_TOOLTREENODETYPE_SERVER_UDP_SNMP,*/
  NETWOX_TOOLTREENODETYPE_SERVER_UDP_SYSLOG,
  NETWOX_TOOLTREENODETYPE_SERVER_UDP_TFTP,
  NETWOX_TOOLTREENODETYPE_SERVER_TCP,
  NETWOX_TOOLTREENODETYPE_SERVER_TCP_GENERIC, /* can add */
  /*notool NETWOX_TOOLTREENODETYPE_SERVER_TCP_DNS,*/
  NETWOX_TOOLTREENODETYPE_SERVER_TCP_FTP,
  NETWOX_TOOLTREENODETYPE_SERVER_TCP_HTTP, /* can add */
  NETWOX_TOOLTREENODETYPE_SERVER_TCP_IDENT, /* can add */
  /*notool NETWOX_TOOLTREENODETYPE_SERVER_TCP_IRC,*/
  /*notool NETWOX_TOOLTREENODETYPE_SERVER_TCP_NNTP,*/
  NETWOX_TOOLTREENODETYPE_SERVER_TCP_SMB,
  NETWOX_TOOLTREENODETYPE_SERVER_TCP_SMTP,
  NETWOX_TOOLTREENODETYPE_SERVER_TCP_TELNET,
  /*notool NETWOX_TOOLTREENODETYPE_SERVER_TCP_WHOIS,*/
  NETWOX_TOOLTREENODETYPE_SERVER_ICMP, /* can add */
  NETWOX_TOOLTREENODETYPE_SERVER_ARP, /* can add */
  NETWOX_TOOLTREENODETYPE_PING, /* can add */
  NETWOX_TOOLTREENODETYPE_TRACEROUTE, /* can add */
  NETWOX_TOOLTREENODETYPE_SCAN, /* can add */
  NETWOX_TOOLTREENODETYPE_NETAUDIT,
  NETWOX_TOOLTREENODETYPE_NETAUDIT_ETH, /* can add */
  NETWOX_TOOLTREENODETYPE_NETAUDIT_IP, /* can add */
  /*notool NETWOX_TOOLTREENODETYPE_NETAUDIT_UDP,*/ /* can add */
  NETWOX_TOOLTREENODETYPE_NETAUDIT_TCP, /* can add */
  NETWOX_TOOLTREENODETYPE_NETAUDIT_ICMP, /* can add */
  NETWOX_TOOLTREENODETYPE_NETAUDIT_ARP, /* can add */
  NETWOX_TOOLTREENODETYPE_BRUTEFORCE, /* can add */
  NETWOX_TOOLTREENODETYPE_REMADM, /* can add */
  NETWOX_TOOLTREENODETYPE_NOTNET, /* can add */
  NETWOX_TOOLTREENODETYPE_NOTNET_FILE, /* can add */
  NETWOX_TOOLTREE_NODES_MAX = NETWOX_TOOLTREENODETYPE_NOTNET_FILE
} netwox_tooltreenodetype;

/*-------------------------------------------------------------*/
#define NETWOX_TOOLTREE_SUBNODES_MAX 100 /* should be enough */
#define NETWOX_TOOLTREE_DEEP_MAX 10 /* should be enough */
#define NETWOX_TOOLTREE_TOOL_START 1000
typedef struct {
  netwib_conststring description;
  netwib_bool canaddtool;
  netwib_uint32 subnodesset;
  netwox_tooltreenodetype subnodes[NETWOX_TOOLTREE_SUBNODES_MAX];
} netwox_tooltreenode;

/*-------------------------------------------------------------*/
extern netwox_tooltreenode netwox_tooltree[NETWOX_TOOLTREE_NODES_MAX+1];

/*-------------------------------------------------------------*/
netwib_err netwox_tooltree_init(void);

/*-------------------------------------------------------------*/
netwib_err netwox_tooltree_helpmode(void);



