From owner-freebsd-questions Sun Nov 24 09:55:12 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA01092 for questions-outgoing; Sun, 24 Nov 1996 09:55:12 -0800 (PST) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id JAA01070 for ; Sun, 24 Nov 1996 09:54:55 -0800 (PST) Received: from tippy2.vnet.net (tippy2.vnet.net [166.82.197.240]) by who.cdrom.com (8.7.5/8.6.11) with ESMTP id IAA08440 for ; Sun, 24 Nov 1996 08:06:32 -0800 (PST) Received: from localhost (cmadison@localhost) by tippy2.vnet.net (8.8.2/8.6.9) with SMTP id LAA22268 for ; Sun, 24 Nov 1996 11:05:10 -0500 (EST) Date: Sun, 24 Nov 1996 11:05:10 -0500 (EST) From: Chris Madison To: questions@freebsd.org Subject: socket(), PF_ROUTE, SOCK_RAW question Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hello freebsd ppl! I've been trying to understand some of the arp code in relation to why I get the cannot intuit message when adding a host via arp -s. Basically in arp.c, function rtmsg(), a socket is written to and read from. Socket(2) is called with the PF_ROUTE, SOCK_RAW options earlier in the code; contained in function getsocket(). Okay, now I know the buffer being written to the socket contains the correct information in the field that I am interested in, but after the read the info is no longer there. The # bytes written is 108 and the amount read is 128, which is the struct rt_msghdr size. Finally to my question, what goes on when the socket is written to? More specifically is the info processed in any way so that when the read is executed the info should be changed????? Or in short, am I to expect to read something from the socket that I didn't write????? Please respond to me directly b/c I'm not subbed at this time. TIA, Chris