From owner-freebsd-hackers Thu Feb 18 6:26: 0 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from heathers.stdio.com (heathers.stdio.com [199.89.192.5]) by hub.freebsd.org (Postfix) with ESMTP id D61FE11419 for ; Thu, 18 Feb 1999 06:25:57 -0800 (PST) (envelope-from lile@stdio.com) Received: from heathers.stdio.com (lile@heathers.stdio.com [199.89.192.5]) by heathers.stdio.com (8.8.8/8.8.8) with ESMTP id JAA14687 for ; Thu, 18 Feb 1999 09:14:52 -0500 (EST) (envelope-from lile@stdio.com) Date: Thu, 18 Feb 1999 09:14:52 -0500 (EST) From: Larry Lile To: hackers@freebsd.org Subject: sockaddr_dl and source routing for token-ring Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I am now working on source routing for the generic token-ring code and it appears that sockaddr_dl is the proper place to store the RIF. What I am curious about is what is the "proper" way to store the information in sockaddr_dl? struct sockaddr_dl { u_char sdl_len; /* Total length of sockaddr */ u_char sdl_family; /* AF_DLI */ u_short sdl_index; /* if != 0, system given index for interface */ u_char sdl_type; /* interface type */ u_char sdl_nlen; /* interface name length, no trailing 0 reqd. */ u_char sdl_alen; /* link level address length */ u_char sdl_slen; /* link layer selector length */ char sdl_data[12]; /* minimum work area, can be larger; contains both if name and ll address */ }; Should I just add "u_short sdl_routing[32] /* Token-ring source route */" or should I append the RIF to the end of sdl_data making it "sdl_data[78]". I prefer adding sdl_routing so that it could be #ifdef'd out of the kernel when no token-ring is present. The length of the RIF can be determined from the first two bytes so either way I should not have to add an sdl_xlen. The reason it is 32 u_short's long is that some token-ring vendors now allow 30 routing segments instead of the IBM standard of 16. Would this break anything in the network stack? Which method is more appropriate? Is there another more preferable method? Larry Lile lile@stdio.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message