OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man3 / byteorder.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" References consulted:
24 .\"     Linux libc source code
25 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
26 .\"     386BSD man pages
27 .\" Modified Sat Jul 24 21:29:05 1993 by Rik Faith (faith@cs.unc.edu)
28 .\" Modified Thu Jul 26 14:06:20 2001 by Andries Brouwer (aeb@cwi.nl)
29 .\"
30 .\"*******************************************************************
31 .\"
32 .\" This file was generated with po4a. Translate the source file.
33 .\"
34 .\"*******************************************************************
35 .TH BYTEORDER 3 2009\-01\-15 GNU "Linux Programmer's Manual"
36 .SH 名前
37 htonl, htons, ntohl, ntohs \- ホストバイトオーダーとネットワークバイトオーダーの間で値を変換する
38 .SH 書式
39 .nf
40 \fB#include <arpa/inet.h>\fP
41 .sp
42 \fBuint32_t htonl(uint32_t \fP\fIhostlong\fP\fB);\fP
43 .sp
44 \fBuint16_t htons(uint16_t \fP\fIhostshort\fP\fB);\fP
45 .sp
46 \fBuint32_t ntohl(uint32_t \fP\fInetlong\fP\fB);\fP
47 .sp
48 \fBuint16_t ntohs(uint16_t \fP\fInetshort\fP\fB);\fP
49 .fi
50 .SH 説明
51 \fBhtonl\fP()  関数は unsigned integer \fIhostlong\fP を
52 ホストバイトオーダーからネットワークバイトオーダーに変換する。
53 .PP
54 \fBhtons\fP()  関数は unsigned short integer \fIhostshort\fP を
55 ホストバイトオーダーからネットワークバイトオーダーに変換する。
56 .PP
57 \fBntohl\fP()  関数は unsigned integer \fInetlong\fP を
58 ネットワークバイトオーダーからホストバイトオーダーに変換する。
59 .PP
60 \fBntohs\fP()  関数は unsigned short integer \fInetshort\fP を
61 ネットワークバイトオーダーからホストバイトオーダーに変換する。
62 .PP
63 i80x86 のホストバイトオーダーでは最下位バイトが若いアドレスに配置されるが、 インターネットで用いられるネットワークバイトオーダーでは最上位バイト
64 が先に配置される。
65 .SH 準拠
66 POSIX.1\-2001.
67
68 いくつかのシステムでは、 \fI<arpa/inet.h>\fP の代わりに \fI<netinet/in.h>\fP
69 をインクルードする必要がある。
70 .SH 関連項目
71 \fBendian\fP(3), \fBgethostbyname\fP(3), \fBgetservent\fP(3)