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
a716f9b4
Commit
a716f9b4
authored
May 08, 1998
by
Jes Sorensen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove the references to OLD_SIOC[SD]ARP ... this was really pre-historic
parent
69b8ec07
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
37 deletions
+0
-37
arp.c
arp.c
+0
-33
lib/net-features.h
lib/net-features.h
+0
-4
No files found.
arp.c
View file @
a716f9b4
...
...
@@ -193,25 +193,12 @@ arp_del(char **args)
if
(
flags
==
0
)
flags
=
3
;
#if HAVE_NEW_SIOCSARP
strcpy
(
req
.
arp_dev
,
device
);
/* Call the kernel. */
if
(
flags
&
2
)
{
if
(
opt_v
)
fprintf
(
stderr
,
"arp: SIOCDARP(nopub)
\n
"
);
if
(
ioctl
(
sockfd
,
SIOCDARP
,
&
req
)
<
0
)
{
if
(
errno
==
EINVAL
)
{
if
(
opt_v
)
fprintf
(
stderr
,
"arp: OLD_SIOCDARP(priv)
\n
"
);
memcpy
((
char
*
)
&
old_req
,(
char
*
)
&
req
,
sizeof
(
old_req
));
if
(
ioctl
(
sockfd
,
OLD_SIOCDARP
,
&
old_req
)
<
0
)
{
if
(
errno
!=
ENXIO
)
{
perror
(
"OLD_SIOCSARP(priv)"
);
return
(
-
1
);
}
}
else
{
return
(
0
);
}
}
if
(
errno
==
ENXIO
)
{
if
(
flags
&
1
)
goto
nopub
;
...
...
@@ -228,18 +215,6 @@ nopub:
req
.
arp_flags
|=
ATF_PUBL
;
if
(
opt_v
)
fprintf
(
stderr
,
"arp: SIOCDARP(pub)
\n
"
);
if
(
ioctl
(
sockfd
,
SIOCDARP
,
&
req
)
<
0
)
{
if
(
errno
==
EINVAL
)
{
if
(
opt_v
)
fprintf
(
stderr
,
"arp: OLD_SIOCDARP(pub)
\n
"
);
memcpy
((
char
*
)
&
old_req
,(
char
*
)
&
req
,
sizeof
(
old_req
));
if
(
ioctl
(
sockfd
,
OLD_SIOCDARP
,
&
old_req
)
<
0
)
{
if
(
errno
!=
ENXIO
)
{
perror
(
"OLD_SIOCSARP(pub)"
);
return
(
-
1
);
}
}
else
{
return
(
0
);
}
}
if
(
errno
==
ENXIO
)
{
printf
(
NLS_CATGETS
(
catfd
,
arpSet
,
arp_no_arp
,
"No ARP entry for %s
\n
"
),
host
);
...
...
@@ -249,14 +224,6 @@ nopub:
return
(
-
1
);
}
}
#else
/* Call the kernel. */
if
(
opt_v
)
fprintf
(
stderr
,
"arp: old_SIOCDARP()
\n
"
);
if
(
ioctl
(
sockfd
,
SIOCDARP
,
&
req
)
<
0
)
{
perror
(
"SIOCDARP"
);
return
(
-
1
);
}
#endif
return
(
0
);
}
...
...
lib/net-features.h
View file @
a716f9b4
...
...
@@ -30,10 +30,6 @@
/* detect the present features */
#ifdef OLD_SIOCSARP
/* arp */
# define HAVE_NEW_SIOCSARP 1
#endif
#if defined (SIOCADDRTOLD) || defined (RTF_IRTT)
/* route */
# define HAVE_NEW_ADDRT 1
#endif
...
...
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