Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!princeton!caip!seismo!mcvax!ukc!dcl-cs!david From: david@comp.lancs.ac.uk (David Coffield) Newsgroups: net.unix-wizards Subject: Mildly exotic socket related system call problem - anyone help? Message-ID: <189@comp.lancs.ac.uk> Date: Sun, 25-May-86 11:49:52 EDT Article-I.D.: comp.189 Posted: Sun May 25 11:49:52 1986 Date-Received: Tue, 27-May-86 06:43:23 EDT Reply-To: david@comp.lancs.ac.uk (David Coffield) Organization: Department of Computing at Lancaster University, UK. Lines: 34 I can never understand people that post incomplete firs (Bit of humour there). The problem is this: in the midst of using sockets I need to get a machine address from the user e.g. "150.0.0.11" (in that format, as a string) and compare the network number of that address with the network number of the address of the machine on which the program is executing. Should be simple ... Now about a year ago I discovered that "inet_addr" caused core dumps every time you called it - so I abandoned it's use and got round the problem. For what I want to do now I should use its stablemate (RED alert) "inet_network" but heaven knows what that one's returning. ("inet_ntof" returns the wrong answer but at least it does it consistently). So, questions as follows: 1. Can anyone suggest a way round this problem? 2. Does 4.3 have fixed "inet*" routines?? 3. If so can anyone mail me a copy of working ones??? 4. Was 3. an illegal question???? The aim of the exercise is merely to validate user input - if I can't get round it I'll just have to accept possibly ropey input. Any help much appreciated. David -- uucp: ...!mcvax!ukc!dcl-cs!david post: Department of Computing arpa: david%lancs.comp@ucl.cs University of Lancaster, UK janet: david@uk.ac.lancs.comp phone: +44 524 65201 x 4599