
-------------------------------------------------------------------------------
                          Gtk-gnutella remote shell
-------------------------------------------------------------------------------
Date: 17.12.2002
Author: Richard Eckart
$Id: remote-shell.txt,v 1.4 2003/12/09 18:32:33 eqom14 Exp $


Introduction
------------

  The remote shell service of gtk-gnutella serves as a playground for the
  upcoming core<->gui separation.  Here I want to implement several commands
  that are currently only available through gnet.h.  At the moment you can't
  do very much with this service.



Connecting
----------

  To connect to the service simply telnet to the gnutella port on your machine.
  
  
Authentification
----------------

  The first thing you need to do after the connect is to authenticate.  For 
  that you need to supply the command:

    HELO [credential]

  The [credential] is stored in $GTK_GNUTELLA_DIR/auth_cookie.  Gtk-gnutella
  creates this file at startup and stores a random base32 value in it.  The
  file is readable only by the owner.


Commands
--------

  After the authentication, you can enter commands.  Commands are not case 
  sensitive (but property names are.)  You can use double-quotes in commands to 
  create arguments that contain spaces.  Within those quotes the "\" (backslash) 
  is used to escape chars ('\x' -> 'x', '\"' -> '"').  This is useful if you 
  need to have double-quotes in a quoted argument.

  The commands that are currently working are:
   
  - HELP 
    Shows available commands

  - QUIT
    Close connection

  - SEARCH ADD <query>
    Creates a new search for <query>.

  - NODE ADD <ip> [port]
    Try to connect to given <ip>. [port] is optional. If no [port] is given
    the default gnutella port 6346 is used.

  - PRINT <property>
    Print the current value of a property.  Refer to gnet_props.ag and 
    gui_props.ag to find names, descriptions, and possible values of 
    properties.  Current values are stored in ~/.gtk-gnutella/config_gnet 
    and ~/.gtk-gnutella/config_gui so you could also look there for hints.

  - SET <property> <value>
    Set the value of <property> to <value>.
    Boolean values are false|FALSE|0 for false and true|TRUE|!0 for true.
    Multichoice properties must be set with their integer values, e.g. 
    to set configured_peermode, you should know that 0 is for leaf, 
    1 for legacy, 2 for up, and 3 for auto.  

	- WHATIS <property>
    Print information about the property.  This is the same information 
    found in the tooltip in the gui.
    
