/[pxelator]/lib/PXElator/ip.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/PXElator/ip.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 265 by dpavlin, Wed Aug 19 12:46:07 2009 UTC revision 278 by dpavlin, Thu Aug 20 19:44:19 2009 UTC
# Line 100  sub devices_up { Line 100  sub devices_up {
100          return @devs;          return @devs;
101  }  }
102    
103    sub default_route_dev {
104            my @routes = ip::lines 'route';
105    
106            return
107                    map { $_->{dev} }
108                    grep { $_->{route} eq 'default' }
109                    splice @routes, 1 # FIXME ship header
110            ;
111    }
112    
113    sub to_int {
114            pack( 'C*', split(/\./, shift) )
115    }
116    
117    sub from_int {
118            join( '.', unpack('C4', shift) )
119    }
120    
121  1;  1;

Legend:
Removed from v.265  
changed lines
  Added in v.278

  ViewVC Help
Powered by ViewVC 1.1.26