Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

structs.h

Go to the documentation of this file.
00001 /*
00002  * Active Router Transport Protocol (ARTP) implementation
00003  * Copyright (c) 2004, Tomas Rebok
00004  * All rights reserved.
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the "BSD License" which is
00008  * distributed with the software in the file LICENSE.
00009  *
00010  * This program is distributed in the hope that it will be useful, but
00011  * WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the BSD
00013  * License for more details.
00014  */
00015 
00023 #ifndef ARTP_STRUCTS_H
00024 #define ARTP_STRUCTS_H   1
00025 
00026 
00027 #include <sys/socket.h>
00028 #include <sys/types.h>
00029 #include <stdlib.h>
00030 #include <netinet/in.h>
00031 #include <arpa/inet.h>
00032 #include <pthread.h>
00033 #include "types.h"
00034 #include "net.h"
00035 #include "options.h"
00036 
00037 
00040 enum Tsession_status {  LIVE,  DEAD 
00043 };
00044 
00045 
00047 enum Tsession_type {  NON_EST,  EST 
00050 };
00051 
00052 
00057 struct dead_zero_sessions
00058 {
00060     SID_TYPE sid; 
00061 
00063     union artp_receiver receiver;
00064 
00066     int invalid;
00067 
00069     struct dead_zero_sessions *next;
00070 };
00071 
00072 
00075 struct session_item
00076 {
00078     SID_TYPE session_sid;
00079 
00081     union artp_receiver session_receiver;
00082 
00084     SEQ_TYPE current_seq;
00085 
00087     int buffers_id;
00088 
00090     enum Tsession_status session_status;
00091 
00093     enum Tsession_type session_type;
00094     
00096     void *options[OPTIONS_COUNT];
00097 
00099     void *partner_options[OPTIONS_COUNT];
00100 
00102     unsigned long int cwnd;
00103     
00105     unsigned long int flight;
00106 
00108     MSS_TYPE mss;
00109 
00111     unsigned int max_acks_count;
00112     
00114     unsigned long int sbuffer_max_size;
00115     
00117     unsigned long int rbuffer_max_size;
00118     
00120     unsigned long int rbuffer_red_limit;
00121     
00123     int rbuffer_red_prob;
00124     
00126     double rtt;
00127 
00129     double srtt;
00130 
00132     double rto;
00133 
00135     double ts_delta;
00136 
00138     RETR_TIMEOUT_TYPE retries_timeout;
00139 
00141     TS_TYPE expiration_time;
00142 
00144     double last_send_time;
00145 
00147     unsigned int ref_counter;
00148 
00150     pthread_mutex_t ref_counter_mutex;
00151 
00155     pthread_mutex_t session_mutex;
00156 };
00157 
00158 
00159 #endif
00160 
00161 /* vim: set ts=4 : */

Generated on Fri May 21 07:50:24 2004 for Active Router Transport Protocol (ARTP) by doxygen1.2.15