From a0092d15955f23b0f32506a5666db365dfa56510 Mon Sep 17 00:00:00 2001 From: "/C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=pablo/emailAddress=pablo@netfilter.org" Date: Fri, 26 Jan 2007 02:35:30 +0000 Subject: - Initial commit of index2interface API (Eric Leblond), still work to do - added a test file to utils/iftest.c --- include/libnfnetlink/libnfnetlink.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'include/libnfnetlink/libnfnetlink.h') diff --git a/include/libnfnetlink/libnfnetlink.h b/include/libnfnetlink/libnfnetlink.h index 28c0666..78985b5 100644 --- a/include/libnfnetlink/libnfnetlink.h +++ b/include/libnfnetlink/libnfnetlink.h @@ -175,6 +175,25 @@ extern unsigned int nfnl_rcvbufsiz(struct nfnl_handle *h, unsigned int size); extern void nfnl_dump_packet(struct nlmsghdr *, int, char *); +/* + * index to interface name API + */ + +#ifndef IFNAMSIZ +#define IFNAMSIZ 16 +#endif + +struct nlif_handle; + +struct nlif_handle *nlif_open(void); +void nlif_close(struct nlif_handle *orig); +int nlif_fd(struct nlif_handle *nlif_handle); +int nlif_query(struct nlif_handle *nlif_handle); +int nlif_catch(struct nlif_handle *nlif_handle); +int nlif_index2name(struct nlif_handle *nlif_handle, + unsigned int index, + char *name); + /* Pablo: What is the equivalence of be64_to_cpu in userspace? * * Harald: Good question. I don't think there's a standard way [yet?], -- cgit v1.2.3