Rev 4747 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4747 | Rev 4756 | ||
---|---|---|---|
Line 192... | Line 192... | ||
192 | * @returns The active sockets. |
192 | * @returns The active sockets. |
193 | */ |
193 | */ |
194 | static sockets_ref socket_get_sockets( void ); |
194 | static sockets_ref socket_get_sockets( void ); |
195 | 195 | ||
196 | /** Default thread for new connections. |
196 | /** Default thread for new connections. |
197 | * @param iid The initial message identifier. Input parameter. |
197 | * @param[in] iid The initial message identifier. |
198 | * @param icall The initial message call structure. Input parameter. |
198 | * @param[in] icall The initial message call structure. |
199 | */ |
199 | */ |
200 | void socket_connection( ipc_callid_t iid, ipc_call_t * icall ); |
200 | void socket_connection( ipc_callid_t iid, ipc_call_t * icall ); |
201 | 201 | ||
202 | /** Sends message to the socket parent module with specified data. |
202 | /** Sends message to the socket parent module with specified data. |
203 | * @param socket_id Socket identifier. Input parameter. |
203 | * @param[in] socket_id Socket identifier. |
204 | * @param message The action message. Input parameter. |
204 | * @param[in] message The action message. |
205 | * @param arg2 The second message parameter. Input parameter. |
205 | * @param[in] arg2 The second message parameter. |
206 | * @param data The data to be sent. Input parameter. |
206 | * @param[in] data The data to be sent. |
207 | * @param datalength The data length. Input parameter. |
207 | * @param[in] datalength The data length. |
208 | * @returns EOK on success. |
208 | * @returns EOK on success. |
209 | * @returns ENOTSOCK if the socket is not found. |
209 | * @returns ENOTSOCK if the socket is not found. |
210 | * @returns EBADMEM if the data parameter is NULL. |
210 | * @returns EBADMEM if the data parameter is NULL. |
211 | * @returns NO_DATA if the datalength parameter is zero (0). |
211 | * @returns NO_DATA if the datalength parameter is zero (0). |
212 | * @returns Other error codes as defined for the spcific message. |
212 | * @returns Other error codes as defined for the spcific message. |
213 | */ |
213 | */ |
214 | int socket_send_data( int socket_id, ipcarg_t message, ipcarg_t arg2, const void * data, size_t datalength ); |
214 | int socket_send_data( int socket_id, ipcarg_t message, ipcarg_t arg2, const void * data, size_t datalength ); |
215 | 215 | ||
216 | /** Initializes a new socket specific data. |
216 | /** Initializes a new socket specific data. |
217 | * @param socket The socket to be initialized. Input/output parameter. |
217 | * @param[in,out] socket The socket to be initialized. |
218 | * @param socket_id The new socket identifier. Input parameter. |
218 | * @param[in] socket_id The new socket identifier. |
219 | * @param phone The parent module phone. Input parameter. |
219 | * @param[in] phone The parent module phone. |
220 | * @param service The parent module service. Input parameter. |
220 | * @param[in] service The parent module service. |
221 | */ |
221 | */ |
222 | void socket_initialize( socket_ref socket, int socket_id, int phone, services_t service ); |
222 | void socket_initialize( socket_ref socket, int socket_id, int phone, services_t service ); |
223 | 223 | ||
224 | /** Clears and destroys the socket. |
224 | /** Clears and destroys the socket. |
225 | * @param socket The socket to be destroyed. Input parameter. |
225 | * @param[in] socket The socket to be destroyed. |
226 | */ |
226 | */ |
227 | void socket_destroy( socket_ref socket ); |
227 | void socket_destroy( socket_ref socket ); |
228 | 228 | ||
229 | /** Receives data via the socket. |
229 | /** Receives data via the socket. |
230 | * @param message The action message. Input parameter. |
230 | * @param[in] message The action message. |
231 | * @param socket_id Socket identifier. Input parameter. |
231 | * @param[in] socket_id Socket identifier. |
232 | * @param data The data buffer to be filled. Output parameter. |
232 | * @param[out] data The data buffer to be filled. |
233 | * @param datalength The data length. Input parameter. |
233 | * @param[in] datalength The data length. |
234 | * @param flags Various receive flags. Input parameter. |
234 | * @param[in] flags Various receive flags. |
235 | * @param fromaddr The source address. May be NULL for connected sockets. Output parameter. |
235 | * @param[out] fromaddr The source address. May be NULL for connected sockets. |
236 | * @param addrlen The address length. The maximum address length is read. The actual address length is set. Used only if fromaddr is not NULL. Input/output parameter. |
236 | * @param[in,out] addrlen The address length. The maximum address length is read. The actual address length is set. Used only if fromaddr is not NULL. |
237 | * @returns EOK on success. |
237 | * @returns EOK on success. |
238 | * @returns ENOTSOCK if the socket is not found. |
238 | * @returns ENOTSOCK if the socket is not found. |
239 | * @returns EBADMEM if the data parameter is NULL. |
239 | * @returns EBADMEM if the data parameter is NULL. |
240 | * @returns NO_DATA if the datalength or addrlen parameter is zero (0). |
240 | * @returns NO_DATA if the datalength or addrlen parameter is zero (0). |
241 | * @returns Other error codes as defined for the spcific message. |
241 | * @returns Other error codes as defined for the spcific message. |
242 | */ |
242 | */ |
243 | int recvfrom_core( ipcarg_t message, int socket_id, void * data, size_t datalength, int flags, struct sockaddr * fromaddr, socklen_t * addrlen ); |
243 | int recvfrom_core( ipcarg_t message, int socket_id, void * data, size_t datalength, int flags, struct sockaddr * fromaddr, socklen_t * addrlen ); |
244 | 244 | ||
245 | /** Sends data via the socket to the remote address. |
245 | /** Sends data via the socket to the remote address. |
246 | * Binds the socket to a free port if not already connected/bound. |
246 | * Binds the socket to a free port if not already connected/bound. |
247 | * @param message The action message. Input parameter. |
247 | * @param[in] message The action message. |
248 | * @param socket_id Socket identifier. Input parameter. |
248 | * @param[in] socket_id Socket identifier. |
249 | * @param data The data to be sent. Input parameter. |
249 | * @param[in] data The data to be sent. |
250 | * @param datalength The data length. Input parameter. |
250 | * @param[in] datalength The data length. |
251 | * @param flags Various send flags. Input parameter. |
251 | * @param[in] flags Various send flags. |
252 | * @param toaddr The destination address. May be NULL for connected sockets. Input parameter. |
252 | * @param[in] toaddr The destination address. May be NULL for connected sockets. |
253 | * @param addrlen The address length. Used only if toaddr is not NULL. Input parameter. |
253 | * @param[in] addrlen The address length. Used only if toaddr is not NULL. |
254 | * @returns EOK on success. |
254 | * @returns EOK on success. |
255 | * @returns ENOTSOCK if the socket is not found. |
255 | * @returns ENOTSOCK if the socket is not found. |
256 | * @returns EBADMEM if the data or toaddr parameter is NULL. |
256 | * @returns EBADMEM if the data or toaddr parameter is NULL. |
257 | * @returns NO_DATA if the datalength or the addrlen parameter is zero (0). |
257 | * @returns NO_DATA if the datalength or the addrlen parameter is zero (0). |
258 | * @returns Other error codes as defined for the NET_SOCKET_SENDTO message. |
258 | * @returns Other error codes as defined for the NET_SOCKET_SENDTO message. |