12 Star 12 Fork 381

OpenHarmony / communication_netmanager_base

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

Net Manager

简介

网络管理主要分为网络管理、策略管理、流量管理、网络共享、VPN管理以及以太网连接等模块,其中网络管理、策略管理、流量管理为基础服务,归档在netmanager_base仓,以太网连接、网络共享、VPN管理三个模块为可裁剪扩展模块,归档在netmanager_ext仓,netmanager_ext编译构建依赖netmanager_base库内容。如图1:网络管理架构图;

图 1 网络管理架构图

net_manager_arch

目录

foundation/communication/netmanager_base/
├─figures                     # 架构图
├─frameworks                  # 接口实现
│  ├─js                       # JS接口
│  └─native                   # native接口
├─interfaces                  # 接口定义
│  ├─innerkits                # native接口
│  └─kits                     # JS接口
├─sa_profile                  # sa定义
├─services                    # IPC服务端实现
│  ├─common                   # 公用代码存放目录
│  ├─etc                      # 进程配置文件目录
│  ├─netconnmanager           # 网络管理核心代码目录
│  ├─netmanagernative         # 网络子系统服务端代码
│  ├─netpolicymanager         # 策略管理核心代码目录
│  ├─netstatsmanager          # 流量管理核心代码目录
│  ├─netsys_bpf_stats         # bpfReader为service提供功能接口目录
│  └─netsyscontroller         # netsys客户端代码目录
├─test                        # 测试代码
│  ├─fuzztest                 # FUZZ测试目录
│  ├─netconnmanager           # 网络管理单元测试目录
│  ├─netmanagernative         # 网络子系统服务端单元测试目录
│  ├─netpolicymanager         # 策略管理单元测试目录
│  ├─netstatsmanager          # 流量统计单元测试目录
│  └─netsys_bpf_stats         # bpfReader单元测试目录
└─utils                       # 公共功能
   ├─common_utils             # 共同库目录
   ├─log                      # 日志实现目录
   └─napi_utils               # 公用NAPI代码目录

约束

  • 开发语言:C++ JS

接口说明

