Q: gethostid() portability.

Q: gethostid() portability.

Post by xa.. » Wed, 13 Jul 1994 05:06:31



  This is probably easy:

   I have to get the "unique-id" or "machine-id", but want my code to
   be as portable as possible.
   I found gethostid() to work, under SunOs (and probably any BSD-like Unix ???)
   and uname() under HP/UX (and probably any SysV ???).

   Am I right, or there are more secrets(?!) behind the scenes???

   Thanks in advance.

 
 
 

Q: gethostid() portability.

Post by Paul Stephen Bori » Thu, 14 Jul 1994 00:46:15



>   I have to get the "unique-id" or "machine-id", but want my code to
>   be as portable as possible.
>   I found gethostid() to work, under SunOs (and probably any BSD-like Unix ???)
>   and uname() under HP/UX (and probably any SysV ???).

On my machine ( Tandem NonStopUX ) which is SysV R3 gethostid() returns my
Internet Address. The same works for Interactive i386 3.2.

-Paul
--
----------------------------------------------------------------------------




 
 
 

1. gethostid

Hi all,

I would like to use the function "gethostid" in my C program. This
works fine under SUNOS but under Solaris 2.4 I can't find this
function (library for it) anywhere.  Does anyone know where this
might be under Solaris, or know of a similar function that reads
the cpu's hostid.

Thank you,
Sincerely,
Nader

--
---------------------------------------------------------------------
|                                                                   |
| Nader T. Behzad                                                   |

| WWW: http://www.ee.ualberta.ca/~nbehzad                           |
|                                                                   |
|===================================================================|
|                                                                   |
| "Whatever you do will be insignificant, but it is very            |
|  important that you do it." --Mahatma Gandhi                      |
|                                                                   |
---------------------------------------------------------------------

2. Question about sendmail and domain names

3. need info on gethostid

4. Bizarre (?) routing problems?

5. gethostid() on Solaris

6. Can't recognize USB CD-RW anymore?

7. gethostid() call for HP720 with UX9.0

8. How to run batch files in Unix?

9. gethostid and sethostid

10. question about gethostid

11. Net/GCC/libc problems (no gethostid?)

12. gethostid on HP-UX 9

13. gethostid() defined in what standard?