summaryrefslogtreecommitdiff
path: root/channel.h
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2014-07-16 22:53:32 +0800
committerMatt Johnston <matt@ucc.asn.au>2014-07-16 22:53:32 +0800
commit074e3095451ff08dfda217deb1e51fede0c6f52e (patch)
treed13dc9ead17ee20849c5f43662ccbb4467319f04 /channel.h
parent235fb34a9c7933fa50d5cff8e7564774036f2d74 (diff)
downloaddropbear-074e3095451ff08dfda217deb1e51fede0c6f52e.tar.gz
Set tcp priority as follows:
if (connecting || ptys || x11) tos = LOWDELAY; else if (tcp_forwards) tos = 0; else tos = BULK; TCP forwards could be either lowdelay or bulk, hence the default priority.
Diffstat (limited to 'channel.h')
-rw-r--r--channel.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/channel.h b/channel.h
index 5d174f2..7008eff 100644
--- a/channel.h
+++ b/channel.h
@@ -29,14 +29,6 @@
#include "buffer.h"
#include "circbuffer.h"
-/* channel->type values */
-#define CHANNEL_ID_NONE 0
-#define CHANNEL_ID_SESSION 1
-#define CHANNEL_ID_X11 2
-#define CHANNEL_ID_AGENT 3
-#define CHANNEL_ID_TCPDIRECT 4
-#define CHANNEL_ID_TCPFORWARDED 5
-
#define SSH_OPEN_ADMINISTRATIVELY_PROHIBITED 1
#define SSH_OPEN_CONNECT_FAILED 2
#define SSH_OPEN_UNKNOWN_CHANNEL_TYPE 3
@@ -49,6 +41,13 @@
struct ChanType;
+enum dropbear_channel_prio {
+ DROPBEAR_CHANNEL_PRIO_INTERACTIVE, /* pty shell, x11 */
+ DROPBEAR_CHANNEL_PRIO_UNKNOWABLE, /* tcp - can't know what's being forwarded */
+ DROPBEAR_CHANNEL_PRIO_BULK, /* the rest - probably scp or something */
+ DROPBEAR_CHANNEL_PRIO_EARLY, /* channel is still being set up */
+};
+
struct Channel {
unsigned int index; /* the local channel index */
@@ -87,6 +86,8 @@ struct Channel {
void (*read_mangler)(struct Channel*, unsigned char* bytes, int *len);
const struct ChanType* type;
+
+ enum dropbear_channel_prio prio;
};
struct ChanType {
@@ -97,7 +98,6 @@ struct ChanType {
int (*check_close)(struct Channel*);
void (*reqhandler)(struct Channel*);
void (*closehandler)(struct Channel*);
-
};
void chaninitialise(const struct ChanType *chantypes[]);