Add manual pages to RTD as individual files
[ric-plt/lib/rmr.git] / doc / src / man / rmr_get_src.3.xfm
1 .if false
2 ==================================================================================
3    Copyright (c) 2019 Nokia
4    Copyright (c) 2018-2019 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_get_src.xfm
22     Abstract    The manual page for the rmr_get_src 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_get_src
35
36 &h2(SYNOPSIS)
37 &indent
38 &ex_start
39 #include <rmr/rmr.h>
40
41 unsigned char* rmr_get_src( rmr_mbuf_t* mbuf, unsigned char* dest )
42 &ex_end
43
44 &uindent
45
46 &h2(DESCRIPTION)
47 The &cw(rmr_get_src) function will copy the &ital(source) information from the message to a buffer
48 (dest) supplied by the user.
49 In an RMR message, the source is the sender's information that is used for return to sender
50 function calls, and is generally the hostname and port in the form &ital(name:port).
51 The source might be an IP address port combination; the data is populated by the sending process
52 and the only requirement is that it be capable of being used to start a TCP session with the
53 sender.
54 .sp
55
56 The maximum size allowed by RMR is 64 bytes (including the nil string terminator), so the user
57 must ensure that the destination buffer given is at least 64 bytes.
58
59 &h2(RETURN VALUE)
60 On success, a pointer to the destination buffer is given as a convenience to the user programme.
61 On failure, a nil pointer is returned and the value of errno is set.
62
63 &h2(ERRORS)
64 If an error occurs, the value of the global variable &cw(errno) will be set to one of
65 the following with the indicated meaning.
66
67 &beg_dlist(.75i : ^&bold_font )
68 &half_space
69 &di(EINVAL) The message, or an internal portion of the message, was corrupted or the pointer was invalid.
70 &end_dlist
71
72
73
74 &h2(SEE ALSO )
75 .ju off
76 rmr_alloc_msg(3),
77 rmr_bytes2xact(3),
78 rmr_bytes2meid(3),
79 rmr_call(3),
80 rmr_free_msg(3),
81 rmr_get_rcvfd(3),
82 rmr_get_srcip(3),
83 rmr_payload_size(3),
84 rmr_send_msg(3),
85 rmr_rcv_msg(3),
86 rmr_rcv_specific(3),
87 rmr_rts_msg(3),
88 rmr_ready(3),
89 rmr_fib(3),
90 rmr_has_str(3),
91 rmr_tokenise(3),
92 rmr_mk_ring(3),
93 rmr_ring_free(3),
94 rmr_str2meid(3),
95 rmr_str2xact(3),
96 rmr_wh_open(3),
97 rmr_wh_send_msg(3)
98 .ju on
99