33 lines
869 B
C
33 lines
869 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <unistd.h>
|
||
|
#include <errno.h>
|
||
|
#include "proxy.h"
|
||
|
|
||
|
int main(int argc, char** argv) {
|
||
|
setvbuf(stdout, NULL, _IONBF, 0);
|
||
|
printf("~ udpecho ~\n");
|
||
|
|
||
|
|
||
|
int64_t sorted_estimation[MAX_LINKS];
|
||
|
uint64_t sorted_occurencies;
|
||
|
struct thunder_ctx thunderc = {0};
|
||
|
thunderc.total_links = 8;
|
||
|
thunderc.estimated_sent[0] = 221;
|
||
|
thunderc.estimated_sent[1] = 110;
|
||
|
thunderc.estimated_sent[2] = 0;
|
||
|
thunderc.estimated_sent[3] = 522;
|
||
|
thunderc.estimated_sent[4] = 522;
|
||
|
thunderc.estimated_sent[5] = 443;
|
||
|
thunderc.estimated_sent[6] = 333;
|
||
|
thunderc.estimated_sent[7] = 333;
|
||
|
|
||
|
get_estimation (&thunderc, sorted_estimation, &sorted_occurencies);
|
||
|
printf("sorted_occurencies = %ld, vals=", sorted_occurencies);
|
||
|
for (int i = 0; i < sorted_occurencies; i++) {
|
||
|
printf("%ld,", sorted_estimation[i]);
|
||
|
}
|
||
|
printf("\n");
|
||
|
|
||
|
}
|