I got a chance to test ...here is my irule
when CLIENT_ACCEPTED {
set blockdata(1) [binary format H* 000300014620494e495452442e494d473b31\
202020202020202020202020202020202020202020202020202020202020202020202020\
202020202020202020202020202020202020202020202020202020202020202020202020\
202020202020202020202020202020202020202020202020202020202020202020202020\
202020202020202020202020202020202020202020202020202020202020202020202020\
202020202020202020202020202020202020202020202020202020202020202020202020\
2020202020202020202020202020202009696e697472642e696d670d0a4620524541444d\
452e3b312020202020202020202020202020202020202020202020202020202020202020\
202020202020202020202020202020202020202020202020202020202020202020202020\
202020202020202020202020202020202020202020202020202020202020202020202020\
202020202020202020202020202020202020202020202020202020202020202020202020\
202020202020202020202020202020202020202020202020202020202020202020202020\
202020202020202020202020202020202020202020202009524541444d450d0a4620564d\
4c494e555a2e3b3120202020202020202020202020202020202020202020202020202020\
202020202020202020202020202020202020202020202020202020202020]
set blockdata(2) [binary format H* 000300022020202020202020202020202020\
202020202020202020202020202020202020202020202020202020202020202020202020\
202020202020202020202020202020202020202020202020202020202020202020202020\
202020202020202020202020202020202020202020202020202020202020202020202020\
20202020202020202020202020202020202009766d6c696e757a0d0a]
node [IP::client_addr] [TCP::client_port]
snat [IP::local_addr]
}
when CLIENT_DATA {
UDP::payload replace 0 [UDP::payload length] $blockdata(1)
}
when SERVER_DATA {
binary scan [UDP::payload] I tmp
set opcode [expr $tmp >> 16]
set blockid [expr $tmp & 0xffff]
if { $blockid < [array size blockdata] } {
UDP::respond $blockdata([expr $blockid + 1])
}
UDP::drop
}
it works when I connect from linux tftp client... right, this irule is not complete. I see that citizen_elah and jquinby already started a good one. so this can be merge with irule in previous post. For example, no filename checking and no type checking, so this irule will always return same data no matter what filename/mode client ask for.