TFTPs_Init

Initialize the TFTP server.

Files

tftp-s.h/tftp-s.c

Prototype

          CPU_BOOLEAN  TFTPs_Init(const TFTPs_CFG       *p_cfg,
                                  const TFTPs_TASK_CFG  *p_task_cfg,
                                        TFTPs_ERR       *p_err);

Arguments

p_cfg

Pointer to TFTPs Configuration object.

p_task_cfg

Pointer to TFTPs Task Configuration object.

p_err

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

TFTPs_ERR_NONE
TFTPs_ERR_CFG_INVALID_SOCK_FAMILY
...

Returned Values

DEF_OK,     if no error.
DEF_FAIL, otherwise.

Required Configuration

None.

Notes / Warnings

None.

Example Usage

          CPU_BOOLEAN  success;
                       /* TFTP server NOT initialized or started. */ 
          success = TFTPs_Init(&TFTPs_Cfg, &TFTPs_TaskCfg, &err_tftps);
          if (success != DEF_OK) {
              printf("TFTP server initialization failed");
          }