//usr/lib64/lib64//python2.7/Demo/rpc/ó
V
Qc @ sà d d l Z d d l m Z m Z d d l m Z m Z m Z d Z d Z d Z d Z
d Z d Z d Z
d Z d
Z d e f d „ ƒ YZ d
e f d „ ƒ YZ d e f d „ ƒ YZ d „ Z d S( iÿÿÿÿN( t UDPClientt TCPClient( t FHSIZEt MountPackert
MountUnpackeri£† i i i i i i t NFSPackerc B s5 e Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( c C s* | \ } } | j | ƒ | j | ƒ d S( N( t pack_fhandlet
pack_sattr( t selft sat filet
attributes( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyt pack_sattrargs s
c C sj | \ } } } } } } | j | ƒ | j | ƒ | j | ƒ | j | ƒ | j | ƒ | j | ƒ d S( N( t pack_uintt pack_timeval( R R t modet uidt gidt sizet atimet mtime( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyR $ s
c C s* | \ } } | j | ƒ | j | ƒ d S( N( R t pack_string( R t dat dirt name( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyt pack_diropargs- s
c C s: | \ } } } | j | ƒ | j | ƒ | j | ƒ d S( N( R R
( R t raR t cookiet count( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyt pack_readdirargs2 s
c C s* | \ } } | j | ƒ | j | ƒ d S( N( R
( R t tvt secst usecs( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyR 8 s
( t __name__t
__module__R R R R R ( ( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyR s
t NFSUnpackerc B s> e Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( c C sU | j ƒ } | t k rE | j | j ƒ } | j ƒ } | | f } n d } | | f S( N( t unpack_enumt NFS_OKt unpack_listt unpack_entryt unpack_boolt None( R t statust entriest eoft rest( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyt unpack_readdirres@ s c C s1 | j ƒ } | j ƒ } | j ƒ } | | | f S( N( t unpack_uintt
unpack_string( R t fileidR R ( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyR' J s c C sO | j ƒ } | t k r? | j ƒ } | j ƒ } | | f } n d } | | f S( N( R$ R% t unpack_fhandlet unpack_fattrR) ( R R* t fht faR- ( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyt unpack_diropresP s c C s7 | j ƒ } | t k r' | j ƒ } n d } | | f S( N( R$ R% R3 R) ( R R* R ( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyt unpack_attrstatZ s
c C sÖ | j ƒ } | j ƒ } | j ƒ } | j ƒ } | j ƒ } | j ƒ } | j ƒ } | j ƒ } | j ƒ } | j ƒ }
| j ƒ } | j ƒ } | j ƒ }
| j ƒ } | | | | | | | | | |
| | |
| f S( N( R$ R/ t unpack_timeval( R t typeR t nlinkR R R t blocksizet rdevt blockst fsidR1 R R t ctime( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyR3 b s c C s" | j ƒ } | j ƒ } | | f S( N( R/ ( R R R ( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyR8 t s ( R! R" R. R' R6 R7 R3 R8 ( ( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyR# > s
t NFSClientc B sP e Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( c C s t j | | t t ƒ d S( N( R t __init__t NFS_PROGRAMt NFS_VERSION( R t host( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyRA | s c C s t ƒ | _ t d ƒ | _ d S( Nt ( R t packerR# t unpacker( R ( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyt
addpackers s c C s1 | j d k r* t j t j ƒ f | _ n | j S( N( t credR) t rpct AUTH_UNIXt make_auth_unix_default( R ( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyt mkcredƒ s c C s" | j d | | j j | j j ƒ S( Ni ( t make_callRF R RG R7 ( R R4 ( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyt Getattrˆ s c C s" | j d | | j j | j j ƒ S( Ni ( RN RF R RG R7 ( R R ( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyt Setattr s c C s" | j d | | j j | j j ƒ S( Ni ( RN RF R RG R6 ( R R ( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyt Lookup” s c C s" | j d | | j j | j j ƒ S( Ni ( RN RF R RG R. ( R R ( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyt Readdir› s c C s¶ g } | d d f } xš | j | ƒ \ } } | t k r= Pn | \ } } d } x0 | D]( \ } }
} | j | |
f ƒ | } qV W| s” | d k r˜ Pn | d | | d f } q | S( Ni iÐ i ( RR R% R) t append( R R t listR R* R- R+ R, t last_cookieR1 R R ( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyt Listdir¡ s
(
R! R" RA RH RM RO RP RQ RR RV ( ( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyR@ z s c C s# d d l } | j d r) | j d } n d } | j d rL | j d } n d } d d l m } m } | | ƒ } | d k r¦ | j ƒ } x | D] } | GHq“ Wd S| j | ƒ } | GH| d } | rt | ƒ }
|
j | ƒ } | GH|
j
| ƒ } x | D] } | GHq W| j | ƒ n d S( Niÿÿÿÿi RE i ( t UDPMountClientt TCPMountClient( t syst argvR) t mountclientRW RX t Exportt MntR@ RO RV t Umnt( RY RD t filesysRW RX t mclRT t itemt sfR4 t nclt attrstat( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyt test³ s2
( RJ R R R[ R R R RB RC R% t NFNONt NFREGt NFDIRt NFBLKt NFCHRt NFLNKR R# R@ Re ( ( ( s* /usr/lib64/python2.7/Demo/rpc/nfsclient.pyt s !<9