Giter Club home page Giter Club logo

tftp-ragel's Introduction

tftp client

TFTP command line client for getting and putting files to tftp server. This project is not trying to replace existing tftp clients. I started it just to learn how to write robust protocol implementation using ragel state machine.

It is a playground project and probably is not supposed to be use in production. Also it does not implement RFC1350 extension.

Client is written with C with Apache Portable Runtime. Using cmocka for unit tests and DejaGNU for behaviour testing.

More description is in blog article: https://staskobzar.blogspot.ca/2017/01/using-ragel-to-implement-tftp-protocol.html

Requirements:

  • ragel
  • Apache Portable Runtime
  • cmocka and DejaGNU for tests

To build:

./configure
make

To test:

./configure
make
make check

Run: ./src/tftpclient

Usage: tftpclient [OPTION] HOST REMOTE_FILE [LOCAL_FILE]
Get file from TFTP server or put file to TFTP server.
HOST        - Hostname or IP address of TFTP server.
REMOTE_FILE - Source file. When  getting  file, then  it is  remote  file name.
              When sending file to  remote server, this is name of  local file.
LOCAL_FILE  - Destination file. When  getting file, then it is  local file name
              or path where to copy  file from  TFTP server. When  sending file
              to remote server, this is name of file to store on remote server.

Mandatory arguments to long options are mandatory for short options too.

Options:
  -h, --help 
        Print usage and breif help message.
  -P, --port [VALUE]
        Server port. Default: 69.
  -p, --put 
        Put file to remote tftp server.
  -g, --get 
        Get file from remote tftp server.
  -m, --mode [VALUE]
        Transfer mode. Value: octet or ascii. If not set, then default is 'ascii'.
  -v, --verbose 
        Print additional infomation during transfer.
  -d, --debug 
        Print lots of debug data.
  -V, --version 
        Print version.

tftp-ragel's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.