|
Packit Service |
87a54e |
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
Packit |
5756e2 |
/*
|
|
Packit |
5756e2 |
* Copyright (C) 2012 - 2014 Red Hat, Inc.
|
|
Packit |
5756e2 |
*/
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
#ifndef NMC_COMMON_H
|
|
Packit |
5756e2 |
#define NMC_COMMON_H
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
#include "nmcli.h"
|
|
Packit |
5756e2 |
#include "nm-secret-agent-simple.h"
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
gboolean print_ip_config(NMIPConfig * cfg,
|
|
Packit Service |
a1bd4f |
int addr_family,
|
|
Packit Service |
a1bd4f |
const NmcConfig *nmc_config,
|
|
Packit Service |
a1bd4f |
const char * one_field);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
gboolean print_dhcp_config(NMDhcpConfig * dhcp,
|
|
Packit Service |
a1bd4f |
int addr_family,
|
|
Packit Service |
a1bd4f |
const NmcConfig *nmc_config,
|
|
Packit Service |
a1bd4f |
const char * one_field);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
NMConnection *nmc_find_connection(const GPtrArray *connections,
|
|
Packit Service |
a1bd4f |
const char * filter_type,
|
|
Packit Service |
a1bd4f |
const char * filter_val,
|
|
Packit Service |
a1bd4f |
GPtrArray ** out_result,
|
|
Packit Service |
a1bd4f |
gboolean complete);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
NMActiveConnection *nmc_find_active_connection(const GPtrArray *active_cons,
|
|
Packit Service |
a1bd4f |
const char * filter_type,
|
|
Packit Service |
a1bd4f |
const char * filter_val,
|
|
Packit Service |
a1bd4f |
GPtrArray ** out_result,
|
|
Packit Service |
a1bd4f |
gboolean complete);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
void nmc_secrets_requested(NMSecretAgentSimple *agent,
|
|
Packit Service |
a1bd4f |
const char * request_id,
|
|
Packit Service |
a1bd4f |
const char * title,
|
|
Packit Service |
a1bd4f |
const char * msg,
|
|
Packit Service |
a1bd4f |
GPtrArray * secrets,
|
|
Packit Service |
a1bd4f |
gpointer user_data);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
char *nmc_unique_connection_name(const GPtrArray *connections, const char *try_name);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
void nmc_cleanup_readline(void);
|
|
Packit Service |
a1bd4f |
char *nmc_readline(const NmcConfig *nmc_config, const char *prompt_fmt, ...) G_GNUC_PRINTF(2, 3);
|
|
Packit Service |
a1bd4f |
char *nmc_readline_echo(const NmcConfig *nmc_config, gboolean echo_on, const char *prompt_fmt, ...)
|
|
Packit Service |
a1bd4f |
G_GNUC_PRINTF(3, 4);
|
|
Packit Service |
a1bd4f |
NmcCompEntryFunc nmc_rl_compentry_func_wrap(const char *const *values);
|
|
Packit Service |
a1bd4f |
char * nmc_rl_gen_func_basic(const char *text, int state, const char *const *words);
|
|
Packit Service |
a1bd4f |
char * nmc_rl_gen_func_ifnames(const char *text, int state);
|
|
Packit Service |
a1bd4f |
gboolean nmc_get_in_readline(void);
|
|
Packit Service |
a1bd4f |
void nmc_set_in_readline(gboolean in_readline);
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/* for pre-filling a string to readline prompt */
|
|
Packit |
5756e2 |
extern char *nmc_rl_pre_input_deftext;
|
|
Packit Service |
a1bd4f |
int nmc_rl_set_deftext(void);
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
char *nmc_parse_lldp_capabilities(guint value);
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
void
|
|
Packit Service |
a1bd4f |
nmc_do_cmd(NmCli *nmc, const NMCCommand cmds[], const char *cmd, int argc, const char *const *argv);
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
void nmc_complete_strv(const char *prefix, gssize nargs, const char *const *args);
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
#define nmc_complete_strings(prefix, ...) \
|
|
Packit Service |
a1bd4f |
nmc_complete_strv((prefix), NM_NARG(__VA_ARGS__), (const char *const[]){__VA_ARGS__})
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
void nmc_complete_bool(const char *prefix);
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
const char *nmc_error_get_simple_message(GError *error);
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
extern const NmcMetaGenericInfo *const metagen_ip4_config[];
|
|
Packit |
5756e2 |
extern const NmcMetaGenericInfo *const metagen_ip6_config[];
|
|
Packit |
5756e2 |
extern const NmcMetaGenericInfo *const metagen_dhcp_config[];
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
const char *nm_connectivity_to_string(NMConnectivityState connectivity);
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
GVariant *nmc_dbus_call_sync(NmCli * nmc,
|
|
Packit Service |
a1bd4f |
const char * object_path,
|
|
Packit Service |
a1bd4f |
const char * interface_name,
|
|
Packit Service |
a1bd4f |
const char * method_name,
|
|
Packit Service |
a1bd4f |
GVariant * parameters,
|
|
Packit Service |
a1bd4f |
const GVariantType *reply_type,
|
|
Packit Service |
a1bd4f |
GError ** error);
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
#endif /* NMC_COMMON_H */
|