*BSD News Article 10519


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA247 ; Sun, 31 Jan 93 13:59:15 EST
Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!darwin.sura.net!gatech!news.byu.edu!ux1!fcom.cc.utah.edu!cs.weber.edu!terry
From: terry@cs.weber.edu (A Wizard of Earth C)
Subject: Re: SYS_getdomainname error (using getdomainname patch)
Message-ID: <1993Jan29.174916.15369@fcom.cc.utah.edu>
Sender: news@fcom.cc.utah.edu
Organization: Weber State University  (Ogden, UT)
References: <1ka4e3INNi4p@hrd769.brooks.af.mil>
Date: Fri, 29 Jan 93 17:49:16 GMT
Lines: 77

In article <1ka4e3INNi4p@hrd769.brooks.af.mil> burgess@hrd769.brooks.af.mil (Dave Burgess) writes:
>  I have recently been trying to get the yellow pages (yp)  programs to work
>with 386bsd.  This involved implementing a getdomainname function in the
>kernel and in libc.a .
>
>  Sounds good so far.  Someone (whose name got handily trimmed from the 
>article) posted just such a patch about three weeks ago.  I figured I would
>just drop it in and press on from there.  The patches apply without a hitch,
>but did not compile cleanly.  There were two variables that were referenced, 
>but never declared.  No Problem, I think, I'll just declare them (global) and
>recompile.  After that, everything seem to work fine.  I built the new kernel,
>booted with it, and ran.  Everything seems to be fine so far.
>
>  Next, I rebuilt libc.a.  The functions that were added were [gs]etdomainname.
>They are implemented in the kernel and have appropriate pointers in the 
>three files that require them.  
>
>  When I tried to link the yp programs before, I would get "Undefined 
>getdomainname".  Now I get an undefined reference to SYS_getdomainname
>from getdomainname.o when I link the program.  
>
>  When does a SYS_* label get generated?  I can't find it in any of the
>sources.  Pointers would be REALLY appreciated at this point.

/usr/include/sys/syscalls.h, a file generated from syscalls.master...
the list of system calls supported by the machine.

The domainname is communicated to and from programs by virtue of it's
storage in a kernel character array.  This is read or written using a
system call.  For compatability, might I suggest 162 and 163 for
SYS_getdomainname and SYS_setdomainname respectively?  This is what
Sun uses.

>  Also, if you posted the getdomainname kernel patch, I'd really like to
>hear from you so that we can nail down those two unresolved variable
>references.

This is actually cake to write if you don't have the patch.  Have you
been coordinating with Theo de Raadt (deraadt@newt.cuc.ab.ca)?  He
announced his YP last Saturday (23rd), although it still needs support work
in libc.  I believe he was the getdomainname poster as well:

Message-ID: <DERAADT.93Jan22014641@newt.newt.cuc.ab.ca>:

] I've essentially finished my client (re-)implimentation of YP for 386BSD.
] I've tried to make it compatible to sun's. I'm feeling lazy though when it
] comes to implimenting the getpwent() style functions... Basically what I
] have is all the functions in the sun manual page ypclnt(3N), ypbind(8),
] ypcat(1), ypmatch(1) and ypwhich(1).
] 
] If anyone wants a little project either grab the source out of my home
] directory on ref.tfs.com, or send me mail and I'll send it to you.
] I don't figure that hacking getpwent(), getgrent(), gethostent(), etc..
] and friends to do this should take all that much work.
] 
] Anyone interested??
 
Ah... here's the info on the getdomainname patch:

] Message-Id: <9211171107.AA08690@newt.cuc.ab.ca>

(it was Theo who posted it).  This is probably one of the many patches
that weren't directly stability patches and so didn't get into the 0.2
kit (or maybe it did, and I haven't looked hard enough yet 8-)).


					Terry Lambert
					terry@icarus.weber.edu
					terry_lambert@novell.com
---
Any opinions in this posting are my own and not those of my present
or previous employers.
-- 
-------------------------------------------------------------------------------
                                        "I have an 8 user poetic license" - me
 Get the 386bsd FAQ from agate.berkeley.edu:/pub/386BSD/386bsd-0.1/unofficial
-------------------------------------------------------------------------------