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/webtrace-conv/ucb/utils.cc File Reference

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <errno.h>
#include <netdb.h>
#include "utils.h"

Defines

#define LL_HEAPSIZE   50
#define AVL_ALLOC_NUM   200

Functions

const char * dumb_strcasestr (const char *string, const char *substr)
void dump_buf (FILE *std, char *buf, int retlen)
tv_time tv_timeadd (tv_time t1, tv_time t2)
tv_time tv_timesub (tv_time t1, tv_time t2)
tv_time tv_timemul (tv_time t1, double mult)
int tv_timecmp (tv_time t1, tv_time t2)
ts_time ts_timeadd (ts_time t1, ts_time t2)
ts_time ts_timesub (ts_time t1, ts_time t2)
ts_time ts_timemul (ts_time t1, double mult)
int ts_timecmp (ts_time t1, ts_time t2)
ts_strtok_state * ts_strtok_init (char *string)
char * ts_strtok (char *matching, ts_strtok_state *state)
int ts_strtok_finish (ts_strtok_state *state)
char * dumb_strnstr (char *str, char *substr, int n)
int correct_write (int s, char *data, int len)
int correct_read (int s, char *data, int len)
ll Allocate_ll (void)
void Free_ll (ll freeMe)
int ll_add_to_end (ll *addToMe, void *data)
int ll_add_to_start (ll *addToMe, void *data)
ll ll_find (ll *findInMe, void *data, int(*compare)(void *d1, void *d2))
int ll_sorted_insert (ll *insertme, void *data, int(*compare)(void *d1, void *d2))
int ll_del (ll *delFromMe, void *data, int(*compare)(void *d1, void *d2), void(*nukeElement)(void *nukeMe))
int ll_delfirst (ll *delFromMe, void(*nukeElement)(void *nukeMe))
int ll_destroy (ll *destroyMe, void(*nukeElement)(void *nukeMe))
int ll_build (ll *buildMe, char *buildFromMe)
int chained_hash_create (int num_slots, hash_table *rt)
int chained_hash_destroy (hash_table ht, deletor d)
int chained_hash_insert (hash_table ht, void *element, hash_function f)
void * chained_hash_search (hash_table ht, void *element, hash_function f, sc_comparator c)
int chained_hash_delete (hash_table ht, void *element, hash_function f, deletor d, sc_comparator c)
AVL_tree Allocate_AVL_tree (void)
void Free_AVL_tree (AVL_tree freeMe)
int Tree_Add (AVL_tree *addToMe, void *addMe, AVL_comparator theComp)
int Tree_Delete (AVL_tree *deleteFromMe, void *deleteMe, AVL_comparator theComp, AVL_deletor theDel)
int Tree_Destroy (AVL_tree *destroyMe, AVL_deletor theDel)
AVL_tree Tree_Search (AVL_tree searchMe, void *searchForMe, AVL_comparator theComp)
AVL_tree Tree_First (AVL_tree searchMe)
AVL_tree Tree_Last (AVL_tree searchMe)
AVL_tree Tree_Next (AVL_tree searchMe)

Variables

ll heap_o_ll = NULL

Define Documentation

#define AVL_ALLOC_NUM   200
 

#define LL_HEAPSIZE   50
 


Function Documentation

AVL_tree Allocate_AVL_tree (  void    ) 
 

ll Allocate_ll (  void    ) 
 

int chained_hash_create (  int    num_slots,
hash_table *    rt
) 
 

int chained_hash_delete (  hash_table    ht,
void *    element,
hash_function    f,
deletor    d,
sc_comparator    c
) 
 

int chained_hash_destroy (  hash_table    ht,
deletor    d
) 
 

int chained_hash_insert (  hash_table    ht,
void *    element,
hash_function    f
) 
 

void* chained_hash_search (  hash_table    ht,
void *    element,
hash_function    f,
sc_comparator    c
) 
 

int correct_read (  int    s,
char *    data,
int    len
) 
 

int correct_write (  int    s,
char *    data,
int    len
) 
 

const char* dumb_strcasestr (  const char *    string,
const char *    substr
) 
 

char* dumb_strnstr (  char *    str,
char *    substr,
int    n
) 
 

void dump_buf (  FILE *    std,
char *    buf,
int    retlen
) 
 

void Free_AVL_tree (  AVL_tree    freeMe ) 
 

void Free_ll (  ll    freeMe ) 
 

int ll_add_to_end (  ll *    addToMe,
void *    data
) 
 

int ll_add_to_start (  ll *    addToMe,
void *    data
) 
 

int ll_build (  ll *    buildMe,
char *    buildFromMe
) 
 

int ll_del (  ll *    delFromMe,
void *    data,
int(*    compare)(void *d1, void *d2),
void(*    nukeElement)(void *nukeMe)
) 
 

int ll_delfirst (  ll *    delFromMe,
void(*    nukeElement)(void *nukeMe)
) 
 

int ll_destroy (  ll *    destroyMe,
void(*    nukeElement)(void *nukeMe)
) 
 

ll ll_find (  ll *    findInMe,
void *    data,
int(*    compare)(void *d1, void *d2)
) 
 

int ll_sorted_insert (  ll *    insertme,
void *    data,
int(*    compare)(void *d1, void *d2)
) 
 

int Tree_Add (  AVL_tree *    addToMe,
void *    addMe,
AVL_comparator    theComp
) 
 

int Tree_Delete (  AVL_tree *    deleteFromMe,
void *    deleteMe,
AVL_comparator    theComp,
AVL_deletor    theDel
) 
 

int Tree_Destroy (  AVL_tree *    destroyMe,
AVL_deletor    theDel
) 
 

AVL_tree Tree_First (  AVL_tree    searchMe ) 
 

AVL_tree Tree_Last (  AVL_tree    searchMe ) 
 

AVL_tree Tree_Next (  AVL_tree    searchMe ) 
 

AVL_tree Tree_Search (  AVL_tree    searchMe,
void *    searchForMe,
AVL_comparator    theComp
) 
 

char* ts_strtok (  char *    matching,
ts_strtok_state *    state
) 
 

int ts_strtok_finish (  ts_strtok_state *    state ) 
 

ts_strtok_state* ts_strtok_init (  char *    string ) 
 

ts_time ts_timeadd (  ts_time    t1,
ts_time    t2
) 
 

int ts_timecmp (  ts_time    t1,
ts_time    t2
) 
 

ts_time ts_timemul (  ts_time    t1,
double    mult
) 
 

ts_time ts_timesub (  ts_time    t1,
ts_time    t2
) 
 

tv_time tv_timeadd (  tv_time    t1,
tv_time    t2
) 
 

int tv_timecmp (  tv_time    t1,
tv_time    t2
) 
 

tv_time tv_timemul (  tv_time    t1,
double    mult
) 
 

tv_time tv_timesub (  tv_time    t1,
tv_time    t2
) 
 


Variable Documentation

ll heap_o_ll = NULL [static]
 


This document is generated by doxygen.