Current File : //usr/local/apps/share/doc/freetds/reference/a00349.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>FreeTDS API: src/tds/read.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">FreeTDS API
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.8 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Modules</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_000003.html">src</a></li><li class="navelem"><a class="el" href="dir_000011.html">tds</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">read.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Grab data from TDS packets.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;config.h&gt;</code><br />
<code>#include &lt;assert.h&gt;</code><br />
<code>#include &lt;<a class="el" href="a00217_source.html">freetds/tds.h</a>&gt;</code><br />
<code>#include &lt;freetds/iconv.h&gt;</code><br />
<code>#include &lt;freetds/bytes.h&gt;</code><br />
<code>#include &lt;freetds/stream.h&gt;</code><br />
<code>#include &lt;freetds/string.h&gt;</code><br />
<code>#include &lt;freetds/checks.h&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for read.c:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="a00409.svg" width="1675" height="336"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
</div>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga676c4dee6522815b16fdc8e448e43590"><td class="memItemLeft" align="right" valign="top">static size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00388.html#ga676c4dee6522815b16fdc8e448e43590">read_and_convert</a> (<a class="el" href="a00168.html">TDSSOCKET</a> *tds, <a class="el" href="a00182.html">TDSICONV</a> *char_conv, size_t *wire_size, char *outbuf, size_t outbytesleft)</td></tr>
<tr class="memdesc:ga676c4dee6522815b16fdc8e448e43590"><td class="mdescLeft">&#160;</td><td class="mdescRight">For UTF-8 and similar, <a class="el" href="a00385.html#ga87db49044919f1bc84c0ff5e9ab00304" title="Wrapper around iconv(3). ">tds_iconv()</a> may encounter a partial sequence when the chunk boundary is not aligned with the character boundary.  <a href="a00388.html#ga676c4dee6522815b16fdc8e448e43590">More...</a><br /></td></tr>
<tr class="separator:ga676c4dee6522815b16fdc8e448e43590"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafae08056186b143f3ef1399307dc9be7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00217.html#afddddf5bd7ad223cadee3d3bdc899954">DSTR</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00388.html#gafae08056186b143f3ef1399307dc9be7">tds_dstr_get</a> (<a class="el" href="a00168.html">TDSSOCKET</a> *tds, <a class="el" href="a00217.html#afddddf5bd7ad223cadee3d3bdc899954">DSTR</a> *s, size_t len)</td></tr>
<tr class="memdesc:gafae08056186b143f3ef1399307dc9be7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads a string from wire and put in a DSTR.  <a href="a00388.html#gafae08056186b143f3ef1399307dc9be7">More...</a><br /></td></tr>
<tr class="separator:gafae08056186b143f3ef1399307dc9be7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0cb72d3f6943795c39db1fa692be0a58"><td class="memItemLeft" align="right" valign="top">unsigned char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00388.html#ga0cb72d3f6943795c39db1fa692be0a58">tds_get_byte</a> (<a class="el" href="a00168.html">TDSSOCKET</a> *tds)</td></tr>
<tr class="memdesc:ga0cb72d3f6943795c39db1fa692be0a58"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a single byte from the input buffer.  <a href="a00388.html#ga0cb72d3f6943795c39db1fa692be0a58">More...</a><br /></td></tr>
<tr class="separator:ga0cb72d3f6943795c39db1fa692be0a58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8d214089b6e97fc0da5e0be09f216d73"><td class="memItemLeft" align="right" valign="top">TDSRET&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00388.html#ga8d214089b6e97fc0da5e0be09f216d73">tds_get_char_data</a> (<a class="el" href="a00168.html">TDSSOCKET</a> *tds, char *row_buffer, size_t wire_size, <a class="el" href="a00120.html">TDSCOLUMN</a> *curcol)</td></tr>
<tr class="memdesc:ga8d214089b6e97fc0da5e0be09f216d73"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fetch character data the wire.  <a href="a00388.html#ga8d214089b6e97fc0da5e0be09f216d73">More...</a><br /></td></tr>
<tr class="separator:ga8d214089b6e97fc0da5e0be09f216d73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae7d9c4e1a079e1d0aa0252732631e8c4"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00388.html#gae7d9c4e1a079e1d0aa0252732631e8c4">tds_get_n</a> (<a class="el" href="a00168.html">TDSSOCKET</a> *tds, void *dest, size_t need)</td></tr>
<tr class="memdesc:gae7d9c4e1a079e1d0aa0252732631e8c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get N bytes from the buffer and return them in the already allocated space given to us.  <a href="a00388.html#gae7d9c4e1a079e1d0aa0252732631e8c4">More...</a><br /></td></tr>
<tr class="separator:gae7d9c4e1a079e1d0aa0252732631e8c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga90f080e6e9448feac15dee1370d66802"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00388.html#ga90f080e6e9448feac15dee1370d66802">tds_get_string</a> (<a class="el" href="a00168.html">TDSSOCKET</a> *tds, size_t string_len, char *dest, size_t dest_size)</td></tr>
<tr class="memdesc:ga90f080e6e9448feac15dee1370d66802"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fetch a string from the wire.  <a href="a00388.html#ga90f080e6e9448feac15dee1370d66802">More...</a><br /></td></tr>
<tr class="separator:ga90f080e6e9448feac15dee1370d66802"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9ac121c269e203337a48c5bf8afc48c3"><td class="memItemLeft" align="right" valign="top">TDS_UINT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00388.html#ga9ac121c269e203337a48c5bf8afc48c3">tds_get_uint</a> (<a class="el" href="a00168.html">TDSSOCKET</a> *tds)</td></tr>
<tr class="memdesc:ga9ac121c269e203337a48c5bf8afc48c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get an int32 from the server.  <a href="a00388.html#ga9ac121c269e203337a48c5bf8afc48c3">More...</a><br /></td></tr>
<tr class="separator:ga9ac121c269e203337a48c5bf8afc48c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8ab6c87318eaf15ea17a9575763f7809"><td class="memItemLeft" align="right" valign="top">TDS_UINT8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00388.html#ga8ab6c87318eaf15ea17a9575763f7809">tds_get_uint8</a> (<a class="el" href="a00168.html">TDSSOCKET</a> *tds)</td></tr>
<tr class="memdesc:ga8ab6c87318eaf15ea17a9575763f7809"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get an uint64 from the server.  <a href="a00388.html#ga8ab6c87318eaf15ea17a9575763f7809">More...</a><br /></td></tr>
<tr class="separator:ga8ab6c87318eaf15ea17a9575763f7809"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad38aa5b9547817854ccba1fcc7855861"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gad38aa5b9547817854ccba1fcc7855861"></a>
TDS_USMALLINT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00388.html#gad38aa5b9547817854ccba1fcc7855861">tds_get_usmallint</a> (<a class="el" href="a00168.html">TDSSOCKET</a> *tds)</td></tr>
<tr class="memdesc:gad38aa5b9547817854ccba1fcc7855861"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get an int16 from the server. <br /></td></tr>
<tr class="separator:gad38aa5b9547817854ccba1fcc7855861"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga221e98a9c8be96ec6c8547891e1b53af"><td class="memItemLeft" align="right" valign="top">unsigned char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00388.html#ga221e98a9c8be96ec6c8547891e1b53af">tds_peek</a> (<a class="el" href="a00168.html">TDSSOCKET</a> *tds)</td></tr>
<tr class="memdesc:ga221e98a9c8be96ec6c8547891e1b53af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads a byte from the TDS stream without removing it.  <a href="a00388.html#ga221e98a9c8be96ec6c8547891e1b53af">More...</a><br /></td></tr>
<tr class="separator:ga221e98a9c8be96ec6c8547891e1b53af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad70d59fb317d098b0c9fd29dd77131a8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00388.html#gad70d59fb317d098b0c9fd29dd77131a8">tds_unget_byte</a> (<a class="el" href="a00168.html">TDSSOCKET</a> *tds)</td></tr>
<tr class="memdesc:gad70d59fb317d098b0c9fd29dd77131a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Unget will always work as long as you don't call it twice in a row.  <a href="a00388.html#gad70d59fb317d098b0c9fd29dd77131a8">More...</a><br /></td></tr>
<tr class="separator:gad70d59fb317d098b0c9fd29dd77131a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Grab data from TDS packets. </p>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Feb 15 2017 09:01:18 for FreeTDS API by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.8
</small></address>
</body>
</html>