30#include "net/sock/config.h" 
   32#if MODULE_GNRC_SOCK_UDP || MODULE_LWIP_SOCK_UDP || DOXYGEN 
   34#  define SOCK_HAS_UDP  1    
   36#if MODULE_GNRC_SOCK_TCP || MODULE_LWIP_SOCK_TCP || DOXYGEN 
   38#  define SOCK_HAS_TCP  1    
   40#ifdef MODULE_SOCK_DTLS 
   45#if MODULE_GNRC_SOCK_UDP || MODULE_LWIP_SOCK_UDP ||MODULE_GNRC_SOCK_TCP || MODULE_LWIP_SOCK_TCP || DOXYGEN 
   46#  define HAVE_SOCK_TL_EP   1  
   96int sock_tl_ep_fmt(
const struct _sock_tl_ep *endpoint,
 
   97                   char *addr_str, uint16_t *port);
 
   99#if IS_ACTIVE(SOCK_HAS_TCP) || DOXYGEN 
  110static inline int sock_tcp_ep_fmt(
const sock_tcp_ep_t *endpoint,
 
  111                                  char *addr_str, uint16_t *port)
 
  113    return sock_tl_ep_fmt(endpoint, addr_str, port);
 
  117#if IS_ACTIVE(SOCK_HAS_UDP) || DOXYGEN 
  128static inline int sock_udp_ep_fmt(
const sock_udp_ep_t *endpoint,
 
  129                                  char *addr_str, uint16_t *port)
 
  131    return sock_tl_ep_fmt(endpoint, addr_str, port);
 
  147int sock_tl_str2ep(
struct _sock_tl_ep *ep_out, 
const char *str);
 
  163int sock_tl_name2ep(
struct _sock_tl_ep *ep_out, 
const char *str);
 
  165#if IS_ACTIVE(SOCK_HAS_TCP) || DOXYGEN 
  178static inline int sock_tcp_str2ep(
sock_tcp_ep_t *ep_out, 
const char *str)
 
  180    return sock_tl_str2ep(ep_out, str);
 
  197static inline int sock_tcp_name2ep(
sock_tcp_ep_t *ep_out, 
const char *str)
 
  199    return sock_tl_name2ep(ep_out, str);
 
  203#if IS_ACTIVE(SOCK_HAS_UDP) || DOXYGEN 
  216static inline int sock_udp_str2ep(
sock_udp_ep_t *ep_out, 
const char *str)
 
  218    return sock_tl_str2ep(ep_out, str);
 
  235static inline int sock_udp_name2ep(
sock_udp_ep_t *ep_out, 
const char *str)
 
  237    return sock_tl_name2ep(ep_out, str);
 
  257#if IS_ACTIVE(SOCK_HAS_TCP) || DOXYGEN 
  274    return sock_tl_ep_equal(a, b);
 
  278#if IS_ACTIVE(SOCK_HAS_UDP) || DOXYGEN 
  295    return sock_tl_ep_equal(a, b);
 
  300#if defined(MODULE_SOCK_DTLS) || DOXYGEN 
  320                                void *work_buf, 
size_t work_buf_len);
 
(D)TLS credentials management module definitions
 
uint16_t credman_tag_t
Tag of the credential.
 
struct sock_udp sock_udp_t
forward declare for async
 
struct sock_dtls sock_dtls_t
forward declare for async
 
struct sock_dtls_session sock_dtls_session_t
Information about a created session.
 
struct _sock_tl_ep sock_tcp_ep_t
An end point for a TCP sock object.
 
struct _sock_tl_ep sock_udp_ep_t
An end point for a UDP sock object.
 
int sock_dtls_establish_session(sock_udp_t *sock_udp, sock_dtls_t *sock_dtls, sock_dtls_session_t *session, credman_tag_t tag, sock_udp_ep_t *local, const sock_udp_ep_t *remote, void *work_buf, size_t work_buf_len)
Helper function to establish a DTLS connection.
 
int sock_urlsplit(const char *url, char *hostport, char *urlpath)
Split url to host:port and url path.
 
const char * sock_urlpath(const char *url)
Returns a pointer to the path component in url.
 
Common IP-based transport layer end point.
 
Information about DTLS sock.