OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [doc/] [html/] [ref/] [net-common-tcpip-manpages-bind.html] - Blame information for rev 664

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 28 unneback
<!-- Copyright (C) 2003 Red Hat, Inc.                                -->
2
<!-- This material may be distributed only subject to the terms      -->
3
<!-- and conditions set forth in the Open Publication License, v1.0  -->
4
<!-- or later (the latest version is presently available at          -->
5
<!-- http://www.opencontent.org/openpub/).                           -->
6
<!-- Distribution of the work or derivative of the work in any       -->
7
<!-- standard (paper) book form is prohibited unless prior           -->
8
<!-- permission is obtained from the copyright holder.               -->
9
<HTML
10
><HEAD
11
><TITLE
12
>bind</TITLE
13
><meta name="MSSmartTagsPreventParsing" content="TRUE">
14
<META
15
NAME="GENERATOR"
16
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17
"><LINK
18
REL="HOME"
19
TITLE="eCos Reference Manual"
20
HREF="ecos-ref.html"><LINK
21
REL="UP"
22
TITLE="TCP/IP Library Reference"
23
HREF="tcpip-library-reference.html"><LINK
24
REL="PREVIOUS"
25
TITLE="accept"
26
HREF="net-common-tcpip-manpages-accept.html"><LINK
27
REL="NEXT"
28
TITLE="connect"
29
HREF="net-common-tcpip-manpages-connect.html"></HEAD
30
><BODY
31
CLASS="SECT1"
32
BGCOLOR="#FFFFFF"
33
TEXT="#000000"
34
LINK="#0000FF"
35
VLINK="#840084"
36
ALINK="#0000FF"
37
><DIV
38
CLASS="NAVHEADER"
39
><TABLE
40
SUMMARY="Header navigation table"
41
WIDTH="100%"
42
BORDER="0"
43
CELLPADDING="0"
44
CELLSPACING="0"
45
><TR
46
><TH
47
COLSPAN="3"
48
ALIGN="center"
49
>eCos Reference Manual</TH
50
></TR
51
><TR
52
><TD
53
WIDTH="10%"
54
ALIGN="left"
55
VALIGN="bottom"
56
><A
57
HREF="net-common-tcpip-manpages-accept.html"
58
ACCESSKEY="P"
59
>Prev</A
60
></TD
61
><TD
62
WIDTH="80%"
63
ALIGN="center"
64
VALIGN="bottom"
65
>Chapter 38. TCP/IP Library Reference</TD
66
><TD
67
WIDTH="10%"
68
ALIGN="right"
69
VALIGN="bottom"
70
><A
71
HREF="net-common-tcpip-manpages-connect.html"
72
ACCESSKEY="N"
73
>Next</A
74
></TD
75
></TR
76
></TABLE
77
><HR
78
ALIGN="LEFT"
79
WIDTH="100%"></DIV
80
><DIV
81
CLASS="SECT1"
82
><H1
83
CLASS="SECT1"
84
><A
85
NAME="NET-COMMON-TCPIP-MANPAGES-BIND">bind</H1
86
><TABLE
87
BORDER="5"
88
BGCOLOR="#E0E0F0"
89
WIDTH="70%"
90
><TR
91
><TD
92
><PRE
93
CLASS="SCREEN"
94
>BIND(2)                       System Calls Manual                      BIND(2)
95
 
96
NAME
97
     bind - bind a name to a socket
98
 
99
SYNOPSIS
100
     #include &lt;sys/types.h&#62;
101
     #include &lt;sys/socket.h&#62;
102
 
103
     int
104
     bind(int s, const struct sockaddr *name, socklen_t namelen);
105
 
106
DESCRIPTION
107
     bind() assigns a name to an unnamed socket.  When a socket is created
108
     with socket(2) it exists in a name space (address family) but has no name
109
     assigned.  bind() requests that name be assigned to the socket.
110
 
111
NOTES
112
     Binding a name in the UNIX domain creates a socket in the file system
113
     that must be deleted by the caller when it is no longer needed (using
114
     unlink(2)).
115
 
116
     The rules used in name binding vary between communication domains.  Con-
117
     sult the manual entries in section 4 for detailed information.
118
 
119
RETURN VALUES
120
     If the bind is successful, a 0 value is returned.  A return value of -1
121
     indicates an error, which is further specified in the global errno.
122
 
123
ERRORS
124
     The bind() call will fail if:
125
 
126
     [EBADF]            S is not a valid descriptor.
127
 
128
     [ENOTSOCK]         S is not a socket.
129
 
130
     [EADDRNOTAVAIL]    The specified address is not available from the local
131
                        machine.
132
 
133
     [EADDRINUSE]       The specified address is already in use.
134
 
135
     [EINVAL]           The socket is already bound to an address.
136
 
137
     [EINVAL]           The family of the socket and that requested in
138
                        name-&#62;sa_family are not equivalent.
139
 
140
     [EACCES]           The requested address is protected, and the current
141
                        user has inadequate permission to access it.
142
 
143
     [EFAULT]           The name parameter is not in a valid part of the user
144
                        address space.
145
 
146
     The following errors are specific to binding names in the UNIX domain.
147
 
148
     [ENOTDIR]          A component of the path prefix is not a directory.
149
 
150
     [ENAMETOOLONG]     A component of a pathname exceeded {NAME_MAX} charac-
151
                        ters, or an entire path name exceeded {PATH_MAX} char-
152
                        acters.
153
 
154
     [ENOENT]           A prefix component of the path name does not exist.
155
 
156
     [ELOOP]            Too many symbolic links were encountered in translat-
157
                        ing the pathname.
158
 
159
     [EIO]              An I/O error occurred while making the directory entry
160
                        or allocating the inode.
161
 
162
     [EROFS]            The name would reside on a read-only file system.
163
 
164
     [EISDIR]           An empty pathname was specified.
165
 
166
SEE ALSO
167
     connect(2), getsockname(2), listen(2), socket(2)
168
 
169
HISTORY
170
     The bind() function call appeared in 4.2BSD.
171
 
172
BSD                            February 15, 1999                           BSD
173
    </PRE
174
></TD
175
></TR
176
></TABLE
177
></DIV
178
><DIV
179
CLASS="NAVFOOTER"
180
><HR
181
ALIGN="LEFT"
182
WIDTH="100%"><TABLE
183
SUMMARY="Footer navigation table"
184
WIDTH="100%"
185
BORDER="0"
186
CELLPADDING="0"
187
CELLSPACING="0"
188
><TR
189
><TD
190
WIDTH="33%"
191
ALIGN="left"
192
VALIGN="top"
193
><A
194
HREF="net-common-tcpip-manpages-accept.html"
195
ACCESSKEY="P"
196
>Prev</A
197
></TD
198
><TD
199
WIDTH="34%"
200
ALIGN="center"
201
VALIGN="top"
202
><A
203
HREF="ecos-ref.html"
204
ACCESSKEY="H"
205
>Home</A
206
></TD
207
><TD
208
WIDTH="33%"
209
ALIGN="right"
210
VALIGN="top"
211
><A
212
HREF="net-common-tcpip-manpages-connect.html"
213
ACCESSKEY="N"
214
>Next</A
215
></TD
216
></TR
217
><TR
218
><TD
219
WIDTH="33%"
220
ALIGN="left"
221
VALIGN="top"
222
>accept</TD
223
><TD
224
WIDTH="34%"
225
ALIGN="center"
226
VALIGN="top"
227
><A
228
HREF="tcpip-library-reference.html"
229
ACCESSKEY="U"
230
>Up</A
231
></TD
232
><TD
233
WIDTH="33%"
234
ALIGN="right"
235
VALIGN="top"
236
>connect</TD
237
></TR
238
></TABLE
239
></DIV
240
></BODY
241
></HTML
242
>

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.