2020-09-29 16:42:22 +02:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1+ */
|
2019-09-25 13:13:40 +02:00
|
|
|
/*
|
|
|
|
|
* Copyright (C) 2018 Red Hat, Inc.
|
2018-10-03 21:50:27 +02:00
|
|
|
*/
|
|
|
|
|
|
2018-12-28 18:11:16 +01:00
|
|
|
#ifndef __NM_SD_UTILS_SHARED_H__
|
|
|
|
|
#define __NM_SD_UTILS_SHARED_H__
|
2018-10-03 21:50:27 +02:00
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2020-09-28 19:57:20 +02:00
|
|
|
gboolean nm_sd_utils_path_equal(const char *a, const char *b);
|
2018-10-03 21:50:27 +02:00
|
|
|
|
2020-09-28 19:57:20 +02:00
|
|
|
char *nm_sd_utils_path_simplify(char *path, gboolean kill_dots);
|
2018-10-03 21:50:27 +02:00
|
|
|
|
2020-09-28 19:57:20 +02:00
|
|
|
const char *nm_sd_utils_path_startswith(const char *path, const char *prefix);
|
2018-10-03 21:50:27 +02:00
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2020-09-28 19:57:20 +02:00
|
|
|
int nm_sd_utils_unbase64char(char ch, gboolean accept_padding_equal);
|
2018-12-28 19:56:19 +01:00
|
|
|
|
2020-09-28 19:57:20 +02:00
|
|
|
int nm_sd_utils_unbase64mem(const char *p, size_t l, gboolean secure, guint8 **mem, size_t *len);
|
2018-12-28 19:56:19 +01:00
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2020-09-28 19:57:20 +02:00
|
|
|
int
|
|
|
|
|
nm_sd_dns_name_to_wire_format(const char *domain, guint8 *buffer, size_t len, gboolean canonical);
|
2019-06-25 13:53:35 +02:00
|
|
|
|
2020-09-28 19:57:20 +02:00
|
|
|
int nm_sd_dns_name_is_valid(const char *s);
|
2019-10-17 17:39:56 +02:00
|
|
|
gboolean nm_sd_hostname_is_valid(const char *s, bool allow_trailing_dot);
|
|
|
|
|
|
2020-04-24 09:35:12 +02:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2020-09-28 19:57:20 +02:00
|
|
|
gboolean nm_sd_http_url_is_valid_https(const char *url);
|
2020-04-24 09:35:12 +02:00
|
|
|
|
2020-06-22 19:21:17 +02:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2020-09-28 19:57:20 +02:00
|
|
|
int nmtst_systemd_extract_first_word_all(const char *str, char ***out_strv);
|
2020-06-22 19:21:17 +02:00
|
|
|
|
2018-12-28 18:11:16 +01:00
|
|
|
#endif /* __NM_SD_UTILS_SHARED_H__ */
|