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

Function inet6_makenetandmask

tools/route/route.c:1229–1244  ·  view source on GitHub ↗

* XXX the function may need more improvement... */

Source from the content-addressed store, hash-verified

1227 * XXX the function may need more improvement...
1228 */
1229static int
1230inet6_makenetandmask(struct sockaddr_in6 *sin6, const char *plen)
1231{
1232
1233 if (plen == NULL) {
1234 if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr) &&
1235 sin6->sin6_scope_id == 0)
1236 plen = "0";
1237 }
1238
1239 if (plen == NULL || strcmp(plen, "128") == 0)
1240 return (1);
1241 rtm_addrs |= RTA_NETMASK;
1242 prefixlen(plen);
1243 return (0);
1244}
1245#endif
1246
1247/*

Callers 1

getaddrFunction · 0.85

Calls 2

strcmpFunction · 0.85
prefixlenFunction · 0.85

Tested by

no test coverage detected