ns2 Network Simulator      C++ Class Hierarchy of version ns-snapshot-20040722
Home |  Source Code |  Manual |  FAQ |  Mailing List Archive |  Search |  Download | 


Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ns-2/indep-utils/model-gen/http_connect.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <sys/time.h>

Defines

#define min(a, b)   ((a) <= (b) ? (a) : (b))
#define max(a, b)   ((a) >= (b) ? (a) : (b))

Enumerations

enum  states {
  PENDING, SYN_SENT, FIN_SENT, RESET,
  IN_REQUEST, IN_RESPONSE
}
enum  inputs {
  SYN, FIN, RST, ACK_ONLY,
  DATA_ACK
}

Functions

void Usage (char *s)
void error_line (char *s)
void error_state (char *s)
int parse_dump_record (void)
void init_connection (void)
void init_active (void)
void check_tuple_reuse (void)
int check_ACK_advance (unsigned long old_ack)
void begin_REQ (void)
void more_REQ (void)
void begin_RSP (void)
void more_RSP (void)
void log_REQ (void)
void log_RSP (void)
void log_SYN (void)
void log_END (char *how)
void log_ACT (char *how)
void log_nosyn (void)
void log_connection (void)
void log_log (void)
long elapsed_ms (char *end, char *start)
void get_host_port (char *adr, char *host, char *port)
int get_sequence (char *p, unsigned long *begin, unsigned long *end, unsigned long *bytes)
void main (int argc, char *argv[])
void tvsub (tdiff, t1, t0) struct timeval *tdiff

Variables

int report_ACK_err = 1
FILE * dumpFP
FILE * outFP
FILE * logFP
timeval recvTime
timeval lastTime = {0,0}
char ts [20]
char sh [25]
char gt [3]
char lt [3]
char dh [25]
char fl [5]
char p1 [50]
char p2 [50]
char p3 [50]
unsigned long begin_seq
unsigned long end_seq
unsigned long seq_bytes
unsigned long new_ack
unsigned long current_synseq
int has_seq
int has_ack
unsigned long current_request_end
unsigned long last_request_end
unsigned long current_response_end
unsigned long last_response_end
int syn_count = 0
int req_count = 0
int rsp_count = 0
int fin_count = 0
int rst_count = 0
int trm_count = 0
int err_count = 0
int act_req_count = 0
int act_rsp_count = 0
int pending_fin_count = 0
int pending_rst_count = 0
int pending_ack_count = 0
int pending_oth_count = 0
int pending_cmb_count = 0
int have_pending_acks = 0
int have_pending_fins = 0
int have_pending_rsts = 0
int have_pending_othr = 0
int have_ACK_error = 0
int have_value_error = 0
int have_FINdata_error = 0
enum states connection_state = PENDING
enum states last_state = PENDING
enum inputs input_type
char current_src [25] = ""
char src_host [25]
char src_port [10]
char current_dst [25] = ""
char dst_host [25]
char dst_port [10]
char start_request_time [20]
char start_response_time [20]
char response_end_time [20]
char request_end_time [20]
char FIN_sent_time [20]
char RST_sent_time [20]
char last_connection_time [20]
char input_name [256] = ""
char output_name [256] = ""
char log_name [256] = ""
char new_line [500]
long elapsed
int new_address = 0
int rc = 0
void * t1
void * t0

Define Documentation

#define max a,
     ((a) >= (b) ? (a) : (b))
 

#define min a,
     ((a) <= (b) ? (a) : (b))
 


Enumeration Type Documentation

enum inputs
 

Enumeration values:
SYN 
FIN 
RST 
ACK_ONLY 
DATA_ACK 

enum states
 

Enumeration values:
PENDING 
SYN_SENT 
FIN_SENT 
RESET 
IN_REQUEST 
IN_RESPONSE 


Function Documentation

void begin_REQ void   
 

void begin_RSP void   
 

int check_ACK_advance unsigned long    old_ack
 

void check_tuple_reuse void   
 

long elapsed_ms char *    end,
char *    start
 

void error_line char *    s
 

void error_state char *    s
 

void get_host_port char *    adr,
char *    host,
char *    port
 

int get_sequence char *    p,
unsigned long *    begin,
unsigned long *    end,
unsigned long *    bytes
 

void init_active void   
 

void init_connection void   
 

void log_ACT char *    how
 

void log_connection void   
 

void log_END char *    how
 

void log_log void   
 

void log_nosyn void   
 

void log_REQ void   
 

void log_RSP void   
 

void log_SYN void   
 

void main int    argc,
char *    argv[]
 

void more_REQ void   
 

void more_RSP void   
 

int parse_dump_record void   
 

void tvsub tdiff   ,
t1   ,
t0   
[static]
 

void Usage char *    s
 


Variable Documentation

int act_req_count = 0
 

int act_rsp_count = 0
 

unsigned long begin_seq
 

enum states connection_state = PENDING
 

char current_dst[25] = ""
 

unsigned long current_request_end
 

unsigned long current_response_end
 

char current_src[25] = ""
 

unsigned long current_synseq
 

char dh[25]
 

char dst_host[25]
 

char dst_port[10]
 

FILE* dumpFP
 

long elapsed
 

unsigned long end_seq
 

int err_count = 0
 

int fin_count = 0
 

char FIN_sent_time[20]
 

char fl[5]
 

char gt[3]
 

int has_ack
 

int has_seq
 

int have_ACK_error = 0
 

int have_FINdata_error = 0
 

int have_pending_acks = 0
 

int have_pending_fins = 0
 

int have_pending_othr = 0
 

int have_pending_rsts = 0
 

int have_value_error = 0
 

char input_name[256] = ""
 

enum inputs input_type
 

char last_connection_time[20]
 

unsigned long last_request_end
 

unsigned long last_response_end
 

enum states last_state = PENDING
 

struct timeval lastTime = {0,0}
 

char log_name[256] = ""
 

FILE* logFP
 

char lt[3]
 

unsigned long new_ack
 

int new_address = 0
 

char new_line[500]
 

FILE * outFP
 

char output_name[256] = ""
 

char p1[50]
 

char p2[50]
 

char p3[50]
 

int pending_ack_count = 0
 

int pending_cmb_count = 0
 

int pending_fin_count = 0
 

int pending_oth_count = 0
 

int pending_rst_count = 0
 

int rc = 0
 

struct timeval recvTime
 

int report_ACK_err = 1
 

int req_count = 0
 

char request_end_time[20]
 

char response_end_time[20]
 

int rsp_count = 0
 

int rst_count = 0
 

char RST_sent_time[20]
 

unsigned long seq_bytes
 

char sh[25]
 

char src_host[25]
 

char src_port[10]
 

char start_request_time[20]
 

char start_response_time[20]
 

int syn_count = 0
 

void * t0
 

void * t1
 

int trm_count = 0
 

char ts[20]
 


This document is generated by doxygen.