tcplibgenh parses application.tc and generates application.h, which contains the characteristics of the application represented in arrays. The names of the arrays are as specified in the .tc file.
tcplibgenc similarly parses the .tc file to generate the file application.c containing the functions to access the arrays created by tcplibgenh. The name of each function is generated by concatenating application with '_' and the array name. The application.c file generated by tcplibgenc includes the application.h file generated by tcplibgenh. Since the arrays of an application are static within its .c file, there will be no name conflict. This .c file should then be compiled and added to the library libtcp.a (tcplib(3N)) with the help of ar(1V) and ranlib(1).
tcplibgenc also registers the functions into the file tcapps.h which should be included in all files making calls to the library.
where data_type can be any valid C types. Data_file is the ASCII file where the data is kept.
The command
will generate telnet.h with the static arrays: pktsize, interarrival, and duration. While the command
will generate telnet.c and add the following to tcapps.h:
/* * telnet */ extern int telnet_pktsize(); extern float telnet_interarrival(); extern float telnet_duration();
The Makefile that comes with the ditribution makes a libtcp.a that consists of telnet, ftp, nntp, and smtp.
Danzig, P.B. and Jamin, S., tcplib: A Library of TCP Internetwork Traffic Characteristics, USC-CS-91-495, Sept. '91.
Caceres, R., Danzig, P.B., Jamin, S., and Mitzel, D.J., "Characteristics of Wide-Area TCP/IP Conversations," Proc. of ACM SIGCOMM '91, Sept. '91.