util.h File Reference

sock utility function definitions More...

Detailed Description

sock utility function definitions

Author
Kaspar Schleiser kaspa.nosp@m.r@sc.nosp@m.hleis.nosp@m.er.d.nosp@m.e
Hauke Petersen hauke.nosp@m..pet.nosp@m.ersen.nosp@m.@fu-.nosp@m.berli.nosp@m.n.de

Definition in file util.h.

#include <stdbool.h>
#include <stdint.h>
#include "net/sock/udp.h"
+ Include dependency graph for util.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SOCK_SCHEME_MAXLEN   (16U)
 maximum length of the scheme part for sock_urlsplit. More...
 
#define SOCK_HOSTPORT_MAXLEN   (64U)
 maximum length of host:port part for sock_urlsplit()
 
#define SOCK_URLPATH_MAXLEN   (64U)
 maximum length path for sock_urlsplit()
 

Functions

int sock_udp_ep_fmt (const sock_udp_ep_t *endpoint, char *addr_str, uint16_t *port)
 Format UDP endpoint to string and port. More...
 
int sock_urlsplit (const char *url, char *hostport, char *urlpath)
 Split url to host:port and url path. More...
 
int sock_udp_str2ep (sock_udp_ep_t *ep_out, const char *str)
 Convert string to UDP endpoint. More...
 
bool sock_udp_ep_equal (const sock_udp_ep_t *a, const sock_udp_ep_t *b)
 Compare the two given UDP endpoints. More...