NFLNK = 5 MAXDATA = 8192 MAXPATHLEN = 1024 MAXNAMLEN = 255 COOKIESIZE = 4 FHSIZE = 32 nfsdata = rpchelp.opaque (rpchelp.var, MAXDATA) stat = rpchelp.r_int ftype = rpchelp.r_int fhandle = rpchelp.opaque (rpchelp.fixed, FHSIZE) timeval = rpchelp.struct ('timeval', [('seconds',rpchelp.r_uint),('useconds',rpchelp.r_uint)]) fattr = rpchelp.struct ('fattr', [('type',ftype),('mode',rpchelp.r_uint),('nlink',rpchelp.r_uint),('uid',rpchelp.r_uint),('gid',rpchelp.r_uint),('size',rpchelp.r_uint),('blocksize',rpchelp.r_uint),('rdev',rpchelp.r_uint),('blocks',rpchelp.r_uint),('fsid',rpchelp.r_uint),('fileid',rpchelp.r_uint),('atime',timeval),('mtime',timeval),('ctime',timeval)]) sattr = rpchelp.struct ('sattr', [('mode',rpchelp.r_uint),('uid',rpchelp.r_uint),('gid',rpchelp.r_uint),('size',rpchelp.r_uint),('atime',timeval),('mtime',timeval)]) filename = rpchelp.string (rpchelp.var, MAXNAMLEN) path = rpchelp.string (rpchelp.var, MAXPATHLEN) attrstat = rpchelp.union ('attrstat', stat, 'status', {NFS_OK : fattr, None : rpchelp.r_void}) diropargs = rpchelp.struct ('diropargs', [('dir',fhandle),('name',filename)]) diropres = rpchelp.union ('diropres', stat, 'status', {NFS_OK : rpchelp.struct ('diropok', [('file',fhandle),('attributes',fattr)]), None : rpchelp.r_void}) statfsres = rpchelp.union ('statfsres', stat, 'status', {NFS_OK : rpchelp.struct ('info', [('tsize',rpchelp.r_uint),('bsize',rpchelp.r_uint),('blocks',rpchelp.r_uint),('bfree',rpchelp.r_uint),('bavail',rpchelp.r_uint)]), None : rpchelp.r_void}) nfscookie = rpchelp.opaque (rpchelp.fixed, COOKIESIZE) readdirargs = rpchelp.struct ('readdirargs', [('dir',fhandle),('cookie',nfscookie),('count',rpchelp.r_uint)]) entry = rpchelp.linked_list ('entry', 3, [('fileid',rpchelp.r_uint),('name',filename),('cookie',nfscookie),('nextentry',rpchelp.opt_data (lambda : entry))]) readdirres = rpchelp.union ('readdirres', stat, 'status', {NFS_OK : rpchelp.struct ('readdirok', [('entries',rpchelp.opt_data (lambda : entry)),('eof',rpchelp.r_bool)]), None : rpchelp.r_void}) symlinkargs = rpchelp.struct ('symlinkargs', [('from_',diropargs),('to',path),('attributes',sattr)]) linkargs = rpchelp.struct ('linkargs', [('from_',fhandle),('to',diropargs)]) renameargs = rpchelp.struct ('renameargs', [('from_',diropargs),('to',diropargs)]) createargs = rpchelp.struct ('createargs', [('where',diropargs),('attributes',sattr)]) writeargs = rpchelp.struct ('writeargs', [('file',fhandle),('beginoffset',rpchelp.r_uint),('offset',rpchelp.r_uint),('totalcount',rpchelp.r_uint),('data',nfsdata)]) readargs = rpchelp.struct ('readargs', [('file',fhandle),('offset',rpchelp.r_uint),('count',rpchelp.r_uint),('totalcount',rpchelp.r_uint)]) attrdat = rpchelp.struct ('attrdat', [('attributes',fattr),('data',nfsdata)]) readres = rpchelp.union ('readres', stat, 'status', {NFS_OK : attrdat, None : rpchelp.r_void})
('blocksize', rpchelp.r_uint), ('rdev', rpchelp.r_uint), ('blocks', rpchelp.r_uint), ('fsid', rpchelp.r_uint), ('fileid', rpchelp.r_uint), ('atime', timeval), ('mtime', timeval), ('ctime', timeval)]) sattr = rpchelp.struct('sattr', [('mode', rpchelp.r_uint), ('uid', rpchelp.r_uint), ('gid', rpchelp.r_uint), ('size', rpchelp.r_uint), ('atime', timeval), ('mtime', timeval)]) filename = rpchelp.string(rpchelp.var, MAXNAMLEN) path = rpchelp.string(rpchelp.var, MAXPATHLEN) attrstat = rpchelp.union('attrstat', stat, 'status', { NFS_OK: fattr, None: rpchelp.r_void }) diropargs = rpchelp.struct('diropargs', [('dir', fhandle), ('name', filename)]) diropres = rpchelp.union( 'diropres', stat, 'status', { NFS_OK: rpchelp.struct('diropok', [('file', fhandle), ('attributes', fattr)]), None: rpchelp.r_void }) statfsres = rpchelp.union( 'statfsres', stat, 'status', { NFS_OK: rpchelp.struct('info', [('tsize', rpchelp.r_uint), ('bsize', rpchelp.r_uint), ('blocks', rpchelp.r_uint),
q = 5 r = 6 s = 7 t = 5 u = 6 v = 7 aa = 1 ab = 2 goof1 = 1 goof2 = 2 an_enum = rpchelp.r_int foo = rpchelp.struct ('foo', [('a',rpchelp.r_int),('b',rpchelp.r_double)]) bar = rpchelp.struct ('bar', [('a',rpchelp.r_int),('b',rpchelp.r_double)]) another_enum = rpchelp.r_int bar2 = rpchelp.struct ('bar2', [('a',rpchelp.r_int),('b',rpchelp.r_double),('another_enum',rpchelp.r_int)]) baz = rpchelp.union ('baz', rpchelp.r_int, 'b', {0 : rpchelp.r_int, 1 : rpchelp.r_int, 2 : rpchelp.r_int, None : rpchelp.r_void}) baz_2 = rpchelp.union ('baz_2', rpchelp.r_int, 'b', {0 : rpchelp.r_int, 1 : rpchelp.r_int, None : rpchelp.r_void}) reserved_test = rpchelp.struct ('reserved_test', [('from_',rpchelp.r_int),('def_',rpchelp.r_int),('def__',rpchelp.r_int),('import_',rpchelp.struct ('import_', [('def___',rpchelp.r_int),('in____',rpchelp.r_int)]))]) in_ = 4 maybe_foo = rpchelp.opt_data (lambda : foo) # "typedef void;" encountered foo_fixed_arr = rpchelp.arr (foo, rpchelp.fixed, 40) foo_var_arr_1 = rpchelp.arr (foo, rpchelp.var, 40) foo_var_arr_2 = rpchelp.arr (foo, rpchelp.var, None) int_fixed_arr = rpchelp.arr (rpchelp.r_int, rpchelp.fixed, 40) double_var_arr = rpchelp.arr (rpchelp.r_double, rpchelp.var, 400) ll_test1 = rpchelp.linked_list ('ll_test1', 2, [('a',rpchelp.r_uint),('b',rpchelp.r_uint),('silly_link_ptr',rpchelp.opt_data (lambda : ll_test1))]) ll_test2 = rpchelp.linked_list ('ll_test2', 2, [('a',rpchelp.r_uint),('foo_link',rpchelp.opt_data (lambda : ll_test2)),('b',rpchelp.r_uint)]) ll_test3 = rpchelp.linked_list ('ll_test3', 1, [('foo_link',rpchelp.opt_data (lambda : ll_test3)),('a',rpchelp.r_uint)]) fooble = rpchelp.struct ('fooble', [('res',rpchelp.opaque (rpchelp.fixed, 0))]) class goofy_1(rpchelp.Server):
t = 5 u = 6 v = 7 aa = 1 ab = 2 goof1 = 1 goof2 = 2 an_enum = rpchelp.r_int foo = rpchelp.struct('foo', [('a', rpchelp.r_int), ('b', rpchelp.r_double)]) bar = rpchelp.struct('bar', [('a', rpchelp.r_int), ('b', rpchelp.r_double)]) another_enum = rpchelp.r_int bar2 = rpchelp.struct('bar2', [('a', rpchelp.r_int), ('b', rpchelp.r_double), ('another_enum', rpchelp.r_int)]) baz = rpchelp.union('baz', rpchelp.r_int, 'b', { 0: rpchelp.r_int, 1: rpchelp.r_int, 2: rpchelp.r_int, None: rpchelp.r_void }) baz_2 = rpchelp.union('baz_2', rpchelp.r_int, 'b', { 0: rpchelp.r_int, 1: rpchelp.r_int, None: rpchelp.r_void }) reserved_test = rpchelp.struct( 'reserved_test', [('from_', rpchelp.r_int), ('def_', rpchelp.r_int), ('def__', rpchelp.r_int), ('import_', rpchelp.struct('import_', [('def___', rpchelp.r_int), ('in____', rpchelp.r_int)]))]) in_ = 4