类型 接口 功能说明
ohos.net.connection function getDefaultNet(callback: AsyncCallback<NetHandle>): void; 获取一个含有默认网络的netId的NetHandle对象,使用callback回调
ohos.net.connection function getDefaultNet(): Promise<NetHandle>; 获取一个含有默认网络的netId的NetHandle对象,使用Promise回调
ohos.net.connection function getAllNets(callback: AsyncCallback<Array<NetHandle>>): void; 获取所处于连接状态的网络的MetHandle对象列表,使用callback回调
ohos.net.connection function getAllNets(): Promise<Array<NetHandle>>; 获取所有处于连接状态的网络的NetHandle对象列表,使用Promise回调
ohos.net.connection function getConnectionProperties(netHandle: NetHandle, callback: AsyncCallback<ConnectionProperties>): void; 查询默认网络的链路信息,使用callback回调
ohos.net.connection function getConnectionProperties(netHandle: NetHandle): Promise<ConnectionProperties>; 查询默认网络的链路信息,使用Promise回调
ohos.net.connection function getNetCapabilities(netHandle: NetHandle, callback: AsyncCallback<NetCapabilities>): void; 查询默认网络的能力集信息,使用callback回调
ohos.net.connection function getNetCapabilities(netHandle: NetHandle): Promise<NetCapabilities>; 查询默认网络的能力集信息,使用Promise回调
ohos.net.connection function hasDefaultNet(callback: AsyncCallback<boolean>): void; 查询是否有默认网络,使用callback回调
ohos.net.connection function hasDefaultNet(): Promise<boolean>; 查询是否有默认网络,使用Promise回调
ohos.net.connection function getAddressesByName(host: string, callback: AsyncCallback<Array<NetAddress>>): void; 使用对应网络解析域名,获取所有IP,使用callback回调
ohos.net.connection function getAddressesByName(host: string): Promise<Array<NetAddress>>; 使用默认网络解析域名,获取所有IP,使用Promise回调
ohos.net.connection function createNetConnection(netSpecifier?: NetSpecifier, timeout?: number): NetConnection; 返回一个NetConnection对象,netSpecifier指定关注的网络的各项特征,timeout是超时时间(单位是毫秒),netSpecifier是timeout的必要条件,两者都没有则表示关注默认网络
ohos.net.connection function enableAirplaneMode(callback: AsyncCallback<void>): void; 设置网络为飞行模式,使用callback回调
ohos.net.connection function enableAirplaneMode(): Promise<void>; 设置网络为飞行模式,使用Promise回调
ohos.net.connection function disableAirplaneMode(callback: AsyncCallback<void>): void; 关闭网络飞行模式,使用callback回调
ohos.net.connection function disableAirplaneMode(): Promise<void>; 关闭网络飞行模式,使用Promise回调
ohos.net.connection function reportNetConnected(netHandle: NetHandle, callback: AsyncCallback<void>): void; 向网络管理报告网络处于可用状态,调用此接口说明应用程序认为网络的可用性(ohos.net.connection.NetCap.NET_CAPABILITY_VAILDATED)与网络管理不一致。使用callback回调
ohos.net.connection function reportNetConnected(netHandle: NetHandle): Promise<void>; 向网络管理报告网络处于可用状态,调用此接口说明应用程序认为网络的可用性(ohos.net.connection.NetCap.NET_CAPABILITY_VAILDATED)与网络管理不一致。使用Promise回调
ohos.net.connection function reportNetDisconnected(netHandle: NetHandle, callback: AsyncCallback<void>): void; 向网络管理报告网络处于不可用状态,调用此接口说明应用程序认为网络的可用性(ohos.net.connection.NetCap.NET_CAPABILITY_VAILDATED)与网络管理不一致。使用callback回调
ohos.net.connection function reportNetDisconnected(netHandle: NetHandle): Promise<void>; 向网络管理报告网络处于不可用状态,调用此接口说明应用程序认为网络的可用性(ohos.net.connection.NetCap.NET_CAPABILITY_VAILDATED)与网络管理不一致。使用Promise回调
ohos.net.connection.NetHandle bindSocket(socketParam: TCPSocket | UDPSocket, callback: AsyncCallback<void>): void; 将TCPSocket或UDPSockett绑定到当前网络,使用callback回调
ohos.net.connection.NetHandle bindSocket(socketParam: TCPSocket | UDPSocket): Promise<void>; 将TCPSocket或UDPSockett绑定到当前网络,使用Promise回调
ohos.net.connection.NetHandle getAddressesByName(host: string, callback: AsyncCallback<Array<NetAddress>>): void; 使用默认网络解析域名,获取所有IP,使用callback回调
ohos.net.connection.NetHandle getAddressesByName(host: string): Promise<Array<NetAddress>>; 使用对应网络解析域名,获取所有IP,使用Promise回调
ohos.net.connection.NetHandle getAddressByName(host: string, callback: AsyncCallback<NetAddress>): void; 使用对应网络解析域名,获取一个IP,调用callbac
ohos.net.connection.NetHandle getAddressByName(host: string): Promise<NetAddress>; 使用对应网络解析域名,获取一个IP,使用Promise回调
ohos.net.connection.NetConnection on(type: 'netAvailable', callback: Callback<NetHandle>): void; 监听收到网络可用的事件
ohos.net.connection.NetConnection on(type: 'netCapabilitiesChange', callback: Callback<{ netHandle: NetHandle, netCap: NetCapabilities }>): void; 监听网络能力变化的事件
ohos.net.connection.NetConnection on(type: 'netConnectionPropertiesChange', callback: Callback<{ netHandle: NetHandle, connectionProperties: ConnectionProperties }>): void; 监听网络连接信息变化的事件
ohos.net.connection.NetConnection on(type: 'netLost', callback: Callback<NetHandle>): void; 监听网络丢失的事件
ohos.net.connection.NetConnection on(type: 'netUnavailable', callback: Callback<void>): void; 监听网络不可用的事件
ohos.net.connection.NetConnection register(callback: AsyncCallback<void>): void; 注册默认网络或者createNetConnection中指定的网络的监听
ohos.net.connection.NetConnection unregister(callback: AsyncCallback<void>): void; 注销默认网络或者createNetConnection中指定的网络的监听
@ohos.net.policy function setBackgroundPolicy(allow: boolean, callback: AsyncCallback<void>): void; 设置后台网络策略,callback为回调函数
@ohos.net.policy function setBackgroundPolicy(allow: boolean): Promise<void>; 设置后台网络策略
@ohos.net.policy function getBackgroundPolicy(callback: AsyncCallback<NetBackgroundPolicy>): void; 获取后台网络限制策略,callback为回调函数
@ohos.net.policy function getBackgroundPolicy(): Promise<NetBackgroundPolicy>; 获取后台网络限制策略
@ohos.net.policy function setPolicyByUid(uid: number, policy: NetUidPolicy, callback: AsyncCallback<void>): void; 设置对应uid应用的访问计量网络的策略,callback为回调函数
@ohos.net.policy function setPolicyByUid(uid: number, policy: NetUidPolicy): Promise<void>; 设置对应uid应用的访问计量网络的策略
@ohos.net.policy function getPolicyByUid(uid: number, callback: AsyncCallback<NetUidPolicy>): void; 通过应用uid获取策略,callback为回调函数
@ohos.net.policy function getPolicyByUid(uid: number): Promise<NetUidPolicy>; 通过应用uid获取策略
@ohos.net.policy function getUidsByPolicy(policy: NetUidPolicy, callback: AsyncCallback<Array<number>>): void; 通过策略获取设置这一策略的应用uid数组,callback为回调函数
@ohos.net.policy function getUidsByPolicy(policy: NetUidPolicy): Promise<Array<number>>; 通过策略获取设置这一策略的应用uid数组
@ohos.net.policy function getNetQuotaPolicies(callback: AsyncCallback<Array<NetQuotaPolicy>>): void; 获取计量网络策略,callback为回调函数
@ohos.net.policy function getNetQuotaPolicies(): Promise<Array<NetQuotaPolicy>>; 获取计量网络策略
@ohos.net.policy function setNetQuotaPolicies(quotaPolicies: Array<NetQuotaPolicy>, callback: AsyncCallback<void>): void; 设置计量网络策略,callback为回调函数
@ohos.net.policy function setNetQuotaPolicies(quotaPolicies: Array<NetQuotaPolicy>): Promise<void>; 设置计量网络策略
@ohos.net.policy function restoreAllPolicies(simId: string, callback: AsyncCallback<void>): void; 重置对应sim卡id的蜂窝网络、后台网络策略、防火墙策略、应用对应的策略,callback为回调函数
@ohos.net.policy function restoreAllPolicies(simId: string): Promise<void>; 重置对应sim卡id的蜂窝网络、后台网络策略、防火墙策略、应用对应的策略
@ohos.net.policy function isUidNetAllowedIsMetered(uid: number, isMetered: boolean, callback: AsyncCallback<boolean>): void; 获取对应uid能否访问计量或非计量网络,callback为回调函数
@ohos.net.policy function isUidNetAllowedIsMetered(uid: number, isMetered: boolean): Promise<boolean>; 获取对应uid能否访问计量或非计量网络
@ohos.net.policy function isUidNetAllowedIface(uid: number, iface: string, callback: AsyncCallback<boolean>): void; 获取对应uid能否访问指定的iface的网络,callback为回调函数
@ohos.net.policy function isUidNetAllowedIface(uid: number, iface: string): Promise<boolean>; 获取对应uid能否访问指定的iface的网络
@ohos.net.policy function setDeviceIdleAllowlist(uid: number, isAllow: boolean, callback: AsyncCallback<void>): void 设置指定uid能应用是否在休眠防火墙的白名单,callback为回调函数
@ohos.net.policy function setDeviceIdleAllowlist(uid: number, isAllow: boolean): Promise<void>; 设置指定uid能应用是否在休眠防火墙的白名单
@ohos.net.policy function getDeviceIdleAllowlist(callback: AsyncCallback<Array<number>>): void 获取休眠模式白名单所包含的uid数组,callback为回调函数
@ohos.net.policy function getDeviceIdleAllowlist(): Promise<Array<number>>; 获取休眠模式白名单所包含的uid数组
@ohos.net.policy function getBackgroundPolicyByUid(uid: number, callback: AsyncCallback<NetBackgroundPolicy>): void 获取指定uid能否访问后台网络,callback为回调函数
@ohos.net.policy function getBackgroundPolicyByUid(uid: number): Promise<NetBackgroundPolicy>; 获取指定uid能否访问后台网络
@ohos.net.policy function resetPolicies(simId: string, callback: AsyncCallback<void>): void; 重置对应sim卡id的蜂窝网络、后台网络策略、防火墙策略、应用对应的策略,callback为回调函数
@ohos.net.policy function resetPolicies(simId: string): Promise<void>; 重置对应sim卡id的蜂窝网络、后台网络策略、防火墙策略、应用对应的策略
@ohos.net.policy function updateRemindPolicy(netType: NetBearType, simId: string, remindType: RemindType, callback: AsyncCallback<void>): void 更新提醒策略,netType为网络类型,simId为SIM卡id, remindType为提醒类型。callback为回调函数
@ohos.net.policy function updateRemindPolicy(netType: NetBearType, simId: string, remindType: RemindType): Promise<void>; 更新提醒策略,netType为网络类型,simId为SIM卡id, remindType为提醒类型
@ohos.net.policy function on(type: 'netUidPolicyChange', callback: Callback<{ uid: number, policy: NetUidPolicy }>): void; 注册policy发生改变时的回调
@ohos.net.policy function off(type: 'netUidPolicyChange', callback: Callback<void>): void; 反注册policy发生改变时的回调
@ohos.net.policy function on(type: "netUidRuleChange", callback: Callback<{ uid: number, rule: NetUidRule }>): void; 注册rule发生改变时的回调
@ohos.net.policy function off(type: "netUidRuleChange", callback: Callback<void>): void; 反注册rule发生改变时的回调
@ohos.net.policy function on(type: "netMeteredIfacesChange", callback: Callback<Array<string>>): void; 注册计量iface发生改变时的回调
@ohos.net.policy function off(type: "netMeteredIfacesChange", callback: Callback<void>): void; 反注册计量iface发生改变时的回调
@ohos.net.policy function on(type: "netQuotaPolicyChange", callback: Callback<Array<NetQuotaPolicy>>): void; 注册计量网络策略发生改变时的回调
@ohos.net.policy function off(type: "netQuotaPolicyChange", callback: Callback<void>): void; 反注册计量网络策略发生改变时的回调
@ohos.net.policy function on(type: "netBackgroundPolicyChange", callback: Callback<boolean>): void; 注册后台网络策略发生改变时的回调
@ohos.net.policy function off(type: "netBackgroundPolicyChange", callback: Callback<void>): void; 反注册后台网络策略发生改变时的回调
ohos.net.statistics function getIfaceRxBytes(nic: string, callback: AsyncCallback<number>): void; 查询指定网卡的下行流量数据,使用callback回调
ohos.net.statistics function getIfaceRxBytes(nic: string): Promise<number>; 获取指定网卡的下行流量数据,使用Promise回调
ohos.net.statistics function getIfaceTxBytes(nic: string, callback: AsyncCallback<number>): void; 查询指定网卡的上行流量数据,使用callback回调
ohos.net.statistics function getIfaceRxBytes(nic: string): Promise<number>; 获取指定网卡的上行流量数据,使用Promise回调
ohos.net.statistics function getCellularRxBytes(callback: AsyncCallback<number>): void; 查询指蜂窝网的下行流量数据,使用callback回调
ohos.net.statistics function getCellularRxBytes(): Promise<number>; 查询指蜂窝网的下行流量数据,使用Promise回调
ohos.net.statistics function getCellularTxBytes(callback: AsyncCallback<number>): void; 查询蜂窝网的上行流量数据,使用callback回调
ohos.net.statistics function getCellularTxBytes(): Promise<number>; 查询蜂窝网的上行流量数据,使用Promise回调
ohos.net.statistics function getAllRxBytes(callback: AsyncCallback<number>): void; 查询所有网卡的下行流量数据,使用callback回调
ohos.net.statistics function getAllRxBytes(): Promise<number>; 查询所有网卡的下行流量数据,使用Promise回调
ohos.net.statistics function getAllTxBytes(callback: AsyncCallback<number>): void; 查询所有网卡的上行流量数据,使用callback回调
ohos.net.statistics function getAllTxBytes(): Promise<number>; 查询所有网卡的上行流量数据,使用Promise回调
ohos.net.statistics function getUidRxBytes(uid: number, callback: AsyncCallback<number>): void; 查询指定应用的下行流量数据,使用callback回调
ohos.net.statistics function getUidRxBytes(uid: number): Promise<number>; 查询指定应用的下行流量数据,使用Promise回调
ohos.net.statistics function getUidTxBytes(uid: number, callback: AsyncCallback<number>): void; 查询指定应用的上行流量数据,使用callback回调
ohos.net.statistics function getUidTxBytes(uid: number): Promise<number>; 查询指定应用的上行流量数据,使用Promise回调

