Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
senf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wiback
senf
Commits
bfcdfd37
Commit
bfcdfd37
authored
15 years ago
by
tho
Browse files
Options
Downloads
Patches
Plain Diff
Packets/80221Bundle: set messageId on finalize
parent
650ae548
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Packets/80221Bundle/MIHPacket.cc
+16
-21
16 additions, 21 deletions
Packets/80221Bundle/MIHPacket.cc
with
16 additions
and
21 deletions
Packets/80221Bundle/MIHPacket.cc
+
16
−
21
View file @
bfcdfd37
...
...
@@ -50,7 +50,6 @@ prefix_ void senf::MIHFId_TLVParser::setString(std::string const &id)
std
::
copy
(
id
.
begin
(),
id
.
end
(),
si
);
}
prefix_
senf
::
MACAddress
senf
::
MIHFId_TLVParser
::
asMACAddress
()
const
{
...
...
@@ -91,47 +90,45 @@ prefix_ void senf::MIHFId_TLVParser::setINet6Address(senf::INet6Address const &a
std
::
copy
(
addr
.
begin
(),
addr
.
end
(),
getNAIEncodedOutputIterator
(
si
));
}
prefix_
void
senf
::
MIHPacketType
::
dump
(
packet
p
,
std
::
ostream
&
os
)
{
boost
::
io
::
ios_all_saver
ias
(
os
);
os
<<
"MIH Packet:
\n
"
<<
" protocol header:
\n
"
<<
" Version:
"
<<
unsigned
(
p
->
version
())
<<
"
\n
"
<<
" Ack-Request:
"
<<
p
->
ackRequest
()
<<
"
\n
"
<<
" Ack-Response:
"
<<
p
->
ackResponse
()
<<
"
\n
"
<<
" UIR:
"
<<
p
->
uir
()
<<
"
\n
"
<<
" more fragment:
"
<<
p
->
moreFragment
()
<<
"
\n
"
<<
" fragment number:
"
<<
p
->
fragmentNr
()
<<
"
\n
"
<<
" Version:
"
<<
unsigned
(
p
->
version
())
<<
"
\n
"
<<
" Ack-Request:
"
<<
p
->
ackRequest
()
<<
"
\n
"
<<
" Ack-Response:
"
<<
p
->
ackResponse
()
<<
"
\n
"
<<
" UIR:
"
<<
p
->
uir
()
<<
"
\n
"
<<
" more fragment:
"
<<
p
->
moreFragment
()
<<
"
\n
"
<<
" fragment number:
"
<<
p
->
fragmentNr
()
<<
"
\n
"
<<
" message ID (MID): "
<<
unsigned
(
p
->
messageId
())
<<
"
\n
"
<<
" SID:
"
<<
unsigned
(
p
->
sid
())
<<
"
\n
"
<<
" Opcode:
"
<<
unsigned
(
p
->
opcode
())
<<
"
\n
"
<<
" AID:
"
<<
unsigned
(
p
->
aid
())
<<
"
\n
"
<<
" Transaction ID:
"
<<
unsigned
(
p
->
transactionId
())
<<
"
\n
"
<<
" payload length:
"
<<
unsigned
(
p
->
payloadLength
())
<<
"
\n
"
<<
" SID:
"
<<
unsigned
(
p
->
sid
())
<<
"
\n
"
<<
" Opcode:
"
<<
unsigned
(
p
->
opcode
())
<<
"
\n
"
<<
" AID:
"
<<
unsigned
(
p
->
aid
())
<<
"
\n
"
<<
" Transaction ID:
"
<<
unsigned
(
p
->
transactionId
())
<<
"
\n
"
<<
" payload length:
"
<<
unsigned
(
p
->
payloadLength
())
<<
"
\n
"
<<
" source MIHF_Id TLV:
\n
"
<<
" type:
"
<<
unsigned
(
p
->
src_mihfId
().
type
())
<<
"
\n
"
<<
" length:
"
<<
unsigned
(
p
->
src_mihfId
().
length
())
<<
"
\n
"
<<
" type:
"
<<
unsigned
(
p
->
src_mihfId
().
type
())
<<
"
\n
"
<<
" length:
"
<<
unsigned
(
p
->
src_mihfId
().
length
())
<<
"
\n
"
<<
" value:
\n
"
;
std
::
string
src_mihfId
(
p
->
src_mihfId
().
asString
());
hexdump
(
src_mihfId
.
begin
(),
src_mihfId
.
end
(),
os
);
os
<<
" destination MIHF_Id TLV:
\n
"
<<
" type:
"
<<
unsigned
(
p
->
dst_mihfId
().
type
())
<<
"
\n
"
<<
" length:
"
<<
unsigned
(
p
->
dst_mihfId
().
length
())
<<
"
\n
"
<<
" type:
"
<<
unsigned
(
p
->
dst_mihfId
().
type
())
<<
"
\n
"
<<
" length:
"
<<
unsigned
(
p
->
dst_mihfId
().
length
())
<<
"
\n
"
<<
" value:
\n
"
;
std
::
string
dst_mihfId
(
p
->
dst_mihfId
().
asString
());
hexdump
(
dst_mihfId
.
begin
(),
dst_mihfId
.
end
(),
os
);
}
prefix_
void
senf
::
MIHPacketType
::
finalize
(
packet
p
)
{
p
->
src_mihfId
().
shrinkLength
();
p
->
dst_mihfId
().
shrinkLength
();
p
->
payloadLength_
()
<<
p
.
size
()
-
8
;
p
->
messageId
()
<<
key
(
p
.
next
(
nothrow
));
}
prefix_
senf
::
PacketInterpreterBase
::
factory_t
senf
::
MIHPacketType
::
nextPacketType
(
packet
p
)
{
if
(
p
.
data
().
size
()
<
initSize
())
...
...
@@ -140,7 +137,6 @@ prefix_ senf::PacketInterpreterBase::factory_t senf::MIHPacketType::nextPacketTy
return
e
?
e
->
factory
()
:
MIHPayloadPacket
::
factory
();
}
prefix_
void
senf
::
MIHPayloadPacketType
::
dump
(
packet
p
,
std
::
ostream
&
os
)
{
boost
::
io
::
ios_all_saver
ias
(
os
);
...
...
@@ -148,7 +144,6 @@ prefix_ void senf::MIHPayloadPacketType::dump(packet p, std::ostream &os)
<<
" ToDo!
\n
"
;
}
#undef prefix_
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment