The frozen layers of current viewport are stored in the XDATA of the paperspace viewport object. The registered application name is "ACAD".
In the XDATA, group code 1003 is used to store the layer name. The following code shows how to retrieve this information:
(defun c:ListVPFreezeLayers ()
(setq psEnt (tblobjname "block" "*PAPER_SPACE"))
(setq ent (entnext psEnt))
(setq ent (entnext ent))
(setq lst (entget ent '("*")))
(setq ename (cdr (assoc 0 lst)))
(setq i 0)
(while (/= ent nil)
(setq lst (entget ent '("*")))
(setq ename (cdr (assoc 0 lst)))
(if (= ename "VIEWPORT")
(progn
(setq i (+ i 1))
(print)
(princ "Frozen layers of No. ")
(princ i)
(princ " viewport are:")
(setq lst (cdadr (assoc -3 lst)))
(foreach memb lst
(if (= 1003 (car memb))
(print (cdr memb))
)
)
(print)
)
)
(setq ent (entnext ent))
)
(print)
)