[erlang-questions] In what way am I misusing inet's tftpd?

Håkan Mattsson hm@REDACTED
Tue Sep 4 13:57:26 CEST 2012


Hi!

You can check your actual tftp server configuration with:

    tftp:info(daemons).

and you can debug with

    tftp:change_config(daemons, [{debug,Level}]). % Level = none |
error | warning | brief | normal | verbose | all

Once you have connected to port 6969 (with tftp localhost 6969) you
can inspect the config for the server process for that session with

     tftp:info(servers).

and start debugging with

     tftp:change_config(servers, [{debug,Level}]). % Level = none |
error | warning | brief | normal | verbose | all

hopefully you will see what the server does with your messages.

/Håkan

On Fri, Jul 27, 2012 at 11:37 PM, Brian L. Troutwine <brian@REDACTED> wrote:
> I'm attempting to use inet's tftp, but I'm doing something incorrectly. I have a simple example application here: https://github.com/blt/tftp-problems While tftp-problemst does bind to the correct port, it never returns data to a client.
>
> To reproduce, open a terminal in the project root and:
>
>     make && ./bin/console
>
> This should boot the tftp_hellp application, and drop you into an erlang shell. Confirm that inets is running:
>
>     1> application:which_applications().
>     [{inets,"INETS  CXC 138 49","5.9"},
>      {sasl,"SASL  CXC 138 11","2.2.1"},
>      {stdlib,"ERTS  CXC 138 10","1.18.1"},
>      {kernel,"ERTS  CXC 138 10","2.15.1"}]
>
> and that the tftp daemon is running:
>
>     2> inets:services().
>     [{tftpd,<0.56.0>},{httpc,<0.50.0>}]
>
> Great. Now, if you look in `etc/inets.config` you'll notice we're binding tftpd to 6969. Open another terminal and:
>
>     > tftp localhost 6969
>     tftp> get hello.txt
>     Transfer timed out.
>
> Bother. If my understanding of tftpd were correct--which clearly it's not--we'd get `<<"hello world">>` back.
>
> What am I doing wrong?
>
> - blt
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list