Home
last modified time | relevance | path

Searched refs:macAddr (Results 1 – 25 of 125) sorted by relevance

12345

/ohos5.0/foundation/communication/dhcp/services/dhcp_server/src/
H A Ddhcp_address_pool.cpp40 std::size_t macAddrHash(uint8_t macAddr[DHCP_HWADDR_LENGTH]) in macAddrHash()
52 std::size_t hash = macAddrHash(macAddr); in GetBindingByMac()
62 return GetBindingByMac(macAddr); in QueryBinding()
80 g_bindingRecoders[macAddrHash(macAddr)] = newBind; in AddNewBinding()
82 return GetBindingByMac(macAddr); in AddNewBinding()
91 if (IsReserved(macAddr)) { in CheckIpAvailability()
134 if (!pool->netmask || IsEmptyHWAddr(macAddr)) { in CheckRangeAvailability()
185 if (!pool->netmask || IsEmptyHWAddr(macAddr)) { in AddressDistribute()
289 int IsReserved(uint8_t macAddr[DHCP_HWADDR_LENGTH]) in IsReserved()
357 int RemoveBinding(uint8_t macAddr[DHCP_HWADDR_LENGTH]) in RemoveBinding()
[all …]
H A Daddress_utils.cpp207 char *ParseStrMac(const uint8_t *macAddr, size_t addrSize) in ParseStrMac() argument
210 if (!macAddr || addrSize < MAC_ADDR_LENGTH) { in ParseStrMac()
215macAddr[MAI_ONE], macAddr[MAI_TWO], macAddr[MAI_THREE], macAddr[MAI_FOUR], macAddr[MAI_FIVE]) < 0)… in ParseStrMac()
257 macAddr[i / macSpaceNum] = tmp; in ParseMacAddress()
262 macAddr[MAC_STRING_SIZE / macSpaceNum] = tmp; in ParseMacAddress()
276 char *ParseLogMac(uint8_t macAddr[DHCP_HWADDR_LENGTH]) in ParseLogMac()
279 if (!macAddr) { in ParseLogMac()
283 …_s(strLogMacAddr, MAD_ADDR_BUF_SIZE, "??:%02x:??:??:%02x:%02x", macAddr[NUM_ONE], macAddr[MAI_FOUR… in ParseLogMac()
284 macAddr[MAI_FIVE]) < 0) { in ParseLogMac()
290 int IsEmptyHWAddr(const uint8_t macAddr[DHCP_HWADDR_LENGTH]) in IsEmptyHWAddr()
[all …]
/ohos5.0/foundation/communication/dhcp/services/dhcp_server/include/
H A Ddhcp_address_pool.h29 typedef AddressBinding *(*QueryBind)(uint8_t macAddr[DHCP_HWADDR_LENGTH], PDhcpOptionList cliOptins…
30 typedef AddressBinding *(*AddBind)(uint8_t macAddr[DHCP_HWADDR_LENGTH], PDhcpOptionList cliOptins);
31 typedef uint32_t (*Distribute)(DhcpAddressPool *pool, uint8_t macAddr[DHCP_HWADDR_LENGTH]);
59 int IsReserved(uint8_t macAddr[DHCP_HWADDR_LENGTH]);
62 int AddReservedBinding(uint8_t macAddr[DHCP_HWADDR_LENGTH]);
63 int RemoveReservedBinding(uint8_t macAddr[DHCP_HWADDR_LENGTH]);
64 int RemoveBinding(uint8_t macAddr[DHCP_HWADDR_LENGTH]);
65 int ReleaseBinding(uint8_t macAddr[DHCP_HWADDR_LENGTH]);
72 AddressBinding *QueryBinding(uint8_t macAddr[DHCP_HWADDR_LENGTH], PDhcpOptionList cliOptins);
H A Daddress_utils.h44 int IsEmptyHWAddr(const uint8_t macAddr[DHCP_HWADDR_LENGTH]);
45 char *ParseStrMac(const uint8_t *macAddr, size_t addrSize);
46 int ParseMacAddress(const char *strMac, uint8_t macAddr[DHCP_HWADDR_LENGTH]);
50 char *ParseLogMac(uint8_t macAddr[DHCP_HWADDR_LENGTH]);
/ohos5.0/foundation/communication/wifi/wifi/test/wifi_standard/wifi_framework/wifi_manage/wifi_sta/
H A Dmulti_gateway_test.cpp53 std::string macAddr = ""; variable
54 …EXPECT_TRUE(DelayedSingleton<MultiGateway>::GetInstance()->SetStaticArp(iface, ipAddr, macAddr) ==…
56 …EXPECT_TRUE(DelayedSingleton<MultiGateway>::GetInstance()->SetStaticArp(iface, ipAddr, macAddr) ==…
58 …EXPECT_TRUE(DelayedSingleton<MultiGateway>::GetInstance()->SetStaticArp(iface, ipAddr, macAddr) ==…
59 macAddr = "00:00:11:11:11:11";
60 DelayedSingleton<MultiGateway>::GetInstance()->SetStaticArp(iface, ipAddr, macAddr);
84 const char *macAddr = nullptr; variable
85 EXPECT_TRUE(DelayedSingleton<MultiGateway>::GetInstance()->GetMacAddr(buff, macAddr) == -1);
87 EXPECT_TRUE(DelayedSingleton<MultiGateway>::GetInstance()->GetMacAddr(buff1, macAddr) == -1);
/ohos5.0/foundation/communication/wifi/wifi/relation_services/wifi_hal_service/wifi_hal_module/wpa_supplicant_hal/
H A Dwifi_wpa_hal.c144 char macAddr[WIFI_MAC_LENGTH + 1] = {0}; in DealP2pGoNegRequest() local
145 if (strncpy_s(macAddr, sizeof(macAddr), buf, WIFI_MAC_LENGTH) != EOK) { in DealP2pGoNegRequest()
299 char macAddr[WIFI_MAC_LENGTH + 1] = {0}; in DealDeviceLostEvent() local
300 if (strncpy_s(macAddr, sizeof(macAddr), peeraddr, WIFI_MAC_LENGTH) != EOK) { in DealDeviceLostEvent()
303 P2pHalCbDeviceLost(macAddr); in DealDeviceLostEvent()
354 if (strncpy_s(macAddr, sizeof(macAddr), bssidpos + 1, WIFI_MAC_LENGTH) != EOK) { in DealInvitationResultEvent()
387 if (strncpy_s(macAddr, sizeof(macAddr), bssidPos, WIFI_MAC_LENGTH) != EOK) { in DealP2pConnectFailed()
444 if (strncpy_s(macAddr, sizeof(macAddr), pos, WIFI_MAC_LENGTH) != EOK) { in DealProvDiscPbcReqEvent()
458 if (strncpy_s(macAddr, sizeof(macAddr), pos, WIFI_MAC_LENGTH) != EOK) { in DealProDiscPbcRespEvent()
472 if (strncpy_s(macAddr, sizeof(macAddr), pos, WIFI_MAC_LENGTH) != EOK) { in DealProDiscEnterPinEvent()
[all …]
/ohos5.0/foundation/communication/netmanager_base/test/netmanagernative/unittest/netsys_manager_test/
H A Dinterface_manager_test.cpp249 std::string macAddr = "aa:bb:cc:dd:ee:ff"; variable
252 auto ret = InterfaceManager::AssembleArp(ipAddr, macAddr, ifName, req);
259 std::string macAddr = "aa:bb:cc:dd:ee:ff"; variable
261 auto ret = InterfaceManager::AddStaticArp(ipAddr, macAddr, ifName);
265 macAddr = "aa:bb:cc:dd:00:ff";
267 ret = InterfaceManager::AddStaticArp(ipAddr, macAddr, ifName);
274 std::string macAddr = "aa:bb:cc:dd:ee:ff"; variable
276 auto ret = InterfaceManager::DelStaticArp(ipAddr, macAddr, ifName);
280 macAddr = "aa:bb:cc:dd:00:ff";
282 ret = InterfaceManager::DelStaticArp(ipAddr, macAddr, ifName);
H A Dnet_manager_native_test.cpp176 std::string macAddr = "aa:bb:cc:dd:ee:ff"; variable
178 auto ret = instance_->AddStaticArp(ipAddr, macAddr, ifName);
185 std::string macAddr = "aa:bb:cc:dd:ee:ff"; variable
187 auto ret = instance_->DelStaticArp(ipAddr, macAddr, ifName);
/ohos5.0/foundation/communication/wifi/wifi/services/wifi_standard/wifi_framework/wifi_manage/wifi_self_cure/
H A Dmulti_gateway.cpp94 …eway::SetStaticArp(const std::string& iface, const std::string& ipAddr, const std::string& macAddr) in SetStaticArp() argument
100 if (iface.empty() || ipAddr.empty() || macAddr.empty()) { in SetStaticArp()
118 if (GetMacAddr(reinterpret_cast<char *>(req.arp_ha.sa_data), macAddr.c_str()) < 0) { in SetStaticArp()
169 int32_t MultiGateway::GetMacAddr(char *buff, const char *macAddr) in GetMacAddr() argument
172 if (buff == nullptr || macAddr == nullptr) { in GetMacAddr()
177 …if (sscanf_s(macAddr, "%x:%x:%x:%x:%x:%x", &addr[MAC_INDEX_0], &addr[MAC_INDEX_1], &addr[MAC_INDEX… in GetMacAddr()
H A Dmulti_gateway.h31 …32_t SetStaticArp(const std::string& iface, const std::string& ipAddr, const std::string& macAddr);
35 int32_t GetMacAddr(char *buff, const char *macAddr);
/ohos5.0/foundation/communication/netmanager_base/services/netmanagernative/include/manager/
H A Dinterface_manager.h121 static int32_t AddStaticArp(const std::string &ipAddr, const std::string &macAddr,
123 static int32_t DelStaticArp(const std::string &ipAddr, const std::string &macAddr,
128 static int32_t AssembleArp(const std::string &ipAddr, const std::string &macAddr,
130 static int32_t MacStringToArray(const std::string &macAddr, sockaddr &macSock);
/ohos5.0/foundation/communication/dhcp/test/fuzztest/dhcpaddresspool_fuzzer/
H A Ddhcpaddresspool_fuzzer.cpp57 uint8_t macAddr[DHCP_HWADDR_LENGTH]; in DhcpAddressPoolFuzzTest() local
61 AddReservedBinding(&macAddr[0]); in DhcpAddressPoolFuzzTest()
62 RemoveReservedBinding(&macAddr[0]); in DhcpAddressPoolFuzzTest()
63 RemoveBinding(&macAddr[0]); in DhcpAddressPoolFuzzTest()
71 QueryBinding(macAddr, &options); in DhcpAddressPoolFuzzTest()
/ohos5.0/foundation/communication/dsoftbus/tests/core/connection/wifi_direct_cpp/
H A Dnet_conn_client.cpp18 const std::string &ipAddr, const std::string &macAddr, const std::string &ifName) in AddStaticArp() argument
24 return mock->AddStaticArp(ipAddr, macAddr, ifName); in AddStaticArp()
28 const std::string &ipAddr, const std::string &macAddr, const std::string &ifName) in DelStaticArp() argument
34 return mock->DelStaticArp(ipAddr, macAddr, ifName); in DelStaticArp()
H A Dnet_conn_client.h59 …virtual int32_t AddStaticArp(const std::string &ipAddr, const std::string &macAddr, const std::str…
60 …virtual int32_t DelStaticArp(const std::string &ipAddr, const std::string &macAddr, const std::str…
74 …AddStaticArp, int32_t(const std::string &ipAddr, const std::string &macAddr, const std::string &if…
78 …DelStaticArp, int32_t(const std::string &ipAddr, const std::string &macAddr, const std::string &if…
/ohos5.0/foundation/communication/dhcp/services/utils/src/
H A Ddhcp_common_utils.cpp190 static int32_t GetMacAddr(char *buff, const char *macAddr) in GetMacAddr() argument
193 if (buff == nullptr || macAddr == nullptr) { in GetMacAddr()
198 …if (sscanf_s(macAddr, "%x:%x:%x:%x:%x:%x", &addr[MAC_INDEX_0], &addr[MAC_INDEX_1], &addr[MAC_INDEX… in GetMacAddr()
210 int32_t AddArpEntry(const std::string& iface, const std::string& ipAddr, const std::string& macAddr) in AddArpEntry() argument
216 if (iface.empty() || ipAddr.empty() || macAddr.empty()) { in AddArpEntry()
234 if (GetMacAddr(reinterpret_cast<char *>(req.arp_ha.sa_data), macAddr.c_str()) < 0) { in AddArpEntry()
/ohos5.0/foundation/communication/netmanager_base/services/netmanagernative/src/manager/
H A Dinterface_manager.cpp428 int32_t InterfaceManager::AddStaticArp(const std::string &ipAddr, const std::string &macAddr, in AddStaticArp() argument
432 int32_t res = AssembleArp(ipAddr, macAddr, ifName, req); in AddStaticArp()
448 int32_t InterfaceManager::DelStaticArp(const std::string &ipAddr, const std::string &macAddr, in DelStaticArp() argument
452 int32_t res = AssembleArp(ipAddr, macAddr, ifName, req); in DelStaticArp()
468 int32_t InterfaceManager::AssembleArp(const std::string &ipAddr, const std::string &macAddr, in AssembleArp() argument
476 if (!regex_match(macAddr, REGEX_CMD_MAC_ADDRESS)) { in AssembleArp()
483 if (MacStringToArray(macAddr, ethAddrStruct) != 0) { in AssembleArp()
508 int32_t InterfaceManager::MacStringToArray(const std::string &macAddr, sockaddr &macSock) in MacStringToArray() argument
513 if (memcpy_s(strAddr, MAC_ADDRESS_STR_LEN, macAddr.c_str(), macAddr.size()) != 0) { in MacStringToArray()
/ohos5.0/foundation/communication/dhcp/test/fuzztest/addressutils_fuzzer/
H A Daddressutils_fuzzer.cpp157 uint8_t* macAddr = nullptr; in ParseStrMacTest() local
159 ParseStrMac(macAddr, addrSize); in ParseStrMacTest()
165 uint8_t macAddr[DHCP_HWADDR_LENGTH]; in ParseMacAddressTest() local
169 (void)ParseMacAddress(&strMac, &macAddr[0]); in ParseMacAddressTest()
198 uint8_t macAddr[DHCP_HWADDR_LENGTH]; in ParseLogMacTest() local
199 ParseLogMac(&macAddr[0]); in ParseLogMacTest()
/ohos5.0/drivers/hdf_core/framework/model/network/wifi/platform/src/
H A Dhdf_wifi_event.c24 int32_t HdfWifiEventNewSta(const struct NetDevice *netDev, const uint8_t *macAddr, uint8_t addrLen, in HdfWifiEventNewSta() argument
31 if (netDev == NULL || macAddr == NULL || info == NULL) { in HdfWifiEventNewSta()
49 !HdfSbufWriteBuffer(data, macAddr, addrLen)) { in HdfWifiEventNewSta()
56 (addrLen > 0) ? macAddr[addrLen - 1] : -1); in HdfWifiEventNewSta()
63 int32_t HdfWifiEventDelSta(struct NetDevice *netDev, const uint8_t *macAddr, uint8_t addrLen) in HdfWifiEventDelSta() argument
68 if ((netDev == NULL) || (macAddr == NULL)) { in HdfWifiEventDelSta()
79 if (!HdfSbufWriteString(data, netDev->name) || !HdfSbufWriteBuffer(data, macAddr, addrLen)) { in HdfWifiEventDelSta()
/ohos5.0/foundation/communication/wifi_aware/interfaces/kits/
H A Dwifiaware.h114 typedef int (*RecvCallback)(unsigned char* macAddr, unsigned char peerHandle, unsigned char localHa…
180 int SendData(unsigned char* macAddr, unsigned char peerHandle, unsigned char localHandle,
/ohos5.0/foundation/communication/wifi_aware/hals/
H A Dhal_wifiaware.h31 typedef int (*HalRecvCallback)(unsigned char* macAddr, unsigned char peerHandle, unsigned char loca…
40 int HalWifiSdpSend(unsigned char* macAddr, unsigned char peerHandle, unsigned char localHandle,
/ohos5.0/foundation/communication/netmanager_base/test/netconnmanager/unittest/net_conn_manager_test/
H A Dnet_conn_client_test.cpp1171 std::string macAddr = "12:23:34:12:12:11"; variable
1176 macAddr = "12:23:34:12:12:11";
1177 ret = DelayedSingleton<NetConnClient>::GetInstance()->AddStaticArp(ipAddr, macAddr, ifName);
1181 macAddr = "12:234:34";
1182 ret = DelayedSingleton<NetConnClient>::GetInstance()->AddStaticArp(ipAddr, macAddr, ifName);
1190 std::string macAddr = "12:23:34:12:12:11"; variable
1196 macAddr = "12:23:34:12:12:11";
1197 ret = DelayedSingleton<NetConnClient>::GetInstance()->DelStaticArp(ipAddr, macAddr, ifName);
1201 macAddr = "12:23:34:12:12:11";
1206 macAddr = "12:23:34:12:12";
[all …]
/ohos5.0/foundation/communication/wifi/wifi/test/wifi_standard/wifi_framework/wifi_toolkit/unittest/
H A Dmac_address_test.cpp103 unsigned char macAddr[MAC_LEN] = {0}; variable
104 EXPECT_FALSE(MacAddress::GetMacAddr(ifName, macAddr));
/ohos5.0/drivers/hdf_core/framework/include/wifi/
H A Dwifi_mac80211_ops.h417 uint8_t macAddr[IEEE80211_MAC_ADDR_LEN]; /**< Device MAC address */ member
501 …struct NetDevice *netDev, uint8_t keyIndex, bool pairwise, const uint8_t *macAddr, struct KeyParam…
516 …t32_t (*DelKey)(struct NetDevice *netDev, uint8_t keyIndex, bool pairwise, const uint8_t *macAddr);
871 int32_t (*DelStation)(NetDevice *netDev, const uint8_t *macAddr);
/ohos5.0/foundation/communication/wifi_aware/frameworks/source/
H A Dwifiaware.c78 int SendData(unsigned char* macAddr, unsigned char peerHandle, unsigned char localHandle, in SendData() argument
81 if (HalWifiSdpSend(macAddr, peerHandle, localHandle, msg, len) != 0) { in SendData()
/ohos5.0/foundation/communication/dhcp/services/dhcp_client/src/
H A Ddhcp_client_state_machine.cpp256 char macAddr[MAC_ADDR_LEN * MAC_ADDR_CHAR_NUM]; in GetClientNetworkInfo() local
257 if (memset_s(macAddr, sizeof(macAddr), 0, sizeof(macAddr)) != EOK) { in GetClientNetworkInfo()
261 MacChConToMacStr(m_cltCnf.ifaceMac, MAC_ADDR_LEN, macAddr, sizeof(macAddr)); in GetClientNetworkInfo()
263 m_cltCnf.ifaceName, m_cltCnf.ifaceIndex, macAddr); in GetClientNetworkInfo()
1479 char macAddr[MAC_ADDR_LEN * MAC_ADDR_CHAR_NUM] = {0}; in AddClientIdToOpts() local
1480 MacChConToMacStr(m_cltCnf.ifaceMac, MAC_ADDR_LEN, macAddr, sizeof(macAddr)); in AddClientIdToOpts()
1794 char macAddr[MAC_ADDR_CHAR_NUM * MAC_ADDR_LEN]; in IsArpReachable() local
1795 if (memset_s(macAddr, sizeof(macAddr), 0, sizeof(macAddr)) != EOK) { in IsArpReachable()
1799 MacChConToMacStr(m_cltCnf.ifaceMac, MAC_ADDR_LEN, macAddr, sizeof(macAddr)); in IsArpReachable()
1800 std::string localMac = macAddr; in IsArpReachable()

12345