HDTenEightyP/NetNews huggingface dataset:
From: donn@carson.u.washington.edu (Donn Cave)
Newsgroups: comp.unix.programmer
Subject: Re: getservbyname(), getprotobyname(), gethostbyname()
Date: 15 Sep 92 16:38:29 GMT
Article-I.D.: u.1992Sep15.163829.26987
Organization: University of Washington

epeterso@encore.com (Eric Peterson) writes:

>berg@physik.tu-muenchen.de (Stephen R. van den Berg) writes:

>| Now, in order to that, I have to find out the following:
>| 
>| 	1. gethostbyname("localhost.or.something.else")
>| 	2. getservbyname("biff")
>| 	3. getprotobyname("udp")
>| 
>| Well, so far so good, the only trouble is, these calls are done every time
>| when mail arrives.  I was wondering, what is common practice in this case?
>| 
>| 	a. Go by the book and make all three calls at runtime?
>| 	b. Do 1. and 2. at runtime, 3. at compile time?
>| 	c. Do 1. at runtime, 2. and 3. at compile time?
>| 	d. Do all three at compile time?  (By compile-time I mean: compile
>| 	   a separate program that makes these calls, and then use the output
>| 	   from this program to hardcode the number(s) in the real program).
...
> I would consider *ONLY* (a) to be acceptable practice.  These functions
> are system database query functions, and the intent of making them
> functions and not, say, header file definitions was to sever the dependency
> between the code and the data (ie, you wouldn't have to rebuild if you
> decided to change the UDP protocol number).

> Having said that, you could probably safely get away with hard-coding
> these numbers into your code if you wanted to (except for the
> gethostbyname() call) since they are so common that they probably
> won't change.

Not only that, but perhaps you don't want to know if they do change.  Maybe
I don't understand something here, but doesn't getservbyname("biff") tell
me what port biff uses on_my_local_system?  If I want to connect to the
"biff" service on "localhost.or.something.else", it's to be hoped that they
will both use the same port, but if they don't, I certainly don't want to
know about the local installation.

/etc/services is a useful way to advertise port numbers between programmers
and system administrators, who otherwise would have no way to reserve a port,
but whether applications should refer to that file is open to question,
depending particularly on the system administration context.

	Donn Cave, University Computing Services, University of Washington
	donn@cac.washington.edu
Newsgroups: comp.unix.programmer
From: gmarzot@mitre.org (G. S. Marzot)
Subject: floppies PC->Sparc2
Organization: MITRE Corp.
Date: Tue, 15 Sep 1992 18:48:11 GMT

can I get a SPARC2 to read a PC 3.5" floppy?
thanks - GSM
gmarzot@linus.mitre.org
Newsgroups: comp.unix.programmer
From: dave@copi.cmhnet.org (David Diller)
Subject: Possible to turn a lib into a shared lib? (ISC)
Organization: Coordinated Office Programs
Distribution: comp
Date: Mon, 14 Sep 1992 15:54:20 GMT

Has anyone ever tried this or been successful at it?  It would be nice to
turn libcurses.a into a libcurses_s.a.  This would shrink the size of our
binaries considerably.  

Please let me know if you have any info on this topic.

Thanks,

-- 
David Diller            (dave@copi.cmhnet.org)     (614) 469-0240 Work.
Newsgroups: comp.unix.programmer
From: rkitts@netcom.com (Rick Kitts)
Subject: Creating accounts in C
Date: Thu, 10 Sep 92 23:40:34 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Distribution: na


 I seem to be having a problem creating accounts from within a C program
using only C function calls. I can create the information correctly (I
think), add it to /etc/passwd and /etc/shadow in a form which seems to
be rational but I am unable to login to the account. This is Esix SVR4
running on a 486 by the way. Does any one have any idea of what I could
be doing wrong or, better, have code that does this already? Any
help would be appreciated.


---Rick
From: urlichs@smurf.sub.org (Matthias Urlichs)
Newsgroups: comp.unix.programmer
Subject: Multi-access [ng]dbm-like "database" wanted
Date: 13 Sep 1992 21:27:05 +0200
Organization: University of Karlsruhe, FRG
NNTP-Posting-Host: 127.0.0.1

