static void nm_setting_team_class_init (NMSettingTeamClass *setting_class) { GObjectClass *object_class = G_OBJECT_CLASS (setting_class); NMSettingClass *parent_class = NM_SETTING_CLASS (setting_class); g_type_class_add_private (setting_class, sizeof (NMSettingTeamPrivate)); /* virtual methods */ object_class->set_property = set_property; object_class->get_property = get_property; object_class->finalize = finalize; parent_class->verify = verify; /* Properties */ /** * NMSettingTeam:config: * * The JSON configuration for the team network interface. The property * should contain raw JSON configuration data suitable for teamd, because * the value is passed directly to teamd. If not specified, the default * configuration is used. See man teamd.conf for the format details. **/ g_object_class_install_property (object_class, PROP_CONFIG, g_param_spec_string (NM_SETTING_TEAM_CONFIG, "", "", NULL, G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS)); _nm_setting_class_add_dbus_only_property (parent_class, "interface-name", G_TYPE_STRING, _nm_setting_get_deprecated_virtual_interface_name, _nm_setting_set_deprecated_virtual_interface_name); }
static void nm_setting_bond_class_init (NMSettingBondClass *setting_class) { GObjectClass *object_class = G_OBJECT_CLASS (setting_class); NMSettingClass *parent_class = NM_SETTING_CLASS (setting_class); g_type_class_add_private (setting_class, sizeof (NMSettingBondPrivate)); /* virtual methods */ object_class->set_property = set_property; object_class->get_property = get_property; object_class->finalize = finalize; parent_class->verify = verify; parent_class->compare_property = compare_property; /* Properties */ /** * NMSettingBond:options: * * Dictionary of key/value pairs of bonding options. Both keys and values * must be strings. Option names must contain only alphanumeric characters * (ie, [a-zA-Z0-9]). * * Type: GHashTable(utf8,utf8) **/ /* ---ifcfg-rh--- * property: options * variable: BONDING_OPTS * description: Bonding options. * example: BONDING_OPTS="miimon=100 mode=broadcast" * ---end--- */ g_object_class_install_property (object_class, PROP_OPTIONS, g_param_spec_boxed (NM_SETTING_BOND_OPTIONS, "", "", G_TYPE_HASH_TABLE, G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS)); _nm_setting_class_transform_property (parent_class, NM_SETTING_BOND_OPTIONS, G_VARIANT_TYPE ("a{ss}"), _nm_utils_strdict_to_dbus, _nm_utils_strdict_from_dbus); /* ---dbus--- * property: interface-name * format: string * description: Deprecated in favor of connection.interface-name, but can * be used for backward-compatibility with older daemons, to set the * bond's interface name. * ---end--- */ _nm_setting_class_add_dbus_only_property (parent_class, "interface-name", G_VARIANT_TYPE_STRING, _nm_setting_get_deprecated_virtual_interface_name, NULL); }
static void nm_setting_ip6_config_class_init (NMSettingIP6ConfigClass *ip6_class) { GObjectClass *object_class = G_OBJECT_CLASS (ip6_class); NMSettingClass *setting_class = NM_SETTING_CLASS (ip6_class); g_type_class_add_private (ip6_class, sizeof (NMSettingIP6ConfigPrivate)); /* virtual methods */ object_class->set_property = set_property; object_class->get_property = get_property; setting_class->verify = verify; /* Properties */ /* ---ifcfg-rh--- * property: method * variable: IPV6INIT, IPV6FORWARDING, IPV6_AUTOCONF, DHCPV6C * default: IPV6INIT=yes; IPV6FORWARDING=no; IPV6_AUTOCONF=!IPV6FORWARDING, DHCPV6=no * description: Method used for IPv6 protocol configuration. * ignore ~ IPV6INIT=no; auto ~ IPV6_AUTOCONF=yes; dhcp ~ IPV6_AUTOCONF=no and DHCPV6C=yes * ---end--- */ /* ---keyfile--- * property: dns * format: list of DNS IP addresses * description: List of DNS servers. * example: dns=2001:4860:4860::8888;2001:4860:4860::8844; * ---end--- * ---ifcfg-rh--- * property: dns * variable: DNS1, DNS2, ... * format: string * description: List of DNS servers. NetworkManager uses the variables both * for IPv4 and IPv6. * ---end--- */ /* ---ifcfg-rh--- * property: dns-search * variable: DOMAIN * format: string (space-separated domains) * description: List of DNS search domains. * ---end--- */ /* ---keyfile--- * property: addresses * variable: address1, address2, ... * format: address/plen * description: List of static IP addresses. * example: address1=abbe::cafe/96 address2=2001::1234 * ---end--- * ---ifcfg-rh--- * property: addresses * variable: IPV6ADDR, IPV6ADDR_SECONDARIES * description: List of static IP addresses. * example: IPV6ADDR=ab12:9876::1 * IPV6ADDR_SECONDARIES="ab12:9876::2 ab12:9876::3" * ---end--- */ /* ---keyfile--- * property: gateway * variable: gateway * format: string * description: Gateway IP addresses as a string. * example: gateway=abbe::1 * ---end--- * ---ifcfg-rh--- * property: gateway * variable: IPV6_DEFAULTGW * description: Gateway IP address. * example: IPV6_DEFAULTGW=abbe::1 * ---end--- */ /* ---keyfile--- * property: routes * variable: route1, route2, ... * format: route/plen[,gateway,metric] * description: List of IP routes. * example: route1=2001:4860:4860::/64,2620:52:0:2219:222:68ff:fe11:5403 * ---end--- * ---ifcfg-rh--- * property: routes * variable: (none) * description: List of static routes. They are not stored in ifcfg-* file, * but in route6-* file instead in the form of command line for 'ip route add'. * ---end--- */ /* ---ifcfg-rh--- * property: ignore-auto-routes * variable: IPV6_PEERROUTES(+) * default: yes * description: IPV6_PEERROUTES has the opposite meaning as 'ignore-auto-routes' property. * ---end--- */ /* ---ifcfg-rh--- * property: ignore-auto-dns * variable: IPV6_PEERDNS(+) * default: yes * description: IPV6_PEERDNS has the opposite meaning as 'ignore-auto-dns' property. * ---end--- */ /* ---ifcfg-rh--- * property: dhcp-hostname * variable: DHCP_HOSTNAME * description: Hostname to send the DHCP server. * ---end--- */ /* ---ifcfg-rh--- * property: never-default * variable: IPV6_DEFROUTE(+), (and IPV6_DEFAULTGW, IPV6_DEFAULTDEV in /etc/sysconfig/network) * default: IPV6_DEFROUTE=yes (when no variable specified) * description: IPV6_DEFROUTE=no tells NetworkManager that this connection * should not be assigned the default IPv6 route. IPV6_DEFROUTE has the opposite * meaning as 'never-default' property. * ---end--- */ /* ---ifcfg-rh--- * property: may-fail * variable: IPV6_FAILURE_FATAL(+) * default: no * description: IPV6_FAILURE_FATAL has the opposite meaning as 'may-fail' property. * ---end--- */ /* ---ifcfg-rh--- * property: route-metric * variable: IPV6_ROUTE_METRIC(+) * default: -1 * description: IPV6_ROUTE_METRIC is the default IPv6 metric for routes on this connection. * If set to -1, a default metric based on the device type is used. * ---end--- */ /** * NMSettingIP6Config:ip6-privacy: * * Configure IPv6 Privacy Extensions for SLAAC, described in RFC4941. If * enabled, it makes the kernel generate a temporary IPv6 address in * addition to the public one generated from MAC address via modified * EUI-64. This enhances privacy, but could cause problems in some * applications, on the other hand. The permitted values are: -1: unknown, * 0: disabled, 1: enabled (prefer public address), 2: enabled (prefer temporary * addresses). * * Having a per-connection setting set to "-1" (unknown) means fallback to * global configuration "ipv6.ip6-privacy". * * If also global configuration is unspecified or set to "-1", fallback to read * "/proc/sys/net/ipv6/conf/default/use_tempaddr". * * Note that this setting is distinct from the Stable Privacy addresses * that can be enabled with the "addr-gen-mode" property's "stable-privacy" * setting as another way of avoiding host tracking with IPv6 addresses. **/ /* ---ifcfg-rh--- * property: ip6-privacy * variable: IPV6_PRIVACY, IPV6_PRIVACY_PREFER_PUBLIC_IP(+) * values: IPV6_PRIVACY: no, yes (rfc3041 or rfc4941); * IPV6_PRIVACY_PREFER_PUBLIC_IP: yes, no * default: no * description: Configure IPv6 Privacy Extensions for SLAAC (RFC4941). * example: IPV6_PRIVACY=rfc3041 IPV6_PRIVACY_PREFER_PUBLIC_IP=yes * ---end--- */ g_object_class_install_property (object_class, PROP_IP6_PRIVACY, g_param_spec_enum (NM_SETTING_IP6_CONFIG_IP6_PRIVACY, "", "", NM_TYPE_SETTING_IP6_CONFIG_PRIVACY, NM_SETTING_IP6_CONFIG_PRIVACY_UNKNOWN, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); /** * NMSettingIP6Config:addr-gen-mode: * * Configure method for creating the address for use with RFC4862 IPv6 * Stateless Address Autoconfiguration. The permitted values are: "eui64", * "stable-privacy" or unset. * * If the property is set to "eui64", the addresses will be generated * using the interface tokens derived from hardware address. This makes * the host part of the address to stay constant, making it possible * to track host's presence when it changes networks. The address changes * when the interface hardware is replaced. * * The value of "stable-privacy" enables use of cryptographically * secure hash of a secret host-specific key along with the connection * identification and the network address as specified by RFC7217. * This makes it impossible to use the address track host's presence, * and makes the address stable when the network interface hardware is * replaced. * * Leaving this unset causes a default that could be subject to change * in future versions to be used. * * Note that this setting is distinct from the Privacy Extensions as * configured by "ip6-privacy" property and it does not affect the * temporary addresses configured with this option. * * Since: 1.2 **/ /* ---ifcfg-rh--- * property: addr-gen-mode * variable: IPV6_ADDR_GEN_MODE * values: IPV6_ADDR_GEN_MODE: eui64, stable-privacy * default: eui64 * description: Configure IPv6 Stable Privacy addressing for SLAAC (RFC7217). * example: IPV6_ADDR_GEN_MODE=stable-privacy * ---end--- */ g_object_class_install_property (object_class, PROP_ADDR_GEN_MODE, g_param_spec_int (NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE, "", "", G_MININT, G_MAXINT, NM_SETTING_IP6_CONFIG_ADDR_GEN_MODE_STABLE_PRIVACY, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); /* IP6-specific property overrides */ /* ---dbus--- * property: dns * format: array of byte array * description: Array of IP addresses of DNS servers (in network byte order) * ---end--- */ _nm_setting_class_transform_property (setting_class, NM_SETTING_IP_CONFIG_DNS, G_VARIANT_TYPE ("aay"), ip6_dns_to_dbus, ip6_dns_from_dbus); /* ---dbus--- * property: addresses * format: array of legacy IPv6 address struct (a(ayuay)) * description: Deprecated in favor of the 'address-data' and 'gateway' * properties, but this can be used for backward-compatibility with older * daemons. Note that if you send this property the daemon will ignore * 'address-data' and 'gateway'. * * Array of IPv6 address structures. Each IPv6 address structure is * composed of an IPv6 address, a prefix length (1 - 128), and an IPv6 * gateway address. The gateway may be zeroed out if no gateway exists for * that subnet. * ---end--- */ _nm_setting_class_override_property (setting_class, NM_SETTING_IP_CONFIG_ADDRESSES, G_VARIANT_TYPE ("a(ayuay)"), ip6_addresses_get, ip6_addresses_set, NULL); /* ---dbus--- * property: address-data * format: array of vardict * description: Array of IPv6 addresses. Each address dictionary contains at * least 'address' and 'prefix' entries, containing the IP address as a * string, and the prefix length as a uint32. Additional attributes may * also exist on some addresses. * ---end--- */ _nm_setting_class_add_dbus_only_property (setting_class, "address-data", G_VARIANT_TYPE ("aa{sv}"), ip6_address_data_get, ip6_address_data_set); /* ---dbus--- * property: routes * format: array of legacy IPv6 route struct (a(ayuayu)) * description: Deprecated in favor of the 'route-data' property, but this * can be used for backward-compatibility with older daemons. Note that if * you send this property the daemon will ignore 'route-data'. * * Array of IPv6 route structures. Each IPv6 route structure is * composed of an IPv6 address, a prefix length (1 - 128), an IPv6 * next hop address (which may be zeroed out if there is no next hop), * and a metric. If the metric is 0, NM will choose an appropriate * default metric for the device. * ---end--- */ _nm_setting_class_override_property (setting_class, NM_SETTING_IP_CONFIG_ROUTES, G_VARIANT_TYPE ("a(ayuayu)"), ip6_routes_get, ip6_routes_set, NULL); /* ---dbus--- * property: route-data * format: array of vardict * description: Array of IPv6 routes. Each route dictionary contains at * least 'dest' and 'prefix' entries, containing the destination IP * address as a string, and the prefix length as a uint32. Most routes * will also have a 'next-hop' entry, containing the next hop IP address as * a string. If the route has a 'metric' entry (containing a uint32), that * will be used as the metric for the route (otherwise NM will pick a * default value appropriate to the device). Additional attributes may * also exist on some routes. * ---end--- */ _nm_setting_class_add_dbus_only_property (setting_class, "route-data", G_VARIANT_TYPE ("aa{sv}"), ip6_route_data_get, ip6_route_data_set); }
static void nm_setting_gsm_class_init (NMSettingGsmClass *setting_class) { GObjectClass *object_class = G_OBJECT_CLASS (setting_class); NMSettingClass *parent_class = NM_SETTING_CLASS (setting_class); g_type_class_add_private (setting_class, sizeof (NMSettingGsmPrivate)); /* virtual methods */ object_class->set_property = set_property; object_class->get_property = get_property; object_class->finalize = finalize; parent_class->verify = verify; parent_class->verify_secrets = verify_secrets; parent_class->need_secrets = need_secrets; /* Properties */ /** * NMSettingGsm:number: * * Number to dial when establishing a PPP data session with the GSM-based * mobile broadband network. Many modems do not require PPP for connections * to the mobile network and thus this property should be left blank, which * allows NetworkManager to select the appropriate settings automatically. **/ g_object_class_install_property (object_class, PROP_NUMBER, g_param_spec_string (NM_SETTING_GSM_NUMBER, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:username: * * The username used to authenticate with the network, if required. Many * providers do not require a username, or accept any username. But if a * username is required, it is specified here. **/ g_object_class_install_property (object_class, PROP_USERNAME, g_param_spec_string (NM_SETTING_GSM_USERNAME, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:password: * * The password used to authenticate with the network, if required. Many * providers do not require a password, or accept any password. But if a * password is required, it is specified here. **/ g_object_class_install_property (object_class, PROP_PASSWORD, g_param_spec_string (NM_SETTING_GSM_PASSWORD, "", "", NULL, G_PARAM_READWRITE | NM_SETTING_PARAM_SECRET | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:password-flags: * * Flags indicating how to handle the #NMSettingGsm:password property. **/ g_object_class_install_property (object_class, PROP_PASSWORD_FLAGS, g_param_spec_flags (NM_SETTING_GSM_PASSWORD_FLAGS, "", "", NM_TYPE_SETTING_SECRET_FLAGS, NM_SETTING_SECRET_FLAG_NONE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:apn: * * The GPRS Access Point Name specifying the APN used when establishing a * data session with the GSM-based network. The APN often determines how * the user will be billed for their network usage and whether the user has * access to the Internet or just a provider-specific walled-garden, so it * is important to use the correct APN for the user's mobile broadband plan. * The APN may only be composed of the characters a-z, 0-9, ., and - per GSM * 03.60 Section 14.9. **/ g_object_class_install_property (object_class, PROP_APN, g_param_spec_string (NM_SETTING_GSM_APN, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:network-id: * * The Network ID (GSM LAI format, ie MCC-MNC) to force specific network * registration. If the Network ID is specified, NetworkManager will * attempt to force the device to register only on the specified network. * This can be used to ensure that the device does not roam when direct * roaming control of the device is not otherwise possible. **/ g_object_class_install_property (object_class, PROP_NETWORK_ID, g_param_spec_string (NM_SETTING_GSM_NETWORK_ID, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:pin: * * If the SIM is locked with a PIN it must be unlocked before any other * operations are requested. Specify the PIN here to allow operation of the * device. **/ g_object_class_install_property (object_class, PROP_PIN, g_param_spec_string (NM_SETTING_GSM_PIN, "", "", NULL, G_PARAM_READWRITE | NM_SETTING_PARAM_SECRET | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:pin-flags: * * Flags indicating how to handle the #NMSettingGsm:pin property. **/ g_object_class_install_property (object_class, PROP_PIN_FLAGS, g_param_spec_flags (NM_SETTING_GSM_PIN_FLAGS, "", "", NM_TYPE_SETTING_SECRET_FLAGS, NM_SETTING_SECRET_FLAG_NONE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:home-only: * * When %TRUE, only connections to the home network will be allowed. * Connections to roaming networks will not be made. **/ g_object_class_install_property (object_class, PROP_HOME_ONLY, g_param_spec_boolean (NM_SETTING_GSM_HOME_ONLY, "", "", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:device-id: * * The device unique identifier (as given by the WWAN management service) * which this connection applies to. If given, the connection will only * apply to the specified device. * * Since: 1.2 **/ g_object_class_install_property (object_class, PROP_DEVICE_ID, g_param_spec_string (NM_SETTING_GSM_DEVICE_ID, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:sim-id: * * The SIM card unique identifier (as given by the WWAN management service) * which this connection applies to. If given, the connection will apply * to any device also allowed by #NMSettingGsm:device-id which contains a * SIM card matching the given identifier. * * Since: 1.2 **/ g_object_class_install_property (object_class, PROP_SIM_ID, g_param_spec_string (NM_SETTING_GSM_SIM_ID, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:sim-operator-id: * * A MCC/MNC string like "310260" or "21601" identifying the specific * mobile network operator which this connection applies to. If given, * the connection will apply to any device also allowed by * #NMSettingGsm:device-id and #NMSettingGsm:sim-id which contains a SIM * card provisioined by the given operator. * * Since: 1.2 **/ g_object_class_install_property (object_class, PROP_SIM_OPERATOR_ID, g_param_spec_string (NM_SETTING_GSM_SIM_OPERATOR_ID, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* Ignore incoming deprecated properties */ _nm_setting_class_add_dbus_only_property (parent_class, "allowed-bands", G_VARIANT_TYPE_UINT32, NULL, NULL); _nm_setting_class_add_dbus_only_property (parent_class, "network-type", G_VARIANT_TYPE_INT32, NULL, NULL); }
static void nm_setting_ip4_config_class_init (NMSettingIP4ConfigClass *ip4_class) { NMSettingClass *setting_class = NM_SETTING_CLASS (ip4_class); GObjectClass *object_class = G_OBJECT_CLASS (ip4_class); g_type_class_add_private (setting_class, sizeof (NMSettingIP4ConfigPrivate)); /* virtual methods */ object_class->set_property = set_property; object_class->get_property = get_property; object_class->finalize = finalize; setting_class->verify = verify; /* properties */ /* ---ifcfg-rh--- * property: method * variable: BOOTPROTO * format: string * values: none, dhcp (bootp), static, ibft, autoip, shared * default: none * description: Method used for IPv4 protocol configuration. * ---end--- */ /* ---keyfile--- * property: dns * format: list of DNS IP addresses * description: List of DNS servers. * example: dns=1.2.3.4;8.8.8.8;8.8.4.4; * ---end--- * ---ifcfg-rh--- * property: dns * variable: DNS1, DNS2, ... * format: string * description: List of DNS servers. Even if NetworkManager supports many DNS * servers, initscripts and resolver only care about the first three, usually. * example: DNS1=1.2.3.4 DNS2=10.0.0.254 DNS3=8.8.8.8 * ---end--- */ /* ---ifcfg-rh--- * property: dns-search * variable: DOMAIN * format: string (space-separated domains) * description: List of DNS search domains. * ---end--- */ /* ---keyfile--- * property: addresses * variable: address1, address2, ... * format: address/plen * description: List of static IP addresses. * example: address1=192.168.100.100/24 address2=10.1.1.5/24 * ---end--- * ---ifcfg-rh--- * property: addresses * variable: IPADDR, PREFIX, IPADDR1, PREFIX1, ... * description: List of static IP addresses. * example: IPADDR=10.5.5.23 PREFIX=24 IPADDR1=1.1.1.2 PREFIX1=16 * ---end--- */ /* ---keyfile--- * property: gateway * variable: gateway * format: string * description: Gateway IP addresses as a string. * example: gateway=192.168.100.1 * ---end--- * ---ifcfg-rh--- * property: gateway * variable: GATEWAY * description: Gateway IP address. * example: GATEWAY=10.5.5.1 * ---end--- */ /* ---keyfile--- * property: routes * variable: route1, route2, ... * format: route/plen[,gateway,metric] * description: List of IP routes. * example: route1=8.8.8.0/24,10.1.1.1,77 * route2=7.7.0.0/16 * ---end--- * ---ifcfg-rh--- * property: routes * variable: ADDRESS1, NETMASK1, GATEWAY1, METRIC1, ... * description: List of static routes. They are not stored in ifcfg-* file, * but in route-* file instead. * ---end--- */ /* ---ifcfg-rh--- * property: ignore-auto-routes * variable: PEERROUTES(+) * default: yes * description: PEERROUTES has the opposite meaning as 'ignore-auto-routes' property. * ---end--- */ /* ---ifcfg-rh--- * property: ignore-auto-dns * variable: PEERDNS * default: yes * description: PEERDNS has the opposite meaning as 'ignore-auto-dns' property. * ---end--- */ /* ---ifcfg-rh--- * property: dhcp-send-hostname * variable: DHCP_SEND_HOSTNAME(+) * default: yes * description: Whether DHCP_HOSTNAME should be sent to the DHCP server. * ---end--- */ /* ---ifcfg-rh--- * property: dhcp-hostname * variable: DHCP_HOSTNAME * description: Hostname to send to the DHCP server. When both DHCP_HOSTNAME and * DHCP_FQDN are specified only the latter is used. * ---end--- */ /* ---ifcfg-rh--- * property: never-default * variable: DEFROUTE (GATEWAYDEV in /etc/sysconfig/network) * default: yes * description: DEFROUTE=no tells NetworkManager that this connection * should not be assigned the default route. DEFROUTE has the opposite * meaning as 'never-default' property. * ---end--- */ /* ---ifcfg-rh--- * property: may-fail * variable: IPV4_FAILURE_FATAL(+) * default: no * description: IPV4_FAILURE_FATAL has the opposite meaning as 'may-fail' property. * ---end--- */ /* ---ifcfg-rh--- * property: route-metric * variable: IPV4_ROUTE_METRIC(+) * default: -1 * description: IPV4_ROUTE_METRIC is the default IPv4 metric for routes on this connection. * If set to -1, a default metric based on the device type is used. * ---end--- */ /** * NMSettingIP4Config:dhcp-client-id: * * A string sent to the DHCP server to identify the local machine which the * DHCP server may use to customize the DHCP lease and options. **/ /* ---ifcfg-rh--- * property: dhcp-client-id * variable: DHCP_CLIENT_ID(+) * description: A string sent to the DHCP server to identify the local machine. * example: DHCP_CLIENT_ID=ax-srv-1 * ---end--- */ g_object_class_install_property (object_class, PROP_DHCP_CLIENT_ID, g_param_spec_string (NM_SETTING_IP4_CONFIG_DHCP_CLIENT_ID, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* ---ifcfg-rh--- * property: dad-timeout * variable: ARPING_WAIT * default: missing variable means global default (config override or 3) * description: Timeout (in seconds) for performing DAD before configuring * IPv4 addresses. 0 turns off the DAD completely, -1 means default value. * example: ARPING_WAIT=2 * ---end--- */ /* ---ifcfg-rh--- * property: dhcp-timeout * variable: IPV4_DHCP_TIMEOUT(+) * description: A timeout after which the DHCP transaction fails in case of no response. * example: IPV4_DHCP_TIMEOUT=10 * ---end--- */ /** * NMSettingIP4Config:dhcp-fqdn: * * If the #NMSettingIPConfig:dhcp-send-hostname property is %TRUE, then the * specified FQDN will be sent to the DHCP server when acquiring a lease. This * property and #NMSettingIPConfig:dhcp-hostname are mutually exclusive and * cannot be set at the same time. * * Since: 1.2 */ /* ---ifcfg-rh--- * property: dhcp-fqdn * variable: DHCP_FQDN * description: FQDN to send to the DHCP server. When both DHCP_HOSTNAME and * DHCP_FQDN are specified only the latter is used. * example: DHCP_FQDN=foo.bar.com * ---end--- */ g_object_class_install_property (object_class, PROP_DHCP_FQDN, g_param_spec_string (NM_SETTING_IP4_CONFIG_DHCP_FQDN, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* IP4-specific property overrides */ /* ---dbus--- * property: dns * format: array of uint32 * description: Array of IP addresses of DNS servers (as network-byte-order * integers) * ---end--- */ _nm_setting_class_transform_property (setting_class, NM_SETTING_IP_CONFIG_DNS, G_VARIANT_TYPE ("au"), ip4_dns_to_dbus, ip4_dns_from_dbus); /* ---dbus--- * property: addresses * format: array of array of uint32 * description: Deprecated in favor of the 'address-data' and 'gateway' * properties, but this can be used for backward-compatibility with older * daemons. Note that if you send this property the daemon will ignore * 'address-data' and 'gateway'. * * Array of IPv4 address structures. Each IPv4 address structure is * composed of 3 32-bit values; the first being the IPv4 address (network * byte order), the second the prefix (1 - 32), and last the IPv4 gateway * (network byte order). The gateway may be left as 0 if no gateway exists * for that subnet. * ---end--- */ _nm_setting_class_override_property (setting_class, NM_SETTING_IP_CONFIG_ADDRESSES, G_VARIANT_TYPE ("aau"), ip4_addresses_get, ip4_addresses_set, NULL); _nm_setting_class_add_dbus_only_property (setting_class, "address-labels", G_VARIANT_TYPE_STRING_ARRAY, ip4_address_labels_get, NULL); /* ---dbus--- * property: address-data * format: array of vardict * description: Array of IPv4 addresses. Each address dictionary contains at * least 'address' and 'prefix' entries, containing the IP address as a * string, and the prefix length as a uint32. Additional attributes may * also exist on some addresses. * ---end--- */ _nm_setting_class_add_dbus_only_property (setting_class, "address-data", G_VARIANT_TYPE ("aa{sv}"), ip4_address_data_get, ip4_address_data_set); /* ---dbus--- * property: routes * format: array of array of uint32 * description: Deprecated in favor of the 'route-data' property, but this * can be used for backward-compatibility with older daemons. Note that if * you send this property the daemon will ignore 'route-data'. * * Array of IPv4 route structures. Each IPv4 route structure is composed * of 4 32-bit values; the first being the destination IPv4 network or * address (network byte order), the second the destination network or * address prefix (1 - 32), the third being the next-hop (network byte * order) if any, and the fourth being the route metric. If the metric is * 0, NM will choose an appropriate default metric for the device. (There * is no way to explicitly specify an actual metric of 0 with this * property.) * ---end--- */ _nm_setting_class_override_property (setting_class, NM_SETTING_IP_CONFIG_ROUTES, G_VARIANT_TYPE ("aau"), ip4_routes_get, ip4_routes_set, NULL); /* ---dbus--- * property: route-data * format: array of vardict * description: Array of IPv4 routes. Each route dictionary contains at * least 'dest' and 'prefix' entries, containing the destination IP * address as a string, and the prefix length as a uint32. Most routes * will also have a 'gateway' entry, containing the gateway IP address as * a string. If the route has a 'metric' entry (containing a uint32), that * will be used as the metric for the route (otherwise NM will pick a * default value appropriate to the device). Additional attributes may * also exist on some routes. * ---end--- */ _nm_setting_class_add_dbus_only_property (setting_class, "route-data", G_VARIANT_TYPE ("aa{sv}"), ip4_route_data_get, ip4_route_data_set); }
static void nm_setting_vlan_class_init (NMSettingVlanClass *setting_class) { GObjectClass *object_class = G_OBJECT_CLASS (setting_class); NMSettingClass *parent_class = NM_SETTING_CLASS (setting_class); g_type_class_add_private (setting_class, sizeof (NMSettingVlanPrivate)); /* virtual methods */ object_class->set_property = set_property; object_class->get_property = get_property; object_class->finalize = finalize; parent_class->verify = verify; /* Properties */ /** * NMSettingVlan:parent: * * If given, specifies the parent interface name or parent connection UUID * from which this VLAN interface should be created. If this property is * not specified, the connection must contain an #NMSettingWired setting * with a #NMSettingWired:mac-address property. **/ /* ---ifcfg-rh--- * property: parent * variable: DEVICE or PHYSDEV * description: Parent interface of the VLAN. * ---end--- */ g_object_class_install_property (object_class, PROP_PARENT, g_param_spec_string (NM_SETTING_VLAN_PARENT, "", "", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS)); /** * NMSettingVlan:id: * * The VLAN identifier that the interface created by this connection should * be assigned. The valid range is from 0 to 4094, without the reserved id 4095. **/ /* ---ifcfg-rh--- * property: id * variable: VLAN_ID or DEVICE * description: VLAN identifier. * ---end--- */ g_object_class_install_property (object_class, PROP_ID, g_param_spec_uint (NM_SETTING_VLAN_ID, "", "", 0, 4095, 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS)); /** * NMSettingVlan:flags: * * One or more flags which control the behavior and features of the VLAN * interface. Flags include %NM_VLAN_FLAG_REORDER_HEADERS (reordering of * output packet headers), %NM_VLAN_FLAG_GVRP (use of the GVRP protocol), * and %NM_VLAN_FLAG_LOOSE_BINDING (loose binding of the interface to its * master device's operating state). %NM_VLAN_FLAG_MVRP (use of the MVRP * protocol). * * The default value of this property is NM_VLAN_FLAG_REORDER_HEADERS, * but it used to be 0. To preserve backward compatibility, the default-value * in the D-Bus API continues to be 0 and a missing property on D-Bus * is still considered as 0. **/ /* ---ifcfg-rh--- * property: flags * variable: GVRP, MVRP, VLAN_FLAGS * values: "yes or "no" for GVRP and MVRP; "LOOSE_BINDING" and "NO_REORDER_HDR" for VLAN_FLAGS * description: VLAN flags. * ---end--- */ g_object_class_install_property (object_class, PROP_FLAGS, g_param_spec_flags (NM_SETTING_VLAN_FLAGS, "", "", NM_TYPE_VLAN_FLAGS, NM_VLAN_FLAG_REORDER_HEADERS, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS)); _nm_setting_class_override_property (parent_class, NM_SETTING_VLAN_FLAGS, NULL, _override_flags_get, NULL, _override_flags_not_set); /** * NMSettingVlan:ingress-priority-map: * * For incoming packets, a list of mappings from 802.1p priorities to Linux * SKB priorities. The mapping is given in the format "from:to" where both * "from" and "to" are unsigned integers, ie "7:3". **/ /* ---ifcfg-rh--- * property: ingress-priority-map * variable: VLAN_INGRESS_PRIORITY_MAP * description: Ingress priority mapping. * example: VLAN_INGRESS_PRIORITY_MAP=4:2,3:5 * ---end--- */ g_object_class_install_property (object_class, PROP_INGRESS_PRIORITY_MAP, g_param_spec_boxed (NM_SETTING_VLAN_INGRESS_PRIORITY_MAP, "", "", G_TYPE_STRV, G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS)); /** * NMSettingVlan:egress-priority-map: * * For outgoing packets, a list of mappings from Linux SKB priorities to * 802.1p priorities. The mapping is given in the format "from:to" where * both "from" and "to" are unsigned integers, ie "7:3". **/ /* ---ifcfg-rh--- * property: egress-priority-map * variable: VLAN_EGRESS_PRIORITY_MAP * description: Egress priority mapping. * example: VLAN_EGRESS_PRIORITY_MAP=5:4,4:1,3:7 * ---end--- */ g_object_class_install_property (object_class, PROP_EGRESS_PRIORITY_MAP, g_param_spec_boxed (NM_SETTING_VLAN_EGRESS_PRIORITY_MAP, "", "", G_TYPE_STRV, G_PARAM_READWRITE | NM_SETTING_PARAM_INFERRABLE | G_PARAM_STATIC_STRINGS)); /* ---ifcfg-rh--- * property: interface-name * variable: PHYSDEV and VLAN_ID, or DEVICE * description: VLAN interface name. * If all variables are set, parent device from PHYSDEV takes precedence over DEVICE, * but VLAN id from DEVICE takes precedence over VLAN_ID. * example: PHYSDEV=eth0, VLAN_ID=12; or DEVICE=eth0.12 * ---end--- * ---dbus--- * property: interface-name * format: string * description: Deprecated in favor of connection.interface-name, but can * be used for backward-compatibility with older daemons, to set the * vlan's interface name. * ---end--- */ _nm_setting_class_add_dbus_only_property (parent_class, "interface-name", G_VARIANT_TYPE_STRING, _nm_setting_get_deprecated_virtual_interface_name, NULL); }