| 175 | # BEGIN |
| 176 | @ATMT.state(initial=1) |
| 177 | def BEGIN(self): |
| 178 | self.blocksize = 512 |
| 179 | self.my_tid = self.sport or RandShort()._fix() |
| 180 | bind_bottom_up(UDP, TFTP, dport=self.my_tid) |
| 181 | self.server_tid = None |
| 182 | self.res = b"" |
| 183 | |
| 184 | self.l3 = IP(dst=self.server) / UDP(sport=self.my_tid, dport=self.port) / TFTP() # noqa: E501 |
| 185 | self.last_packet = self.l3 / TFTP_RRQ(filename=self.filename, mode="octet") # noqa: E501 |
| 186 | self.send(self.last_packet) |
| 187 | self.awaiting = 1 |
| 188 | |
| 189 | raise self.WAITING() |
| 190 | |
| 191 | # WAITING |
| 192 | @ATMT.state() |