]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1862] fixed documentation
authorRazvan Becheriu <razvan@isc.org>
Wed, 26 May 2021 11:30:22 +0000 (14:30 +0300)
committerAndrei Pavel <andrei@isc.org>
Thu, 27 May 2021 17:11:53 +0000 (20:11 +0300)
doc/sphinx/arm/hooks.rst

index a9269b569876650666300c12af19dee8f2effeff..f852a42de323fb88d6258b208de6a25ecd80d468 100644 (file)
@@ -950,7 +950,8 @@ Examples:
 
    "request-parser-format":
        "ifelse(pkt4.msgtype == 4 or pkt4.msgtype == 7,
-            'Address: ' + addrtotext(pkt4.ciaddr) + ' has been released from a device with hardware address: hwtype=' + substring(hexstring(pkt4.htype, ''), 7, 1) + ' ' + hexstring(pkt4.mac, ':') +
+            'Address: ' +
+                ifelse(option[50].exists, addrtotext(option[50].hex), addrtotext(pkt4.ciaddr)) + ' has been released from a device with hardware address: hwtype=' + substring(hexstring(pkt4.htype, ''), 7, 1) + ' ' + hexstring(pkt4.mac, ':') +
                 ifelse(option[61].exists, ', client-id: ' + hexstring(option[61].hex, ':'), '') +
                 ifelse(pkt4.giaddr == 0.0.0.0, '', ' connected via relay at address: ' + addrtotext(pkt4.giaddr) +
                     ifelse(option[82].option[1].exists, ', circuit-id: ' + hexstring(option[82].option[1].hex, ':'), '') +
@@ -990,14 +991,16 @@ Examples:
 
    "request-parser-format":
        "ifelse(pkt4.msgtype == 3,
-            'Address: ' + addrtotext(option[50].hex) + ' has been assigned to a device with hardware address: hwtype=' + substring(hexstring(pkt4.htype, ''), 7, 1) + ' ' + hexstring(pkt4.mac, ':') +
+            'Address: ' +
+                ifelse(option[50].exists, addrtotext(option[50].hex), addrtotext(pkt4.ciaddr)) + ' has been assigned for ' + uint32totext(option[51].hex) + ' seconds to a device with hardware address: hwtype=' + substring(hexstring(pkt4.htype, ''), 7, 1) + ' ' + hexstring(pkt4.mac, ':') +
                 ifelse(option[61].exists, ', client-id: ' + hexstring(option[61].hex, ':'), '') +
                 ifelse(pkt4.giaddr == 0.0.0.0, '', ' connected via relay at address: ' + addrtotext(pkt4.giaddr) +
                     ifelse(option[82].option[1].exists, ', circuit-id: ' + hexstring(option[82].option[1].hex, ':'), '') +
                     ifelse(option[82].option[2].exists, ', remote-id: ' + hexstring(option[82].option[2].hex, ':'), '') +
                     ifelse(option[82].option[6].exists, ', subscriber-id: ' + hexstring(option[82].option[6].hex, ':'), '')),
             ifelse(pkt4.msgtype == 4 or pkt4.msgtype == 7,
-                'Address: ' + addrtotext(pkt4.ciaddr) + ' has been released from a device with hardware address: hwtype=' + substring(hexstring(pkt4.htype, ''), 7, 1) + ' ' + hexstring(pkt4.mac, ':') +
+                'Address: ' +
+                    ifelse(option[50].exists, addrtotext(option[50].hex), addrtotext(pkt4.ciaddr)) + ' has been released from a device with hardware address: hwtype=' + substring(hexstring(pkt4.htype, ''), 7, 1) + ' ' + hexstring(pkt4.mac, ':') +
                     ifelse(option[61].exists, ', client-id: ' + hexstring(option[61].hex, ':'), '') +
                     ifelse(pkt4.giaddr == 0.0.0.0, '', ' connected via relay at address: ' + addrtotext(pkt4.giaddr) +
                         ifelse(option[82].option[1].exists, ', circuit-id: ' + hexstring(option[82].option[1].hex, ':'), '') +