--- libaitio/example/bpf.c 2013/06/25 17:06:02 1.1.2.6 +++ libaitio/example/bpf.c 2013/06/25 17:16:37 1.1.2.7 @@ -300,9 +300,9 @@ main(int argc, char **argv) strlcpy(szStr, *argv, sizeof szStr); #ifdef __FreeBSD__ - dev = io_etherOpen(szStr, O_RDWR, 42, (u_int*) &siz, &bz); + dev = io_etherOpen(szStr, O_RDWR | O_NONBLOCK, 42, (u_int*) &siz, (flg) ? &bz : NULL); if (dev == -1) - dev = io_etherOpen(szStr, O_RDWR, 42, (u_int*) &siz, NULL); + dev = io_etherOpen(szStr, O_RDWR | O_NONBLOCK, 42, (u_int*) &siz, NULL); #else dev = io_etherOpen(szStr, O_RDWR, 42, (u_int*) &siz, NULL); #endif @@ -344,7 +344,7 @@ main(int argc, char **argv) if (poll(&pfd, 1, -1) == -1) break; - ret = io_etherRecv(dev, buffer, siz, bz); + ret = io_etherRecv(dev, buffer, siz, NULL); if (ret == -1) printf("%d) io_etherRecv(%d) #%d - %s\n", i, ret, io_GetErrno(), io_GetError());