MCPcopy Create free account
hub / github.com/F-Stack/f-stack / in_canforward

Function in_canforward

freebsd/netinet/in.c:195–204  ·  view source on GitHub ↗

* Determine whether an IP address is in a reserved set of addresses * that may not be forwarded, or whether datagrams to that destination * may be forwarded. */

Source from the content-addressed store, hash-verified

193 * may be forwarded.
194 */
195int
196in_canforward(struct in_addr in)
197{
198 u_long i = ntohl(in.s_addr);
199
200 if (IN_EXPERIMENTAL(i) || IN_MULTICAST(i) || IN_LINKLOCAL(i) ||
201 IN_ZERONET(i) || IN_LOOPBACK(i))
202 return (0);
203 return (1);
204}
205
206/*
207 * Trim a mask in a sockaddr

Callers 2

ip_input.cFile · 0.85
defrtr_ipv6_only_ifpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected