harmony 鸿蒙net_connection_type.h

2025-06-12 浏览 (1)

net_connection_type.h

Overview

Declares the structs for the C APIs of the network connection module.

Library: libnet_connection.so

System capability: SystemCapability.Communication.NetManager.Core

Since: 11

Related module: NetConnection

Summary

Structs

NameDescription
NetConn_NetHandleNetwork ID.
NetConn_NetCapabilitiesNetwork capability set.
NetConn_NetAddrNetwork address.
NetConn_RouteRoute configuration:
NetConn_HttpProxyProxy configuration information.
NetConn_ConnectionPropertiesNetwork connection information.
NetConn_NetHandleListNetwork list.
NetConn_NetConnCallbackNetwork status callback.
NetConn_NetSpecifierNetwork specifier, including a network capability set and a network ID.

Macros

NameDescription
NETCONN_MAX_NET_SIZE32
NETCONN_MAX_BEARER_TYPE_SIZE32
NETCONN_MAX_CAP_SIZE32
NETCONN_MAX_ADDR_SIZE32
NETCONN_MAX_ROUTE_SIZE64
NETCONN_MAX_EXCLUSION_SIZE256
NETCONN_MAX_STR_LEN256

Types

NameDescription
NetConn_NetCapNetwork capability set.
NetConn_NetBearerTypeNetwork carrier type.
NetConn_NetHandleNetwork ID.
NetConn_NetCapabilitiesNetwork capability set.
NetConn_NetAddrNetwork address.
NetConn_RouteRoute configuration:
NetConn_HttpProxyProxy configuration information.
NetConn_ConnectionPropertiesNetwork connection information.
NetConn_NetHandleListNetwork list.
(*OH_NetConn_CustomDnsResolver) (const char *host, const char *serv, const struct addrinfo *hint, struct addrinfo **res)Pointer to the custom DNS resolver.
NetConn_ErrorCodeNetwork connection error code.

Enums

NameDescription
NetConn_NetCap {
NETCONN_NET_CAPABILITY_MMS = 0,
NETCONN_NET_CAPABILITY_NOT_METERED = 11,
NETCONN_NET_CAPABILITY_INTERNET = 12,
NETCONN_NET_CAPABILITY_NOT_VPN = 15,
NETCONN_NET_CAPABILITY_VALIDATED = 16
}
Network capability set.
NetConn_NetBearerType {
NETCONN_BEARER_CELLULAR = 0,
NETCONN_BEARER_WIFI = 1,
NETCONN_BEARER_ETHERNET = 3
NETCONN_BEARER_VPN = 4
}
Network carrier type.
NetConn_ErrorCode {
NETCONN_SUCCESS = 0,
NETCONN_PERMISSION_DENIED = 201,
NETCONN_PARAMETER_ERROR = 401,
NETCONN_OPERATION_FAILED = 2100002,
NETCONN_INTERNAL_ERROR = 2100003
}
Network connection error code.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Network Kit

harmony 鸿蒙NetConn_ConnectionProperties

harmony 鸿蒙NetConn_HttpProxy

harmony 鸿蒙NetConn_NetAddr

harmony 鸿蒙NetConn_NetCapabilities

harmony 鸿蒙NetConn_NetConnCallback

harmony 鸿蒙NetConn_NetHandle

harmony 鸿蒙NetConn_NetHandleList

harmony 鸿蒙NetConn_NetSpecifier

harmony 鸿蒙NetConn_Route

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/wxkZdx