mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-26 10:53:39 +01:00
adf3764857
git-subtree-dir: contrib/wireguard-tools git-subtree-mainline:9142a2a37b
git-subtree-split:7e00bf8773
28 lines
664 B
C
28 lines
664 B
C
/* SPDX-License-Identifier: GPL-2.0 OR MIT */
|
|
/*
|
|
* Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
|
|
*/
|
|
|
|
#ifndef CONFIG_H
|
|
#define CONFIG_H
|
|
|
|
#include <stdbool.h>
|
|
|
|
struct wgdevice;
|
|
struct wgpeer;
|
|
struct wgallowedip;
|
|
|
|
struct config_ctx {
|
|
struct wgdevice *device;
|
|
struct wgpeer *last_peer;
|
|
struct wgallowedip *last_allowedip;
|
|
bool is_peer_section, is_device_section;
|
|
};
|
|
|
|
struct wgdevice *config_read_cmd(const char *argv[], int argc);
|
|
bool config_read_init(struct config_ctx *ctx, bool append);
|
|
bool config_read_line(struct config_ctx *ctx, const char *line);
|
|
struct wgdevice *config_read_finish(struct config_ctx *ctx);
|
|
|
|
#endif
|