Updated GMP 3.0.1 to 3.1
authorPekka Riikonen <priikone@silcnet.org>
Thu, 7 Sep 2000 08:28:36 +0000 (08:28 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Thu, 7 Sep 2000 08:28:36 +0000 (08:28 +0000)
CHANGES
apps/silc/Makefile.am
apps/silcd/Makefile.am
configure.in
doc/development/lib_reference.sgml [new file with mode: 0644]
lib/contrib/Makefile.am
lib/silccore/Makefile.am
lib/silccrypt/Makefile.am
lib/silcmath/Makefile.am
lib/silcsim/Makefile.am
lib/silcske/Makefile.am

diff --git a/CHANGES b/CHANGES
index 495a64606aed39254af2c0dc76221a7c45162d1c..3cbade92e1c197ab402d1f423b8671cfa64f46f0 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+Thu Sep  7 10:49:33 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
+
+       * Added GMP 3.1 into math library.
+
 Sun Aug 20 21:27:26 EEST 2000  Pekka Riikonen <priikone@poseidon.pspt.fi>
 
        * Added SILC_PACKET_REMOVE_CHANNEL_USER to remove a client from
index 982a17b2c95b75f7ae84a6de436aca4a4c780a0b..264c67f1fe3b9658114c4d698e9cc9586db0a288 100644 (file)
@@ -32,11 +32,10 @@ silc_SOURCES = \
        screen.c
 
 LDADD = -L. -L.. -L../lib -lsilc -lcurses
-#LDADD = -L. -L.. -L../lib -lsilc -lcurses -L../lib/silcmath/gmp-3.0.1/lib -lgmp
 
 EXTRA_DIST = *.h
 
 INCLUDES = -I. -I.. -I../lib/silccore -I../lib/silccrypt \
        -I../lib/silcmath -I../lib/silcske -I../lib/silcsim \
        -I../includes \
-       -I../lib/silcmath/gmp-3.0.1
+       -I../lib/silcmath/gmp
index 2ff3d1696abe1523bb07a4d83afaa6eba0c17208..9310116e8636285a418ac202f6259224d8942769 100644 (file)
@@ -33,11 +33,10 @@ silcd_SOURCES = \
        server_version.c
 
 LDADD = -L. -L.. -L../lib -lsilc
-#LDADD = -L. -L.. -L../lib -lsilc -L../lib/silcmath/gmp-3.0.1/lib -lgmp
 
 EXTRA_DIST = *.h
 
 INCLUDES = -I. -I.. -I../lib/silccore -I../lib/silccrypt \
        -I../lib/silcmath -I../lib/silcske -I../lib/silcsim \
        -I../includes \
-       -I../lib/silcmath/gmp-3.0.1
+       -I../lib/silcmath/gmp
index 17eccb52dbcbe3e3463ad28f6d791a5bb0a18b1e..b983c1eb64c9e57cf344bd81d6f613fc761d8aa7 100644 (file)
@@ -231,7 +231,7 @@ AC_ARG_WITH(silcd-config-file,
 
 # Other configure scripts
 #AC_CONFIG_SUBDIRS(lib/zlib)
-AC_CONFIG_SUBDIRS(lib/silcmath/gmp-3.0.1)
+AC_CONFIG_SUBDIRS(lib/silcmath/gmp)
 
 AC_OUTPUT( \
 Makefile
diff --git a/doc/development/lib_reference.sgml b/doc/development/lib_reference.sgml
new file mode 100644 (file)
index 0000000..3f1ad78
--- /dev/null
@@ -0,0 +1,335 @@
+<!doctype linuxdoc system>
+
+<!--
+#
+#  SILC Library Reference Manual SGML source code
+#
+#  Author: Pekka Riikonen <priikone@poseidon.pspt.fi>
+#
+#  Copyright (C) 2000 Pekka Riikonen
+#
+#  This program is free software; you can redistribute it and/or modify
+#  it under the terms of the GNU General Public License as published by
+#  the Free Software Foundation; either version 2 of the License, or
+#  (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+
+-->
+
+<article>
+
+<!-- Title information -->
+
+<title>SILC Library Reference Manual
+<author>Pekka Riikonen <tt>priikone@poseidon.pspt.fi</tt>
+<date>Last updated: $Id$
+<abstract>
+This document describes the SILC Library functions and programming
+application interfaces.  The SILC Library is pretty much generic purpose
+library in many ways.  It includes routines for basic things like buffer
+management, network connection management, scheduling and task management.
+However, it includes a lot routines that are related only to SILC.  This
+document does not describe the implementation of the SILC client and SILC
+server.  They and their API's will be described in separate documents.
+</abstract>
+
+<!-- Table of contents -->
+<toc>
+
+<!-- Begin the document -->
+
+<sect>Overview
+
+<p>
+This document describes the SILC Library functions and programming
+application interfaces.  The SILC Library is pretty much generic purpose
+library in many ways.  It includes routines for basic things like buffer
+management, network connection management, scheduling and task management.
+However, it includes a lot routines that are related only to SILC.  This
+document does not describe the implementation of the SILC client and SILC
+server.  They and their API's will be described in separate documents.
+
+<sect><tt>lib/</tt> directory
+
+<p>
+This section describes the libraries implemented in the SILC Library
+as a whole.  The SILC package and the SILC library includes other libraries
+that are out of scope of this document.  Those libraries are mentioned
+separately and reference to the corresponding library manual is given.
+
+<sect1><tt>silccore</tt>
+
+<p>
+This directory includes the core library of the SILC.  It includes all the
+basic and common routines used by SILC client and server applications.
+This includes buffer management, file management, network connection
+mangement, task management and scheduling.
+
+<sect1><tt>silccrypt</tt>
+
+<p>
+This directory includes the crypto library.  It includes implementations
+of various cryptographic algrotihms, hash functions and public key
+cryptosystems.  It also includes cryptographically strong random number
+generator.  Most of the implementations of the algorithms are copied
+from other crypto libraries.
+
+<sect1><tt>silcmath</tt>
+
+<p>
+This directory includes math library.  It includes GNU MP library and
+some other routines.  The math library is tightly related to the crypto
+library and specificly public key cryptosystems.
+
+<sect2><tt>silcmath/gmp-3.0.1</tt>
+
+<p>
+This directory includes the GNU MP library.  The description of this
+library is out of scope of this document.  See 
+<url url="http://www.swox.com/gmp/"> for more detailed information.
+
+<sect1><tt>silcsim</tt>
+
+<p>
+This directory includes the SILC Module (SIM) library.  SIM's are dynamically
+loadable shared objects.
+
+<sect1><tt>silcske</tt>
+
+<p>
+This directory includes implementation of the SILC Key Exchange (SKE)
+protocol.  SKE protocol is used to perform key exchange between two
+connecting entities such as client and server.  The SKE protocol
+specification is described in the Internet Draft
+<tt>draft-riikonen-silc-ke-auth-00.txt</tt> document available from
+<url url="http://www.ietf.org">.
+
+<sect>Basic programming with SILC library
+
+<p>
+
+
+<sect>Core Library
+
+<p>
+SILC Core library includes all the basic and common routines used by
+SILC client and server applications.  This includes buffer management, 
+file management, network connection mangement, task management and scheduling.
+It also includes core components related to the actual SILC protocol
+implementation such as ID routines, ID cache system and SILC packet management.
+
+<p>
+This section lists all the public header files of the core library thus
+all the public application programming interfaces of the core library.
+
+<sect1>lib/silccore/id.h
+
+<p>
+   These are important ID types used in SILC. SILC server creates these
+   but SILC client has to handle these as well since these are used in
+   packet sending and reception. However, client never creates these
+   but it receives the correct ID's from server. Clients, servers and
+   channels are identified by the these ID's. Note that these are currently
+   IPv4 specific, although adding IPv6 support is not a bad task and SILC
+   protocol already supports IPv6.
+
+<sect2>Includes
+
+<p>
+<tt>#include "id.h"</tt>
+
+<sect2>Definitions
+
+<p>
+<verb>typedef unsigned char SilcIdType;</verb>
+<descrip><quote>
+Type definition for all ID types.
+</quote></descrip>
+
+<p>
+<verb>
+#define SILC_ID_SERVER_LEN
+#define SILC_ID_CLIENT_LEN
+#define SILC_ID_CHANNEL_LEN
+</verb>
+<descrip><quote>
+Length of the ID's.
+</quote></descrip>
+
+<p>
+<verb>
+#define SILC_ID_NONE
+#define SILC_ID_SERVER
+#define SILC_ID_CLIENT
+#define SILC_ID_CHANNEL
+</verb>
+<descrip><quote>
+All types of the ID's.
+</quote></descrip>
+
+<p>
+<verb>
+typedef struct {
+  struct in_addr ip;                           /* 32 bit IP */
+  unsigned short port;                         /* 16 bit port */
+  unsigned short rnd;                          /* 16 bit random number */
+} SilcServerID;
+</verb>
+<descrip><quote>
+Defines the Server ID structure.  This is used to distinguish a server in
+SILC network.
+</quote></descrip>
+
+<p>
+<verb>
+typedef struct {
+  struct in_addr ip;                           /* 32 bit IP */
+  unsigned char rnd;                           /* 8 bit random number */
+  unsigned char hash[CLIENTID_HASH_LEN];       /* 88 bit MD5 hash */
+} SilcClientID;
+</verb>
+<descrip><quote>
+Defines the Client ID structure.  This is used to distinguish a client in
+SILC network.
+</quote></descrip>
+
+<p>
+<verb>
+typedef struct {
+  struct in_addr ip;                           /* 32 bit IP */
+  unsigned short port;                         /* 16 bit port */
+  unsigned short rnd;                          /* 16 bit random number */
+} SilcChannelID;
+</verb>
+<descrip><quote>
+Defines the Channel ID structure.  This is used to distinguish a channel in
+SILC network.
+</quote></descrip>
+
+<sect2>Public Interface
+
+<p>
+<verb>
+unsigned char *silc_id_id2str(void *id, SilcIdType type);
+</verb>
+<descrip><quote>
+Converts ID to unsigned char string. First argument is a pointer of the
+ID to be converted, second argument is the of the ID. Returns the converted
+ID.
+</quote></descrip>
+
+<p>
+<verb>
+void *silc_id_str2id(unsigned char *id, SilcIdType type);
+</verb>
+<descrip><quote>
+Converts string to ID. First argument is the string ID seconf is the type
+of the ID. Returns the converted ID.
+</quote></descrip>
+
+<p>
+<verb>
+unsigned int silc_id_get_len(SilcIdType type);
+</verb>
+<descrip><quote>
+Returns length of a type of an ID.
+</quote></descrip>
+
+
+<sect1>lib/silccore/idcache.h
+<sect1>lib/silccore/silcbuffer.h
+<sect1>lib/silccore/silcbuffmt.h
+<sect1>lib/silccore/silcbufutil.h
+<sect1>lib/silccore/silcchannel.h
+<sect1>lib/silccore/silccommand.h
+<sect1>lib/silccore/silcconfig.h
+<sect1>lib/silccore/silclog.h
+<sect1>lib/silccore/silcmemory.h
+<sect1>lib/silccore/silcnet.h
+<sect1>lib/silccore/silcpacket.h
+<sect1>lib/silccore/silcprotocol.h
+<sect1>lib/silccore/silcschedule.h
+<sect1>lib/silccore/silcsockconn.h
+<sect1>lib/silccore/silctask.h
+<sect1>lib/silccore/silcutil.h
+
+
+<sect>Crypto Library
+
+<sect>Math Library
+
+<sect>SIM Library
+
+<sect>SKE library
+
+<p>
+All right, so you're typing along, and you want to show some example code,
+or example I/O with a program, whatever. Use the <tt/code/ or <tt/verb/
+``environments'' for this, wrapped in a <tt/tscreen/ environment, as so:
+<tscreen><verb>
+This is an example verb environment.
+</verb></tscreen>
+As well as:
+<tscreen><code>
+This is an example code environment.
+</code></tscreen>
+The <tt/tscreen/ environment just sets the font to small type and 
+indents it nicely. It's not required for using <tt/verb/ or <tt/code/,
+but I suggest that you do. 
+
+The <em/Linuxdoc-SGML User's Guide/ explains what special characters you
+can and can't use in the <tt/verb/ and <tt/code/ environments. 
+
+<sect1><heading><label id="test-ref">Cross references</>
+
+<p>
+What about cross-references? This section has been marked with the
+<tt>label</> command; using <tt>ref</> will provide a cross reference,
+as in ``See Section <ref id="test-ref">'' for more. 
+
+Right now cross-references don't work in the <tt/groff/ translation for 
+plain ASCII.  They do work when generating LaTeX or HTML output.
+
+<sect1>Using fonts
+
+<p>
+You want fonts, we got fonts. Of course these won't show up in the
+plain ASCII text, but they all map into the various output formats:
+<bf/boldface/, <em/emphasis/, <sf/sans serif/, <sl/slanted/,
+<tt/typewriter/, and <it/italics/.
+
+<sect1>Lists
+
+<p>
+Lists are easy as well. Just use the <tt/itemize/ element with the
+<tt/item/ commands, seen here:
+<itemize>
+<item> This is a list.
+<item> Nothing exciting about that.
+       <itemize> 
+       <item> Multiple levels are supported as well.
+       <item> Again, that's no surprise.
+       </itemize>
+       <enum>
+       <item> Enumerated lists using <tt>enum</> also work.
+       <item> Description environments using <tt>descrip</> along
+             with <tt>tag</> are also available, as seen here.
+       </enum>
+       <descrip>
+       <tag/First item./ Here's one item.
+       <tag/Second item./ Here's another.
+       <tag/Third item./ Can we go for three?
+       </descrip>
+<item> A final item to top it all off.
+</itemize>
+
+This is just about everything that you need to get started with
+writing SGML docs using the <tt/linuxdoc-sgml/ DTD. Please let me know
+if you think something should be changed or added to this document.
+
+</article>
index ba968e2ccaa743c4e5f5b4e312ca4ba8c3ad9f9b..343a02e8ffbb0f2f3b219fa1f69dbc5e5a3f368a 100644 (file)
@@ -28,4 +28,4 @@ EXTRA_DIST = *.h
 
 INCLUDES = -I. -I.. -I../silccrypt -I../silcmath -I../silcske \
        -I../silcsim -I../.. -I../../includes -I../silccore \
-       -I../silcmath/gmp-3.0.1
+       -I../silcmath/gmp
index 5811b56a5438b3b3cc0cae1f9feb90f67149ca7a..d4321eac8a4551a61236b1b5fe79578c9ba85813 100644 (file)
@@ -43,4 +43,4 @@ EXTRA_DIST = *.h
 
 INCLUDES = -I. -I.. -I../silccrypt -I../silcmath -I../silcske \
        -I../silcsim -I../.. -I../../includes \
-       -I../silcmath/gmp-3.0.1
+       -I../silcmath/gmp
index b0d7d8185ab09bc745be1f5f546dc98ee91071a6..6e7514e37dceaa6bc6d7748fb0b565c5cd1569ce 100644 (file)
@@ -41,4 +41,4 @@ EXTRA_DIST = *.h
 
 INCLUDES = -I. -I.. -I../silccore -I../silcmath -I../silcske \
        -I../silcsim -I../.. -I../../includes \
-       -I../silcmath/gmp-3.0.1
+       -I../silcmath/gmp
index 2aa9ec48bef8b117bf5730ed66be5f07be3cedd3..c9aaf66bdf5924bc461224b6fb19ed71c8171c57 100644 (file)
@@ -18,7 +18,7 @@
 
 AUTOMAKE_OPTIONS = 1.0 no-dependencies foreign
 
-SUBDIRS = gmp-3.0.1
+SUBDIRS = gmp
 
 noinst_LIBRARIES = libsilcmath.a
 
@@ -31,4 +31,4 @@ EXTRA_DIST = *.h
 
 INCLUDES = -I. -I.. -I../silccrypt -I../silccore -I../silcske \
        -I../silcsim -I../.. -I../../includes \
-       -I./gmp-3.0.1
+       -I./gmp
index dc920e8d78e392088c694abe5c4770f2916108e9..64dfa8629aa622160601ede958dcaa78a5da10e5 100644 (file)
@@ -72,4 +72,4 @@ EXTRA_DIST = *.h
 
 INCLUDES = -I. -I.. -I../silccrypt -I../silcmath -I../silcske \
        -I../silccore -I../.. -I../../includes \
-       -I../silcmath/gmp-3.0.1
+       -I../silcmath/gmp
index dcc56ed7e0eaca0aad3f92fe59cac0df1c13b7d4..c2ac3a96c4e193aa35701d7c65934e549ca9ae3e 100644 (file)
@@ -29,4 +29,4 @@ EXTRA_DIST = *.h
 
 INCLUDES = -I. -I.. -I../silccrypt -I../silccore \
        -I../silcsim -I../silcmath -I../.. -I../../includes \
-        -I../silcmath/gmp-3.0.1
+        -I../silcmath/gmp