Home
last modified time | relevance | path

Searched refs:interface (Results 1 – 25 of 182) sorted by relevance

12345678

/system/netd/server/
DPhysicalNetwork.cpp27 WARN_UNUSED_RESULT int addToDefault(unsigned netId, const std::string& interface, in addToDefault() argument
29 if (int ret = RouteController::addInterfaceToDefaultNetwork(interface.c_str(), permission)) { in addToDefault()
30 ALOGE("failed to add interface %s to default netId %u", interface.c_str(), netId); in addToDefault()
33 if (int ret = delegate->addFallthrough(interface, permission)) { in addToDefault()
39 WARN_UNUSED_RESULT int removeFromDefault(unsigned netId, const std::string& interface, in removeFromDefault() argument
42 if (int ret = RouteController::removeInterfaceFromDefaultNetwork(interface.c_str(), in removeFromDefault()
44 ALOGE("failed to remove interface %s from default netId %u", interface.c_str(), netId); in removeFromDefault()
47 if (int ret = delegate->removeFallthrough(interface, permission)) { in removeFromDefault()
96 for (const std::string& interface : mInterfaces) { in setPermission() local
97 if (int ret = RouteController::modifyPhysicalNetworkPermission(mNetId, interface.c_str(), in setPermission()
[all …]
DInterfaceController.cpp97 const char *family, const char *which, const char *interface, const char *parameter) { in getParameterPathname() argument
102 !isInterfaceName(interface) || in getParameterPathname()
108 return StringPrintf("%s/%s/%s/%s/%s", proc_net_path, family, which, interface, parameter); in getParameterPathname()
134 int InterfaceController::setEnableIPv6(const char *interface, const int on) { in setEnableIPv6() argument
135 if (!isIfaceName(interface)) { in setEnableIPv6()
143 return writeValueToPath(ipv6_proc_path, interface, "disable_ipv6", disable_ipv6); in setEnableIPv6()
146 int InterfaceController::setAcceptIPv6Ra(const char *interface, const int on) { in setAcceptIPv6Ra() argument
147 if (!isIfaceName(interface)) { in setAcceptIPv6Ra()
154 return writeValueToPath(ipv6_proc_path, interface, "accept_ra", accept_ra); in setAcceptIPv6Ra()
157 int InterfaceController::setAcceptIPv6Dad(const char *interface, const int on) { in setAcceptIPv6Dad() argument
[all …]
DClatdController.cpp46 pid_t ClatdController::getClatdPid(char* interface) { in getClatdPid() argument
47 auto it = mClatdPids.find(interface); in getClatdPid()
51 int ClatdController::startClatd(char* interface) { in startClatd() argument
52 pid_t pid = getClatdPid(interface); in startClatd()
55 ALOGE("clatd pid=%d already started on %s", pid, interface); in startClatd()
61 unsigned netId = mNetCtrl->getNetworkForInterface(interface); in startClatd()
63 ALOGE("interface %s not assigned to any netId", interface); in startClatd()
80 ALOGD("starting clatd on %s", interface); in startClatd()
83 progname += interface; in startClatd()
94 interface, in startClatd()
[all …]
DInterfaceController.h26 static int setEnableIPv6(const char *interface, const int on);
27 static int setAcceptIPv6Ra(const char *interface, const int on);
28 static int setAcceptIPv6Dad(const char *interface, const int on);
29 static int setIPv6DadTransmits(const char *interface, const char *value);
30 static int setIPv6PrivacyExtensions(const char *interface, const int on);
31 static int setIPv6NdOffload(char* interface, const int on);
32 static int setMtu(const char *interface, const char *mtu);
33 static int addAddress(const char *interface, const char *addrString, int prefixLength);
34 static int delAddress(const char *interface, const char *addrString, int prefixLength);
39 const char *family, const char *which, const char *interface, const char *parameter,
[all …]
DVirtualNetwork.cpp69 for (const std::string& interface : mInterfaces) { in addUsers() local
70 if (int ret = RouteController::addUsersToVirtualNetwork(mNetId, interface.c_str(), mSecure, in addUsers()
72 ALOGE("failed to add users on interface %s of netId %u", interface.c_str(), mNetId); in addUsers()
84 for (const std::string& interface : mInterfaces) { in removeUsers() local
85 if (int ret = RouteController::removeUsersFromVirtualNetwork(mNetId, interface.c_str(), in removeUsers()
87 ALOGE("failed to remove users on interface %s of netId %u", interface.c_str(), mNetId); in removeUsers()
99 int VirtualNetwork::addInterface(const std::string& interface) { in addInterface() argument
100 if (hasInterface(interface)) { in addInterface()
103 if (int ret = RouteController::addInterfaceToVirtualNetwork(mNetId, interface.c_str(), mSecure, in addInterface()
105 ALOGE("failed to add interface %s to VPN netId %u", interface.c_str(), mNetId); in addInterface()
[all …]
DLocalNetwork.cpp34 int LocalNetwork::addInterface(const std::string& interface) { in addInterface() argument
35 if (hasInterface(interface)) { in addInterface()
38 if (int ret = RouteController::addInterfaceToLocalNetwork(mNetId, interface.c_str())) { in addInterface()
39 ALOGE("failed to add interface %s to local netId %u", interface.c_str(), mNetId); in addInterface()
42 mInterfaces.insert(interface); in addInterface()
46 int LocalNetwork::removeInterface(const std::string& interface) { in removeInterface() argument
47 if (!hasInterface(interface)) { in removeInterface()
50 if (int ret = RouteController::removeInterfaceFromLocalNetwork(mNetId, interface.c_str())) { in removeInterface()
51 ALOGE("failed to remove interface %s from local netId %u", interface.c_str(), mNetId); in removeInterface()
54 mInterfaces.erase(interface); in removeInterface()
DRouteController.h41 static int addInterfaceToLocalNetwork(unsigned netId, const char* interface) WARN_UNUSED_RESULT;
43 const char* interface) WARN_UNUSED_RESULT;
45 static int addInterfaceToPhysicalNetwork(unsigned netId, const char* interface,
47 static int removeInterfaceFromPhysicalNetwork(unsigned netId, const char* interface,
50 static int addInterfaceToVirtualNetwork(unsigned netId, const char* interface, bool secure,
52 static int removeInterfaceFromVirtualNetwork(unsigned netId, const char* interface, bool secure,
55 static int modifyPhysicalNetworkPermission(unsigned netId, const char* interface,
59 static int addUsersToVirtualNetwork(unsigned netId, const char* interface, bool secure,
61 static int removeUsersFromVirtualNetwork(unsigned netId, const char* interface, bool secure,
69 static int addInterfaceToDefaultNetwork(const char* interface,
[all …]
DTetherController.cpp65 bool configureForIPv6Router(const char *interface) { in configureForIPv6Router() argument
66 return (InterfaceController::setEnableIPv6(interface, 0) == 0) in configureForIPv6Router()
67 && (InterfaceController::setAcceptIPv6Ra(interface, 0) == 0) in configureForIPv6Router()
68 && (InterfaceController::setAcceptIPv6Dad(interface, 0) == 0) in configureForIPv6Router()
69 && (InterfaceController::setIPv6DadTransmits(interface, "0") == 0) in configureForIPv6Router()
70 && (InterfaceController::setEnableIPv6(interface, 1) == 0); in configureForIPv6Router()
73 void configureForIPv6Client(const char *interface) { in configureForIPv6Client() argument
74 InterfaceController::setAcceptIPv6Ra(interface, 1); in configureForIPv6Client()
75 InterfaceController::setAcceptIPv6Dad(interface, 1); in configureForIPv6Client()
76 InterfaceController::setIPv6DadTransmits(interface, "1"); in configureForIPv6Client()
[all …]
DRouteController.cpp133 uint32_t getRouteTableForInterface(const char* interface) { in getRouteTableForInterface() argument
134 uint32_t index = if_nametoindex(interface); in getRouteTableForInterface()
137 interfaceToTable[interface] = index; in getRouteTableForInterface()
142 auto iter = interfaceToTable.find(interface); in getRouteTableForInterface()
144 ALOGE("cannot find interface %s", interface); in getRouteTableForInterface()
361 WARN_UNUSED_RESULT int modifyIpRoute(uint16_t action, uint32_t table, const char* interface, in modifyIpRoute() argument
394 interface = OIF_NONE; in modifyIpRoute()
398 interface = OIF_NONE; in modifyIpRoute()
402 if (interface != OIF_NONE) { in modifyIpRoute()
403 ifindex = if_nametoindex(interface); in modifyIpRoute()
[all …]
/system/tools/aidl/
Dgenerate_cpp_unittest.cpp713 unique_ptr<AidlInterface> interface = Parse(); in TEST_F() local
714 ASSERT_NE(interface, nullptr); in TEST_F()
715 unique_ptr<Document> doc = internals::BuildClientHeader(types_, *interface); in TEST_F()
720 unique_ptr<AidlInterface> interface = Parse(); in TEST_F() local
721 ASSERT_NE(interface, nullptr); in TEST_F()
722 unique_ptr<Document> doc = internals::BuildClientSource(types_, *interface); in TEST_F()
727 unique_ptr<AidlInterface> interface = Parse(); in TEST_F() local
728 ASSERT_NE(interface, nullptr); in TEST_F()
729 unique_ptr<Document> doc = internals::BuildServerHeader(types_, *interface); in TEST_F()
734 unique_ptr<AidlInterface> interface = Parse(); in TEST_F() local
[all …]
Dgenerate_cpp.cpp208 string ClassName(const AidlInterface& interface, ClassNames type) { in ClassName() argument
209 string c_name = interface.GetName(); in ClassName()
230 string BuildHeaderGuard(const AidlInterface& interface, in BuildHeaderGuard() argument
232 string class_name = ClassName(interface, header_type); in BuildHeaderGuard()
240 interface.GetPackage().c_str(), in BuildHeaderGuard()
252 const AidlInterface& interface, in DefineClientTransaction() argument
254 const string i_name = ClassName(interface, ClassNames::INTERFACE); in DefineClientTransaction()
255 const string bp_name = ClassName(interface, ClassNames::CLIENT); in DefineClientTransaction()
304 if (interface.IsOneway() || method.IsOneway()) { in DefineClientTransaction()
314 if (!interface.IsOneway() && !method.IsOneway()) { in DefineClientTransaction()
[all …]
Daidl.cpp140 const AidlInterface* interface = doc->GetInterface(); in check_filenames() local
142 if (interface) { in check_filenames()
143 return check_filename(filename, interface->GetPackage(), in check_filenames()
144 interface->GetName(), interface->GetLine()); in check_filenames()
162 const AidlInterface* interface = doc->GetInterface(); in gather_types() local
164 if (interface) in gather_types()
165 return types->AddBinderType(*interface, filename); in gather_types()
284 const AidlInterface& interface, in write_cpp_dep_file() argument
312 HeaderFile(interface, c, false /* use_os_sep */)); in write_cpp_dep_file()
326 const AidlInterface& interface) { in generate_outputFileName() argument
[all …]
/system/core/fastboot/
Dusb_osx.cpp64 IOUSBInterfaceInterface190 **interface; member
91 IOUSBInterfaceInterface190 **interface = NULL; in try_interfaces() local
141 (LPVOID*) &interface); in try_interfaces()
146 if (result || !interface) { in try_interfaces()
170 kr = (*interface)->USBInterfaceOpen(interface); in try_interfaces()
174 (void) (*interface)->Release(interface); in try_interfaces()
180 kr = (*interface)->GetNumEndpoints(interface, &interfaceNumEndpoints); in try_interfaces()
188 if ((*interface)->GetInterfaceClass(interface, &handle->info.ifc_class) != 0 || in try_interfaces()
189 (*interface)->GetInterfaceSubClass(interface, &handle->info.ifc_subclass) != 0 || in try_interfaces()
190 (*interface)->GetInterfaceProtocol(interface, &handle->info.ifc_protocol) != 0) in try_interfaces()
[all …]
/system/connectivity/apmanager/
Dfirewall_manager.cc46 void FirewallManager::RequestDHCPPortAccess(const std::string& interface) { in RequestDHCPPortAccess() argument
48 if (dhcp_access_interfaces_.find(interface) != in RequestDHCPPortAccess()
50 LOG(ERROR) << "DHCP access already requested for interface: " << interface; in RequestDHCPPortAccess()
53 firewall_proxy_->RequestUdpPortAccess(interface, kDhcpServerPort); in RequestDHCPPortAccess()
54 dhcp_access_interfaces_.insert(interface); in RequestDHCPPortAccess()
57 void FirewallManager::ReleaseDHCPPortAccess(const std::string& interface) { in ReleaseDHCPPortAccess() argument
59 if (dhcp_access_interfaces_.find(interface) == in ReleaseDHCPPortAccess()
62 << interface; in ReleaseDHCPPortAccess()
65 firewall_proxy_->ReleaseUdpPortAccess(interface, kDhcpServerPort); in ReleaseDHCPPortAccess()
66 dhcp_access_interfaces_.erase(interface); in ReleaseDHCPPortAccess()
Ddevice.cc49 for (const auto& interface : interface_list_) { in RegisterInterface() local
51 if (interface.iface_index == new_interface.iface_index) { in RegisterInterface()
61 void Device::DeregisterInterface(const WiFiInterface& interface) { in DeregisterInterface() argument
62 LOG(INFO) << "DeregisteringInterface " << interface.iface_name in DeregisterInterface()
65 if (it->iface_index == interface.iface_index) { in DeregisterInterface()
144 for (const auto& interface : interface_list_) { in ClaimDevice() local
145 manager_->ClaimInterface(interface.iface_name); in ClaimDevice()
146 claimed_interfaces_.insert(interface.iface_name); in ClaimDevice()
163 for (const auto& interface : claimed_interfaces_) { in ReleaseDevice() local
164 manager_->ReleaseInterface(interface); in ReleaseDevice()
[all …]
Ddevice_info_unittest.cc116 for (const auto& interface : interfaces) { in VerifyInterfaceList() local
118 device_info_.interface_infos_.find(interface.iface_index); in VerifyInterfaceList()
120 EXPECT_TRUE(interface.Equals(it->second)); in VerifyInterfaceList()
134 void AddInterface(const Device::WiFiInterface& interface) { in AddInterface() argument
135 device_info_.interface_infos_[interface.iface_index] = interface; in AddInterface()
184 MATCHER_P(IsInterface, interface, "") {
185 return arg.Equals(interface);
295 Device::WiFiInterface interface( in TEST_F() local
297 AddInterface(interface); in TEST_F()
299 interface_list.push_back(interface); in TEST_F()
[all …]
/system/firewalld/
Diptables.cc129 const std::string& interface) { in RequestVpnSetup() argument
130 return ApplyVpnSetup(usernames, interface, true /* add */); in RequestVpnSetup()
134 const std::string& interface) { in RemoveVpnSetup() argument
135 return ApplyVpnSetup(usernames, interface, false /* delete */); in RemoveVpnSetup()
139 const std::string& interface, in PunchHole() argument
147 if (!IsValidInterfaceName(interface)) { in PunchHole()
148 LOG(ERROR) << "Invalid interface name '" << interface << "'"; in PunchHole()
152 Hole hole = std::make_pair(port, interface); in PunchHole()
161 << " on interface '" << interface << "'"; in PunchHole()
162 if (!AddAcceptRules(protocol, port, interface)) { in PunchHole()
[all …]
Diptables.h48 const std::string& interface) override;
50 const std::string& interface) override;
65 const std::string& interface,
69 const std::string& interface,
75 const std::string& interface);
78 const std::string& interface);
83 const std::string& interface);
87 const std::string& interface);
90 const std::string& interface,
93 virtual bool ApplyMasquerade(const std::string& interface, bool add);
[all …]
Diptables_unittest.cc192 const std::string interface = "ifc0"; in TEST_F() local
196 EXPECT_CALL(mock_iptables, ApplyMasquerade(interface, add)) in TEST_F()
208 mock_iptables.ApplyVpnSetup(usernames, interface, add)); in TEST_F()
213 const std::string interface = "ifc0"; in TEST_F() local
218 EXPECT_CALL(mock_iptables, ApplyMasquerade(interface, add)) in TEST_F()
235 EXPECT_CALL(mock_iptables, ApplyMasquerade(interface, remove)) in TEST_F()
252 mock_iptables.ApplyVpnSetup(usernames, interface, add)); in TEST_F()
257 const std::string interface = "ifc0"; in TEST_F() local
262 EXPECT_CALL(mock_iptables, ApplyMasquerade(interface, add)) in TEST_F()
272 EXPECT_CALL(mock_iptables, ApplyMasquerade(interface, remove)) in TEST_F()
[all …]
/system/core/adb/
Dusb_osx.cpp47 IOUSBInterfaceInterface190** interface; member
55 usb_handle() : bulkIn(0), bulkOut(0), interface(nullptr), in usb_handle()
304 static bool ClearPipeStallBothEnds(IOUSBInterfaceInterface190** interface, UInt8 bulkEp) { in ClearPipeStallBothEnds() argument
305 IOReturn rc = (*interface)->ClearPipeStallBothEnds(interface, bulkEp); in ClearPipeStallBothEnds()
316 CheckInterface(IOUSBInterfaceInterface190 **interface, UInt16 vendor, UInt16 product) in CheckInterface() argument
325 kr = (*interface)->USBInterfaceOpen(interface); in CheckInterface()
332 kr = (*interface)->GetNumEndpoints(interface, &interfaceNumEndpoints); in CheckInterface()
339 if ((*interface)->GetInterfaceClass(interface, &interfaceClass) != kIOReturnSuccess || in CheckInterface()
340 (*interface)->GetInterfaceSubClass(interface, &interfaceSubClass) != kIOReturnSuccess || in CheckInterface()
341 (*interface)->GetInterfaceProtocol(interface, &interfaceProtocol) != kIOReturnSuccess) { in CheckInterface()
[all …]
/system/connectivity/shill/dbus/
Dchromeos_dhcpcd_proxy.cc42 void ChromeosDHCPCDProxy::Rebind(const string& interface) { in Rebind() argument
45 if (!dhcpcd_proxy_->Rebind(interface, &error)) { in Rebind()
46 LogDBusError(error, __func__, interface); in Rebind()
50 void ChromeosDHCPCDProxy::Release(const string& interface) { in Release() argument
53 if (!dhcpcd_proxy_->Release(interface, &error)) { in Release()
54 LogDBusError(error, __func__, interface); in Release()
60 const string& interface) { in LogDBusError() argument
65 LOG(FATAL) << "DBus error: " << method << " " << interface << ": " in LogDBusError()
/system/connectivity/apmanager/dbus/
Dfirewalld_dbus_proxy.cc51 bool FirewalldDBusProxy::RequestUdpPortAccess(const string& interface, in RequestUdpPortAccess() argument
60 if (!proxy_->PunchUdpHole(port, interface, &success, &error)) { in RequestUdpPortAccess()
67 << " on interface " << interface << " is denied"; in RequestUdpPortAccess()
71 << " on interface " << interface; in RequestUdpPortAccess()
75 bool FirewalldDBusProxy::ReleaseUdpPortAccess(const string& interface, in ReleaseUdpPortAccess() argument
84 if (!proxy_->PlugUdpHole(port, interface, &success, &error)) { in ReleaseUdpPortAccess()
91 << " on interface " << interface << " is denied"; in ReleaseUdpPortAccess()
95 << " on interface " << interface; in ReleaseUdpPortAccess()
Dpermission_broker_dbus_proxy.cc62 bool PermissionBrokerDBusProxy::RequestUdpPortAccess(const string& interface, in RequestUdpPortAccess() argument
75 if (!proxy_->RequestUdpPortAccess(port, interface, fd, &allowed, &error)) { in RequestUdpPortAccess()
82 << " on interface " << interface << " is denied"; in RequestUdpPortAccess()
86 << " on interface " << interface; in RequestUdpPortAccess()
90 bool PermissionBrokerDBusProxy::ReleaseUdpPortAccess(const string& interface, in ReleaseUdpPortAccess() argument
99 if (!proxy_->ReleaseUdpPort(port, interface, &success, &error)) { in ReleaseUdpPortAccess()
106 << " on interface " << interface << " is denied"; in ReleaseUdpPortAccess()
110 << " on interface " << interface; in ReleaseUdpPortAccess()
/system/connectivity/shill/test-scripts/
Drouting.py46 self.interface = iface
61 self.interface,
103 interface = route[colMap["Iface"]]
109 Route(interface, destination, gateway, flags, mask))
111 def hasDefaultRoute(self, interface): argument
114 rr.interface == interface and
126 def hasInterfaceRoute(self, interface): argument
129 rr.interface == interface and
/system/core/libnetutils/
Ddhcptool.c32 char* interface = argv[1]; in main() local
34 err(errno, "dhcptool %s: ifc_init failed", interface); in main()
39 int rc = do_dhcp(interface); in main()
41 err(errno, "dhcptool %s: do_dhcp failed", interface); in main()

12345678