route.c File Reference

Routing table management. More...

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

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER)
void route (void)


Detailed Description

Routing table management.

Definition in file route.c.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER   ) 

void route ( void   ) 

Definition at line 32 of file route.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.

Referenced by netboot(), and route_exec().

00032                     {
00033         struct ipv4_miniroute *miniroute;
00034 
00035         list_for_each_entry ( miniroute, &ipv4_miniroutes, list ) {
00036                 printf ( "%s: %s/", miniroute->netdev->name,
00037                          inet_ntoa ( miniroute->address ) );
00038                 printf ( "%s", inet_ntoa ( miniroute->netmask ) );
00039                 if ( miniroute->gateway.s_addr )
00040                         printf ( " gw %s", inet_ntoa ( miniroute->gateway ) );
00041                 if ( ! netdev_is_open ( miniroute->netdev ) )
00042                         printf ( " (inaccessible)" );
00043                 printf ( "\n" );
00044         }
00045 }


Generated on Tue Apr 6 20:01:57 2010 for gPXE by  doxygen 1.5.7.1