CI: Add silent cmake SonarCloud scan
[ric-plt/lib/rmr.git] / docs / rmr_get_srcip.3.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. SPDX-License-Identifier: CC-BY-4.0
3 .. CAUTION: this document is generated from source in doc/src/rtd.
4 .. To make changes edit the source and recompile the document.
5 .. Do NOT make changes directly to .rst or .md files.
6
7 ============================================================================================
8 Man Page: rmr_get_srcip
9 ============================================================================================
10
11
12
13
14 RMR LIBRARY FUNCTIONS
15 =====================
16
17
18
19 NAME
20 ----
21
22 rmr_get_srcip
23
24
25 SYNOPSIS
26 --------
27
28
29 ::
30
31   #include <rmr/rmr.h>
32
33   unsigned char* rmr_get_srcip( rmr_mbuf_t* mbuf, unsigned char* dest )
34
35
36
37 DESCRIPTION
38 -----------
39
40 The ``rmr_get_srcip`` function will copy the *source IP
41 address* from the message to a buffer (dest) supplied by the
42 user. In an RMR message, the source IP address is the
43 sender's information that is used for return to sender
44 function calls; this function makes it available to the user
45 application. The address is maintained as IP:port where *IP*
46 could be either an IPv6 or IPv4 address depending on what was
47 provided by the sending application.
48
49 The maximum size allowed by RMR is 64 bytes (including the
50 nil string terminator), so the user must ensure that the
51 destination buffer given is at least 64 bytes. The user
52 application should use the RMR constant RMR_MAX_SRC to ensure
53 that the buffer supplied is large enough, and to protect
54 against future RMR enhancements which might increase the
55 address buffer size requirement.
56
57
58 RETURN VALUE
59 ------------
60
61 On success, a pointer to the destination buffer is given as a
62 convenience to the user programme. On failure, a nil pointer
63 is returned and the value of errno is set.
64
65
66 ERRORS
67 ------
68
69 If an error occurs, the value of the global variable
70 ``errno`` will be set to one of the following with the
71 indicated meaning.
72
73     .. list-table::
74       :widths: auto
75       :header-rows: 0
76       :class: borderless
77
78       * - **EINVAL**
79         -
80           The message, or an internal portion of the message, was
81           corrupted or the pointer was invalid.
82
83
84
85
86 SEE ALSO
87 --------
88
89 rmr_alloc_msg(3), rmr_bytes2xact(3), rmr_bytes2meid(3),
90 rmr_call(3), rmr_free_msg(3), rmr_get_rcvfd(3),
91 rmr_get_src(3), rmr_payload_size(3), rmr_send_msg(3),
92 rmr_rcv_msg(3), rmr_rcv_specific(3), rmr_rts_msg(3),
93 rmr_ready(3), rmr_fib(3), rmr_has_str(3), rmr_tokenise(3),
94 rmr_mk_ring(3), rmr_ring_free(3), rmr_str2meid(3),
95 rmr_str2xact(3), rmr_wh_open(3), rmr_wh_send_msg(3)