File TABLES.DAT contains tables (each belonging to a particular section) whose rows give the correspondences between textual data and constants. For instance the raw:
0000C0 Western Digital
defines a producer code,
09004E000002 IPX
defines a multicast address used by IPX.
Here it is an abstract from TABLES.DAT:
[VENDOR_CODE:3] ; 00000C Cisco 00000F NeXT 000010 Sytek 00001D Cabletron 000020 DIAB
This file is used by Query when a description file (dff, iff) has a "non standard" printf() directive, i.e. when printf() is invoked with format parameters different from: %d, %D, %u, %U, %c, %x, %X, %o, %O, %b. In this case, Query checks for that "wrong" marker into its configuration file (QUERY.INI) for the same marker. associated to it, there will be a string that will identify the Section (in tables.dat) that has to be used for that printf().
For instance, let's suppose the following line into a .dff file:
printf ("%v", code); /*code=0000C0*/
Looking into query.ini there will be the following line:
v=VENDOR_CODE
Therefore the printf() will look at filr tables.dat, in the "VENDOR_CODE" Section, and will print the string that correspond to the value stored into variable "code". In this example output will be "Western Digital". So if you want to define a new code you have to modify TABLES.DAT and also QUERY.INI if you add a new section.
The file, as said, is organized in sections marked by a title between square brackets. Between the brackets there is also a number which indicates the length of the numeric field. For instance, the OUI part of the MAC address is made fo 3 bytes.
Lines larger than 80 characters are ignored. In the codes blanks are not admitted; a blank has to follow the code.