[Gd-chatter] r11636 - trunk/libraries/layer

hannes at gwydiondylan.org hannes at gwydiondylan.org
Fri Jan 18 13:17:17 CET 2008


Author: hannes
Date: Fri Jan 18 13:17:16 2008
New Revision: 11636

Modified:
   trunk/libraries/layer/dhcp.dylan
   trunk/libraries/layer/layer.dylan
Log:
Job: 7299
more fixes for the enum-fields..
dhcp-client is still broken.


Modified: trunk/libraries/layer/dhcp.dylan
==============================================================================
--- trunk/libraries/layer/dhcp.dylan	(original)
+++ trunk/libraries/layer/dhcp.dylan	Fri Jan 18 13:17:16 2008
@@ -10,7 +10,7 @@
                              frame :: <dhcp-message>)
   let message-type-frame = find-option(frame, <dhcp-message-type-option>);
   if (instance?(node.state, <selecting>))
-    if (frame.operation == #"boot-reply")
+    if (frame.operation == #"bootreply")
       if (message-type-frame.message-type == #"dhcpoffer")
         node.offer := frame;
         process-event(node, #"receive-offer");
@@ -20,7 +20,7 @@
   end;
   if (instance?(node.state, type-union(<requesting>, <rebinding>,
                                        <renewing>, <rebooting>)))
-    if (frame.operation == #"boot-reply")
+    if (frame.operation == #"bootreply")
       if (message-type-frame.message-type == #"dhcpack")
         process-event(node, #"receive-ack");
         node.received-response-callback(frame);

Modified: trunk/libraries/layer/layer.dylan
==============================================================================
--- trunk/libraries/layer/layer.dylan	(original)
+++ trunk/libraries/layer/layer.dylan	Fri Jan 18 13:17:16 2008
@@ -279,7 +279,7 @@
                                      (x.arp-mac-address = from-addr)
                                  end);
           let arp-request = make(<arp-frame>,
-                                 operation: 1,
+                                 operation: #"arp-request",
                                  source-mac-address: from-addr,
                                  source-ip-address: from-ip,
                                  target-ip-address: destination,
@@ -729,19 +729,19 @@
 define method push-data-aux (input :: <push-input>,
                              node :: <arp-handler>,
                              frame :: <container-frame>)
-  if (frame.operation = 1
+  if (frame.operation = #"arp-request"
       & frame.target-mac-address = mac-address("00:00:00:00:00:00"))
     let arp-entry = element(node.arp-table, frame.target-ip-address, default: #f);
     if (arp-entry & instance?(arp-entry, <advertised-arp-entry>))
       let arp-response = make(<arp-frame>,
-                              operation: 2,
+                              operation: #"arp-response",
                               target-mac-address: frame.source-mac-address,
                               target-ip-address: frame.source-ip-address,
                               source-mac-address: arp-entry.arp-mac-address,
                               source-ip-address: arp-entry.ip-address);
       send(node.send-socket, frame.source-mac-address, arp-response);
     end;
-  elseif (frame.operation = 2)
+  elseif (frame.operation = #"arp-response")
     with-lock(node.table-lock)
       let old-entry = element(node.arp-table, frame.source-ip-address, default: #f);
       if (instance?(old-entry, <outstanding-arp-request>))
@@ -789,7 +789,7 @@
   let arp-entry = element(arp-handler.arp-table, ip, default: #f);
   if (arp-entry)
     let arp-frame = make(<arp-frame>,
-                         operation: 1,
+                         operation: #"arp-request",
                          source-mac-address: arp-entry.arp-mac-address,
                          source-ip-address: arp-entry.ip-address,
                          target-mac-address: mac-address("00:00:00:00:00:00"),



More information about the chatter mailing list