| 113 | #endif |
| 114 | |
| 115 | static int |
| 116 | sctp_module_load(void) |
| 117 | { |
| 118 | int error; |
| 119 | |
| 120 | #ifdef INET |
| 121 | error = pf_proto_register(PF_INET, &sctp_stream_protosw); |
| 122 | if (error != 0) |
| 123 | return (error); |
| 124 | error = pf_proto_register(PF_INET, &sctp_seqpacket_protosw); |
| 125 | if (error != 0) |
| 126 | return (error); |
| 127 | error = ipproto_register(IPPROTO_SCTP); |
| 128 | if (error != 0) |
| 129 | return (error); |
| 130 | #endif |
| 131 | #ifdef INET6 |
| 132 | error = pf_proto_register(PF_INET6, &sctp6_stream_protosw); |
| 133 | if (error != 0) |
| 134 | return (error); |
| 135 | error = pf_proto_register(PF_INET6, &sctp6_seqpacket_protosw); |
| 136 | if (error != 0) |
| 137 | return (error); |
| 138 | error = ip6proto_register(IPPROTO_SCTP); |
| 139 | if (error != 0) |
| 140 | return (error); |
| 141 | #endif |
| 142 | error = sctp_syscalls_init(); |
| 143 | if (error != 0) |
| 144 | return (error); |
| 145 | return (0); |
| 146 | } |
| 147 | |
| 148 | static int __unused |
| 149 | sctp_module_unload(void) |
no test coverage detected