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 'start->pkt' but of length len and sizeof(pkt) and len are not same.