Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Titan Test System Framework
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
CTI Tools
Titan Test System Framework
Commits
e7f13cca
Commit
e7f13cca
authored
2 months ago
by
Yann Garcia
Browse files
Options
Downloads
Patches
Plain Diff
Bug fixed in SCTP offline
parent
fffe402b
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
ccsrc/Protocols/Sctp/sctp_offline_layer.cc
+19
-7
19 additions, 7 deletions
ccsrc/Protocols/Sctp/sctp_offline_layer.cc
with
19 additions
and
7 deletions
ccsrc/Protocols/Sctp/sctp_offline_layer.cc
+
19
−
7
View file @
e7f13cca
...
...
@@ -111,24 +111,24 @@ void sctp_offline_layer::process_chunk(const OCTETSTRING& p_chunk, params &p_par
p
+=
2
;
// Skip Chunk type + Chunk flag
// Chunk length
uint16_t
l
=
(
*
p
<<
8
|
*
(
p
+
1
))
&
0xffff
;
loggers
::
get_instance
().
log
(
"sctp_offline_layer::
receive_data
: l: %d"
,
l
);
loggers
::
get_instance
().
log
(
"sctp_offline_layer::
process_chunk
: l: %d"
,
l
);
p
+=
2
;
p
+=
4
;
// Skip Transmission sequence number
// Stream identifier
OCTETSTRING
stream_id
=
OCTETSTRING
(
2
,
p
);
loggers
::
get_instance
().
log_msg
(
"sctp_offline_layer::
receive_data
: stream_id: "
,
stream_id
);
loggers
::
get_instance
().
log_msg
(
"sctp_offline_layer::
process_chunk
: stream_id: "
,
stream_id
);
p
+=
2
;
// Stream sequence number
OCTETSTRING
stream_num
=
OCTETSTRING
(
2
,
p
);
loggers
::
get_instance
().
log_msg
(
"sctp_offline_layer::
receive_data
: stream_num: "
,
stream_num
);
loggers
::
get_instance
().
log_msg
(
"sctp_offline_layer::
process_chunk
: stream_num: "
,
stream_num
);
p
+=
2
;
// Protocol
uint32_t
protocol
=
(
*
p
<<
24
|
*
(
p
+
1
)
<<
16
|
*
(
p
+
2
)
<<
8
|
*
(
p
+
3
))
&
0xffffffff
;
loggers
::
get_instance
().
log
(
"sctp_offline_layer::
receive_data
: protocol: %d"
,
protocol
);
loggers
::
get_instance
().
log
(
"sctp_offline_layer::
process_chunk
: protocol: %d"
,
protocol
);
p
+=
4
;
loggers
::
get_instance
().
log
(
"sctp_offline_layer::
receive_data
: pointer offset: %d"
,
(
uint32_t
)(
p
-
static_cast
<
const
uint8_t
*>
(
p_chunk
)));
loggers
::
get_instance
().
log
(
"sctp_offline_layer::
process_chunk
: pointer offset: %d"
,
(
uint32_t
)(
p
-
static_cast
<
const
uint8_t
*>
(
p_chunk
)));
p_payload
=
OCTETSTRING
(
p_chunk
.
lengthof
()
-
(
uint32_t
)(
p
-
static_cast
<
const
uint8_t
*>
(
p_chunk
)),
p
);
}
break
;
...
...
@@ -136,7 +136,19 @@ void sctp_offline_layer::process_chunk(const OCTETSTRING& p_chunk, params &p_par
break
;
case
0x02
:
// INIT_ACK chunk
break
;
case
0x03
:
// SACK
case
0x03
:
{
// SACK
loggers
::
get_instance
().
log
(
"sctp_offline_layer::process_chunk (SACK): position: %02x"
,
static_cast
<
const
uint8_t
>
(
*
(
p
)));
const
uint8_t
f
=
static_cast
<
const
uint8_t
>
(
*
(
p
+
1
));
loggers
::
get_instance
().
log
(
"sctp_offline_layer::process_chunk (SACK): flags: %04x"
,
f
);
const
uint16_t
l
=
static_cast
<
const
uint16_t
>
((
*
(
p
+
2
)
<<
8
|
*
(
p
+
3
))
&
0xffff
);
loggers
::
get_instance
().
log
(
"sctp_offline_layer::process_chunk (SACK): length: %d"
,
l
);
loggers
::
get_instance
().
log
(
"sctp_offline_layer::process_chunk (SACK): p_chunk.lengthof(): %d"
,
p_chunk
.
lengthof
());
if
(
p_chunk
.
lengthof
()
>
l
)
{
// Extract and process the next chunk
OCTETSTRING
chunk
(
p_chunk
.
lengthof
()
-
l
,
p
+
l
);
process_chunk
(
chunk
,
p_params
,
p_payload
);
}
}
break
;
case
0x04
:
// HEARTBEAT
break
;
...
...
@@ -147,7 +159,7 @@ void sctp_offline_layer::process_chunk(const OCTETSTRING& p_chunk, params &p_par
case
0x0b
:
// COOKIE_ACK chunk
break
;
default
:
//
loggers
::
get_instance
().
warning
(
"sctp_offline_layer::
send_data
: Unprocessed chunk: 0x%02x"
,
*
p
);
loggers
::
get_instance
().
warning
(
"sctp_offline_layer::
process_chunk
: Unprocessed chunk: 0x%02x"
,
*
p
);
}
loggers
::
get_instance
().
log_msg
(
"<<< sctp_offline_layer::process_chunk: p_payload: "
,
p_payload
);
...
...
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