18e745fdaSopenharmony_ci-/* 28e745fdaSopenharmony_ci * Copyright (C) 2022-2024 Huawei Device Co., Ltd. 38e745fdaSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 48e745fdaSopenharmony_ci * you may not use this file except in compliance with the License. 58e745fdaSopenharmony_ci * You may obtain a copy of the License at 68e745fdaSopenharmony_ci * 78e745fdaSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 88e745fdaSopenharmony_ci * 98e745fdaSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 108e745fdaSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 118e745fdaSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 128e745fdaSopenharmony_ci * See the License for the specific language governing permissions and 138e745fdaSopenharmony_ci * limitations under the License. 148e745fdaSopenharmony_ci */ 158e745fdaSopenharmony_ci 168e745fdaSopenharmony_ciimport { AsyncCallback, Callback } from "./@ohos.base"; 178e745fdaSopenharmony_ciimport { connection } from "./@ohos.net.connection"; 188e745fdaSopenharmony_ci 198e745fdaSopenharmony_ci/** 208e745fdaSopenharmony_ci * Provides interfaces to manage ethernet. 218e745fdaSopenharmony_ci * @namespace ethernet 228e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 238e745fdaSopenharmony_ci * @since 9 248e745fdaSopenharmony_ci */ 258e745fdaSopenharmony_cideclare namespace ethernet { 268e745fdaSopenharmony_ci type HttpProxy = connection.HttpProxy; 278e745fdaSopenharmony_ci 288e745fdaSopenharmony_ci /** 298e745fdaSopenharmony_ci * Get the specified network interface information. 308e745fdaSopenharmony_ci * @permission ohos.permission.GET_NETWORK_INFO 318e745fdaSopenharmony_ci * @param { string } iface Indicates the network interface name. 328e745fdaSopenharmony_ci * @param { AsyncCallback<InterfaceConfiguration> } callback - the callback of getIfaceConfig. 338e745fdaSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 348e745fdaSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 358e745fdaSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 368e745fdaSopenharmony_ci * @throws { BusinessError } 2200001 - Invalid parameter value. 378e745fdaSopenharmony_ci * @throws { BusinessError } 2200002 - Operation failed. Cannot connect to service. 388e745fdaSopenharmony_ci * @throws { BusinessError } 2200003 - System internal error. 398e745fdaSopenharmony_ci * @throws { BusinessError } 2201005 - Device information does not exist. 408e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 418e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 428e745fdaSopenharmony_ci * @since 9 438e745fdaSopenharmony_ci */ 448e745fdaSopenharmony_ci function getIfaceConfig(iface: string, callback: AsyncCallback<InterfaceConfiguration>): void; 458e745fdaSopenharmony_ci 468e745fdaSopenharmony_ci /** 478e745fdaSopenharmony_ci * Get the specified network interface information. 488e745fdaSopenharmony_ci * @permission ohos.permission.GET_NETWORK_INFO 498e745fdaSopenharmony_ci * @param { string } iface Indicates the network interface name. 508e745fdaSopenharmony_ci * @returns { Promise<InterfaceConfiguration> } the promise returned by the function. 518e745fdaSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 528e745fdaSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 538e745fdaSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 548e745fdaSopenharmony_ci * @throws { BusinessError } 2200001 - Invalid parameter value. 558e745fdaSopenharmony_ci * @throws { BusinessError } 2200002 - Operation failed. Cannot connect to service. 568e745fdaSopenharmony_ci * @throws { BusinessError } 2200003 - System internal error. 578e745fdaSopenharmony_ci * @throws { BusinessError } 2201005 - Device information does not exist. 588e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 598e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 608e745fdaSopenharmony_ci * @since 9 618e745fdaSopenharmony_ci */ 628e745fdaSopenharmony_ci function getIfaceConfig(iface: string): Promise<InterfaceConfiguration>; 638e745fdaSopenharmony_ci 648e745fdaSopenharmony_ci /** 658e745fdaSopenharmony_ci * Set the specified network interface parameters. 668e745fdaSopenharmony_ci * @permission ohos.permission.CONNECTIVITY_INTERNAL 678e745fdaSopenharmony_ci * @param { string } iface Indicates the network interface name of the network parameter. 688e745fdaSopenharmony_ci * @param { InterfaceConfiguration } ic Indicates the ic. See {@link InterfaceConfiguration}. 698e745fdaSopenharmony_ci * @param { AsyncCallback<void> } callback - the callback of setIfaceConfig. 708e745fdaSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 718e745fdaSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 728e745fdaSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 738e745fdaSopenharmony_ci * @throws { BusinessError } 2200001 - Invalid parameter value. 748e745fdaSopenharmony_ci * @throws { BusinessError } 2200002 - Operation failed. Cannot connect to service. 758e745fdaSopenharmony_ci * @throws { BusinessError } 2200003 - System internal error. 768e745fdaSopenharmony_ci * @throws { BusinessError } 2201004 - Invalid Ethernet profile. 778e745fdaSopenharmony_ci * @throws { BusinessError } 2201005 - Device information does not exist. 788e745fdaSopenharmony_ci * @throws { BusinessError } 2201006 - Ethernet device not connected. 798e745fdaSopenharmony_ci * @throws { BusinessError } 2201007 - Ethernet failed to write user configuration information. 808e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 818e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 828e745fdaSopenharmony_ci * @since 9 838e745fdaSopenharmony_ci */ 848e745fdaSopenharmony_ci function setIfaceConfig(iface: string, ic: InterfaceConfiguration, callback: AsyncCallback<void>): void; 858e745fdaSopenharmony_ci 868e745fdaSopenharmony_ci /** 878e745fdaSopenharmony_ci * Set the specified network interface parameters. 888e745fdaSopenharmony_ci * @permission ohos.permission.CONNECTIVITY_INTERNAL 898e745fdaSopenharmony_ci * @param { string } iface Indicates the network interface name of the network parameter. 908e745fdaSopenharmony_ci * @param { InterfaceConfiguration } ic Indicates the ic. See {@link InterfaceConfiguration}. 918e745fdaSopenharmony_ci * @returns { Promise<void> } the promise returned by the function. 928e745fdaSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 938e745fdaSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 948e745fdaSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 958e745fdaSopenharmony_ci * @throws { BusinessError } 2200001 - Invalid parameter value. 968e745fdaSopenharmony_ci * @throws { BusinessError } 2200002 - Operation failed. Cannot connect to service. 978e745fdaSopenharmony_ci * @throws { BusinessError } 2200003 - System internal error. 988e745fdaSopenharmony_ci * @throws { BusinessError } 2201004 - Invalid Ethernet profile. 998e745fdaSopenharmony_ci * @throws { BusinessError } 2201005 - Device information does not exist. 1008e745fdaSopenharmony_ci * @throws { BusinessError } 2201006 - Ethernet device not connected. 1018e745fdaSopenharmony_ci * @throws { BusinessError } 2201007 - Ethernet failed to write user configuration information. 1028e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 1038e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 1048e745fdaSopenharmony_ci * @since 9 1058e745fdaSopenharmony_ci */ 1068e745fdaSopenharmony_ci function setIfaceConfig(iface: string, ic: InterfaceConfiguration): Promise<void>; 1078e745fdaSopenharmony_ci 1088e745fdaSopenharmony_ci /** 1098e745fdaSopenharmony_ci * Check whether the specified network is active. 1108e745fdaSopenharmony_ci * @permission ohos.permission.GET_NETWORK_INFO 1118e745fdaSopenharmony_ci * @param { string } iface Indicates the network interface name. 1128e745fdaSopenharmony_ci * @param { AsyncCallback<number> } callback - the callback of isIfaceActive. 1138e745fdaSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 1148e745fdaSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 1158e745fdaSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 1168e745fdaSopenharmony_ci * @throws { BusinessError } 2200001 - Invalid parameter value. 1178e745fdaSopenharmony_ci * @throws { BusinessError } 2200002 - Operation failed. Cannot connect to service. 1188e745fdaSopenharmony_ci * @throws { BusinessError } 2200003 - System internal error. 1198e745fdaSopenharmony_ci * @throws { BusinessError } 2201005 - Device information does not exist. 1208e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 1218e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 1228e745fdaSopenharmony_ci * @since 9 1238e745fdaSopenharmony_ci */ 1248e745fdaSopenharmony_ci function isIfaceActive(iface: string, callback: AsyncCallback<number>): void; 1258e745fdaSopenharmony_ci 1268e745fdaSopenharmony_ci /** 1278e745fdaSopenharmony_ci * Check whether the specified network is active. 1288e745fdaSopenharmony_ci * @permission ohos.permission.GET_NETWORK_INFO 1298e745fdaSopenharmony_ci * @param { string } iface Indicates the network interface name. 1308e745fdaSopenharmony_ci * @returns { Promise<number> } the promise returned by the function. 1318e745fdaSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 1328e745fdaSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 1338e745fdaSopenharmony_ci * @throws { BusinessError } 401 - Parameter error. 1348e745fdaSopenharmony_ci * @throws { BusinessError } 2200001 - Invalid parameter value. 1358e745fdaSopenharmony_ci * @throws { BusinessError } 2200002 - Operation failed. Cannot connect to service. 1368e745fdaSopenharmony_ci * @throws { BusinessError } 2200003 - System internal error. 1378e745fdaSopenharmony_ci * @throws { BusinessError } 2201005 - Device information does not exist. 1388e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 1398e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 1408e745fdaSopenharmony_ci * @since 9 1418e745fdaSopenharmony_ci */ 1428e745fdaSopenharmony_ci function isIfaceActive(iface: string): Promise<number>; 1438e745fdaSopenharmony_ci 1448e745fdaSopenharmony_ci /** 1458e745fdaSopenharmony_ci * Gets the names of all active network interfaces. 1468e745fdaSopenharmony_ci * @permission ohos.permission.GET_NETWORK_INFO 1478e745fdaSopenharmony_ci * @param { AsyncCallback<Array<string>> } callback - the callback of getAllActiveIfaces. 1488e745fdaSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 1498e745fdaSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 1508e745fdaSopenharmony_ci * @throws { BusinessError } 2200002 - Operation failed. Cannot connect to service. 1518e745fdaSopenharmony_ci * @throws { BusinessError } 2200003 - System internal error. 1528e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 1538e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 1548e745fdaSopenharmony_ci * @since 9 1558e745fdaSopenharmony_ci */ 1568e745fdaSopenharmony_ci function getAllActiveIfaces(callback: AsyncCallback<Array<string>>): void; 1578e745fdaSopenharmony_ci 1588e745fdaSopenharmony_ci /** 1598e745fdaSopenharmony_ci * Gets the names of all active network interfaces. 1608e745fdaSopenharmony_ci * @permission ohos.permission.GET_NETWORK_INFO 1618e745fdaSopenharmony_ci * @returns { Promise<Array<string>> } the promise returned by the function. 1628e745fdaSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 1638e745fdaSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 1648e745fdaSopenharmony_ci * @throws { BusinessError } 2200002 - Operation failed. Cannot connect to service. 1658e745fdaSopenharmony_ci * @throws { BusinessError } 2200003 - System internal error. 1668e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 1678e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 1688e745fdaSopenharmony_ci * @since 9 1698e745fdaSopenharmony_ci */ 1708e745fdaSopenharmony_ci function getAllActiveIfaces(): Promise<Array<string>>; 1718e745fdaSopenharmony_ci 1728e745fdaSopenharmony_ci /** 1738e745fdaSopenharmony_ci * Register a callback for the ethernet interface active state change. 1748e745fdaSopenharmony_ci * @permission ohos.permission.GET_NETWORK_INFO 1758e745fdaSopenharmony_ci * @param { 'interfaceStateChange' } type Indicates Event name. 1768e745fdaSopenharmony_ci * @param { Callback<{ iface: string, active: boolean }> } callback including iface Indicates the ethernet interface, 1778e745fdaSopenharmony_ci * and active Indicates whether the interface is active. 1788e745fdaSopenharmony_ci * @throws { BusinessError } 201 Permission denied. 1798e745fdaSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 1808e745fdaSopenharmony_ci * @throws { BusinessError } 401 Parameter error. 1818e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 1828e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 1838e745fdaSopenharmony_ci * @since 10 1848e745fdaSopenharmony_ci */ 1858e745fdaSopenharmony_ci function on(type: 'interfaceStateChange', callback: Callback<{ iface: string, active: boolean }>): void; 1868e745fdaSopenharmony_ci 1878e745fdaSopenharmony_ci /** 1888e745fdaSopenharmony_ci * Unregister a callback from the ethernet interface active state change. 1898e745fdaSopenharmony_ci * @permission ohos.permission.GET_NETWORK_INFO 1908e745fdaSopenharmony_ci * @param { 'interfaceStateChange' } type Indicates Event name. 1918e745fdaSopenharmony_ci * @param { Callback<{ iface: string, active: boolean }> } callback including iface Indicates the ethernet interface, 1928e745fdaSopenharmony_ci * and active Indicates whether the interface is active. 1938e745fdaSopenharmony_ci * @throws { BusinessError } 201 Permission denied. 1948e745fdaSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 1958e745fdaSopenharmony_ci * @throws { BusinessError } 401 Parameter error. 1968e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 1978e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 1988e745fdaSopenharmony_ci * @since 10 1998e745fdaSopenharmony_ci */ 2008e745fdaSopenharmony_ci function off(type: 'interfaceStateChange', callback?: Callback<{ iface: string, active: boolean }>): void; 2018e745fdaSopenharmony_ci 2028e745fdaSopenharmony_ci /** 2038e745fdaSopenharmony_ci * Get the ethernet mac address list. 2048e745fdaSopenharmony_ci * @permission ohos.permission.GET_ETHERNET_LOCAL_MAC 2058e745fdaSopenharmony_ci * @returns { Promise<Array<MacAddressInfo>> } the promise returned by the function. 2068e745fdaSopenharmony_ci * @throws { BusinessError } 201 - Permission denied. 2078e745fdaSopenharmony_ci * @throws { BusinessError } 202 - Non-system applications use system APIs. 2088e745fdaSopenharmony_ci * @throws { BusinessError } 2200002 - Operation failed. Cannot connect to service. 2098e745fdaSopenharmony_ci * @throws { BusinessError } 2201005 - Device information does not exist. 2108e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 2118e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 2128e745fdaSopenharmony_ci * @since 13 2138e745fdaSopenharmony_ci */ 2148e745fdaSopenharmony_ci function getMacAddress(): Promise<Array<MacAddressInfo>>; 2158e745fdaSopenharmony_ci 2168e745fdaSopenharmony_ci /** 2178e745fdaSopenharmony_ci * Defines the network configuration for the Ethernet connection. 2188e745fdaSopenharmony_ci * @interface InterfaceConfiguration 2198e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 2208e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 2218e745fdaSopenharmony_ci * @since 9 2228e745fdaSopenharmony_ci */ 2238e745fdaSopenharmony_ci export interface InterfaceConfiguration { 2248e745fdaSopenharmony_ci /** 2258e745fdaSopenharmony_ci * @type {IPSetMode} 2268e745fdaSopenharmony_ci * See {@link IPSetMode} 2278e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 2288e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 2298e745fdaSopenharmony_ci * @since 9 2308e745fdaSopenharmony_ci */ 2318e745fdaSopenharmony_ci mode: IPSetMode; 2328e745fdaSopenharmony_ci /** 2338e745fdaSopenharmony_ci * Ethernet connection static configuration IP information. 2348e745fdaSopenharmony_ci * The address value range is 0-255.0-255.0-255.0-255.0-255 2358e745fdaSopenharmony_ci * (DHCP mode does not need to be configured) 2368e745fdaSopenharmony_ci * @type {string} 2378e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 2388e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 2398e745fdaSopenharmony_ci * @since 9 2408e745fdaSopenharmony_ci */ 2418e745fdaSopenharmony_ci ipAddr: string; 2428e745fdaSopenharmony_ci 2438e745fdaSopenharmony_ci /** 2448e745fdaSopenharmony_ci * Ethernet connection static configuration route information. 2458e745fdaSopenharmony_ci * The address value range is 0-255.0-255.0-255.0-255.0-255 2468e745fdaSopenharmony_ci * (DHCP mode does not need to be configured) 2478e745fdaSopenharmony_ci * @type {string} 2488e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 2498e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 2508e745fdaSopenharmony_ci * @since 9 2518e745fdaSopenharmony_ci */ 2528e745fdaSopenharmony_ci route: string; 2538e745fdaSopenharmony_ci 2548e745fdaSopenharmony_ci /** 2558e745fdaSopenharmony_ci * Ethernet connection static configuration gateway information. 2568e745fdaSopenharmony_ci * The address value range is 0-255.0-255.0-255.0-255.0-255 2578e745fdaSopenharmony_ci * (DHCP mode does not need to be configured) 2588e745fdaSopenharmony_ci * @type {string} 2598e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 2608e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 2618e745fdaSopenharmony_ci * @since 9 2628e745fdaSopenharmony_ci */ 2638e745fdaSopenharmony_ci gateway: string; 2648e745fdaSopenharmony_ci 2658e745fdaSopenharmony_ci /** 2668e745fdaSopenharmony_ci * Ethernet connection static configuration netMask information. 2678e745fdaSopenharmony_ci * The address value range is 0-255.0-255.0-255.0-255.0-255 2688e745fdaSopenharmony_ci * (DHCP mode does not need to be configured) 2698e745fdaSopenharmony_ci * @type {string} 2708e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 2718e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 2728e745fdaSopenharmony_ci * @since 9 2738e745fdaSopenharmony_ci */ 2748e745fdaSopenharmony_ci netMask: string; 2758e745fdaSopenharmony_ci 2768e745fdaSopenharmony_ci /** 2778e745fdaSopenharmony_ci * The Ethernet connection is configured with the dns service address. 2788e745fdaSopenharmony_ci * The address value range is 0-255.0-255.0-255.0-255.0-255 2798e745fdaSopenharmony_ci * (DHCP mode does not need to be configured, Multiple addresses are separated by ",") 2808e745fdaSopenharmony_ci * @type {string} 2818e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 2828e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 2838e745fdaSopenharmony_ci * @since 9 2848e745fdaSopenharmony_ci */ 2858e745fdaSopenharmony_ci dnsServers: string; 2868e745fdaSopenharmony_ci 2878e745fdaSopenharmony_ci /** 2888e745fdaSopenharmony_ci * Indicates the HttpProxy settings, Default does not use HttpProxy. 2898e745fdaSopenharmony_ci * @type {?HttpProxy} 2908e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 2918e745fdaSopenharmony_ci * @since 10 2928e745fdaSopenharmony_ci */ 2938e745fdaSopenharmony_ci httpProxy?: HttpProxy; 2948e745fdaSopenharmony_ci } 2958e745fdaSopenharmony_ci 2968e745fdaSopenharmony_ci /** 2978e745fdaSopenharmony_ci * Defines the configuration mode of the Ethernet connection. 2988e745fdaSopenharmony_ci * @enum {number} 2998e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 3008e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 3018e745fdaSopenharmony_ci * @since 9 3028e745fdaSopenharmony_ci */ 3038e745fdaSopenharmony_ci export enum IPSetMode { 3048e745fdaSopenharmony_ci /** 3058e745fdaSopenharmony_ci * Static configuration. 3068e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 3078e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 3088e745fdaSopenharmony_ci * @since 9 3098e745fdaSopenharmony_ci */ 3108e745fdaSopenharmony_ci STATIC = 0, 3118e745fdaSopenharmony_ci 3128e745fdaSopenharmony_ci /** 3138e745fdaSopenharmony_ci * Dynamic configuration. 3148e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 3158e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 3168e745fdaSopenharmony_ci * @since 9 3178e745fdaSopenharmony_ci */ 3188e745fdaSopenharmony_ci DHCP = 1 3198e745fdaSopenharmony_ci } 3208e745fdaSopenharmony_ci 3218e745fdaSopenharmony_ci /** 3228e745fdaSopenharmony_ci * Defines the mac address info of the Ethernet. 3238e745fdaSopenharmony_ci * @interface MacAddressInfo 3248e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 3258e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 3268e745fdaSopenharmony_ci * @since 13 3278e745fdaSopenharmony_ci */ 3288e745fdaSopenharmony_ci export interface MacAddressInfo { 3298e745fdaSopenharmony_ci /** 3308e745fdaSopenharmony_ci * Ethernet interface name. 3318e745fdaSopenharmony_ci * @type {string} 3328e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 3338e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 3348e745fdaSopenharmony_ci * @since 13 3358e745fdaSopenharmony_ci */ 3368e745fdaSopenharmony_ci iface: string; 3378e745fdaSopenharmony_ci /** 3388e745fdaSopenharmony_ci * Ethernet specific mac address. 3398e745fdaSopenharmony_ci * @type {string} 3408e745fdaSopenharmony_ci * @syscap SystemCapability.Communication.NetManager.Ethernet 3418e745fdaSopenharmony_ci * @systemapi Hide this for inner system use. 3428e745fdaSopenharmony_ci * @since 13 3438e745fdaSopenharmony_ci */ 3448e745fdaSopenharmony_ci macAddress: string; 3458e745fdaSopenharmony_ci } 3468e745fdaSopenharmony_ci} 3478e745fdaSopenharmony_ci 3488e745fdaSopenharmony_ciexport default ethernet;