# Generated by rpcgen.py at Tue Jan 14 21:23:48 2003

import rpc
import nfs4types
import nfs4constants
import xdrlib

class NFS4Packer(rpc.Packer):
    def __init__(self, ncl):
        xdrlib.Packer.__init__(self)
        self.ncl = ncl

    pack_hyper = rpc.Packer.pack_hyper

    pack_string = rpc.Packer.pack_string

    pack_enum = rpc.Packer.pack_enum

    pack_opaque = rpc.Packer.pack_opaque

    pack_int = rpc.Packer.pack_int

    pack_double = rpc.Packer.pack_double

    pack_float = rpc.Packer.pack_float

    pack_unsigned = rpc.Packer.pack_uint

    pack_quadruple = rpc.Packer.pack_double

    pack_bool = rpc.Packer.pack_bool

    pack_unsigned_int = rpc.Packer.pack_uint

    pack_unsigned_hyper = rpc.Packer.pack_uhyper

    pack_auth_flavor = pack_enum

    pack_int32_t = pack_int

    pack_uint32_t = pack_unsigned_int

    pack_int64_t = pack_hyper

    pack_uint64_t = pack_unsigned_hyper

    pack_nfs_ftype4 = pack_enum

    pack_nfsstat4 = pack_enum

    def pack_bitmap4(self, data):
        self.pack_array(data, self.pack_uint32_t)
        
    pack_offset4 = pack_uint64_t

    pack_count4 = pack_uint32_t

    pack_length4 = pack_uint64_t

    pack_clientid4 = pack_uint64_t

    pack_seqid4 = pack_uint32_t

    def pack_utf8string(self, data):
        self.pack_opaque(data)
        
    pack_component4 = pack_utf8string

    def pack_pathname4(self, data):
        self.pack_array(data, self.pack_component4)
        
    pack_nfs_lockid4 = pack_uint64_t

    pack_nfs_cookie4 = pack_uint64_t

    pack_linktext4 = pack_utf8string

    def pack_sec_oid4(self, data):
        self.pack_opaque(data)
        
    pack_qop4 = pack_uint32_t

    pack_mode4 = pack_uint32_t

    pack_changeid4 = pack_uint64_t

    def pack_verifier4(self, data):
        self.pack_fopaque(nfs4constants.NFS4_VERIFIER_SIZE, data)
        
    pack_time_how4 = pack_enum

    def pack_nfs_fh4(self, data):
        self.pack_opaque(data)
        
    pack_acetype4 = pack_uint32_t

    pack_aceflag4 = pack_uint32_t

    pack_acemask4 = pack_uint32_t

    pack_fattr4_supported_attrs = pack_bitmap4

    pack_fattr4_type = pack_nfs_ftype4

    pack_fattr4_fh_expire_type = pack_uint32_t

    pack_fattr4_change = pack_changeid4

    pack_fattr4_size = pack_uint64_t

    pack_fattr4_link_support = pack_bool

    pack_fattr4_symlink_support = pack_bool

    pack_fattr4_named_attr = pack_bool

    def pack_fattr4_fsid(self, data):
        data.pack()
        
    pack_fattr4_unique_handles = pack_bool

    pack_fattr4_lease_time = pack_uint32_t

    pack_fattr4_rdattr_error = pack_nfsstat4

    def pack_fattr4_acl(self, data):
        nfs4types.pack_objarray(self, data)
        
    pack_fattr4_aclsupport = pack_uint32_t

    pack_fattr4_archive = pack_bool

    pack_fattr4_cansettime = pack_bool

    pack_fattr4_case_insensitive = pack_bool

    pack_fattr4_case_preserving = pack_bool

    pack_fattr4_chown_restricted = pack_bool

    pack_fattr4_fileid = pack_uint64_t

    pack_fattr4_files_avail = pack_uint64_t

    pack_fattr4_filehandle = pack_nfs_fh4

    pack_fattr4_files_free = pack_uint64_t

    pack_fattr4_files_total = pack_uint64_t

    def pack_fattr4_fs_locations(self, data):
        data.pack()
        
    pack_fattr4_hidden = pack_bool

    pack_fattr4_homogeneous = pack_bool

    pack_fattr4_maxfilesize = pack_uint64_t

    pack_fattr4_maxlink = pack_uint32_t

    pack_fattr4_maxname = pack_uint32_t

    pack_fattr4_maxread = pack_uint64_t

    pack_fattr4_maxwrite = pack_uint64_t

    pack_fattr4_mimetype = pack_utf8string

    pack_fattr4_mode = pack_mode4

    pack_fattr4_no_trunc = pack_bool

    pack_fattr4_numlinks = pack_uint32_t

    pack_fattr4_owner = pack_utf8string

    pack_fattr4_owner_group = pack_utf8string

    pack_fattr4_quota_avail_hard = pack_uint64_t

    pack_fattr4_quota_avail_soft = pack_uint64_t

    pack_fattr4_quota_used = pack_uint64_t

    def pack_fattr4_rawdev(self, data):
        data.pack()
        
    pack_fattr4_space_avail = pack_uint64_t

    pack_fattr4_space_free = pack_uint64_t

    pack_fattr4_space_total = pack_uint64_t

    pack_fattr4_space_used = pack_uint64_t

    pack_fattr4_system = pack_bool

    def pack_fattr4_time_access(self, data):
        data.pack()
        
    def pack_fattr4_time_access_set(self, data):
        data.pack()
        
    def pack_fattr4_time_backup(self, data):
        data.pack()
        
    def pack_fattr4_time_create(self, data):
        data.pack()
        
    def pack_fattr4_time_delta(self, data):
        data.pack()
        
    def pack_fattr4_time_metadata(self, data):
        data.pack()
        
    def pack_fattr4_time_modify(self, data):
        data.pack()
        
    def pack_fattr4_time_modify_set(self, data):
        data.pack()
        
    def pack_attrlist4(self, data):
        self.pack_opaque(data)
        
    pack_nfs_lock_type4 = pack_enum

    pack_createmode4 = pack_enum

    pack_opentype4 = pack_enum

    pack_limit_by4 = pack_enum

    pack_open_delegation_type4 = pack_enum

    pack_open_claim_type4 = pack_enum

    pack_rpc_gss_svc_t = pack_enum

    def pack_SECINFO4resok(self, data):
        nfs4types.pack_objarray(self, data)
        
    pack_stable_how4 = pack_enum

    pack_nfs_opnum4 = pack_enum

    pack_nfs_cb_opnum4 = pack_enum

