-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Add new api functions to peek at network data. #563
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
Conversation
New functions: mbedtls_net_recv4 (mbedtls_net_recv + flags argument) mbedtls_ssl_read4 (mbedtls_ssl_read + flags argument) The functions accept a flag argument that optionally specifies extended behavior. Supported flag arguments: MBEDTLS_NET_MSG_PEEK - Read data from a (net/ssl context) without removing the data from the socket buffer (MSG_PEEK functionality) This resolves #551
By sending in a PR, we'll need a signed CLA before we can continue to work with this issue. So to accept your current contributions or any future contributions we will need a Contributor’s Licence Agreement (CLA) signed or authorised by yourself. You can find an agreement to sign here, which can be signed and returned to us, or you could create an mbed account and accept a slightly different agreement here with a click through if this is a personal contribution. |
I have accepted CLA and with a mbed account. |
Hi @CorvinM, could you please confirm your mbed account username, so I can cross-reference the CLA acceptance with your github account? Thanks |
@sbutcher-arm Sorry for the delay, yes this is my mbed account. |
Any update about it? |
Pasting comment from #551 @CorvinM thanks for raising the issue #551 and making this PR. I would like to understand the motivation behind this change. MSG_PEEK is generally used to receive a header carrying length indicator from the TCP stream and do required buffer allocations. Is this the use case you intend to solve? There are other ways to handle this scenario within the application code rather than adding this change in the library. |
Closing; discussion in #551 was inconclusive as to whether this should be accepted. Issue remains open to continue this discussion. |
New functions:
mbedtls_net_recv4 (mbedtls_net_recv + flags argument)
mbedtls_ssl_read4 (mbedtls_ssl_read + flags argument)
The functions accept a flag argument that optionally specifies extended behavior.
Supported flag arguments:
MBEDTLS_NET_MSG_PEEK - Read data from a (net/ssl context) without removing the data from the socket buffer (MSG_PEEK functionality)
This resolves #551