Searched refs:interface (Results 1 - 25 of 32) sorted by relevance

12

/system/netd/server/
H A DLocalNetwork.cpp34 int LocalNetwork::addInterface(const std::string& interface) { argument
35 if (hasInterface(interface)) {
38 if (int ret = RouteController::addInterfaceToLocalNetwork(mNetId, interface.c_str())) {
39 ALOGE("failed to add interface %s to local netId %u", interface.c_str(), mNetId);
42 mInterfaces.insert(interface);
46 int LocalNetwork::removeInterface(const std::string& interface) { argument
47 if (!hasInterface(interface)) {
50 if (int ret = RouteController::removeInterfaceFromLocalNetwork(mNetId, interface.c_str())) {
51 ALOGE("failed to remove interface
[all...]
H A DPhysicalNetwork.cpp26 WARN_UNUSED_RESULT int addToDefault(unsigned netId, const std::string& interface, argument
28 if (int ret = RouteController::addInterfaceToDefaultNetwork(interface.c_str(), permission)) {
29 ALOGE("failed to add interface %s to default netId %u", interface.c_str(), netId);
32 if (int ret = delegate->addFallthrough(interface, permission)) {
38 WARN_UNUSED_RESULT int removeFromDefault(unsigned netId, const std::string& interface, argument
41 if (int ret = RouteController::removeInterfaceFromDefaultNetwork(interface.c_str(),
43 ALOGE("failed to remove interface %s from default netId %u", interface.c_str(), netId);
46 if (int ret = delegate->removeFallthrough(interface, permissio
124 addInterface(const std::string& interface) argument
142 removeInterface(const std::string& interface) argument
[all...]
H A 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);
H A DVirtualNetwork.cpp44 for (const std::string& interface : mInterfaces) {
45 if (int ret = RouteController::addUsersToVirtualNetwork(mNetId, interface.c_str(), mSecure,
47 ALOGE("failed to add users on interface %s of netId %u", interface.c_str(), mNetId);
56 for (const std::string& interface : mInterfaces) {
57 if (int ret = RouteController::removeUsersFromVirtualNetwork(mNetId, interface.c_str(),
59 ALOGE("failed to remove users on interface %s of netId %u", interface.c_str(), mNetId);
71 int VirtualNetwork::addInterface(const std::string& interface) { argument
72 if (hasInterface(interface)) {
84 removeInterface(const std::string& interface) argument
[all...]
H A DRouteController.h31 INTERFACE, // Compute the table number based on the interface index.
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, boo
[all...]
H A DNetwork.cpp32 bool Network::hasInterface(const std::string& interface) const {
33 return mInterfaces.find(interface) != mInterfaces.end();
44 std::string interface = *mInterfaces.begin(); local
45 if (int ret = removeInterface(interface)) {
H A DLocalNetwork.h29 int addInterface(const std::string& interface) override WARN_UNUSED_RESULT;
30 int removeInterface(const std::string& interface) override WARN_UNUSED_RESULT;
H A DInterfaceController.cpp43 int InterfaceController::writeIPv6ProcPath(const char *interface, const char *setting, const char *value) { argument
45 if (!isIfaceName(interface)) {
49 asprintf(&path, "%s/%s/%s", ipv6_proc_path, interface, setting);
55 int InterfaceController::setEnableIPv6(const char *interface, const int on) { argument
58 // addresses and routes and disables IPv6 on the interface.
60 return writeIPv6ProcPath(interface, "disable_ipv6", disable_ipv6);
63 int InterfaceController::setIPv6PrivacyExtensions(const char *interface, const int on) { argument
66 return writeIPv6ProcPath(interface, "use_tempaddr", on ? "2" : "0");
102 // If < 0: automatic. The absolute value is intepreted as an offset and added to the interface
103 // ID to get the table. If it's set to -1000, routes from interface I
112 setMtu(const char *interface, const char *mtu) argument
[all...]
H A DNetwork.h35 // clearInterfaces(), before deleting it. This is because interface removal may fail. If we
42 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;
H A DTetherController.h52 int tetherInterface(const char *interface);
53 int untetherInterface(const char *interface);
H A DVirtualNetwork.h44 int addInterface(const std::string& interface) override WARN_UNUSED_RESULT;
45 int removeInterface(const std::string& interface) override WARN_UNUSED_RESULT;
H A DRouteController.cpp122 uint32_t getRouteTableForInterface(const char* interface) { argument
123 uint32_t index = if_nametoindex(interface);
126 interfaceToTable[interface] = index;
129 // If the interface goes away if_nametoindex() will return 0 but we still need to know
131 auto iter = interfaceToTable.find(interface);
133 ALOGE("cannot find interface %s", interface);
237 ALOGE("interface name too long (%zu > %u)", *length, IFNAMSIZ);
250 // + If |iif| is non-NULL, the rule matches the specified incoming interface.
251 // + If |oif| is non-NULL, the rule matches the specified outgoing interface
335 modifyIpRoute(uint16_t action, uint32_t table, const char* interface, const char* destination, const char* nexthop) argument
428 modifyIncomingPacketMark(unsigned netId, const char* interface, Permission permission, bool add) argument
539 modifyOutputInterfaceRule(const char* interface, uint32_t table, Permission permission, uid_t uidStart, uid_t uidEnd, bool add) argument
672 modifyLocalNetwork(unsigned netId, const char* interface, bool add) argument
680 modifyPhysicalNetwork(unsigned netId, const char* interface, Permission permission, bool add) argument
701 modifyVirtualNetwork(unsigned netId, const char* interface, const UidRanges& uidRanges, bool secure, bool add, bool modifyNonUidBasedRules) argument
739 modifyDefaultNetwork(uint16_t action, const char* interface, Permission permission) argument
790 modifyRoute(uint16_t action, const char* interface, const char* destination, const char* nexthop, RouteController::TableType tableType) argument
828 flushRoutes(const char* interface) argument
899 addInterfaceToLocalNetwork(unsigned netId, const char* interface) argument
903 removeInterfaceFromLocalNetwork(unsigned netId, const char* interface) argument
907 addInterfaceToPhysicalNetwork(unsigned netId, const char* interface, Permission permission) argument
916 removeInterfaceFromPhysicalNetwork(unsigned netId, const char* interface, Permission permission) argument
928 addInterfaceToVirtualNetwork(unsigned netId, const char* interface, bool secure, const UidRanges& uidRanges) argument
938 removeInterfaceFromVirtualNetwork(unsigned netId, const char* interface, bool secure, const UidRanges& uidRanges) argument
951 modifyPhysicalNetworkPermission(unsigned netId, const char* interface, Permission oldPermission, Permission newPermission) argument
961 addUsersToVirtualNetwork(unsigned netId, const char* interface, bool secure, const UidRanges& uidRanges) argument
967 removeUsersFromVirtualNetwork(unsigned netId, const char* interface, bool secure, const UidRanges& uidRanges) argument
973 addInterfaceToDefaultNetwork(const char* interface, Permission permission) argument
977 removeInterfaceFromDefaultNetwork(const char* interface, Permission permission) argument
982 addRoute(const char* interface, const char* destination, const char* nexthop, TableType tableType) argument
987 removeRoute(const char* interface, const char* destination, const char* nexthop, TableType tableType) argument
[all...]
H A DClatdController.cpp37 int ClatdController::startClatd(char *interface) { argument
46 if (!isIfaceName(interface)) {
59 // Pass in the interface, a netid to use for DNS lookups, and a fwmark for outgoing packets.
60 unsigned netId = mNetCtrl->getNetworkForInterface(interface);
77 interface,
H A DClatdController.h27 int startClatd(char *interface);
H A 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;
80 // Routes are added to tables determined by the interface, so only |interface| is actually used.
81 // |netId| is given only to sanity check that the interface has the correct netId.
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,
H A DPhysicalNetwork.h47 int addInterface(const std::string& interface) override WARN_UNUSED_RESULT;
48 int removeInterface(const std::string& interface) override WARN_UNUSED_RESULT;
H A DTetherController.cpp289 int TetherController::tetherInterface(const char *interface) { argument
290 ALOGD("tetherInterface(%s)", interface);
291 if (!isIfaceName(interface)) {
295 mInterfaces->push_back(strdup(interface));
300 if (!strcmp(interface, *it)) {
312 int TetherController::untetherInterface(const char *interface) { argument
315 ALOGD("untetherInterface(%s)", interface);
318 if (!strcmp(interface, *it)) {
H A DNetworkController.cpp237 unsigned NetworkController::getNetworkForInterface(const char* interface) const {
240 if (entry.second->hasInterface(interface)) {
337 int NetworkController::addInterfaceToNetwork(unsigned netId, const char* interface) { argument
343 unsigned existingNetId = getNetworkForInterface(interface);
345 ALOGE("interface %s already assigned to netId %u", interface, existingNetId);
350 return getNetworkLocked(netId)->addInterface(interface);
353 int NetworkController::removeInterfaceFromNetwork(unsigned netId, const char* interface) { argument
360 return getNetworkLocked(netId)->removeInterface(interface);
438 int NetworkController::addRoute(unsigned netId, const char* interface, cons argument
443 removeRoute(unsigned netId, const char* interface, const char* destination, const char* nexthop, bool legacy, uid_t uid) argument
523 modifyRoute(unsigned netId, const char* interface, const char* destination, const char* nexthop, bool add, bool legacy, uid_t uid) argument
[all...]
/system/core/fastboot/
H A Dusb_osx.c61 IOUSBInterfaceInterface190 **interface; member in struct:usb_handle
73 IOUSBInterfaceInterface190 **interface = NULL; local
99 ERR("Couldn't create a device interface iterator: (%08x)\n", kr);
120 // Now create the interface interface for the interface
124 (LPVOID) &interface);
129 if (result || !interface) {
130 ERR("Couldn't create interface interface
[all...]
/system/vold/
H A DCheckBattery.cpp39 sp<IBatteryPropertiesRegistrar> interface; member in namespace:__anon363
60 interface = interface_cast<IBatteryPropertiesRegistrar>(bs);
61 if (interface == NULL) {
62 SLOGE("No IBatteryPropertiesRegistrar interface");
71 status_t status = interface
/system/core/adb/
H A Dusb_osx.c42 IOUSBInterfaceInterface **interface; member in struct:usb_handle
78 //* adb interface
88 //* Match based on vendor id, interface subclass and protocol
137 //* Create an intermediate interface plugin
144 DBG("ERR: Unable to create an interface plug-in (%08x)\n", kr);
148 //* This gets us the interface object
152 //* We only needed the plugin to get the interface, so discard it
155 DBG("ERR: Couldn't query the interface (%08x)\n", (int) result);
160 //* device; after getting a plugin, and querying the interface, of
165 DBG("ERR: Couldn't grab device from interface (
304 CheckInterface(IOUSBInterfaceInterface **interface, UInt16 vendor, UInt16 product) argument
[all...]
H A Dusb_libusb.c50 int interface; member in struct:usb_handle
218 libusb_release_interface(h->devh, h->interface);
242 libusb_release_interface(h->devh, h->interface);
249 check_usb_interface(libusb_interface *interface, argument
255 if (interface->num_altsetting == 0) {
256 D("check_usb_interface(): No interface settings\n");
260 libusb_interface_descriptor *idesc = &interface->altsetting[0];
284 D("check_usb_interface(): Forced Android interface protocol v.1\n");
313 if (check_usb_interface(&config->interface[i], desc, uh) != -1) {
314 /* found some interface an
[all...]
/system/core/libnetutils/
H A Ddhcp_utils.c37 /* interface length for dhcpcd daemon start (dhcpcd_<interface> as defined in init.rc file)
38 * or for filling up system properties dhcpcd.<interface>.ipaddress, dhcpcd.<interface>.dns1
44 * P2p interface names increase sequentially p2p-p2p0-1, p2p-p2p0-2.. after
47 * interface to be pre-defined in init.rc file.
51 void get_p2p_interface_replacement(const char *interface, char *p2p_interface) { argument
52 /* Use p2p for any interface starting with p2p. */
53 if (strncmp(interface, "p2p",3) == 0) {
56 strncpy(p2p_interface, interface, MAX_INTERFACE_LENGT
87 fill_ip_info(const char *interface, char *ipaddr, char *gateway, uint32_t *prefixLength, char *dns[], char *server, uint32_t *lease, char *vendorInfo, char *domain, char *mtu) argument
186 dhcp_do_request(const char *interface, char *ipaddr, char *gateway, uint32_t *prefixLength, char *dns[], char *server, uint32_t *lease, char *vendorInfo, char *domain, char *mtu) argument
260 dhcp_stop(const char *interface) argument
294 dhcp_release_lease(const char *interface) argument
330 dhcp_do_request_renew(const char *interface, char *ipaddr, char *gateway, uint32_t *prefixLength, char *dns[], char *server, uint32_t *lease, char *vendorInfo, char *domain, char *mtu) argument
[all...]
/system/core/include/usbhost/
H A Dusbhost.h179 /* Claims the specified interface of a USB device */
180 int usb_device_claim_interface(struct usb_device *device, unsigned int interface);
182 /* Releases the specified interface of a USB device */
183 int usb_device_release_interface(struct usb_device *device, unsigned int interface);
185 /* Requests the kernel to connect or disconnect its driver for the specified interface.
190 unsigned int interface, int connect);
195 /* Sets the specified interface of a USB device */
196 int usb_device_set_interface(struct usb_device *device, unsigned int interface,
/system/core/adf/libadf/include/adf/
H A Dadf.h78 * Attaches the specified interface and overlay engine.
81 adf_id_t interface);
83 * Detaches the specified interface and overlay engine.
86 adf_id_t interface);
91 * The caller must free() the returned list of interface IDs.
99 * The caller must free() the returned list of interface IDs.
107 * interface IDs. The caller must free() the returned list of interface IDs.
117 * The caller must free() the returned list of interface IDs.
123 * Opens an ADF interface
[all...]

Completed in 302 milliseconds

12