in reply to Re: How to create DNS packet
in thread How to create DNS packet

Use "C a*" when supplying length/label pairs in @labels (as in the first snippet), or "C/a*" when supplying labels only (as in the second snippet). In the latter case, the length bytes will automatically be generated.  (Note that the length bytes (when < 32) might map to non-printable control characters if you try to print them as ASCII... so you probably want to visualize the data in hex representation.)

I'm no expert in DNS packet format nitty gritties, but the latter snippet looks okay to me...  What exactly doesn't work; any error messages?