Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Paul Warren
iftop
Commits
3824538a
Commit
3824538a
authored
Oct 14, 2003
by
pdw
Browse files
Cosmetic changes.
parent
b7eb237e
Changes
2
Hide whitespace changes
Inline
Side-by-side
addrs_dlpi.c
View file @
3824538a
...
@@ -90,7 +90,7 @@ get_addrs_dlpi(char *interface, char if_hw_addr[], struct in_addr *if_ip_addr)
...
@@ -90,7 +90,7 @@ get_addrs_dlpi(char *interface, char if_hw_addr[], struct in_addr *if_ip_addr)
return
-
1
;
return
-
1
;
}
}
fprintf
(
stderr
,
"i
f
: %s
\n
"
,
devname
);
fprintf
(
stderr
,
"i
nterface
: %s
\n
"
,
devname
);
// on Solaris, even though we are wanting to talk to ethernet device
// on Solaris, even though we are wanting to talk to ethernet device
// ge0, we have to open /dev/ge, then bind to unit 0. Dupe our
// ge0, we have to open /dev/ge, then bind to unit 0. Dupe our
...
...
addrs_ioctl.c
View file @
3824538a
...
@@ -50,7 +50,7 @@ get_addrs_ioctl(char *interface, char if_hw_addr[], struct in_addr *if_ip_addr)
...
@@ -50,7 +50,7 @@ get_addrs_ioctl(char *interface, char if_hw_addr[], struct in_addr *if_ip_addr)
return
-
1
;
return
-
1
;
}
}
fprintf
(
stderr
,
"i
f
: %s
\n
"
,
interface
);
fprintf
(
stderr
,
"i
nterface
: %s
\n
"
,
interface
);
memset
(
if_hw_addr
,
0
,
6
);
memset
(
if_hw_addr
,
0
,
6
);
strncpy
(
ifr
.
ifr_name
,
interface
,
IFNAMSIZ
);
strncpy
(
ifr
.
ifr_name
,
interface
,
IFNAMSIZ
);
...
@@ -72,7 +72,7 @@ get_addrs_ioctl(char *interface, char if_hw_addr[], struct in_addr *if_ip_addr)
...
@@ -72,7 +72,7 @@ get_addrs_ioctl(char *interface, char if_hw_addr[], struct in_addr *if_ip_addr)
#ifdef SIOCGIFADDR
#ifdef SIOCGIFADDR
(
*
(
struct
sockaddr_in
*
)
&
ifr
.
ifr_addr
).
sin_family
=
AF_INET
;
(
*
(
struct
sockaddr_in
*
)
&
ifr
.
ifr_addr
).
sin_family
=
AF_INET
;
if
(
ioctl
(
s
,
SIOCGIFADDR
,
&
ifr
)
<
0
)
{
if
(
ioctl
(
s
,
SIOCGIFADDR
,
&
ifr
)
<
0
)
{
fprintf
(
stderr
,
"
Error getting
IP address for interface: %s
\n
"
,
interface
);
fprintf
(
stderr
,
"
Unable to get
IP address for interface: %s
\n
"
,
interface
);
perror
(
"ioctl(SIOCGIFADDR)"
);
perror
(
"ioctl(SIOCGIFADDR)"
);
}
}
else
{
else
{
...
...
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