* [U-Boot] Different Port for TFTP communication
@ 2014-04-07 13:32 Mario Albrecht
2014-04-07 16:52 ` Wolfgang Denk
0 siblings, 1 reply; 5+ messages in thread
From: Mario Albrecht @ 2014-04-07 13:32 UTC (permalink / raw)
To: u-boot
Hi,
I have a short question about TFTP usage in u-boot.
Is it possible to change the Port for TFTP communication
while u-boot is running. Standard path for TFTP is 69
an let's say, we want to change port to 1500.
Regards Mario
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] Different Port for TFTP communication
2014-04-07 13:32 [U-Boot] Different Port for TFTP communication Mario Albrecht
@ 2014-04-07 16:52 ` Wolfgang Denk
2014-04-08 10:06 ` Wolfgang Denk
0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2014-04-07 16:52 UTC (permalink / raw)
To: u-boot
Dear Mario,
In message <F50CAB352C149543A6F2FFE37D4B59348AC9E60A@S1.mackware.local> you wrote:
>
> I have a short question about TFTP usage in u-boot.
> Is it possible to change the Port for TFTP communication
> while u-boot is running. Standard path for TFTP is 69
> an let's say, we want to change port to 1500.
As is, this cannot be changed. The TFTP port number is hard wired
in the code - see "net/tftp.c":
...
18 /* Well known TFTP port # */
19 #define WELL_KNOWN_PORT 69
...
Of course it should be trivial to add a config option for this, or
even make it changable at runtime. But I have to admit that I don't
see many actual use cases for such a modification.
Could you please explain why you need to do this - is this just some
exotic environment, or is this needed for some more general use case?
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
For those who like this sort of thing, this is the sort of thing they
like. - Abraham Lincoln
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] Different Port for TFTP communication
2014-04-07 16:52 ` Wolfgang Denk
@ 2014-04-08 10:06 ` Wolfgang Denk
0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Denk @ 2014-04-08 10:06 UTC (permalink / raw)
To: u-boot
Dear Mario,
In message <20140407165243.3B074380958@gemini.denx.de> I wrote:
>
> As is, this cannot be changed. The TFTP port number is hard wired
> in the code - see "net/tftp.c":
>
> ...
> 18 /* Well known TFTP port # */
> 19 #define WELL_KNOWN_PORT 69
> ...
Actually this is not correct. There are options to use different port
numbers, see further down below in the same file:
798 #ifdef CONFIG_TFTP_PORT
799 ep = getenv("tftpdstp");
800 if (ep != NULL)
801 TftpRemotePort = simple_strtol(ep, NULL, 10);
802 ep = getenv("tftpsrcp");
803 if (ep != NULL)
804 TftpOurPort = simple_strtol(ep, NULL, 10);
805 #endif
So just make sure to define CONFIG_TFTP_PORT in your board config
file, and set the environment variables tftpdstp and/or tftpsrcp as
needed.
Hope this helps.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Nail here --X-- for new monitor.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] Different Port for TFTP communication
[not found] <mailman.7.1397037601.3278.u-boot@lists.denx.de>
@ 2014-04-09 18:58 ` Nikolay Dimitrov
0 siblings, 0 replies; 5+ messages in thread
From: Nikolay Dimitrov @ 2014-04-09 18:58 UTC (permalink / raw)
To: u-boot
Sorry for the duplicate answer, I'm reading this list via daily digest.
Kind regards,
Nikolay
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] Different Port for TFTP communication
[not found] <mailman.9.1396951203.11170.u-boot@lists.denx.de>
@ 2014-04-08 22:55 ` Nikolay Dimitrov
0 siblings, 0 replies; 5+ messages in thread
From: Nikolay Dimitrov @ 2014-04-08 22:55 UTC (permalink / raw)
To: u-boot
Hi Mario,
You need to define CONFIG_TFTP_PORT in your board config file. Then
you can use the env-vars "tftpdstp" and "tftpsrcp" for source/destination
TFTP ports. You can check the source code at:
net/tftp.c:798
Kind regards,
Nikolay
On 4/8/2014 1:00 PM, u-boot-request at lists.denx.de wrote:
> Hi,
>
> I have a short question about TFTP usage in u-boot.
> Is it possible to change the Port for TFTP communication
> while u-boot is running. Standard path for TFTP is 69
> an let's say, we want to change port to 1500.
>
> Regards Mario
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-04-09 18:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-07 13:32 [U-Boot] Different Port for TFTP communication Mario Albrecht
2014-04-07 16:52 ` Wolfgang Denk
2014-04-08 10:06 ` Wolfgang Denk
[not found] <mailman.9.1396951203.11170.u-boot@lists.denx.de>
2014-04-08 22:55 ` Nikolay Dimitrov
[not found] <mailman.7.1397037601.3278.u-boot@lists.denx.de>
2014-04-09 18:58 ` Nikolay Dimitrov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.