title: C: Programming a RPC Low Level Application: getting the IP address from client
body: <p>I have programed a server-client application as a RPC (low-level).</p>
  
  <p>This is my server function to validate my IP address (here, just the necessary information):</p>
  
  <pre><code> int *checkip_1_svc(ip_adress *argp, struct svc_req *rqstp)
   {
       static int  result;
       struct sockaddr_in test_ip;
  
       result =1;
  
       return(&amp;result);
   }
  </code></pre>
  
  <p>Now I want to print the IP address from the connected client.</p>
  
  <p>I tried: </p>
  
  <pre><code>printf("Clientadress:%s", rqstp-&gt;rq_xprt-&gt;xp_raddr.sin_addr.s_addr);
  </code></pre>
  
  <p>This does not work. I get a segmentation fault.</p>