1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-02 03:52:49 -05:00

Rename SocketPeerInfo to SocketEndpointInfo.

I'm preparing to be able to ask about the other end of the connection
too, so the first step is to give this data structure a neutral name
that can refer to either. No functional change yet.
This commit is contained in:
Simon Tatham
2024-06-26 06:35:40 +01:00
parent 431838747b
commit f454c84a23
25 changed files with 61 additions and 61 deletions

View File

@ -531,7 +531,7 @@ struct ssh_rportfwd *ssh1_rportfwd_alloc(
}
SshChannel *ssh1_serverside_x11_open(
ConnectionLayer *cl, Channel *chan, const SocketPeerInfo *pi)
ConnectionLayer *cl, Channel *chan, const SocketEndpointInfo *pi)
{
unreachable("Should never be called in the client");
}

View File

@ -315,7 +315,7 @@ static void ssh1sesschan_send_exit_signal(
}
SshChannel *ssh1_serverside_x11_open(
ConnectionLayer *cl, Channel *chan, const SocketPeerInfo *pi)
ConnectionLayer *cl, Channel *chan, const SocketEndpointInfo *pi)
{
struct ssh1_connection_state *s =
container_of(cl, struct ssh1_connection_state, cl);

View File

@ -48,7 +48,7 @@ static void ssh1_rportfwd_remove(
ConnectionLayer *cl, struct ssh_rportfwd *rpf);
static SshChannel *ssh1_lportfwd_open(
ConnectionLayer *cl, const char *hostname, int port,
const char *description, const SocketPeerInfo *pi, Channel *chan);
const char *description, const SocketEndpointInfo *pi, Channel *chan);
static struct X11FakeAuth *ssh1_add_x11_display(
ConnectionLayer *cl, int authtype, struct X11Display *disp);
static bool ssh1_agent_forwarding_permitted(ConnectionLayer *cl);
@ -641,7 +641,7 @@ static struct X11FakeAuth *ssh1_add_x11_display(
static SshChannel *ssh1_lportfwd_open(
ConnectionLayer *cl, const char *hostname, int port,
const char *description, const SocketPeerInfo *pi, Channel *chan)
const char *description, const SocketEndpointInfo *pi, Channel *chan)
{
struct ssh1_connection_state *s =
container_of(cl, struct ssh1_connection_state, cl);

View File

@ -111,7 +111,7 @@ struct ssh_rportfwd *ssh1_rportfwd_alloc(
int addressfamily, const char *log_description, PortFwdRecord *pfr,
ssh_sharing_connstate *share_ctx);
SshChannel *ssh1_serverside_x11_open(
ConnectionLayer *cl, Channel *chan, const SocketPeerInfo *pi);
ConnectionLayer *cl, Channel *chan, const SocketEndpointInfo *pi);
SshChannel *ssh1_serverside_agent_open(ConnectionLayer *cl, Channel *chan);
void ssh1_connection_direction_specific_setup(

View File

@ -156,7 +156,7 @@ bool ssh2_connection_parse_global_request(
PktOut *ssh2_portfwd_chanopen(
struct ssh2_connection_state *s, struct ssh2_channel *c,
const char *hostname, int port,
const char *description, const SocketPeerInfo *peerinfo)
const char *description, const SocketEndpointInfo *peerinfo)
{
PacketProtocolLayer *ppl = &s->ppl; /* for ppl_logevent */
PktOut *pktout;
@ -321,7 +321,7 @@ SshChannel *ssh2_session_open(ConnectionLayer *cl, Channel *chan)
}
SshChannel *ssh2_serverside_x11_open(
ConnectionLayer *cl, Channel *chan, const SocketPeerInfo *pi)
ConnectionLayer *cl, Channel *chan, const SocketEndpointInfo *pi)
{
unreachable("Should never be called in the client");
}

View File

