MavEtJu's Distorted View of the World - 2008-01

New tftp / tftpd implemetation for FreeBSD
Things I've learned from the trip to the Greg Leheys Annual Hackers BBQ.
src/share/zoneinfo updated to 2007k

Back to index

New tftp / tftpd implemetation for FreeBSD

Posted on 2008-01-31 20:00:00
Tags: Networking, tftp, FreeBSD

It all started when we got some new routers, which told me the following when trying to upload configuration or download images from it: The TFTP server doesn't support the blocksize option.

My curiousity was triggered, it took me some reading of RFCs and other documentation to find out what was possible and what could be done. Was plain TFTP very simple in its handshake, TFTP with options was kind of messy because of its backwards capability: The first packet returned could either be an acknowledgement of options, or the first data packet.

Going through the source code of src/libexec/tftpd and going through the code of src/usr.bin/tftp showed that there was a lot of duplicate code, and the addition of options would only increase the amount of duplicate code. After all, both the client and the server can act as a sender and receiver.

At the end, it ended up with a nearly complete rewrite of the tftp client and server. It has been tested against the following TFTP clients and servers:

  • Itself (yay!)
  • The standard FreeBSD tftp client and server
  • The Fedora Core 6 tftp client and server
  • Cisco router tftp client
  • Extreme Networks tftp client

It supports the following RFCs:

  • RFC1350 - THE TFTP PROTOCOL (REVISION 2)
  • RFC2347 - TFTP Option Extension
  • RFC2348 - TFTP Blocksize Option
  • RFC2349 - TFTP Timeout Interval and Transfer Size Options
  • RFC3617 - Uniform Resource Identifier (URI) Scheme and Applicability Statement for the Trivial File Transfer Protocol (TFTP)

It supports the following unofficial TFTP Options as described at http://www.compuphase.com/tftp.htm:

  • blksize2 - Block size restricted to powers of 2, excluding protocol headers
  • rollover - Block counter roll-over (roll back to zero or to one)

From the tftp program point of view the following things are changed:

  • New commands: "blocksize", "blocksize2", "rollover" and "options"
  • Development features: "debug" and "packetdrop"

If you try this tftp/tftpd implementation, please let me know if it works (or doesn't work) and against which implementaion so I can get a list of confirmed working systems.

For now, the new implementation can be found at as a port in net/freebsd-tftp until it has been imported back into the FreeBSD base system.


Show comment | Share on Facebook | Share on Twitter

Things I've learned from the trip to the Greg Leheys Annual Hackers BBQ.

Posted on 2008-01-07 10:00:00
Tags: Travelling, Happiness

Last weekend Sam Lawrance, Juha Matti and I went to the yearly hackers barbeque from Greg Lehey. We learned the following things:

  • At 06:00 in the morning with a plane leaving at 06:45, don't expect to get through the queue at the Virgin Blue checkin. Just wait politely in the queue until a lady shouts your destination and redirects you to the priority checkin.
  • On a Virgin Blue plane, you can turn off the screens on the chair in front of you by pressing the minus button a lot of times. The sound of on the headset keeps going, so you still can listen to the radio.
  • The trip from Tullamarine (Melbourne airport) to Avalon (Avalon airport) is smooth, except for the sixty odd speedhumps on the last 200 meters towards the pickup and dropoff point at Avalon Airport.
  • Don't get lost in Ballarat... If you think that (insert a random town) is badly sign-posted, Ballarat is worse. On the eight kilometer trip to the information center we found four sign-posts with an "I" on it. And one indication said "<- B300 ->" but it didn't say which places it went too.
  • Sign posts in Victoria don't have distances on it. They tell you which city/town/county/township you are going to, and which road number you are on, but it doesn't tell how far away you are. Except for Ballaret, they just give you the road number.
  • Gregs house is on the right hand side of the road, while his mailbox is on the left hand side of the road.
  • At Gregs place, don't count on GSM reception. On the other side of the swamp which is next to his place, less than a kilometer away, you have five out of five bars.
  • Same with 3s 3G reception.
  • The Vikings landed in the last 200 years in Victoria to leave some wooden construction in Gregs part of the swamp (don't ask me, look at the pictures)
  • Beer can't be so bad that Matti doesn't drink it. At least three quarters of it.
  • Don't worry about not being able to find the 12 Apostles stone formation, it's obvious where it is when you are there.
  • The Great Ocean road is horrible... It's long and winding as hell. It's not a single bit like the road George Harrison sang about. Your average speed is far below 40 kilometers per hour. People at the back seats get sick. It's very winding. People with weak stomachs get sick. Very very winding. And it doesn't stop. It's called a B-grade road, but it's more winding that the C roads we have been on. Even if you decide you want to get out of the car and die here in peace, you can't get back to civilisation because you still have to do that long and winding road. Walking or cycling is the only solution, but there is nowhere to buy a bike. Get of that road as soon as possible, back to the A300. Don't worry about going from a B grade road via a C grade road to an A grade road, the C grade road will be much better than the B grade road. Man, what did I feel bad...
  • You can't do Melbourne - Avalon - Ballarat - Dereel - Port something - Great ocean road - A300 - Avalon - Ballarat with a 55 liter tank. But it doesn't differ much!
  • Airports need more different pinball machines and normal prices. Two dollars for three balls is too much. Having seven The Simpsons pinball machines and one Lord of the Rings one is not a good distribution.
  • Airports need more power outlets so that people with laptops can use them. For example under the (horrible) chairs and at every wall. I'm not asking for internet access, just power. And if you want to have a good idea about what shop to open at an airport, start a "You can charge your mobile phone here" shop.
  • When your flight is delayed, don't expect any free on-board entertainment (no I'm not asking for half naked stewardesses to dance, I mean the little TV screens). Come on Virgin Blue, I'm not asking for free drinks or something...
Anyway, it was a good trip :-)


Show comment | Share on Facebook | Share on Twitter

src/share/zoneinfo updated to 2007k

Posted on 2008-01-01 18:00:00, modified on 2008-01-06 19:00:00
Tags: FreeBSD, zoneinfo

Commit of the day for src/share/zoneinfo:

MFV of tzdata2007k

Timezone data changes in this import:
- Add Argentinian DST changes
- Place SJH in the right location

This will be availabe in FreeBSD >= 7.0, >= 6.3 and >5.5 and in the ports collection (as misc/zoneinfo).

Updated: MFCed into RELENG_7_0 and RELENG_6_3 so it will be available for the releases of 6.3 and 7.0.


No comments | Share on Facebook | Share on Twitter