summaryrefslogtreecommitdiffstats
path: root/cpukit/libnetworking
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2007-10-15 06:53:08 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2007-10-15 06:53:08 +0000
commit8e1da2b64418d0871db6467000bd74b1ee2538a9 (patch)
treefabb5c388eac38312672aa6ec01a5de0810e4cda /cpukit/libnetworking
parentNew. (diff)
downloadrtems-8e1da2b64418d0871db6467000bd74b1ee2538a9.tar.bz2
Add if_nameindex (from FreeBSD).
Diffstat (limited to 'cpukit/libnetworking')
-rw-r--r--cpukit/libnetworking/net/if.h13
1 files changed, 13 insertions, 0 deletions
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. */