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
emulab
emulab-devel
Commits
19fdb901
Commit
19fdb901
authored
Jan 29, 2004
by
David Anderson
Browse files
Using with_keyfile variant of event_register.
parent
f2bd0f0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
event/linktest/linktest.c
View file @
19fdb901
...
...
@@ -33,7 +33,7 @@ usage(char *progname)
{
fprintf
(
stderr
,
"Usage: %s [-d] "
"[-s server] [-p port] [-l logfile] -e pid/eid
\n
"
,
"[-s server] [-p port]
[-k keyfile]
[-l logfile] -e pid/eid
\n
"
,
progname
);
exit
(
-
1
);
}
...
...
@@ -44,6 +44,7 @@ main(int argc, char **argv) {
address_tuple_t
tuple
;
char
*
server
=
NULL
;
char
*
port
=
NULL
;
char
*
keyfile
=
NULL
;
char
*
pideid
=
NULL
;
char
*
logfile
=
NULL
;
char
*
progname
;
...
...
@@ -52,7 +53,7 @@ main(int argc, char **argv) {
progname
=
argv
[
0
];
while
((
c
=
getopt
(
argc
,
argv
,
"s:p:e:l:d"
))
!=
-
1
)
{
while
((
c
=
getopt
(
argc
,
argv
,
"s:p:e:l:d
k:
"
))
!=
-
1
)
{
switch
(
c
)
{
case
'd'
:
debug
++
;
...
...
@@ -69,7 +70,9 @@ main(int argc, char **argv) {
case
'l'
:
logfile
=
optarg
;
break
;
case
'k'
:
keyfile
=
optarg
;
break
;
default:
usage
(
progname
);
}
...
...
@@ -119,9 +122,9 @@ main(int argc, char **argv) {
/*
* Register with the event system.
*/
handle
=
event_register
(
server
,
0
);
handle
=
event_register
_withkeyfile
(
server
,
0
,
keyfile
);
if
(
handle
==
NULL
)
{
fatal
(
"could not register with event system"
);
fatal
(
"could not register with event system"
);
}
/*
...
...
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