MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / NetworkFindBroadcastIPs

Function NetworkFindBroadcastIPs

src/network/core/host.cpp:84–95  ·  view source on GitHub ↗

* Find the IPv4 broadcast addresses; IPv6 uses a completely different * strategy for broadcasting. * @param broadcast the list of broadcasts to write into. */

Source from the content-addressed store, hash-verified

82 * @param broadcast the list of broadcasts to write into.
83 */
84void NetworkFindBroadcastIPs(NetworkAddressList *broadcast)
85{
86 NetworkFindBroadcastIPsInternal(broadcast);
87
88 /* Now display to the debug all the detected ips */
89 Debug(net, 3, "Detected broadcast addresses:");
90 int i = 0;
91 for (NetworkAddress &addr : *broadcast) {
92 addr.SetPort(NETWORK_DEFAULT_PORT);
93 Debug(net, 3, " {}) {}", i++, addr.GetHostname());
94 }
95}

Callers 1

NetworkStartUpFunction · 0.85

Calls 2

SetPortMethod · 0.80

Tested by

no test coverage detected