Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
Muhammad Zaman committed Mar 25, 2014
1 parent 4877180 commit cc3cbc7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
6 changes: 3 additions & 3 deletions recive.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <netdb.h>
#include <time.h>
#include <stdint.h>
#include <stdlib.h>
using namespace std;

int64_t nano_count()
Expand All @@ -18,10 +19,9 @@ int64_t nano_count()
cout<<"clock_gettime failed"<<endl;
return t.tv_sec * 1000000000 + t.tv_nsec;
}
int main(int argc char *argv ){

int main(){

int my_port = 54312;
int my_port = atoi(argv[0]);

int recvlen;
char* buf[10];
Expand Down
9 changes: 5 additions & 4 deletions send.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <netdb.h>
#include <time.h>
#include <stdint.h>
#include <stdlib.h>
using namespace std;

int64_t nano_count()
Expand All @@ -19,11 +20,11 @@ int64_t nano_count()
return t.tv_sec * 1000000000 + t.tv_nsec;
}

int main(){
int main(int argc char *argv ){

char* host_addr = "pc481.emulab.net";
int host_port = 54312;
int num_packets = 100000;
char* host_addr = argv[2];
int host_port = atoi(argv[0]);
int num_packets = atoi(argv[1]);

int s;

Expand Down
9 changes: 5 additions & 4 deletions sendforeward.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <iostream>
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <netdb.h>
#include <time.h>
Expand All @@ -21,11 +22,11 @@ int64_t nano_count()

int main(){

char* host_addr = "pc477.emulab.net";
int host_port = 54312;
int num_packets = 100000;
char* host_addr = argv[1];
int host_port = atoi(argv[0]);
int num_packets = atoi(argv[3]);

int my_port = 54312;
int my_port = atoi(argv[2);

int recvlen;
char* buf[10];
Expand Down

0 comments on commit cc3cbc7

Please sign in to comment.