c - The correct way to copy data from a sk_buff to a kernel buffer -
can give me total illustration copying entire packet sk_buff? i'm doing along lines of:
char *pkt = skb_header_pointer(sbuf, 0, sbuf->len, mybuf); if (mybuf != pkt) { memcpy(mybuf, pkt, sbuf->len); } where sbuf struct sk_buff * , mybuf own buffer. reasons don't understand, function returns null pointer, indicating has failed. cause? , best way re-create entire buffer?
c networking linux-kernel network-programming kernel
No comments:
Post a Comment