| 251 | */ |
| 252 | |
| 253 | void |
| 254 | scope6_setdefault(struct ifnet *ifp) |
| 255 | { |
| 256 | |
| 257 | /* |
| 258 | * Currently, this function just sets the default "interfaces" |
| 259 | * and "links" according to the given interface. |
| 260 | * We might eventually have to separate the notion of "link" from |
| 261 | * "interface" and provide a user interface to set the default. |
| 262 | */ |
| 263 | SCOPE6_LOCK(); |
| 264 | if (ifp) { |
| 265 | V_sid_default.s6id_list[IPV6_ADDR_SCOPE_INTFACELOCAL] = |
| 266 | ifp->if_index; |
| 267 | V_sid_default.s6id_list[IPV6_ADDR_SCOPE_LINKLOCAL] = |
| 268 | ifp->if_index; |
| 269 | } else { |
| 270 | V_sid_default.s6id_list[IPV6_ADDR_SCOPE_INTFACELOCAL] = 0; |
| 271 | V_sid_default.s6id_list[IPV6_ADDR_SCOPE_LINKLOCAL] = 0; |
| 272 | } |
| 273 | SCOPE6_UNLOCK(); |
| 274 | } |
| 275 | |
| 276 | int |
| 277 | scope6_get_default(struct scope6_id *idlist) |
no outgoing calls
no test coverage detected