Exemplo n.º 1
0
    NFS4_OK.resok4 = READ4resok

# READDIR: Read directory
class READDIR4args(xdr_struct):
    # CURRENT_FH: directory
    cookie = nfs_cookie4
    cookieverf = verifier4
    dircount = count4
    maxcount = count4
    attr_request = bitmap4

class entry4(xdr_struct):
    cookie = nfs_cookie4
    name = component4
    attrs = fattr4
entry4.nextentry = xdr_optional(entry4)

class dirlist4(xdr_struct):
    entries = xdr_optional(entry4)
    eof = xdr_bool

class READDIR4resok(xdr_struct):
    cookieverf = verifier4
    reply = dirlist4

class READDIR4res(xdr_union(status=nfsstat4)):
    NFS4_OK.resok4 = READDIR4resok

# READLINK: Read symbolic link
class READLINK4resok(xdr_struct):
    link = linktext4
Exemplo n.º 2
0

class rpcb(xdr_struct):
    r_prog = xdr_hyper  # program number
    r_vers = xdr_uhyper  # version number
    r_netid = xdr_array(xdr_string)  # network id
    r_addr = xdr_array(xdr_string)  # universal address
    r_owner = xdr_array(xdr_string)  # owner of this service


class rp__list(xdr_struct):
    rpcb_map = rpcb
    # rpcb_next = xdr_optional(rp__list)


rp__list.rpcb_next = xdr_optional(rp__list)

rpcblist_ptr = xdr_optional(rp__list)  # results of RPCBPROC_DUMP

# Arguments of remote calls
class rpcb_rmtcallargs(xdr_struct):
    prog = xdr_uhyper  # program number
    vers = xdr_uhyper  # version number
    proc = xdr_uhyper  # procedure number
    args = xdr_opaque()  # argument


# Results of the remote call
class rpcb_rmtcallres(xdr_struct):
    addr = xdr_array(xdr_string)  # remote universal address
    results = xdr_opaque()  # result