🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: csu.cs
Article #186

Re: Decoding Internet Addresses

#186
From: Michael Dwyer
Date: Fri, 22 Oct 1999 00:00
15 lines
1191 bytes
Michael Dwyer <mdwyer@holly.colostate.edu> wrote:
: Does anyone know of a c-function that will automatically fill the
: required structures given any of these address forms:

: Someone /must/ have written this code already, though!

Uhhh... I found it!  Run inet_addr on the string, if it returns
a -1, then it wasn't a dotted-quad address.  Just like it says
in the sockets faq... :)

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Michael J. Dwyer                      I doubt, therefore I might be.
mdwyer@holly.ColoState.edu       http://WWW.CS.ColoState.EDU/~dwyer/
Computer Science Major                      Amateur Radio Tech N0ZAP
Technical Details
Message-ID: <7uqe8p$2d8q@yuma.ACNS.ColoState.EDU>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7uohr7$33ka@yuma.ACNS.ColoState.EDU>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 148df6,33710ed2486f013a
X-Google-Attributes: gid148df6,public
From: Michael Dwyer <mdwyer@holly.ColoState.EDU>
Subject: Re: Decoding Internet Addresses
Date: 1999/10/22
Message-ID: <7uqe8p$2d8q@yuma.ACNS.ColoState.EDU>
X-Deja-AN: 539377186
References: <7uohr7$33ka@yuma.ACNS.ColoState.EDU>
Organization: Colorado State University, Fort Collins, CO  80523
User-Agent: tin/pre-1.4-19990517 ("Psychonaut") (UNIX) (AIX/4-3)
Newsgroups: csu.cs