summaryrefslogtreecommitdiffstats
path: root/sys/net/if.h
diff options
context:
space:
mode:
authorshin <shin@FreeBSD.org>1999-11-05 14:41:39 +0000
committershin <shin@FreeBSD.org>1999-11-05 14:41:39 +0000
commit7efc91cadcfeb421fc4d02ba94db784616f3714c (patch)
treef40f3ca5e5c27dfec6f4c10b00aa3b391491a550 /sys/net/if.h
parent660a7daead2ffcf4f7e3d2a3c874a82ccc8954c8 (diff)
downloadFreeBSD-src-7efc91cadcfeb421fc4d02ba94db784616f3714c.zip
FreeBSD-src-7efc91cadcfeb421fc4d02ba94db784616f3714c.tar.gz
KAME related header files additions and merges.
(only those which don't affect c source files so much) Reviewed by: cvs-committers Obtained from: KAME project
Diffstat (limited to 'sys/net/if.h')
-rw-r--r--sys/net/if.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/sys/net/if.h b/sys/net/if.h
index 8ceea66..350e6d8 100644
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -152,6 +152,7 @@ struct ifma_msghdr {
*/
struct ifreq {
#define IFNAMSIZ 16
+#define IF_NAMESIZE IFNAMSIZ
char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */
union {
struct sockaddr ifru_addr;
@@ -227,6 +228,19 @@ struct ifconf {
#define ifc_req ifc_ifcu.ifcu_req /* array of structures returned */
};
+
+/*
+ * Structure for SIOC[AGD]LIFADDR
+ */
+struct if_laddrreq {
+ char iflr_name[IFNAMSIZ];
+ u_int flags;
+#define IFLR_PREFIX 0x8000 /* in: prefix given out: kernel fills id */
+ u_int prefixlen; /* in/out */
+ struct sockaddr_storage addr; /* in/out */
+ struct sockaddr_storage dstaddr; /* out */
+};
+
#ifdef KERNEL
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_IFADDR);
@@ -234,6 +248,20 @@ MALLOC_DECLARE(M_IFMADDR);
#endif
#endif
+#ifndef KERNEL
+struct if_nameindex {
+ u_int if_index; /* 1, 2, ... */
+ char *if_name; /* null terminated name: "le0", ... */
+};
+
+__BEGIN_DECLS
+u_int if_nametoindex __P((const char *));
+char *if_indextoname __P((u_int, char *));
+struct if_nameindex *if_nameindex __P((void));
+void if_freenameindex __P((struct if_nameindex *));
+__END_DECLS
+#endif
+
#ifdef KERNEL
struct proc;
OpenPOWER on IntegriCloud