完整的JS API说明以及实例代码请参考:网络管理

接口使用说明

注册默认网络或者createNetConnection中指定的网络的监听

  • 示例
    import connection from '@ohos.net.connection'
    let connection = connection.createNetConnection()
    connection.on('netAvailable', function(data) {
      console.log(JSON.stringify(data))
    })
    connection.register(function (error) {
      if (error) {
        console.log(JSON.stringify(error))
      }
    })

获取所有注册的网络

  • 示例
    import connection from '@ohos.net.connection'
    connection.getAllNets((err, data) => {
        this.callBack(err, data);
        if (data) {
            this.netList = data;
        }
    })

查询默认网络的链路信息

  • 示例
    import connection from '@ohos.net.connection'
    connection.getConnectionProperties(this.netHandle, (err, data) => {
        this.callBack(err, data);
    })

使用对应网络解析域名,获取所有IP

  • 示例
    import connection from '@ohos.net.connection'
    connection.getAddressesByName(this.host, (err, data) => {
        this.callBack(err, data);
    })

设置后台网络策略

  • 示例

    import policy from '@ohos.net.policy'
    policy.setBackgroundPolicy(Boolean(Number.parseInt(this.isBoolean)), (err, data) => {
        this.callBack(err, data);
    })

获取后台网络限制策略

  • 示例

    import policy from '@ohos.net.policy'
    policy.getBackgroundPolicy((err, data) => {
        this.callBack(err, data);
    })

