On Fri, Dec 20, 2013 at 05:28:54PM +0100, valentina.giusti@xxxxxxxxxxxx wrote: > @@ -1180,6 +1183,18 @@ struct nfqnl_msg_packet_hw *nfq_get_packet_hw(struct nfq_data *nfad) > } > EXPORT_SYMBOL(nfq_get_packet_hw); > > +uint32_t nfq_get_uid(struct nfq_data *nfad) > +{ > + return ntohl(nfnl_get_data(nfad->data, NFQA_UID, u_int32_t)); > +} > +EXPORT_SYMBOL(nfq_get_uid); Given that we'll have cases in which uid would not be present, I think that the following interface would be better: int nfq_get_uid(struct nfq_data *nfad, uint32_t *uid) The function returns 1 if uid has been set (ie. it's available so you can access it), otherwise it returns 0. Same thing for _get_gid(). Thanks. -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html