Functions | Variables
dn_socket.c File Reference
#include "stdint.h"
#include "dn_additional.h"
#include "dn_common.h"
#include "dn_device.h"
#include "dn_socket.h"
Include dependency graph for dn_socket.c:

Go to the source code of this file.

Functions

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

Variables

int socket_counter

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.


Variable Documentation

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 at line 44 of file dn_socket.c.



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