/* wrappi * Copyright (C) 2011-2012 Red Hat Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include #include "proto-xdr.h" bool_t wrap_int_xdr_message_header (XDR *xdrs, struct wrap_int_message_header *hdr) { if (!xdr_uint32_t (xdrs, &hdr->magic)) return FALSE; if (!xdr_uint32_t (xdrs, &hdr->protocol)) return FALSE; if (!xdr_uint32_t (xdrs, &hdr->serial)) return FALSE; if (!xdr_string (xdrs, &hdr->proc, ~0)) return FALSE; if (!xdr_uint32_t (xdrs, &hdr->type)) return FALSE; return TRUE; } bool_t wrap_int_xdr_message_error (XDR *xdrs, struct wrap_int_message_error *err) { if (!xdr_string (xdrs, &err->error_message, ~0)) return FALSE; if (!xdr_string (xdrs, &err->error_errno, 32)) return FALSE; if (!xdr_string (xdrs, &err->error_func, 256)) return FALSE; return TRUE; }