Hi,

I need to access a [g]dbm database from several processes simultaneously.
The catch is that these processes all require write access to the database.

Is there a simple library&daemon that implements the dbm* interface as
a daemon with eg. a Unix-domain socket interface?

Any other solutions, other than Oracle?  ;-)

-- 
Pareto's Law   (The 20/80 Law)
   20% of the customers account for 80% of the turnover,
   20% of components account for 80% of the cost, and
   so forth.
-- 
Matthias Urlichs  --  urlichs@smurf.sub.org -- urlichs@smurf.ira.uka.de   /(o\
Humboldtstrasse 7 -- 7500 Karlsruhe 1 -- Germany  --  +49-721-9612521     \o)/
From: hurtta@cs.Helsinki.FI (Kari E. Hurtta)
Newsgroups: comp.unix.programmer
Subject: Re: Detecting a broken socket
Date: 7 Sep 92 10:03:29 GMT
Organization: Department of Computer Science, University of Helsinki, Finland

In article <camh.715839302@balrog> camh@nms.otca.oz.au (Cameron Hutchison) wrote:
> My method of testing the keep alive timer was to have a server
> machine "emulating" the comms server (from the standpoint of a socket
> connection) and a client machine to connect to it. I then simulated
> the dropping of the connection by pulling the network connection
> to the server machine. I let the client machine run for about 45
> minutes before giving up. The client machine did not detect the
> broken connection.

Well, If I have heard this correct: In some implementations this
time out of keep alive timer is 2-4 HOURS.

- K E H
( Kari.Hurtta@Helsinki.FI,
  hurtta@cc.Helsinki.FI,
  hurtta@cs.Helsinki.FI,
  HURTTA@FINUH.BITNET
)
Newsgroups: comp.unix.programmer
From: silver@fraser.sfu.ca (Craig Silver)
Subject: NEEDED: Spell Checker with Source
Organization: Simon Fraser University, Burnaby, B.C., Canada
Date: Sun, 13 Sep 1992 08:38:58 GMT

        I need to find a large compressed dictionary (say around 
at least 80 000 words, plus the prefixes and suffixes) and some 
ANSI C source code allowing me to read words from the compressed 
dictionary without decompressing the whole thing into RAM.  I'm 
working on an Amiga so Unix C source is fine.  
 
        Please email me if you know of such a beast.  Thanks.


-- 

------------------------------------------------------------------------
Craig Silver	                	    Simon Fraser University
silver@sfu.ca (Internet)	            Burnaby, B.C., Canada
Newsgroups: comp.unix.programmer
From: schieb@shark.gsfc.nasa.gov (Brian D. Schieber)
Subject: NY UNIX Expo info please
Reply-To: schieb@shark.gsfc.nasa.gov (Brian D. Schieber)
Organization: Oceans & Ice Branch, NASA/GSFC/GSC
Distribution: na
Date: Sat, 5 Sep 1992 20:15:26 GMT

Could someone pass me the blurb on the upcoming UNIX 
expo in NY for around Sept 23rd please. Sorry if I missed
the FAQ.

Thanks,
--Brian

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^ Brian D. Schieber            NASA/Goddard Space Flight Center ^
^ schieb@shark.gsfc.nasa.gov   Laboratory for Hydrospheric      ^
^ DECnet: urchin::schieb        Processes                       ^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Newsgroups: comp.unix.programmer
From: rande@rtsg.mot.com (Kristian V. Rande)
Subject: How To Get A List of Processes
Organization: Motorola Inc., Cellular Infrastructure Group
Distribution: usa
Date: Wed, 9 Sep 1992 21:57:21 GMT

I'm trying to get a list of active processes from within some C code running
on a Sun 3/60.  So far I've been having a lot of trouble, though, and I'm
hoping that somebody can give me some help.

I believe I need to use the kernel library routines kvm_open(),
kvm_nextproc(), and kvm_close() to obtain structures of the type defined in
the header file <proc.h>.  Unfortunately I get

    "cannot open /dev/mem: Permission denied" or

    "cannot open /dev/kmem:  Permission denied"

