HP Transcend Traffix Manager User Manual

Page 147

Advertising
background image

Writing your own program

147

an attribute New Device to the value TRUE. NL Type is a built-in
attribute which is always set to the network type of a device. This
means that every IP device is assigned the attribute New Device with a
value of TRUE.

Because of the while loop in the program, the program keeps
assigning attributes for devices until Traffix Manager is finished with it.

By replacing this simple loop with your own code, you can write a
program which assigns your own attributes to devices using your own
algorithm.

GetAttribute

returns the value of any attribute which has already

been assigned, for example, NL Address and NL Type. See “Predefined
Attributes” on page 40
for a list of attributes which are automatically
assigned by Traffix Manager. If you have other attribute lookup programs
running, you may also use

GetAttribute

to get an attribute value

assigned by another program.

Writing and Building

Your Own Attribute

Lookup Program

To build your own attribute lookup program, you should copy one of the
example programs and modify it. You can also look at these programs for
more examples of how to write attribute lookup programs. There are 6
example programs supplied, as shown in

Table 20

.

Table 20 Example Programs

Name

Language

Description

fileattrs

C

Complex program which parses a text file and uses
it to assign attributes (see

“Using the fileattrs

Program”

on

page 140

).

nbtlookup

C

Example program which uses NetBios Status
messages to find out the names of users who are
currently logged on to the Windows system.

country

C

Simple example program which assigns an
attribute country based on DNS name.

template

C

Empty attribute program which does nothing, but
which contains all the necessary project files,
source files and include files to build an attribute
lookup program.

dblookup

Visual Basic

Complex program which assigns attributes based
on the contents of a spreadsheet or database (see

“Using the dblookup Program”

on

page 142

).

(continued)

Advertising