Releases: pin/tftp
Server `Shutdown` and broadcast request handling fix
Module compatibility
Adds module compatibility. Originally modules was introduced when github.com/pin/tftp
package was already tagged with major version v2. So v2 became incompatible and recommended way to move forward is to cut the new major version just for the sake of module compatibility.
Branch master
will be used to develop v3 for now.
Branch v2
is to keep the head of major version v2.
Note, API-wise v2 and v3 are identical. Also I believe there is no users of v1 in the wild because it had pretty short lifespan long time ago.
So it must be absolutely safe for anyone to move to v3 anytime. I don't think we will see any new v2 subversion therefore.
Fixes before the module
This package is behind on module Golang train.
Plan is to release v3 version that is fully compatible with Golang modules. For now the plan is to keep v2 an incompatible fully with modules (which is legit case).
So possibly the last TFTP package version before module compatibility changes.
RequestTSize, LocalIP, SetBlockSize, and more
New features:
LocalIP
returns the IP address and port we are servicing the request on.SetBlockSize
option in the client.- "anticipation winow" support for tftpd32.
- Single port mode.
- Better transfer stats.
Backward-compatible with previous release.
Better TSize support, source IP/port check and more
New Features (fully backward-compatible):
- Uses
Seek
in case sender asked to send tsize option andio.Reader
provided toReadFrom
method satisfyio.Seeker
interface. In many cases (e.g. whenos.File
is used as an argument toReadFrom
) there is no need anymore to explicitlySetSize
usingOutgoingTransfer
interface. - Default backoff jitter can be can be overridden in clients and servers by providing a custom backoff calculation function. See
SetBackoff
method. Implemented by @acd RemoteAddr
method allows retrieving remote peer's IP address and port. It can be particularly useful for logging from inside request handlers. Implemented by @acd
Protocol implementation improvements by @acd:
- Remote port / TID check during transmission.
- Remote IP address check (necessary due to the use of unconnected UDP sockets).
Fixes:
- Close UDP connection at the end of a transfer. No connections piling up on OS X anymore, no need to bump
ulimit
to allow more open file descriptors. - Correct server IP in unit-tests allows reliable unit-tests execution on OS X. It was discovered during remote IP check testing and was fixed by @acd. No test flaps on OS X anymore.
Introducing new API
API was changed significantly to improve efficiency and make the package more aligned with Go coding best practices and make it more cohesive to io
interfaces.
Features and changes:
- set of supported features is sufficient to implement PXE-boot server (
blksize
,tsize
options) io.ReaderFrom
/io.WriterTo
based implementation allows minimal memory copying during data transfernetascii
transfer mode support
Server and Client code before API change
Use import "gopkg.in/pin/tftp.v1"