30#ifndef PROTOCORE_SMTP_H
31#define PROTOCORE_SMTP_H
35#if PROTOCORE_ENABLE_SMTP
42 SMTP_ERR_CONNECT = -2,
45 SMTP_ERR_PROTOCOL = -5,
47 SMTP_ERR_OVERFLOW = -7,
48 SMTP_ERR_NO_STARTTLS = -8,
66typedef int (*SmtpSendFn)(
void *ctx,
const uint8_t *data,
size_t len);
67typedef int (*SmtpRecvFn)(
void *ctx, uint8_t *buf,
size_t cap);
77typedef embed_bool (*SmtpStartTlsFn)(
void *ctx);
84 SmtpSecurity security;
85 const char *client_name;
105 const char *reverse_path;
106 const char *forward_path;
121 SmtpStartTlsFn starttls;
145 SmtpSessionArgs session;
147 SmtpEnvelopeArgs envelope;
148 SmtpContentArgs content;
149 SmtpTransportArgs transport;
156extern SmtpVars SmtpV;
161 void (*
const run)(uint8_t *work);
162 void (*
const send)(
const uint8_t *work);
167void protocore_smtp_run(uint8_t *work);
168void protocore_smtp_send(
const uint8_t *work);
174static const SmtpNs Smtp __attribute__((unused)) = {
175 .run = protocore_smtp_run,
176 .send = protocore_smtp_send,
188uint8_t *protocore_smtp_span(
void);
EMBED_ENUM_BYTE(ProtoConn, PROTO_NONE=0, PROTO_HTTP=1, PROTO_TELNET=2, PROTO_SSH=3, PROTO_MODBUS=4, PROTO_OPCUA=5, PROTO_SSH_RFWD=6, PROTO_RELAY=7, PROTO_BRIDGE=8, PROTO_NTRIP_CASTER=9, PROTO_MESH=10, PROTO_UDP=11,)
Application protocol spoken on a listener port or connection slot.