diff options
author | Hannes Reinecke <hare@suse.de> | 2022-04-11 11:27:53 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2022-04-22 14:52:30 +0200 |
commit | dbc54da5c73d9e8dd1b8a258a4723279423e6e58 (patch) | |
tree | 92532a5636715023d2cc47d34294d87c466efa3c | |
parent | c3a0964c4713bb997970dbc2d4eb1e9cf2433116 (diff) | |
download | amtterm-dbc54da5c73d9e8dd1b8a258a4723279423e6e58.tar.gz |
redir: IDE-redirection receive stubs
Signed-off-by: Hannes Reinecke <hare@suse.de>
-rw-r--r-- | redir.c | 17 | ||||
-rw-r--r-- | redir.h | 3 |
2 files changed, 16 insertions, 4 deletions
@@ -369,7 +369,7 @@ int redir_sol_send(struct redir *r, unsigned char *buf, int blen) return rc; } -int redir_sol_recv(struct redir *r) +int redir_recv(struct redir *r) { unsigned char msg[64]; int count, len, bshift; @@ -500,7 +500,7 @@ repeat: case SOL_DATA_FROM_HOST: if (r->blen < 10) /* header length */ goto again; - bshift = redir_sol_recv(r); + bshift = redir_recv(r); if (bshift < 0) goto err; break; @@ -570,6 +570,19 @@ repeat: } redir_state(r, REDIR_RUN_IDER); break; + case IDER_DATA_FROM_HOST: + if (r->blen < 10) /* header length */ + goto again; + bshift = redir_recv(r); + if (bshift < 0) + goto err; + break; + case END_IDER_REDIRECTION_REPLY: + bshift = r->blen; /* FIXME */ + if (r->blen < bshift) + goto again; + redir_stop(r); + break; default: snprintf(r->err, sizeof(r->err), "%s: unknown r->buf 0x%02x", __FUNCTION__, r->buf[0]); @@ -61,12 +61,11 @@ int redir_connect(struct redir *r); int redir_start(struct redir *r); int redir_stop(struct redir *r); int redir_auth(struct redir *r); +int redir_recv(struct redir *r); int redir_sol_start(struct redir *r); int redir_sol_stop(struct redir *r); int redir_sol_send(struct redir *r, unsigned char *buf, int blen); -int redir_sol_recv(struct redir *r); int redir_ider_start(struct redir *r); int redir_ider_stop(struct redir *r); int redir_ider_send(struct redir *r, unsigned char *buf, int blen); -int redir_ider_recv(struct redir *r); int redir_data(struct redir *r); |