#include #include #include #include #include #include #include #include #include #include "cu.h" #include "sort.h" /* From xdr_mem.c */ bool_t Xdrmem_getlong(); bool_t Xdrmem_putlong(); bool_t Xdrmem_getbytes(); bool_t Xdrmem_putbytes(); u_int Xdrmem_getpos(); bool_t Xdrmem_setpos(); long * Xdrmem_inline(); void Xdrmem_destroy(); static struct xdr_ops Xdrmem_ops = { Xdrmem_getlong, Xdrmem_putlong, Xdrmem_getbytes, Xdrmem_putbytes, Xdrmem_getpos, Xdrmem_setpos, Xdrmem_inline, Xdrmem_destroy }; /* Local defs */ struct cu_data CU; set_analysis_context (table **V, struct cu_data **cu) { /* You have to mimic what the real ClntUdp_create does */ /* Invariants that are not declared in the .sctx.c */ /* The alias is required to tell that the content of cu_outbuf is dyn */ CU.cu_outbuf=&CU.cu_inbuf[8800]; CU.cu_outxdrs.x_ops = &Xdrmem_ops; *cu = &CU; /* Clnt_create initialized variables */ CU.cu_xdrpos = 20; CU.cu_outxdrs.x_handy = 8800; CU.cu_outxdrs.x_private = CU.cu_outxdrs.x_base = CU.cu_outbuf ; }