Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 778 → Rev 777

/shark/trunk/tracer/newtrace/FTrace_udp.c
51,7 → 51,7
#define UDP_MAXSIZE 1000
#define TRACER_PORT 20000
 
#define DELAY_USEC 5000
#define DELAY_LOOP 1000000
 
BYTE pkt[UDP_MAXSIZE];
int total_pkt_size = 0;
114,6 → 114,8
struct FTrace_udp_header head = {"TRACER-V1.0",0,0,0};
struct FTrace_udp_header *phead = (struct FTrace_udp_header *)(pkt);
 
int i;
 
if ((total_pkt_size + size < UDP_MAXSIZE) && p != NULL ) {
 
if (total_pkt_size == 0) {
146,12 → 148,12
} else {
 
#ifdef TRACER_UDP_DEBUG
cprintf(".");
cprintf("Packet Sent - Nr %d Size %d\n",packet_number,total_pkt_size);
#endif
 
if (TracerUDPInit == 1) {
udp_sendto(socket, pkt, total_pkt_size, &target);
usleep(DELAY_USEC);
for (i=0;i<DELAY_LOOP;i++);
}
 
events_number = 0;
195,7 → 197,7
sending_flag = 0;
 
#ifdef TRACER_UDP_DEBUG
cprintf("\nTotal Chunk Event Sent: %d\n",(int)count);
cprintf("Total Chunk Event Sent: %d\n",(int)count);
#endif
 
return 0;