---
name: "ms_parse_raw"
section: "3"
platform: "linux"
package: "libmseed-doc"
version: "2.19.8-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ms_parse_raw"
---

# ms\_parse\_raw(3)

Parse, validate and print details of a SEED data record

## NAME

msr\_parse - Parse, validate and print details of a SEED data record

## SYNOPSIS

```
#include <libmseed.h>
int  ms_parse_raw ( char *record, int maxreclen,
                    flag details, flag swapflag );
```

## DESCRIPTION

**ms\_parse\_raw** is a simple validating SEED data record header parser.  The data in *record* is assumed to contain a SEED data record with a maximum length of *maxreclen*.  In addition to validating header fields where possible, raw header fields can be printed.  This routine is primarily intended for identifying invalid data record headers and printing record header contents.

The *details* flag is interpreted as follows:

```
  0 = only print error messages for invalid header fields
  1 = print basic fields in addition to invalid field errors
  2 = print all fields in addition to invalid field errors
```

The *swapflag* flag is interpreted as follows:

```
  1 = swap multibyte quantities
  0 = do no swapping
 -1 = autodetect byte order using year test, swap if needed
```

## RETURN VALUES

**ms\_parse\_raw** returns 0 when no errors were detected or a positive count of errors detected.

## SEE ALSO

**[msr\_parse(3)](/msr_parse/3.md)** and **[ms\_detect(3)](/ms_detect/3.md)**

## AUTHOR

```
Chad Trabant
IRIS Data Management Center
```
