TCPLIB_0.9

Section: Network Functions (3N)
Updated: 3 February 1992
Index Return to Main Contents
 

NAME

tcplib - TCP/IP wide-area traffic characteristic library  

DESCRIPTION

tcplib is a library of wide-area TCP applications traffic source characteristics. To use it, load the library, libtcp.a, together with your simulator using ld(1). (If you use tcplib, please send me (jamin@usc.edu) your e-mail address so that I can inform you of bug fixes and upgrades.)

Since tcplib uses lrand48(3) and drand48(3), you should make a call to srand48(3) with an appropriate random number seed before calling any of the tcplib functions. You also want to link your program with the math library. The following functions are provided with version 0.9 of the library:  

SYNOPSIS

#include "tcpapps.h"

int telnet_pktsize();
       /* in bytes, excluding headers */

float telnet_interarrival();
       /* in milliseconds, gap between two packets */

float telnet_duration();
       /* in milliseconds, length of a conversation */

int ftp_ctlsize();
       /* in bytes, excluding headers */

int ftp_nitems();
       /* number of items sent per conversation */

int ftp_itemsize();
       /* in bytes, only the data size */

int nntp_nitems();
       /* number of items sent per conversation */

int nntp_itemsize();
       /* bytes of data sent per item */

int smtp_itemsize();
       /* in bytes, message size */

float phone_talkspurt();
       /* in ms wall-clock time */

float phone_pause();
       /* in ms wall-clock time */

#include "brkdn_dist.h"

struct brkdn_dist *brkdn_dist()
       /* returns a breakdown distribution table. */

char *next_app(struct brkdn_dist *brkdn_dist)
       /* name of next application to arrive. */
 

USAGE

Suppose you want to simulate a source running TELNET. First call telnet_duration() to determine the length of conversation to simulate--telnet_duration() returns the duration in millisecond unit. Then start sending single byte packets until the duration time expires. The destination responds with packets whose size is determined by calling telnet_pktsize(). Note that the packet size obtained from telnet_pktsize() does not include the size of protocol headers. The interarrivals between two source packets are obtained from telnet_interarrival(), which again returns time in milliseconds.

To simulate a source running FTP, first call ftp_nitems() to decide how many items to send. For each item, use ftp_itemsize() to determine the size of each item. When sending the items, remember to fragment them into MTU-size packets. To simulate the handshaking between item transfers, use ftp_ctlsize() to get the size of the handshake packets. The duration and packet-interarrival of this handshaking period is not currently modeled.

NNTP and SMTP could be simulated similarly. Each SMTP conversation transfers only one item. The handshaking period of NNTP is not modeled. The bidirectionality of NNTP transfer could be simulated by initiating a separate NNTP conversation in each direction.

Phone conversations could be treated like TELNET conversations. Phone talkspurt is modeled by phone_talkspurt() and pauses between talkspurts is modeled by phone_pause(). We do not have a model for phone duration.

The connection setup and teardown phases, ACK and keep-alive packets have to be generated by the simulator if their presence are desired.

Given the characteristics that completely describe each application's conversation, we now need to decide when to start a new conversation. Interarrival times of phone conversations have been shown to be exponentially distributed. For lack of a better model, we currently assume exponential interarrival time for the aggregate of all conversations originating from a source. At each arrival time, we decide which application to run by calling the next_app() routine. Next_app() takes as an argument a traffic breakdown distribution obtained from the routine brkdn_dist(). Brkdn_dist() takes the mean and variance of each application's probability of occurring and returns a traffic breakdown distribution; the mean and variance were calculated from the measured breakdown of our traces. In generating the traffic breakdown distribution, brkdn_dist() uses the Ahrens method for generating random numbers distributed as a gamma distribution of integer order r, the r-stage Erlangian distribution.  

SEE ALSO

srand48(3), tcplibgen(1), ld(1), ar(1V), ranlib(1).

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.

Brady, P.T., "A Technique for Investigating On-Off Patterns of Speech," The Bell System Technical Journal, Jan '65, pp. 1-22.

Kleinrock, L., Queueing Systems, vol. 1, John Wiley & Sons, 1976, p. 124.

Press, W.H., et al., Numerical Recipes in C, Cambridge University Press, 1988, p. 220.


 

Index

NAME
DESCRIPTION
SYNOPSIS
USAGE
SEE ALSO

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