About

NetView 2.90 LE

HTML HELP

It was conceived as program-substitute of the Windows Network Places, allowing use aside from standard possibilities Windows, collection to information on network resource, using of separate file, in which were kept name all computer in network and their IP address, checking all hosts using scanning or pinging. Hereinafter program solidly extended with many other use full features.

Features:

Using of file where all network information is stored and regular rechecking of hosts's state by PING, port scaning and sending ARP requests allows to see ALL computers of network even if usual network browsing is not correctly functioning. You can adjust program setting to achive maximum starting-up speed or even start it as service.

Plug-ins support. As result - practically unlimited possibilities of the extention of the program. Some small plug-ins are installed with NetView, other you can find on the web-site

Support pascal-like scripts using most of the possibilities of the plug-ins API interface. Innerfuse Pascal Script Engine is used .

There is API for referencing to given NetView from outside programs. Also NetView allows other program to keep absolutely any information about hosts due to special organizations of hostlist.

Can work as service under Windows 2000/XP/2003. No additional programs is required for installing NetView as service - this possibility is included in the preferences window of NetView.

Can be used as tool for creation network map. NetView can show hosts as animated or static images (gif and bmp formats supported) placed on any background image. You can also add colored lines and rectangle areas on the map and set any texture on background.

Can open hosts by their names or IP addresses wich can be much faster on some systems like Windows 2000.

Can open also HTTP and supports FTP transparently as NETBIOS when searching resources or files.

