Portable interface#

Functions#

void
sl_ftp_delay_ms(const uint32_t delay_ms)

Delay ms.

void
sl_ftp_dump_buff(const uint8_t *const data_ptr, const uint16_t data_size)

Dump buffer.

const char *

FTP get global IP address.

void

FTP Init.

bool

FTP network is connected.

int32_t
sl_ftp_socket_close(int32_t sockid)

FTP Close.

__STATIC_INLINE void
sl_tftp_delay_ms(const uint32_t delay_ms)

TFTP Delay ms.

__STATIC_INLINE void
sl_tftp_dump_buff(const uint8_t *const data_ptr, const uint16_t data_size)

Define SL_TFTP_DEBUG.

__STATIC_INLINE const char *

TFTP get global IP address.

__STATIC_INLINE bool

TFTP network is connected.

__STATIC_INLINE int32_t
sl_tftp_socket_close(int32_t sockid)

TFTP Close.

void

Free address.

void *
sl_tftp_udp_get_addr(const char *host, uint16_t port)

Get UDP address structure.

int32_t
sl_tftp_udp_recvfrom(int32_t sockid, void *buff, uint32_t len, void *src_addr)

TFTP Receive messages on a UDP socket.

int32_t
sl_tftp_udp_sendto(int32_t sockid, const void *buff, uint32_t len, const void *dest_addr)

TFTP Send a message on a UDP socket.

int32_t

TFTP udp socket create.

Macros#

#define
sl_ftp_debug (format, ...)

FTP debug macro function.

#define
SL_FTP_ERROR SL_FTP_INVALID_SOCKID

FTP error value.

#define

FTP invalid socket ID.

#define

FTP Localhost string.

#define
SL_TFTP_ERROR SL_FTP_ERROR

TFTP error value (alias)

#define
SL_TFTP_INVALID_SOCKID SL_FTP_INVALID_SOCKID

TFTP invalid socket ID (alias)

#define
SL_TFTP_LOCAL_HOST_STR SL_FTP_LOCAL_HOST_STR

TFTP Localhost string (alias)

Function Documentation#

sl_ftp_delay_ms#

void sl_ftp_delay_ms (const uint32_t delay_ms)

Delay ms.

Parameters
N/Adelay_ms

Milliseconds

Portable function


Definition at line 120 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

sl_ftp_dump_buff#

void sl_ftp_dump_buff (const uint8_t *const data_ptr, const uint16_t data_size)

Dump buffer.

Parameters
[in]data_ptr

Data ptr

[in]data_size

Data size

Util function to dump buffer in hex format


Definition at line 113 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

sl_ftp_get_global_addr#

const char * sl_ftp_get_global_addr (void )

FTP get global IP address.

Parameters
N/A

Portable function Returns

  • Global address string representation


Definition at line 134 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

sl_ftp_init#

void sl_ftp_init (void )

FTP Init.

Parameters
N/A

Initialize FTP service


Definition at line 105 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

sl_ftp_is_network_connected#

bool sl_ftp_is_network_connected (void )

FTP network is connected.

Parameters
N/A

Portable function Returns

  • true if network is connected, otherwise false


Definition at line 127 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

sl_ftp_socket_close#

int32_t sl_ftp_socket_close (int32_t sockid)

FTP Close.

Parameters
N/Asockid

Socket ID

Portable function Returns

  • int32_t Closed socket ID on success, -1 on error


Definition at line 142 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

sl_tftp_delay_ms#

__STATIC_INLINE void sl_tftp_delay_ms (const uint32_t delay_ms)

TFTP Delay ms.

Parameters
N/Adelay_ms

Milliseconds

Alias function


Definition at line 211 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

sl_tftp_dump_buff#

__STATIC_INLINE void sl_tftp_dump_buff (const uint8_t *const data_ptr, const uint16_t data_size)

Define SL_TFTP_DEBUG.

Parameters
[in]data_ptr

Data ptr

[in]data_size

Data size

TFTP Dump buffer