errors whenever I run my code.  I think this is because I have no access to
these special files.  An "ls -lgF" on these two files yields:

   crw-r-----  1 root     kmem       3,   1 Jul 10  1990 /dev/kmem
   crw-r-----  1 root     kmem       3,   0 Aug 10  1990 /dev/mem

I don't have root access, nor do I have kmem group access.

Here's the test code fragment that makes the calls:

   if ( ( kd = kvm_open( NULL, NULL, NULL, O_RDONLY, "test" ) ) != NULL )
   {
      info = kvm_nextproc( kd );
      printf( "pid = %d  uid = %d\n", info->p_pid, info->p_uid );
      kvm_close( kd );
   }


My questions are:

   1. Is there any way I can legitimately get around the mode restrictions
      on "/dev/kmem" so that I can use kvm_nextproc()?

   2. Is there another way that I can get information about all of the
      other active processes in the kernel?

Thanks for any help you can give me.

  ----------------------------------------------------------------------
  Kris V. Rande                                "My opinions are my own."
  Motorola Radio Telephone Systems Group
  Arlington Heights, Illinois                         rande@rtsg.mot.com
Newsgroups: comp.unix.programmer
Subject: any book on STREAMS PROGRAMMING
From: rchandra@cstp.umkc.edu
Date: Wed, 9 Sep 1992 20:57:29 GMT
Organization: UM - Kansas City, Computer Science


	I am looking for some books on streams programming. Are there any of

them available ? I would appreciate if you could send or post the name of 

the book and the author.

thanx,

ravi


email : rchandra@vax2.cstp.umkc.edu
From: maf@tabatha.MAE.CWRU.EDU (Mark Fullmer)
Newsgroups: comp.unix.programmer
Subject: Re: Determining Ethernet Addresses of Network Machines
Date: 16 Sep 1992 04:46:37 GMT
Organization: Case Western Reserve University
NNTP-Posting-Host: tabatha.mae.cwru.edu
Keywords: help...

In article <1004@cybaswan.UUCP> ccpaulm@cybaswan.UUCP (Paul Matthews) writes:
>Hi,
>
>	We've been trying to build up a database of all the
>	machines on our network, such as ip number, hostname
>	and the ethernet address. So far, the program I've
>	come up with is very crude/slow...it takes the /etc/hosts
>	file as it's list of known machines and then performs a 
>	ping on each machine and then uses arp -a (via grep) to

I have a small perl script that makes a database of "tcpdump -enl arp" or
"tcpdump -penl arp,"  the latter if you want to see replies at the expense
of cpu time.  Then another that creates reports.   I'd like to add a ping
option and proxy arp detect...then again classes start next week :)

Try anonymous ftp on curiosity.cob.ohio-state.edu /pub/arpmon in a few
days.

This much works:

	print "usage: ipreport pmf:lkh\n";
	print "  -m only print hosts with more than one hw address\n";
	print "  -f filter. eg -f 128\.146\.109\..* for only hosts in subnet 109\n";
	print "  -l only list new entries (looks at $lasttime)\n";
	print "  -k Kill -HUP the arpmon process before starting\n";
	print "  -n don't resolve hostnames\n";
	print "  -r only print arp replies\n";
	print "  -b only print arp requests (broadcasts)\n";

reports look like:

Arpmon report started 2:2:15 8/15/92 as -k