You can set individual settings for checking hosts states (using ping, port scanning, or simple dependency on the state of another host

Popup menu Shares with the list of shares and 1st level FTP foders on the host. Quick and very handy when browsing network.

Use can get much information (like IP and MAC addresses, LanMan information, opened ports) about any host using right-click/Properties.

Opening of the computer occurs in different thread to prevent locking of the program interface

NetView can recheck states of the hosts every specified time interval.

You can monitor different services or simple state of the hosts by choosing what ports should be scanned on recheck or simple use pinging host to determine is it online.

Program can be minimized to the system notification area (near tray-clock).

Can display hosts in different color depends on its states.

Built-in NetSearcher - searcher of the files and folders on the network NETBIOS and FTP resources. Can generate filelist in HTML or any other kind (templates and scripts support) - you can orginize global LAN searching engine using NetView NetSearcher.

ShareScaner quickly creates full NETBIOS and FTP network resources list

NetMessenger - is GUI substitute for command line "net send" with some extra features.

You can view hostlist as detailed grid, list, visual map or even automatically create route-map (using traceroute)

Top


Service mode

This mode is intended for that situations when NetView must not depend on presence of interactively logged user. It can be adjusted on the Service page of the Preferences window. When working as the service depending on that who presently logged in system interface of NetView can work found in two modes - in a privileged mode and in the user mode. NetView runs in privileged mode NetView if the current user (that in whos context explorer's shell window is running) has a access to write to the used settings file NetView.ini. In this mode all possibility of the program are available. The user mode (nonprivileged) enabled if the current user has no access to write to file NetView.ini or if program can not find explorer's shell window (If no users logged in NV works in nonpriviledged mode). Thereby for possibility of such mode is required file system supporting delimitations on rights such as NTFS. Adjustment concerning rights of the users also can bee found on the Service page of Preferences window. Specifically want stops on possibility of the restriction to authentifications of the users with logins and passwords stored in hostlist. If you disable this option you will not be able correct perfom the planned searches of the files in network with using of the login information stored in hostlist. Note that in usual start (not as service) NetView runs in privileged mode. So you must restrict access to NetView's folder for all except system and admins to prevent user from using all possibilites of NV.


Hostlist

Hostlist is the object containing hosts, lines and areas of a visual map. Hosts can be displayed by various colors depending on the current condition: offline, online, opened and alarm. Host is Opened if it opened even once in the current session. Host in Alarm if for it has worked the notification (for example about that that it was switched off). Thus it will be is in such condition while the user will not click on it the mouse. Hosts it is possible to translate from one hostlist to another having specified necessary hostlist in field Hostlist of a window of editing of properties of a computer. It is possible as to include an automatic grouping hosts by name working group or to first three their figures IP of the address. It is set in the main menu > Settings-> Autosplit. In the same place it is possible to disconnect an autogrouping or to send all hosts to the default hostlist. In preferences it is possible to enable option Delete empty lists. The data of all hostlist NetView stores in a file (by default default.nvh). it is better to not climb, but in general its structure is rather obvious. The information of hostlist can be represented in three kinds which can be switched from the contextual menu > Current sublist-> View as: {The context menu} or by keys <-> and <+>

List. Only icons appropriate to conditions of hosts and their names in this case are displayed. The additional information such as IP, the working group, a condition, notes are displayed in the emerging help at prompting a mousy on host.

In details. The information is displayed as the list with columns (a column of names, IP addresses etc). The width of columnes and sort type, saves in a hostlist file and is restored at the following start. Take into account that if hostlist is not saved before an exit and if that is switched off Autosave hostlist in Preferences this information as it will not be kept.

Visual plan. This is a Visual Map mode/ resized by 2 times without possibility to edit map.

Visual map. This mode is intended for visualization of a computer network.

On top


Details

Hostlist :: Details

The description of columns in the Details list

Hostname - a NETBIOS or DNS name of host. Sometimes when host changes it's IP or name you can found duplicated host with names are differs only by DNS suffix. This problem concerns only networks in which it is used DNS. It can be solved installation of tag Clear DNS suffixies in adjustments. Note that you shoul add DNS default suffixies in options of your Windows Networking.

IP address - as is. If not know that this such, but very much want to learn - RTFM. If you do not know and that such RTFM - RTFM.

Server comment - the comment of a server. It is established on the server. It is seen only if at updating the list of machines host was included.

Connection - value in msec delays ICMP of the echo - answer, at included check PINGами, a delay of an establishment of connection, at the included check by connection on the given port, or count of shared resources on host if it is enabled: Enum shares on host.

Custom - the host's comment edited by you. It is kept in a LMHOSTS file.

Last time - time of last opening of a computer, from the moment of start NetView

Last change - time / date of last change online\offline conditions of the host.


Visual MAP

This mode is intended for visualization of a computer network. You can put computers in any place on a map, connect their various lines, set to them various a picture, dependent on a condition хоста. It is possible to unite hosts in rectangular areas, and then having clicked the right button of the mouse on any place of area it is possible to recheck all hosts in it, having chosen item of menu Recheck area. Areas can be dragged on a map having clicked on their name at the left below or to change their sizes, having clicked on any border, thus the cursor will become a dagger. To change the name of area and color of its borders it is necessary to click the right button on its caption and to choose Edit area label. After change of the text and color it is necessary to press Enter, or Esc for a cancellation. Lines on a map are drawn with the help of item context menu [Start line]. The line will be fixed on the screen and from an initial point will start to be drawn new. Repeat this operation so much time, and stop line by right click. For removal of any line simply click on it the with right button and choose Delete line. Positions of the ends of any line can be changed, having clicked on the end the right button of the mouse and having dragged it where it is necessary to click once again for fastening a position. Lines can be various thickness, colors and style. These parameters from the contextual menu - > Edit line are edited. Thus you will get in a window of a configuration of hostlist, all parameters concerning lines will set only the allocated line. A picture representing devices are set at their editing. The sizes of a map and background structure can as be changed, for this purpose it is necessary to click the right button on a map and to choose Current sublist-> Settings. More in detail about a configuration хостлистов it is possible to read here. Devices any way can be dragged on a map. The visual map so (for its(her) creation plag-in Devices was used, it is possible download it here

On top


Route map

Щn a map of routes the circuit of connection of units of a network is shown. It is made by a choice of menu item Retrace all the main menu or by tracing selected hosts through the contextual menu of hostlist. Thus it is necessary take into account that some servers can limit amount of ICMP requests from your host per second that can result in trace not all hosts, many can be not traced. Ii it occoures it is necessary to use item Trace all the main menu - it traces only those hosts, the route up to which was not successfully found yet. Simply press it some times while the amount of units on a map will not cease to be added. The information of this map is kept with hostlist in .nvh a file and can be exported in more readable .txt a format through submenu File of the main menu. The map as has the contextual menu with the basic functions - to open host, to recheck, retrace, to edit, remove from hostlist, to look properties. For the explanatory of their functionality see the contextual menu description. Still there are items of menu Delete from map and Clear route map. The first simply deletes host together with all affiliated from a map of routes, keeping them in hostlist. The second completely clears a map of routes.


Context menu

Hostlist :: Context menu

Appears at click by the right button on hostlist. The presented items of the menu depend on condition of NetView, a condition of hostlist, installed plug-ins and other factors. It looks approximately so:

Open selected - To open selected hosts in a separate window.

Browse selected - To open hosts in a catalog tree of the Windows Explorer.

Open with... - To open with the program specified in Preferences

Resources - This is a menu that opens the list of shared resources on hosts. It is mo easy and faster(especially under Win'2000/XP) to access shares from this menu. NETBIOS, FTP and HTTP resources can be opened from here.

Recheck selected - perfmon hosts's recheck.

Retrace selected - perfmon tracing of routes of selected hosts, updating information about them in a Route map.

Recheck Area - perfmon recheck states of hosts in area on caption of which you have clicked by mouse for open this menu.

Add host - adds a new host in current hostlist using a window of editing host.

Edit selected - opens a window for editing settings for selected hosts.

Delete selected - deletes selected hosts

Start line - Starts to draw a line in Visual map mode
Add line node - Adds new node to the line on wich you've clicked to open this menu
Edit lines - Edit settings of selected lines. Line selected if any of its nodes is selected
Delete lines/nodes - Delete selected nodes of lines. If any line remains whith less than 2 nodes then it will be deleted

Add area - adds new area on a visual map.

Edit area label - allows to edit a label and color of area on caption of which you have clicked to open this menu

Delete area - deletes area in which you have clicked a mousy.

Current sublist - the basic functions of hostlist management

Recheck list - rechecks conditions of hostlist's hosts

Retrace list - will carry out trace of host's routes

Arrange by - sorts hosts in the list by appropriate columns, keeping a grouping by areas. Repeated click it is possible to invert sorting.
Show mini-map - opens mini-map window for easy browsing of large visual map

View as View as a choice of a kind of display of the information

List -

Details -

Visual plan -

Visual map -

Export map - saves image of current visual map/plan to NetView\Export\LISTNAME.gif file

Save as - saves current hostlist in a file .nvh

Add from - loads hosts from specified .nvh a file in current hostlisr, ignoring their initial settings. Are loaded as lines and areas.

Delete sublist - deletes current hostlist together with hosts, lines and areas.

Settings - opens a window of hostlist settings

Send message - opens NetMessenger, in field To: the name of selected host is specified.

Properties - opens a window of properties of host in which the basic is specified information about OS, users, sessions and open ports

On top


edcomp

Editing host

Appears at choice Edit, Add in the contextual menu. Allows to set a name, IP the address and the additional comment for a computer. As there is an opportunity of automatic definition of the IP address by known name of host and a name of host by known IP (resolving). If host has no IP address - leave this field empty. Note that all computers should have diferent hostnames and if IPs are not empty they should be different too!

General settings:

  • Hostlist - hostlist where host is placed. You can move host to another hostlist by changing this string. You can also move host to a new hostlist by entering here name of the new hostlist and it will be created.

  • Custom description - this is your own description of host

  • Image online - bmp or gif image of current theme to be displayed in visual map mode when host is online

  • Image offline - bmp or gif image of current theme to be displayed in visual map mode when host is offline

  • Enable NETBIOS - this option controls whethet netview should use NETBIOS requests to find resources on computer

  • Enable FTP active mode - this option controls whether netview should use FTP active mode requests when to resources on computer

  • Enable FTP passive mode - this option controls whether netview should use FTP passive mode requests when to resources on computer (passive mode can solve some problems with firewalls)

  • Recheck - enable recheck of host. If not enabled host will not be checked. Note that you shuld disable this option if you wish to enabled changing state of this host by linkages

  • Alert on online - raise alert if host state changed from offline to online. Alert event can be used by plug-ins such as Alerter.

  • Alert on offline - raise alert if host state changed from online to offline.

  • Align to grid - align host position to Visual Map grid

  • Link lines - when moving host on Visual Map all lines which ends on the hosts will be moved with it. This mode can me temporary toggled when moving with pressed Shift key.

  • Visible on visual map only - this option usefull for such devices as hub, printers, switch, if you dan't want to see them in list or detatiled view modes

Advanced settings

  • Skip N global timer rechecks after every recheck - this option enables you to set individual recheck interval for any host. Recheck will occurs only after every N timer rechecks.

  • Override global recheck setings - enables individual recheck settings for host

  • Use ping - recheck host using ping with individual retries count and timout value in msec, even if in Preferences port recheck is enabled.

  • Use TCP port - recheck host using port scan to individual port number, even if in Preferences ping recheck is enabled.

  • Dynamic IP - this option forces NetView to resolve host's IP on every recheck.

  • Static host - this option tells NetView do not change host's name and IP automatically

  • Default user\password - username and password to be used to connect to host by NETBIOS and by FTP. If not set than default login will be used. (windows login for NETBIOS and anonymous for FTP)

  • Open command - you can specify custom command to perfom on doubleclick on host. Also it is possible to open only hostlist on doubleclick - just enter here hostlist://hostlistname. Next wildcards allowed: %HOSTNAME% - hostname, %HOSTIP% - host's IP address, %HOST%- hostname or host's IP depend on current flobal settings, %USER%, %PASS% - specified user and password. Other special commands and be entered here: "edit","recheck", "retrace" - for edit, recheck or retrace host by double click. Id you wish to start executable enter here something like "exec:telnet.exe %HOSTNAME%". If you wish that some hostlist will opens by double-click on host type here "hostlist:yourhostlistname". Also it is possible to notify plugins and scripts about host double-click: enter here string like "hostmsg:123" - on doubleclick on such host NetView sends notification message NMPN_GETRESLIST, with wParam set to specified integer (123), lParam set to host's id.

Linkages

  • Specify here other host to link this host to them. This host will be online while any of the specified here hosts is online. This host will be offline if all specified here hosts are offline. Note that linakes works when Recheck option on the General settings page is disabled.


Hostlist settings

Visual MAP :: Hostlist settings

Open from contextual menu Current sublist-> Settings or at editing properties of a line.

Hostlist name - as is.

Hostlist theme - a theme of a visual map. Actually - the subfolder in NetView\Themes with textures and hosts images

Map width/heigh - size of the visual map image

Horizontal/vertical grid size - size of the grid used to accomodate positions of the all objects on map

Line type - type of a line. For example twisted pair, coaxial or telephone pair.

Line length

Line speed - speed of data transmission.

Line note - any comments.

Contents of these fields appear in the help at prompting by a mousy on a line. As can be used by plugins. For example for leading statistics on a map.

Line end by - as the ends of lines - with a circle, a square, a triangle or without figures will look.

Line style, Line color, Line width - style, color and thickness of drawing of a line.

Draw grid - a basic grid of a map. To it all objects become attached.

Pseudo 3d - line will have smooth color gradient from center, emulation 3D shadow

Directed - line will have width gradient from beginning to the end, Gradient direction can be switched from context menu. Note that latest 2 option have a sense only for rather thick lines (more than 5 pixels widths)

Also you can change hosts colors and color of default hostlist background (if no texture used with theme5)

Take into account that at editing properties of a line, all parameters concerning lines will be will change for it one. At editing sublist settings - parameters by default drawing of lines change.

List columns - here you can delete or add new columns to list and specify metavariables to be shown in every column


Metavariables

Hostlist :: Metavariables

Hosts in hostlist - objects which can contain any variables with free names. All information about hosts, except name and IP address, NetView keeps in such variables. If name of metavariable begins from character ! then NetView will store variable on disk during run time. Some these variable used to keep host's adjustments, some others - additional information about hosts. You can specify metavariables to be displayed as columns in detailed view mode. Direct access to this variables you can get from scripts, plugins or other programs via nvapi.dll, wich can be found in system directory after installation of NetView. Here is incomplete list of some metavariables, which are used by NetView:

map | Hostlist name where host will be displayed.
addtm | When host was added to hostlist. F.e. "20:34.07 2002/12/02"
lchtm | Time and date when host stated was changed last time
left | X host's position on visual map [int]
top | Y host's position on visual map [int]
pipo | Individual specified recheck method. 0 -by ping, 1 -port scan, 2 -port scan, if no ports found - ping. Used when bit flag 0x20 is set in metavariable "flags"
stport | Individual specified port list in format port1;port2;...portN - up to 8 ports. Used when bit flag 0x20 is set in metavariable "flags"
scan | List of opened ports found during last recheck scan. In format port1;port2;...portN
stpdel | Individual specified timeout when checking by ping. Used when bit flag 0x20 is set in metavariable "flags"
wgrp | Workgroup or domain
sdesc | Host's self comment
cdesc | User specified comment
ison | Host's state. Can be "on","off","?"
!route | Route to the host in format "IP1|hostname1/IP2|hostname2/.../IPend|hostnameend/"
image | bmp or gif image to display on Visual map when host is online
ofimg | bmp or gif image to display on Visual map when host is offline
ctime | This is displayed in Connection column
!nbcache | NETBIOS resources cache
!ftpcache | FTP resources cache
!dwlnk | Hosts list to be used as linked to this (when bit 0 in flags is off) In format - хост1|хост2|хост3|...|хостN| - you can specify here both hostnames or IPs.After changing this metavariable (or after changing many such variables of different host) in order to apply changes you shoud use NMPN_ACTION with flag NVACTION_SETSTATE - after this dependencies will be rethinked and stored to the downlnk и uplnk metavariables (don't change this variables manually)
flags | Bit mask with different host's adjustments. [DWORD]:
 | $1 - Enable host recheck
 | $2 - Enable linking host position to visual map grid
 | $4 - Enable lines nodes linking when dragging directly this host
 | $8 - Enable alert when host goes Online
 | $10 - Enable alert when host goes Offline
 | $20 - Use individual recheck settings instead of global
 | $40 - Open command stored in "opcmd" by doubleclick
 | $80 - Dynamic IP option is enabled
 | $100 - Static entry option is enabled
 | $200 - NETBIOS is disabled
 | $400 - FTP Active mode is enabled
 | $800 - Host is visible only in Visual map/plan view modes
 | $1000 -FTP Passive mode is enabled


File

Main menu :: File

Create new hostlist - Creates new hostlist. Note that all hostlists are stored in one file - per-host splitting is logical.

Add from hostlist - adds data from specified file-hostlist

Save hostlist - saves hostlist to default file

Save hostlist as - saves hpstlist to file path and name of the file you can choose by dialog

Save tracemap - saves route map to text file


Action

Main menu :: Action

Force recheck - will carry out recheck of the list. If autorefresh is enabled in Preferences then list refreshes to.

Refresh all lists - refreshes hostlist. Will carry out interrogation of a network if it is enabled in Preferences.

Recheck all lists - rechecks hosts. Check is set given in Preferences by a method if for host's individual adjustments are not specified. (see Editing host)

Retrace all lists - will carry out trace of routes for new host, wich are not traced yet. If you want anew trace a routees for old hosts, simply remove them from a map of routes. (Route map) Or use the context menu.


Settings

Mein menu :: Settings

Autosplit - Enable/disable automatic hostlist splitting:

By workgroup - By workgroup. Note that not always workgroup information is accessible.

By IP segment - By first 3 digits of IP address

No autosplit - If you want to have possibility to manually change hosts's hostlist use this option.;[Edit selected]

Send all to [Default] - Disable autosplit and move all hosts to Default hostlist.

Hide offline - Hide offline hosts from hostlist without deleting them.

Autohide - NetView will automatically minimizes to small piece of window tile when inactive.

Always on top -

Preferences - Opens main program settings window


Preferences

Program adjustments (Preferences)

The Window is accessible from menu Settings-> Preferences.

General

Autosave settings - saves settings of the program in INI a file automatically at an exit from the program. By default INI file is in the folder %USERPROFILE %\Application Data\NetView\NetView.ini for WIN'NT/2000/XP or in folder WINDOWS in Win9x systems. You can change placement of ini file to NetView's folder by creating ini in NetView's folder before starting it.

Autostart on windows startup - automatically start NetView at system startup.

Low priority while starting - sets priotity of thread that loads hostlist to lowest level, for smoother startup.

Minimize to tray - enables an icon in tray, which image depends on state of NetView. Right click on an icon it is possible to access the context menu with a set of the basic functions. If at you the three-push-button mouse you can open NetWatcher by a clique on the middle button on a tray icon.

Minimize on close -minimizes NetView to tray on close main window

Don't show message boxes on errors and warnings - "silent" mode at which netview does not show any messages. It is useful for autonomous work.

Startup by autostart delay - helps to remove problems with the postponed start of drivers. (When netview it was started and the network still is not present Ж:-)).

Hostlists options.

Here you can specifi path and name to file in wich all information about hosts, hostlists, lines and areas will be stored. This file also automatically loads after NetView starts. Having pressed button Edit you can edit a file in Notepad. Provisional lines from a file:

*NetView hostlist created on 2003/1/12 at 19:42.8

192.168.7.10 killer ** some_stuff * -

ipxhost ** some_stuff* *

$list$192.168.x.x ** UTP Cat5E*

It It is better do not touch some_stuff

Re-read hostlist - by enabling of this option NetView will re-read hostlist from a file at every refresh

Autosave hostlist - by enabling of this option NetView will keep hostlist at every refresh

Don't backup hostlist - by default NetView creates two backup copies of .NVH file on startup. Checking this options forces NetView do not backup hostlist

Edit default settings for newly added hosts - click here for edit settings for new hosts that are added by hostlist refresh, from Network scaner, NetWatcher or plug-ins and scripts. For example you can change default hostlist where new hosts appears automatically after addition from Default to something other.

Automatically clear following DNS suffixies: - Specify here what DNS suffixies should be delete automatically from hostnames. Enter here * to delete all suffixies or enter some suffixies divided by character ';'. For example "home.org;our.net"

Visual map host image max size: - specify here maximum size of host's images. Any images that will be larger will be automatically resized to match this size.

Highlight opened in this session hosts for: - NetView highlights hosts that was opened for specified here period of time after opening. Highlighting will be reset on next recheck.

Autosort hostlist - After every recheck all lists, which not in Visual Map mode are automatically sorted.

Show notes as caption - If hostlist in Visual map/plan view mode this option enables displaing of host's notes as caption, instead of hostnames.

Alternative Visual map middle scroll - You can scroll visual map by pressing middle mouse button and moving mouse. This option inverses scrolling direction and increases scrolling speed.

Raise alert if any host changed state to online - a global mode of the notification about host's goes online

Raise alert if any host changed state to offline -a global mode of the notification about host's goes offline

Opening options

Open using hostname - opens machines by their names. All the same that you will enter in Run \\ hostname. The maximal compatibility.

Open using IP address - opening occurs by IP address that works faster on NT/2000 systems. Under win95 it similar at all does not work. Under 98 and ХР works, but more slowly than by name. Sometimes, in multisegment networks, with incorrectly adjusted name server it is impossible to open hosts by their names. By IP, as a rule, all works fine.

Open in Window - opens computers by default (by doubleclick or ENTER) in a window

Open in Explore - /../ In a catalog tree of Windows Explorer

Open in Custom program - -/../In the mentioned below program, for example, Total Commander.

Open normal - the window opens in a normal size

Open maximized - /../ maximized

Open minimized - /../ minimized

Force recheck on opening - rechecks host state before opening

Open offline -tries to open a computer even if at last recheck it was offline

Don't show hidden resources - disables NetView's ability to search hidden shares (that wich names are ended by '$')

Single click open -To open hosts by single mouse click. Some people likes this.

Try firstly FTP passive mode connection - by default, if both active and passive FTP modes enabled NetView tries firstly Active mode. This option forces NetView to try Passive mode at first.

Random auto-authorization user-name: - if NetView gets Access denied error on shares enum its tries to connect to host with specified here logon username, where '#' charachter repleced with and random digit. If you specify here empty string then NetView will not try to logon under other username. This can be usefull in domains or if remote system has account-locking feature enabled.

Recheck

Optimize Windows TCP/IP stack - by default WIndows uses ports numbers from 1024 to 5000 for outgoing connections, and, besides, every used port number blocked for consequenced using for 240 seconds. This limits can cause problems with allocating many sockets at once, how NetView does. Enabling this option forces Windows to use port numbers from 1024 to 65534 and free port after 30 second after closing socket.

Using scan ports -check will be perfomed by attempt to establish TCP connection with given IP addresses on the given port. If specify port 139 (by default) - all machines on which the NETBIOS over TCP/IP service is enabled will be shown ad online. If specifi here port 80 - that you find out addresses of all online HTTP servers. Common TCP ports you can read the list in file COMMPRTS.TXT and in file CPORTS.LST - this file is the basic the list of comments to ports for NetView and in all ports are marked with + will be listened by IP logger'ом. You can specify here up to 8 ports, divided by charachter ';' and learn what ports are opened by looking for value of metavariable "scan"

Maximum simultaneously opened sockets: -Specify here how many simultaneously opened sockets NetView can use for recheck by port scans. Decreasing this value takes more time for perfoming recheck, but decreases load to routers and your system and intensifies reliability of recheck.

RAW sockets for port scans - by default when perfoming rechecks with port scanning NetView creates socket for every scanned object and calls connect() API. When enabling this options NetView creates only one RAW socket for scanning of all objects - this saves system resources, but RAW sockets accessible only on Windows 2000 and higher and only if NetView started by local system administrator or is running as the service. Warning: this option can work inproperly if firewall is running on your machine. So if after enabling this options all hosts switched to offline - disable it.

Using ping -check will be carried out by pinging IP addresses by ICMP echo request with 32 bytes of data and the given waiting time of the answer. Check will be carried out tries times up to the first answer. If answers are not received - host is offline

Try ARP request if ping recheck failed - this option enhances PING recheck: if host from your segment don't reply on pings then NetView will test if host reply on ARP requests. Not recommended for usual using because it uses broadcast ARP packets. Enable it only if you really know what you want.

Force host's recheck by IP packet, initiate delay: -this option is allowed only on Windows 2000 and higher and correctly working only if NetView started by Administrator or Local system account (as service). When this option is enabled NV will force rechecking of any checkable offline host by receiving IP packet from it. Such forced by IP packed recheck can occurs only one time after every global recheck. So NV can practically momentally reacts on events of any host turned on, if it sends any packets that arrives host where NV is running. Host's recheck will be forced after specified here count of milliseconds after receiving an IP packet from it. Warning: this option can work inproperly if firewall is running on your machine.

Resolve host's IP before every recheck- This option is neccesary in DHCP networks, if enabled IPs of all hosts will be automatically updated before every recheck

Automatically initiate flobal recheck every ## seconds - will carry out automatic recheck of the list by the timer every ** seconds. Take into account that for hosts in the individual order it is possible to establish count of missed global rechecks. It allows to set the various periods of rechecks

Autorefresh - updates the list of machines after every list recheck by interrogating a network and re-reading .NVH (if enabled).

Disable searching for new hosts on startup - do not interrogate a network on presence hosts at start. At the list there will be only those hosts, which are in a .NVH file. This mode temporarily can be toggled on startup by pressing SHIFT at start of the program and having released at the beginning of recheck.This option is recommended to be checked if you want to have maximum reliability do not lost hosts from hostlist.

Look for hosts only in specified workgroup - alternative method of interrogation of a network, available only under Win'2000 and higher. Allows specifing workgroups where NetView will search for new hosts, also when using this mode NetView retrieves and stores to metavariable "os" information about what OS is installed on found hosts.

IP to hostname scan and conflicts resolve method: - Method which NetView will use for determination of the hosts's names by their IP addresses in different situations. The possible variants are Standard, using NETBIOS and their combinations. The Standard method tries to resolve the host's name on by its IP address using DNS reverse lookup or by WINS. In general results of this this method depends on configuration of DNS or WINS server of the network, rather then from that as user of the target computer has named its computer that can cause some problems. Method of the determination of the host's name by NETBIOS'а works only if this NETBIOS is enabled on that host and if it will give you this information. But then this name will exactly that name under which host is visible in Windows Network and besides this method can work quicker than standard. Combinations of methods can be used to try in the beginning to define the name by using of standard method and if failed - then by NETBIOS or on the contrary.

On top


Plugins

Main menu :: plug-ins

Here you can load/unload, configure and enable/disable plag-ins autoload on startup. Use plug-ins list context menu. To install plug-in you should copy its files so, that plug-ins main dll should be placed in NetView\Plugins\ folder then restart NetView. If plug-in supported but your NetView version - it will be added to plug-ins list and will be available for loading. Note that plug-ins configuration will be available only after hostlist first loading and recheck.

The lates plug-ins version can be found here.

How to write your own NetView plug-in: read


Tools

Main menu :: Tools

  • NetSearcher
  • Resources scaner
  • NetMessenger
  • Connect network drive
  • Disconnect network drive.

NetSearcher, allow starting of several instances. For this use the context menu of the corresponding tool button. Or press the menu item with pressed key SHIFT.


Windows

Main menu :: windows

WIndows switching, realigning etc..


Help

Main menu :: ?

You are here [image] Also in this menu you can find all .chm files placed in \Help folder


NetSearcher

It is a network file searcher files, allowing to search for files and folders by the given masks (to several simultaneously), and by the filesize. It is possible to edit the list of hosts subject where to search to keep results of search in a text file or in html a kind with references. Search can be perfomed in a cyclic mode - while all specified machines will be scanned. Also you can schedule NetSearcher to search every 10 o'clock for example ans searcher will add new files and delete old after every search. Also searcher can save list of found files in plain text, HTML page or by template. Searcher can search both in NETBIOS and FTP resources. Also scripts supported - you can create true search center based on NetView NetSearcher.Search settings can be kept in presets and then quickly loaded. Now is little bit more detailed:


NetSearcher::Settings

NetSearcher :: Settings

Settings sheet

Recheck hosts - to recheck host before searching on itfor files. Saves time, if thereis many the switched off machines in the list.

Cycled searching - a mode of cyclic search at which search will be permon cyclically while for all hosts will not be Searched = "yes" or while search will not be interrupted manually by pressing of button " Stop "

Max directory tree depth - Maximum folder tree depth were search. For ftp servers root is the server, for NETBIOS resourcses - share is the root.

Save filelist on finish - if enabled filelist will be saved automatically after the ending of search process.

Time limit - restriction of time on scanning of one host. If any host search time is greater than specified here value - it will be automatically skipped (field Searched will be set to "yes").

Autosearch on - If you want to schedule search process on any time enable this option and enter times when to start search in the line under. For example "08:10;16:30;12:45"

Threads count - the amount of threads of simultaneous search (each stream scans separate host simultaneously with others, that accelerates search, but on slow systems with established Win 9x a plenty of threads considerably can slow down system perfomance or result in crash of system) is maximum.

Thread priority - a priority of threads. Small value slows down search at simultaneous performance of other programs, big - slows down other programs.

Use script - Enables script from \Scripts\Searcher that can get and store results of the search process in real-time.

No filelist mode - Disables keeping of filelist by NetSearcher. Results can be saved only by scripts. Usefull for large filelist that requires too much RAM for keeping in memory.

Enable list update mode - if list-update mode is enabled then after every completed search session results will be automaticalli saved to special .sfl file and on the next search automatically loaded.

Delete if not found on searched - Check after search completed if there are any files that where deleted on successfully searched hosts

Show files as new for - all files that was found not earlier than ... hourse will be displayed in HTML list as highlighted.

Show files as new for - all files that was found not earlier than ... hourse will be displayed in HTML list as highlighted.

Delete files if not refreshed for - after search completes NetSearcher will look filelist for files that was not found in network more than ... hourse and delete them.

On find file...

Copy to destination path - to copy the found files in the specified directory

Start program - to start for the found files the specified program. A format of a command line: !list - inserts a name filelist with the found files (it is created automatically) !dest - inserts the catalogue of purpose(assignment) from Destination path !src - the initial file subject to copying (single).

On top


NetSearcher::Установки

NetSearcher :: Options presets

Here you can save all search settings to preset, load previously saved preset or delet some saved presets.


NetSearcher::Filter

NetSearcher :: Filters

Filters

Search for: - what to search - for files, folders or both

Filesize MIN: ##1 MAX: ##2 ##3 - restriction on the size for the found files. Files of other sizes are passed(missed). If in a field of a choice of units of the size of a file to choose last item(point) No size the size of a file will not be interrogated, that accelerates search a little

Search masks - masks for search. For example *.avi search for all files with expansion avi, cool*.mp3 - searches for all files which name begins on cool with expansion mp3 etc. Special mask characters as *, ? supported..

Only if path include - to include a file in the list only if the way to a file contains one of the specified fragments. Special mask characters as *, ? not supported.

Only if sharename include - to search only in resources in which names there are specified fragments. In other resources search is not made, that allows to speed up search *.avi files, having registered here values media, video, film etc. Special mask characters as *, ? not supported.

Skip if path include - do not search in pathes which specified fragments found. Special mask characters as *, ? not supported.

HostTable -it is the list of the machines subject to search. Edit it you can using the contextual menu on a clique the right button. Special value has field Searched. Host it will be scanned only if its value distinctly from yes. If host already was once scanned or missed because of a limit of time or a mistake during search this field for it it is exposed in yes. To edit it is possible through the emerging menu > Set SEARCHED


NetSearcher::save

NetSearcher :: Save filelist

Below HostTable you can find list of the found files. If you want to save it to file just right-click on it and select "Save list to file".

Save filelist window has following preferences:

File - path to the filelist, can contain the wildcards %d and %t for insertion of the date and time accordingly. NetView will create folder automatically if needed.

Encoding - Choose encoding type here

Type - filelist format: text, html, or by specified templates

Enable PING buttons - Enable PING button in HTML hostlist, to make possible to check every host directly from HTML page before tring to open link

Enable KILLCOPY buttons - Enable KillCopy is a program for file download over network. To correctlt work KillCopy v2.42 should be installed.

Add hostlist in beginning - list of the hosts where search was perfomed will be added at the beginning в начало файллиста

Autoadjust columns width - automatically calculate best columns width.

Templates

Saving by temlates possible when enabling corresponding option.

There are 4 templates - Main, Host entry template, File entry template, New file entry template (see list-update mode)

  • Main template - presents itself general skeleton of the resulted html file. It can contain following wildcards (without quote):
    • "%d%" - inserts current data
    • "%t%" - inserts current time
    • "%totalhosts%" - inserts total hosts count in Hosttable
    • "%searchedhosts%" - inserts total successfully searched hosts count in Hosttable
    • "%pathwidth%" - inserts width of the column of file pathes
    • "%namewidth%" - inserts width of the column of file names
    • "%sizewidth%" - inserts width of the column of file sizes
    • "%hostentries%" - Inserts hosts sequence created by Host entry template
    • "%fileentries%" - Inserts filess sequence created by File entry templates

  • Host entry template - presents itself element of the hosts list, inserted at %hostentries% of Main template. It can contain following wildcards (without quote):

    • "%hostname%" - inserts host name
    • "%searched%" - inserts "yes" or "no" depending on search success

  • The Usual template and template of the new file - presents itself element of the list of files inserted in the general pattern on place %fileentries%. Depending on that file is new or no corresponding template is used. He can contain following official sequences (without quote):
    • "%hostname%" - host name where file is placed
    • "%path%" - path to file. For example "\\hostname\share\path" or "ftp://server/path/"
    • "%pathurl%" - path to file in the form, acceptable as url by browsers. For example "\\hostname\share\path" will appear as "file://hostname/share/path"
    • "%name%" - file name
    • "%pathname%" - path and filename together
    • "%pathnameurl%" - path and filename together in the form, acceptable as url by browsers.
    • "%pathjs%" - path to file that can be used by javascripts. "\" exchanged by "\\" and "'" exchanged by "\x27"
    • "%namejs%" - filename that can be used by javascripts.
    • "%pathnamejs%" - file pathname that can be used by javascripts.
    • "%size%" - file size
    • "%pathwidth%" - inserts width of the column of file pathes
    • "%namewidth%" - inserts width of the column of file names
    • "%sizewidth%" - inserts width of the column of file sizes


Share scaner

Resources scaner

This tool can be generally used for two aims:

  • Creating list/tree of NETBIOS/FTP/HTTP resources. Note that in order to enable HTTP servers discovering you should go to the Preferences window and enable checkbox Opening\Detect and show HTTP... You can save resulted list to text file (it will be placed in \Export folder or open/connect as network drive any resource)

  • Automatically detecting FTP and NETBIOS settings of hosts in hostlist - using scan ports 139,445 - for NETBIOS and 21 - for FTP

  • Can cache scan results and can quickly show cached results by mask.


NetMessenger

Can send the messages to computers with installed WIN'NT/200/XP, on which Messenger service is started, (it is enabled by default system installation). Messages can be sent from any username (this function works not under all Windows). The option "Monitor incoming" controls the Messenger service - unchecking this checkbox will lead to stopping Messenger. By checking "Use NetView monitoring" you enables built-in NetView's monitor of the messages which works through mailslots. Under Win9x NetView also can receive message with this option enabled. The option "Enable flood filtering" will allow to filter the constantly repeated messages from one sender.


NetView plug-ins

NetView has a support of plug-ins - an additional modules, extends its functionality. For example possible create the detailed database on network and its users, add to NetView pissibilites to check on network through SNMP, conduct monitoring of traffic working the users and else much what to then unite all this in interface of one program. You may liberally write own plug-ins for NetView, references to freeware plug-ins I with pleasure place on my web site. Also NetView gives API other program for access to given хостлиста. It Is Done this by function exported from NVAPI.DLL. You can find nvplugn.h with all defines and additional techical info in folder of installed NetView:

Working with NetView from external programs

General principles

Interraction with hostlist

Menus and plug-ins

Notification NMNP_ALERT, NMPN_ACTION и NMNP_ACTION messages


NetView API

NetView plug-ins :: Accessing NetView from external programs (API)

Any program can get access NetView hostlist or even contribute the changes to hostlisr or control functioning of NetView by using of function exported by nvapi.dll. Below you can find the list a function and their parameters. Functions which change hostlist data can not work(marked by +слева) or has limited functionality(+) if you process works in nonprivileged mode. This feature can be adjusted in general NetView settings on the Service page. Other functions can be accessible always when NetView is running and if API enabled for nonprivileged applications(+). И Note that functions of the access to lines, areas and hostlist objects possible will be changed in the future . Though sooner whole these functions will remain for inverse compatibility but new, more universal functions will appear.

DWORD __stdcall NVGetNetViewStatus(void *Reserved);

DWORD __stdcall NVAction(void *Reserved, DWORD wp, DWORD lp);

DWORD __stdcall NVSetEventHandlerProc(void *HandlerProc);

DWORD __stdcall NVGetHostByTextA(void *Reserved, char* Txt,DWORD Flags);

DWORD __stdcall NVGetHostA(void *Reserved, NVHOST* Hst,DWORD Flags);

DWORD __stdcall NVSetHostA(void *Reserved, NVHOST* Hst,DWORD Flags);

DWORD __stdcall NVDelHostA(void *Reserved, NVHOST* Hst);

DWORD __stdcall NVGetMetaVarA(void *Reserved, DWORD HostID, char *VarName, char *DataBuff, DWORD *BuffSize);

DWORD __stdcall NVSetMetaVarA(void *Reserved, DWORD HostID, char *VarName, char *DataBuff, DWORD BuffSize);

DWORD __stdcall NVGetListByTextA(void *Reserved, char *Txt,DWORD Flags);

DWORD __stdcall NVGetListA(void *Reserved, NVLIST* Lst);

DWORD __stdcall NVSetListA(void *Reserved, NVLIST* Lst);

DWORD __stdcall NVDelListA(void *Reserved, NVLIST* Lst);

DWORD __stdcall NVGetLineA(void *Reserved, NVLINE *Ln);
DWORD __stdcall NVSetLineA(void *Reserved, NVLINE *Ln);
DWORD __stdcall NVDelLineA(NVLINE *Ln);
DWORD __stdcall NVGetAreaA(void *Reserved, NVAREA *Ar);
DWORD __stdcall NVSetAreaA(void *Reserved, NVAREA
*Ar);
DWORD __stdcall NVDelAreaA(void *Reserved, NVAREA *Ar);

+DWORD __stdcall NVGetNetViewStatus(void *Reserved);

Returns value of the type DWORD major half HIWORD(ret) which - a version of working NetView (majot\minor bytes - major\minor parts of version), minor LOWORD(ret):

  • 0 - if process can't access NetView
  • 1 - process can access NetView in read-only mode
  • 2 - process has full access to NetView
  • Reserved - reserved. Set to NULL

Наверх

+DWORD __stdcall NVAction(void *Reserved, DWORD wp, DWORD lp);

Multifunctional API. Action codes in wp:
  • NVACTION_RECHECK- Recheck host. lp=host id to be rechecked
  • NVACTION_RECHECK|NVACTION_LIST - Recheck all hosts of specified list. lp=list id or NULL to recheck all hosts
  • NVACTION_RETRACE- Retrace host. lp=host id to be retraced
  • NVACTION_RETRACE|NVACTION_LIST - Retrace all hosts of specified list. lp=list id or NULL to retrace all hosts
  • NVACTION_OPEN - opens host with id =lp
  • NVACTION_EDIT - edit host with id=lp. Returns 0 if edit canceled
  • NVACTION_IMGEXPORT - initiate export to gif image of the visual map of list with id=lp
  • NVACTION_SETSTATE- Updates state of the host. Necessary after some changes of hosts metavariables. lp = host id
  • Reserved - reserved. Set to NULL

Наверх

+DWORD __stdcall NVSetEventHandlerProc(void *HandlerProc);

Installs the event-handler proc for different NetView events. Each process can have only one such handler. If HandlerProc=NULL than handler is switched off. The Handler proc must be declared as follows:

  • LRESULT CALLBACK HandlerProc(DWORD msg, DWORD wp, DWORD lp, DWORD tm); and return 1.
    • msg = NMNP_ALERT
      • NVALERT_NETWATCHER - NetWatcher's event. If (wp && NVALERTMASK_CANCEL)==0 then sombody connected, else - disconnected. lp means id of the connected host host or NULL. Also next bitmask flags can be specified: NVALERTMASK_NWBLACK - host from kick list, NVALERTMASK_NWWHITE - host from keep list
      • NVALERT_ALARMHOST - alertable host changed its state.
        if (wp && NVALERTMASK_HOSTUP)!=0 then host gone online
        if (wp && NVALERTMASK_HOSTDOWN)!=0 then host gone offline
        if (wp&& NVALERTMASK_CANCEL)!=0 - user clicked alerted host
      • NVALERT_TERMINAL- Terminal accepted or closed connection lparam -id of the connected host or NULL.
        if(wp&& NVALERTMASK_CANCEL)!=0 then somebody diconnected, else - connected.
      • NVALERT_REDIRECTOR- Port mapper event, the same as Terminal's
      • NVALERT_IPLOGGER -IP logger event Check with && presentce of the following bitmask flags:
        • NVALERTMASK_ILLIST - somebody connected to listened port
        • NVALERTMASK_ILICMP - ICMP flood
        • NVALERTMASK_ILSYN - TCP SYN flood
        • NVALERTMASK_ILUDP - UDP flood
    • msg = NMNP_ACTION
      • NVACTION_LIST. lp is list id or NULL. Check wp for next bitmask flags:
        • NVACTION_GETFROMNET - list refresh completed with using of network
        • NVACTION_GETFROMFILE - list refresh completed with using of file
        • NVACTION_RECHECK - list recheck completed
        • NVACTION_RETRACE - list retrace completed
      • NVACTION_ACTIVATE -NetView (de)activated. lp means wParam of the got WM_ACTIVATE
      • NVACTION_MENUPOPUP -menu popup notification, lp:
        • NVMENUFLAG_MAIN - Plug-ins menu
        • NVMENUFLAG_CONTEXT -hostlist context menu
        • NVMENUFLAG_TRAY -icon context menu
      • NVACTION_IMGEXPORT - visual map/plan export to gif image completed
    • tm - time when event was occured
  • Reserved - reserved. Set to NULL

Top

+DWORD __stdcall NVGetHostByTextA(void *Reserved, char* Txt,DWORD Flags);

Returns the host id by its name or IP address. Can create new host if can't find matching

  • Reserved - reserved. Set to NULL
  • Txt - host's name or IP
  • Flags - you can specify next bitmask flags
    • +NVOBJ_FORCENEW - to create new host
    • +NVOBJ_HOSTNOIP - by default with NVOBJ_FORCENEW NetView tries to determine IP address by given name. If you specify also this flag you forces NetView to add host without IP address

Наверх

+DWORD __stdcall NVGetHostA(void *Reserved, NVHOST* Hst,DWORD Flags);

Gets the information about host by its identifier or gets the information about the first host in list that allows to enumerate all hosts.

  • Reserved - reserved. Set to NULL
  • Hst points to NVHOST structure with specified Id of the host to get info or you can specify id=0 if you want to get first host. By using nextid you can enumarate hosts.
  • Flags can be 0 or NVOBJ_SELECTED. NVOBJ_SELECTED forces to enumerate only selected by user hosts.

Top

+DWORD __stdcall NVSetHostA(void *Reserved, NVHOST* Hst,DWORD Flags);

Can change specified or add new host. Returns host id.

  • Reserved - reserved, set to NULL
  • Hst points to NVHOST with specified id. You can specify id=0 if you want to add new host. Also you must initialize all fields except nextid. NetView в NetView can return id of the existing host even you try to add new if its IP or hostname matches with specified by you;
  • Flags - reserved, set to NULL.

Top

+DWORD __stdcall NVDelHostA(void *Reserved, NVHOST* Hst);

Deletes host from hostlist.

  • Reserved - reserved, set to NULL
  • Hst points to NVHOST with specified id

Наверх

+DWORD __stdcall NVGetMetaVarA(void *Reserved, DWORD HostID, char *VarName, char *DataBuff, DWORD *BuffSize);

Gets metavariable of the host. If host not found returns 0, if not enough memory returns 2, if all ok returns 1.

  • Reserved - reserved, set to NULL
  • HostID - id of the host wich variable we want to retrieve
  • VarName - NULL terminated variable name.
  • DataBuff - points to buffer where to store variable data. Note that data will not be NULL terminated
  • BuffSize - points to DWORD variable. Before call set it to the real size of specified buffer, on return it will be equal variable length and may be greater than buffer, you has specified

Наверх

+DWORD __stdcall NVSetMetaVarA(void *Reserved, DWORD HostID, char *VarName, char *DataBuff, DWORD BuffSize);

Changes host's metavariable by host id and varname.

  • Reserved - reserved, set to NULL
  • HostID - host id
  • VarName - NULL terminated metavariable name.
  • DataBuff - buffer with data. Data can be any bytes;
  • BuffSize - data length

Top

+DWORD __stdcall NVGetListByTextA(void *Reserved, char *Txt,DWORD Flags);

Returns the identifier existing sublist, can also create the new sublist. Returns the identifier of the sublist in the event of success or 0 in case of failure.

  • Reserved - reserved, set to NULL
  • Txt - hostlist name
  • Flags can be 0 or +NVOBJ_FORCENEW when you wish create new list if can't find matching.

Top

+DWORD __stdcall NVGetListA(void *Reserved, NVLIST* Lst);

Gets data about list by its identifier which is specified in стркутуре Lst. Similarly as NVGetHostA allows to enumerate all list. Returns the identifier of the list in the event of success or 0 in case of error.

Top

+DWORD __stdcall NVSetListA(void *Reserved, NVLIST* Lst);

Changes list setttings. Returns list id if success or 0 if error

Top

+DWORD __stdcall NVDelListA(void *Reserved, NVLIST* Lst);

Deletes list by specified id in Lst. Return 1 on success, 0 on error.

Top

+DWORD __stdcall NVGetLineA(void *Reserved, NVLINE *Ln);

Get line setting by its global index. Returns total lines count at call time. Use index=-1 if you only want to get lines count.

Top

+DWORD __stdcall NVSetLineA(void *Reserved, NVLINE *Ln);

Sets the information about line by its index specified in Ln. If index=-1 than new line will be added. Function return total lines count or 0 in case of error.

Top

+DWORD __stdcall NVDelLineA(void *Reserved, NVLINE *Ln);

Delete line.

Top

+DWORD __stdcall NVGetAreaA(void *Reserved, NVAREA *Ar);

Gets info about area by its identifier which is specified in стркутуре Ar. Similarly as NVGetHostA allows to enumerate all areas. Returns the identifier of the area in case of success or 0 if an error occured.

Top

+DWORD __stdcall NVSetAreaA(void *Reserved, NVAREA *Ar);

Installs all given about specified area. Note that on one list cann't exists 2 areas with the same names. Returns identifier in case of success, 0 if error occured, -1 if there is exists area with the same name on the same list

Top

+DWORD __stdcall NVDelAreaA(void *Reserved, NVAREA *Ar);

Delete area. Return 1 on success, 0 on error.

Top


NetView API

NetView API :: Sample program to access NetView

/*

This program being compiled in MS VC6.0 as console Win32 application gets and show from working NV list of hosts, their states, writes, reads then deletes test metavariable, then switches to mode of the waiting NV events, showing event codes, parameters and times. Used API functions: NVGetHostA, NVGetMetaVarA, NVSetMetaVarA, NVSetEventHandlerProc, NVGetNetViewStatus.

(с)Killer{R}, 2004

*/

// nvcall.cpp : Defines the entry point for the console application.
//
#pragma pack(1)
#include "stdafx.h"
#include "windows.h"
#include "nvplugn.h"
#include "malloc.h"
typedef DWORD (WINAPI *NVGetHostx)(void *Reserved, NVHOST *nvh,DWORD flags);
typedef DWORD (WINAPI *NVGetMetaVarx)(void *Reserved, DWORD HostID,char *VarName, char *DataBuff,DWORD *BuffSize);
typedef DWORD (WINAPI *NVSetMetaVarx)(void *Reserved, DWORD HostID,char *VarName, char *DataBuff,DWORD BuffSize);
typedef DWORD (WINAPI *NVGetNetViewStatusx)(void *Reserved);
typedef DWORD (WINAPI *NVSetEventHandlerProcx)(void *proc);

NVGetHostx NVGetHost;
NVGetMetaVarx NVGetMetaVar;
NVSetMetaVarx NVSetMetaVar;
NVGetNetViewStatusx NVGetNetViewStatus;

NVSetEventHandlerProcx NVSetEventHandlerProc;
int stopped=0;

LRESULT CALLBACK eventproc(DWORD msg, DWORD wp, DWORD lp, DWORD tm)
{
printf("Event=%u WP=%u LP=%u TIME=%u\n",msg,wp,lp,tm);
if(msg==WM_QUIT)
{
printf("NetView stopped\n");
stopped=1;
}
return 1;
}

int main(int argc, char* argv[])
{
HINSTANCE lib=LoadLibrary("nvapi.dll");
if(!lib){printf("Can't load NVAPI.DLL\n");return -1;};
NVGetHost=(NVGetHostx)GetProcAddress(lib,"NVGetHostA");
NVGetMetaVar=(NVGetMetaVarx)GetProcAddress(lib,"NVGetMetaVarA");
NVSetMetaVar=(NVSetMetaVarx)GetProcAddress(lib,"NVSetMetaVarA");
NVGetNetViewStatus=(NVGetNetViewStatusx)GetProcAddress(lib,"NVGetNetViewStatus");
NVSetEventHandlerProc=(NVSetEventHandlerProcx)GetProcAddress(lib,"NVSetEventHandlerProc");
NVSetEventHandlerProc(&eventproc);

DWORD ret=NVGetNetViewStatus(0);
DWORD ver=HIWORD(ret);
DWORD verh=(ver>>8)&0xff;
DWORD verl=(ver)&0xff;
bool IsFullAccess=false;
switch(LOWORD(ret))
{
case 0:printf("NetView is not accessible\n");return -1;break;
case 1:printf("NetView v%u.%u in read-only mode\n",verh,verl);break;
case 2:printf("NetView v%u.%u in full access mode\n",verh,verl);IsFullAccess=true;break;
}

NVHOST hst; ZeroMemory(&hst,sizeof(hst));
do
{
hst.id=hst.nextid;hst.nextid=0;
NVGetHost(0,&hst,0);
if(hst.id)
{
char buff[1024];sprintf(buff+1,"%s\x09%s",hst.hostname,hst.hostip);
char varbuf[256];
ZeroMemory(varbuf,256);DWORD bufsz=255;
NVGetMetaVar(0,hst.id,"ison",varbuf,&bufsz);
buff[0]='?';
if(!strcmp(varbuf,"off"))buff[0]='-';
if(!strcmp(varbuf,"on"))buff[0]='+';
ZeroMemory(varbuf,256);bufsz=255;
NVGetMetaVar(0,hst.id,"ctime",varbuf,&bufsz);
strcat(buff,"\x09");strcat(buff,varbuf);
if(IsFullAccess)
{
NVSetMetaVar(0,hst.id,"mytestvar","TeSt",4);
ZeroMemory(varbuf,256);bufsz=255;
NVGetMetaVar(0,hst.id,"mytestvar",varbuf,&bufsz);
strcat(buff,"\x09");strcat(buff,varbuf);
NVSetMetaVar(0,hst.id,"mytestvar",0,0);
}
strcat(buff,"\n");
printf(buff);
}
}while(hst.nextid);
printf("Enumeration completed. Waiting for NetView events. Press Ctrl+C for exit.\n");
while(!stopped)Sleep(300);

return 0;
}

Top


NetView plug-ins

General principles of the creation of plug-ins and their interaction with NetView

Any processes in system can interact with NetView of the versions 2.80 and higher by using of function exported by nvapi.dll which is copied in system folder SYSTEM or SYSTEM32 during installation of NetView. Descriptions of these functions can be found here.

Dynamically linked libraries .dll loaded by NetView and startup and exporting three functions. Obligatory of them only two:

NVPluginGetInfo - is caused when start NetView. Has a single parameter - a pointer on structure NVPLUGININFO. When calling the functions NetView itself allocates memory for this structure, in the same way installs the field nvver equal its version. Plug-in can return from function 0 and he will not be able for using (for example if installed version of NetView does not support some necessary functions), or - 1 then plugin will be available for using. Plug-in in the same way must specify in field retver its version and copy in plname and retstr strings with max length in 63 and 127 symbols maximum, plname is the plug-in's name, retstr - a short dexription. The Rest fields when call of this functions are not initialized and must be not used. The approximite code to this functions:

DWORD WINAPI NVPluginGetInfo(LPNVPLUGININFO nvpi)
{
nvpi->retver.hi=1;nvpi->retver.lo=0;//Версия нашего плагина - 1.0
strcpy(nvpi->plname,"Cool plugin");//Название плагина. 63 символа максимум
strcpy(nvpi->retstr,"Sample NetView plug-in by Killer{R}");
return ((nvpi->nvver.hi>2)||(nvpi->nvver.lo>71));
}

NVPluginGo - this is the main plug-in function, plugin execution starts by calling this function and ends when this function returns (or and exception occured in it). NetView executes this function in different thread. The Parameter of functions - a pointer on structure NVPLUGINGOINFO, detailed description of which you can find in nvplugn.h file. In this structure field nvmainwnd - HANDLE to the main NetView's window. Can be used as parent window for plag-in's windows. nvwnd - HWND of the NetView's window-handler of the plug-ins messages. Plug-in sends messages to it to make any actions. NetView sends messages to the plug-ins thread using PostThreadMessage, plug-in can send the messages to a window nvwnd. For termination of the execution of plug-in NetView sends its WM_QUIT after reception of which plug-in must make all procedures of its deinitialization and terminate self execution by exiting from NVPluginGo. The approximite code of NVPluginGo:

DWORD WINAPI NVPluginGo(LPNVPLUGINGOINFO plgi)
{
init();//some initialization stuff
MSG msg;
while( GetMessage( &msg, NULL, 0, 0 ) )
{
TranslateMessage( &msg );
workmessage(msg.message,msg.wParam,msg.lParam);//some message-processing stuff
DispatchMessage( &msg );
}
deinit();//some deinitialization stuff
return 0;
}

На верх


NetView plug-ins

Interraction with hostlist

The functions of the work with hostlist can be divided into the following parts:

Working with hosts - adding, deleting, getting information about all or only selected by user hosts- all this possible by using of message NMPN_OBJECT. All hostnames should be in lower case. For operations with host lParam points to NVHOST sctucteure, wParam can be used with next bitmask flags:

NVOBJ_GETHOST - You should specify id field in NVHOST to the host id of the existing host to get information about it, or 0 - in this case you'll get information about 1st host in hostlist

If combine NVOBJ_GETHOST | NVOBJ_SELECTED then you'll get info about next (after id) selected by user host (or 1st selected if id==0). nextid returns id of the next host, allowing enumeration all or selected onlyhosts. Follow you can see sample code of the selected hosts enumeration passing name of every host to yourstuff(NVHOST *):

NVHOST hst;ZeroMemory(&hst,sizeof(hst));
SendMessage(plgi->nvwnd,NMPN_OBJECT,NVOBJ_SELECTED|NVOBJ_GETHOST,(DWORD)&hst);
while(hst.id)
{
yourstuff(&hst);

hst.id=hst.nextid;
if(hst.id)SendMessage(plgi->nvwnd,NMPN_OBJECT,NVOBJ_SELECTED|NVOBJ_GETHOST,(DWORD)&hst);
}

NVOBJ_SETHOST - In NVHOST you shoud specify id of the existing host or 0 to add new host to hostlist.

NVOBJ_DELHOST - Host with specified in NVHOST id will be deleted.

NVOBJ_HOSTBYTEXT - lParam points to NULL-terminated string - host's name or IP. Can be combined with NVOBJ_FORCENEW - in this case NetView will add new host, if can't find in hostlist by specified text. Returns ID of found\added host or NULL. If combine also with NVOBJ_HOSTNOIP then host will be added with empty IP without tring to determine its IP address.

Work with hostlists. lParam points to NVLIST structure. wParam can have the following bitmask flags:

NVOBJ_GETLIST - the same as NVOBJ_GETHOST for hosts, except that NVOBJ_SELECTED cannot be used

NVOBJ_SETLIST - same as NVOBJ_SETHOST

NVOBJ_DELLIST - delete hostlist, lParam = hostlist id

NVOBJ_LISTBYTEXT - the same as NVOBJ_HOSTBYTEXT

Working with visual map\plan lines. NetView stores all lines information internally as array of structures so all access to lines is based on the lines indexes, wich can changes during NetView work.

NVOBJ_GETLINE - lParam points to NVLINE, with specified index, message returns all lines count.

NVOBJ_SETLINE - lParam points to NVLINE, with specified index (you can set index to -1 to create new line), message returns all lines count.

NVOBJ_DELLINE - lParam =index of line to be deleted

Working with areas - colored rectangles on Visual map/plan. The same as work with hosts and hostlists:
NVOBJ_GETAREA - lParam points to NVAREA with specified id. You can specify id=0 to get 1st area.
NVOBJ_SETAREA - lParam points to NVAREA with specified id. You can specify id=0 to create new area
NVOBJ_DELAREA - lParam = od of area to be deleted

Working with host's metavariables. Metavariable - is a string, associated with host and having unique within this host name. It is not recommended to store long strings in metavariables - this will cause NetView to eat much memory. The name of variable is case-sensitive. Working with they it is realized by message NMPN_METAVAR, lParam points to structure NVMETAVAR and plug-in shoud allocate enough memory to store variable string. wParam can be:

NVMETAVAR_GET - before calling set host.name or host.id (in this case specify also NVMETAVAR_USEID in wParam) and varname in NVMETAVAR. If variable does not exist will is returned empty line. If maximum length of the string unknown, it is necessary to set vallen to zero, after calling the message NetView will set vallen to necessities value. Then allocate the necessary amount to memory for structure and send the message once again. The Approximite code of this deal:

LPNVMETAVAR mv=(LPNVMETAVAR)malloc(256);
ZeroMemory(mv,256);
mv->host.id=HostId;
strcpy(mv->varname,"abcd_myvar");
mv->vallen=0;
SendMessage(plgi->nvwnd,NMPN_METAVAR,NVMETAVAR_GET|NVMETAVAR_USEID,(DWORD)mv);
mv=(LPNVMETAVAR)realloc(mv,256+mv->vallen);
ZeroMemory(mv->val,mv->vallen+1);

SendMessage(plgi->nvwnd,NMPN_METAVAR,NVMETAVAR_GET|NVMETAVAR_USEID,(DWORD)mv);
//do something...

free(mv);

NVMETAVAR_SET - set all fields of NVMETAVAR. (NVMETAVAR_USEID also can be used with host.id specified) Example:

LPNVMETAVAR mv=(LPNVMETAVAR)malloc(256+val.Length());
strcpy(mv->host.name,"coolhost");
strcpy(mv->varname,"abcd_myvar");
strcpy(mv->val,"my metavar string");
mv->vallen=val.Length();
SendMessage(plgi->nvwnd,NMPN_METAVAR,NVMETAVAR_SET,(DWORD)mv);
free(mv);

NetView stores all hosts information and setting in metavariables.

List of the main metavariables can be found здесь

For applying changes in internal metavariables plug-in usually should call NMPN_ACTION with flag NVACTION_SETSTATE and lParam = host id.

On top


NetView plug-ins

Adding and using plug-in's menus in the NetView interface

Plugin can create the menu items in Plug-ins main menu, in context menu of the hostlist and in context menu of the notificaion icon in the tray area. In is possible to create hierarchical menus by specifing parent menu ID when adding new menu item. Plugin must destroy all created menuitems before exit, otherwise they disappear only after user clicks on it. Creation, changing and removing menu items is realized with using message NMPN_MENU. The Parameter wParam can be: MENUACTION_SET - creates or changes the menu element. lParam points to structure NVMENUINFO.

NVMENUINFO fields definitions:

DWORD id: the unique identifier of the menu item (practically is a pointer on VCL object TMenuItem). For creating the new element menu set this field to 0. For subsequenting modification of the element use value of id, which NetView will set in this field after processing this message.

DWORD msg: the message which NetView will send to the specified thread when user clicks on this menu item.

DWORD tid: ThreadID of the plug-ins thread, to wich msg message will be sent on user's click

HICON icon - handle of the icon to be displayed or NULL.

DWORD parentid - id of the already created parent menu item, or NULL.

char text[64] - menu text

DWORD flags - NVMENUFLAG_MAIN menu item will be created in the Plug-ins menu, NVMENUFLAG_CONTEXT - menu item will be created in the hostlist context menu, NVMENUFLAG_TRAY - menu item will be created in the menu of tray icon. Look for other flags in text of nvplugn.h

Plug-in can dynamically create and change the elements of the menu, even then when it on screen. Sample code for creation, modification and removing created of the menu item:

Создаем менюшки:

NVMENUINFO mi,mic;

void __fastcall init()

{

//создаем пункт в главном меню

ZeroMemory(&mi,sizeof(mi));
strcpy(mi.text,"Sample");
mi.tid=GetCurrentThreadId();
mi.msg=WM_USER+0x501;
mi.flags=NVMENUFLAG_MAIN;
SendMessage(plgi->nvwnd,NMPN_MENU,NVMENUACTION_SET,(DWORD)&mi);

//adding menu subitem

ZeroMemory(&miс,sizeof(miс));
strcpy(miс.text,"Sample child menu");
miс.tid=GetCurrentThreadId();
miс.msg=WM_USER+0x502;
mic.parentid=mi.id;
SendMessage(plgi->nvwnd,NMPN_MENU,NVMENUACTION_SET,(DWORD)&mic);
}

Handler of the menu messages sent by NetView, (generating MessageBox and switching off/on menu check image :

void __fastcall workmessage(DWORD msg, DWORD wp, DWORD lp)
{
if(msg==WM_USER+0x502)

{

MessageBox(0,"User clicked my menu item","Sample plug-in",0);

mic.flags^=NVMENUFLAG_CHECKED;

SendMessage(plgi->nvwnd,NMPN_MENU,NVMENUACTION_SET,(DWORD)&mic);

}
}

Following procedure correctly deletes created menus before plug-in's termination:

void __fastcall deinit()

{

SendMessage(plgi->nvwnd,NMPN_MENU,NVMENUACTION_DEL,mic.id);
SendMessage(plgi->nvwnd,NMPN_MENU,NVMENUACTION_DEL,mi.id);
}

On top


NetView plug-ins

NMNP_ALERT, NMPN_ACTION, NMNP_ACTION and NMNP_HOSTMSG messages

Message NMNP_ALERT NetView sends for plug-ins with different flags in wParam in next cases:

NVALERT_NETWATCHER - when user connected in NetWatcher. lParam - host ID of the connected host or 0, if no such host in hostlist

NVALERT_ALARMHOST - host with enabled alerts changed its online state. lParam - host ID.

NVALERT_TERMINAL - host was connected to Terminal n listen mode. lParam - host ID.

NVALERT_REDIRECTOR - Host connected to TCP bridge. lParam - host ID.

NVALERT_IPLOGGER - IP logger detected attack.

NVALERT_NETSEARCHER - NetSearcher finished filesearching.

Bit flags in wParam :

NVALERTMASK_CANCEL - Set in next cases(user selects\deselects alerted host, NetWatcher's user disconnect, Terminal or TCP host disconnect. IP logger - attack finished.

NVALERTMASK_NWBLACK - NetWatcher's blaclist user

NVALERTMASK_NWWHITE - NetWatcher's keeplist user

NVALERTMASK_ILLIST - IPLogger - Scan detected

NVALERTMASK_ILICMP - IPLogger - ICMP flood detected.

NVALERTMASK_ILSYN - IPLogger - TCP SYN flood detected.

NVALERTMASK_ILUDP - IPLogger - UDP flood detected.

NVALERTMASK_HOSTUP - Alertable host goes online

NVALERTMASK_HOSTDOWN - Alertable host goes offline

Plug-in can send NMPN_ACTION message to NetView's window for:

NVACTION_GETFROMNET | NVACTION_LIST - refresh hostlist from network

NVACTION_GETFROMFILE | NVACTION_LIST -refresh hostlist from file, lParam - char * filename string or NULL - default hostlist file will be used.

NVACTION_RECHECK - Recheck host with specidied in lParam ID. With flag NVACTION_LIST all hosts from list id в lParam will be checked, Or all hosts will be checked if lParam=NULL.

NVACTION_RETRACE - retrace hosts. Other flags are same as NVACTION_RECHECK

NVACTION_CLEARLIST - clears selected in lParam hostlist, or clears all hoslist if lParam=NULL.

NVACTION_OPEN - open specified in в lParam host.

NVACTION_SAVELMHOSTS - save filelist to the file lParam - filename or NULL

NVACTION_SETSTATE - updates host. lParam - host id.

NVACTION_EDIT - opens edit host window for host with ID=lParam. If user clicks Cancel returns 0, otherwise host id.

NVACTION_IMGEXPORT - inititiate visual map export, return 0 if error occured.

NetView sends NMNP_ACTION message for plug-in with following bitmask flags in wParam:

NVACTION_GETFROMNET - after hostlist refresh using network

NVACTION_GETFROMFILE - after hostlist refresh using file

NVACTION_RECHECK - after hostlist recheck

NVACTION_RETRACE - after hostlist retrace

NVACTION_ACTIVATE - NetView window (de)activated. lParam the same as WM_ACTIVATE's wParam.

NVACTION_MENUPOPUP - sends after some menus popups. lParam: NVMENUFLAG_MAIN, NVMENUFLAG_CONTEXT or NVMENUFLAG_TRAY.

NVACTION_IMGEXPORT - after Visual Map GIF image export finished (lParam =list id).

NMNP_HOSTMSG - user double-clicked on host wich has "hostmsg:N" command string. wparam equals N, lparam- host's id

On top


NetView plug-ins

NetView plug-ins:: Callbacks

Plug-in can install the procedure-handler for the event of the host's recheck for which is standard recheck is disabled and for the event of the host state updating. You can enable callback by message NMPN_CALLBACK. For example if you want to install such handler declarate it as follows:

LRESULT CALLBACK MyCallbackProc(DWORD Code, DWORD ObjId, void *reserved)

{

//do something...

return 1;

}

Enable handler:

SendMessage(nvwnd,NMPN_CALLBACK, NVCB_CUSTOM_RECHECK|NVCB_PRE_SETSTATE, (DWORD)&MyCallbackProc);

Before exiting plug-in should remove handler proc, otherwise an error will occurs:

SendMessage(nvwnd,NMPN_CALLBACK, NVCB_REMOVECALLBACK|NVCB_CUSTOM_RECHECK|NVCB_PRE_SETSTATE, (DWORD)&MyCallbackProc);

Callback handler proc parameters:

  • Code - event code. NVCB_CUSTOM_RECHECK or NVCB_PRE_SETSTATE.
  • ObjId - Host ID. It can be used with other calls to hosts and metavariables.


License

NetView as FREEWARE for any purposes. NetView can be distrubuted only on the terms of this license.
NetView is freeware application and can be free distributed, in condition if this installation is not changed.

PROGRAM DISTRIBUTES "AS IS", WITHOUT ANY WARRANTIES.


Contact information

Program author: Killer{R}

Contact e-mail: Killer{R}

Help co-author: Vladimir Manov aka VoVaN

Contact e-mail: VoVaN