Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
net-tools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
net-tools
Commits
68fff33c
Commit
68fff33c
authored
Apr 01, 2001
by
Phil Blundell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Undo "close spare sockets" patch to fix IPv6 breakage.
Improve some diagnostics.
parent
b53af368
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
612 additions
and
479 deletions
+612
-479
ifconfig.c
ifconfig.c
+8
-13
po/net-tools.pot
po/net-tools.pot
+604
-466
No files found.
ifconfig.c
View file @
68fff33c
...
...
@@ -3,7 +3,7 @@
* that either displays or sets the characteristics of
* one or more of the system's networking interfaces.
*
* Version: $Id: ifconfig.c,v 1.4
5 2001/02/19 21:42:43 ecki
Exp $
* Version: $Id: ifconfig.c,v 1.4
6 2001/04/01 14:50:24 pb
Exp $
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* and others. Copyright 1993 MicroWalt Corporation
...
...
@@ -84,7 +84,7 @@ struct in6_ifreq {
#include "sockets.h"
#include "util.h"
char
*
Release
=
RELEASE
,
*
Version
=
"ifconfig 1.4
0 (2000-05-2
1)"
;
char
*
Release
=
RELEASE
,
*
Version
=
"ifconfig 1.4
1 (2001-04-0
1)"
;
int
opt_a
=
0
;
/* show all interfaces */
int
opt_i
=
0
;
/* show the statistics */
...
...
@@ -254,7 +254,6 @@ int main(int argc, char **argv)
textdomain
(
"net-tools"
);
#endif
/* Find any options. */
argc
--
;
argv
++
;
...
...
@@ -277,8 +276,9 @@ int main(int argc, char **argv)
usage
();
else
{
fprintf
(
stderr
,
"ifconfig: unknown option %s
\n
"
,
argv
[
0
]);
fprintf
(
stderr
,
"(Use --help for usage information.
\n
)"
);
fprintf
(
stderr
,
_
(
"ifconfig: option `%s' not recognised.
\n
"
),
argv
[
0
]);
fprintf
(
stderr
,
_
(
"ifconfig: `--help' gives usage information.
\n
"
));
exit
(
1
);
}
...
...
@@ -306,6 +306,7 @@ int main(int argc, char **argv)
(
void
)
close
(
skfd
);
exit
(
err
<
0
);
}
/* The next argument is either an address family name, or an option. */
if
((
ap
=
get_aftype
(
*
spp
))
!=
NULL
)
spp
++
;
/* it was a AF name */
...
...
@@ -314,13 +315,7 @@ int main(int argc, char **argv)
if
(
ap
)
{
addr_family
=
ap
->
af
;
if
((
fd
=
sockets_open
(
addr_family
))
<
0
)
{
perror
(
"family socket"
);
exit
(
1
);
}
else
{
if
(
skfd
>=
0
&&
skfd
!=
fd
)
close
(
skfd
);
skfd
=
fd
;
}
skfd
=
ap
->
fd
;
}
/* Process the remaining arguments. */
...
...
@@ -924,7 +919,7 @@ int main(int argc, char **argv)
}
if
(
ap
->
input
(
0
,
host
,
&
sa
)
<
0
)
{
ap
->
herror
(
host
);
usage
(
);
fprintf
(
stderr
,
_
(
"ifconfig: `--help' gives usage information.
\n
"
)
);
}
memcpy
((
char
*
)
&
ifr
.
ifr_addr
,
(
char
*
)
&
sa
,
sizeof
(
struct
sockaddr
));
{
...
...
po/net-tools.pot
View file @
68fff33c
This diff is collapsed.
Click to expand it.
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