Changeset 7547 for trunk/daemon/daemon.c


Ignore:
Timestamp:
Dec 30, 2008, 6:18:34 PM (12 years ago)
Author:
charles
Message:

(trunk daemon) #1618: patch from er13 to make transmission-daemon's encryption, port, and peer limit command-line arguments similar to transmission-remote's

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/daemon.c

    r7537 r7547  
    6666    { 'v', "password", "Set password for authentication", "v", 1, "<password>" },
    6767    { 'w', "download-dir", "Where to save downloaded data", "w", 1, "<path>" },
     68    { 'P', "peerport", "Port for incoming peers (Default: " TR_DEFAULT_PEER_PORT_STR ")", "P", 1, "<port>" },
     69    { 'm', "portmap", "Enable portmapping via NAT-PMP or UPnP", "m", 0, NULL },
     70    { 'M', "no-portmap", "Disable portmapping", "M", 0, NULL },
     71    { 'L', "peerlimit-global", "Maximum overall number of peers (Default: " TR_DEFAULT_PEER_LIMIT_GLOBAL_STR ")", "L", 1, "<limit>" },
     72    { 'l', "peerlimit-torrent", "Maximum number of peers per torrent (Default: " TR_DEFAULT_PEER_LIMIT_TORRENT_STR ")", "l", 1, "<limit>" },
     73    { 910, "encryption-required",  "Encrypt all peer connections", "er", 0, NULL },
     74    { 911, "encryption-preferred", "Prefer encrypted peer connections", "ep", 0, NULL },
     75    { 912, "encryption-tolerated", "Prefer unencrypted peer connections", "et", 0, NULL },
    6876    { 0, NULL, NULL, NULL, 0, NULL }
    6977};
     
    215223            case 'w': tr_bencDictAddStr( &settings, TR_PREFS_KEY_DOWNLOAD_DIR, optarg );
    216224                      break;
     225            case 'P': tr_bencDictAddInt( &settings, TR_PREFS_KEY_PEER_PORT, atoi( optarg ) );
     226                      break;
     227            case 'm': tr_bencDictAddInt( &settings, TR_PREFS_KEY_PORT_FORWARDING, 1 );
     228                      break;
     229            case 'M': tr_bencDictAddInt( &settings, TR_PREFS_KEY_PORT_FORWARDING, 0 );
     230                      break;
     231            case 'L': tr_bencDictAddInt( &settings, TR_PREFS_KEY_PEER_LIMIT_GLOBAL, atoi( optarg ) );
     232                      break;
     233            case 'l': tr_bencDictAddInt( &settings, TR_PREFS_KEY_PEER_LIMIT_TORRENT, atoi( optarg ) );
     234                      break;
     235            case 910: tr_bencDictAddInt( &settings, TR_PREFS_KEY_ENCRYPTION, TR_ENCRYPTION_REQUIRED );
     236                      break;
     237            case 911: tr_bencDictAddInt( &settings, TR_PREFS_KEY_ENCRYPTION, TR_CLEAR_PREFERRED );
     238                      break;
     239            case 912: tr_bencDictAddInt( &settings, TR_PREFS_KEY_ENCRYPTION, TR_ENCRYPTION_PREFERRED );
     240                      break;
    217241            default:  showUsage( );
    218242                      break;
Note: See TracChangeset for help on using the changeset viewer.