1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2/*
3 * Copyright (C) 2007 - 2008 Novell, Inc.
4 * Copyright (C) 2008 - 2014 Red Hat, Inc.
5 */
6
7#ifndef __NM_IP_CONFIG_H__
8#define __NM_IP_CONFIG_H__
9
10#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION)
11#error "Only <NetworkManager.h> can be included directly."
12#endif
13
14#include "nm-object.h"
15
16G_BEGIN_DECLS
17
18#define NM_TYPE_IP_CONFIG (nm_ip_config_get_type())
19#define NM_IP_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_IP_CONFIG, NMIPConfig))
20#define NM_IP_CONFIG_CLASS(klass) \
21 (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_IP_CONFIG, NMIPConfigClass))
22#define NM_IS_IP_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_IP_CONFIG))
23#define NM_IS_IP_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_IP_CONFIG))
24#define NM_IP_CONFIG_GET_CLASS(obj) \
25 (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_IP_CONFIG, NMIPConfigClass))
26
27/**
28 * NMIPConfig:
29 */
30typedef struct _NMIPConfigClass NMIPConfigClass;
31
32#define NM_IP_CONFIG_FAMILY "family"
33#define NM_IP_CONFIG_GATEWAY "gateway"
34#define NM_IP_CONFIG_ADDRESSES "addresses"
35#define NM_IP_CONFIG_ROUTES "routes"
36#define NM_IP_CONFIG_NAMESERVERS "nameservers"
37#define NM_IP_CONFIG_DOMAINS "domains"
38#define NM_IP_CONFIG_SEARCHES "searches"
39#define NM_IP_CONFIG_WINS_SERVERS "wins-servers"
40
41GType nm_ip_config_get_type(void);
42
43int nm_ip_config_get_family(NMIPConfig *config);
44const char *nm_ip_config_get_gateway(NMIPConfig *config);
45GPtrArray *nm_ip_config_get_addresses(NMIPConfig *config);
46GPtrArray *nm_ip_config_get_routes(NMIPConfig *config);
47const char *const *nm_ip_config_get_nameservers(NMIPConfig *config);
48const char *const *nm_ip_config_get_domains(NMIPConfig *config);
49const char *const *nm_ip_config_get_searches(NMIPConfig *config);
50const char *const *nm_ip_config_get_wins_servers(NMIPConfig *config);
51
52G_END_DECLS
53
54#endif /* __NM_IP_CONFIG_H__ */
55

source code of include/libnm/nm-ip-config.h