check_tftp.h
716 Bytes
#ifndef CHECK_TFTP_H
#define CHECK_TFTP_H
#include <iostream>
#include <sstream>
#include <stdio.h>
#include <cstring>
#include <cstdlib>
#include <unistd.h>
#include <sys/time.h>
#include "aux.h"
#include "udp.h"
#define DEFAULT_PORT 69 //SEXY PROGRAMMING...
#define VERSION "1.0"
#define BUFSIZE 512
#define RRQ 1
#define DATA 3
#define ACK 4
#define ERROR 5
#define MODE_OCTAL (char*)"octet"
using namespace std;
uint8_t recvFile(char *filename, string *error, int s, struct sockaddr_in *si);
uint8_t sendACK(uint16_t numBlock, int s, struct sockaddr_in *si);
uint8_t sendRRQ(char *filename, char *mode, int s, struct sockaddr_in *si);
void printVersion();
void printHelp(bool longVersion);
#endif