Home
last modified time | relevance | path

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

12

/system/netd/server/
DPhysicalNetwork.cpp26 WARN_UNUSED_RESULT int addToDefault(unsigned netId, const std::string& interface, in addToDefault() argument
28 if (int ret = RouteController::addInterfaceToDefaultNetwork(interface.c_str(), permission)) { in addToDefault()
29 ALOGE("failed to add interface %s to default netId %u", interface.c_str(), netId); in addToDefault()
32 if (int ret = delegate->addFallthrough(interface, permission)) { in addToDefault()
38 WARN_UNUSED_RESULT int removeFromDefault(unsigned netId, const std::string& interface, in removeFromDefault() argument
41 if (int ret = RouteController::removeInterfaceFromDefaultNetwork(interface.c_str(), in removeFromDefault()
43 ALOGE("failed to remove interface %s from default netId %u", interface.c_str(), netId); in removeFromDefault()
46 if (int ret = delegate->removeFallthrough(interface, permission)) { in removeFromDefault()
72 for (const std::string& interface : mInterfaces) { in setPermission() local
73 if (int ret = RouteController::modifyPhysicalNetworkPermission(mNetId, interface.c_str(), in setPermission()
[all …]
DVirtualNetwork.cpp44 for (const std::string& interface : mInterfaces) { in addUsers() local
45 if (int ret = RouteController::addUsersToVirtualNetwork(mNetId, interface.c_str(), mSecure, in addUsers()
47 ALOGE("failed to add users on interface %s of netId %u", interface.c_str(), mNetId); in addUsers()
56 for (const std::string& interface : mInterfaces) { in removeUsers() local
57 if (int ret = RouteController::removeUsersFromVirtualNetwork(mNetId, interface.c_str(), in removeUsers()
59 ALOGE("failed to remove users on interface %s of netId %u", interface.c_str(), mNetId); in removeUsers()
71 int VirtualNetwork::addInterface(const std::string& interface) { in addInterface() argument
72 if (hasInterface(interface)) { in addInterface()
75 if (int ret = RouteController::addInterfaceToVirtualNetwork(mNetId, interface.c_str(), mSecure, in addInterface()
77 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,
64 static int addInterfaceToDefaultNetwork(const char* interface,
[all …]
DInterfaceController.cpp43 int InterfaceController::writeIPv6ProcPath(const char *interface, const char *setting, const char *… in writeIPv6ProcPath() argument
45 if (!isIfaceName(interface)) { in writeIPv6ProcPath()
49 asprintf(&path, "%s/%s/%s", ipv6_proc_path, interface, setting); in writeIPv6ProcPath()
55 int InterfaceController::setEnableIPv6(const char *interface, const int on) { in setEnableIPv6() argument
60 return writeIPv6ProcPath(interface, "disable_ipv6", disable_ipv6); in setEnableIPv6()
63 int InterfaceController::setIPv6PrivacyExtensions(const char *interface, const int on) { in setIPv6PrivacyExtensions() argument
66 return writeIPv6ProcPath(interface, "use_tempaddr", on ? "2" : "0"); in setIPv6PrivacyExtensions()
112 int InterfaceController::setMtu(const char *interface, const char *mtu) in setMtu() argument
115 if (!isIfaceName(interface)) { in setMtu()
119 asprintf(&path, "%s/%s/mtu", sys_net_path, interface); in setMtu()
DRouteController.cpp122 uint32_t getRouteTableForInterface(const char* interface) { in getRouteTableForInterface() argument
123 uint32_t index = if_nametoindex(interface); in getRouteTableForInterface()
126 interfaceToTable[interface] = index; in getRouteTableForInterface()
131 auto iter = interfaceToTable.find(interface); in getRouteTableForInterface()
133 ALOGE("cannot find interface %s", interface); in getRouteTableForInterface()
335 WARN_UNUSED_RESULT int modifyIpRoute(uint16_t action, uint32_t table, const char* interface, in modifyIpRoute() argument
368 interface = OIF_NONE; in modifyIpRoute()
372 interface = OIF_NONE; in modifyIpRoute()
376 if (interface != OIF_NONE) { in modifyIpRoute()
377 ifindex = if_nametoindex(interface); in modifyIpRoute()
[all …]
DInterfaceController.h24 int setEnableIPv6(const char *interface, const int on);
25 int setIPv6PrivacyExtensions(const char *interface, const int on);
26 int setMtu(const char *interface, const char *mtu);
29 int writeIPv6ProcPath(const char *interface, const char *setting, const char *value);
DNetwork.cpp32 bool Network::hasInterface(const std::string& interface) const { in hasInterface()
33 return mInterfaces.find(interface) != mInterfaces.end(); in hasInterface()
44 std::string interface = *mInterfaces.begin(); in clearInterfaces() local
45 if (int ret = removeInterface(interface)) { in clearInterfaces()
DNetworkController.h58 unsigned getNetworkForInterface(const char* interface) const;
65 int addInterfaceToNetwork(unsigned netId, const char* interface) WARN_UNUSED_RESULT;
66 int removeInterfaceFromNetwork(unsigned netId, const char* interface) WARN_UNUSED_RESULT;
82 int addRoute(unsigned netId, const char* interface, const char* destination,
84 int removeRoute(unsigned netId, const char* interface, const char* destination,
98 int modifyRoute(unsigned netId, const char* interface, const char* destination,
DClatdController.cpp37 int ClatdController::startClatd(char *interface) { in startClatd() argument
46 if (!isIfaceName(interface)) { in startClatd()
60 unsigned netId = mNetCtrl->getNetworkForInterface(interface); in startClatd()
77 interface, in startClatd()
DNetwork.h42 bool hasInterface(const std::string& interface) const;
46 virtual int addInterface(const std::string& interface) WARN_UNUSED_RESULT = 0;
47 virtual int removeInterface(const std::string& interface) WARN_UNUSED_RESULT = 0;
DNetworkController.cpp237 unsigned NetworkController::getNetworkForInterface(const char* interface) const { in getNetworkForInterface()
240 if (entry.second->hasInterface(interface)) { in getNetworkForInterface()
337 int NetworkController::addInterfaceToNetwork(unsigned netId, const char* interface) { in addInterfaceToNetwork() argument
343 unsigned existingNetId = getNetworkForInterface(interface); in addInterfaceToNetwork()
345 ALOGE("interface %s already assigned to netId %u", interface, existingNetId); in addInterfaceToNetwork()
350 return getNetworkLocked(netId)->addInterface(interface); in addInterfaceToNetwork()
353 int NetworkController::removeInterfaceFromNetwork(unsigned netId, const char* interface) { in removeInterfaceFromNetwork() argument
360 return getNetworkLocked(netId)->removeInterface(interface); in removeInterfaceFromNetwork()
438 int NetworkController::addRoute(unsigned netId, const char* interface, const char* destination, in addRoute() argument
440 return modifyRoute(netId, interface, destination, nexthop, true, legacy, uid); in addRoute()
[all …]
DTetherController.cpp289 int TetherController::tetherInterface(const char *interface) { in tetherInterface() argument
290 ALOGD("tetherInterface(%s)", interface); in tetherInterface()
291 if (!isIfaceName(interface)) { in tetherInterface()
295 mInterfaces->push_back(strdup(interface)); in tetherInterface()
300 if (!strcmp(interface, *it)) { in tetherInterface()
312 int TetherController::untetherInterface(const char *interface) { in untetherInterface() argument
315 ALOGD("untetherInterface(%s)", interface); in untetherInterface()
318 if (!strcmp(interface, *it)) { in untetherInterface()
DLocalNetwork.h29 int addInterface(const std::string& interface) override WARN_UNUSED_RESULT;
30 int removeInterface(const std::string& interface) override WARN_UNUSED_RESULT;
DVirtualNetwork.h44 int addInterface(const std::string& interface) override WARN_UNUSED_RESULT;
45 int removeInterface(const std::string& interface) override WARN_UNUSED_RESULT;
DTetherController.h52 int tetherInterface(const char *interface);
53 int untetherInterface(const char *interface);
/system/core/fastboot/
Dusb_osx.c61 IOUSBInterfaceInterface190 **interface; member
73 IOUSBInterfaceInterface190 **interface = NULL; in try_interfaces() local
124 (LPVOID) &interface); in try_interfaces()
129 if (result || !interface) { in try_interfaces()
153 kr = (*interface)->USBInterfaceOpen(interface); in try_interfaces()
157 (void) (*interface)->Release(interface); in try_interfaces()
163 kr = (*interface)->GetNumEndpoints(interface, &interfaceNumEndpoints); in try_interfaces()
171 if ((*interface)->GetInterfaceClass(interface, &handle->info.ifc_class) != 0 || in try_interfaces()
172 (*interface)->GetInterfaceSubClass(interface, &handle->info.ifc_subclass) != 0 || in try_interfaces()
173 (*interface)->GetInterfaceProtocol(interface, &handle->info.ifc_protocol) != 0) in try_interfaces()
[all …]
/system/core/adb/
Dusb_osx.c42 IOUSBInterfaceInterface **interface; member
304 CheckInterface(IOUSBInterfaceInterface **interface, UInt16 vendor, UInt16 product) in CheckInterface() argument
314 kr = (*interface)->USBInterfaceOpen(interface); in CheckInterface()
321 kr = (*interface)->GetNumEndpoints(interface, &interfaceNumEndpoints); in CheckInterface()
328 if ((*interface)->GetInterfaceClass(interface, &interfaceClass) != kIOReturnSuccess || in CheckInterface()
329 (*interface)->GetInterfaceSubClass(interface, &interfaceSubClass) != kIOReturnSuccess || in CheckInterface()
330 (*interface)->GetInterfaceProtocol(interface, &interfaceProtocol) != kIOReturnSuccess) { in CheckInterface()
352 kr = (*interface)->GetPipeProperties(interface, endpoint, &direction, in CheckInterface()
372 handle->interface = interface; in CheckInterface()
380 (*interface)->USBInterfaceClose(interface); in CheckInterface()
[all …]
Dusb_libusb.c50 int interface; member
218 libusb_release_interface(h->devh, h->interface); in usb_close()
242 libusb_release_interface(h->devh, h->interface); in usb_kick()
249 check_usb_interface(libusb_interface *interface, in check_usb_interface() argument
255 if (interface->num_altsetting == 0) { in check_usb_interface()
260 libusb_interface_descriptor *idesc = &interface->altsetting[0]; in check_usb_interface()
313 if (check_usb_interface(&config->interface[i], desc, uh) != -1) { in check_usb_interfaces()
440 if (config->interface != NULL) { in check_device()
476 uh.interface = found; in check_device()
478 r = libusb_claim_interface(uh.devh, uh.interface); in check_device()
[all …]
Dusb_linux.c158 struct usb_interface_descriptor* interface; in find_usb_device() local
214 interface = (struct usb_interface_descriptor *)bufptr; in find_usb_device()
224 interface->bInterfaceClass, interface->bInterfaceSubClass, in find_usb_device()
225 interface->bInterfaceProtocol, interface->bNumEndpoints); in find_usb_device()
227 if (interface->bNumEndpoints == 2 && in find_usb_device()
228 is_adb_interface(vid, pid, interface->bInterfaceClass, in find_usb_device()
229 interface->bInterfaceSubClass, interface->bInterfaceProtocol)) { in find_usb_device()
259 if(interface->bInterfaceProtocol == 0x01) { in find_usb_device()
292 interface->bInterfaceNumber, device->iSerialNumber, zero_mask); in find_usb_device()
562 int interface, int serial_index, unsigned zero_mask) in register_device() argument
[all …]
/system/core/libnetutils/
Ddhcp_utils.c51 void get_p2p_interface_replacement(const char *interface, char *p2p_interface) { in get_p2p_interface_replacement() argument
53 if (strncmp(interface, "p2p",3) == 0) { in get_p2p_interface_replacement()
56 strncpy(p2p_interface, interface, MAX_INTERFACE_LENGTH); in get_p2p_interface_replacement()
87 static int fill_ip_info(const char *interface, in fill_ip_info() argument
104 get_p2p_interface_replacement(interface, p2p_interface); in fill_ip_info()
186 int dhcp_do_request(const char *interface, in dhcp_do_request() argument
206 get_p2p_interface_replacement(interface, p2p_interface); in dhcp_do_request()
222 p2p_interface, DHCP_CONFIG_PATH, prop_value, interface); in dhcp_do_request()
225 p2p_interface, DHCP_CONFIG_PATH, interface); in dhcp_do_request()
246 if (fill_ip_info(interface, ipaddr, gateway, prefixLength, dns, in dhcp_do_request()
[all …]
/system/vold/
DCheckBattery.cpp39 sp<IBatteryPropertiesRegistrar> interface; variable
60 interface = interface_cast<IBatteryPropertiesRegistrar>(bs); in is_battery_ok()
61 if (interface == NULL) { in is_battery_ok()
71 status_t status = interface in is_battery_ok()
/system/core/include/usbhost/
Dusbhost.h180 int usb_device_claim_interface(struct usb_device *device, unsigned int interface);
183 int usb_device_release_interface(struct usb_device *device, unsigned int interface);
190 unsigned int interface, int connect);
196 int usb_device_set_interface(struct usb_device *device, unsigned int interface,
/system/core/adf/libadf/include/adf/
Dadf.h81 adf_id_t interface);
86 adf_id_t interface);
181 adf_id_t interface, adf_id_t **overlay_engines);
246 adf_id_t *interface, adf_id_t *overlay_engine);
/system/core/adf/libadf/
Dadf.c183 adf_id_t overlay_engine, adf_id_t interface, bool attach) in adf_device_attachment() argument
190 data.interface = interface; in adf_device_attachment()
200 adf_id_t interface) in adf_device_attach() argument
202 return adf_device_attachment(dev, overlay_engine, interface, true); in adf_device_attach()
206 adf_id_t interface) in adf_device_detach() argument
208 return adf_device_attachment(dev, overlay_engine, interface, false); in adf_device_detach()
243 ids_ret[n] = data.allowed_attachments[i].interface; in adf_interfaces_for_overlay_engine()
457 adf_id_t interface, adf_id_t **overlay_engines) in adf_overlay_engines_for_interface() argument
470 if (data.allowed_attachments[i].interface != interface) in adf_overlay_engines_for_interface()
712 adf_id_t interface, adf_id_t *overlay_engine) in adf_find_simple_post_overlay_engine() argument
[all …]

12