Home
last modified time | relevance | path

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

12

/system/core/libnetutils/
Dpacket.c93 struct iphdr ip; in send_packet() local
101 ip.version = IPVERSION; in send_packet()
102 ip.ihl = sizeof(ip) >> 2; in send_packet()
103 ip.tos = 0; in send_packet()
104 ip.tot_len = htons(sizeof(ip) + sizeof(udp) + size); in send_packet()
105 ip.id = 0; in send_packet()
106 ip.frag_off = 0; in send_packet()
107 ip.ttl = IPDEFTTL; in send_packet()
108 ip.protocol = IPPROTO_UDP; in send_packet()
109 ip.check = 0; in send_packet()
[all …]
/system/connectivity/shill/test-scripts/
Dbackchannel38 ip addr show "$1" | awk '/link\/ether/ { print $2 }'
42 ip addr show "$1" | awk '/inet / { print $2 }'
51 ip link set "$old" down
53 ip link set "$new" up
63 ip addr add "$oldip" dev "$test_if"
74 ip="$1" ; shift
79 ip route add "$ip" via "$gw" dev "$test_if"
Drouting.py82 def matches(self, ip): argument
83 return (ip & self.netmask) == self.destination
135 ip = convertIpToInt(ip_as_int_or_string)
137 if rr.isUsable() and rr.matches(ip):
Dveth27 ip link add name "$iface" type veth peer name "$peer_iface"
46 ip link del "$iface"
/system/connectivity/dhcp_client/
Ddhcpv4.cc236 struct iphdr* ip = reinterpret_cast<struct iphdr*>(buffer); in MakeRawPacket() local
237 struct udphdr* udp = reinterpret_cast<struct udphdr*>(buffer + sizeof(*ip)); in MakeRawPacket()
250 ip->protocol = IPPROTO_UDP; in MakeRawPacket()
252 ip->saddr = htonl(from_); in MakeRawPacket()
254 ip->daddr = htonl(to_); in MakeRawPacket()
256 ip->tot_len = udp->uh_ulen; in MakeRawPacket()
264 ip->version = IPVERSION; in MakeRawPacket()
266 ip->ihl = sizeof(*ip) >> 2; in MakeRawPacket()
270 ip->frag_off = 0; in MakeRawPacket()
272 ip->id = static_cast<uint16_t>( in MakeRawPacket()
[all …]
/system/extras/tests/net_test/
Dpackets.py57 ip = _GetIpLayer(version)
62 ip(src=srcaddr, dst=dstaddr) /
78 ip = _GetIpLayer(version)
82 ip(src=srcaddr, dst=dstaddr) /
88 ip = _GetIpLayer(version)
92 ip(src=srcaddr, dst=dstaddr) /
98 ip = _GetIpLayer(version)
101 ip(src=srcaddr, dst=dstaddr) /
107 ip = _GetIpLayer(version)
114 ip(src=srcaddr, dst=dstaddr) /
[all …]
Dnet_test.sh7 ip link set lo up
8 ip link set lo mtu 16436
9 ip link set eth0 up
Dping6_test.sh4 ip link set eth0 up
Drun_net_test.sh78 if ! ip link list $tap > /dev/null; then
81 sudo ip link set $tap up
/system/connectivity/shill/
Dip_address_store.cc41 void IPAddressStore::AddUnique(const IPAddress& ip) { in AddUnique() argument
42 ip_addresses_.insert(ip); in AddUnique()
45 void IPAddressStore::Remove(const IPAddress& ip) { in Remove() argument
46 ip_addresses_.erase(ip); in Remove()
53 bool IPAddressStore::Contains(const IPAddress& ip) const { in Contains()
54 return ip_addresses_.find(ip) != ip_addresses_.end(); in Contains()
Dip_address_store.h47 virtual void AddUnique(const IPAddress& ip);
48 virtual void Remove(const IPAddress& ip);
50 virtual bool Contains(const IPAddress& ip) const;
Dconnection_health_checker.cc116 IPAddress ip(IPAddress::kFamilyIPv4); in ConnectionHealthChecker() local
117 ip.SetAddressFromString(ip_string); in ConnectionHealthChecker()
118 remote_ips_->AddUnique(ip); in ConnectionHealthChecker()
130 void ConnectionHealthChecker::AddRemoteIP(IPAddress ip) { in AddRemoteIP() argument
131 remote_ips_->AddUnique(ip); in AddRemoteIP()
240 const IPAddress& ip) { in GetDNSResult() argument
246 remote_ips_->AddUnique(ip); in GetDNSResult()
285 IPAddress ip = remote_ips_->GetRandomIP(); in NextHealthCheckSample() local
287 << ip.ToString(); in NextHealthCheckSample()
288 if (!tcp_connection_->Start(ip, kRemotePort)) { in NextHealthCheckSample()
Dmock_ip_address_store.h32 MOCK_METHOD1(AddUnique, void(const IPAddress& ip));
Dmock_connection_health_checker.h38 MOCK_METHOD1(AddRemoteIP, void(IPAddress ip));
Dconnection_health_checker.h80 virtual void AddRemoteIP(IPAddress ip);
175 void GetDNSResult(const Error& error, const IPAddress& ip);
/system/extras/simpleperf/
Dsample_tree.h32 uint64_t ip; member
37 BranchFromEntry() : ip(0), map(nullptr), symbol(nullptr), flags(0) { in BranchFromEntry()
42 uint64_t ip; member
54 SampleEntry(uint64_t ip, uint64_t time, uint64_t period, uint64_t accumulated_period, in SampleEntry()
57 : ip(ip), in SampleEntry()
93 SampleEntry* AddSample(int pid, int tid, uint64_t ip, uint64_t time, uint64_t period,
97 SampleEntry* AddCallChainSample(int pid, int tid, uint64_t ip, uint64_t time, uint64_t period,
Dsample_tree.cpp33 SampleEntry* SampleTree::AddSample(int pid, int tid, uint64_t ip, uint64_t time, uint64_t period, in AddSample() argument
36 const MapEntry* map = thread_tree_->FindMap(thread, ip, in_kernel); in AddSample()
37 const Symbol* symbol = thread_tree_->FindSymbol(map, ip); in AddSample()
39 SampleEntry value(ip, time, period, 0, 1, thread, map, symbol); in AddSample()
62 value.branch_from.ip = from_ip; in AddBranchSample()
73 SampleEntry* SampleTree::AddCallChainSample(int pid, int tid, uint64_t ip, uint64_t time, in AddCallChainSample() argument
77 const MapEntry* map = thread_tree_->FindMap(thread, ip, in_kernel); in AddCallChainSample()
78 const Symbol* symbol = thread_tree_->FindSymbol(map, ip); in AddCallChainSample()
80 SampleEntry value(ip, time, 0, period, 0, thread, map, symbol); in AddCallChainSample()
Dthread_tree.cpp178 const MapEntry* ThreadTree::FindMap(const ThreadEntry* thread, uint64_t ip, bool in_kernel) { in FindMap() argument
181 result = FindMapByAddr(thread->maps, ip); in FindMap()
183 result = FindMapByAddr(kernel_map_tree_, ip); in FindMap()
188 const Symbol* ThreadTree::FindSymbol(const MapEntry* map, uint64_t ip) { in FindSymbol() argument
191 vaddr_in_file = ip; in FindSymbol()
193 vaddr_in_file = ip - map->start_addr + map->dso->MinVirtualAddress(); in FindSymbol()
Dthread_tree.h74 const MapEntry* FindMap(const ThreadEntry* thread, uint64_t ip, bool in_kernel);
75 const Symbol* FindSymbol(const MapEntry* map, uint64_t ip);
Dcmd_report.cpp554 SampleEntry* sample = sample_tree_->AddSample(r.tid_data.pid, r.tid_data.tid, r.ip_data.ip, in ProcessSampleRecord()
583 for (auto& ip : ips) { in ProcessSampleRecord() local
584 if (ip >= PERF_CONTEXT_MAX) { in ProcessSampleRecord()
585 switch (ip) { in ProcessSampleRecord()
593 LOG(ERROR) << "Unexpected perf_context in callchain: " << ip; in ProcessSampleRecord()
599 if (ip == r.ip_data.ip) { in ProcessSampleRecord()
604 sample_tree_->AddCallChainSample(r.tid_data.pid, r.tid_data.tid, ip, r.time_data.time, in ProcessSampleRecord()
/system/connectivity/shill/shims/
Dnetfilter_queue_processor.cc65 std::string NetfilterQueueProcessor::AddressAndPortToString(uint32_t ip, in AddressAndPortToString() argument
68 addr.s_addr = htonl(ip); in AddressAndPortToString()
94 struct iphdr ip; in ParsePayloadUDPData() local
96 if (payload_len <= sizeof(ip)) { in ParsePayloadUDPData()
100 memcpy(&ip, payload, sizeof(ip)); in ParsePayloadUDPData()
102 size_t iphdr_len = ip.ihl * kIPHeaderLengthUnitBytes; in ParsePayloadUDPData()
103 if (iphdr_len < sizeof(ip) || in ParsePayloadUDPData()
104 ip.version != IPVERSION || in ParsePayloadUDPData()
105 ip.protocol != IPPROTO_UDP) { in ParsePayloadUDPData()
116 source_ip_ = ntohl(ip.saddr); in ParsePayloadUDPData()
[all …]
/system/firewalld/
Diptables.cc430 brillo::ProcessImpl ip; in ApplyRuleForUserTrafficWithVersion() local
431 ip.AddArg(kIpPath); in ApplyRuleForUserTrafficWithVersion()
433 ip.AddArg("-6"); in ApplyRuleForUserTrafficWithVersion()
434 ip.AddArg("rule"); in ApplyRuleForUserTrafficWithVersion()
435 ip.AddArg(add ? "add" : "delete"); in ApplyRuleForUserTrafficWithVersion()
436 ip.AddArg("fwmark"); in ApplyRuleForUserTrafficWithVersion()
437 ip.AddArg(kMarkForUserTraffic); in ApplyRuleForUserTrafficWithVersion()
438 ip.AddArg("table"); in ApplyRuleForUserTrafficWithVersion()
439 ip.AddArg(kTableIdForUserTraffic); in ApplyRuleForUserTrafficWithVersion()
441 bool success = ip.Run() == 0; in ApplyRuleForUserTrafficWithVersion()
/system/extras/perfprofd/quipper/
Dperf_parser.cc263 const uint64_t unmapped_event_ip = sample_info.ip; in MapSampleEvent()
266 if (!MapIPAndPidAndGetNameAndOffset(sample_info.ip, in MapSampleEvent()
268 &sample_info.ip, in MapSampleEvent()
274 !MapCallchain(sample_info.ip, in MapSampleEvent()
300 bool PerfParser::MapCallchain(const uint64_t ip, in MapCallchain() argument
327 callchain->ips[j] = ip; in MapCallchain()
406 uint64_t ip, in MapIPAndPidAndGetNameAndOffset() argument
420 bool mapped = mapper->GetMappedAddress(ip, &mapped_addr); in MapIPAndPidAndGetNameAndOffset()
423 mapped = mapper->GetMappedAddress(ip, &mapped_addr); in MapIPAndPidAndGetNameAndOffset()
430 CHECK(mapper->GetMappedIDAndOffset(ip, &id, &dso_and_offset->offset_)); in MapIPAndPidAndGetNameAndOffset()
Dperf_parser.h212 bool MapCallchain(const uint64_t ip,
229 uint64_t ip,
/system/core/libbacktrace/
DBacktraceOffline.cpp68 static int FindProcInfo(unw_addr_space_t addr_space, unw_word_t ip, unw_proc_info* proc_info, in FindProcInfo() argument
71 bool result = backtrace->FindProcInfo(addr_space, ip, proc_info, need_unwind_info); in FindProcInfo()
227 bool BacktraceOffline::FindProcInfo(unw_addr_space_t addr_space, uint64_t ip, in FindProcInfo() argument
230 FillInMap(ip, &map); in FindProcInfo()
240 uint64_t ip_offset = ip - map.start + map.offset; in FindProcInfo()
247 eh_frame_hdr_space_.start = (ip - ip_vaddr) + debug_frame->eh_frame.eh_frame_hdr_vaddr; in FindProcInfo()
252 eh_frame_space_.start = (ip - ip_vaddr) + debug_frame->eh_frame.eh_frame_vaddr; in FindProcInfo()
266 int ret = dwarf_search_unwind_table(addr_space, ip, &di, proc_info, need_unwind_info, this); in FindProcInfo()
274 int found = dwarf_find_debug_frame(0, &di, ip, segbase, filename.c_str(), map.start, map.end); in FindProcInfo()
276 int ret = dwarf_search_unwind_table(addr_space, ip, &di, proc_info, need_unwind_info, this); in FindProcInfo()

12