# HG changeset patch # User asl # Date 1052734144 0 # Node ID 766a12db7c5bf347427404da0d71fb0cc590edb0 # Parent 1f968b35cd306c48dad0b4049d26921d1a382aca * src/ecos/support.c (_show_ifp): Display the IPv6 flag information. * src/ecos/support.c (cyg_net_malloc): Honour the flag M_ZERO, otherwise we end up with junk where we don't want it. diff --git a/packages/net/bsd_tcpip/current/ChangeLog b/packages/net/bsd_tcpip/current/ChangeLog --- a/packages/net/bsd_tcpip/current/ChangeLog +++ b/packages/net/bsd_tcpip/current/ChangeLog @@ -1,3 +1,8 @@ +2003-05-12 Andrew Lunn + + * src/ecos/support.c (_show_ifp): Display the IPv6 flag + information. + 2003-05-04 Gary Thomas * src/ecos/support.c: @@ -6,9 +11,15 @@ 2003-05-04 Gary Thomas + + * src/ecos/support.c (cyg_net_malloc): Honour the flag M_ZERO, + otherwise we end up with junk where we don't want it. + 2003-04-11 Michael Checky - * cdl/freebsd_net.cdl: Deleted the 'CYGPKG_NET_FREEBSD_STACK_BUILD_TESTS' + * cdl/freebsd_net.cdl: Deleted the + 'CYGPKG_NET_FREEBSD_STACK_BUILD_TESTS' component because these tests are in the net.cdl component 'CYGPKG_NET_BUILD_TESTS' and selecting this option in freebsd_net.cdl causes build errors. diff --git a/packages/net/bsd_tcpip/current/include/netinet/in_var.h b/packages/net/bsd_tcpip/current/include/netinet/in_var.h --- a/packages/net/bsd_tcpip/current/include/netinet/in_var.h +++ b/packages/net/bsd_tcpip/current/include/netinet/in_var.h @@ -242,3 +242,6 @@ void ipflow_slowtimo __P((void)); #include #endif /* _NETINET_IN_VAR_H_ */ + + + diff --git a/packages/net/bsd_tcpip/current/src/ecos/support.c b/packages/net/bsd_tcpip/current/src/ecos/support.c --- a/packages/net/bsd_tcpip/current/src/ecos/support.c +++ b/packages/net/bsd_tcpip/current/src/ecos/support.c @@ -72,6 +72,11 @@ #include #include +#ifdef CYGPKG_NET_INET6 +#include +#include +#endif + #if !CYGPKG_NET_DRIVER_FRAMEWORK // Interface #error At least one network driver framework must be defined! #else @@ -202,6 +207,9 @@ cyg_net_malloc(u_long size, int type, in } else { res = cyg_mempool_var_alloc(net_mem, size); } + if ((flags & M_ZERO) && res) { + memset(res,0,size); + } FINISH_STATS(stats_malloc); log(LOG_MDEBUG, "%p\n", res); return (res); @@ -945,17 +953,32 @@ static void TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) { if (ifa->ifa_addr->sa_family != AF_LINK) { (*pr)("%-8s", name); - getnameinfo (ifa->ifa_addr, ifa->ifa_addr->sa_len, addr, sizeof(addr), 0, 0, 0); + getnameinfo (ifa->ifa_addr, ifa->ifa_addr->sa_len, addr, + sizeof(addr), 0, 0, NI_NUMERICHOST); if (ifa->ifa_addr->sa_family == AF_INET) { - getnameinfo (ifa->ifa_dstaddr, ifa->ifa_dstaddr->sa_len, broadcast, sizeof(broadcast), 0, 0, 0); + getnameinfo (ifa->ifa_dstaddr, ifa->ifa_dstaddr->sa_len, + broadcast, sizeof(broadcast), + 0, 0, NI_NUMERICHOST); _mask(ifa->ifa_netmask, netmask, 64); - (*pr)("IP: %s, Broadcast: %s, Netmask: %s\n", addr, broadcast, netmask); + (*pr)("IP: %s, Broadcast: %s, Netmask: %s\n", + addr, broadcast, netmask); } -#ifdef CYGPKG_NET_INET6 - if (ifa->ifa_addr->sa_family == AF_INET6) { - _mask6(ifa->ifa_netmask, netmask, 64); - (*pr)("IP: %s/%s\n", addr,netmask); - } +#ifdef CYGPKG_NET_INET6 + if (ifa->ifa_addr->sa_family == AF_INET6) { + struct in6_ifaddr * ifa6 = (struct in6_ifaddr *) ifa; + _mask6(ifa->ifa_netmask, netmask, 64); + (*pr)("IP: %s/%s ", addr,netmask); + if (ifa6->ia6_flags & IN6_IFF_ANYCAST) (*pr) ("Anycast "); + if (ifa6->ia6_flags & IN6_IFF_TENTATIVE) (*pr) ("Tentative "); + if (ifa6->ia6_flags & IN6_IFF_DUPLICATED) (*pr) ("Duplicate "); + if (ifa6->ia6_flags & IN6_IFF_DETACHED) (*pr) ("Detached "); + if (ifa6->ia6_flags & IN6_IFF_DEPRECATED) (*pr) ("Deprecated "); + if (ifa6->ia6_flags & IN6_IFF_NODAD) (*pr) ("NoDAD "); + if (ifa6->ia6_flags & IN6_IFF_AUTOCONF) (*pr) ("AutoConf "); + if (ifa6->ia6_flags & IN6_IFF_TEMPORARY) (*pr) ("Tempory "); + if (ifa6->ia6_flags & IN6_IFF_HOME) (*pr) ("Home "); + (*pr) ("\n"); + } #endif (*pr)(" "); if ((ifp->if_flags & IFF_UP)) (*pr)("UP "); @@ -966,8 +989,10 @@ static void if ((ifp->if_flags & IFF_MULTICAST)) (*pr)("MULTICAST "); if ((ifp->if_flags & IFF_ALLMULTI)) (*pr)("ALLMULTI "); (*pr)("MTU: %d, Metric: %d\n", ifp->if_mtu, ifp->if_metric); - (*pr)(" Rx - Packets: %d, Bytes: %d", ifa->if_data.ifi_ipackets, ifa->if_data.ifi_ibytes); - (*pr)(", Tx - Packets: %d, Bytes: %d\n", ifa->if_data.ifi_opackets, ifa->if_data.ifi_obytes); + (*pr)(" Rx - Packets: %d, Bytes: %d", + ifa->if_data.ifi_ipackets, ifa->if_data.ifi_ibytes); + (*pr)(", Tx - Packets: %d, Bytes: %d\n", + ifa->if_data.ifi_opackets, ifa->if_data.ifi_obytes); } } }