MRTKLIB 0.7.14
Modernized GNSS Positioning Library
Loading...
Searching...
No Matches
ntrip_chunk.h File Reference
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
Include dependency graph for ntrip_chunk.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  chunk_dec_t

Macros

#define NTRIP_VER_AUTO   0 /* auto-detect (try v2, fallback v1) */
#define NTRIP_VER_1   1 /* NTRIP version 1.0 */
#define NTRIP_VER_2   2 /* NTRIP version 2.0 */
#define CHUNK_HDR_MAX   16 /* max chunk-size header length ("FFFFFFFF\r\n") */
#define CHUNK_SIZE_MAX   0xFFFFFF /* max chunk size (~16 MB, well within int range) */

Functions

static void chunk_dec_init (chunk_dec_t *dec)
static int chunk_decode (chunk_dec_t *dec, const uint8_t **pin, int *pnin, uint8_t *out, int nout)
static int chunk_encode (uint8_t *out, int nout, const uint8_t *data, int ndata)
static const char * stristr (const char *haystack, const char *needle)
static int http_header_end (const uint8_t *buff, int nb)
static int http_status_code (const uint8_t *buff, int nb)
static int http_find_header (const uint8_t *buff, int nb, const char *name, char *val, int vmax)

Macro Definition Documentation

◆ CHUNK_HDR_MAX

#define CHUNK_HDR_MAX   16 /* max chunk-size header length ("FFFFFFFF\r\n") */

Definition at line 39 of file ntrip_chunk.h.

Referenced by chunk_decode().

◆ CHUNK_SIZE_MAX

#define CHUNK_SIZE_MAX   0xFFFFFF /* max chunk size (~16 MB, well within int range) */

Definition at line 40 of file ntrip_chunk.h.

Referenced by chunk_decode().

◆ NTRIP_VER_1

#define NTRIP_VER_1   1 /* NTRIP version 1.0 */

Definition at line 32 of file ntrip_chunk.h.

Referenced by parse_ntrip_query(), rspntrip_c(), and rspntrip_s().

◆ NTRIP_VER_2

#define NTRIP_VER_2   2 /* NTRIP version 2.0 */

◆ NTRIP_VER_AUTO

#define NTRIP_VER_AUTO   0 /* auto-detect (try v2, fallback v1) */

Definition at line 31 of file ntrip_chunk.h.

Referenced by openntrip(), reqntrip_c(), reqntrip_s(), rspntrip_c(), and waitntrip().

Function Documentation

◆ chunk_dec_init()

void chunk_dec_init ( chunk_dec_t * dec)
static

Definition at line 55 of file ntrip_chunk.h.

References chunk_dec_t::at_sol, chunk_dec_t::nhdr, chunk_dec_t::remain, and chunk_dec_t::state.

Referenced by openntrip(), readntrip(), and rspntrip_c().

Here is the caller graph for this function:

◆ chunk_decode()

int chunk_decode ( chunk_dec_t * dec,
const uint8_t ** pin,
int * pnin,
uint8_t * out,
int nout )
static

Definition at line 74 of file ntrip_chunk.h.

References chunk_dec_t::at_sol, CHUNK_HDR_MAX, CHUNK_SIZE_MAX, chunk_dec_t::hdr, chunk_dec_t::nhdr, chunk_dec_t::remain, and chunk_dec_t::state.

Referenced by readntrip().

Here is the caller graph for this function:

◆ chunk_encode()

int chunk_encode ( uint8_t * out,
int nout,
const uint8_t * data,
int ndata )
static

Definition at line 225 of file ntrip_chunk.h.

Referenced by writentrip(), and writentripc().

Here is the caller graph for this function:

◆ http_find_header()

int http_find_header ( const uint8_t * buff,
int nb,
const char * name,
char * val,
int vmax )
static

Definition at line 305 of file ntrip_chunk.h.

Referenced by rspntrip_c().

Here is the caller graph for this function:

◆ http_header_end()

int http_header_end ( const uint8_t * buff,
int nb )
static

Definition at line 264 of file ntrip_chunk.h.

Referenced by rspntrip_c(), and rspntrip_s().

Here is the caller graph for this function:

◆ http_status_code()

int http_status_code ( const uint8_t * buff,
int nb )
static

Definition at line 279 of file ntrip_chunk.h.

Referenced by rspntrip_c(), and rspntrip_s().

Here is the caller graph for this function:

◆ stristr()

const char * stristr ( const char * haystack,
const char * needle )
static

Definition at line 249 of file ntrip_chunk.h.

Referenced by rspntrip_c().

Here is the caller graph for this function: