Unix-system-calls-gethostid
[top]#
|http://www.google.com/[Google] | a|
Web | This Site |
選択した読書 Copyright©2014 by finddevguides |
[cols=",,,,,,,",] |
| | Home | | References | | Discussion Forums | | About TP
[width="100%",cols="100%",] |
a| == gethostid()-Unix、Linuxシステムコール
[[File:]] image :http://www.finddevguides.com/images/next.gif [next] image:http://www.finddevguides.com/add- this.gif [AddThisソーシャルブックマークボタン]
広告
NAME
gethostid、sethostid-現在のホストの一意の識別子を取得または設定します
概要
- #include <unistd.h> *
説明
現在のマシンの一意の32ビット識別子を取得または設定します。 32ビットの識別子は、存在するすべてのUNIXシステムの中で一意であることを意図しています。 これは通常、 gethostbyname (3)によって返されるローカルマシンのインターネットアドレスに似ているため、通常は設定する必要はありません。
hostid_引数は、ファイル/etc/hostid_に保存されます。
返り値
準拠
4.2BSD;これらの関数は4.4BSDで削除されました。 SVr4には gethostid ()が含まれますが、 sethostid ()は含まれません。 POSIX.1-2001は gethostid ()を指定しますが、 sethostid ()は指定しません。
ファイル
/etc/hostid
例
id = gethostid (); /*This is a no-op unless unsigned int is wider than 32 bits. */ id &= 0xffffffff; |
関連項目
[[File:]] image :http://www.finddevguides.com/images/next.gif [next] [[File:]]
広告
|
[cols="^",] |
|Advertisements