diff --git a/zh-cn/application-dev/reference/apis/js-apis-net-ethernet.md b/zh-cn/application-dev/reference/apis/js-apis-net-ethernet.md
index 2aa48bc6e6289194aa533cc23b4c799c37760b1c..3887294917eed5d0e67743c98ab524bc1ca20fa0 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-net-ethernet.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-net-ethernet.md
@@ -53,8 +53,7 @@ ethernet.setIfaceConfig("eth0", {
route: "192.168.xx.xxx",
gateway: "192.168.xx.xxx",
netMask: "255.255.255.0",
- dnsServers: "1.1.1.1",
- domain: "2.2.2.2"
+ dnsServers: "1.1.1.1"
}, (error) => {
if (error) {
console.log("setIfaceConfig callback error = " + JSON.stringify(error));
@@ -111,8 +110,7 @@ ethernet.setIfaceConfig("eth0", {
route: "192.168.xx.xxx",
gateway: "192.168.xx.xxx",
netMask: "255.255.255.0",
- dnsServers: "1.1.1.1",
- domain: "2.2.2.2"
+ dnsServers: "1.1.1.1"
}).then(() => {
console.log("setIfaceConfig promise ok ");
}).catch(error => {
@@ -163,7 +161,6 @@ ethernet.getIfaceConfig("eth0", (error, value) => {
console.log("getIfaceConfig callback gateway = " + JSON.stringify(value.gateway));
console.log("getIfaceConfig callback netMask = " + JSON.stringify(value.netMask));
console.log("getIfaceConfig callback dnsServers = " + JSON.stringify(value.dnsServers));
- console.log("getIfaceConfig callback domain = " + JSON.stringify(value.domain));
}
});
```
@@ -213,7 +210,6 @@ ethernet.getIfaceConfig("eth0").then((data) => {
console.log("getIfaceConfig promise gateway = " + JSON.stringify(data.gateway));
console.log("getIfaceConfig promise netMask = " + JSON.stringify(data.netMask));
console.log("getIfaceConfig promise dnsServers = " + JSON.stringify(data.dnsServers));
- console.log("getIfaceConfig promise domain = " + JSON.stringify(data.domain));
}).catch(error => {
console.log("getIfaceConfig promise error = " + JSON.stringify(error));
});
@@ -386,74 +382,6 @@ ethernet.getAllActiveIfaces().then((data) => {
});
```
-## ethernet.on('interfaceStateChange')10+
-
-on(type: 'interfaceStateChange', callback: Callback\<{ iface: string, active: boolean }\>): void
-
-注册网卡热插拔事件,使用callback方式作为异步方法。
-
-**系统接口**:此接口为系统接口。
-
-**需要权限**:ohos.permission.GET_NETWORK_INFO
-
-**系统能力**:SystemCapability.Communication.NetManager.Ethernet
-
-**参数:**
-
-| 参数名 | 类型 | 必填 | 说明 |
-| -------- | --------------------------------------- | ---- | ---------- |
-| type | string | 是 | 订阅的事件类型,'interfaceStateChange'。 |
-| callback | AsyncCallback\<{ iface: string, active: boolean }\> | 是 | 回调函数。
iface:网卡名称。
active:是否处于激活状态(true:激活;false:未激活) |
-
-**错误码:**
-
-| 错误码ID | 错误信息 |
-| ------- | -------------------------------------------- |
-| 201 | Permission denied. |
-| 202 | Applicable only to system applications. |
-| 401 | Parameter error. |
-
-**示例:**
-
-```js
-ethernet.on('interfaceStateChange', (data) => {
- console.log('on interfaceSharingStateChange:' + JSON.stringify(data));
-});
-```
-
-## ethernet.off('interfaceStateChange')10+
-
-off(type: 'interfaceStateChange', callback?: Callback\<{ iface: string, active: boolean }\>): void
-
-注销网卡热插拔事件,使用callback方式作为异步方法。
-
-**系统接口**:此接口为系统接口。
-
-**需要权限**:ohos.permission.GET_NETWORK_INFO
-
-**系统能力**:SystemCapability.Communication.NetManager.Ethernet
-
-**参数:**
-
-| 参数名 | 类型 | 必填 | 说明 |
-| -------- | --------------------------------------- | ---- | ---------- |
-| type | string | 是 | 订阅的事件类型,'interfaceStateChange'。 |
-| callback | AsyncCallback\<{ iface: string, active: boolean }> | 否 | 回调函数。
iface:网卡名称。
active:是否处于激活状态(true:激活;false:未激活) |
-
-**错误码:**
-
-| 错误码ID | 错误信息 |
-| ------- | -------------------------------------------- |
-| 201 | Permission denied. |
-| 202 | Applicable only to system applications. |
-| 401 | Parameter error. |
-
-**示例:**
-
-```js
-ethernet.off('interfaceStateChange');
-```
-
## InterfaceConfiguration
以太网连接配置网络信息。