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
77f09fe6
Commit
77f09fe6
authored
May 08, 1998
by
Jes Sorensen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
the last part of the cleanup
parent
a716f9b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
31 deletions
+0
-31
arp.c
arp.c
+0
-31
No files found.
arp.c
View file @
77f09fe6
...
...
@@ -100,9 +100,6 @@ arp_del(char **args)
struct
arpreq
req
;
struct
sockaddr
sa
;
int
flags
=
0
;
#if HAVE_NEW_SIOCSARP
struct
arpreq_old
old_req
;
#endif
memset
((
char
*
)
&
req
,
0
,
sizeof
(
req
));
...
...
@@ -261,9 +258,6 @@ arp_set(char **args)
{
char
host
[
128
];
struct
arpreq
req
;
#if HAVE_NEW_SIOCSARP
struct
arpreq_old
old_req
;
#endif
struct
sockaddr
sa
;
int
flags
;
...
...
@@ -371,9 +365,7 @@ arp_set(char **args)
/* Fill in the remainder of the request. */
req
.
arp_flags
=
flags
;
#if HAVE_NEW_SIOCSARP
strcpy
(
req
.
arp_dev
,
device
);
memcpy
((
char
*
)
&
old_req
,(
char
*
)
&
req
,
sizeof
(
old_req
));
/* Call the kernel. */
if
(
opt_v
)
fprintf
(
stderr
,
"arp: SIOCSARP()
\n
"
);
...
...
@@ -382,30 +374,7 @@ arp_set(char **args)
perror
(
"SIOCSARP"
);
return
(
-
1
);
}
if
(
opt_v
)
fprintf
(
stderr
,
"arp: OLD_SIOCSARP()
\n
"
);
if
(
ioctl
(
sockfd
,
OLD_SIOCSARP
,
&
old_req
)
<
0
)
{
if
(
errno
!=
EINVAL
)
{
perror
(
"OLD_SIOCSARP"
);
return
(
-
1
);
}
perror
(
"SIOCSARP and OLD_SIOCSARP"
);
if
(
flags
&
ATF_PUBL
)
fprintf
(
stderr
,
NLS_CATGETS
(
catfd
,
arpSet
,
arp_einv_pub
,
"Probably route to destination points to interface. See arp(8)
\n
"
));
else
fprintf
(
stderr
,
NLS_CATGETS
(
catfd
,
arpSet
,
arp_einv_nopub
,
"No ARP Support or route to destination points to other interface. See arp(8)
\n
"
));
return
(
-
1
);
}
}
#else
/* Call the kernel. */
if
(
opt_v
)
fprintf
(
stderr
,
"arp: old_SIOCSARP()
\n
"
);
if
(
ioctl
(
sockfd
,
SIOCSARP
,
&
req
)
<
0
)
{
perror
(
"SIOCSARP"
);
return
(
-
1
);
}
#endif
return
(
0
);
}
...
...
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