Defines | Functions
dn_socket.h File Reference

Socket API file. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define _DN_EXP_SOCKET

Functions

_DN_EXP_SOCKET HRESULT socket_bind (const struct CONN_PARAM_ETH *param, int *sock)
 Binds the socket with param's source address and source port.
_DN_EXP_SOCKET HRESULT socket_close (int *sock)
 Closes the socket.
_DN_EXP_SOCKET HRESULT socket_open (int type, int *sock)
 Creates a socket.
_DN_EXP_SOCKET HRESULT socket_set_timeout (int sock, uint32_t timeout)
 Sets timeout value to the socket.

Detailed Description

Socket API file.

Defines socket APIs.

Version:
1.0
Date:
2014/11/06
Author:
DENSO WAVE

Software License Agreement (MIT License)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Definition in file dn_socket.h.


Define Documentation

#define _DN_EXP_SOCKET

Definition at line 37 of file dn_socket.h.


Function Documentation

HRESULT socket_bind ( const struct CONN_PARAM_ETH param,
int *  sock 
)

Binds the socket with param's source address and source port.

Parameters:
[in]paramThe pointer of Ethernet connection parameters.
[in,out]sockThe socket to be binded.

Definition at line 211 of file dn_socket.c.

HRESULT socket_close ( int *  sock)

Closes the socket.

Parameters:
[in,out]sockThe socket to be closed.
Note:
This function is not thread safe.
Must take mutex among socket_open, socket_close and tcp_accept.

Definition at line 176 of file dn_socket.c.

HRESULT socket_open ( int  type,
int *  sock 
)

Creates a socket.

Parameters:
[in]typeThe socket type. Allows SOCK_STREAM or SOCK_DGRAM.
[out]sockThe created socket.
Note:
This function is not thread safe.
Must take mutex among socket_open, socket_close and tcp_accept.

Definition at line 129 of file dn_socket.c.

HRESULT socket_set_timeout ( int  sock,
uint32_t  timeout 
)

Sets timeout value to the socket.

Parameters:
[in]sockThe socket to be set.
[in]timeoutTimeout value.

Definition at line 255 of file dn_socket.c.



bcap_core
Author(s): DENSO WAVE INCORPORATED
autogenerated on Thu Jun 6 2019 21:00:03