Site Definition

From Lundman Wiki

Sites

The site structure. Protocol version 0.1 defines 23 entries for a site, plus any number of client defined key/pairs. The latter are not parsed by FXP.One, but stored for the ease of the client programmers. The clients can then chose to be completely stateless and only store information needed in FXP.One.

Please be aware that SITELIST, SITEADD and SITEMOD commands will only show (set) values that are NOT the default value. That means, if a site has "passive" set to "AUTO" it will not be included in the SITELIST reply. It is the responsibility of the client to also initialise the "passive" variable to "AUTO".

Please make sure to read the Extra_Site notes as well.

The site structure is defined as:

       char          *name;
       char          *host;
       unsigned int   port;          // Default: 21
       unsigned long  iface;
       unsigned int   iport;         // Default: 0
       char          *user;
       char          *pass;
       yesnoauto_t    passive;       // Default: AUTO
       yesnoauto_t    fxp_passive;   // Default: AUTO
       yesnoauto_t    control_TLS;   // Default: AUTO [1]
       yesnoauto_t    data_TLS;      // Default: AUTO [1]
       yesnoauto_t    desired_type;  // Default: AUTO
       yesnoauto_t    resume;        // Default: AUTO
       yesnoauto_t    resume_last;   // Default: AUTO
       yesnoauto_t    pret;          // Default: AUTO [1]
       char          *fskiplist;     // [2]
       char          *dskiplist;     // [2]
       char          *fpasslist;     // [2] [3]
       char          *dpasslist;     // [2] [3]
       char          *fmovefirst;    // [2]
       char          *dmovefirst;    // [2]
       yesnoauto_t    fskipempty;    // Default: AUTO
       yesnoauto_t    dskipempty;    // Default: AUTO


[1] AUTO means it will use this feature if it is reported by the remote FTPD in the FEAT/features command reply.

[2] Uses fnmatch(3) syntax pattern matching. Most file globbal you can do on the command line, including "*?[]", but excluding "{}". String consists of slash separated patterns. eg "*.dat/*readme.txt*".

[3] Opposite to skiplist. The default is for passlist to be empty, which is the equivalent of "*". A syntax like "*ENGLISH*" would ensure only entries which matched string would be queued, and others are dropped. Uses same pattern syntax as skiplist.

Extended Optional Arguments

As a special feature to the clients connecting to the FXP.One engine, we also allow for storing of own, arbitrary, key/value pairs. As long as the "key" is not the same as any of the above keys, or that of the predefined reserved keys. (eg. "TYPE", "END")

>> <str>=<str>     - Store extra client information.

For example:

"...|extrafield=somestuff|OS=Unix"