version 1.11, 2000/01/04 13:41:32 |
version 1.12, 2000/04/14 10:30:30 |
|
|
/* |
/* |
* |
* |
* canohost.c |
* canohost.c |
* |
* |
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
* |
* |
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
* All rights reserved |
* All rights reserved |
* |
* |
* Created: Sun Jul 2 17:52:22 1995 ylo |
* Created: Sun Jul 2 17:52:22 1995 ylo |
* |
* |
* Functions for returning the canonical host name of the remote site. |
* Functions for returning the canonical host name of the remote site. |
* |
* |
*/ |
*/ |
|
|
#include "includes.h" |
#include "includes.h" |
|
|
|
|
/* Returns remote/local port number for the current connection. */ |
/* Returns remote/local port number for the current connection. */ |
|
|
int |
int |
get_port(int local) |
get_port(int local) |
{ |
{ |
/* |
/* |
|
|
return get_sock_port(packet_get_connection_in(), local); |
return get_sock_port(packet_get_connection_in(), local); |
} |
} |
|
|
int |
int |
get_peer_port(int sock) |
get_peer_port(int sock) |
{ |
{ |
return get_sock_port(sock, 0); |
return get_sock_port(sock, 0); |
} |
} |
|
|
int |
int |
get_remote_port() |
get_remote_port() |
{ |
{ |
return get_port(0); |
return get_port(0); |