Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LSH
lsh
Commits
b4a3ad5a
Commit
b4a3ad5a
authored
Aug 30, 2001
by
Niels Möller
Browse files
* src/client_x11.c: Work in progress.
(client_x11_auth_info): New class. Rev: src/client_x11.c:1.2
parent
88c3dce5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/client_x11.c
View file @
b4a3ad5a
...
...
@@ -30,6 +30,20 @@
#include
<unistd.h>
#include
<fcntl.h>
#define X11_WINDOW_SIZE 10000
/* GABA
(class
(name client_x11_auth_info)
(vars
; Fake MIT-COOKIE-1
(fake string)
; Real authentication info
(auth_name string)
(auth_data string)))
*/
/* GABA:
(class
(name channel_open_x11)
...
...
@@ -38,12 +52,17 @@
(address_length . socklen_t)
(address space "struct sockaddr")
; Fake MIT-COOKIE-1
(fake string)
(authinfo object client_x11_auth_info)))
*/
; Real authentication info
(auth_name string)
(auth_data string)))
/* GABA:
(class
(name client_x11_channel)
(super channel_forward)
(vars
(authinfo object client_x11_auth_info)
(state . unsigned)
(buffer string)))
*/
/* Format is host:display.screen, where display and screen are numbers */
...
...
@@ -130,22 +149,34 @@ parse_display(const char *display, socklen_t *sl)
/* GABA:
(class
(name channel_open_callback)
(name channel_open_
x11_
callback)
(super io_callback)
(vars
(c
ontex
t object channel_open_x11)
(ct
x
object channel_open_x11)
(c object command_continuation)))
*/
static
void
do_channel_open_callback
(
struct
lsh_fd
*
fd
)
do_channel_open_
x11_
callback
(
struct
io_callback
*
s
,
struct
lsh_fd
*
fd
)
{
CAST
(
channel_open_callback
,
self
,
s
);
struct
channel_forward
*
channel
=
make_client_channel_x11
(
fd
,
X11_WINDOW_SIZE
);
channel_forward_start_io
(
channel_forward
);
channel
->
super
.
do_receive
=
do_channel_x11_receive
COMMAND_RETURN
(
self
->
c
,
channel
);
}
struct
io_callback
*
make_channel_open_x11_callback
(
struct
channel_open_x11
*
self
)
make_channel_open_x11_callback
(
struct
channel_open_x11
*
ctx
,
struct
command_continuation
*
c
)
{
NEW
(
channel_open_x11_callback
,
self
);
self
->
super
.
f
=
do_channel_open_x11_callback
;
self
->
ctx
=
ctx
;
self
->
c
=
c
;
return
&
self
->
super
;
}
/* Exception handler that promotes connect errors to CHANNEL_OPEN
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment