void start_connection(){ // initialization require for conestion control // intialize the starting cwnd // cwnd = 1; // prev_cwnd = cwnd; // ssthreshold = MAX_SEQ_N/2; //intializing valid_timer timer_n_index = cwnd; itimer.it_interval = timeout_tv; itimer.it_value = timeout_tv; int i; for(i=0; i < MAX_SEQ_N; i++) timers_status[i] = -1; open_file(file_name); if (file == NULL){ // can't open file filesize = -1; hand_shake(); }else { filesize = calc_file_size(); hand_shake(); rdt(); } printf("operation [completed]\n"); }
static int confirm_if_3332() { int ret; power_on_3332(); ret = hand_shake(); power_off_3332(); return ret; }