From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH v2 3/7] auth-proto: document acceptable return values for auth-protos
Date: Wed, 08 Sep 2021 11:19:00 -0700 [thread overview]
Message-ID: <20210908181904.84594-3-prestwoj@gmail.com> (raw)
In-Reply-To: <20210908181904.84594-1-prestwoj@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1135 bytes --]
Since all auth-protos are hidden behind an abstraction they need
to be consisten with the return values as some should be handled
specially.
---
src/auth-proto.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/auth-proto.h b/src/auth-proto.h
index d3c4686f..f39c361c 100644
--- a/src/auth-proto.h
+++ b/src/auth-proto.h
@@ -25,6 +25,18 @@
struct auth_proto {
bool (*start)(struct auth_proto *ap);
void (*free)(struct auth_proto *ap);
+ /*
+ * Callback to receive an Authenticate frame. auth-protos should
+ * return error codes consistent with one another as some are treated
+ * specially:
+ *
+ * 0 indicates success
+ * -ENOMSG or -EBADMSG indicates the message should be ignored silently
+ * -EAGAIN indicates to try again (handled by auth-proto internally)
+ * -EPROTO indicates a fatal error
+ * Any other < 0 return will be treated as a fatal error
+ * > 0 indicates a fatal error with status code.
+ */
int (*rx_authenticate)(struct auth_proto *driver,
const uint8_t *frame, size_t len);
int (*rx_associate)(struct auth_proto *driver,
--
2.31.1
next prev parent reply other threads:[~2021-09-08 18:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-08 18:18 [PATCH v2 1/7] sae: fix a spec violation with duplicate commits James Prestwood
2021-09-08 18:18 ` [PATCH v2 2/7] sae: don't send commit/confirm in confirmed state James Prestwood
2021-09-08 19:25 ` Denis Kenzior
2021-09-08 18:19 ` James Prestwood [this message]
2021-09-08 19:29 ` [PATCH v2 3/7] auth-proto: document acceptable return values for auth-protos Denis Kenzior
2021-09-08 18:19 ` [PATCH v2 4/7] fils: change fatal return code to -EPROTO James Prestwood
2021-09-08 19:35 ` Denis Kenzior
2021-09-08 18:19 ` [PATCH v2 5/7] ft: " James Prestwood
2021-09-08 19:33 ` Denis Kenzior
2021-09-08 18:19 ` [PATCH v2 6/7] netdev: handle non-fatal auth-proto returns James Prestwood
2021-09-08 19:43 ` Denis Kenzior
2021-09-08 18:19 ` [PATCH v2 7/7] auto-t: add sae test for non-acked commit James Prestwood
2021-09-08 19:20 ` [PATCH v2 1/7] sae: fix a spec violation with duplicate commits Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210908181904.84594-3-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).