pike.git / lib / modules / NetUtils.pmod

version» Context lines:

pike.git/lib/modules/NetUtils.pmod:1090:       //3: Sort    foreach( connectable_types, string type )    if( tmp[type] )    res += Array.shuffle(tmp[type]);       return res;   }      //! Given a list of addresses, sort them according to connectable - //! priority order (RFC 3484). + //! priority order (@rfc{3484@}).   //!   //! If @[exclude_types] is specified, addresses that match any of the   //! network types (({"local", "localhost"}) for the local network as an example)   //! in the given array will be exluded from the result.   //!   //! If @[separate_v6] is true, @[exclude_types] separates v6 from   //! v4. That is, you can disable "localhost" without also disabling   //! "localhostv6".   //!   //! The addresses inside each group will be returned in random order.   array(string) sort_addresses( array(string) addresses,    array(NetworkType)|void exclude_types,    bool|void separate_v6)   {    return _sort_addresses( addresses, exclude_types, separate_v6,    connectable_network_types() );   }