Home
last modified time | relevance | path

Searched refs:ip (Results 1 – 25 of 66) sorted by relevance

123

/system/core/libnetutils/
Dpacket.c92 struct iphdr ip; in send_packet() local
100 ip.version = IPVERSION; in send_packet()
101 ip.ihl = sizeof(ip) >> 2; in send_packet()
102 ip.tos = 0; in send_packet()
103 ip.tot_len = htons(sizeof(ip) + sizeof(udp) + size); in send_packet()
104 ip.id = 0; in send_packet()
105 ip.frag_off = 0; in send_packet()
106 ip.ttl = IPDEFTTL; in send_packet()
107 ip.protocol = IPPROTO_UDP; in send_packet()
108 ip.check = 0; in send_packet()
[all …]
Dchecksum.c111 uint32_t ipv4_pseudo_header_checksum(const struct iphdr* ip, uint16_t len) { in ipv4_pseudo_header_checksum() argument
114 temp_protocol = htons(ip->protocol); in ipv4_pseudo_header_checksum()
119 current = ip_checksum_add(current, &(ip->saddr), sizeof(uint32_t)); in ipv4_pseudo_header_checksum()
120 current = ip_checksum_add(current, &(ip->daddr), sizeof(uint32_t)); in ipv4_pseudo_header_checksum()
/system/netd/libnetdutils/
DInternetAddresses.cpp38 const in_addr v4 = mData.ip.v4; in toString()
43 const in6_addr v6 = mData.ip.v6; in toString()
58 bool IPAddress::forString(const std::string& repr, IPAddress* ip) { in forString() argument
74 if (ip) *ip = IPAddress(sin->sin_addr); in forString()
79 if (ip) *ip = IPAddress(sin6->sin6_addr, sin6->sin6_scope_id); in forString()
91 IPPrefix::IPPrefix(const IPAddress& ip, int length) : IPPrefix(ip) { in IPPrefix() argument
102 mData.ip.v4.s_addr &= htonl(mask); in IPPrefix()
110 mData.ip.v6.s6_addr[which] &= mask; in IPPrefix()
112 mData.ip.v6.s6_addr[i] = 0U; in IPPrefix()
129 return StringPrintf("%s/%d", ip().toString().c_str(), mData.cidrlen); in toString()
[all …]
DInternetAddressesTest.cpp153 IPAddress ip; in TEST() local
155 EXPECT_FALSE(IPAddress::forString("not_an_ip", &ip)); in TEST()
372 const char* ip; in TEST() member
387 IPAddress ip; in TEST() local
388 EXPECT_TRUE(IPAddress::forString(expectation.ip, &ip)) in TEST()
389 << "Failed to parse IP address " << expectation.ip; in TEST()
395 IPPrefix prefix(ip, expectation.cidrLen); in TEST()
399 EXPECT_EQ(ipTruncated, prefix.ip()) in TEST()
400 << "Unexpected IP truncation: " << prefix.ip() << ", expected: " << ipTruncated; in TEST()
493 EXPECT_EQ(IPAddress(FE80_2, idx), linkLocalNtpSockaddr.ip()); in TEST()
[all …]
/system/extras/simpleperf/
DCallChainJoiner_test.cpp41 std::vector<uint64_t> ip = {0x1}; in TEST() local
43 ASSERT_TRUE(JoinCallChain(cache, 0, ip, sp, ip, sp)); in TEST()
44 ASSERT_TRUE(JoinCallChain(cache, 1, ip, sp, ip, sp)); in TEST()
47 ASSERT_NE(cache.FindNode(0, ip[0], sp[0]), nullptr); in TEST()
48 ASSERT_NE(cache.FindNode(1, ip[0], sp[0]), nullptr); in TEST()
55 ASSERT_EQ(cache.FindNode(0, ip[0], sp[0]), nullptr); in TEST()
57 ASSERT_NE(cache.FindNode(1, ip[0], sp[0]), nullptr); in TEST()
61 ASSERT_TRUE(JoinCallChain(cache, 1, ip, sp2, ip, sp2)); in TEST()
64 ASSERT_EQ(cache.FindNode(1, ip[0], sp[0]), nullptr); in TEST()
66 ASSERT_NE(cache.FindNode(1, ip[0], sp2[0]), nullptr); in TEST()
[all …]
Dthread_tree.cpp196 const MapEntry* ThreadTree::FindMap(const ThreadEntry* thread, uint64_t ip, bool in_kernel) { in FindMap() argument
199 result = FindMapByAddr(*thread->maps, ip); in FindMap()
201 result = FindMapByAddr(kernel_maps_, ip); in FindMap()
206 const MapEntry* ThreadTree::FindMap(const ThreadEntry* thread, uint64_t ip) { in FindMap() argument
207 const MapEntry* result = FindMapByAddr(*thread->maps, ip); in FindMap()
211 result = FindMapByAddr(kernel_maps_, ip); in FindMap()
215 const Symbol* ThreadTree::FindSymbol(const MapEntry* map, uint64_t ip, in FindSymbol() argument
221 vaddr_in_file = ip; in FindSymbol()
223 vaddr_in_file = dso->IpToVaddrInFile(ip, map->start_addr, map->pgoff); in FindSymbol()
229 vaddr_in_file = ip; in FindSymbol()
[all …]
DCallChainJoiner.h34 uint64_t ip; member
79 CacheNode* FindNode(uint32_t tid, uint64_t ip, uint64_t sp) { in FindNode() argument
82 key.ip = ip; in FindNode()
125 CacheNode* GetNode(uint32_t tid, uint64_t ip, uint64_t sp);
Dsample_tree.h127 for (auto& ip : ips) { in ProcessSampleRecord()
128 if (ip >= PERF_CONTEXT_MAX) { in ProcessSampleRecord()
129 switch (ip) { in ProcessSampleRecord()
137 LOG(DEBUG) << "Unexpected perf_context in callchain: " << ip; in ProcessSampleRecord()
143 if (ip == r.ip_data.ip) { in ProcessSampleRecord()
148 CreateCallChainSample(sample, ip, in_kernel, callchain, acc_info); in ProcessSampleRecord()
191 virtual EntryT* CreateCallChainSample(const EntryT* sample, uint64_t ip,
DCallChainJoiner.cpp84 if ((*it)->ip == top->ip) { in AddCallChain()
96 ips.push_back(top->ip); in AddCallChain()
105 return n1->tid == n2->tid && n1->ip == n2->ip && n1->sp == n2->sp; in CacheNodeEqual()
109 return static_cast<size_t>(n->tid ^ n->ip ^ n->sp); in CacheNodeHash()
112 CacheNode* LRUCache::GetNode(uint32_t tid, uint64_t ip, uint64_t sp) { in GetNode() argument
113 CacheNode* node = FindNode(tid, ip, sp); in GetNode()
124 node->ip = ip; in GetNode()
Drecord_test.cpp69 ASSERT_EQ(2u, r1.ip_data.ip); in TEST_F()
71 ASSERT_EQ(1u, r.ip_data.ip); in TEST_F()
78 ASSERT_EQ(2u, r3.ip_data.ip); in TEST_F()
80 ASSERT_EQ(2u, r4.ip_data.ip); in TEST_F()
Dthread_tree.h100 const MapEntry* FindMap(const ThreadEntry* thread, uint64_t ip,
103 const MapEntry* FindMap(const ThreadEntry* thread, uint64_t ip);
104 const Symbol* FindSymbol(const MapEntry* map, uint64_t ip,
106 const Symbol* FindKernelSymbol(uint64_t ip);
Dreport_lib_interface.cpp39 uint64_t ip; member
84 uint64_t ip; member
285 current_sample_.ip = r.ip_data.ip; in SetCurrentSample()
328 uint64_t ip = pair.first; in SetCurrentSample() local
331 const Symbol* symbol = thread_tree_.FindSymbol(map, ip, &vaddr_in_file); in SetCurrentSample()
333 entry.ip = ip; in SetCurrentSample()
342 current_sample_.ip = callchain_entries_[0].ip; in SetCurrentSample()
Ddso.cpp419 uint64_t IpToVaddrInFile(uint64_t ip, uint64_t map_start, uint64_t map_pgoff) override { in IpToVaddrInFile() argument
420 return ip - map_start + map_pgoff; in IpToVaddrInFile()
504 uint64_t IpToVaddrInFile(uint64_t ip, uint64_t map_start, uint64_t map_pgoff) override { in IpToVaddrInFile() argument
506 return dex_file_dso_->IpToVaddrInFile(ip, map_start, map_pgoff); in IpToVaddrInFile()
512 return ip - map_start + min_vaddr; in IpToVaddrInFile()
517 return ip - map_start + map_pgoff - file_offset_of_min_vaddr + min_vaddr; in IpToVaddrInFile()
581 uint64_t IpToVaddrInFile(uint64_t ip, uint64_t, uint64_t) override { in IpToVaddrInFile() argument
582 return ip; in IpToVaddrInFile()
649 uint64_t IpToVaddrInFile(uint64_t ip, uint64_t map_start, uint64_t) override { in IpToVaddrInFile() argument
650 return ip - map_start; in IpToVaddrInFile()
[all …]
/system/netd/libnetdutils/include/netdutils/
DInternetAddresses.h43 } ip{.v6 = IN6ADDR_ANY_INIT}; // written and read in network-byte order
58 const in_addr v4a = a.ip.v4;
59 const in_addr v4b = b.ip.v4;
63 const in6_addr v6a = a.ip.v6;
64 const in6_addr v6b = b.ip.v6;
81 const in_addr v4a = a.ip.v4;
82 const in_addr v4b = b.ip.v4;
87 const in6_addr v6a = a.ip.v6;
88 const in6_addr v6b = b.ip.v6;
116 static bool forString(const std::string& repr, IPAddress* ip);
[all …]
/system/netd/bpf_progs/
Dclatd.c111 struct iphdr ip = { in nat64() local
127 for (int i = 0; i < sizeof(ip) / sizeof(__u16); ++i) { in nat64()
128 sum += ((__u16*)&ip)[i]; in nat64()
133 ip.check = (__u16)~sum; // sum cannot be zero, so this is never 0xFFFF in nat64()
156 *(struct iphdr*)(new_eth + 1) = ip; in nat64()
159 *(struct iphdr*)data = ip; in nat64()
/system/netd/tests/
Dtun_interface.cpp147 } ip; in addAddress() local
150 inet_pton(AF_INET6, addr.c_str(), &ip.ip6); in addAddress()
151 addrlen = sizeof(ip.ip6); in addAddress()
154 inet_pton(AF_INET, addr.c_str(), &ip.ip4); in addAddress()
155 addrlen = sizeof(ip.ip4); in addAddress()
177 if (!memcmp(RTA_DATA(rta), &ip, addrlen)) { in addAddress()
/system/sepolicy/prebuilts/api/26.0/private/
Dnetutils_wrapper.te5 # For netutils (ip, iptables, tc)
13 # ip utils need everything but ioctl
21 # For /data/misc/net access to ndc and ip
/system/sepolicy/prebuilts/api/27.0/private/
Dnetutils_wrapper.te5 # For netutils (ip, iptables, tc)
13 # ip utils need everything but ioctl
21 # For /data/misc/net access to ndc and ip
/system/sepolicy/prebuilts/api/28.0/private/
Dnetutils_wrapper.te5 # For netutils (ip, iptables, tc)
13 # ip utils need everything but ioctl
28 # For /data/misc/net access to ndc and ip
/system/sepolicy/private/
Dnetutils_wrapper.te5 # For netutils (ip, iptables, tc)
13 # ip utils need everything but ioctl
30 # For /data/misc/net access to ndc and ip
/system/sepolicy/prebuilts/api/29.0/private/
Dnetutils_wrapper.te5 # For netutils (ip, iptables, tc)
13 # ip utils need everything but ioctl
30 # For /data/misc/net access to ndc and ip
/system/extras/simpleperf/scripts/
Dreport_sample.py52 print('%16x\t%s (%s)' % (sample.ip, symbol.symbol_name, symbol.dso_name))
55 print('%16x\t%s (%s)' % (entry.ip, entry.symbol.symbol_name, entry.symbol.dso_name))
/system/core/libunwindstack/tests/files/offline/jit_debug_arm/
Dregs.txt13 ip: edb26d04
/system/netd/resolv/
DDns64Configuration.cpp196 if (pfx.ip().family() != AF_INET6 || pfx.ip().scope_id() != 0) { in reportNat64PrefixStatus()
201 Nat64PrefixInfo args = {netId, added, pfx.ip().toString(), (uint8_t)pfx.length()}; in reportNat64PrefixStatus()
/system/core/libunwindstack/tests/files/offline/debug_frame_load_bias_arm/
Dregs.txt13 ip: 0

123