2 * $Id: RTPSInfoSRC.c,v 0.0.0.1 2003/09/10
4 * DEBUG: section 44 message INFO SRC
5 * AUTHOR: Petr Smolik petr.smolik@wo.cz
7 * ORTE - OCERA Real-Time Ethernet http://www.ocera.org/
8 * --------------------------------------------------------------------
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
24 /**********************************************************************************/
25 void RTPSInfoSRC(u_int8_t *rtps_msg,MessageInterpret *mi) {
27 ProtocolVersion protocol;
32 char sIPAddress[MAX_STRING_IPADDRESS_LENGTH];
35 e_bit=rtps_msg[1] & 0x01;
36 ipa=*((IPAddress*)(rtps_msg+4)); /* appIPAddress */
38 protocol=*((ProtocolVersion*)(rtps_msg+8)); /* ProtocolVersion */
39 vid=*((VendorId*)(rtps_msg+10)); /* Vendor Id */
40 hid=*((HostId*)(rtps_msg+12)); /* HostId */
42 aid=*((AppId*)(rtps_msg+16)); /* AppId */
45 debug(44,3) (" RTPSInfoSRC: \n");
46 debug(44,4) (" appIPAddress:%s\n",IPAddressToString(ipa,sIPAddress));
47 debug(44,4) (" pv:%lu,%lu vid:%lu,%lu hid:0x%x aid:0x%x\n",
48 protocol.major,protocol.minor,vid.major,vid.minor,hid,aid);
52 mi->sourceVersion=protocol;
53 mi->sourceVendorId=vid;
54 mi->unicastReplyIPAddress=ipa;
55 mi->unicastReplyPort=PORT_INVALID;
56 mi->multicastReplyIPAddress=IPADDRESS_INVALID;
57 mi->multicastReplyPort=PORT_INVALID;
58 mi->haveTimestamp=ORTE_FALSE;