summaryrefslogtreecommitdiff
path: root/shared/systemd/nm-sd-utils-shared.h
blob: b08381b7cbbcfc36241a79501c1ddd7959ca9c4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// SPDX-License-Identifier: LGPL-2.1+
/* Copyright (C) 2018 Red Hat, Inc.
 */

#ifndef __NM_SD_UTILS_SHARED_H__
#define __NM_SD_UTILS_SHARED_H__

/*****************************************************************************/

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);

/*****************************************************************************/

int nm_sd_utils_unbase64char (char ch, gboolean accept_padding_equal);

int nm_sd_utils_unbase64mem (const char *p,
                             size_t l,
                             gboolean secure,
                             guint8 **mem,
                             size_t *len);

/*****************************************************************************/

int nm_sd_dns_name_to_wire_format (const char *domain,
                                   guint8 *buffer,
                                   size_t len,
                                   gboolean canonical);

#endif /* __NM_SD_UTILS_SHARED_H__ */