home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!darwin.sura.net!jvnc.net!rutgers!vpbuild!admin1!vpmeu015!jessea
- From: jessea@vpmeu015.me.vp.com (Jesse W. Asher)
- Newsgroups: comp.protocols.tcp-ip
- Subject: Checking for valid ip address (in ascii form).
- Message-ID: <1992Nov22.165049.9887@vpbuild.vp.com>
- Date: 22 Nov 92 16:50:49 GMT
- Sender: @vpbuild.vp.com
- Organization: Varco-Pruden Buildings
- Lines: 15
-
- Does anyone have any suggestions on how to check for a valid IP address
- that is in ascii from (not in network byte order)? What I'm doing is
- reading in a string that should be made up of a dot notation IP address
- and I want to validate it. Unfortunately, inet_addr takes a whole lot
- of numbers as valid - even if it isn't in dot notation. It will take
- "10000" as a valid ip address, for example. It may be, but it really
- isn't in my case because I want to enforce dot notation. Is there a
- function I'm not aware of that will do this level of checking? Will I
- just have to do it myself?
-
- --
- Jesse W. Asher (901)762-6000
- Varco-Pruden Buildings
- 6000 Poplar Ave., Suite 400, Memphis, TN 38119
- Internet: jessea@vpbuild.vp.com UUCP: vpbuild!jessea
-