<p>Are there any libraries or guides for how to read and parse binary data in C?</p>

<p>I am looking at some functionality that will receive TCP packets on a network socket and then parse that binary data according to a specification, turning the information into a more useable form by the code.</p>

<p>Are there any libraries out there that do this, or even a primer on performing this type of thing?</p>

You don't really need to parse binary data in C, just cast some pointer to whatever you think it should be.
```
```
struct SomeDataFormat
{
    ....
}

SomeDataFormat* pParsedData = (SomeDataFormat*) pBuffer;
```
```
Just be wary of endian issues, type sizes, reading off the end of buffers, etc etc