Add route table guide and formatting tweaks
[ric-plt/lib/rmr.git] / doc / src / man / rmr_bytes2xact.3.xfm
1 .if false
2 ==================================================================================
3    Copyright (c) 2019-2020 Nokia
4    Copyright (c) 2018-2020 AT&T Intellectual Property.
5
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
9
10        http://www.apache.org/licenses/LICENSE-2.0
11
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 ==================================================================================
18 .fi
19
20 .if false
21     Mnemonic    rmr_bytes2xact.xfm
22     Abstract    The manual page for the rmr_bytes2xact function.
23     Author      E. Scott Daniels
24     Date        8 March 2019
25 .fi
26
27 .gv e LIB lib
28 .im &{lib}/man/setup.im
29
30 &line_len(6i)
31
32 &h1(RMR Library Functions)
33 &h2(NAME)
34     rmr_bytes2xact
35
36 &h2(SYNOPSIS)
37 &indent
38 &ex_start
39 #include <rmr/rmr.h>
40
41 int rmr_bytes2xact( rmr_mbuf_t* mbuf, unsigned char* src, int len )
42 &ex_end
43
44 &uindent
45
46 &h2(DESCRIPTION)
47 The &cw(rmr_bytes2xact) function will copy up to &ital(len) bytes 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 &cw(RMR_MAX_XID) bytes will actually be copied.
51
52 &h2(RETURN VALUE)
53 On success, the actual number of bytes copied is returned, or -1 to indicate a hard error.
54 If the length is less than 0, or not the same as length passed in, &cw(errno) is set
55 to one of the errors described in the &ital(Errors) section.
56
57 &h2(ERRORS)
58 If the returned length does not match the length passed in, &cw(errno) will be set to one
59 of the following constants with the meaning listed below.
60
61 &beg_dlist(1i : &bold_font )
62         &ditem(EINVAL) The message, or an internal portion of the message, was corrupted or the pointer was invalid.
63
64         &ditem(EOVERFLOW) The length passed in was larger than the maximum length of the field; only a portion of
65         the source bytes were copied.
66 &end_dlist
67
68 &h2(EXAMPLE)
69
70
71 &h2(SEE ALSO )
72 rmr_alloc_msg(3),
73 rmr_bytes2meid(3),
74 rmr_call(3),
75 rmr_free_msg(3),
76 rmr_get_meid(3),
77 rmr_get_rcvfd(3),
78 rmr_get_xact(3),
79 rmr_payload_size(3),
80 rmr_send_msg(3),
81 rmr_rcv_msg(3),
82 rmr_rcv_specific(3),
83 rmr_rts_msg(3),
84 rmr_ready(3),
85 rmr_fib(3),
86 rmr_has_str(3),
87 rmr_tokenise(3),
88 rmr_mk_ring(3),
89 rmr_ring_free(3),
90 rmr_str2meid(3),
91 rmr_wh_open(3),
92 rmr_wh_send_msg(3)