50 #ifndef _NetworkUtil_H_
51 #define _NetworkUtil_H_
59 #include "util/functions.h"
60 using namespace ::br::pucrio::telemidia::util;
71 namespace multidevice {
72 static const unsigned int BROADCAST_PORT = 41000;
73 static const string PASSIVE_MCAST_ADDR =
"239.10.10.3";
76 static const int BASE_WRITE_BCAST_PORT = 51000;
77 static const int SECO_WRITE_BCAST_PORT = 61000;
79 static const string INTERFACE_NAME_A =
"eth0";
80 static const string INTERFACE_NAME_B =
"wlan0";
81 static const int PASSIVE_FPS = 15;
82 static const int MCAST_TTL = 31;
83 static const int HEADER_SIZE = 11;
84 static const int MAX_FRAME_SIZE = 400000;
85 static const int NUM_OF_COPIES = 1;
86 static const double IFS = 1;
88 bool isValidRecvFrame(
int recvFrom,
int myIP,
char*
frame);
89 bool isControlFrame(
int frameType);
90 char getFrameId(
char*
frame);
91 int getFrameType(
char*
frame);
92 unsigned int getUIntFromStream(
const char* stream);
93 char* getStreamFromUInt(
unsigned int uint);
94 string getStrIP(
unsigned int someIp);
99 unsigned int payloadSize);
Definition: NetworkUtil.h:53