From owner-freebsd-isp Thu Mar 23 13:41: 6 2000 Delivered-To: freebsd-isp@freebsd.org Received: from riga.nu (riga.nu.138.62.195.in-addr.arpa [195.62.138.40]) by hub.freebsd.org (Postfix) with SMTP id 49ABF37C553 for ; Thu, 23 Mar 2000 13:40:53 -0800 (PST) (envelope-from viktors@riga.nu) Received: (qmail 71344 invoked from network); 23 Mar 2000 21:39:58 -0000 Received: from unknown (HELO riga.nu) (159.148.169.200) by riga.nu with SMTP; 23 Mar 2000 21:39:58 -0000 Message-ID: <38DA8F29.D3CBE71F@riga.nu> Date: Thu, 23 Mar 2000 23:39:53 +0200 From: Viktors Rotanovs Organization: DATIONS Ltd. X-Mailer: Mozilla 4.7 [en] (X11; I; FreeBSD 4.0-20000208-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-isp@freebsd.org Subject: divert socket -- am i doing something wrong? Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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