<html><head><title>Re: Logging GI-Addr</title>
</head>
<body>
<table bgcolor="#ffffff">
<tr>
<td width=2 bgcolor= #0000ff><br>
</td>
<td><span style=" font-family:'courier new'; font-size: 9pt; color: #993300;">"  GIaddr:", pick-first-value(binary-to-ascii(10, 8, ".", packet(24,4)), "(none)")</td>
</tr>
</table>
<br><br>
<span style=" font-family:'Courier New'; font-size: 9pt;">So, let me break this down, and see if I understand it correctly.<br>
Starting from the inside...<br>
<br>
Offset into the packet 24 bytes, and return 4 bytes [4 octets]. <br>
---<br>
  I think this means that the OP, HType, HLen and HOPS, [4 bytes / 1 octet [each] *4]<br>
  XID [4 octets / 4 bytes]<br>
  SECs and FLAGs [4 bytes, 2 octets each*2]<br>
  Then continue to offset past the CIADDR, YADDR & SIADDR (Four octets, 4 bytes each in IPV4) to get to the GIAddr, at byte 24. <br>
  Grab 4 bytes, 4 octets<br>
<br>
  [The wikipedia page on dhcp is pretty handy here! </span><a style=" font-family:'Courier New'; font-size: 9pt;" href="https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol">https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol</a><span style=" font-family:'Courier New'; font-size: 9pt;"> ]<br>
---<br>
<br>
Convert from binary to ASCII from base 8 to base 10. Separate the items with "."<br>
<br>
Grab the first non-null output from that output of binary-to-ascii.<br>
If there's no GIAddr in this packet, return "(none)"<br>
<br>
Do I have that right?<br>
<br>
Thanks so much!<br>
<br>
-Greg<br>
<br>
<br>
<br>
</body></html>