Go to the documentation of this file.
25 #ifndef NET_SOCK_UTIL_H
26 #define NET_SOCK_UTIL_H
49 char *addr_str, uint16_t *port);
62 char *addr_str, uint16_t *port)
78 char *addr_str, uint16_t *port)
103 int sock_urlsplit(
const char *url,
char *hostport,
char *urlpath);
217 #ifndef CONFIG_SOCK_SCHEME_MAXLEN
218 #define CONFIG_SOCK_SCHEME_MAXLEN (16U)
224 #ifndef CONFIG_SOCK_HOSTPORT_MAXLEN
225 #define CONFIG_SOCK_HOSTPORT_MAXLEN (64U)
231 #ifndef CONFIG_SOCK_URLPATH_MAXLEN
232 #define CONFIG_SOCK_URLPATH_MAXLEN (64U)
static int sock_tcp_ep_fmt(const sock_tcp_ep_t *endpoint, char *addr_str, uint16_t *port)
Format TCP endpoint to string and port.
static int sock_tcp_str2ep(sock_tcp_ep_t *ep_out, const char *str)
Convert string to TCP endpoint.
static bool sock_tcp_ep_equal(const sock_tcp_ep_t *a, const sock_tcp_ep_t *b)
Compare the two given TCP endpoints.
static int sock_udp_str2ep(sock_udp_ep_t *ep_out, const char *str)
Convert string to UDP endpoint.
int sock_tl_str2ep(struct _sock_tl_ep *ep_out, const char *str)
Convert string to common IP-based transport layer endpoint.
Common IP-based transport layer end point.
int sock_tl_ep_fmt(const struct _sock_tl_ep *endpoint, char *addr_str, uint16_t *port)
Format common IP-based transport layer endpoint to string and port.
bool sock_tl_ep_equal(const struct _sock_tl_ep *a, const struct _sock_tl_ep *b)
Compare the two given common IP-based transport layer endpoints.
int sock_urlsplit(const char *url, char *hostport, char *urlpath)
Split url to host:port and url path.
static bool sock_udp_ep_equal(const sock_udp_ep_t *a, const sock_udp_ep_t *b)
Compare the two given UDP endpoints.
static int sock_udp_ep_fmt(const sock_udp_ep_t *endpoint, char *addr_str, uint16_t *port)
Format UDP endpoint to string and port.