Lines Matching refs:interface

97 	while (Interface* interface = iterator.Next()) {
98 dprintf("%p: %s, %ld\n", interface, interface->name,
99 interface->CountReferences());
116 Interface* interface = NULL;
119 while ((interface = iterator.Next()) != NULL) {
120 if (!strcmp(argv[1], interface->name))
124 if (interface == NULL)
125 interface = (Interface*)parse_expression(argv[1]);
127 interface->Dump();
137 while (Interface* interface = iterator.Next()) {
138 kprintf("%p %s\n", interface, interface->name);
173 kprintf("interface address: %p\n", route->interface_address);
203 if (interface != NULL && (flags & IFAF_DIRECT_ADDRESS) == 0)
204 ((Interface*)interface)->ReleaseReference();
267 /*! Adds the default routes that every interface address needs, ie. the local
334 kprintf("interface: %p (%s)\n ", interface,
335 interface != NULL ? interface->name : "-");
432 TRACE("InterfaceAddress %p: init interface %p, domain %p\n", this,
435 interface = netInterface;
442 if (interface != NULL)
443 ((Interface*)interface)->AcquireReference();
455 TRACE("Interface %p: new \"%s\", device interface %p\n", this,
474 // unloaded as long as an interface exists
529 /*! Returns a reference to the first unconfigured address of this interface
768 // TODO: maybe allow deleting IFF_BROADCAST on the interface
820 // address added here will still be added to the interface.
885 // interface might use the same address.
912 // address added here will still be added to the interface.
961 interface routes here.
1006 // provide its link back to the interface
1011 datalink->direct_address.interface = this;
1030 // Note: domain datalinks cannot be removed while the interface is alive,
1186 /*! Searches for a specific interface by name.
1187 You need to have the interface list's lock hold when calling this function.
1195 while (Interface* interface = iterator.Next()) {
1196 if (!strcmp(interface->name, name))
1197 return interface;
1204 /*! Searches for a specific interface by index.
1205 You need to have the interface list's lock hold when calling this function.
1213 while (Interface* interface = iterator.Next()) {
1214 if (interface->index == index)
1215 return interface;
1234 Interface* interface
1236 if (interface == NULL)
1239 sInterfaces.Add(interface);
1240 interface->AcquireReference();
1241 // We need another reference to be able to use the interface without
1246 status_t status = add_interface_address(interface, domain, request);
1248 notify_interface_added(interface);
1251 sInterfaces.Remove(interface);
1253 interface->ReleaseReference();
1256 interface->ReleaseReference();
1262 /*! Removes the interface from the list, and puts the stack's reference to it.
1265 remove_interface(Interface* interface)
1267 interface->SetDown();
1268 interface->RemoveAddresses();
1271 sInterfaces.Remove(interface);
1274 notify_interface_removed(interface);
1276 interface->ReleaseReference();
1280 /*! This is called whenever a device interface is being removed. We will get
1288 Interface* interface = find_interface(deviceInterface->device->name);
1289 if (interface != NULL)
1290 remove_interface(interface);
1295 add_interface_address(Interface* interface, net_domain_private* domain,
1307 RecursiveLocker locker(interface->Lock());
1310 = new(std::nothrow) InterfaceAddress(interface, domain);
1316 status = interface->CreateDomainDatalinkIfNeeded(domain);
1318 status = interface->AddAddress(address);
1322 domain_datalink* datalink = interface->DomainDatalink(domain->family);
1328 interface->RemoveAddress(address);
1331 notify_interface_changed(interface);
1350 // set logical interface address
1355 Interface* interface = (Interface*)interfaceAddress->interface;
1366 interface->RemoveAddress(interfaceAddress);
1405 notify_interface_changed(interface);
1419 Interface* interface;
1421 interface = sInterfaces.First();
1423 interface = find_interface(index);
1424 if (interface == NULL || interface->IsBusy())
1430 BReference<Interface> interfaceRef(interface);
1433 if (interface->CreateDomainDatalinkIfNeeded(domain) != B_OK)
1445 Interface* interface = find_interface(name);
1446 if (interface == NULL || interface->IsBusy())
1450 BReference<Interface> interfaceRef(interface);
1453 if (interface->CreateDomainDatalinkIfNeeded(domain) != B_OK)
1466 while (Interface* interface = iterator.Next()) {
1467 if (interface->device->index == index) {
1468 if (interface->IsBusy())
1472 BReference<Interface> interfaceRef(interface);
1475 if (interface->CreateDomainDatalinkIfNeeded(domain) != B_OK)
1487 The link address is checked against its hardware address, or its interface
1488 name, or finally the interface index.
1498 while (Interface* interface = iterator.Next()) {
1499 if (interface->IsBusy())
1501 // Test if the hardware address matches, or if the given interface
1503 if ((linkAddress.sdl_alen == interface->device->address.length
1504 && memcmp(LLADDR(&linkAddress), interface->device->address.data,
1507 && !strcmp(interface->name, (const char*)linkAddress.sdl_data))
1509 && linkAddress.sdl_index == interface->index)) {
1510 if (interface->IsBusy())
1514 BReference<Interface> interfaceRef(interface);
1517 if (interface->CreateDomainDatalinkIfNeeded(domain) != B_OK)
1552 while (Interface* interface = iterator.Next()) {
1553 if (interface->IsBusy())
1557 = interface->AddressForDestination(domain, destination);
1567 belongs to the interface identified via \a linkAddress. Only the hardware
1570 If \a unconfiguredOnly is set, the interface address must not yet be
1582 while (Interface* interface = iterator.Next()) {
1583 if (interface->IsBusy())
1585 // Test if the hardware address matches, or if the given interface
1587 if (linkAddress.sdl_alen == interface->device->address.length
1588 && memcmp(LLADDR(&linkAddress), interface->device->address.data,
1590 TRACE(" %s matches\n", interface->name);
1593 return interface->FirstUnconfiguredForFamily(domain->family);
1595 return interface->FirstForFamily(domain->family);
1624 while (Interface* interface = iterator.Next()) {
1626 buffer.Push(interface->name, IF_NAMESIZE);
1629 InterfaceAddress* address = interface->FirstForFamily(family);
1648 // interface for compatibility with other platforms
1676 "Dump the given network interface");
1680 "Dump all local interface addresses");