Alias function


Definition at line 201 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

sl_tftp_get_global_addr#

__STATIC_INLINE const char * sl_tftp_get_global_addr (void )

TFTP get global IP address.

Parameters
N/A

Portable function Returns

  • Global address string representation


Definition at line 231 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

sl_tftp_is_network_connected#

__STATIC_INLINE bool sl_tftp_is_network_connected (void )

TFTP network is connected.

Parameters
N/A

Alias function Returns

  • true if network is connected, otherwise false


Definition at line 221 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

sl_tftp_socket_close#

__STATIC_INLINE int32_t sl_tftp_socket_close (int32_t sockid)

TFTP Close.

Parameters
N/Asockid

Socket ID

Alias function Returns

  • int32_t Closed socket ID on success, -1 on error


Definition at line 242 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

sl_tftp_udp_free_addr#

void sl_tftp_udp_free_addr (void * addr)

Free address.

Parameters
[in]addr

Address structure

Release the allocated address strcutre


Definition at line 291 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

sl_tftp_udp_get_addr#

void * sl_tftp_udp_get_addr (const char * host, uint16_t port)

Get UDP address structure.

Parameters
[in]host

Host string

[in]port

Port

Allocate address structue and set host address and port Returns

  • void * Address structure


Definition at line 283 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

sl_tftp_udp_recvfrom#

int32_t sl_tftp_udp_recvfrom (int32_t sockid, void * buff, uint32_t len, void * src_addr)

TFTP Receive messages on a UDP socket.

Parameters
[in]sockid

socket id

[out]buff

destination buffer ptr

[in]len

length of data to read

[out]src_addr

Source address

Receives data on a socket whether or not it is connection-oriented. Returns

  • return the number of bytes received, or -1 if an error occurred


Definition at line 274 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

sl_tftp_udp_sendto#

int32_t sl_tftp_udp_sendto (int32_t sockid, const void * buff, uint32_t len, const void * dest_addr)

TFTP Send a message on a UDP socket.

Parameters
[in]sockid

socket ID

[in]buff

buffer pointer to send

[in]len

length of data to send

[in]dest_addr

destination address ptr, the structure must be prepared for UDP sockets

Preferred in datagram mode (UDP). Returns

  • On success, these calls return the number of bytes sent. On error, -1 is returned


Definition at line 263 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

sl_tftp_udp_socket_create#

int32_t sl_tftp_udp_socket_create (void )

TFTP udp socket create.

Parameters
N/A

Portable function Returns

  • int32_t Socket ID


Definition at line 252 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

Macro Definition Documentation#

sl_ftp_debug#

#define sl_ftp_debug
Value:
(format, ...)

FTP debug macro function.


Definition at line 72 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

SL_FTP_ERROR#

#define SL_FTP_ERROR
Value:
SL_FTP_INVALID_SOCKID

FTP error value.


Definition at line 83 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

SL_FTP_INVALID_SOCKID#

#define SL_FTP_INVALID_SOCKID
Value:
(-1)

FTP invalid socket ID.


Definition at line 80 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

SL_FTP_LOCAL_HOST_STR#

#define SL_FTP_LOCAL_HOST_STR
Value:
"::"

FTP Localhost string.


Definition at line 77 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

SL_TFTP_ERROR#

#define SL_TFTP_ERROR
Value:
SL_FTP_ERROR

TFTP error value (alias)


Definition at line 94 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

SL_TFTP_INVALID_SOCKID#

#define SL_TFTP_INVALID_SOCKID
Value:
SL_FTP_INVALID_SOCKID

TFTP invalid socket ID (alias)


Definition at line 91 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h

SL_TFTP_LOCAL_HOST_STR#

#define SL_TFTP_LOCAL_HOST_STR
Value:
SL_FTP_LOCAL_HOST_STR

TFTP Localhost string (alias)


Definition at line 88 of file /mnt/raid/workspaces/ws.obQFDUprC/overlay/gsdk/app/wisun/component/ftp/sl_ftp.h