.=Pc@s\ddlZddlZddlZddlZddlZdejjfdYZdS(iNtNSECcBseZdZddgZdZd edZd edZe eZd d dZ d dZ e e Z d edZ d Z RS( sNSEC record @ivar next: the next name @type next: dns.name.Name object @ivar windows: the windowed bitmap list @type windows: list of (window number, string) tuplestnexttwindowscCs/tt|j||||_||_dS(N(tsuperRt__init__RR(tselftrdclasstrdtypeRR((s:/usr/lib64/python2.7/site-packages/dns/rdtypes/ANY/NSEC.pyR!s c Ks|jj||}d}x|jD]\}}g}xtdt|D]j} t|| } xQtddD]@} | d| ?@rs|jtjj |d| d| qsqsWqMW|ddj |7}q%Wd||fS(Ntiiiit s%s%s( Rtchoose_relativityRtxrangetlentordtappendtdnst rdatatypetto_texttjoin( Rtorigint relativizetkwRttexttwindowtbitmaptbitstitbytetj((s:/usr/lib64/python2.7/site-packages/dns/rdtypes/ANY/NSEC.pyR&s%cCs|j}|j||}g}x|jj}|jrIPntjj|j} | dkrtj j dn| dkrtj j dn|j | q'|j d} d} d} dgd} g}x|D]} | | krqn| } | d}|| krS|j | dj | d| !fdgd} |} n| d}|d }|d }|d } tt| |d |?B| | 65535ti iRiii(tget_nameR tgettunescapet is_eol_or_eofRRt from_texttvaluet exceptiont SyntaxErrorRtsortRtchrR (tclsRRttokRRRtrdtypesttokentnrdtypeRtoctetst prior_rdtypeRRt new_windowtoffsetRtbit((s:/usr/lib64/python2.7/site-packages/dns/rdtypes/ANY/NSEC.pyR"4sF          #      &#cCsm|jj|d|xP|jD]E\}}|jt||jtt||j|q WdS(N(Rtto_wiretNoneRtwriteR'R (RtfiletcompressRRR((s:/usr/lib64/python2.7/site-packages/dns/rdtypes/ANY/NSEC.pyR2[s c Csftjj||| |\}}||7}||8}g} x|dkr4|dkrmtjjdnt||} t||d} | dks| dkrtjjdn|d7}|d8}|| krtjjdn|||| !j} || 7}|| 8}| j| | fq@W|dk rS|j |}n||||| S( NiisNSEC too shortii sbad NSEC octetsisbad NSEC bitmap length( Rtnamet from_wireR$t FormErrorR tunwrapRR3R( R(RRtwiretcurrenttrdlenRRtcusedRRR-R((s:/usr/lib64/python2.7/site-packages/dns/rdtypes/ANY/NSEC.pyR8bs,#         cCs|jj|||_dS(N(RR (RRR((s:/usr/lib64/python2.7/site-packages/dns/rdtypes/ANY/NSEC.pyR |scCs |j|S(N(t _wire_cmp(Rtother((s:/usr/lib64/python2.7/site-packages/dns/rdtypes/ANY/NSEC.pyt_cmpsN(t__name__t __module__t__doc__t __slots__RR3tTrueRR"t classmethodR2R8R RA(((s:/usr/lib64/python2.7/site-packages/dns/rdtypes/ANY/NSEC.pyRs  %   ( t cStringIOt dns.exceptionRt dns.rdatat dns.rdatatypetdns.nametrdatatRdataR(((s:/usr/lib64/python2.7/site-packages/dns/rdtypes/ANY/NSEC.pyts