@ -109,7 +109,7 @@ bool ssh2_connection_parse_global_request(
PktOut *ssh2_portfwd_chanopen(
struct ssh2_connection_state *s, struct ssh2_channel *c,
const char *hostname, int port,
const char *description, const SocketPeerInfo *pi)
const char *description, const SocketEndpointInfo *pi)
{
PacketProtocolLayer *ppl = &s->ppl; /* for ppl_logevent */
PktOut *pktout;
@ -158,7 +158,7 @@ SshChannel *ssh2_session_open(ConnectionLayer *cl, Channel *chan)
}
SshChannel *ssh2_serverside_x11_open(
ConnectionLayer *cl, Channel *chan, const SocketPeerInfo *pi)
ConnectionLayer *cl, Channel *chan, const SocketEndpointInfo *pi)
{
struct ssh2_connection_state *s =
container_of(cl, struct ssh2_connection_state, cl);

View File

@ -33,7 +33,7 @@ static const PacketProtocolLayerVtable ssh2_connection_vtable = {
static SshChannel *ssh2_lportfwd_open(
ConnectionLayer *cl, const char *hostname, int port,
const char *description, const SocketPeerInfo *pi, Channel *chan);
const char *description, const SocketEndpointInfo *pi, Channel *chan);
static struct X11FakeAuth *ssh2_add_x11_display(
ConnectionLayer *cl, int authtype, struct X11Display *x11disp);
static struct X11FakeAuth *ssh2_add_sharing_x11_display(
@ -1461,7 +1461,7 @@ static void ssh2channel_hint_channel_is_simple(SshChannel *sc)
static SshChannel *ssh2_lportfwd_open(
ConnectionLayer *cl, const char *hostname, int port,
const char *description, const SocketPeerInfo *pi, Channel *chan)
const char *description, const SocketEndpointInfo *pi, Channel *chan)
{
struct ssh2_connection_state *s =
container_of(cl, struct ssh2_connection_state, cl);

View File

@ -159,7 +159,7 @@ PktOut *ssh2_chanopen_init(struct ssh2_channel *c, const char *type);
PktOut *ssh2_portfwd_chanopen(
struct ssh2_connection_state *s, struct ssh2_channel *c,
const char *hostname, int port,
const char *description, const SocketPeerInfo *peerinfo);
const char *description, const SocketEndpointInfo *peerinfo);
struct ssh_rportfwd *ssh2_rportfwd_alloc(
ConnectionLayer *cl,
@ -170,7 +170,7 @@ void ssh2_rportfwd_remove(
ConnectionLayer *cl, struct ssh_rportfwd *rpf);
SshChannel *ssh2_session_open(ConnectionLayer *cl, Channel *chan);
SshChannel *ssh2_serverside_x11_open(
ConnectionLayer *cl, Channel *chan, const SocketPeerInfo *pi);
ConnectionLayer *cl, Channel *chan, const SocketEndpointInfo *pi);
SshChannel *ssh2_serverside_agent_open(ConnectionLayer *cl, Channel *chan);
void ssh2channel_send_exit_status(SshChannel *c, int status);

View File

@ -152,7 +152,7 @@ static SshChannel *wrap_lportfwd_open(
ConnectionLayer *cl, const char *hostname, int port,
Socket *s, Channel *chan)
{
SocketPeerInfo *pi;
SocketEndpointInfo *pi;
char *description;
SshChannel *toret;
@ -163,7 +163,7 @@ static SshChannel *wrap_lportfwd_open(
description = dupstr("forwarding");
}
toret = ssh_lportfwd_open(cl, hostname, port, description, pi, chan);
sk_free_peer_info(pi);
sk_free_endpoint_info(pi);
sfree(description);
return toret;

View File

@ -383,7 +383,7 @@ static int xfwd_accepting(Plug *p, accept_fn_t constructor, accept_ctx_t ctx)
Plug *plug;
Channel *chan;
Socket *s;
SocketPeerInfo *pi;
SocketEndpointInfo *pi;
const char *err;
chan = portfwd_raw_new(sess->c->cl, &plug, false);
@ -394,7 +394,7 @@ static int xfwd_accepting(Plug *p, accept_fn_t constructor, accept_ctx_t ctx)
}
pi = sk_peer_info(s);
portfwd_raw_setup(chan, s, ssh_serverside_x11_open(sess->c->cl, chan, pi));
sk_free_peer_info(pi);
sk_free_endpoint_info(pi);
return 0;
}

View File

@ -1909,7 +1909,7 @@ static int share_listen_accepting(Plug *plug,
plug, struct ssh_sharing_state, plug);
struct ssh_sharing_connstate *cs;
const char *err;
SocketPeerInfo *peerinfo;
SocketEndpointInfo *peerinfo;
/*
* A new downstream has connected to us.
@ -1956,7 +1956,7 @@ static int share_listen_accepting(Plug *plug,
log_downstream(cs, "connected%s%s",
(peerinfo && peerinfo->log_text ? " from " : ""),
(peerinfo && peerinfo->log_text ? peerinfo->log_text : ""));
sk_free_peer_info(peerinfo);
sk_free_endpoint_info(peerinfo);
return 0;
}