user manual

148 APPENDIX E: AUTOMATIC ATTRIBUTE ASSIGNMENT
The C examples are located in C:\Transcend Traffix
Manager\TraffixServer\examples\c and the Visual Basic
examples are in C:\Transcend Traffix
Manager\TraffixServer\examples\vb. You should copy one of
these samples to your own directory before modifying it.
Attribute lookup programs must be able to find the attripc.dll file when
they are running. This file is located in the Traffix Manager install
directory. In order that your program can find this file, you should copy
your program to the Traffix Manager install directory and run it from
there, or you should add the Traffix Manager install directory to the PATH
environment variable (it must be added as a system environment variable,
not a user variable). Be careful not to overwrite any of the executables
already in the Traffix Manager install directory.
Once you have built your attribute lookup program and copied it if
necessary, you should add it to the user-defined attribute program
configuration file (see “Contents of the User-defined Attributes
Configuration File on page 138).
Library functions available
Tabl e 21
shows a full list of the functions available to attribute lookup
programs in the attripc DLL library:
country
Visual Basic Simple example program which assigns an
attribute country based on DNS name.
template
Visual Basic Empty attribute program which does nothing, but
which contains all the necessary project files and
declarations to build an attribute lookup program.
Table 21 Functions available to lookup programs in the attripc DLL library
Function Description
GetNextLookup Takes no arguments. Returns an integer. This function waits
until Traffix Manager want to determine new attributes for a
device, or until Traffix Manager is closing down. If Traffix
Manager wants to determine attributes for a device, this
returns 1. If Traffix Manager wants your program to exit, this
function returns 0.
(continued)
Table 20 Example Programs (continued)
Name Language Description