1 /*
2 Copyright (c) 2003, 2021, Oracle and/or its affiliates.
3 All rights reserved. Use is subject to license terms.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License, version 2.0,
7 as published by the Free Software Foundation.
8
9 This program is also distributed with certain software (including
10 but not limited to OpenSSL) that is licensed under separate terms,
11 as designated in a particular file or component or in included license
12 documentation. The authors of MySQL hereby grant you an additional
13 permission to link the program and your derivative works with the
14 separately licensed software that they have included with MySQL.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License, version 2.0, for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 */
25
26 #include <signaldata/CreateFragmentation.hpp>
27
28 bool
printCREATE_FRAGMENTATION_REQ(FILE * output,const Uint32 * theData,Uint32 len,Uint16 receiverBlockNo)29 printCREATE_FRAGMENTATION_REQ(FILE * output, const Uint32 * theData,
30 Uint32 len, Uint16 receiverBlockNo) {
31 const CreateFragmentationReq * const sig = (CreateFragmentationReq *)theData;
32 fprintf(output, " senderRef: %x\n", sig->senderRef);
33 fprintf(output, " senderData: %x\n", sig->senderData);
34 fprintf(output, " fragmentationType: %x\n", sig->fragmentationType);
35 fprintf(output, " noOfFragments: %x\n", sig->noOfFragments);
36 if (sig->primaryTableId == RNIL)
37 fprintf(output, " primaryTableId: none\n");
38 else
39 fprintf(output, " primaryTableId: %x\n", sig->primaryTableId);
40 return true;
41 }
42
43 bool
printCREATE_FRAGMENTATION_REF(FILE * output,const Uint32 * theData,Uint32 len,Uint16 receiverBlockNo)44 printCREATE_FRAGMENTATION_REF(FILE * output, const Uint32 * theData,
45 Uint32 len, Uint16 receiverBlockNo) {
46 const CreateFragmentationRef * const sig = (CreateFragmentationRef *)theData;
47 fprintf(output, " senderRef: %x\n", sig->senderRef);
48 fprintf(output, " senderData: %x\n", sig->senderData);
49 fprintf(output, " errorCode: %x\n", sig->errorCode);
50 return true;
51 }
52
53 bool
printCREATE_FRAGMENTATION_CONF(FILE * output,const Uint32 * theData,Uint32 len,Uint16 receiverBlockNo)54 printCREATE_FRAGMENTATION_CONF(FILE * output, const Uint32 * theData,
55 Uint32 len, Uint16 receiverBlockNo) {
56 const CreateFragmentationConf * const sig =
57 (CreateFragmentationConf *)theData;
58 fprintf(output, " senderRef: %x\n", sig->senderRef);
59 fprintf(output, " senderData: %x\n", sig->senderData);
60 fprintf(output, " noOfReplicas: %x\n", sig->noOfReplicas);
61 fprintf(output, " noOfFragments: %x\n", sig->noOfFragments);
62 return true;
63 }
64
65