Writing your own program
145
Then, when a device is discovered,
dblookup
does the following:
1
dblookup
builds a SQL string with the device’s key attributes values and
runs a query against the database to find a match.
2
If no match is found, it waits for the next device.
3
Otherwise it takes the best match, that is to say the one with as few stars
as possible.
4
If two full matches are returned,
dblookup
logs an error; otherwise, it
takes the result of the first partial match encountered.
Writing your own
program
If the standard attribute lookup programs
fileattrs
and
dblookup
are not sufficient for your requirements, you can write your own attribute
lookup program.
In order to write your own user-defined attribute program, you need
Microsoft Visual C++ V5.0 or later, Microsoft Visual Basic or another tool
which allows you to compile a program. The rest of this section assumes
you are familiar with programming either C or Visual Basic.
All example programs are included in
<installdir>\TraffixServer\examples
.
Structure of an
Attribute Lookup
Program
Every time Traffix Manager wants to find out attributes for a device, it
calls all the attribute lookup programs in the user-defined attribute
lookup configuration file (see
“Contents of the User-defined Attributes
Configuration File”
on
page 138
) and asks them to provide attributes for
the device.
When you write your own attribute lookup program, your program has
to respond to these requests from Traffix Manager and supply attributes
for a particular device. Communication with Traffix Manager is done
using the functions in the
attripc.dll
library which is in
<installdir>\TraffixServer
. Even if you do not know much
about DLLs, these functions are designed to make writing your own
attribute lookup program as simple as possible.
The main three functions provided by the attripc.dll library are
GetNextLookup
(),
GetAttribute
() and
SetAttribute
(). Below is
an example of the central loop of a simple attribute lookup program
Содержание Traffix Transcend Traffix Manager
Страница 10: ......
Страница 18: ......
Страница 24: ...24 CHAPTER 1 TRAFFIX MANAGER OVERVIEW ...
Страница 33: ...II HOW TRAFFIX MANAGER WORKS Chapter 3 Collecting Data Chapter 4 Grouping Network Devices in the Map ...
Страница 34: ......
Страница 46: ...46 CHAPTER 4 GROUPING NETWORK DEVICES IN THE MAP Figure 6 Groupings dialog box ...
Страница 48: ......
Страница 56: ...56 CHAPTER 6 CONFIGURING AGENTS FOR DATA COLLECTION ...
Страница 70: ...70 CHAPTER 8 DISPLAYING TRAFFIC IN GRAPHS ...
Страница 88: ...88 CHAPTER 10 VIEWING EVENTS ...
Страница 114: ......
Страница 120: ...120 APPENDIX A TROUBLESHOOTING TRAFFIX MANAGER ...
Страница 152: ...152 APPENDIX F SUPPORTED RMON 2 DEVICES ...
Страница 156: ...156 APPENDIX G CONFIGURING 3COM STANDALONE RMON 2 AGENTS ...
Страница 160: ...160 APPENDIX I USING RMON 1 AGENTS ...
Страница 168: ......
Страница 184: ...184 INDEX ...