From owner-freebsd-hackers Thu Feb 22 17:05:58 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id RAA05742 for hackers-outgoing; Thu, 22 Feb 1996 17:05:58 -0800 (PST) Received: from atlas.com (gw.atlas.com [205.139.124.67]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id RAA05681 for ; Thu, 22 Feb 1996 17:04:36 -0800 (PST) Received: from billthecat.atlas.com. (billthecat.atlas.com [97.12.13.38]) by atlas.com (8.7.1/8.7.1) with SMTP id RAA03634; Thu, 22 Feb 1996 17:02:32 -0800 (PST) Received: by billthecat.atlas.com. (4.1/SMI-4.1) id AA01360; Thu, 22 Feb 96 17:06:03 PST Message-Id: <9602230106.AA01360@billthecat.atlas.com.> Subject: Re: need help w/rpc stuff To: msmith@atrad.adelaide.edu.au (Michael Smith) Date: Thu, 22 Feb 1996 17:06:03 -0800 (PST) From: "Brant Katkansky" Cc: bmk@dtr.com, msmith@atrad.adelaide.edu.au, brantk@gatekeeper.atlas.com, hackers@freebsd.org In-Reply-To: <199602230030.LAA20596@genesis.atrad.adelaide.edu.au> from "Michael Smith" at Feb 23, 96 11:00:22 am X-Mailer: ELM [version 2.4 PL25] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org Precedence: bulk > > bmk@dtr.com stands accused of saying: > > > > I'm also having problems compiling some NFS stuff - it compiles and runs > > under SunOS (4.x and 5.x), SCO, dynix, and dynix/ptx. > > > > Unfortunately, there seems to be some structures in > > /usr/include/nfs/nfs.h which aren't implemented in FreeBSD. I can't be > > more specific right now, as the machine in question has been shut down > > for the rest of the morning for emergency A/C repairs in our machine > > room. > > You'll need to be more specific about your problem 8) OK - keep in mind I'm working under an NDA here, so I can't post the entire source. Here's a representative sample of what I'm up against: cc -g -I../include -I/usr/include -DSYSV_IPC -Dfreebsd -c fe_xdr.c fe_xdr.c: In function `xdr_fattr': fe_xdr.c:78: dereferencing pointer to incomplete type fe_xdr.c:80: dereferencing pointer to incomplete type fe_xdr.c:82: dereferencing pointer to incomplete type fe_xdr.c:84: dereferencing pointer to incomplete type fe_xdr.c:86: dereferencing pointer to incomplete type 73:xdr_fattr(xdrsp, fattrp) 74:XDR *xdrsp; 75:struct nfsfattr *fattrp; 76:{ 77: 78: if (!xdr_enum(xdrsp, &fattrp->na_type)) 79: return(0); 80: if (!xdr_u_long(xdrsp, &fattrp->na_mode)) 81: return(0); 82: if (!xdr_u_long(xdrsp, &fattrp->na_nlink)) 83: return(0); 84: if (!xdr_u_long(xdrsp, &fattrp->na_uid)) 85: return(0); 86: if (!xdr_u_long(xdrsp, &fattrp->na_gid)) 87: return(0); It looks to me like struct type nfsfattr is the culprit - in SunOS it's defined in , but I can find no such user or kernel stucture in FreeBSD. Also, the SunOS specifies some other structs like nfswriteargs and nfsreadargs, which I suspect are probably kernel structs in FreeBSD. There are other problems, I'm sure, but if I can tackle these, the rest are probably trivial. > > So I guess I have two more questions: > > > > * Is userland NFS code from SunOS generally workable under BSD? > > "Generally" Playing it safe? :) > > * If so, are there any references to assist in porting? > > You just need to be prepared to rework your #includes, and chase stuff that > SunOS put in the user headers that's really kernel data structures. I'm > not a real SunOS porting guru, these are just my observations based on > what I've done. > > Sun invented most of the NFS stuff, so we should still be pretty compatible. Yeah, well, IBM invented the PC, too. :) -- Brant Katkansky (brantk@atlas.com) Systems Test Engineer, ADC