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

Function init_sin6

freebsd/netinet6/in6_pcb.c:1405–1419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1403}
1404
1405void
1406init_sin6(struct sockaddr_in6 *sin6, struct mbuf *m, int srcordst)
1407{
1408 struct ip6_hdr *ip;
1409
1410 ip = mtod(m, struct ip6_hdr *);
1411 bzero(sin6, sizeof(*sin6));
1412 sin6->sin6_len = sizeof(*sin6);
1413 sin6->sin6_family = AF_INET6;
1414 sin6->sin6_addr = srcordst ? ip->ip6_dst : ip->ip6_src;
1415
1416 (void)sa6_recoverscope(sin6); /* XXX: should catch errors... */
1417
1418 return;
1419}

Callers 2

udp6_inputFunction · 0.85
rip6_inputFunction · 0.85

Calls 2

bzeroFunction · 0.85
sa6_recoverscopeFunction · 0.85

Tested by

no test coverage detected