📄 basic.html
字号:
<td>
<table width=350 bgcolor=darkgreen cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 border=0><tr><td bgcolor=#fafafa >
<table width=350 cellSpacing=0 cellPadding=0 align=center border=0>
<tr>
<td width=25%> xx xx</td>
<td width=5> </td>
<td width=20%>word</td>
<td width=5> </td>
<td width=50%><a href="families.html">Family</a> (service) id number</td>
</tr>
<tr>
<td> xx xx</td>
<td> </td>
<td>word</td>
<td> </td>
<td><a href="families.html">Family</a> subtype id number</td>
</tr>
<tr>
<td> xx xx</td>
<td> </td>
<td>word</td>
<td> </td>
<td>SNAC flags</td>
</tr>
<tr>
<td> xx xx xx xx</td>
<td> </td>
<td>dword</td>
<td> </td>
<td>SNAC request id</td>
</tr>
</table>
</td></tr>
<tr><td bgcolor=#fafafa >
<table width=350 cellSpacing=0 cellPadding=0 align=center border=0>
<tr><td height=8 colspan=3></td></tr>
<tr><td width=50> </td>
<td>
<table width=300 bgcolor=darkred cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 align=center border=0><tr><td bgcolor=#fafafa >
<table width=300 cellSpacing=0 cellPadding=0 align=center border=0>
<tr>
<td height=40 align=center valign=middle> ......</td>
<td valign=middle width=56%>SNAC data</td>
</tr>
</table>
</td></tr>
</table>
</td></tr></table>
</td><td width=5> </td>
</tr>
<tr><td height=5 colspan=3> </td></tr>
</table>
</td></tr>
</table>
</td></tr></table>
</td></tr>
</table>
<br>
There is no formal declaration of the length of the SNAC data portion (that information
must be assumed from the FLAP headers). Families, identified by the "family ID", constitute
a group of services. Subtypes are a subdivision of the families. Each subtype ID is different
depending on the specific service or information provided in the data section.<br><br>
Request IDs are 32bit values used to identify non-atomic information. The client can generate
completely random reqid's as long as it remembers what the request was for. Often, though,
the results of the SNAC are irrelevant, and the reqid's can be forgotten. But, in
information-requestion SNACs, it is imperative you remember the reqid you sent because that's
the only way to link it to the response! If this is not done, it will be impossible to have
more than one pending request of the same SNAC subtype (which is unlikely at best). For
server-initiated SNACs, the reqid most significant bit=1, and this num count up to zero from
than from zero.<br><br>
Flags is a general SNAC properties. There is not enough information about snac flags, but known
that if bit1 of flags=1 there are more SNACs for this request-id was sent. Bit16=1 <b>mean that
SNAC contain some unknown information at the beginning</b> (first come a length of additional data
(word) and then data itself).<br><br>
</td>
<td width=5></td></tr>
</table>
</td></tr>
</table>
</td></tr></table>
</td>
</tr>
</table>
<br>
<table width=640 cellSpacing=0 cellPadding=0 border=0>
<tr>
<td>
<table width=640 bgcolor=darkblue cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 border=0><tr><td bgcolor=#E9E9E9 >
<table width=100% cellSpacing=0 cellPadding=0 bgcolor="#4040FF" border=0>
<tr>
<td><b><font size=2 color="white"> <a name="b0003"></a>TLV (Type-Length-Value) tuple description </font></b></td>
</tr>
</table>
</td></tr>
<tr><td bgcolor=#E9E9E9 >
<table width=100% cellSpacing=0 cellPadding=0 border=0>
<tr><td width=5> </td>
<td><br>
TLVs are a very convenient and efficient method of putting data into an organized
format, especially variable length strings, etc. TLV literally stands for "Type,
Length, Value". And that's exactly what it is: a 16bit Type code, a 16bit value
for the length of the Value field, and then the actual data in the Value field
(variable length). Here is TLV format:<br><br>
<table width=100% cellSpacing=0 cellPadding=0 align=center border=0>
<tr><td width=20></td>
<td>
<table width=250 bgcolor=darkgreen cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 border=0><tr><td bgcolor=#fafafa >
<table width=250 cellSpacing=0 cellPadding=0 align=center border=0>
<tr>
<td width=20%> xx xx</td>
<td width=5> </td>
<td width=20%>word</td>
<td width=5> </td>
<td width=65%>TLV type number</td>
</tr>
<tr>
<td> xx xx</td>
<td> </td>
<td>word</td>
<td> </td>
<td>TLV length value</td>
</tr>
</table>
</td></tr>
<tr><td bgcolor=#fafafa >
<table width=250 cellSpacing=0 cellPadding=0 align=center border=0>
<tr><td height=8 colspan=3></td></tr>
<tr><td width=50> </td>
<td>
<table width=200 bgcolor=darkred cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 align=center border=0><tr><td bgcolor=#fafafa >
<table width=200 cellSpacing=0 cellPadding=0 align=center border=0>
<tr>
<td height=30 align=center valign=middle> ......</td>
<td valign=middle width=69%>TLV data</td>
</tr>
</table>
</td></tr>
</table>
</td></tr></table>
</td><td width=5> </td>
</tr>
<tr><td height=5 colspan=3> </td></tr>
</table>
</td></tr>
</table>
</td></tr></table>
</td></tr>
</table>
<br>
TLVs can be be in SNACs, but that's not required. TLVs often are used directly
in the FLAP Data Field, but normally are inside of SNACs. More than one
TLV of each Type code may exist in a single FLAP command (SNAC or not). TLVs
must follow the strict tuple-rule, or they're really not TLVs, they're raw
data. One tlv may contain nested tlv chain inside.<br><br>
TLVs are a big win. They make sending a variable length string like, e.g.,
"afritz@iname" as simple as defining a TLV with values {0x0011, 0x000c,
"afritz@iname.com"}. (The type 0x0011 is used throughout the authorization
process as the "email address type".) A side note about strings: strings in
this protocol are never NULL-terminated. If they look like they are, that's
probably a word-length value behind it. <br><br>
</td>
<td width=5></td></tr>
</table>
</td></tr></table>
</td></tr></table>
</td></tr></table>
<br>
<table width=640 bgcolor=darkgray cellSpacing=0 cellPadding=0 border=0><tr><td>
<table width=100% cellSpacing=2 cellPadding=0 border=0><tr><td bgcolor=#E9E9E9 ><table width=100% cellSpacing=0 cellPadding=0 border=0>
<tr><td align=center valign=middle><b><font color=black size=2>
<a href="index.html" target="_top">Main</a> |
<a href="basic.html" target="_top">Basic</a> |
<a href="login.html" target="_top">Login</a> |
<a href="families.html" target="_top">Snaclist</a> |
<a href="sequences.html" target="_top">Sequences</a> |
<a href="lists.html" target="_top">Misc</a> |
<a href="changes.html" target="_top">Changes</a> |
<a href="credits.html" target="_top">Credits</a> |
<a href="terms.html" target="_top">Terms</a>
</font></b></td></tr></table>
</td></tr></table>
</td></tr></table>
<!--#include virtual="_bottom.htxt" -->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -