Skip to content

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

Closed
wants to merge 1 commit into from
Closed

Add new api functions to peek at network data. #563

wants to merge 1 commit into from

Conversation

CorvinM
Copy link

@CorvinM CorvinM commented Aug 3, 2016

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

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
@pjbakker
Copy link
Contributor

pjbakker commented Aug 4, 2016

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.

@CorvinM
Copy link
Author

CorvinM commented Aug 4, 2016

I have accepted CLA and with a mbed account.

@simonbutcher
Copy link
Contributor

Hi @CorvinM, could you please confirm your mbed account username, so I can cross-reference the CLA acceptance with your github account?

Thanks

@simonbutcher
Copy link
Contributor

Hi @CorvinM,

Could you confirm that this is your account? I know it looks obvious, but I'm required to confirm before I can accept the contribution, as I need to relate the mbed account to the github one.

Thanks for your understanding.

@CorvinM
Copy link
Author

CorvinM commented Nov 4, 2016

@sbutcher-arm Sorry for the delay, yes this is my mbed account.

@copercini
Copy link

Any update about it?

@mazimkhan
Copy link

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.

@simonbutcher simonbutcher removed their assignment Nov 9, 2020
@daverodgman daverodgman added the historical-reviewing Currently reviewing (for legacy PR/issues) label Feb 10, 2022
@daverodgman
Copy link
Contributor

Closing; discussion in #551 was inconclusive as to whether this should be accepted. Issue remains open to continue this discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MSG_PEEK capability
7 participants