From owner-freebsd-net Mon Nov 5 17:21:29 2001 Delivered-To: freebsd-net@freebsd.org Received: from rose.niw.com.au (cerberus.apdata.com.au [202.14.95.17]) by hub.freebsd.org (Postfix) with ESMTP id 2C56F37B416 for ; Mon, 5 Nov 2001 17:21:24 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by rose.niw.com.au (Postfix) with ESMTP id 933BD97248; Tue, 6 Nov 2001 11:51:21 +1030 (CST) Received: by rose.niw.com.au (Postfix, from userid 1000) id 2546697247; Tue, 6 Nov 2001 11:51:20 +1030 (CST) Date: Tue, 6 Nov 2001 11:51:20 +1030 From: Ian West To: Garrett Wollman Cc: freebsd-net@FreeBSD.ORG Subject: Re: Results from RTM_GET on route socket ? Message-ID: <20011106115119.L34308@rose.niw.com.au> References: <20011106075451.E34308@rose.niw.com.au> <200111052156.fA5Lutl92439@khavrinen.lcs.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200111052156.fA5Lutl92439@khavrinen.lcs.mit.edu>; from wollman@khavrinen.lcs.mit.edu on Mon, Nov 05, 2001 at 04:56:55PM -0500 X-Virus-Scanned: by AMaViS perl-10 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 On Mon, Nov 05, 2001 at 04:56:55PM -0500, Garrett Wollman wrote: > < said: > > > Starting at the * (Offset 5c, sizeof(struct rt_msghdr) I have 16 bytes > > for RTA_DST, 16 bytes for RTA_GATEWAY, and then 4 null bytes. > > The first null byte is the length of the netmask, indicating that you > have a zero-length netmask, and the remaining three nulls are padding. > > -GAWollman > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message Thanks for that, makes sense :-) More questions though, the following is a response to a request for 192.168.20.1. The response is a general subnet route, how should I interpret the mask field ? (It is actually class C) I can't find a reference to a AF_ type for -1 or 255, but the field is a bit small for a sockaddr_in. 0x0000: cc 00 05 04 02 00 00 00 43 08 01 00 37 00 00 00 L C 7 0x0010: de 11 00 00 01 00 00 00 00 00 00 00 00 00 00 00 ^ 0x0020: 00 00 00 00 00 00 00 00 dc 05 00 00 00 00 00 00 \ 0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0050: 00 00 00 00 00 00 00 00 00 00 00 00 10 02 00 00 0x0060: c0 a8 14 00 00 00 00 00 00 00 00 00 10 02 00 00 @( 0x0070: c0 a8 01 05 00 00 00 00 00 00 00 00 07 ff ff ff @( 0x0080: ff ff ff 00 38 12 02 00 06 03 06 00 64 63 30 00 8 dc0 0x0090: 80 c8 cd 23 fd 00 00 00 00 00 00 00 00 00 00 00 HM#} 0x00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x00b0: 00 00 00 00 00 00 00 00 00 00 00 00 10 02 00 00 0x00c0: c0 a8 01 09 00 00 00 00 00 00 00 00 -- -- -- -- @( To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message