FreeTDS API: src/tds/read.c File Reference

FreeTDS API

Loading...
Searching...
No Matches
read.c File Reference

Grab data from TDS packets. More...

`#include <config.h>`
`#include <assert.h>`
`#include <freetds/tds.h>`
`#include <freetds/tds/iconv.h>`
`#include <freetds/bytes.h>`
`#include <freetds/tds/stream.h>`
`#include <freetds/utils/string.h>`
`#include <freetds/tds/checks.h>`
Include dependency graph for read.c:

## Functions
static size_t | read_and_convert (TDSSOCKET *tds, TDSICONV *char_conv, size_t *wire_size, char *outbuf, size_t outbytesleft)
| For UTF-8 and similar, tds_iconv() may encounter a partial sequence when the chunk boundary is not aligned with the character boundary.
DSTR * | tds_dstr_get (TDSSOCKET *tds, DSTR *s, size_t len)
| Reads a string from wire and put in a DSTR.
unsigned char | tds_get_byte (TDSSOCKET *tds)
| Return a single byte from the input buffer.
TDSRET | tds_get_char_data (TDSSOCKET *tds, char *row_buffer, size_t wire_size, TDSCOLUMN *curcol)
| Fetch character data the wire.
bool | tds_get_n (TDSSOCKET *tds, void *dest, size_t need)
| Get N bytes from the buffer and return them in the already allocated space given to us.
size_t | tds_get_string (TDSSOCKET *tds, size_t string_len, char *dest, size_t dest_size)
| Fetch a string from the wire.
TDS_UINT | tds_get_uint (TDSSOCKET *tds)
| Get an uint32 from the server.
TDS_UINT8 | tds_get_uint8 (TDSSOCKET *tds)
| Get an uint64 from the server.
TDS_USMALLINT | tds_get_usmallint (TDSSOCKET *tds)
| Get an uint16 from the server.
unsigned char | tds_peek (TDSSOCKET *tds)
| Reads a byte from the TDS stream without removing it.
void | tds_unget_byte (TDSSOCKET *tds)
| Unget will always work as long as you don't call it twice in a row.

## Detailed Description

Grab data from TDS packets.