From owner-freebsd-questions Fri Jul 19 08:46:37 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id IAA03948 for questions-outgoing; Fri, 19 Jul 1996 08:46:37 -0700 (PDT) Received: from ime.net (root@ime.net [204.97.248.4]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id IAA03941 for ; Fri, 19 Jul 1996 08:46:32 -0700 (PDT) Received: from kimiko.tcguy.net (buxton-7.ime.net [206.231.148.136]) by ime.net (8.7.4/8.6.12) with SMTP id LAA28964 for ; Fri, 19 Jul 1996 11:46:27 -0400 (EDT) Message-ID: <31EFADF9.7E3E@ime.net> Date: Fri, 19 Jul 1996 11:47:05 -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: FreeBSD-Questions Subject: Scanning for Interfaces! Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hiya all. I'm working on hacking up a Linux IPX program, LinWare (lwared-0.95) I've got it compiling, It runs, It dosn't work! :( No connection to the interface yet. The problem: Several. :( In hopes of: Help! Reason : It's over my head. :( And would like very much to change this! Only way is to dive in! I have, I need some assitance. System 2.1.0-R, fbsd-ipx patch. (2.1.5 when I get the CD) Problem one: socket(AF_IPX, SOCK_xxxx, PF_IPX) Fails with: Protocol not supported! (xxxx = DGRAM or others) So I look elsewhere for uses of 'socket', I of course found many and noticed that few use the third param. (protocol) Is there something else thats missing?? My fix was: (Right or wrong, I don't know) socket(AF_IPX, SOCK_xxxx, 0) This got me past this prob! Did it lead me to the following! Problem two: Scanning for interfaces fails! It seems the index of the interface structures/tables is off, It lists the first one sorta right, And the rest keep getting further and further off. (The first one works except for the address translation, I can fix) I have compared the structures they match pretty close! I see nothing that should cause this! the sizes are all determind via sizeof() anyways. Is there a function someplace that is a prime example of scanning for interfaces! I have looked through, IPXrouted, netstat, various if_?? files. They are all specfic. I would post the apporaite functions but they are a bit large! Would prefer sending in private, versus the list. IPXrouted seems to run fine although I don't know how to test/use it! (Or really what it would be used for??) My net HW setup is: ed0: Generic NE2000 ifconfig_ed0="inet a.b.c.d netmask 0xffffff00 ed1: Novell NE1000 (810- or 950- model, forget) ifconfig_ed1="ipx 0x14239" Cabling: Thinnet. Netware 3.11 IPX,TCP/IP ipx internal net: 6345403-----FBSD_ed0-| FBSD_ed1-|---various_others! Any ideas? BTW: I added two things to sockaddr_ipx in sys/netipx/ipx.h 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 */ }; What would be the apporaite change?? (Tall order :) I'm sure sipx_network could be changed in my hack to fit the sipx_addr structs if I knew what the comparable was. Yes, I have lots to learn, I'm not afraid to! But I need some guidence. Thanks. -Enjoy Gary ~~~~~~~~~~~~~~~~ Improve America's Knowledge... Share yours The Borg... Where minds meet (207) 929-3848