sys/sock/util: allow overriding of SOCK_*_MAXLEN

This commit is contained in:
Kaspar Schleiser 2019-05-21 12:06:49 +02:00
parent c439346f6d
commit 7dc1b4f45d

View File

@ -99,13 +99,30 @@ bool sock_udp_ep_equal(const sock_udp_ep_t *a, const sock_udp_ep_t *b);
* @name helper definitions * @name helper definitions
* @{ * @{
*/ */
#define SOCK_SCHEME_MAXLEN (16U) /**< maximum length of the scheme part
for sock_urlsplit. Ensures a hard /**
limit on the string iterator */ * @brief maximum length of the scheme part for sock_urlsplit.
#define SOCK_HOSTPORT_MAXLEN (64U) /**< maximum length of host:port part for *
sock_urlsplit() */ * Ensures a hard limit on the string iterator
#define SOCK_URLPATH_MAXLEN (64U) /**< maximum length path for * */
sock_urlsplit() */ #ifndef SOCK_SCHEME_MAXLEN
#define SOCK_SCHEME_MAXLEN (16U)
#endif
/**
* @brief maximum length of host:port part for sock_urlsplit()
*/
#ifndef SOCK_HOSTPORT_MAXLEN
#define SOCK_HOSTPORT_MAXLEN (64U)
#endif
/**
* @brief maximum length path for sock_urlsplit()
*/
#ifndef SOCK_URLPATH_MAXLEN
#define SOCK_URLPATH_MAXLEN (64U)
#endif
/** @} */ /** @} */
#ifdef __cplusplus #ifdef __cplusplus