Date: Thu, 23 Mar 2000 23:39:53 +0200 From: Viktors Rotanovs <viktors@riga.nu> To: freebsd-isp@freebsd.org Subject: divert socket -- am i doing something wrong? Message-ID: <38DA8F29.D3CBE71F@riga.nu>
next in thread | raw e-mail | index | archive | help
Hello! Maybe not exactly for this list, but... I wrote a piece of code like this: 8<------------------------------------------------------------- tee = socket(PF_INET, SOCK_RAW, IPPROTO_DIVERT); addr.sin_family = AF_INET; addr.sin_addr.s_addr = INADDR_ANY; addr.sin_port = 30000; bind(tee, (struct sockaddr *)&addr, sizeof(addr)); fds[0].fd = tee; fds[0].events = POLLIN | POLLRDNORM | POLLRDBAND | POLLPRI; poll(fds, 1, 1000000); 8<------------------------------------------------------------- and than run this command: /sbin/ipfw add 1 tee 30000 all from any to any via lo0 and pinged localhost.. and poll() didn't return anything before timeout! anyone has any ideas what's wrong? Best Wishes, Viktors Rotanovs To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38DA8F29.D3CBE71F>