=== include/libnetfilter_queue/libnetfilter_queue.h ================================================================== --- include/libnetfilter_queue/libnetfilter_queue.h (revision 5515) +++ include/libnetfilter_queue/libnetfilter_queue.h (local) @@ -80,6 +80,11 @@ extern u_int32_t nfq_get_outdev(struct nfq_data *nfad); extern u_int32_t nfq_get_physoutdev(struct nfq_data *nfad); +extern char *nfq_get_indev_name(struct nlif_inst *nlif_inst, struct nfq_data *nfad); +extern char *nfq_get_physindev_name(struct nlif_inst *nlif_inst, struct nfq_data *nfad); +extern char *nfq_get_outdev_name(struct nlif_inst *nlif_inst, struct nfq_data *nfad); +extern char *nfq_get_physoutdev_name(struct nlif_inst *nlif_inst, struct nfq_data *nfad); + extern struct nfqnl_msg_packet_hw *nfq_get_packet_hw(struct nfq_data *nfad); /* return -1 if problem, length otherwise */ === src/libnetfilter_queue.c ================================================================== --- src/libnetfilter_queue.c (revision 5515) +++ src/libnetfilter_queue.c (local) @@ -419,6 +419,31 @@ return ntohl(nfnl_get_data(nfad->data, NFQA_IFINDEX_PHYSOUTDEV, u_int32_t)); } +char *nfq_get_indev_name(struct nlif_inst *nlif_inst, struct nfq_data *nfad) +{ + u_int32_t ifindex = nfq_get_indev(nfad); + return nlif_index_2name(nlif_inst, ifindex); +} + +char *nfq_get_physindev_name(struct nlif_inst *nlif_inst, struct nfq_data *nfad) +{ + u_int32_t ifindex = nfq_get_physindev(nfad); + return nlif_index_2name(nlif_inst, ifindex); +} + +char *nfq_get_outdev_name(struct nlif_inst *nlif_inst, struct nfq_data *nfad) +{ + u_int32_t ifindex = nfq_get_outdev(nfad); + return nlif_index_2name(nlif_inst, ifindex); +} + +char *nfq_get_physoutdev_name(struct nlif_inst *nlif_inst, struct nfq_data *nfad) +{ + u_int32_t ifindex = nfq_get_physoutdev(nfad); + return nlif_index_2name(nlif_inst, ifindex); +} + + struct nfqnl_msg_packet_hw *nfq_get_packet_hw(struct nfq_data *nfad) { return nfnl_get_pointer_to_data(nfad->data, NFQA_HWADDR,