#include #include "netsimul.h" static CONFIG_FILE f_routes ("/proc/net/route",help_nil,CONFIGF_OPTIONAL); /* Read the current routing table */ PUBLIC int ROUTES::read () { ROUTES *routes; glocal.routes = this; (f_routes.getpath(),true); if (noline > 0){ char inter[20],dummy[20]; unsigned long dest,mask,gtw; int flags; if (sscanf (line,"%s %lx %lx %d %s %s %s %lx",inter,&dest,>w ,&flags,dummy,dummy,dummy,&mask)==8){ glocal.routes->add (new ROUTE(inter,dest,mask,gtw,flags)); } } }