add function to extract the sockaddr from which we received the current rpc pdu
[deb_libnfs.git] / lib / socket.c
index a26afe1e6b194e46bea861e1974705b9d56a5bd1..0bed7515561ce09ac8d68baa31077c47744c4307 100644 (file)
@@ -422,3 +422,8 @@ int rpc_set_udp_destination(struct rpc_context *rpc, char *addr, int port, int i
 
        return 0;
 }
+
+struct sockaddr *rpc_get_recv_sockaddr(struct rpc_context *rpc)
+{
+       return (struct sockaddr *)&rpc->udp_src;
+}