Date: Wed, 31 Jan 2007 14:54:06 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 113763 for review Message-ID: <200701311454.l0VEs6RY099630@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=113763 Change 113763 by rwatson@rwatson_cinnamon on 2007/01/31 14:53:44 Add BPF utility function to set immediate mode. Affected files ... .. //depot/projects/zcopybpf/utils/zbuf_tap/bpf_util.c#3 edit .. //depot/projects/zcopybpf/utils/zbuf_tap/zbuf_tap.h#3 edit Differences ... ==== //depot/projects/zcopybpf/utils/zbuf_tap/bpf_util.c#3 (text+ko) ==== @@ -168,6 +168,15 @@ } int +bpf_setimmediate(int fd, u_int immediate) +{ + + if (ioctl(fd, BIOCIMMEDIATE, &immediate) < 0) + return (-1); + return (0); +} + +int bpf_setzbuf(int fd, void *bufa, void *bufb, u_int buflen) { struct bpf_zbuf bz; ==== //depot/projects/zcopybpf/utils/zbuf_tap/zbuf_tap.h#3 (text+ko) ==== @@ -41,6 +41,7 @@ int bpf_send(int fd, u_char *packet, u_int packetlen); int bpf_setbufmode(int fd, u_int bufmode); int bpf_setif(int fd, const char *ifname); +int bpf_setimmediate(int fd, u_int immediate); int bpf_setzbuf(int fd, void *bufa, void *bufb, u_int buflen); void tap_close(int fd);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701311454.l0VEs6RY099630>