Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

/opentcp/smtp/smtp_client.c File Reference


Detailed Description

Author:
Version:
1.0
Date:
9.8.2002
Bug:
Warning:
Todo:

OpenTCP implementation of SMTP client that uses TCP api. For interface functions declarations see /inet/smtp/smtp_client.h.

Definition in file smtp_client.c.

Go to the source code of this file.

Functions

INT8 smtpc_connect (UINT32 ip, UINT16 port)
 Start E-mail sending procedure.

void smtpc_init (void)
 Initializes SMTP client.

UINT8 smtpc_getstate (void)
 Retrieves SMTP clients' state.


Variables

UINT8 smtpc_init_done = 0
struct {
smtp_client
 SMTP client state information.


Function Documentation

INT8 smtpc_connect UINT32    ip,
UINT16    port
 

Author:
Date:
12.08.2002
Parameters:
ip  IP address of SMTP server
port  Port number on server (remote port)
Returns:
  • - 1 - Error
  • >=0 - Connection procedure started (OK)
This function is called by user when she wants to start E-mail sending procedure. The function is responsible of establishing connection to SMTP server. After connection is established the SMTP client engine starts to make callbacks to user functions in order to get E-mail address information, data etc.

Definition at line 120 of file smtp_client.c.

References smtp_client, SMTP_CLOSED, and SMTP_OPEN_REQUESTED.

void smtpc_init void   
 

Author:
Date:
12.08.2002
This function should be called once when system starts. Make sure that system services e.g. timers, TCP are initialized before initializing applications!

Definition at line 155 of file smtp_client.c.

References get_timer(), RESET_SYSTEM, smtp_client, SMTP_CLOSED, smtpc_init_done, TCP_APP_OFFSET, TCP_DEF_TOUT, tcp_getsocket(), TCP_TOS_NORMAL, and TCP_TYPE_CLIENT.

UINT8 smtpc_getstate void   
 

Author:
Date:
6.10.2002
Returns the state of SMTP client

Definition at line 193 of file smtp_client.c.

References smtp_client.


Variable Documentation

UINT8 smtpc_init_done = 0
 

Defines whether smtpc_init has already been invoked or not

Definition at line 75 of file smtp_client.c.

Referenced by smtpc_init().

struct { ... } smtp_client
 

smtp_client variable holds various information about the smtp client needed for proper operation.

Referenced by smtpc_connect(), smtpc_getstate(), and smtpc_init().


Generated on Sun Aug 3 20:33:00 2003 for OpenTCP by doxygen1.2.18