#include "TftpAgent.h"#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/types.h>#include <sys/socket.h>#include <sys/time.h>#include <sys/stat.h>#include <netdb.h>#include <netinet/in.h>#include <arpa/inet.h>#include <unistd.h>#include <fcntl.h>Defines | |
| #define | RESERVE_BUFFER(buffer, len) char buffer[len] |
Functions | |
| static char * | xstrdup (const char *s) |
| static int | tftp (const int cmd, const struct hostent *host, const char *serverfile, int localfd, const int port, int tftp_bufsize) |
| int | dotftp (char *serverstr, char *localfile, char *action) |
| string | getValue (const YCPMap map, const string key) |
Variables | |
| static const char * | tftp_error_msg [] |
| const int | tftp_cmd_get = 1 |
| const int | tftp_cmd_put = 2 |
| #define RESERVE_BUFFER | ( | buffer, | |||
| len | ) | char buffer[len] |
Referenced by tftp().
| int dotftp | ( | char * | serverstr, | |
| char * | localfile, | |||
| char * | action | |||
| ) |
References tftp(), tftp_cmd_get, tftp_cmd_put, xstrdup(), y2debug, and y2error.
Referenced by TftpAgent::Execute().
| string getValue | ( | const YCPMap | map, | |
| const string | key | |||
| ) |
References YCPMap::begin(), YCPMap::end(), and y2error.
| static int tftp | ( | const int | cmd, | |
| const struct hostent * | host, | |||
| const char * | serverfile, | |||
| int | localfd, | |||
| const int | port, | |||
| int | tftp_bufsize | |||
| ) | [inline, static] |
References RESERVE_BUFFER, tftp_cmd_get, tftp_cmd_put, tftp_error_msg, y2debug, and y2error.
Referenced by dotftp().
| const int tftp_cmd_get = 1 |
| const int tftp_cmd_put = 2 |
const char* tftp_error_msg[] [static] |
Initial value:
{
"Undefined error",
"File not found",
"Access violation",
"Disk full or allocation error",
"Illegal TFTP operation",
"Unknown transfer ID",
"File already exists",
"No such user"
}
Referenced by tftp().
1.5.5