IP: 128.146.109.18  buyout.cob.ohio-state.edu
     Hardware Address:         02:60:8C:0B:C7:1E (3Com IBM PC; Imagen; Valid;
     Number of Arp broadcasts: 9
     First Seen:               7:39:19 8/8/92
     Last Seen:                15:34:57 14/8/92   Asking For 128.146.109.9

     Hardware Address:         02:60:8C:0B:C7:1E (3Com IBM PC; Imagen; Valid;
     Number of Arp Replies:    12
     First Seen:               7:44:18 8/8/92
     Last Seen:                7:58:23 8/8/92     Replying To aa:0:4:0:cc:18

IP: 128.146.109.190 charlotte
     Hardware Address:         08:00:20:00:57:D9 (Sun)
     Number of Arp broadcasts: 2
     First Seen:               15:34:18 14/8/92
     Last Seen:                19:1:0 14/8/92     Asking For 128.146.109.24


--
mark
maf+@osu.edu
From: ecco@rniwh.rni.sub.org (Martin Sckopke)
Newsgroups: comp.unix.programmer
Subject: PL/I to C
Date: 8 Sep 92 09:53:45 GMT
Organization: Not organized in any way

Hi all,

does anybody know if there exists a PL/I to C translator for Unix ?
Or could anybody tell me for which Unix Versions there is an PL/I compiler
available ? I'd be especially interested in a compiler for HP/UX, Sinix
and the different PC Unix versions.

-- 
+------------------------------------------------------------------------+
+ Martin Sckopke                Weinheim, Germany                        +
+ ecco@rniwh.rni.sub.org        This space is reserved 4 sth VERY witty  +
+------------------------------------------------------------------------+
Newsgroups: comp.unix.programmer
From: olsen_jo@cc.uvcc.edu
Subject: lanic ID from C?
Organization: Utah Valley Community College
Date: Fri, 11 Sep 1992 04:03:14 GMT

I've looked through all the documentation for my system (hp9000/700) and
can't find anything on obtaining the lanic ID of a system with C.  I've
located a couple of references, but no function calls.  Any ideas?

I want it so I can implement a licensing technique based on the network
card since it will be more secure than using the 4 byte network address.

John Olsen
olsen_jo@uvadm.uvcc.edu
From: sharman@Software.Mitel.COM (Richard Sharman)
Newsgroups: comp.unix.programmer
Subject: Re: Wanted: UNIX system/network programming book recommendation
Date: 8 Sep 92 02:37:44 GMT
Organization: Mitel. Kanata (Ontario). Canada.
In-reply-to: sp_pm@space.alcbel.be's message of 4 Sep 92 12:54:47 GMT

In article <9209041254.AA08146@space.alcbel.be> sp_pm@space.alcbel.be (Paul Moore) writes:
...

   I've heard that Stevens has another book available, just recently
   published:

       Advanced UNIX SYstem Programming

   or some such similar title. Has anyone seen this book, or offer any
   comments?


   Thanks in advance for any replies,

   - Paul

   -------------------------------------------------------------------------------
   email: sp_pm@space.alcbel.be       smail: Paul Moore
					     Alcatel Bell Telephone,
   phone: (+32) 3/829.5024                   Space Dept.,
					     Berkenrodelei 33,
					     2660 Hoboken,
					     Belgium.
    I've heard that Stevens has another book available, just recently
    published:

	Advanced UNIX SYstem Programming

    or some such similar title. Has anyone seen this book, or offer any
    comments?

Yes, it's excellent.  Addison-Wesley Publishing Company, ISBN
0-201-56317-7.  Easy to read, good explanations, lots of examples (and
the source is available via ftp (buy the book to get the location!)).  I
intended to skim through the first few chapters and start learning the
heavy stuff but it was so interesting I started from page 1.  (Good job
too, I learned a lot from stuff I thought I already knew!).
    I've heard that Stevens has another book available, just recently
    published:

	Advanced UNIX SYstem Programming

    or some such similar title. Has anyone seen this book, or offer any
    comments?

Yes, it's excellent.  Addison-Wesley Publishing Company, ISBN
0-201-56317-7.  Easy to read, good explanations, lots of examples (and
the source is available via ftp (buy the book to get the location!)).  I
intended to skim through the first few chapters and start learning the
heavy stuff but it was so interesting I started from page 1.  (Good job
too, I learned a lot from stuff I thought I already knew!).

Highly recommended.
Newsgroups: comp.unix.programmer
From: gmarzot@mitre.org (G. S. Marzot)
Subject: serial i/o questions
Organization: MITRE Corp.
Date: Tue, 15 Sep 1992 18:57:15 GMT

Can someone tell me where to look to learn about ifnet devices and the
iflayer, and Sun's device drivers?  I am setting up a link over Sun's HSI/S
high speed serial board. I am considering TCP/IP/PPP on top of the board
but I need to do some special coding since, in my case, the HSI/S recv data
may become corrupted and turn random. I have a feeling PPP is the best
place to code in tolerance for this condition until the channel can be
restored. Any info much appreciated.
-GSM
Xref: sparky comp.unix.programmer:4586 comp.unix.internals:1778
From: wayne@jahangir.UUCP (wayne)
Newsgroups: comp.unix.programmer,comp.unix.internals
Subject: Multicast?
Keywords: Multicast
Date: 9 Sep 92 14:02:23 GMT
Followup-To: poster
Organization: MDC, NYC


     I am interested in doing multicasting on an ethernet network
using Sun Sparcstations. Is what I want to do possible?

     If anyone could direct me to literature on the subject or better
yet provide me with example code I would be greatly appreciative.


     - Wayne  wayne@mktdata.com

Newsgroups: comp.unix.programmer
From: heiner@heinihh.hanse.de (Heiner Strauss)
Subject: Need FT-10 termcap
Organization: jonas
Date: Mon, 7 Sep 1992 19:09:34 GMT

Hello there !
I'm looking for a termcap - entry ( or terminfo ? ) for the
Eurobee FT-10 Terminal, that is vt100 compatible but doesn't
work with the vt100 entry. Can somebody give me a hint for a
fix ( I have no docs ) or a source for an entry ?
Thanks in advance !
--
Heiner Strauss		heiner@heinihh.hanse.de		Tel:. 040/352341
Xref: sparky comp.unix.programmer:4544 comp.unix.xenix.sco:2824
From: royc@tcsrtp.uucp (Roy Andrew Crabtree)
Newsgroups: comp.unix.programmer,comp.unix.xenix.sco
Subject: Re: Help with modem and socket programming?
Summary: DCD must be held (or DSR) high; cable chg
Date: 5 Sep 92 01:12:13 GMT
Organization: Triangle Computer Society

In article <1992Aug31.220524.20933@news.nd.edu> bselling@liszt.helios.nd.edu (brian selling) writes:
>I am writing a program that allows for a socket to pass thru to a serial line
> ...
>Now here's the problems:  
>(1) I can only access /dev/tty1a not /dev/tty1A ... isn't
>that reversed of what it should be?

	Make the port raise DCD (in the modem) or use DSR to DCD;
	or open/special the file ...

>(2) How can I set up non-buffered IO thru the socket?  Currently the only
>way I can communication thru the socket is using read() which waits for
>a carriage return.
>(3) Attempting to use the modem file descriptor in the same program with
>the socket file descriptor gives accept errors?
>
>If anyone has some experience with this sort of project, please send me some
>email.  Thanks in advance.
>
>Also I believe the version of SCO is 1.1.1

	GOod luck.

>--
>Teresa & Brian Selling
>South Bend, IN

royc
duke!wolves!tcsrtp!royc
Newsgroups: comp.unix.programmer
From: jhmoney@eos.ncsu.edu (JOHN HAYWOOD MONEYHAN)
Subject: lex and yacc
Originator: jhmoney@c00404-346dan.eos.ncsu.edu
Reply-To: jhmoney@eos.ncsu.edu (JOHN HAYWOOD MONEYHAN)
Organization: North Carolina State University, Project Eos
Date: Sat, 12 Sep 1992 17:49:46 GMT


My name is Teebu Philip.  I am a senior in Computer Engineering at NC State.
My partner and I are working on our senior design project.  We are working on
a constraint network.  We have been given a BNF grammar and it was our
understanding that we could send that grammar thru lexx and yacc.  But as of
yet, we are still not able to figure out the complexities of the pgms.

Could we ask a few questions:

1) how does one implement partial brackets in our text file which simulates
the grammar.

2) can we send our text file of this grammar into lex and yacc to make us a
parser that we need for our project.

