From owner-freebsd-hackers Mon Mar 8 5:58:20 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from kyrnet.kg (ns.kyrnet.kg [195.254.160.9]) by hub.freebsd.org (Postfix) with ESMTP id 8E6EC14EDD for ; Mon, 8 Mar 1999 05:58:12 -0800 (PST) (envelope-from fygrave@tigerteam.net) Received: from localhost by kyrnet.kg (8.9.3/8.9.1) with ESMTP id SAA20878 for ; Mon, 8 Mar 1999 18:52:02 +0500 (GMT) X-Authentication-Warning: kyrnet.kg: fygrave owned process doing -bs Date: Mon, 8 Mar 1999 18:52:01 +0500 (GMT) From: CyberPsychotic X-Sender: fygrave@kyrnet.kg To: freebsd-hackers@freebsd.org Subject: SOCK_RAW on BSD Message-ID: Confirm-receipt-to: fygrave@usa.net MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello people, here I've been playing with RAW sockets on FreeBSD and got stumbled abit. Any ideas why code bellow does't seem to get anything passed by kernel. (I read manual pages and /sys/netinet/raw_ip.c but neither place mention any incompatibilies with other systems. This piece would work fine on Linux platforms). #include #include #include #include #include #include void main(void) { char buf[10000]; int s,rdln; s=socket(AF_INET, SOCK_RAW, IPPROTO_RAW); while(1) { rdln=read(s, buf, 9999); printf("got pack len: %i\n",rdln); } } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message