fix(man): Add missing man page
[ric-plt/lib/rmr.git] / doc / src / man / rmr_get_srcip.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_srcip.xfm
22         Abstract        The manual page for the rmr_get_srcip function.
23         Author          E. Scott Daniels
24         Date            11 June 2019
25 .fi
26
27 .** if formatting with tfm, the roff.im will cause roff output to be generated
28 .** if formatting with pfm, then pretty postscript will be generated
29 .gv e LIB lib
30 .if pfm
31         .im &{lib}/generic_ps.im
32 .ei
33         .gv e OUTPUT_RST use_rst
34         .if .ev &use_rst 1 =
35                 .im &{lib}/rst.im
36         .ei
37                 .im &{lib}/roff.im
38         .fi
39 .fi
40
41 &line_len(6i)
42
43 &h1(RMR Library Functions)
44 &h2(NAME)
45         rmr_get_srcip
46
47 &h2(SYNOPSIS)
48 &indent
49 &ex_start
50 #include <rmr/rmr.h>
51
52 unsigned char* rmr_get_srcip( rmr_mbuf_t* mbuf, unsigned char* dest )
53 &ex_end
54
55 &uindent
56
57 &h2(DESCRIPTION)
58 The &cw(rmr_get_srcip) function will copy the &ital(source IP address) from the message to a buffer
59 (dest) supplied by the user.
60 In an RMr message, the source IP address is the sender's information that is used for return to sender
61 function calls;  this function makes it available to the user application. 
62 The address is maintained as IP:port where &ital(IP) could be either an IPv6 or IPv4 address depending
63 on what was provided by the sending application.
64 .sp
65
66 The maximum size allowed by RMr is 64 bytes (including the nil string terminator), so the user
67 must ensure that the destination buffer given is at least 64 bytes. The user application should use 
68 the RMr constant RMR_MAX_SRC to ensure that the buffer supplied is large enough, and to protect
69 against future RMr enhancements which might increase the address buffer size requirement.
70
71 &h2(RETURN VALUE)
72 On success, a pointer to the destination buffer is given as a convenience to the user programme.
73 On failure, a nil pointer is returned and the value of errno is set.
74
75 &h2(ERRORS)
76 If an error occurs, the value of the global variable &cw( errno ) will be set to one of
77 the following with the indicated meaning.
78
79 &beg_dlist(.75i : ^&bold_font )
80 &half_space
81 &di(EINVAL) The message, or an internal portion of the message, was corrupted or the pointer was invalid.
82 &end_dlist
83
84
85
86 &h2(SEE ALSO )
87 .ju off
88 rmr_alloc_msg(3),
89 rmr_bytes2xact(3),
90 rmr_bytes2meid(3),
91 rmr_call(3),
92 rmr_free_msg(3),
93 rmr_get_rcvfd(3),
94 rmr_get_src(3),
95 rmr_payload_size(3),
96 rmr_send_msg(3),
97 rmr_rcv_msg(3),
98 rmr_rcv_specific(3),
99 rmr_rts_msg(3),
100 rmr_ready(3),
101 rmr_fib(3),
102 rmr_has_str(3),
103 rmr_tokenise(3),
104 rmr_mk_ring(3),
105 rmr_ring_free(3),
106 rmr_str2meid(3),
107 rmr_str2xact(3),
108 rmr_wh_open(3),
109 rmr_wh_send_msg(3)
110 .ju on
111
112
113 .qu
114