please email us at tphili@eos.ncsu.edu
                   jhmoney@eos.ncsu.edu
From: barmar@think.com (Barry Margolin)
Newsgroups: comp.unix.programmer
Subject: Re: Sun's XDR routines won't work on Sun machines ...
Date: 9 Sep 1992 16:15:48 GMT
Organization: Thinking Machines Corporation, Cambridge MA, USA
NNTP-Posting-Host: telecaster.think.com

In article <WRU6L3V@mailgzrz.tu-berlin.de> mauriti@cs.tu-berlin.de (Frank Hartlep) writes:
>        BufferSize += 50000;
>        Buffer = malloc (BufferSize);
>        Offset = strlen (ARCHIVED) + strlen (Description) + 1 + 4;
>        sprintf (Buffer, ARCHIVED "%s", Description);
>        xdrmem_create (&Stream, Buffer + Offset, BufferSize - Offset, XDR_ENCODE);

Someone just pointed out in comp.sys.sun.<something> that Sun's
implementation of the xdrmem_* functions require the buffer to be
word-aligned, as they make use of the "coincidence" that the XDR
representation of many data types matches the 68000/SPARC representation.
This restriction isn't documented.
-- 
Barry Margolin
System Manager, Thinking Machines Corp.

barmar@think.com          {uunet,harvard}!think!barmar
From: luochen@bow.Princeton.EDU (Luoqi Chen)
Newsgroups: comp.unix.programmer
Subject: Re: Must Unix domain sockets have a pathname?
Date: 15 Sep 92 23:16:51 GMT
Organization: Princeton University

