#include <netinet/in.h> /* For struct sockaddr_in */
#include <pwd.h> /* For struct pw */
#include <stdarg.h> /* For va_list */
+#include <sys/socket.h> /* For struct sockaddr_storage */
+#include "fake-socket.h" /* For struct sockaddr_storage */
#ifdef HAVE_SYS_SELECT_H
# include <sys/select.h>
#endif
*/
void
record_login(int pid, const char *ttyname, const char *user, uid_t uid,
- const char *host, struct sockaddr_in * addr);
+ const char *host, struct sockaddr *addr);
/*
* Records that the user has logged out. This does many thigs normally done
* packet_set_connection for the connection.
*/
int
-ssh_connect(const char *host, struct sockaddr_in * hostaddr,
+ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
u_short port, int connection_attempts,
int anonymous, uid_t original_real_uid,
const char *proxy_command);
void
ssh_login(int host_key_valid, RSA * host_key, const char *host,
- struct sockaddr_in * hostaddr, uid_t original_real_uid);
+ struct sockaddr * hostaddr, uid_t original_real_uid);
/*------------ Definitions for various authentication methods. -------*/
/* Returns the port number of the peer of the socket. */
int get_peer_port(int sock);
-/* Returns the port number of the remote host. */
+/* 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
int auth_skey_password(struct passwd * pw, const char *password);
#endif /* SKEY */
+/* AF_UNSPEC or AF_INET or AF_INET6 */
+extern int IPv4or6;
+
#ifdef USE_PAM
#include "auth-pam.h"
#endif /* USE_PAM */