Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
babeld
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
babeld
Commits
f4e276ef
Commit
f4e276ef
authored
Apr 29, 2016
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename mask_prefix to normalize_prefix.
parent
77204114
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
message.c
message.c
+1
-1
util.c
util.c
+3
-3
util.h
util.h
+3
-3
No files found.
message.c
View file @
f4e276ef
...
...
@@ -117,7 +117,7 @@ network_prefix(int ae, int plen, unsigned int omitted,
return
-
1
;
}
mask
_prefix
(
p_r
,
prefix
,
plen
<
0
?
128
:
ae
==
1
?
plen
+
96
:
plen
);
normalize
_prefix
(
p_r
,
prefix
,
plen
<
0
?
128
:
ae
==
1
?
plen
+
96
:
plen
);
return
ret
;
}
...
...
util.c
View file @
f4e276ef
...
...
@@ -230,8 +230,8 @@ in_prefix(const unsigned char *restrict address,
}
unsigned
char
*
mask
_prefix
(
unsigned
char
*
restrict
ret
,
const
unsigned
char
*
restrict
prefix
,
unsigned
char
plen
)
normalize
_prefix
(
unsigned
char
*
restrict
ret
,
const
unsigned
char
*
restrict
prefix
,
unsigned
char
plen
)
{
if
(
plen
>=
128
)
{
memcpy
(
ret
,
prefix
,
16
);
...
...
@@ -383,7 +383,7 @@ parse_net(const char *net, unsigned char *prefix_r, unsigned char *plen_r,
}
}
}
mask
_prefix
(
prefix_r
,
prefix
,
plen
);
normalize
_prefix
(
prefix_r
,
prefix
,
plen
);
*
plen_r
=
plen
;
if
(
af_r
)
*
af_r
=
af
;
return
0
;
...
...
util.h
View file @
f4e276ef
...
...
@@ -84,9 +84,9 @@ void do_debugf(int level, const char *format, ...)
int
in_prefix
(
const
unsigned
char
*
restrict
address
,
const
unsigned
char
*
restrict
prefix
,
unsigned
char
plen
)
ATTRIBUTE
((
pure
));
unsigned
char
*
mask
_prefix
(
unsigned
char
*
restrict
ret
,
const
unsigned
char
*
restrict
prefix
,
unsigned
char
plen
);
unsigned
char
*
normalize
_prefix
(
unsigned
char
*
restrict
ret
,
const
unsigned
char
*
restrict
prefix
,
unsigned
char
plen
);
const
char
*
format_address
(
const
unsigned
char
*
address
);
const
char
*
format_prefix
(
const
unsigned
char
*
address
,
unsigned
char
prefix
);
const
char
*
format_eui64
(
const
unsigned
char
*
eui
);
...
...
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