<br><div class="gmail_quote">On Sun, Jul 10, 2011 at 1:59 PM, Littlefield, Tyler <span dir="ltr"><<a href="mailto:tyler@tysdomain.com">tyler@tysdomain.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello all:<br>
I'm working on a server that will need to parse packets sent from a client, and construct it's own packets.<br></blockquote><div><br>I like to use this module (I wrote while in the employ of UCI, so it's under a UCI - BSDesque - license, but they've given redistribution permission so long as the module is under their license) to extract pieces from a data source with varied field lengths:<br>
<br><a href="http://stromberg.dnsalias.org/~dstromberg/bufsock.html">http://stromberg.dnsalias.org/~dstromberg/bufsock.html</a><br><br><br>I use it often with TCP.  For UDP, I'd probably catentate the blocks recieved and then pull data back out of the aggregate using bufsock - to deal with the possibility of fragmentation or aggregation in transit.<br>
<br><br></div></div>