-int get_peer_port(int sock);
-
-/* Returns the port number of the remote host. */
-int get_remote_port(void);
-
-/* Tries to match the host name (which must be in all lowercase) against the
- comma-separated sequence of subpatterns (each possibly preceded by ! to
- indicate negation). Returns true if there is a positive match; zero
- otherwise. */
-int match_hostname(const char *host, const char *pattern, unsigned int len);
-
-/* Checks whether the given host is already in the list of our known hosts.
- Returns HOST_OK if the host is known and has the specified key,
- HOST_NEW if the host is not known, and HOST_CHANGED if the host is known
- but used to have a different host key. The host must be in all lowercase. */
-typedef enum { HOST_OK, HOST_NEW, HOST_CHANGED } HostStatus;
-HostStatus check_host_in_hostfile(const char *filename,
- const char *host, unsigned int bits,
- BIGNUM *e, BIGNUM *n,
- BIGNUM *ke, BIGNUM *kn);
-
-/* Appends an entry to the host file. Returns false if the entry
- could not be appended. */
-int add_host_to_hostfile(const char *filename, const char *host,
- unsigned int bits, BIGNUM *e, BIGNUM *n);
-
-/* Performs the RSA authentication challenge-response dialog with the client,
- and returns true (non-zero) if the client gave the correct answer to
- our challenge; returns zero if the client gives a wrong answer. */
-int auth_rsa_challenge_dialog(unsigned int bits, BIGNUM *e, BIGNUM *n);
-
-/* Reads a passphrase from /dev/tty with echo turned off. Returns the
- passphrase (allocated with xmalloc). Exits if EOF is encountered.
- If from_stdin is true, the passphrase will be read from stdin instead. */
-char *read_passphrase(const char *prompt, int from_stdin);
-
-/* Saves the authentication (private) key in a file, encrypting it with
- passphrase. The identification of the file (lowest 64 bits of n)
- will precede the key to provide identification of the key without
- needing a passphrase. */
-int save_private_key(const char *filename, const char *passphrase,
- RSA *private_key, const char *comment);
-
-/* Loads the public part of the key file (public key and comment).
- Returns 0 if an error occurred; zero if the public key was successfully
- read. The comment of the key is returned in comment_return if it is
- non-NULL; the caller must free the value with xfree. */
-int load_public_key(const char *filename, RSA *pub,
- char **comment_return);
-
-/* Loads the private key from the file. Returns 0 if an error is encountered
- (file does not exist or is not readable, or passphrase is bad).
- This initializes the private key. The comment of the key is returned
- in comment_return if it is non-NULL; the caller must free the value
- with xfree. */
-int load_private_key(const char *filename, const char *passphrase,
- RSA *private_key, char **comment_return);
+int get_peer_port(int sock);
+
+/* Returns the port number of the remote/local host. */
+int get_remote_port(void);
+int get_local_port(void);
+
+
+/*
+ * Tries to match the host name (which must be in all lowercase) against the
+ * comma-separated sequence of subpatterns (each possibly preceded by ! to
+ * indicate negation). Returns true if there is a positive match; zero
+ * otherwise.
+ */
+int match_hostname(const char *host, const char *pattern, unsigned int len);
+
+/*
+ * Checks whether the given host is already in the list of our known hosts.
+ * Returns HOST_OK if the host is known and has the specified key, HOST_NEW
+ * if the host is not known, and HOST_CHANGED if the host is known but used
+ * to have a different host key. The host must be in all lowercase.
+ */
+typedef enum {
+ HOST_OK, HOST_NEW, HOST_CHANGED
+} HostStatus;
+HostStatus
+check_host_in_hostfile(const char *filename, const char *host,
+ BIGNUM * e, BIGNUM * n, BIGNUM * ke, BIGNUM * kn);
+
+/*
+ * Appends an entry to the host file. Returns false if the entry could not
+ * be appended.
+ */
+int
+add_host_to_hostfile(const char *filename, const char *host,
+ BIGNUM * e, BIGNUM * n);
+
+/*
+ * Performs the RSA authentication challenge-response dialog with the client,
+ * and returns true (non-zero) if the client gave the correct answer to our
+ * challenge; returns zero if the client gives a wrong answer.
+ */
+int auth_rsa_challenge_dialog(BIGNUM * e, BIGNUM * n);
+
+/*
+ * Reads a passphrase from /dev/tty with echo turned off. Returns the
+ * passphrase (allocated with xmalloc). Exits if EOF is encountered. If
+ * from_stdin is true, the passphrase will be read from stdin instead.
+ */
+char *read_passphrase(const char *prompt, int from_stdin);
+
+/*
+ * Saves the authentication (private) key in a file, encrypting it with
+ * passphrase. The identification of the file (lowest 64 bits of n) will
+ * precede the key to provide identification of the key without needing a
+ * passphrase.
+ */
+int
+save_private_key(const char *filename, const char *passphrase,
+ RSA * private_key, const char *comment);
+
+/*
+ * Loads the public part of the key file (public key and comment). Returns 0
+ * if an error occurred; zero if the public key was successfully read. The
+ * comment of the key is returned in comment_return if it is non-NULL; the
+ * caller must free the value with xfree.
+ */
+int
+load_public_key(const char *filename, RSA * pub,
+ char **comment_return);
+
+/*
+ * Loads the private key from the file. Returns 0 if an error is encountered
+ * (file does not exist or is not readable, or passphrase is bad). This
+ * initializes the private key. The comment of the key is returned in
+ * comment_return if it is non-NULL; the caller must free the value with
+ * xfree.
+ */
+int
+load_private_key(const char *filename, const char *passphrase,
+ RSA * private_key, char **comment_return);