GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
scan_netstring(3) FreeBSD Library Functions Manual scan_netstring(3)

scan_netstring - parse a netstring

#include <libowfat/scan.h>

size_t scan_netstring(const char *in,size_t len,char** dest, size_t *slen);

scan_netstring attempts to parse the netstring in the input buffer (in,len). If the buffer contains a valid netstring, then (*dest,*slen) is set to the start and length of the transported string.

Note that this string is not zero terminated. No copy is made. scan_netstring points it inside the input buffer.

scan_netstring returns the number of bytes in the netstring (the outer representation, not the transported inner string) if parsing worked, or 0 if the input buffer did not contain a valid (or full) netstring.

The raw memory buffer "foo" would become the netstring "3:foo,"

http://cr.yp.to/proto/netstrings.txt

fmt_netstring(3)


Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.