--- Matt Massie <[EMAIL PROTECTED]> wrote: > On Tue, 2004-02-10 at 00:02, Martin Knoblauch wrote: > > > are the intf_open/intf_loop/intf_close functions still there? If > not, > > it breaks the new network functionality for solaris big time. > > the functions intf_open intf_loop and intf_close do not exist > anymore. > > however, it should not be hard at all to modify your code to work > with > the new api. > > the interface structure (a struct ifi_info) is defined as ... > > struct ifi_info { > char ifi_name[IFI_NAME]; /* interface name, null terminated */ > u_char ifi_haddr[IFI_HADDR]; /* hardware address */ > u_short ifi_hlen; /* #bytes in hardware address: 0, 6, 8 */ > u_int ifi_mtu; > short ifi_flags; /* IFF_xxx constants from <net/if.h> */ > short ifi_myflags; /* our own IFI_xxx flags */ > struct sockaddr *ifi_addr; /* primary address */ > struct sockaddr *ifi_brdaddr;/* broadcast address */ > struct sockaddr *ifi_dstaddr;/* destination address */ > struct ifi_info *ifi_next; /* next of these structures */ > }; > > so all your flags/mtu/address information is there. here is a code > snippet to show you have to walk/loop through the interfaces the > process > the flags. > > > struct ifi_info *info, *n; > > info = Get_ifi_info(AF_INET, 0); > > for(n = info; n; n = n->ifi_next) > { > /* process the info you are interested in here > n->ifi_flags will have all the IFF_xxx flags > */ > } > free_ifi_info(info); > > > if you have any problems, moving your code over... please let me > know.. > i'll be happy to help. >
So, where does Get_ifi_info() come from? Is that Ganglia, Solaris, something else? Basically that loop above is even more convenient than than the intf_loop stuff. I never really liked the callback mechanism. > if all you want is the minimum MTU, it's even easier... one header, > one > function call. > No, I need the if-name to access the device info in kstat. The mtu is fine the way you did it. Cheers Martin ===== ------------------------------------------------------ Martin Knoblauch email: k n o b i AT knobisoft DOT de www: http://www.knobisoft.de