updates.
authorPekka Riikonen <priikone@silcnet.org>
Tue, 20 Feb 2007 20:37:18 +0000 (20:37 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Tue, 20 Feb 2007 20:37:18 +0000 (20:37 +0000)
lib/doc/LIBINDEX
lib/silcasn1/DIRECTORY [new file with mode: 0644]
lib/silccore/README [new file with mode: 0644]
lib/silcserver/DIRECTORY [deleted file]
lib/silcskr/DIRECTORY [new file with mode: 0644]
lib/silcutil/DIRECTORY
lib/silcutil/silcfsm_i.h

index ebecb16cbb2ae576b0a6d558e7d6ca346849baa6..f4a661b3f5d259083c600c6f90985caf6ade7fb4 100644 (file)
@@ -10,6 +10,12 @@ Version: @VERSION@<br />
 Copyright &copy; 1997 - 2007 The SILC Project<br />
 Updated: @DATE@
 </small>
+<br /><br /><br />
+<b>NOTE: This is reference manual of alpha version of SILC Toolkit 1.1 and
+the reference may be incomplete, inaccurate and document nonexistent APIs.
+The APIs provided by alpha versions of SILC Toolkit 1.1 may not be stable yet.
+</b>
+
 <br /><br /><br />
 Welcome to the SILC Toolkit Reference Manual.  The manual is a complete
 developer guide and reference for the SILC application programmer.  The manual
@@ -25,7 +31,6 @@ Toolkit sources, and the documentation is constantly evolving.  New versions
 of the Toolkit always delivers the latest version of this reference manual.
 
 <br /><br /><br />
-<li><a href="new.html">What's new in Toolkit 1.1</a><br />
 <li><a href="porting.html">Porting from Toolkit 1.0 to 1.1</a><br />
 <li><a href="intro_reference.html">Introduction to the Manual</a><br />
 <li><a href="programming_conv.html">Programming Conventions</a><br />
diff --git a/lib/silcasn1/DIRECTORY b/lib/silcasn1/DIRECTORY
new file mode 100644 (file)
index 0000000..9cc7168
--- /dev/null
@@ -0,0 +1,22 @@
+<!--
+@LIBRARY=SILC ASN.1 Library
+@FILENAME=silcasn1lib.html
+@LINK=silcasn1.html:SILC ASN.1 Interface
+@LINK=silcber.html:SILC BER interface
+-->
+
+<big><b>SILC ASN.1 Library</b></big>
+<br />
+<small>Directory: lib/silcasn1/</small>
+<br />
+<small>Library: libsilc.a, libsilc.lib</small>
+<br /><br />
+<b>Introduction</b>
+
+<br /><br />
+SILC Abstract Syntax Notation One (ASN.1) Library provides interface for
+efficient ASN.1 encoder and decoder.  The library also provides BER/DER
+encoder and decoder.
+
+<br /><br />
+@LINKS@
diff --git a/lib/silccore/README b/lib/silccore/README
new file mode 100644 (file)
index 0000000..1ac9cc1
--- /dev/null
@@ -0,0 +1,69 @@
+The SILC Core Library
+
+This library contains the implementation of various SILC protocol packet
+payloads and other routines.  It also implements the SILC Packet Engine.
+
+
+The SILC Packet Engine
+
+The SILC Packet engine (silcpacket.[ch]) is the heart of sending and
+receiving SILC packets.  The engine works in single thread but is thread
+safe and has the notion of per-thread contexts for optimized processing.
+The per-thread processing is actually per-scheduler, but in reality multiple
+schedulers are run only when they are used in threads.
+
+The packet engine has a lock (engine->lock) that protects various engine
+wide data.  Currently this includes SILC Packet freelist, which could
+perhaps later be in the per-thread SilcPacketEngineContext context.  The
+engine also keeps list of all streams (SilcPacketStream) that has been
+added to the engine.
+
+The SilcPacketStream contains all stream related data, including encryption
+and decryption keys, IDs, and outgoing buffer.  The outgoing buffer is
+per-stream so that data can be sent in multiple pieces from the outbuffer
+if writing would block.  Incoming buffer is not in stream context unless
+it is necessary.  The incoming buffer is in the per-thread context which
+actually has a list of incoming buffers.  If reading blocks for the given
+stream, that incoming buffer is given to the SilcPacketStream context from
+the list of buffers.  When data is again available for that stream it is
+read into the buffer the stream already has.  Other stream will read to
+the per-thread buffer, unless they would block also.  The stream also
+has a lock (stream->lock) because application can modify various data in
+the stream.
+
+The packet callback has packet callbacks that is used to deliver the read
+packet to application.  The callbacks also deliver error and end of stream
+status to application.  It is also possible to attach additional packet
+callbacks to stream so that there may be multiple receivers for one packet.
+In the callback application may decide whether it wants to take the packet
+or whether to pass it for the next receiver.  The callbacks can be added
+with priority.
+
+
+Locking in packet engine
+
+Currently the engine lock is used only when the packet free list is accessed,
+or new stream is added or removed.  The packet free list, however, is
+accessed for all incoming packets.  Application free's the packet context so
+the lock must later be acquired be putting the unused packet context back
+to the free list.  It might be possible to later put the packet free list to
+per-thread context.
+
+Stream lock is taken everytime data is read from the underlaying stream or
+sent to the underlaying stream.  In principal it would be possible to read
+without locking, because we use per-thread incoming buffers but in reality
+many platforms would not suppots reading and writing to the same underlaying
+stream (effectively socket) at the same time.  And even if they would, some
+rare race conditions with closing the stream might occur.  One way of dealing
+with this would be to make sure that any stream used with SilcPacketStream
+must itself be thread-safe.  In that case the locking would move to the
+underlaying stream.
+
+When reading data from stream, the lock is held during reading and during
+data processing.  The lock is released when the packet is dispatched to
+a packet callback.
+
+When sending packet the lock is acquired only when actually accessing the
+outgoing buffer and writing to the stream.  This includes encryption.  This
+means that if two threads send to same stream the encryption is not in
+parallel.
diff --git a/lib/silcserver/DIRECTORY b/lib/silcserver/DIRECTORY
deleted file mode 100644 (file)
index c92412f..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<!--
-@LIBRARY=SILC Server Library
-@FILENAME=silcserverlib.html
-@LINK=silcserver.html:SILC Server API Reference
-@LINK=silcserver_params.html:SILC Server Parameters API Reference
--->
-
-<big><b>SILC Server Library</b></big>
-<br />
-<small>Directory: lib/server/</small>
-<br />
-<small>Library: libsilcserver.a, libsilcserver.lib</small>
-<br /><br />
-<b>Introduction</b>
-
-<br /><br />
-@LINKS@
diff --git a/lib/silcskr/DIRECTORY b/lib/silcskr/DIRECTORY
new file mode 100644 (file)
index 0000000..943b0cb
--- /dev/null
@@ -0,0 +1,20 @@
+<!--
+@LIBRARY=SILC Key Repository Library
+@FILENAME=silcskrlib.html
+@LINK=silcskr.html:SILC SKR Interface
+-->
+
+<big><b>SILC Key Repository Library</b></big>
+<br />
+<small>Directory: lib/silcskr/</small>
+<br />
+<small>Library: libsilc.a, libsilc.lib</small>
+<br /><br />
+<b>Introduction</b>
+
+<br /><br />
+SILC Key Repository (SKR) Library can be used to store and retrieve public
+keys and certificates.
+
+<br /><br />
+@LINKS@
index 83b119758a43e5889e4cb1d19496680765a3268a..00394a1e14c075fabc74d6d3c03c75c30d00a417 100644 (file)
@@ -1,7 +1,7 @@
 <!--
 @LIBRARY=SILC Utility Library
 @FILENAME=silcutillib.html
-@LINK=silctypes.html:Basic SILC Types
+@LINK=silctypes.html:Basic Types and Definitions
 @LINK=silcbuffer.html:Data Buffer Interface
 @LINK=silcbuffmt.html:Data Buffer Format Interface
 @LINK=silchashtable.html:Hash Table Interface
@@ -13,6 +13,7 @@
 @LINK=silcatomic.html:Atomic Operations Interface
 @LINK=silcnet.html:Network (TCP and UDP) Interface
 @LINK=silcschedule.html:Scheduler Interface
+@LINK=silcasync.html:Asynchronous Operation Interface
 @LINK=silcstream.html:Abstract Stream Interface
 @LINK=silcsocketstream.html:Socket Stream Interface
 @LINK=silcfdstream.html:File Descriptor Stream Interface
@@ -25,7 +26,6 @@
 @LINK=silcutil.html:Utility Functions
 @LINK=silclist.html:List Interface
 @LINK=silcdlist.html:Dynamic List Interface
-@LINK=silcasync.html:Asynchronous Operation Interface
 @LINK=silcmime.html:MIME Interface
 @LINK=silctime.html:Time Utility Functions
 @LINK=silclog.html:Logging Interface
index 7c7e278b6418cff6f7d9e6e7ea721e6bcd84dbad..50475da5ca7c4d5204b2539eecaea5a8c68762d9 100644 (file)
@@ -96,7 +96,7 @@ SilcBool silc_fsm_set_call(struct SilcFSMObject *fsm, SilcBool async_call)
 /* Wait for thread to terminate */
 SilcBool silc_fsm_thread_wait(void *fsm, void *thread);
 
-/* Eventphores */
+/* Events */
 SilcUInt32 silc_fsm_event_wait(SilcFSMEvent event, void *fsm);
 SilcUInt32 silc_fsm_event_timedwait(SilcFSMEvent event, void *fsm,
                                    SilcUInt32 seconds, SilcUInt32 useconds,