iPXE
Functions
route_ipv4.c File Reference

IPv4 routing management. More...

#include <stdio.h>
#include <ipxe/netdevice.h>
#include <ipxe/ip.h>
#include <usr/route.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
static void route_ipv4_print (struct net_device *netdev)
 Print IPv4 routing table.
struct routing_family
ipv4_routing_family 
__routing_family (ROUTING_IPV4)
 IPv4 routing family.

Detailed Description

IPv4 routing management.

Definition in file route_ipv4.c.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
static void route_ipv4_print ( struct net_device netdev) [static]

Print IPv4 routing table.

Parameters:
netdevNetwork device

Definition at line 42 of file route_ipv4.c.

References ipv4_miniroute::address, ipv4_miniroute::gateway, inet_ntoa(), ipv4_miniroutes, ipv4_miniroute::list, list_for_each_entry, net_device::name, ipv4_miniroute::netdev, netdev_is_open(), ipv4_miniroute::netmask, printf(), and in_addr::s_addr.

                                                           {
        struct ipv4_miniroute *miniroute;

        list_for_each_entry ( miniroute, &ipv4_miniroutes, list ) {
                if ( miniroute->netdev != netdev )
                        continue;
                printf ( "%s: %s/", netdev->name,
                         inet_ntoa ( miniroute->address ) );
                printf ( "%s", inet_ntoa ( miniroute->netmask ) );
                if ( miniroute->gateway.s_addr )
                        printf ( " gw %s", inet_ntoa ( miniroute->gateway ) );
                if ( ! netdev_is_open ( miniroute->netdev ) )
                        printf ( " (inaccessible)" );
                printf ( "\n" );
        }
}
struct routing_family ipv4_routing_family __routing_family ( ROUTING_IPV4  ) [read]

IPv4 routing family.