/system/netd/server/ |
D | PhysicalNetwork.cpp | 26 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 …]
|
D | ClatdController.cpp | 46 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 …]
|
D | VirtualNetwork.cpp | 44 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 …]
|
D | LocalNetwork.cpp | 34 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()
|
D | RouteController.h | 41 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 …]
|
D | RouteController.cpp | 132 uint32_t getRouteTableForInterface(const char* interface) { in getRouteTableForInterface() argument 133 uint32_t index = if_nametoindex(interface); in getRouteTableForInterface() 136 interfaceToTable[interface] = index; in getRouteTableForInterface() 141 auto iter = interfaceToTable.find(interface); in getRouteTableForInterface() 143 ALOGE("cannot find interface %s", interface); in getRouteTableForInterface() 346 WARN_UNUSED_RESULT int modifyIpRoute(uint16_t action, uint32_t table, const char* interface, in modifyIpRoute() argument 379 interface = OIF_NONE; in modifyIpRoute() 383 interface = OIF_NONE; in modifyIpRoute() 387 if (interface != OIF_NONE) { in modifyIpRoute() 388 ifindex = if_nametoindex(interface); in modifyIpRoute() [all …]
|
D | InterfaceController.cpp | 109 int InterfaceController::setEnableIPv6(const char *interface, const int on) { in setEnableIPv6() argument 110 if (!isIfaceName(interface)) { in setEnableIPv6() 118 return writeValueToPath(ipv6_proc_path, interface, "disable_ipv6", disable_ipv6); in setEnableIPv6() 121 int InterfaceController::setIPv6PrivacyExtensions(const char *interface, const int on) { in setIPv6PrivacyExtensions() argument 122 if (!isIfaceName(interface)) { in setIPv6PrivacyExtensions() 128 return writeValueToPath(ipv6_proc_path, interface, "use_tempaddr", on ? "2" : "0"); in setIPv6PrivacyExtensions() 134 int InterfaceController::setIPv6NdOffload(char* interface, const int on) { in setIPv6NdOffload() argument 140 interface, in setIPv6NdOffload() 147 (on ? "enabling" : "disabling"), interface, ret, strerror(errno)); in setIPv6NdOffload() 169 int InterfaceController::setMtu(const char *interface, const char *mtu) in setMtu() argument [all …]
|
D | InterfaceController.h | 24 int setEnableIPv6(const char *interface, const int on); 25 int setIPv6PrivacyExtensions(const char *interface, const int on); 26 int setIPv6NdOffload(char* interface, const int on); 27 int setMtu(const char *interface, const char *mtu);
|
D | ClatdController.h | 29 int startClatd(char *interface); 30 int stopClatd(char* interface); 31 bool isClatdStarted(char* interface); 36 pid_t getClatdPid(char* interface);
|
D | Network.cpp | 32 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()
|
D | NetworkController.h | 60 unsigned getNetworkForInterface(const char* interface) const; 67 int addInterfaceToNetwork(unsigned netId, const char* interface) WARN_UNUSED_RESULT; 68 int removeInterfaceFromNetwork(unsigned netId, const char* interface) WARN_UNUSED_RESULT; 84 int addRoute(unsigned netId, const char* interface, const char* destination, 86 int removeRoute(unsigned netId, const char* interface, const char* destination, 100 int modifyRoute(unsigned netId, const char* interface, const char* destination,
|
D | Network.h | 43 bool hasInterface(const std::string& interface) const; 47 virtual int addInterface(const std::string& interface) WARN_UNUSED_RESULT = 0; 48 virtual int removeInterface(const std::string& interface) WARN_UNUSED_RESULT = 0;
|
D | NetworkController.cpp | 264 unsigned NetworkController::getNetworkForInterface(const char* interface) const { in getNetworkForInterface() 267 if (entry.second->hasInterface(interface)) { in getNetworkForInterface() 364 int NetworkController::addInterfaceToNetwork(unsigned netId, const char* interface) { in addInterfaceToNetwork() argument 370 unsigned existingNetId = getNetworkForInterface(interface); in addInterfaceToNetwork() 372 ALOGE("interface %s already assigned to netId %u", interface, existingNetId); in addInterfaceToNetwork() 377 return getNetworkLocked(netId)->addInterface(interface); in addInterfaceToNetwork() 380 int NetworkController::removeInterfaceFromNetwork(unsigned netId, const char* interface) { in removeInterfaceFromNetwork() argument 387 return getNetworkLocked(netId)->removeInterface(interface); in removeInterfaceFromNetwork() 465 int NetworkController::addRoute(unsigned netId, const char* interface, const char* destination, in addRoute() argument 467 return modifyRoute(netId, interface, destination, nexthop, true, legacy, uid); in addRoute() [all …]
|
D | TetherController.cpp | 310 int TetherController::tetherInterface(const char *interface) { in tetherInterface() argument 311 ALOGD("tetherInterface(%s)", interface); in tetherInterface() 312 if (!isIfaceName(interface)) { in tetherInterface() 316 mInterfaces->push_back(strdup(interface)); in tetherInterface() 321 if (!strcmp(interface, *it)) { in tetherInterface() 333 int TetherController::untetherInterface(const char *interface) { in untetherInterface() argument 336 ALOGD("untetherInterface(%s)", interface); in untetherInterface() 339 if (!strcmp(interface, *it)) { in untetherInterface()
|
D | LocalNetwork.h | 29 int addInterface(const std::string& interface) override WARN_UNUSED_RESULT; 30 int removeInterface(const std::string& interface) override WARN_UNUSED_RESULT;
|
/system/core/fastboot/ |
D | usb_osx.c | 61 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/ |
D | usb_osx.cpp | 44 IOUSBInterfaceInterface **interface; member 301 CheckInterface(IOUSBInterfaceInterface **interface, UInt16 vendor, UInt16 product) in CheckInterface() argument 311 kr = (*interface)->USBInterfaceOpen(interface); in CheckInterface() 318 kr = (*interface)->GetNumEndpoints(interface, &interfaceNumEndpoints); in CheckInterface() 325 if ((*interface)->GetInterfaceClass(interface, &interfaceClass) != kIOReturnSuccess || in CheckInterface() 326 (*interface)->GetInterfaceSubClass(interface, &interfaceSubClass) != kIOReturnSuccess || in CheckInterface() 327 (*interface)->GetInterfaceProtocol(interface, &interfaceProtocol) != kIOReturnSuccess) { in CheckInterface() 350 kr = (*interface)->GetPipeProperties(interface, endpoint, &direction, in CheckInterface() 370 handle->interface = interface; in CheckInterface() 378 (*interface)->USBInterfaceClose(interface); in CheckInterface() [all …]
|
D | usb_linux.cpp | 152 struct usb_interface_descriptor* interface; in find_usb_device() local 208 interface = (struct usb_interface_descriptor *)bufptr; in find_usb_device() 218 interface->bInterfaceClass, interface->bInterfaceSubClass, in find_usb_device() 219 interface->bInterfaceProtocol, interface->bNumEndpoints); in find_usb_device() 221 if (interface->bNumEndpoints == 2 && in find_usb_device() 222 is_adb_interface(vid, pid, interface->bInterfaceClass, in find_usb_device() 223 interface->bInterfaceSubClass, interface->bInterfaceProtocol)) { in find_usb_device() 265 if(interface->bInterfaceProtocol == 0x01) { in find_usb_device() 298 interface->bInterfaceNumber, device->iSerialNumber, zero_mask); in find_usb_device() 572 int interface, int serial_index, in register_device() argument [all …]
|
/system/core/libnetutils/ |
D | dhcp_utils.c | 51 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() 89 static int fill_ip_info(const char *interface, in fill_ip_info() argument 106 get_p2p_interface_replacement(interface, p2p_interface); in fill_ip_info() 174 int dhcp_get_results(const char *interface, in dhcp_get_results() argument 190 get_p2p_interface_replacement(interface, p2p_interface); in dhcp_get_results() 201 if (fill_ip_info(interface, ipaddr, gateway, prefixLength, dns, in dhcp_get_results() 221 int dhcp_start(const char *interface) in dhcp_start() argument 232 get_p2p_interface_replacement(interface, p2p_interface); in dhcp_start() [all …]
|
D | dhcptool.c | 30 char* interface = argv[1]; in main() local 32 error(EXIT_FAILURE, errno, "dhcptool %s: ifc_init failed", interface); in main() 35 int rc = do_dhcp(interface); in main() 37 error(0, errno, "dhcptool %s: do_dhcp failed", interface); in main()
|
/system/bt/hci/src/ |
D | hci_hal_h4.c | 35 static const hci_hal_t interface; variable 89 interface.close(); in hal_open() 191 static const hci_hal_t interface = { variable 204 return &interface; in hci_hal_h4_get_interface() 209 return &interface; in hci_hal_h4_get_test_interface()
|
D | buffer_allocator.c | 30 static const allocator_t interface = { variable 36 return &interface; in buffer_allocator_get_interface()
|
D | hci_layer.c | 108 static hci_t interface; variable 237 vendor->open(btif_local_bd_addr.address, &interface); in start_up() 245 if (!hci_inject->open(&interface)) { in start_up() 501 data_dispatcher_dispatch(interface.event_dispatcher, packet->event & MSG_EVT_MASK, packet); in fragmenter_transmit_finished() 611 interface.event_dispatcher, in hal_says_data_ready() 746 interface.send_low_power_command = low_power_manager->post_command; in init_layer_interface() 747 interface.do_postload = do_postload; in init_layer_interface() 751 interface.event_dispatcher = data_dispatcher_new("hci_layer"); in init_layer_interface() 752 if (!interface.event_dispatcher) { in init_layer_interface() 757 interface.set_data_queue = set_data_queue; in init_layer_interface() [all …]
|
D | hci_hal_mct.c | 36 static const hci_hal_t interface; variable 113 interface.close(); in hal_open() 190 static const hci_hal_t interface = { variable 203 return &interface; in hci_hal_mct_get_interface() 208 return &interface; in hci_hal_mct_get_test_interface()
|
/system/core/include/usbhost/ |
D | usbhost.h | 184 int usb_device_claim_interface(struct usb_device *device, unsigned int interface); 187 int usb_device_release_interface(struct usb_device *device, unsigned int interface); 194 unsigned int interface, int connect); 200 int usb_device_set_interface(struct usb_device *device, unsigned int interface,
|