The TFTP (Trivial File Transfer Protocol) File Transfer Application is a client-server application developed in C using UDP socket programming. It implements the basic functionality of the TFTP protocol (RFC 1350), enabling reliable file transfer over UDP.
The project demonstrates concepts such as socket programming, network protocol implementation, file handling, and client-server communication in Linux.
- File Download (GET)
- File Upload (PUT)
- Exit Client (EXIT)
- UDP Socket Communication
- TFTP Packet Handling (RRQ, WRQ, DATA, ACK, ERROR)
- File Read/Write Operations
- Error Detection and Handling
- Modular Source Code
- Language: C
- Operating System: Linux
- Protocol: UDP
- Networking: Socket Programming
- Build Tool: GCC / Makefile
TFTP_src/
├── client.c
├── server.c
├── tftp.c
├── udp.c
├── file.c
├── tftp.h
├── udp.h
├── file.h
├── makefile
├── text.txt
└── README.md
Compile the project using the Makefile:
makeOr compile manually:
gcc server.c tftp.c udp.c file.c -o server
gcc client.c tftp.c udp.c file.c -o client./server <port_number>Example:
./server 3000./client <server_ip> <port_number>Example:
./client 127.0.0.1 3000| Mode | Description |
|---|---|
| GET | Downloads a file from the server to the client. |
| PUT | Uploads a file from the client to the server. |
| EXIT | Closes the TFTP client application. |
GET
Mode : get
Enter source file : text.txt
Enter destination file : output.txt
PUT
Mode : put
Enter source file : sample.txt
Enter destination file : sample.txt
EXIT
Mode : exit
Closing the TFTP client...
Client Server
| ------ RRQ -----------> |
| <----- DATA ----------- |
| ------ ACK -----------> |
| <----- DATA ----------- |
| ------ ACK -----------> |
Client Server
| ------ WRQ -----------> |
| <------ ACK ----------- |
| ------ DATA ----------> |
| <------ ACK ----------- |
| ------ DATA ----------> |
This project helped in understanding:
- UDP Socket Programming
- Client-Server Communication
- Linux System Calls
- File Handling in C
- TFTP Protocol Implementation
- Network Packet Handling
- Error Handling and Debugging
- Modular Programming
- Timeout and Retransmission Support
- Concurrent Client Handling
- IPv6 Support
- Transfer Progress Indicator
- Logging Support
- Improved Error Recovery
Indira Krupa Darshini Midde
- Electronics and Communication Engineering (ECE)
- Interests: Embedded Systems, Linux System Programming, Computer Networks, Socket Programming, Embedded C
This project is intended for educational and learning purposes.