GPRS: It is TLLI and not TTLI...

This commit is contained in:
Holger Hans Peter Freyther 2010-06-07 19:17:30 +08:00
parent f488121058
commit bc10593314
2 changed files with 16 additions and 16 deletions

View File

@ -14,29 +14,29 @@ do
-- we will be called once for every IP Header. -- we will be called once for every IP Header.
-- If there's more than one IP header in a given packet we'll dump the packet once per every header -- If there's more than one IP header in a given packet we'll dump the packet once per every header
function tap.packet(pinfo,tvb,ip) function tap.packet(pinfo,tvb,ip)
local ttli = field_tlli() local tlli = field_tlli()
if not ttli then if not tlli then
return return
end end
local ttli_str = tostring(ttli) local tlli_str = tostring(tlli)
ttli_dmp = dumpers[ttli_str] tlli_dmp = dumpers[tlli_str]
if not ttli_dmp then if not tlli_dmp then
local ttli_hex = string.format("0x%x", tonumber(ttli_str)) local tlli_hex = string.format("0x%x", tonumber(tlli_str))
print("Creating dump for TLLI " .. ttli_hex) print("Creating dump for TLLI " .. tlli_hex)
ttli_dmp = Dumper.new_for_current(dir .. "/" .. ttli_hex .. ".pcap") tlli_dmp = Dumper.new_for_current(dir .. "/" .. tlli_hex .. ".pcap")
dumpers[ttli_str] = ttli_dmp dumpers[tlli_str] = tlli_dmp
end end
ttli_dmp:dump_current() tlli_dmp:dump_current()
ttli_dmp:flush() tlli_dmp:flush()
end end
function tap.draw() function tap.draw()
for ttli,dumper in pairs(dumpers) do for tlli,dumper in pairs(dumpers) do
dumper:flush() dumper:flush()
end end
end end
function tap.reset() function tap.reset()
for ttli,dumper in pairs(dumpers) do for tlli,dumper in pairs(dumpers) do
dumper:close() dumper:close()
end end
dumpers = {} dumpers = {}

View File

@ -25,11 +25,11 @@ do
end end
local ip_src = tostring(ip.ip_src) local ip_src = tostring(ip.ip_src)
local bssgp_ttli = tostring(bssgp_tlli) local bssgp_tlli = tostring(bssgp_tlli)
local llc_nu = tostring(llc_nu) local llc_nu = tostring(llc_nu)
local llc_sapi = tostring(llc_sapi) local llc_sapi = tostring(llc_sapi)
local src_key = ip_src .. "-" .. bssgp_ttli .. "-" .. llc_sapi local src_key = ip_src .. "-" .. bssgp_tlli .. "-" .. llc_sapi
local last_nu = nu_state_src[src_key] local last_nu = nu_state_src[src_key]
if not last_nu then if not last_nu then
-- print("Establishing mapping for " .. src_key) -- print("Establishing mapping for " .. src_key)
@ -43,7 +43,7 @@ do
nu_state_src[src_key] = llc_nu nu_state_src[src_key] = llc_nu
if tonumber(last_nu) + 1 ~= tonumber(llc_nu) then if tonumber(last_nu) + 1 ~= tonumber(llc_nu) then
print("JUMP in N(U) on TLLI " .. tohex(bssgp_ttli) .. " and SAPI: " .. llc_sapi) print("JUMP in N(U) on TLLI " .. tohex(bssgp_tlli) .. " and SAPI: " .. llc_sapi)
print("\t last: " .. last_nu .. " now: " .. llc_nu) print("\t last: " .. last_nu .. " now: " .. llc_nu)
end end
end end