Revision 20663df3

View differences:

streamer.c
43 43
unsigned char msgTypes[] = {MSG_TYPE_CHUNK,MSG_TYPE_SIGNALLING};
44 44
bool chunk_log = false;
45 45

  
46
extern int NEIGHBORHOOD_TARGET_SIZE;
47

  
46 48
static void print_usage()
47 49
{
48 50
  fprintf (stderr,
......
61 63
    "\t[-o size]: set the Output Buffer size.\n"
62 64
    "\t[-c chunks]: set the number of chunks a peer can send per seconds.\n"
63 65
    "\t             it controls the upload capacity of peer as well.\n"
66
    "\t[-M peers]: neighbourhood target size.\n"
64 67
    "\t[-t time]: chunk emission period. STILL NEEDED??\n"
65 68
    "\t[-P port]: local UDP port to be used by the peer.\n"
66 69
    "\t[-I IP]: local IP address to be used by the peer.\n"
......
106 109
	{0, 0, 0, 0}
107 110
  };
108 111

  
109
    while ((o = getopt_long (argc, argv, "b:o:c:t:p:i:P:I:f:F:m:lC:N:n:",long_options, &option_index)) != -1) { //use this function to manage long options
112
    while ((o = getopt_long (argc, argv, "b:o:c:t:p:i:P:I:f:F:m:lC:N:n:M:",long_options, &option_index)) != -1) { //use this function to manage long options
110 113
    switch(o) {
111 114
      case 0: //for long options
112 115
        if( strcmp( "chunk_log", long_options[option_index].name ) == 0 ) { chunk_log = true; }
......
155 158
      case 'N':
156 159
        peername = strdup(optarg);
157 160
        break;
161
      case 'M':
162
        NEIGHBORHOOD_TARGET_SIZE = atoi(optarg);
163
        break;
158 164
      default:
159 165
        fprintf(stderr, "Error: unknown option %c\n", o);
160 166
        print_usage();
topology.c
23 23
#include "dbg.h"
24 24
#include "measures.h"
25 25

  
26
#define NEIGHBORHOOD_TARGET_SIZE 20
26
int NEIGHBORHOOD_TARGET_SIZE = 20;
27 27
#define TMAN_MAX_IDLE 10
28 28
#define TMAN_LOG_EVERY 1000
29 29

  

Also available in: Unified diff