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. if all you want is the minimum MTU, it's even easier... one header, one function call. #include "interface.h" int min_mtu; min_mtu = get_min_mtu(); i've went through and changed all the mtu functions for each platform to use this. -matt -- mobius strippers never show you their backside pgp fingerprint A7C2 3C2F 8445 AD3C 135E F40B 242A 5984 ACBC 91D3
signature.asc
Description: This is a digitally signed message part