* Add a new protocol domain to the list of supported domains * Note: you cant unload it again because a socket may be using it. * XXX can't fail at this time. */
| 168 | * XXX can't fail at this time. |
| 169 | */ |
| 170 | void |
| 171 | domain_init(void *arg) |
| 172 | { |
| 173 | struct domain *dp = arg; |
| 174 | struct protosw *pr; |
| 175 | |
| 176 | if (dp->dom_init) |
| 177 | (*dp->dom_init)(); |
| 178 | for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) |
| 179 | protosw_init(pr); |
| 180 | /* |
| 181 | * update global information about maximums |
| 182 | */ |
| 183 | max_hdr = max_linkhdr + max_protohdr; |
| 184 | max_datalen = MHLEN - max_hdr; |
| 185 | if (max_datalen < 1) |
| 186 | panic("%s: max_datalen < 1", __func__); |
| 187 | } |
| 188 | |
| 189 | #ifdef VIMAGE |
| 190 | void |
no test coverage detected