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-stable
Commits
b07c1369
Commit
b07c1369
authored
Dec 15, 2004
by
David Johnson
Browse files
*** empty log message ***
parent
92958dbe
Changes
5
Hide whitespace changes
Inline
Side-by-side
robots/mtp/mtp_dump.c
View file @
b07c1369
...
...
@@ -12,6 +12,7 @@
#include
<netinet/tcp.h>
#include
<arpa/inet.h>
#include
<sys/socket.h>
#include
<string.h>
#include
"mtp.h"
...
...
@@ -64,7 +65,9 @@ int main(int argc, char *argv[])
else
{
int
fd
;
#ifndef linux
sin
.
sin_len
=
sizeof
(
sin
);
#endif
sin
.
sin_family
=
AF_INET
;
sin
.
sin_port
=
htons
(
port
);
if
((
fd
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
))
==
-
1
)
{
...
...
robots/mtp/mtp_recv.c
View file @
b07c1369
...
...
@@ -12,6 +12,7 @@
#include
<netinet/tcp.h>
#include
<arpa/inet.h>
#include
<sys/socket.h>
#include
<string.h>
#include
"mtp.h"
...
...
@@ -32,7 +33,9 @@ int main(int argc, char *argv[])
int
on_off
=
1
;
memset
(
&
sin
,
0
,
sizeof
(
sin
));
#ifndef linux
sin
.
sin_len
=
sizeof
(
sin
);
#endif
sin
.
sin_family
=
AF_INET
;
sin
.
sin_port
=
htons
(
port
);
sin
.
sin_addr
.
s_addr
=
INADDR_ANY
;
...
...
robots/rmcd/rmcd.c
View file @
b07c1369
...
...
@@ -138,7 +138,9 @@ static int mygethostbyname(struct sockaddr_in *host_addr,
assert
(
strlen
(
host
)
>
0
);
memset
(
host_addr
,
0
,
sizeof
(
struct
sockaddr_in
));
#ifndef linux
host_addr
->
sin_len
=
sizeof
(
struct
sockaddr_in
);
#endif
host_addr
->
sin_family
=
AF_INET
;
host_addr
->
sin_port
=
htons
(
port
);
if
(
(
host_ent
=
gethostbyname
(
host
))
!=
NULL
)
{
...
...
@@ -170,7 +172,6 @@ static struct gorobot_conn *find_gorobot(int robot_id)
{
struct
gorobot_conn
*
retval
=
NULL
;
int
lpc
;
assert
(
robot_id
>=
0
);
for
(
lpc
=
0
;
(
lpc
<
rmc_config
->
num_robots
)
&&
!
retval
;
lpc
++
)
{
...
...
robots/vmcd/vmc-client.c
View file @
b07c1369
...
...
@@ -253,7 +253,9 @@ int main(int argc, char *argv[])
}
memset
(
&
sin
,
0
,
sizeof
(
sin
));
#ifndef linux
sin
.
sin_len
=
sizeof
(
sin
);
#endif
sin
.
sin_family
=
AF_INET
;
sin
.
sin_port
=
htons
(
port
);
sin
.
sin_addr
.
s_addr
=
INADDR_ANY
;
...
...
robots/vmcd/vmcd.c
View file @
b07c1369
...
...
@@ -137,7 +137,9 @@ static int mygethostbyname(struct sockaddr_in *host_addr,
assert
(
strlen
(
host
)
>
0
);
memset
(
host_addr
,
0
,
sizeof
(
struct
sockaddr_in
));
#ifndef linux
host_addr
->
sin_len
=
sizeof
(
struct
sockaddr_in
);
#endif
host_addr
->
sin_family
=
AF_INET
;
host_addr
->
sin_port
=
htons
(
port
);
if
(
(
host_ent
=
gethostbyname
(
host
))
!=
NULL
)
{
...
...
@@ -234,7 +236,9 @@ static int parse_client_options(int *argcp, char **argvp[])
*
argcp
=
argc
+
1
;
*
argvp
=
argv
-
1
;
#ifndef linux
optreset
=
1
;
#endif
optind
=
1
;
return
retval
;
...
...
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