<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Thanks, Simon<br>
    <br>
    I now have the prefix string printed.. So that's good, but no matter
    what I seem to put for the substring offset, there's nothing further
    printed. I'm scratching my head because I can see the text in the
    package and I just wish there was an easier way to extract it.<br>
    <br>
    Here's the raw:<br>
    0110  00 00 00 00 00 00 63 82 53 63 35 01 01 39 02 02  
    ......c.Sc5..9..<br>
    0120  4e 37 0a 01 1c a0 42 03 04 2a 02 06 0f 33 04 00  
    N7....B..*...3..<br>
    0130  00 a8 c0 3c 76 00 00 36 3d 71 01 07 50 6f 6c 79  
    ...<v..6=q..Poly<br>
    0140  63 6f 6d 02 15 53 6f 75 6e 64 50 6f 69 6e 74 49  
    com..SoundPointI<br>
    0150  50 2d 53 50 49 50 5f 33 33 30 03 10 32 33 34 35  
    P-SPIP_330..2345<br>
    0160  2d 31 32 32 30 30 2d 30 30 31 2c 31 04 1e 53 49  
    -12200-001,1..SI<br>
    0170  50 2f 33 2e 32 2e 34 2e 30 32 36 37 2f 33 31 2d  
    P/3.2.4.0267/31-<br>
    0180  4a 61 6e 2d 31 31 20 31 36 3a 34 33 05 1d 42 52   Jan-11
    16:43..BR<br>
    0190  2f 34 2e 32 2e 33 2e 30 30 30 33 2f 30 37 2d 4a  
    /4.2.3.0003/07-J<br>
    01a0  61 6e 2d 31 31 20 30 39 3a 32 36 7d 76 00 00 36   an-11
    09:26}v..6<br>
    01b0  3d 71 01 07 50 6f 6c 79 63 6f 6d 02 15 53 6f 75  
    =q..Polycom..Sou<br>
    01c0  6e 64 50 6f 69 6e 74 49 50 2d 53 50 49 50 5f 33  
    ndPointIP-SPIP_3<br>
    01d0  33 30 03 10 32 33 34 35 2d 31 32 32 30 30 2d 30  
    30..2345-12200-0<br>
    01e0  30 31 2c 31 04 1e 53 49 50 2f 33 2e 32 2e 34 2e  
    01,1..SIP/3.2.4.<br>
    01f0  30 32 36 37 2f 33 31 2d 4a 61 6e 2d 31 31 20 31  
    0267/31-Jan-11 1<br>
    0200  36 3a 34 33 05 1d 42 52 2f 34 2e 32 2e 33 2e 30  
    6:43..BR/4.2.3.0<br>
    0210  30 30 33 2f 30 37 2d 4a 61 6e 2d 31 31 20 30 39  
    003/07-Jan-11 09<br>
    0220  3a 32 36 ff 00 00 00 00 00 00 00 00 00 00 00 00  
    :26.............<br>
    0230  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  
    ................<br>
    <br>
    <br>
    Here it is in wireshark:(snip)<br>
    I've tried substring(8,7) which seems like it should work, but many
    other possibilitie as well.<br>
    maybe I should build up a custom option with 2 32 bit ints in the
    front to try to force it with a suboption? It doesn't seem like it
    should be this difficult.<br>
    <br>
    <img src="cid:part1.06080409.00040806@will.to" alt=""><br>
    <br>
    <div class="moz-cite-prefix">On 4/12/2016 2:53 AM, Simon Hobson
      wrote:<br>
    </div>
    <blockquote
      cite="mid:40BDE5B1-5F57-44EA-9E09-7964D3B8E21A@thehobsons.co.uk"
      type="cite">
      <pre wrap="">Doug Hughes <a class="moz-txt-link-rfc2396E" href="mailto:doug@will.to"><doug@will.to></a> wrote:

</pre>
      <blockquote type="cite">
        <pre wrap="">option option125 code 125 = string;

log (debug, concat("hw: ", binary-to-ascii(16,8,":", hardware)));
log (debug, concat("client-id: ", binary-to-ascii(16,8,":",substring(dhcp-client
-identifier,16,1))));
log (debug, concat("opt-125: ", substring(option125,1,7)));
log (debug, "check option125");

The only lines that output anything are the 'hw' line at the beginning and the plain old option125 at the end. The other 2 lines output nothing, not even the plain text.. I wish there was extra levels of debugging that I could turn on to see raw options processing.
</pre>
      </blockquote>
      <pre wrap="">
Try changing "substring(option125,1,7)" to "pick-first-value(substring(option125,1,7),"")" and see what happens (check the man page to make sure I've got that right). Ditto for client-id.
With concat, if any element is null, then the whole result is null, and so log won't log anything.

_______________________________________________
dhcp-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dhcp-users@lists.isc.org">dhcp-users@lists.isc.org</a>
<a class="moz-txt-link-freetext" href="https://lists.isc.org/mailman/listinfo/dhcp-users">https://lists.isc.org/mailman/listinfo/dhcp-users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>