forked from openssh/openssh-portable
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upstream: add a comment describing the ranges of channel IDs that
we use; requested by markus@ OpenBSD-Commit-ID: 83a1f09810ffa3a96a55fbe32675b34ba739e56b
- Loading branch information
Showing
1 changed file
with
9 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: channels.h,v 1.132 2018/10/04 00:10:11 djm Exp $ */ | ||
/* $OpenBSD: channels.h,v 1.133 2020/01/25 22:49:38 djm Exp $ */ | ||
|
||
/* | ||
* Author: Tatu Ylonen <[email protected]> | ||
|
@@ -105,8 +105,16 @@ struct channel_connect { | |
/* Callbacks for mux channels back into client-specific code */ | ||
typedef int mux_callback_fn(struct ssh *, struct Channel *); | ||
|
||
/* | ||
* NB. channel IDs on the wire and in c->remote_id are uint32, but local | ||
* channel IDs (e.g. c->self) only ever use the int32 subset of this range, | ||
* because we use local channel ID -1 for housekeeping. Remote channels have | ||
* a dedicated "have_remote_id" flag to indicate their validity. | ||
*/ | ||
|
||
struct Channel { | ||
int type; /* channel type/state */ | ||
|
||
int self; /* my own channel identifier */ | ||
uint32_t remote_id; /* channel identifier for remote peer */ | ||
int have_remote_id; /* non-zero if remote_id is valid */ | ||
|