On Wed, Sep 15, 2004 at 03:28:21PM -0400, KEVIN ZEMBOWER wrote: > There was one comment that ports 10080-10083 are fixed, no > matter what --with-???portrange switches are used. Is this fact > or fiction?
(c) Neither of the above :-) The 1008x ports are not affected by the --with-*portrange options, but neither are they "fixed" in the sense of being hard-coded integers; they are *determined* by the entries in /etc/services. When deciding which "well-known" port to listen on or connect to, the Amanda code looks up the service name in /etc/services, and uses the port number it finds there (see getservbyname(3)). As I understand it (which I semi do -- I fully understood it a year and a half ago when I set up Amanda here, but you know how it goes :-/), Amanda uses the --with-*portrange options only for ports that are *not* well-known, i.e. not listed in /etc/services. There are (at least) two standard patterns for starting a connection (whether that's a real TCP connection or merely an exchange of UDP packets): 1. using a well-known port: - the listener listens on a well-known port, L1 - the initiator chooses an arbitrary port I1 for its own end, and uses it to connect to L1 at the listener end 2. not: - the listener chooses an arbitrary port L2, listens on L2, and communicates L2's port number to the initiator via some pre-existing channel (pipe, network connection, disk file, whatever) - the initiator receives the port number L2; it chooses an arbitrary port I2, and uses that to connect to L2 In Amanda, L1 is one of the three entries from /etc/services (1008x by default). If I remember correctly, I1, I2, and L2 are all determined by the --with-*portrange options. Note (and this I *am* sure of) that in Amanda, it is not dependable that initiator==client and listener==server. The client initiates some connections, but the tape server initiates others. -- | | /\ |-_|/ > Eric Siegerman, Toronto, Ont. [EMAIL PROTECTED] | | / The animal that coils in a circle is the serpent; that's why so many cults and myths of the serpent exist, because it's hard to represent the return of the sun by the coiling of a hippopotamus. - Umberto Eco, "Foucault's Pendulum"