1/* BEGIN LICENSE BLOCK 2 * Version: CMPL 1.1 3 * 4 * The contents of this file are subject to the Cisco-style Mozilla Public 5 * License Version 1.1 (the "License"); you may not use this file except 6 * in compliance with the License. You may obtain a copy of the License 7 * at www.eclipse-clp.org/license. 8 * 9 * Software distributed under the License is distributed on an "AS IS" 10 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 11 * the License for the specific language governing rights and limitations 12 * under the License. 13 * 14 * The Original Code is The ECLiPSe Constraint Logic Programming System. 15 * The Initial Developer of the Original Code is Cisco Systems, Inc. 16 * Portions created by the Initial Developer are 17 * Copyright (C) 1994-2006 Cisco Systems, Inc. All Rights Reserved. 18 * 19 * Contributor(s): Kees Schuerman, ECRC 20 * 21 * END LICENSE BLOCK */ 22/********************************************************************** 23** System: BMSG 24** File: bmsg.xdr.c 25** Author: Kees Schuerman 26** SccsId: "@(#)bmsg.xdr.c 1.7 14 Nov 1995" 27** Description: XDR Primitives 28***********************************************************************/ 29 30#include "machine.h" /* architecture specific constant definitions */ 31 32#include <stdio.h> 33#include <rpc/rpc.h> 34 35#include "pds.types.h" 36#include "pds.mdt.h" 37#include "pds.xdr.h" 38#include "bmsg.msg.h" 39#include "bmsg.xdr.h" 40 41 42bool_t 43xdr_bnet_address(xdrs,address) 44 XDR * xdrs; 45 char * * address; 46{ 47 return(xdr_vector(xdrs,*address,BNET_ADDRESSLEN_MAX+1, 48 sizeof(char),(xdrproc_t) xdr_char)); 49} 50 51 52bool_t 53xdr_bport(xdrs,port) 54 XDR * xdrs; 55 bport_t * port; 56{ 57 char * bnet_address = port->bnet_address; 58 59 return(xdr_bpid(xdrs,&port->bpid) && 60 xdr_bport_id(xdrs,&port->bport_id) && 61 xdr_bdomain_id(xdrs,&port->bdomain_id) && 62 xdr_pds_address(xdrs,(pds_address_t *) 63 ((char *) &port->bmsg_queue_address + 64 PDS_ADDR_OFFSET)) && 65 xdr_bnet_address(xdrs,&bnet_address) && 66 xdr_bport_number(xdrs,&port->bport_number)); 67} 68 69 70bool_t 71xdr_bdomain(xdrs,domain) 72 XDR * xdrs; 73 bdomain_t * domain; 74{ 75 char * bdomain_file = domain->bdomain_file; 76 77 return(xdr_bdomain_id(xdrs,&domain->bdomain_id) && 78 xdr_string(xdrs,&bdomain_file,BMSG_FILENAMELEN_MAX) && 79 xdr_pds_address(xdrs,(pds_address_t *) 80 ((char *) &domain->bdomain_start + 81 PDS_ADDR_OFFSET)) && 82 xdr_bmem_size(xdrs,&domain->bdomain_size)); 83} 84 85 86