Current File : //usr/share/doc/dbus/api/group__DBusAddressInternals.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"/>
<title>D-Bus: Address parsing</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">D-Bus
   &#160;<span id="projectnumber">1.8.20</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
  <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>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Address parsing</div>  </div>
<div class="ingroups"><a class="el" href="group__DBusInternals.html">D-Bus secret internal implementation details</a></div></div><!--header-->
<div class="contents">

<p>Implementation of parsing addresses of D-Bus servers.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structDBusAddressEntry.html">DBusAddressEntry</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Internals of <a class="el" href="structDBusAddressEntry.html" title="Internals of DBusAddressEntry.">DBusAddressEntry</a>.  <a href="structDBusAddressEntry.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusAddressInternals.html#ga0e46a8bc37d92810fe3d535019d3bad1">_DBUS_ADDRESS_OPTIONALLY_ESCAPED_BYTE</a>(b)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="group__DBusMacros.html#gaa8cecfc5c5c054d2875c03e77b7be15d" title="Expands to &quot;1&quot;.">TRUE</a> if the byte need not be escaped when found in a dbus address.  <a href="#ga0e46a8bc37d92810fe3d535019d3bad1"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusAddressInternals.html#ga5b6409826263c7d62570c56889f7ddb2">_dbus_set_bad_address</a> (<a class="el" href="structDBusError.html">DBusError</a> *error, const char *address_problem_type, const char *address_problem_field, const char *address_problem_other)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets <a class="el" href="group__DBusProtocol.html#ga3fa04eb600edda4afc2dd9fe2e0f8b02" title="A D-Bus bus address was malformed.">DBUS_ERROR_BAD_ADDRESS</a>.  <a href="#ga5b6409826263c7d62570c56889f7ddb2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__DBusAddressInternals.html#ga1ecc2f460303cd70c34e7667e8b12b37">_dbus_address_append_escaped</a> (<a class="el" href="structDBusString.html">DBusString</a> *escaped, const <a class="el" href="structDBusString.html">DBusString</a> *unescaped)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Appends an escaped version of one string to another string, using the D-Bus address escaping mechanism.  <a href="#ga1ecc2f460303cd70c34e7667e8b12b37"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>Implementation of parsing addresses of D-Bus servers. </p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="ga0e46a8bc37d92810fe3d535019d3bad1"></a><!-- doxytag: member="dbus&#45;address.c::_DBUS_ADDRESS_OPTIONALLY_ESCAPED_BYTE" ref="ga0e46a8bc37d92810fe3d535019d3bad1" args="(b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="group__DBusAddressInternals.html#ga0e46a8bc37d92810fe3d535019d3bad1">_DBUS_ADDRESS_OPTIONALLY_ESCAPED_BYTE</a></td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">b</td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Value:</b><div class="fragment"><pre class="fragment">(((b) &gt;= <span class="charliteral">&#39;a&#39;</span> &amp;&amp; (b) &lt;= <span class="charliteral">&#39;z&#39;</span>) ||                 \
          ((b) &gt;= <span class="charliteral">&#39;A&#39;</span> &amp;&amp; (b) &lt;= <span class="charliteral">&#39;Z&#39;</span>) ||                 \
          ((b) &gt;= <span class="charliteral">&#39;0&#39;</span> &amp;&amp; (b) &lt;= <span class="charliteral">&#39;9&#39;</span>) ||                 \
          (b) == <span class="charliteral">&#39;-&#39;</span> ||                                 \
          (b) == <span class="charliteral">&#39;_&#39;</span> ||                                 \
          (b) == <span class="charliteral">&#39;/&#39;</span> ||                                 \
          (b) == <span class="charliteral">&#39;\\&#39;</span> ||                                \
          (b) == <span class="charliteral">&#39;*&#39;</span> ||                                \
          (b) == <span class="charliteral">&#39;.&#39;</span>)
</pre></div>
<p><a class="el" href="group__DBusMacros.html#gaa8cecfc5c5c054d2875c03e77b7be15d" title="Expands to &quot;1&quot;.">TRUE</a> if the byte need not be escaped when found in a dbus address. </p>
<p>All other bytes are required to be escaped in a valid address. </p>

<p>Definition at line <a class="el" href="dbus-address_8c_source.html#l00084">84</a> of file <a class="el" href="dbus-address_8c_source.html">dbus-address.c</a>.</p>

<p>Referenced by <a class="el" href="dbus-address_8c_source.html#l00104">_dbus_address_append_escaped()</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga1ecc2f460303cd70c34e7667e8b12b37"></a><!-- doxytag: member="dbus&#45;address.c::_dbus_address_append_escaped" ref="ga1ecc2f460303cd70c34e7667e8b12b37" args="(DBusString *escaped, const DBusString *unescaped)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__DBusTypes.html#ga39c9cb0f3a2a8ad6f55cc4855d035349">dbus_bool_t</a> <a class="el" href="group__DBusAddressInternals.html#ga1ecc2f460303cd70c34e7667e8b12b37">_dbus_address_append_escaped</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDBusString.html">DBusString</a> *&#160;</td>
          <td class="paramname"><em>escaped</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structDBusString.html">DBusString</a> *&#160;</td>
          <td class="paramname"><em>unescaped</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Appends an escaped version of one string to another string, using the D-Bus address escaping mechanism. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">escaped</td><td>the string to append to </td></tr>
    <tr><td class="paramname">unescaped</td><td>the string to escape </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="group__DBusMacros.html#gaa93f0eb578d23995850d61f7d61c55c1" title="Expands to &quot;0&quot;.">FALSE</a> if no memory </dd></dl>

<p>Definition at line <a class="el" href="dbus-address_8c_source.html#l00104">104</a> of file <a class="el" href="dbus-address_8c_source.html">dbus-address.c</a>.</p>

<p>References <a class="el" href="dbus-address_8c_source.html#l00084">_DBUS_ADDRESS_OPTIONALLY_ESCAPED_BYTE</a>, <a class="el" href="dbus-string_8c_source.html#l01139">_dbus_string_append_byte()</a>, <a class="el" href="dbus-string_8c_source.html#l02207">_dbus_string_append_byte_as_hex()</a>, <a class="el" href="dbus-string_8c_source.html#l00451">_dbus_string_get_const_data()</a>, <a class="el" href="dbus-string_8c_source.html#l00722">_dbus_string_get_length()</a>, <a class="el" href="dbus-string_8c_source.html#l00785">_dbus_string_set_length()</a>, <a class="el" href="group__DBusMacros.html#gaa93f0eb578d23995850d61f7d61c55c1">FALSE</a>, and <a class="el" href="group__DBusMacros.html#gaa8cecfc5c5c054d2875c03e77b7be15d">TRUE</a>.</p>

<p>Referenced by <a class="el" href="dbus-sysdeps-unix_8c_source.html#l04035">_dbus_append_address_from_socket()</a>, <a class="el" href="dbus-server-unix_8c_source.html#l00237">_dbus_server_new_for_domain_socket()</a>, <a class="el" href="dbus-server-socket_8c_source.html#l00388">_dbus_server_new_for_tcp_socket()</a>, and <a class="el" href="dbus-address_8c_source.html#l00583">dbus_address_escape_value()</a>.</p>

</div>
</div>
<a class="anchor" id="ga5b6409826263c7d62570c56889f7ddb2"></a><!-- doxytag: member="dbus&#45;address.c::_dbus_set_bad_address" ref="ga5b6409826263c7d62570c56889f7ddb2" args="(DBusError *error, const char *address_problem_type, const char *address_problem_field, const char *address_problem_other)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="group__DBusAddressInternals.html#ga5b6409826263c7d62570c56889f7ddb2">_dbus_set_bad_address</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structDBusError.html">DBusError</a> *&#160;</td>
          <td class="paramname"><em>error</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>address_problem_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>address_problem_field</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>address_problem_other</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets <a class="el" href="group__DBusProtocol.html#ga3fa04eb600edda4afc2dd9fe2e0f8b02" title="A D-Bus bus address was malformed.">DBUS_ERROR_BAD_ADDRESS</a>. </p>
<p>If address_problem_type and address_problem_field are not <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a>, sets an error message about how the field is no good. Otherwise, sets address_problem_other as the error message.</p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">error</td><td>the error to set </td></tr>
    <tr><td class="paramname">address_problem_type</td><td>the address type of the bad address or <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> </td></tr>
    <tr><td class="paramname">address_problem_field</td><td>the missing field of the bad address or <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> </td></tr>
    <tr><td class="paramname">address_problem_other</td><td>any other error message or <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4" title="A null pointer, defined appropriately for C or C++.">NULL</a> </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="dbus-address_8c_source.html#l00065">65</a> of file <a class="el" href="dbus-address_8c_source.html">dbus-address.c</a>.</p>

<p>References <a class="el" href="dbus-protocol_8h_source.html#l00362">DBUS_ERROR_BAD_ADDRESS</a>, <a class="el" href="dbus-errors_8c_source.html#l00354">dbus_set_error()</a>, and <a class="el" href="group__DBusMacros.html#ga070d2ce7b6bb7e5c05602aa8c308d0c4">NULL</a>.</p>

<p>Referenced by <a class="el" href="dbus-server-unix_8c_source.html#l00054">_dbus_server_listen_platform_specific()</a>, <a class="el" href="dbus-transport_8c_source.html#l00367">_dbus_transport_open()</a>, <a class="el" href="dbus-transport-unix_8c_source.html#l00225">_dbus_transport_open_platform_specific()</a>, and <a class="el" href="dbus-transport-socket_8c_source.html#l01410">_dbus_transport_open_socket()</a>.</p>

</div>
</div>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Thu Mar 3 2016 17:50:32 for D-Bus by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>