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 34 35 36 37 38 39 40 41
|
/*
* Copyright (C) 2021-2024 Canonical, Ltd.
* Author: Lukas Märdian <slyon@ubuntu.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* @file parse-nm.h
* @brief Parsing NetworkManager keyfile configuration into @ref NetplanParser data structures.
*/
#pragma once
#include "types.h"
/// The value `_` indicates an emtpy keyfile group in `networkmanager.passthrough` handling.
#define NETPLAN_NM_EMPTY_GROUP "_"
/**
* @brief Parse a NetworkManager keyfile into a @ref NetplanNetDefinition struct.
* @param[in] npp The @ref NetplanParser object that should contain the parsed data
* @param[in] filename Full path to the NetworkManager keyfile
* @param[out] error Filled with a @ref NetplanError in case of failure
* @return Indication of success or failure
*/
NETPLAN_PUBLIC gboolean
netplan_parser_load_keyfile(NetplanParser* npp, const char* filename, NetplanError** error);
//TODO: needs to be implemented
//NETPLAN_PUBLIC gboolean
//netplan_parser_load_keyfile_from_fd(NetplanParser* npp, int input_fd, NetplanError** error);
|