Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from this space and version 2.00.00

Connect to a SMTP serverCompute the local time from an SNTP packet.

Files

smtpsntp-c.h/smtpsntp-c.c

Prototype

 

Code Block
language

...

micrium

...

SNTP_TS  SNTPc_GetRemoteTime (SNTP_PKT        

...

*ppkt,
						   

...

   SNTPc_ERR       

...

*p_err);

 

Arguments

p_host_name         Pointer to host name of the SMTP server to connect. Can be also an IP address.

port                         TCP port to use, or '0' if SMTPc_DFLT_PORT.

p_username           Pointer to user name, if authentication enabled.

p_pwd                     Pointer to password, if authentication enabled.

p_secure_cfg         Pointer to the secure configuration (TLS/SSL).

...

ppkt                  

Pointer to the SNTP message packet to compute.

p_err              

 Pointer to variable that will receive the return error code from this function.

Returned Values

If the connect operation with the SMTP server is successful, the function will return the Socket descriptor/handle identifier associated to this connection.

If the connect operation with the SMTP server is unsuccessful, the function will return -1.

Corrected NTP time stamp.

Required Configuration

Module Configuration.

Notes / Warnings

...

None.

Example Usage

none.