Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 777 → Rev 778

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