OpenOCD
|
Transport abstraction layer (TCP/IP). More...
Go to the source code of this file.
Transport abstraction layer (TCP/IP).
Definition in file transport_tcp.c.
|
static |
Definition at line 104 of file transport_tcp.c.
References jaylink_device::ctx, jaylink_device_handle::dev, JAYLINK_ERR_IO, JAYLINK_OK, length, log_dbgio(), log_err(), jaylink_device_handle::sock, and socket_recv().
Referenced by handle_server_hello(), and transport_tcp_read().
|
static |
Definition at line 424 of file transport_tcp.c.
References jaylink_device::ctx, jaylink_device_handle::dev, JAYLINK_ERR_IO, JAYLINK_OK, length, log_dbgio(), log_err(), jaylink_device_handle::sock, and socket_send().
Referenced by transport_tcp_write().
|
static |
Definition at line 449 of file transport_tcp.c.
References jaylink_device_handle::buffer, buffer, BUFFER_SIZE, jaylink_device_handle::buffer_size, jaylink_device::ctx, jaylink_device_handle::dev, log_dbg(), log_err(), and size.
Referenced by transport_tcp_write().
|
static |
Definition at line 99 of file transport_tcp.c.
References jaylink_device_handle::buffer.
Referenced by transport_tcp_close(), and transport_tcp_open().
|
static |
Definition at line 133 of file transport_tcp.c.
References _recv(), buffer_get_u16(), jaylink_device::ctx, jaylink_device_handle::dev, JAYLINK_ERR, JAYLINK_ERR_PROTO, JAYLINK_OK, length, log_dbg(), log_err(), and name.
Referenced by transport_tcp_open().
|
static |
Definition at line 75 of file transport_tcp.c.
References jaylink_device_handle::buffer, BUFFER_SIZE, jaylink_device_handle::buffer_size, jaylink_device_handle::bytes_available, jaylink_device::ctx, jaylink_device_handle::dev, JAYLINK_ERR_MALLOC, JAYLINK_OK, log_err(), jaylink_device_handle::read_length, jaylink_device_handle::read_pos, jaylink_device_handle::write_length, and jaylink_device_handle::write_pos.
Referenced by transport_tcp_open().
|
static |
Definition at line 180 of file transport_tcp.c.
References jaylink_device::ctx, jaylink_device_handle::dev, DWORD, JAYLINK_ERR, JAYLINK_OK, log_err(), jaylink_device_handle::sock, socket_set_option(), timeval::tv_sec, and timeval::tv_usec.
Referenced by transport_tcp_open().
JAYLINK_PRIV int transport_tcp_close | ( | struct jaylink_device_handle * | devh | ) |
Definition at line 307 of file transport_tcp.c.
References cleanup_handle(), jaylink_device::ctx, jaylink_device_handle::dev, jaylink_device::ipv4_address, JAYLINK_OK, and log_dbg().
Referenced by transport_close().
JAYLINK_PRIV int transport_tcp_open | ( | struct jaylink_device_handle * | devh | ) |
Definition at line 227 of file transport_tcp.c.
References cleanup_handle(), jaylink_device::ctx, jaylink_device_handle::dev, handle_server_hello(), info, initialize_handle(), jaylink_device::ipv4_address, JAYLINK_ERR, JAYLINK_OK, log_dbg(), log_err(), NULL, set_socket_timeouts(), jaylink_device_handle::sock, and socket_close().
Referenced by transport_open().
JAYLINK_PRIV int transport_tcp_read | ( | struct jaylink_device_handle * | devh, |
uint8_t * | buffer, | ||
size_t | length | ||
) |
Definition at line 551 of file transport_tcp.c.
References _recv(), jaylink_device_handle::buffer, jaylink_device_handle::bytes_available, jaylink_device::ctx, jaylink_device_handle::dev, JAYLINK_ERR_ARG, JAYLINK_OK, length, log_dbgio(), log_err(), jaylink_device_handle::read_length, and jaylink_device_handle::read_pos.
Referenced by transport_read().
JAYLINK_PRIV int transport_tcp_start_read | ( | struct jaylink_device_handle * | devh, |
size_t | length | ||
) |
Definition at line 354 of file transport_tcp.c.
References jaylink_device_handle::bytes_available, jaylink_device::ctx, jaylink_device_handle::dev, JAYLINK_ERR_ARG, JAYLINK_OK, length, log_dbg(), log_dbgio(), log_warn(), and jaylink_device_handle::read_length.
Referenced by transport_start_read().
JAYLINK_PRIV int transport_tcp_start_write | ( | struct jaylink_device_handle * | devh, |
size_t | length, | ||
bool | has_command | ||
) |
Definition at line 323 of file transport_tcp.c.
References jaylink_device_handle::buffer, jaylink_device::ctx, jaylink_device_handle::dev, JAYLINK_ERR_ARG, JAYLINK_OK, length, log_dbgio(), log_warn(), jaylink_device_handle::write_length, and jaylink_device_handle::write_pos.
Referenced by transport_start_write().
JAYLINK_PRIV int transport_tcp_start_write_read | ( | struct jaylink_device_handle * | devh, |
size_t | write_length, | ||
size_t | read_length, | ||
bool | has_command | ||
) |
Definition at line 380 of file transport_tcp.c.
References jaylink_device_handle::buffer, jaylink_device_handle::bytes_available, jaylink_device::ctx, jaylink_device_handle::dev, JAYLINK_ERR_ARG, JAYLINK_OK, log_dbgio(), log_warn(), jaylink_device_handle::read_length, jaylink_device_handle::read_pos, jaylink_device_handle::write_length, and jaylink_device_handle::write_pos.
Referenced by transport_start_write_read().
JAYLINK_PRIV int transport_tcp_write | ( | struct jaylink_device_handle * | devh, |
const uint8_t * | buffer, | ||
size_t | length | ||
) |
Definition at line 480 of file transport_tcp.c.
References _send(), adjust_buffer(), jaylink_device_handle::buffer, jaylink_device_handle::buffer_size, jaylink_device::ctx, jaylink_device_handle::dev, JAYLINK_ERR_ARG, JAYLINK_ERR_MALLOC, JAYLINK_OK, length, log_dbgio(), log_err(), MIN, jaylink_device_handle::write_length, and jaylink_device_handle::write_pos.
Referenced by transport_write().