-
Notifications
You must be signed in to change notification settings - Fork 3k
kernel: gen_sctp: document the {sctp_error, ...} message #10400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
CT Test Results 2 files 72 suites 1h 8m 18s ⏱️ Results for commit a252ea0. ♻️ This comment has been updated with latest results. To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass. See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally. Artifacts
// Erlang/OTP Github Action Bot |
lib/kernel/src/gen_sctp.erl
Outdated
| {sctp, Socket, FromIP, FromPort, {AncData, Data}} | ||
| ``` | ||
|
|
||
| Error-related events - such as `#sctp_send_failed{}`, `#sctp_pdapi_event`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Error-related events - such as `#sctp_send_failed{}`, `#sctp_pdapi_event`, | |
| Error-related events - such as `#sctp_send_failed{}`, `#sctp_pdapi_event{}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Applied.
The `{sctp_error, ...}` message is not documented, but it does exist.
The logic that generates both `{sctp, ...}` and `{sctp_error, ...}`
messages resides in inet_drv.c, specifically in packet_binary_message()
and sctp_parse_async_event(). Within sctp_parse_async_event(), an error
is indicated by replacing the initial `sctp` atom with `sctp_error`.
The following SCTP events are currently reported as errors:
* SCTP_SEND_FAILED (becomes #sctp_send_failed{}),
* SCTP_REMOTE_ERROR (becomes #sctp_remote_error{}),
* SCTP_PARTIAL_DELIVERY_EVENT (becomes #sctp_pdapi_event{}).
Document this and update the example code to print errors.
The
{sctp_error, ...}message is not documented, but it does exist. The logic that generates both{sctp, ...}and{sctp_error, ...}messages resides in inet_drv.c, specifically inpacket_binary_message()andsctp_parse_async_event(). Withinsctp_parse_async_event(), an error is indicated by replacing the initialsctpatom withsctp_error.The following SCTP events are currently reported as errors:
SCTP_SEND_FAILED(becomes#sctp_send_failed{}),SCTP_REMOTE_ERROR(becomes#sctp_remote_error{}),SCTP_PARTIAL_DELIVERY_EVENT(becomes#sctp_pdapi_event{}).Document this and update the example code to print errors.