From article <1992Sep15.060317.3750@news.uiowa.edu>, by dsiebert@icaen.uiowa.edu (Doug Siebert):
> Does a Unix domain socket (datagram, where sockets would be sending datagrams
> of from 5 - 500 bytes each to each other between processes) have to be bound
> to a name in the Unix filesystem?  From the man pages I'd have to say "yes",
> but I distinctly remember a few times seeing something that made me think that
> unnamed sockets could exist.  I know they can for sending to a named socket,
> but I'd have to name the other end...
> 
> Its a really trivial point, I know, but it has me curious.
> 
socketpair() makes a pair of unamed sockets, currently it is only implemented
for unix domain sockets.

-lq
From: mas4@ns1.cc.lehigh.edu (MICHAEL ANTHONY STRAUSS)
Newsgroups: comp.unix.programmer
Subject: HELP!!! How do I get rid of .tar
Date: 12 Sep 92 17:41:06 GMT
Organization: Lehigh University

I cant extarct the files out of a filoe called xtank1.3e.tar

Can anyone out there help me.

        -Strauss
         -mas4@Lehigh.edu
Newsgroups: comp.unix.programmer
From: mauriti@cs.tu-berlin.de (Frank Hartlep)
Subject: Sun's XDR routines won't work on Sun machines ...
Organization: Technical University of Berlin, Germany
Date: Wed, 9 Sep 1992 13:43:13 GMT


... although they do on a NeXT.
Perhaps somebody can see an error in this code.

                .
                .
                .

        BufferSize += 50000;
        Buffer = malloc (BufferSize);
        Offset = strlen (ARCHIVED) + strlen (Description) + 1 + 4;
        sprintf (Buffer, ARCHIVED "%s", Description);
        xdrmem_create (&Stream, Buffer + Offset, BufferSize - Offset, XDR_ENCODE);
                .
                . 
                .
        (in another function)
        if (Stream->x_op == XDR_ENCODE) {
                if (*Pointer != NULL) {
                        if (! xdr_bool (Stream, &NonNil))   <=== Bus error
                                return -1;
                        Next = 0;
                        if (DescriptionLoop (
                                Stream, Description, Descriptor, Pointer, &Next)
                            == -1)
                                return -1;
                }
                .
                .
                .

Some more info:
1.      The xdr_bool does the first write to the XDR stream, so it's very
        probable that something's wrong with the stream.
2.      The malloc for Buffer was ok, there should be enough memory for
        the stream.
3.      The Stream and NonNil variables seem to be ok, too.

I'm totally clueless. The routines have been heavily used on a NeXT without
any problem, but on a Sun4 (and IPX) they never make it beyond that point.

Any ideas are greatly apreciated.


Frank
Newsgroups: comp.unix.programmer