• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
UDP & tftpd strangeness
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UDP & tftpd strangeness


  • Subject: UDP & tftpd strangeness
  • From: Matt Mashyna <email@hidden>
  • Date: Tue, 28 Oct 2003 08:55:35 -0500

I wrote a utility to upgrade the firmware on my DSL/Cable router. It's just a simple bootp/tftp combination. I send the box a magic URL that tells it to reboot and sniff for a bootp to reload the firmware (works with a H/W reset too fortunately).

For OSX it was easy. I just took some old bsd code and danced it around a little to include the authorization and some carbon stuff for feedback.

I decided that OS9 & OpenTransport should be pretty easy too so I just used PowerPlant UDP classes to listen for bootp and tftpd requests in separate threads. I didn't have any trouble with the bootp. It gets a request and responds just fine. I get the initial tftp RRQ packet, as expected, and respond but the router doesn't acknowledge the first data packet. The router keeps sending requests over and over and my app keeps responding. The router won't reply with an error packet or a ACK. We just keep going around in a cycle of RRQs and DATA packets.

The weird part is that if I either let it go for a very long time (like an hour) or step through with the debugger (CodeWarrior) sometimes the router will respond with an ACK and then it flies. The transfer cycles packet by packet to completion.

I figured it must be a PowerPlant thing so I stripped out the PP UDP classes and did it by hand: same result. Over the weekend it occurred to me that the whole tftp code I adapted was broken. As an experiment I ran my app and requested files from my OS X box, WinXP box, an OS 9 box... you get the idea... and they all were able to get files from my app's tftp server. The router should be making the same sort of tftp request for files but for some reason has a problem with the first data packet.

I could easily blame the router for doing something wrong because every computer I tested my app from, as a client, had no problems requesting and getting files and I have the Windows app that I downloaded to upgrade the firmware and the OS X app I wrote and they both work. I'm having a hard time understanding why my OS 9 app has trouble getting that first packet delivered to the router. Should I be setting some OT options for the provider ?
--
----------------------------------------------------------------
Matt Mashyna email@hidden
The Frodis Co
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.
  • Prev by Date: Re: _kSCDynamicStoreDomainState undefined?
  • Next by Date: Help: OTLook doesn't return T_DATA
  • Previous by thread: Re: _kSCDynamicStoreDomainState undefined?
  • Next by thread: Help: OTLook doesn't return T_DATA
  • Index(es):
    • Date
    • Thread