/[pxelator]/lib/PXElator/dhcpd.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/dhcpd.pm

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

revision 207 by dpavlin, Wed Aug 12 22:56:45 2009 UTC revision 208 by dpavlin, Wed Aug 12 23:59:01 2009 UTC
# Line 24  use Net::DHCP::Packet; Line 24  use Net::DHCP::Packet;
24  use Net::DHCP::Constants 0.67;  use Net::DHCP::Constants 0.67;
25    
26  use CouchDB;  use CouchDB;
27    use format;
28    
29  use server;  use server;
30  my $debug = server::debug;  my $debug = server::debug;
# Line 89  sub process_packet { Line 90  sub process_packet {
90          my $hostname = $dhcp->getOptionValue(DHO_HOST_NAME);          my $hostname = $dhcp->getOptionValue(DHO_HOST_NAME);
91          print "$ip ", client::conf( $ip => 'hostname', default => $hostname ), " >> /etc/hosts\n";          print "$ip ", client::conf( $ip => 'hostname', default => $hostname ), " >> /etc/hosts\n";
92    
93          my $audit = { mac => $mac, ip => $ip, hostname => $hostname };          my $audit = { mac => format::mac($mac), ip => $ip, hostname => $hostname };
         CouchDB::audit( 'request', $audit );  
94    
95  =for later  =for later
96    
# Line 186  sub process_packet { Line 186  sub process_packet {
186          $packet = new Net::DHCP::Packet( %$packet );          $packet = new Net::DHCP::Packet( %$packet );
187          warn "send ",$packet->toString() if $debug;          warn "send ",$packet->toString() if $debug;
188    
189          CouchDB::audit( 'response', $audit );          CouchDB::audit( $audit->{type}, $audit );
190    
191          my $reply = IO::Socket::INET->new(          my $reply = IO::Socket::INET->new(
192                  LocalAddr => $server::ip,                  LocalAddr => $server::ip,

Legend:
Removed from v.207  
changed lines
  Added in v.208

  ViewVC Help
Powered by ViewVC 1.1.26