home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.questions
- Path: sparky!uunet!usc!wupost!zaphod.mps.ohio-state.edu!news.acns.nwu.edu!casbah.acns.nwu.edu!cjw
- From: cjw@casbah.acns.nwu.edu (Christopher J. Wargaski)
- Subject: Re: How do I find out the domain_name of a machine ??
- Message-ID: <1992Sep12.192012.25100@news.acns.nwu.edu>
- Sender: usenet@news.acns.nwu.edu (Usenet on news.acns)
- Reply-To: cjw@casbah.acns.nwu.edu
- Organization: The Internet
- References: <1992Sep12.065426.21569@umr.edu>
- Date: Sat, 12 Sep 1992 19:20:12 GMT
- Lines: 35
-
- In article <1992Sep12.065426.21569@umr.edu>, mgj@franklin.ee.umr.edu (Mahesh Govind Joshi) writes:
-
- |> I am a novice at writing network applications. This is a
- |> beginners question.
-
- Beginners are welcome.
-
- |> How do i find out the domain_name of a machine within a 'C'
- |> program.
-
- Easy, use the ``gethostname'' call. The man pages explain it
- wonderfully.
-
-
- |> I tried using gethostbyname(hostname) and bcopied h_addr into a
- |> character array. But I just get garbage when i try to print the
- |> array.
-
- Close, you had the right idea!
-
- |> Please Help !!!!
- |> Thanks in advance ...
-
- My pleasure.
-
-
-
- |> Mahesh Joshi
-
-
- Christopher Wargaski <-or-> Aspheric Artwork Sigh
- c-wargaski@nwu.edu; ACNS, DSS, RC
- "Spoon-feeding in the lng run teaches us nothing more but the shape of
- the spoon" --E. M. Forester
-
-