Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
ROOL
InetRes
Commits
6a07ba5c
Commit
6a07ba5c
authored
Jul 01, 1999
by
Kevin Bracey
Browse files
Correction - failed to interpret 136.170.32/21 correctly.
parent
37a26229
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
Sources/route/Makefile
Sources/route/Makefile
+1
-1
Sources/route/c/Route
Sources/route/c/Route
+7
-3
No files found.
Sources/route/Makefile
View file @
6a07ba5c
...
...
@@ -22,7 +22,7 @@ RM= remove
WFLAGS
=
fr~c~v
WIPE
=
-wipe
CFLAGS
=
-
W
-I
$(INCLUDES)
-c
${THROWBACK}
-depend
!
Depend
CFLAGS
=
-
pcc
-I
$(INCLUDES)
-c
${THROWBACK}
-depend
!
Depend
OBJS
=
o.
${TARGET}
...
...
Sources/route/c/Route
View file @
6a07ba5c
...
...
@@ -784,12 +784,13 @@ newroute(argc, argv)
}
void
inet_makenetandmask
(
net
,
sin
)
u_long
net
;
inet_makenetandmask
(
net
,
sin
,
bits
)
u_long
net
,
bits
;
register
struct
sockaddr_in
*
sin
;
{
u_long
addr
,
mask
=
0
;
register
char
*
cp
;
printf
(
"inet_makenetandmask(0x%lx, %p, %lu)
\n
"
,
net
,
sin
,
bits
);
rtm_addrs
|=
RTA_NETMASK
;
if
(
net
==
0
)
...
...
@@ -814,6 +815,9 @@ inet_makenetandmask(net, sin)
else
mask
=
-
1
;
}
if
(
net
!=
0
&&
bits
)
{
mask
=
0xffffffff
<<
(
32
-
bits
);
}
sin
->
sin_addr
.
s_addr
=
htonl
(
addr
);
sin
=
&
so_mask
.
sin
;
sin
->
sin_addr
.
s_addr
=
htonl
(
mask
);
...
...
@@ -856,7 +860,7 @@ getaddr(which, s, hpp)
case
RTA_GATEWAY
:
su
=
&
so_gate
;
if
(
iflag
)
{
#
define MAX_IFACES 400
#
define MAX_IFACES 400
int
sock
;
struct
ifreq
iflist
[
MAX_IFACES
];
struct
ifconf
ifconf
;
...
...
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