2 ==================================================================================
3 Copyright (c) 2019 Nokia
4 Copyright (c) 2018-2019 AT&T Intellectual Property.
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17 ==================================================================================
21 Mnemonic rmr_bytes2xact.xfm
22 Abstract The manual page for the rmr_bytes2xact function.
23 Author E. Scott Daniels
28 .im &{lib}/man/setup.im
32 &h1(RMR Library Functions)
41 int rmr_bytes2xact( rmr_mbuf_t* mbuf, unsigned char* src, int len )
47 The &cw(rmr_bytes2xact) function will copy up to &ital(len) butes from &ital(src) to the
48 transaction ID (xaction) field in the message.
49 The field is a fixed length, gated by the constant &cw(RMR_MAX_XID) and if len is larger
50 than this value, only RMR_MAX_XID bytes will actually be copied.
52 &beg_dlist(.75i : ^&bold_font )
54 On success, the actual number of bytes copied is returned, or -1 to indicate a hard error.
55 If the length is less than 0, or not the same as length passed in, &cw(errno) is set
56 to one of the errors described in the &ital(Errors) section.
59 If the returned length does not match the length passed in, &cw(errno) will be set to one
60 of the following constants with the meaning listed below.
63 &di(EINVAL) The message, or an internal portion of the message, was corrupted or the pointer was invalid.
66 &di(EOVERFLOW) The length passed in was larger than the maximum length of the field; only a portion of
67 the source bytes were copied.