class NFS4Unpacker(rpc.Unpacker):
    def __init__(self, ncl, data=''):
        xdrlib.Unpacker.__init__(self, data)
        self.ncl = ncl

    unpack_hyper = rpc.Unpacker.unpack_hyper

    unpack_string = rpc.Unpacker.unpack_string

    unpack_enum = rpc.Unpacker.unpack_enum

    unpack_opaque = rpc.Unpacker.unpack_opaque

    unpack_int = rpc.Unpacker.unpack_int

    unpack_double = rpc.Unpacker.unpack_double

    unpack_float = rpc.Unpacker.unpack_float

    unpack_unsigned = rpc.Unpacker.unpack_uint

    unpack_quadruple = rpc.Unpacker.unpack_double

    unpack_bool = rpc.Unpacker.unpack_bool

    unpack_unsigned_int = rpc.Unpacker.unpack_uint

    unpack_unsigned_hyper = rpc.Unpacker.unpack_uhyper

    unpack_auth_flavor = unpack_enum

    unpack_int32_t = unpack_int

    unpack_uint32_t = unpack_unsigned_int

    unpack_int64_t = unpack_hyper

    unpack_uint64_t = unpack_unsigned_hyper

    unpack_nfs_ftype4 = unpack_enum

    unpack_nfsstat4 = unpack_enum

    def unpack_bitmap4(self):
        return self.unpack_array(self.unpack_uint32_t)
        
    unpack_offset4 = unpack_uint64_t

    unpack_count4 = unpack_uint32_t

    unpack_length4 = unpack_uint64_t

    unpack_clientid4 = unpack_uint64_t

    unpack_seqid4 = unpack_uint32_t

    def unpack_utf8string(self):
        return self.unpack_opaque()
        
    unpack_component4 = unpack_utf8string

    def unpack_pathname4(self):
        return self.unpack_array(self.unpack_component4)
        
    unpack_nfs_lockid4 = unpack_uint64_t

    unpack_nfs_cookie4 = unpack_uint64_t

    unpack_linktext4 = unpack_utf8string

    def unpack_sec_oid4(self):
        return self.unpack_opaque()
        
    unpack_qop4 = unpack_uint32_t

    unpack_mode4 = unpack_uint32_t

    unpack_changeid4 = unpack_uint64_t

    def unpack_verifier4(self):
        return self.unpack_fopaque(nfs4constants.NFS4_VERIFIER_SIZE)
        
    unpack_time_how4 = unpack_enum

    def unpack_nfs_fh4(self):
        return self.unpack_opaque()
        
    unpack_acetype4 = unpack_uint32_t

    unpack_aceflag4 = unpack_uint32_t

    unpack_acemask4 = unpack_uint32_t

    unpack_fattr4_supported_attrs = unpack_bitmap4

    unpack_fattr4_type = unpack_nfs_ftype4

    unpack_fattr4_fh_expire_type = unpack_uint32_t

    unpack_fattr4_change = unpack_changeid4

    unpack_fattr4_size = unpack_uint64_t

    unpack_fattr4_link_support = unpack_bool

    unpack_fattr4_symlink_support = unpack_bool

    unpack_fattr4_named_attr = unpack_bool

    def unpack_fattr4_fsid(self):
        obj = nfs4types.fsid4(self.ncl)
        obj.unpack()
        return obj
        
    unpack_fattr4_unique_handles = unpack_bool

    unpack_fattr4_lease_time = unpack_uint32_t

    unpack_fattr4_rdattr_error = unpack_nfsstat4

    def unpack_fattr4_acl(self):
        return nfs4types.unpack_objarray(self.ncl, nfs4types.nfsace4)
        
    unpack_fattr4_aclsupport = unpack_uint32_t

    unpack_fattr4_archive = unpack_bool

    unpack_fattr4_cansettime = unpack_bool

    unpack_fattr4_case_insensitive = unpack_bool

    unpack_fattr4_case_preserving = unpack_bool

    unpack_fattr4_chown_restricted = unpack_bool

    unpack_fattr4_fileid = unpack_uint64_t

    unpack_fattr4_files_avail = unpack_uint64_t

    unpack_fattr4_filehandle = unpack_nfs_fh4

    unpack_fattr4_files_free = unpack_uint64_t

    unpack_fattr4_files_total = unpack_uint64_t

    def unpack_fattr4_fs_locations(self):
        obj = nfs4types.fs_locations4(self.ncl)
        obj.unpack()
        return obj
        
    unpack_fattr4_hidden = unpack_bool

    unpack_fattr4_homogeneous = unpack_bool

    unpack_fattr4_maxfilesize = unpack_uint64_t

    unpack_fattr4_maxlink = unpack_uint32_t

    unpack_fattr4_maxname = unpack_uint32_t

    unpack_fattr4_maxread = unpack_uint64_t

    unpack_fattr4_maxwrite = unpack_uint64_t

    unpack_fattr4_mimetype = unpack_utf8string

    unpack_fattr4_mode = unpack_mode4

    unpack_fattr4_no_trunc = unpack_bool

    unpack_fattr4_numlinks = unpack_uint32_t

    unpack_fattr4_owner = unpack_utf8string

    unpack_fattr4_owner_group = unpack_utf8string

    unpack_fattr4_quota_avail_hard = unpack_uint64_t

    unpack_fattr4_quota_avail_soft = unpack_uint64_t

    unpack_fattr4_quota_used = unpack_uint64_t

    def unpack_fattr4_rawdev(self):
        obj = nfs4types.specdata4(self.ncl)
        obj.unpack()
        return obj
        
    unpack_fattr4_space_avail = unpack_uint64_t

    unpack_fattr4_space_free = unpack_uint64_t

    unpack_fattr4_space_total = unpack_uint64_t

    unpack_fattr4_space_used = unpack_uint64_t

    unpack_fattr4_system = unpack_bool

    def unpack_fattr4_time_access(self):
        obj = nfs4types.nfstime4(self.ncl)
        obj.unpack()
        return obj
        
    def unpack_fattr4_time_access_set(self):
        obj = nfs4types.settime4(self.ncl)
        obj.unpack()
        return obj
        
    def unpack_fattr4_time_backup(self):
        obj = nfs4types.nfstime4(self.ncl)
        obj.unpack()
        return obj
        
    def unpack_fattr4_time_create(self):
        obj = nfs4types.nfstime4(self.ncl)
        obj.unpack()
        return obj
        
    def unpack_fattr4_time_delta(self):
        obj = nfs4types.nfstime4(self.ncl)
        obj.unpack()
        return obj
        
    def unpack_fattr4_time_metadata(self):
        obj = nfs4types.nfstime4(self.ncl)
        obj.unpack()
        return obj
        
    def unpack_fattr4_time_modify(self):
        obj = nfs4types.nfstime4(self.ncl)
        obj.unpack()
        return obj
        
    def unpack_fattr4_time_modify_set(self):
        obj = nfs4types.settime4(self.ncl)
        obj.unpack()
        return obj
        
    def unpack_attrlist4(self):
        return self.unpack_opaque()
        
    unpack_nfs_lock_type4 = unpack_enum

    unpack_createmode4 = unpack_enum

    unpack_opentype4 = unpack_enum

    unpack_limit_by4 = unpack_enum

    unpack_open_delegation_type4 = unpack_enum

    unpack_open_claim_type4 = unpack_enum

    unpack_rpc_gss_svc_t = unpack_enum

    def unpack_SECINFO4resok(self):
        return nfs4types.unpack_objarray(self.ncl, nfs4types.secinfo4)
        
    unpack_stable_how4 = unpack_enum

    unpack_nfs_opnum4 = unpack_enum

    unpack_nfs_cb_opnum4 = unpack_enum

