TCPLIBGEN

Section: User Commands (1)
Updated: 25 August 1991
Index Return to Main Contents
 

NAME

tcplibgenh, tcplibgenc - traffic characteristic library generator  

SYNOPSIS

tcplibgenh application

tcplibgenc application  

DESCRIPTION

The Makefile that comes with the TC distribution takes care of properly generating the library. This manual page serves more as a documentation for the Makefile.

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.  

FILE FORMAT

Each application to be characterized should have a .tc file with the following format:
array_name data_type data_file

where data_type can be any valid C types. Data_file is the ASCII file where the data is kept.  

EXAMPLE

With the following telnet.tc file:
pktsize int data/telnet.pktsize
interarrival float data/telnet.interarrival
duration float data/telnet.duration

The command

% tcplibgenh telnet

will generate telnet.h with the static arrays: pktsize, interarrival, and duration. While the command

% tcplibgenc telnet

will generate telnet.c and add the following to tcapps.h:

/*
 * telnet
*/
extern int telnet_pktsize();
extern float telnet_interarrival();
extern float telnet_duration();
 

SEE ALSO

tcplib(3N), ar(1V), ranlib(1).

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.


 

Index

NAME
SYNOPSIS
DESCRIPTION
FILE FORMAT
EXAMPLE
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 07:07:07 GMT, May 19, 2025