From 49aafa4a385d195caea17577d9b66075c1b0cc2d Mon Sep 17 00:00:00 2001 From: david Date: Mon, 7 May 2012 21:41:57 +0000 Subject: [PATCH] Use LIFC_UNDER_IPMP when enumerating Solaris interfaces. An IPMP interface is a special kind of interface made up of other interfaces. The other interfaces are hidden by default unless this flag is passed to ioctl(SIOCGLIFCONF). This allows me to scan over an IPMP interface in a simple setup. --- libdnet-stripped/src/intf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libdnet-stripped/src/intf.c b/libdnet-stripped/src/intf.c index 6fc17b4e7..f7778b1f0 100644 --- a/libdnet-stripped/src/intf.c +++ b/libdnet-stripped/src/intf.c @@ -902,6 +902,9 @@ intf_loop(intf_t *intf, intf_handler callback, void *arg) entry = (struct intf_entry *)ebuf; + /* http://www.unix.com/man-page/opensolaris/7p/if_tcp */ + intf->lifc.lifc_family = AF_UNSPEC; + intf->lifc.lifc_flags = LIFC_UNDER_IPMP; intf->lifc.lifc_buf = (caddr_t)intf->ifcbuf; intf->lifc.lifc_len = sizeof(intf->ifcbuf);