summaryrefslogtreecommitdiffhomepage
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
commitda57dd13c5352efd63c8692bbc12d19c9f882a2b (patch)
treeec18c7626bb47b3c4540f78d65d2a49b8a2d2fbf /channel.h
parentf1826ea389bfddb6a0d52314d01e3d8b8f46eec8 (diff)
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[]);