设置对应uid应用的访问计量网络的策略

  • 示例

    import policy from '@ohos.net.policy'
    policy.setPolicyByUid(Number.parseInt(this.firstParam), Number.parseInt(this.currentNetUidPolicy), (err, data) => {
        this.callBack(err, data);
    })

设置指定uid能应用是否在休眠防火墙的白名单

  • 示例

    import policy from '@ohos.net.policy'
    policy.setDeviceIdleAllowList(Number.parseInt(this.firstParam), Boolean(Number.parseInt(this.isBoolean)), (err, data) => {
        this.callBack(err, data);
    })
    

查询指定网卡的下行流量数据,以Promise的方式异步返回执行结果。

  • 示例
    import statistics from '@ohos.net.statistics'
    statistics.getIfaceRxBytes("wlan0").then(function (addresses) {
      console.log(JSON.stringify(addresses))
    })

查询指定网卡的上行流量数据,以Promise的方式异步返回执行结果。。

  • 示例
    import statistics from '@ohos.net.statistics'
    statistics.getIfaceTxBytes("wlan0").then(function (addresses) {
      console.log(JSON.stringify(addresses))
    })

相关仓

网络管理子系统

communication_netmanager_base

communication_netmanager_ext

communication_netstack

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS

简介

暂无描述 展开 收起
C++ 等 3 种语言
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/openharmony/communication_netmanager_base.git
git@gitee.com:openharmony/communication_netmanager_base.git
openharmony
communication_netmanager_base
communication_netmanager_base
master

搜索帮助