1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
2 | /* |
3 | * Copyright (C) 2007 - 2014 Red Hat, Inc. |
4 | * Copyright (C) 2007 - 2008 Novell, Inc. |
5 | */ |
6 | |
7 | #ifndef __NM_SETTING_IP4_CONFIG_H__ |
8 | #define __NM_SETTING_IP4_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-setting-ip-config.h" |
15 | |
16 | G_BEGIN_DECLS |
17 | |
18 | #define NM_TYPE_SETTING_IP4_CONFIG (nm_setting_ip4_config_get_type()) |
19 | #define NM_SETTING_IP4_CONFIG(obj) \ |
20 | (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_SETTING_IP4_CONFIG, NMSettingIP4Config)) |
21 | #define NM_SETTING_IP4_CONFIG_CLASS(klass) \ |
22 | (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_SETTING_IP4CONFIG, NMSettingIP4ConfigClass)) |
23 | #define NM_IS_SETTING_IP4_CONFIG(obj) \ |
24 | (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_SETTING_IP4_CONFIG)) |
25 | #define NM_IS_SETTING_IP4_CONFIG_CLASS(klass) \ |
26 | (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_SETTING_IP4_CONFIG)) |
27 | #define NM_SETTING_IP4_CONFIG_GET_CLASS(obj) \ |
28 | (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_SETTING_IP4_CONFIG, NMSettingIP4ConfigClass)) |
29 | |
30 | #define NM_SETTING_IP4_CONFIG_SETTING_NAME "ipv4" |
31 | |
32 | #define NM_SETTING_IP4_CONFIG_DHCP_CLIENT_ID "dhcp-client-id" |
33 | #define NM_SETTING_IP4_CONFIG_DHCP_FQDN "dhcp-fqdn" |
34 | #define NM_SETTING_IP4_CONFIG_DHCP_VENDOR_CLASS_IDENTIFIER "dhcp-vendor-class-identifier" |
35 | |
36 | /** |
37 | * NM_SETTING_IP4_CONFIG_METHOD_AUTO: |
38 | * |
39 | * IPv4 configuration should be automatically determined via a method appropriate |
40 | * for the hardware interface, ie DHCP or PPP or some other device-specific |
41 | * manner. |
42 | */ |
43 | #define NM_SETTING_IP4_CONFIG_METHOD_AUTO "auto" |
44 | |
45 | /** |
46 | * NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL: |
47 | * |
48 | * IPv4 configuration should be automatically configured for link-local-only |
49 | * operation. |
50 | */ |
51 | #define NM_SETTING_IP4_CONFIG_METHOD_LINK_LOCAL "link-local" |
52 | |
53 | /** |
54 | * NM_SETTING_IP4_CONFIG_METHOD_MANUAL: |
55 | * |
56 | * All necessary IPv4 configuration (addresses, prefix, DNS, etc) is specified |
57 | * in the setting's properties. |
58 | */ |
59 | #define NM_SETTING_IP4_CONFIG_METHOD_MANUAL "manual" |
60 | |
61 | /** |
62 | * NM_SETTING_IP4_CONFIG_METHOD_SHARED: |
63 | * |
64 | * This connection specifies configuration that allows other computers to |
65 | * connect through it to the default network (usually the Internet). The |
66 | * connection's interface will be assigned a private address, and a DHCP server, |
67 | * caching DNS server, and Network Address Translation (NAT) functionality will |
68 | * be started on this connection's interface to allow other devices to connect |
69 | * through that interface to the default network. |
70 | */ |
71 | #define NM_SETTING_IP4_CONFIG_METHOD_SHARED "shared" |
72 | |
73 | /** |
74 | * NM_SETTING_IP4_CONFIG_METHOD_DISABLED: |
75 | * |
76 | * This connection does not use or require IPv4 address and it should be disabled. |
77 | */ |
78 | #define NM_SETTING_IP4_CONFIG_METHOD_DISABLED "disabled" |
79 | |
80 | typedef struct _NMSettingIP4ConfigClass NMSettingIP4ConfigClass; |
81 | |
82 | GType nm_setting_ip4_config_get_type(void); |
83 | |
84 | NMSetting *nm_setting_ip4_config_new(void); |
85 | |
86 | const char *nm_setting_ip4_config_get_dhcp_client_id(NMSettingIP4Config *setting); |
87 | NM_AVAILABLE_IN_1_2 |
88 | const char *nm_setting_ip4_config_get_dhcp_fqdn(NMSettingIP4Config *setting); |
89 | |
90 | NM_AVAILABLE_IN_1_28 |
91 | const char *nm_setting_ip4_config_get_dhcp_vendor_class_identifier(NMSettingIP4Config *setting); |
92 | |
93 | G_END_DECLS |
94 | |
95 | #endif /* __NM_SETTING_IP4_CONFIG_H__ */ |
96 | |