2019-09-10 11:19:01 +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
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
gboolean nm_sd_utils_path_equal (const char *a, const char *b);
|
|
|
|
|
|
|
|
|
|
char *nm_sd_utils_path_simplify (char *path, gboolean kill_dots);
|
|
|
|
|
|
|
|
|
|
const char *nm_sd_utils_path_startswith (const char *path, const char *prefix);
|
|
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2018-12-28 19:56:19 +01:00
|
|
|
int nm_sd_utils_unbase64char (char ch, gboolean accept_padding_equal);
|
|
|
|
|
|
2019-04-12 07:39:48 +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
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
2019-06-25 13:53:35 +02:00
|
|
|
int nm_sd_dns_name_to_wire_format (const char *domain,
|
|
|
|
|
guint8 *buffer,
|
|
|
|
|
size_t len,
|
|
|
|
|
gboolean canonical);
|
|
|
|
|
|
2019-10-17 17:39:56 +02:00
|
|
|
int nm_sd_dns_name_is_valid (const char *s);
|
|
|
|
|
gboolean nm_sd_hostname_is_valid(const char *s, bool allow_trailing_dot);
|
|
|
|
|
|
2020-04-24 09:35:12 +02:00
|
|
|
/*****************************************************************************/
|
|
|
|
|
|
|
|
|
|
gboolean nm_sd_http_url_is_valid (const char *url);
|
|
|
|
|
|
2018-12-28 18:11:16 +01:00
|
|
|
#endif /* __NM_SD_UTILS_SHARED_H__ */
|