* Return zone id for the specified scope. */
| 502 | * Return zone id for the specified scope. |
| 503 | */ |
| 504 | uint32_t |
| 505 | in6_getscopezone(const struct ifnet *ifp, int scope) |
| 506 | { |
| 507 | |
| 508 | if (scope == IPV6_ADDR_SCOPE_INTFACELOCAL || |
| 509 | scope == IPV6_ADDR_SCOPE_LINKLOCAL) |
| 510 | return (ifp->if_index); |
| 511 | if (scope >= 0 && scope < IPV6_ADDR_SCOPES_COUNT) |
| 512 | return (SID(ifp)->s6id_list[scope]); |
| 513 | return (0); |
| 514 | } |
| 515 | |
| 516 | /* |
| 517 | * Extracts scope from adddress @dst, stores cleared address |
no outgoing calls
no test coverage detected