Forum Discussion
Matthew_Gamble_
Nimbostratus
Mar 12, 2009TFTP Server?
Is it possible to write a simple TFTP server as an iRule to return static content? I see some examples for load balancing TFTP requests, but not for actually acting as a TFTP server. I have a very s...
Nat_Thirasuttakorn
Employee
Mar 12, 2009how about we use something like this
when CLIENT_ACCEPTED {
set destination to client
node [IP::client_addr] [UDP::client_port]
snat to virtual address. BIG-IP will pick ephemeral port automatically
snat [IP::local_addr]
}
when CLIENT_DATA {
replace with data to be sent
UDP::payload replace 0 [UDP::payload length] [binary format H* 0003 0001 ]
}
when SERVER_DATA {
check what is block number
binary scan [UDP::payload] I x
set opcode [expr $x >> 16]
set blockid [expr $x & 0xffff]
we could probably pre-format packet in hex and put in array variable or class...
UDP::respond $pre_format_packet([expr $blockid + 1])
drop this packet...
UDP::drop
}
sorry, this is not tested...
Nat
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
