"Fossies" - the Fresh Open Source Software Archive

Member "courier-1.2.2/courier/doc/structures.html" (25 Aug 2013, 5041 Bytes) of package /linux/misc/courier-1.2.2.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <?xml version="1.0" encoding="utf-8"?>
    2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    3     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    4 
    5 <html xmlns="http://www.w3.org/1999/xhtml">
    6 <head>
    7   <meta http-equiv="content-type" content=
    8   "text/html; charset=utf-8" />
    9   <meta name="MSSmartTagsPreventParsing" content="TRUE" />
   10   <meta name="Author" content="Sam Varshavchik" />
   11 
   12   <title>Internal Structures</title>
   13   <!-- Copyright 2000-2004 Double Precision, Inc.  See COPYING for -->
   14   <!-- distribution information. -->
   15   <link rel="icon" href="icon.gif" type="image/gif" />
   16 </head>
   17 
   18 <body>
   19   <h2>Internal Structures</h2>The following structures are used
   20   internally by courierd.
   21 
   22   <h4>drvinfo</h4>This is an array of modules configured into
   23   <em>Courier</em>. This array is actually allocated by process A, upon
   24   startup (but the initialization is completed in process B, so
   25   changes to <b>maxdels</b>, <b>maxhost</b>, and other parameters,
   26   can affect a live system).
   27   <pre>
   28 class drvinfo {
   29     struct rw_transport *module;   // Points to the rw_transport structure libcourier.a has
   30                                    // allocated for the module.
   31     CArray&lt;delinfo&gt; delinfo_list;  // Current delivery attempts.  Array allocated at startup,
   32                                    // and never deallocated.  Size of the array is specified
   33                                    // by <b>maxdels</b> from the module config file
   34     CArray&lt;dlvrhosts&gt; hosts_list;   // Hosts where current delivery attempts are going to.
   35                                    // Array allocated at startup.  Size of the array is specified
   36                                    // by <b>maxdels</b> from the module config file
   37     unsigned maxhost, maxrcpt;     // From the config file
   38 
   39     struct delinfo *delpfreefirst; // Link list of unused delinfos in delinfo_list,
   40                                    // linked by freenext.
   41 
   42     struct dlvrhost *hdlvrpfree;   // Link list of unused drvhosts in hosts_list, linked by next.
   43 
   44     struct dlvrhost *hdlvrpfirst, *hdlvrplast; // MRU list of drvhosts in hosts_list, linked by
   45                                                // next and prevfo
   46     CList&lt;pendelinfo&gt; pendelinfo_list;  // List of pending deliveries that haven't been scheduled
   47                                         // because max # of deliveries have been reached
   48 } ;
   49 </pre>
   50 
   51   <h4>dlvrhost</h4>This array is allocated for each module, and is
   52   used to keep count of how many deliveries are pending for the
   53   same host.
   54   <pre>
   55 class dlvrhost {
   56     struct dlvrhost *next, *prev; /* next used on hdlvrpfree list, else
   57                                  this is the first/last list, in MRU order */
   58     CString hostname;            /* Name of this host */
   59     unsigned dlvrcount;        /* How many deliveries to this host are in progress */
   60     pendelinfo *pending_list;  // List of recipients NOT being delivered
   61 } ;
   62 </pre>
   63 
   64   <h4>delinfo</h4>
   65   <pre>
   66 class delinfo {
   67     struct delinfo *freenext; // List of unused delinfo in the same module.
   68     unsigned delid;           // My index in delinfo_list array
   69     dlvrhost *dlvrphost;      // Host we're delivering to
   70     rcptinfo *rcptlist;       // List of recipients being delivered
   71 } ;
   72 </pre>
   73 
   74   <h4>msgq</h4>This structure represents a message that is either
   75   being delivered to, or which has a delivery attempt coming up. An
   76   array of msgq structures is allocated when process B starts, and
   77   its individual members are sorted based on the nextdel field.
   78   <pre>
   79 class msgq {
   80     struct msgq *next, *prev; // Sorted by nextdel
   81     struct msgq *nexthash, *prevhash; // Same hash bucket
   82     ino_t        msgnum;      // Queue message number
   83     time_t       nextdel;     // Next delivery attempt (used to find the filename in msgq)
   84     CArray&lt;rcptinfo&gt; rcptinfo_list;  // The recipients
   85     unsigned     rcptcount;   // # of deliveries pending or in progress
   86 } ;
   87 </pre>
   88 
   89   <h4>rcptinfo</h4>An array of rcptinfos is allocated to list all
   90   recipients for a given message.
   91   <pre>
   92 class rcptinfo {
   93     msgq     *msg;     // Message we belong to
   94 
   95     drvinfo       *delmodule;    // Use this module
   96     pendelinfo    *pending;      // Not NULL if we're not delivering this recipient list yet.
   97     POSITION       pendingpos;   // The position of the pointer in pending-&gt;recipient_list
   98     CString        envsender;    // Envelope sender rewritten to the transport format
   99     CString        delhost; // Deliver to this host
  100     CStringArray   addresses;     // Deliver to these addresses
  101     CUIntArray     addressesidx;  // Indexes of addresses in control file
  102 } ;
  103 </pre>
  104 
  105   <h4>pendelinfo</h4>A list of all hosts for which we have
  106   rcptinfos that have not been allocated a delinfo yet.
  107   <pre>
  108 class pendelinfo {
  109     POSITION pos;        // My position in drvp-&gt;pendelinfo_list
  110     drvinfo *drvp;       // My module
  111     CString hostname;
  112     CList&lt;rcptinfo *&gt; receipient_list;
  113     dlvrhost *hostp;     //  
  114 } ;
  115 </pre>&nbsp;
  116 </body>
  117 </html>