Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Feb 1996 17:06:03 -0800 (PST)
From:      "Brant Katkansky" <brantk@gatekeeper.atlas.com>
To:        msmith@atrad.adelaide.edu.au (Michael Smith)
Cc:        bmk@dtr.com, msmith@atrad.adelaide.edu.au, brantk@gatekeeper.atlas.com, hackers@freebsd.org
Subject:   Re: need help w/rpc stuff
Message-ID:  <9602230106.AA01360@billthecat.atlas.com.>
In-Reply-To: <199602230030.LAA20596@genesis.atrad.adelaide.edu.au> from "Michael Smith" at Feb 23, 96 11:00:22 am

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> 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 <nfs/nfs.h>, but I can find no such user or kernel
stucture in FreeBSD.

Also, the SunOS <nfs/nfs.h> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9602230106.AA01360>