Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
LSH
lsh
Commits
3a9b7529
Commit
3a9b7529
authored
Sep 03, 1998
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added verbose option.
Rev: src/lsh.c:1.5 Rev: src/lshd.c:1.3
parent
82e3e297
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
16 deletions
+19
-16
src/lsh.c
src/lsh.c
+4
-2
src/lshd.c
src/lshd.c
+15
-14
No files found.
src/lsh.c
View file @
3a9b7529
...
...
@@ -28,7 +28,6 @@ int main(int argc, char **argv)
{
char
*
host
=
NULL
;
char
*
port
=
"ssh"
;
/* int verbose; */
int
option
;
struct
sockaddr_in
remote
;
...
...
@@ -37,7 +36,7 @@ int main(int argc, char **argv)
* strings to and from UTF8. */
setlocale
(
LC_CTYPE
,
""
);
while
((
option
=
getopt
(
argc
,
argv
,
"dp:q"
))
!=
-
1
)
while
((
option
=
getopt
(
argc
,
argv
,
"dp:q
v
"
))
!=
-
1
)
switch
(
option
)
{
case
'p'
:
...
...
@@ -49,6 +48,9 @@ int main(int argc, char **argv)
case
'd'
:
debug_flag
=
1
;
break
;
case
'v'
:
verbose_flag
=
1
;
break
;
default:
usage
();
}
...
...
src/lshd.c
View file @
3a9b7529
...
...
@@ -3,12 +3,17 @@
* main server program.
*/
#include <getopt.h>
#include <stdio.h>
#include <locale.h>
#include "getopt.h"
#include "io.h"
#include "werror.h"
#include "server.h"
#define BLOCK_SIZE 32768
/* Global variable */
struct
io_backend
backend
;
...
...
@@ -23,7 +28,6 @@ int main(int argc, char **argv)
{
char
*
host
=
NULL
;
/* Interface to bind */
char
*
port
=
"ssh"
;
int
verbose
;
int
option
;
struct
sockaddr_in
local
;
...
...
@@ -32,7 +36,7 @@ int main(int argc, char **argv)
* strings to and from UTF8. */
setlocale
(
LC_CTYPE
,
""
);
while
((
option
=
getopt
(
argc
,
argv
,
"dp:qi:"
))
!=
-
1
)
while
((
option
=
getopt
(
argc
,
argv
,
"dp:qi:
v
"
))
!=
-
1
)
switch
(
option
)
{
case
'p'
:
...
...
@@ -47,6 +51,9 @@ int main(int argc, char **argv)
case
'i'
:
host
=
optarg
;
break
;
case
'v'
:
verbose_flag
=
1
;
break
;
default:
usage
();
}
...
...
@@ -60,18 +67,12 @@ int main(int argc, char **argv)
exit
(
1
);
}
{
struct
server_callback
connected
=
{
{
(
fd_callback_f
)
server_initiate
},
&
backend
,
BLOCK_SIZE
;
};
io_listen
(
&
backend
,
&
local
,
make_server_callback
(
backend
,
BLOCK_SIZE
));
}
make_server_callback
(
&
backend
,
"lsh - a free ssh"
,
BLOCK_SIZE
));
io_run
();
io_run
(
&
backend
);
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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