30#ifndef PROTOCORE_SMTP_H
31#define PROTOCORE_SMTP_H
35#if PROTOCORE_ENABLE_SMTP
44 SMTP_ERR_CONNECT = -2,
47 SMTP_ERR_PROTOCOL = -5,
49 SMTP_ERR_OVERFLOW = -7,
50 SMTP_ERR_NO_STARTTLS = -8,
68typedef int (*SmtpSendFn)(
void *ctx,
const uint8_t *data,
size_t len);
69typedef int (*SmtpRecvFn)(
void *ctx, uint8_t *buf,
size_t cap);
79typedef proto_bool (*SmtpStartTlsFn)(
void *ctx);
86 SmtpSecurity security;
87 const char *client_name;
107 const char *reverse_path;
108 const char *forward_path;
123 SmtpStartTlsFn starttls;
147 SmtpSessionArgs session;
149 SmtpEnvelopeArgs envelope;
150 SmtpContentArgs content;
151 SmtpTransportArgs transport;
158extern SmtpVars SmtpV;
163 void (*
const run)(uint8_t *work);
164 void (*
const send)(uint8_t *work);
169void protocore_smtp_run(uint8_t *work);
170void protocore_smtp_send(uint8_t *work);
176static const SmtpNs Smtp __attribute__((unused)) = {
177 .run = protocore_smtp_run,
178 .send = protocore_smtp_send,
190uint8_t *protocore_smtp_span(
void);
PROTO_ENUM_PACKED
Application protocol spoken on a listener port or connection slot.
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS