I did not understand it but when i use sizeof(pkt) instead of len, error does not come. What can be the reason. I want to copy data from 'pkt' to...
Hi, struct Buffer { unsigned char pkt[4092]; }; struct Buffer *start; start=(struct Buffer *)malloc(sizeof(struct Buffer)); unsigned char...
Hey guys. It has been a week that I did not hear any reply to my post. Please help me to complete this task. I am not getting how to use locks in...
I am really sorry if I am unable to explain my problem. In short, I am unable to send the smallest time stamped packet at its play out time. I get...
Sorry Outer loop is do-while. could not copy properly. Here it goes. do { pthread_mutex_lock( &mut ); // pthread_mutex_lock( &mut...
Problem seems to be in synchronization of the threads. Can you please answer my other thread in this forum "synchronizing two threads". In this...
Creation of predefined size Link list specific code int counter=0; emptylist=NULL; pktlist=NULL; senderlist=NULL; // snode=NULL;...
List flow in the thread-1 is given below. remaining text is omitted. It is only how each time a new packet comes and is being stored using the...
Here is the code of the first thread. pthread_mutex_t mutex2=PTHREAD_MUTEX_INITIALIZER; void* capture(void* ptr) { printf("I am inside the...
Sorry i had another post on the same forum and I have written the synchronization issues in your reply. Other than synchronization issues you can...
Well this program works between two network interfaces. It contains two threads, capture and sender. Capture thread captures packets at first...
Hi, I have to create a ciruclar list that is shared between two threads. One thread extends the list by storing each new packet on a new node and...
Hi I have two threads. One thread (capture) captures packets on NIC-1 and store them in a circular linked list and the other thread (sender)...
Separate names with a comma.