From 0295725f55b29f616c8c0f302ccdf8a83ee40c77 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Thu, 4 Oct 2007 14:24:10 +0000 Subject: [PATCH] Add if_nameindex etc. (from FreeBSD). --- cpukit/libnetworking/net/if.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cpukit/libnetworking/net/if.h b/cpukit/libnetworking/net/if.h index 1137f762a7..037a86179b 100644 --- a/cpukit/libnetworking/net/if.h +++ b/cpukit/libnetworking/net/if.h @@ -278,6 +278,19 @@ struct ifconf { }; #endif /* __BSD_VISIBLE */ +#ifndef _KERNEL +struct if_nameindex { + unsigned int if_index; /* 1, 2, ... */ + char *if_name; /* null terminated name: "le0", ... */ +}; + +__BEGIN_DECLS +void if_freenameindex(struct if_nameindex *); +char *if_indextoname(unsigned int, char *); +struct if_nameindex *if_nameindex(void); +__END_DECLS +#endif + #ifdef _KERNEL /* XXX - this should go away soon. */