NAME
msd_okheader - test if memory fragment is valid miniseed header
SYNOPSIS
#include "tr.h"
int msd_okheader ( uchar *header, long nbytes, int verbose )
DESCRIPTION
msd_okheader inspects a memory fragment for conformance with
miniseed data header standards, returning 0 for a valid header,
and various non-zero values when something is wrong.
When verbose is set, messages are left on the error log.
RETURN VALUES
msd_okheader returns 0 for valid headers, otherwise:
-
-2
if nbytes < 64.
-
0x10
sequence number has illegal character(s)
-
0x20
data quality code is invalid
-
0x40
reserved byte at offset 7 is not space
-
0x80
One or more of the station, channel, network or
location codes are not
upper case alphanumeric.
LIBRARY
$(TRLIBS)
ATTRIBUTES
MT-Safe
DIAGNOSTICS
-
XX bytes too small for miniseed header
-
data header quality indicator is X, not one of 'DMQR'
-
found X instead of alphanumeric in {station|channel|location|network} code at offset X
-
found X instead of space in reserved byte at offset 7
-
sequence number contains illegal character X
SEE ALSO
umsd(3)
AUTHOR
Daniel Quinlan