Ignore:
Timestamp:
Sep 25, 2008, 6:48:09 PM (14 years ago)
Author:
charles
Message:

rpc-server cleanups. add true wildmat control. break the Mac build a little harder.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/transmission.h

    r6795 r6798  
    347347
    348348/**
    349  * @brief test an ACL's syntax without modifying the RPC settings.
    350  *
    351  * ACL is a comma separated list of IP subnets, each subnet is prepended
    352  * by a '+' or '-' sign to denote 'allow' or 'deny'.  If the subnet mask
    353  * is omitted, like "-1.2.3.4", it means a single IP address. The mask
    354  * may vary from 0 to 32 inclusive.  A simple primer on x.x.x.x/n notation
    355  * can be found at <http://25yearsofprogramming.com/blog/20070803.htm>.
    356  *
    357  * Since wildcards are more familiar to most users than netmasks,
    358  * libtransmission supports a wildcard notation that it
    359  * converts into cidr required by the embedded http server.
    360  * So, notation like "+192.168.*.*" is accepted by libtransmission and is
    361  * converted to "+192.168.0.0/16" before it reaches the server.
    362 
    363  * @param acl the ACL to test
    364  * @param allocme_errmsg If the ACL can't be parsed, this is set to a
    365  *                       newly-allocated error string describing the problem.
    366  *                       The client should tr_free() this string when done.
    367  * @return 0 on success, -1 on failure due to an unparseable ACL.
    368  */
    369 int tr_sessionTestRPCACL( const tr_handle * session,
    370                           const char *      acl,
    371                           char **           allocme_errmsg );
    372 
    373 /**
    374349 * @brief Specify access control list (ACL).
    375    ACL is a comma separated list
    376  * of IP subnets, each subnet is prepended by a '-' or '+' sign.
    377  * Plus means allow, minus means deny. If the subnet mask is omitted,
    378  * like "-1.2.3.4", it means a single IP address. The mask may vary
    379  * from 0 to 32 inclusive.
    380  *
    381  * http://25yearsofprogramming.com/blog/20070803.htm has a simple
    382  * primer on x.x.x.x/n notation for those interested.
    383  *
    384  * The parameters and return value follow the same behavior as
    385  * tr_sessionTestRPCACL().
    386  *
    387  * @see tr_sessionTestRPCACL
    388  * @see tr_sessionInitFull
    389  * @see tr_sessionGetRPCACL
    390  */
    391 int   tr_sessionSetRPCACL( tr_session * session,
    392                            const char * acl,
    393                            char **      allocme_errmsg );
     350 *
     351 * ACL is a comma-delimited list of dotted-quad IP addresses, each preceded
     352 * by a '+' or '-' sign to denote 'allow' or 'deny'.  Wildmat notation is
     353 * supported, meaning that '?' is interpreted as a single-character wildcard
     354 * and '*' is interprted as a multi-character wildcard.
     355 */
     356void   tr_sessionSetRPCACL( tr_session * session,
     357                            const char * acl );
    394358
    395359/** @brief get the Access Control List for allowing/denying RPC requests.
Note: See TracChangeset for help on using the changeset viewer.