Frequently Asked Questions (FAQ) about opennap
==============================================
Last updated on March 8, 2001.

* General Information

Q:  What is opennap?
A:  opennap is an open source server which speaks the napster protocol

Q:  What is napster?
A:  See www.napster.com for information.

Q:  Is this project associated with napster.com?
A:  No, this server was developed without any communication with napster.com

Q:  Why can't I connect to the Napster.com servers?
A:  We are not affiliated with Napster, Inc.  You should contact them for
    assistance.

Q:  What language is opennap written in?
A:  ANSI C.

* Configuration - General

Q:  Why do I get disconnected when I browse a user with many shared files?
A:  By default, OpenNap will only queue up to 100kbytes of data for a user
    to prevent a huge backlog of data for a dead/slow client.  A user with
    1000 shared files will often create more than 100kbytes of output, which
    triggers the dead client detection to prevent using too much resources.

Q:  How do I fix it?
A:  If you have memory to spare, you can increase the value of
    client_queue_length, or alternatively decrease the number of files
    returned by a browse command (max_browse_result) so that it does not cross
    the 100kbytes default limit.

Q:  How do I get my server listed on napigator.com?
A:  Go to www.napigator.com and look for the section on adding servers.

Q:  How do I link my server to other servers?
A:  Find the people who run the server you want to link with and discuss it
    with them.  If both parties agree you exchange a password and follow
    the directions in the README for linking up.

Q:  What is a metaserver?  Do I need to run one?
A:  A metaserver is a small server that attempts to provide load balancing
    to a cluster of linked OpenNap servers.  You give it a list of all the
    servers in your cluster, and it will cycle through the list each time
    a connection is made.  Originally, the Napster client would connect to
    the metaserver to find out which Napster server to connect to.
    However, most clients these days just have support for a list of
    servers to connect directly to, totally ignoring the metaserver.
    Hence, running a metaserver is NOT required.

* Configuration - Win32

Q:  How do I get more than 256 connections under Windows?
A:  Upgrade to at least version 0.38, it supports up to 1024 connections.  Note that
    this is a compiled in defalt for the distributed binary.  If you have
    Visual C++ you can edit the project file and make this value larger if
    you wish.

    Under Windows 98SE, the max seems to be 95.  Included with this
    distribution is a registry entry (win98se_max_conn.reg) which increases
    the maximum up to 1024.  Simply double-click on the file and reboot your
    system before running OpenNap again [Thanks goes to Damien Hodgkiss!]
  
Q:  Under Windows, I see
	handle_connection(): read: Unknown error (errno 10054) for host 
    whenever a client attempts to connect to the server.  How do I fix this?
A:  Remove or comment out (by placing a # in front of the line) the line in
    your config file (typically C:\opennap\config) that begins with
    `listen_addr'.  You can use any text editor to accomplish this.

Q:  How do I compiled OpenNap with Visual C++ under Windows?
A:  You need to get DLLs for zlib from http://www.winimage.com/zLibDll/.
    You want zlib113.zip and zlib113adll.zip.  Make sure to unzip them in
    the *parent* directory of OpenNap, so that the directory tree looks like
    this:
    	zlib/
	opennap-0.xx/
    NOTE: you DO NOT want to unzip zlib in the *same* directory as the
    OpenNap source, because the project file will not be able to find them
    there.

* Configuration - Unix

Q:  How do I get more than 256 connections under *nix systems?
A:  On some systems without a poll() function, the maximum number of file
    descriptors that a process can have is controlled by the FD_SETSIZE
    macro.  If you only have select(), try rerunning configure with the
    --fd-setsize=1024 option to specify a higher value.

Q:  How do I get more than 1024 connections under Linux?
A:  You can set the per-process file descriptor limit dynamically by piping
    an integer to /proc/sys/fs/file-max
    (eg.  echo 8192 > /proc/sys/fs/file-max).  The default value seems to
    4096 which should be good enough.

    In order to utilize more than 1024 file descriptors, you must run
    opennap as root.  Set your `connection_hard_limit' variable to something
    higher than 1024 and you should be set.

Q:  Isn't running opennap as root a security risk?
A:  Running anything as root can potentially be a security risk.  Opennap
    attempts to reduce the risk by allowing you to specify the default
    uid/gid to run as.  After setting the max file descriptors, opennap
    calls setuid() and setgid() to drop root privilege (by default it uses
    user nobody, group nobody).

Q:  Why can't I run two opennap servers on the same machine even though I
    have them listening on different ports?  I get "address already in use."
A:  OpenNap by default also listens on port 8889 (the stats port).  You need
    to make either one or both of the servers not listen on that port by
    either specifying the -D command line option, or by putting
    	stats_port -1
    in the `config' file.
