[riot-notifications] [RIOT-OS/RIOT] sys/net/netif: add netif_parse_hostname() (#16634)

Martine Lenders notifications at github.com
Mon Jul 12 20:03:47 CEST 2021


@miri64 commented on this pull request.



> @@ -184,6 +187,19 @@ int netif_set_opt(netif_t *netif, netopt_t opt, uint16_t context,
  */
 int netif_register(netif_t *netif);
 
+/**
+ * @brief   Parse an IP address / hostname string.
+ *          If the @ref net_sock_dns module is used, this will
+ *          attempt to resolve hostnames via DNS.
+ *
+ * @param[in]   hostname    IP address string or hostname
+ * @param[out]  addr        IP address of the host
+ * @param[out]  netif       Interface if address is link-local
+ *
+ * @return  0 on success, error otherwise
+ */
+int netif_parse_hostname(const char *hostname, ipv6_addr_t *addr, netif_t **netif);

Again: why add an application error function to the link layer? I thought we agreed on having some kind of `net/utils.h` module?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16634#pullrequestreview-704399060
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210712/10718068/attachment.htm>


More information about the notifications mailing list