From owner-freebsd-net Sat Nov 30 4:38:47 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 904F137B404 for ; Sat, 30 Nov 2002 04:38:45 -0800 (PST) Received: from hotmail.com (f101.law15.hotmail.com [64.4.23.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3D64843ED1 for ; Sat, 30 Nov 2002 04:38:45 -0800 (PST) (envelope-from soheil_hh@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 30 Nov 2002 04:38:45 -0800 Received: from 80.75.14.11 by lw15fd.law15.hotmail.msn.com with HTTP; Sat, 30 Nov 2002 12:38:44 GMT X-Originating-IP: [80.75.14.11] From: "soheil soheil" To: freebsd-net@freebsd.org Subject: Divert Socket And Q. About Raw Socket Date: Sat, 30 Nov 2002 12:38:44 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 30 Nov 2002 12:38:45.0046 (UTC) FILETIME=[6BFDFD60:01C2986D] Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Dear List first : I want to know if there is any sample of divert socket usage and divert socket programming? I see the ipfw manual it says divert socket is used but when i goto /usr/src/sbin/ipfw and trace ipfw.c i cannot find anything about divert socket i just found a raw socket. second: When i use this code of C (main.c) ....//include sections int main() { int s,fd; char buff[4096]; printf("going to make SD "); s = socket(PF_INET, IP printf("going to read"); soheil: read(s, buff, 4096); // or recv(s,buff,4096, 0); printf("done"); return 0; } After i compile it nothing about output on the screen ( none of printfs are executed ) when i comment out the line labled by soheil it works and output :going to make SD going to read .... I don't know why please help me. THANX alot Soheil hassas yeganeh _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message