[netdevice] Add netdev_is_open() wrapper function

Signed-off-by: Michael Brown <mcb30@etherboot.org>
This commit is contained in:
Michael Brown
2010-03-23 00:46:23 +00:00
parent b3533dd2bb
commit 88e436376c
10 changed files with 28 additions and 17 deletions

View File

@@ -118,7 +118,7 @@ static struct ipv4_miniroute * ipv4_route ( struct in_addr *dest ) {
/* Find first usable route in routing table */
list_for_each_entry ( miniroute, &ipv4_miniroutes, list ) {
if ( ! ( miniroute->netdev->state & NETDEV_OPEN ) )
if ( ! netdev_is_open ( miniroute->netdev ) )
continue;
local = ( ( ( dest->s_addr ^ miniroute->address.s_addr )
& miniroute->netmask.s_addr ) == 0 );