From owner-freebsd-questions Sat Jul 20 06:55:02 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id GAA16467 for questions-outgoing; Sat, 20 Jul 1996 06:55:02 -0700 (PDT) Received: from ime.net (ime.net [204.97.248.4]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id GAA16410 for ; Sat, 20 Jul 1996 06:53:39 -0700 (PDT) Received: from kimiko.tcguy.net (buxton-13.ime.net [206.231.148.142]) by ime.net (8.7.4/8.6.12) with SMTP id JAA21214; Sat, 20 Jul 1996 09:51:09 -0400 (EDT) Message-ID: <31F0E45F.283C@ime.net> Date: Sat, 20 Jul 1996 09:51:27 -0400 From: Gary Chrysler Reply-To: tcg@ime.net Organization: The Computer Guy X-Mailer: Mozilla 3.0b4Gold (Win95; I) MIME-Version: 1.0 To: John Hay CC: questions@freebsd.org Subject: Re: Scanning for Interfaces! References: <199607200846.KAA12513@zibbi.mikom.csir.co.za> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk John Hay wrote: > > > > Defining sipx_network there will probably not work, because the kernel > > > part of ipx will expect it inside sipx_addr. Maybe you can make a #define > > > to make getting to it easier, eg. > > > #define sipx_network (*(union ipx_net_u *)&sipx_addr.x_net)).long_e > > > Note that this may not be correct because I have been looking at a > > > -current ipx.h file. > > > > Yea, I did use a define at first and that caused trouble, But > > I didn't do it as you suggest! I'll try it as well as show > > what I have in ipx.h, I belive it is the same as current. > > (MCI's Wonderfull high speed back bone is up to it's normal speed. > > So I couldn't get to a -current ipx.h for comparision before > > this reply, I will look later when usage is lower.) > > My ipx.h is from the fbsd-ipx.tgz. > > It is: (Revelant part, shortened) > > > > union ipx_host { > > u_char c_host[6]; > > u_short s_host[3]; > > }; > > > > union ipx_net { > > u_char c_net[4]; > > u_short s_net[2]; > > }; > > > > union ipx_net_u { > > union ipx_net net_e; > > u_long long_e; > > }; > > > > struct ipx_addr { > > union ipx_net x_net; > > union ipx_host x_host; > > u_short x_port; > > }; > > > > struct sockaddr_ipx { > > u_char sipx_len; > > u_char sipx_family; > > struct ipx_addr sipx_addr; > > char sipx_zero[2]; > > u_char sipx_type; /* tcg */ > > u_long sipx_network; /* tcg */ > > }; > > > > #define sipx_port sipx_addr.x_port > > > > #define sipx_special sipx_addr.x_port /* tcg */ > > /* #define sipx_network sipx_addr.x_net tcg */ > > #define sipx_node sipx_addr.x_host.c_host /* tcg */ > > > > NOTE: Ok pick yourself up off the floor and quit laughing! > > Hey, its not that bad. I did not even fall off the chair. :-) :-) :-) > Aweee.. So you and the chair both fell over huh?? :) Hey, I'm no professional programer, I'm just a dabbler.. I do and learn or crash and burn! > > These (whatevers) did move me along.. Maybe not in the right > > direction but any direction is better then no direction. > > I did get further and learned a bunch! > > > > sipx_special, Is defined the same in the Linux ipx.h > > sipx_node, :) I know it's wrong.. whats right/better?? Was hoping for a suggesting here, Got any?? Linux sockaddr_ipx has it as: unsigned char sipx_node[IPX_NODE_LEN]; > > sipx_network, ?? John, is your suggestion fitting?? > > It look like it should work. Maybe we can make life a bit easier by > adding something like "u_long l_net" inside the ipx_net union?? > Then we can make the #define a bit shorter: > #define sipx_network sipx_addr.x_net.l_net > Something like so: union ipx_net { u_char c_net[4]; u_short s_net[2]; u_long l_net; }; #define sipx_network sipx_addr.x_net.l_net Looks good, Is it technically good??? What will this do to any of the current IPX code! No, I don't have the 'Big Picture' of the IPX code yet, I'm still figuring it out. It would help tremendously If I could put IPXrouted to use somehow! So I can see it in action. I'm sure your goals are the same as mine, I don't want to do anything to the kernel thats not good for FreeBSD in the whole! Thanks for your time. -Enjoy Gary ~~~~~~~~~~~~~~~~ Improve America's Knowledge... Share yours The Borg... Where minds meet (207) 929-3848