From: Pekka Riikonen Date: Thu, 7 Sep 2000 08:28:36 +0000 (+0000) Subject: Updated GMP 3.0.1 to 3.1 X-Git-Tag: SILC.0.1~412 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=a2cb5f1de35a626aa31334597b62da132446a7c9 Updated GMP 3.0.1 to 3.1 --- diff --git a/CHANGES b/CHANGES index 495a6460..3cbade92 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +Thu Sep 7 10:49:33 EEST 2000 Pekka Riikonen + + * Added GMP 3.1 into math library. + Sun Aug 20 21:27:26 EEST 2000 Pekka Riikonen * Added SILC_PACKET_REMOVE_CHANNEL_USER to remove a client from diff --git a/apps/silc/Makefile.am b/apps/silc/Makefile.am index 982a17b2..264c67f1 100644 --- a/apps/silc/Makefile.am +++ b/apps/silc/Makefile.am @@ -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 diff --git a/apps/silcd/Makefile.am b/apps/silcd/Makefile.am index 2ff3d169..9310116e 100644 --- a/apps/silcd/Makefile.am +++ b/apps/silcd/Makefile.am @@ -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 diff --git a/configure.in b/configure.in index 17eccb52..b983c1eb 100644 --- a/configure.in +++ b/configure.in @@ -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 index 00000000..3f1ad780 --- /dev/null +++ b/doc/development/lib_reference.sgml @@ -0,0 +1,335 @@ + + + + +
+ + + +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> diff --git a/lib/contrib/Makefile.am b/lib/contrib/Makefile.am index ba968e2c..343a02e8 100644 --- a/lib/contrib/Makefile.am +++ b/lib/contrib/Makefile.am @@ -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 diff --git a/lib/silccore/Makefile.am b/lib/silccore/Makefile.am index 5811b56a..d4321eac 100644 --- a/lib/silccore/Makefile.am +++ b/lib/silccore/Makefile.am @@ -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 diff --git a/lib/silccrypt/Makefile.am b/lib/silccrypt/Makefile.am index b0d7d818..6e7514e3 100644 --- a/lib/silccrypt/Makefile.am +++ b/lib/silccrypt/Makefile.am @@ -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 diff --git a/lib/silcmath/Makefile.am b/lib/silcmath/Makefile.am index 2aa9ec48..c9aaf66b 100644 --- a/lib/silcmath/Makefile.am +++ b/lib/silcmath/Makefile.am @@ -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 diff --git a/lib/silcsim/Makefile.am b/lib/silcsim/Makefile.am index dc920e8d..64dfa862 100644 --- a/lib/silcsim/Makefile.am +++ b/lib/silcsim/Makefile.am @@ -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 diff --git a/lib/silcske/Makefile.am b/lib/silcske/Makefile.am index dcc56ed7..c2ac3a96 100644 --- a/lib/silcske/Makefile.am +++ b/lib/silcske/Makefile.am @@ -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