#cartridge offsets: # $18=MAC address (6 bytes) # $1E=IP address (4 bytes) # $22=netmask (4 bytes) # $26=gateway (4 bytes) # $2A=DNS (4 bytes) # $2E=TFTP server (4 bytes) @cartridge_offsets={ #symobol => offset, length :mac=>[0x18,6], :ip=>[0x1e,4], :netmask=>[0x22,4], :gateway=>[0x26,4], :dns=>[0x2a,4], :tftp=>[0x2e,4], } @progname=File.basename($0) def show_options puts "valid options are: #{@cartridge_offsets.keys.join(", ")}" puts "mac auto will automagically generate a pseudorandom MAC" end def usage puts "#{@progname}