- TftpState = STATE_RECV_WRQ;
- net_set_udp_handler(TftpHandler);
-}
-#endif /* CONFIG_CMD_TFTPSRV */
-
-#ifdef CONFIG_MCAST_TFTP
-/* Credits: atftp project.
- */
-
-/* pick up BcastAddr, Port, and whether I am [now] the master-client. *
- * Frame:
- * +-------+-----------+---+-------~~-------+---+
- * | opc | multicast | 0 | addr, port, mc | 0 |
- * +-------+-----------+---+-------~~-------+---+
- * The multicast addr/port becomes what I listen to, and if 'mc' is '1' then
- * I am the new master-client so must send ACKs to DataBlocks. If I am not
- * master-client, I'm a passive client, gathering what DataBlocks I may and
- * making note of which ones I got in my bitmask.
- * In theory, I never go from master->passive..
- * .. this comes in with pkt already pointing just past opc
- */
-static void parse_multicast_oack(char *pkt, int len)
-{
- int i;
- IPaddr_t addr;
- char *mc_adr, *port, *mc;
-
- mc_adr = port = mc = NULL;
- /* march along looking for 'multicast\0', which has to start at least
- * 14 bytes back from the end.
- */
- for (i = 0; i < len-14; i++)
- if (strcmp(pkt+i, "multicast") == 0)
- break;
- if (i >= (len-14)) /* non-Multicast OACK, ign. */
- return;