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
9ba2198b
Commit
9ba2198b
authored
Aug 11, 2014
by
Matthieu Boutier
Committed by
Juliusz Chroboczek
Mar 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Format source-specific wildcard requests.
parent
6b3d9dff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
13 deletions
+32
-13
message.c
message.c
+32
-13
No files found.
message.c
View file @
9ba2198b
...
@@ -1745,6 +1745,8 @@ send_marginal_ihu(struct interface *ifp)
...
@@ -1745,6 +1745,8 @@ send_marginal_ihu(struct interface *ifp)
}
}
}
}
/* Standard wildcard request with prefix == NULL && src_prefix == zeroes,
Specific wildcard request with prefix == zeroes && src_prefix == NULL. */
void
void
send_request
(
struct
interface
*
ifp
,
send_request
(
struct
interface
*
ifp
,
const
unsigned
char
*
prefix
,
unsigned
char
plen
,
const
unsigned
char
*
prefix
,
unsigned
char
plen
,
...
@@ -1768,33 +1770,50 @@ send_request(struct interface *ifp,
...
@@ -1768,33 +1770,50 @@ send_request(struct interface *ifp,
if
(
!
if_up
(
ifp
))
if
(
!
if_up
(
ifp
))
return
;
return
;
if
(
!
prefix
)
if
(
prefix
&&
src_prefix
)
{
debugf
(
"sending request to %s for any.
\n
"
,
ifp
->
name
);
else
debugf
(
"sending request to %s for %s from %s.
\n
"
,
ifp
->
name
,
debugf
(
"sending request to %s for %s from %s.
\n
"
,
ifp
->
name
,
format_prefix
(
prefix
,
plen
),
format_prefix
(
prefix
,
plen
),
format_prefix
(
src_prefix
,
src_plen
));
format_prefix
(
src_prefix
,
src_plen
));
}
else
if
(
prefix
)
{
debugf
(
"sending request to %s for any specific.
\n
"
,
ifp
->
name
);
start_message
(
ifp
,
MESSAGE_REQUEST_SRC_SPECIFIC
,
3
);
accumulate_byte
(
ifp
,
0
);
accumulate_byte
(
ifp
,
0
);
accumulate_byte
(
ifp
,
0
);
end_message
(
ifp
,
MESSAGE_REQUEST_SRC_SPECIFIC
,
3
);
return
;
}
else
if
(
src_prefix
)
{
debugf
(
"sending request to %s for any.
\n
"
,
ifp
->
name
);
start_message
(
ifp
,
MESSAGE_REQUEST
,
2
);
accumulate_byte
(
ifp
,
0
);
accumulate_byte
(
ifp
,
0
);
end_message
(
ifp
,
MESSAGE_REQUEST
,
2
);
return
;
}
else
{
send_request
(
ifp
,
NULL
,
0
,
zeroes
,
0
);
send_request
(
ifp
,
zeroes
,
0
,
NULL
,
0
);
return
;
}
v4
=
plen
>=
96
&&
v4mapped
(
prefix
);
v4
=
plen
>=
96
&&
v4mapped
(
prefix
);
pb
=
v4
?
((
plen
-
96
)
+
7
)
/
8
:
(
plen
+
7
)
/
8
;
pb
=
v4
?
((
plen
-
96
)
+
7
)
/
8
:
(
plen
+
7
)
/
8
;
len
=
!
prefix
?
2
:
2
+
pb
;
len
=
2
+
pb
;
if
(
src_plen
!=
0
)
{
if
(
src_plen
!=
0
)
{
spb
=
v4
?
((
src_plen
-
96
)
+
7
)
/
8
:
(
src_plen
+
7
)
/
8
;
spb
=
v4
?
((
src_plen
-
96
)
+
7
)
/
8
:
(
src_plen
+
7
)
/
8
;
len
+=
spb
+
1
;
len
+=
spb
+
1
;
start_message
(
ifp
,
MESSAGE_REQUEST_SRC_SPECIFIC
,
len
);
start_message
(
ifp
,
MESSAGE_REQUEST_SRC_SPECIFIC
,
len
);
}
else
{
}
else
{
start_message
(
ifp
,
MESSAGE_REQUEST
,
len
);
start_message
(
ifp
,
MESSAGE_REQUEST
,
len
);
}
}
accumulate_byte
(
ifp
,
!
prefix
?
0
:
v4
?
1
:
2
);
accumulate_byte
(
ifp
,
v4
?
1
:
2
);
accumulate_byte
(
ifp
,
!
prefix
?
0
:
v4
?
plen
-
96
:
plen
);
accumulate_byte
(
ifp
,
v4
?
plen
-
96
:
plen
);
if
(
src_plen
!=
0
)
if
(
src_plen
!=
0
)
accumulate_byte
(
ifp
,
v4
?
src_plen
-
96
:
src_plen
);
accumulate_byte
(
ifp
,
v4
?
src_plen
-
96
:
src_plen
);
if
(
prefix
)
{
if
(
v4
)
if
(
v4
)
accumulate_bytes
(
ifp
,
prefix
+
12
,
pb
);
accumulate_bytes
(
ifp
,
prefix
+
12
,
pb
);
else
else
accumulate_bytes
(
ifp
,
prefix
,
pb
);
accumulate_bytes
(
ifp
,
prefix
,
pb
);
}
if
(
src_plen
!=
0
)
{
if
(
src_plen
!=
0
)
{
if
(
v4
)
if
(
v4
)
accumulate_bytes
(
ifp
,
src_prefix
+
12
,
spb
);
accumulate_bytes
(
ifp
,
src_prefix
+
12
,
spb
);
...
...
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