perror("read");
exit(1);
}
- return SEND;
+ return STORE_ONLY;
}
void init_read(struct in_ctx *ctx)
{
volatile struct tpacket2_hdr *hdr = ctx->ptr + ctx->current*FRAME_SIZE;
- if (ctx->from_in == NOP)
+ if (ctx->from_in == NOP) {
+ CHECK(send(ctx->s, NULL, 0, 0));
return 0;
+ }
while (hdr->tp_status != TP_STATUS_AVAILABLE) {
CHECK(send(ctx->s, NULL, 0, 0));