util/ip.lua
changeset 4433 f0e72fbe4d6a
parent 4432 cbc3224ed3c2
child 5552 40e7a6cf15ff
equal deleted inserted replaced
4432:cbc3224ed3c2 4433:f0e72fbe4d6a
    63 		return 0x2;
    63 		return 0x2;
    64 	-- Link-local unicast:
    64 	-- Link-local unicast:
    65 	elseif fields[1] == 169 and fields[2] == 254 then
    65 	elseif fields[1] == 169 and fields[2] == 254 then
    66 		return 0x2;
    66 		return 0x2;
    67 	-- Site-local unicast:
    67 	-- Site-local unicast:
    68 	elseif (fields[1] == 10) or (fields[1] == 192 and fields[2] == 168) or (fields[1] == 172 and (fields[2] >= 16 and fields[2] < 32) then
    68 	elseif (fields[1] == 10) or (fields[1] == 192 and fields[2] == 168) or (fields[1] == 172 and (fields[2] >= 16 and fields[2] < 32)) then
    69 		return 0x5;
    69 		return 0x5;
    70 	-- Global unicast:
    70 	-- Global unicast:
    71 	else
    71 	else
    72 		return 0xE;
    72 		return 0xE;
    73 	end
    73 	end